From 6bff6116050a892247f9d84a78e21922823bfc47 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Wed, 28 Mar 2012 19:16:29 +0200 Subject: BASE: Destroy singletons on exit. --- base/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/base/main.cpp b/base/main.cpp index 99dcac63d3..6fb56b49c4 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -55,6 +55,9 @@ #include "audio/mididrv.h" #include "audio/musicplugin.h" /* for music manager */ +#include "graphics/cursorman.h" +#include "graphics/fontman.h" + #include "backends/keymapper/keymapper.h" #if defined(_WIN32_WCE) @@ -493,10 +496,15 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { PluginManager::destroy(); GUI::GuiManager::destroy(); Common::ConfigManager::destroy(); + Common::DebugManager::destroy(); + Common::EventRecorder::destroy(); Common::SearchManager::destroy(); #ifdef USE_TRANSLATION Common::TranslationManager::destroy(); #endif + MusicManager::destroy(); + Graphics::CursorManager::destroy(); + Graphics::FontManager::destroy(); return 0; } -- cgit v1.2.3 From fdee01bf04f1d66e4365e39c871c4b00d7b78946 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Wed, 28 Mar 2012 19:16:52 +0200 Subject: GRAPHICS: Don't try to delete static BDF data. --- graphics/fonts/bdf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphics/fonts/bdf.h b/graphics/fonts/bdf.h index 5b615cc043..b0166a2095 100644 --- a/graphics/fonts/bdf.h +++ b/graphics/fonts/bdf.h @@ -77,7 +77,7 @@ private: #define DEFINE_FONT(n) \ const BdfFont *n = 0; \ void create_##n() { \ - n = new BdfFont(desc, DisposeAfterUse::YES); \ + n = new BdfFont(desc, DisposeAfterUse::NO); \ } #define FORWARD_DECLARE_FONT(n) \ -- cgit v1.2.3 From 6d3927cd7a6e93452366085e179b156558f78a2b Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Wed, 28 Mar 2012 19:17:13 +0200 Subject: GRAPHICS: Take ownership of fonts passed to FontManager. --- graphics/fontman.cpp | 36 ++++++++++++++++++++++++++++++++++++ graphics/fontman.h | 5 ++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/graphics/fontman.cpp b/graphics/fontman.cpp index 8d967d595f..99dd3d664f 100644 --- a/graphics/fontman.cpp +++ b/graphics/fontman.cpp @@ -47,6 +47,13 @@ FontManager::FontManager() { } FontManager::~FontManager() { + for (uint i = 0; i < _ownedFonts.size(); ++i) { + const Font *font = _ownedFonts[i]; + if (font == g_sysfont || font == g_sysfont_big || font == g_consolefont) + continue; + delete font; + } + delete g_sysfont; g_sysfont = 0; delete g_sysfont_big; @@ -90,6 +97,8 @@ bool FontManager::assignFontToName(const Common::String &name, const Font *font) Common::String lowercaseName = name; lowercaseName.toLowercase(); _fontMap[lowercaseName] = font; + if (Common::find(_ownedFonts.begin(), _ownedFonts.end(), font) == _ownedFonts.end()) + _ownedFonts.push_back(font); return true; } @@ -116,8 +125,35 @@ bool FontManager::setFont(FontUsage usage, const BdfFont *font) { void FontManager::removeFontName(const Common::String &name) { Common::String lowercaseName = name; lowercaseName.toLowercase(); + if (!_fontMap.contains(lowercaseName)) + return; + + const Font *font = _fontMap[lowercaseName]; _fontMap.erase(lowercaseName); + // Check if we still have a copy of this font in the map. + bool stillHasFont = false; + for (Common::HashMap::iterator i = _fontMap.begin(); i != _fontMap.end(); ++i) { + if (i->_value != font) + continue; + stillHasFont = true; + break; + } + + if (!stillHasFont) { + // We don't have a copy of the font, so remove it from our list and delete it. + stillHasFont = true; + for (uint i = 0; i < _ownedFonts.size(); ++i) { + if (_ownedFonts[i] != font) + continue; + stillHasFont = false; + _ownedFonts.remove_at(i); + break; + } + assert(!stillHasFont); + delete font; + } + // In case the current localized font is removed, we fall back to the // default font again. if (_localizedFontName == lowercaseName) diff --git a/graphics/fontman.h b/graphics/fontman.h index 42f7d856fa..b06ddea860 100644 --- a/graphics/fontman.h +++ b/graphics/fontman.h @@ -60,7 +60,9 @@ public: const Font *getFontByName(const Common::String &name) const; /** - * Associates a font object with an 'name' + * Associates a font object with an 'name'. + * The FontManager takes ownership of the provided font object + * and will delete it when necesssary. * * @param name the name of the font * @param font the font object @@ -111,6 +113,7 @@ private: ~FontManager(); Common::HashMap _fontMap; + Common::Array _ownedFonts; Common::String _localizedFontName; }; -- cgit v1.2.3 From b470c9af28752a1f360bf8c459ffd8fdcca3e6fb Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Wed, 28 Mar 2012 19:17:53 +0200 Subject: BASE: Free TTFLibrary singleton on shutdown. This uses a helper function because TTFLibrary is internal. --- base/main.cpp | 6 ++++++ graphics/fonts/ttf.cpp | 4 ++++ graphics/fonts/ttf.h | 2 ++ 3 files changed, 12 insertions(+) diff --git a/base/main.cpp b/base/main.cpp index 6fb56b49c4..e103b70d68 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -57,6 +57,9 @@ #include "graphics/cursorman.h" #include "graphics/fontman.h" +#ifdef USE_FREETYPE2 +#include "graphics/fonts/ttf.h" +#endif #include "backends/keymapper/keymapper.h" @@ -505,6 +508,9 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { MusicManager::destroy(); Graphics::CursorManager::destroy(); Graphics::FontManager::destroy(); +#ifdef USE_FREETYPE2 + Graphics::shutdownTTF(); +#endif return 0; } diff --git a/graphics/fonts/ttf.cpp b/graphics/fonts/ttf.cpp index 7505f7913e..7f5c616710 100644 --- a/graphics/fonts/ttf.cpp +++ b/graphics/fonts/ttf.cpp @@ -70,6 +70,10 @@ private: bool _initialized; }; +void shutdownTTF() { + TTFLibrary::destroy(); +} + #define g_ttf ::Graphics::TTFLibrary::instance() TTFLibrary::TTFLibrary() : _library(), _initialized(false) { diff --git a/graphics/fonts/ttf.h b/graphics/fonts/ttf.h index 7222d6e112..ec7dbe04ef 100644 --- a/graphics/fonts/ttf.h +++ b/graphics/fonts/ttf.h @@ -34,6 +34,8 @@ namespace Graphics { class Font; Font *loadTTFFont(Common::SeekableReadStream &stream, int size, bool monochrome = false, const uint32 *mapping = 0); +void shutdownTTF(); + } // End of namespace Graphics #endif -- cgit v1.2.3 From 29e05ec05eb85cc1402ebee2c399a4a45bcd4933 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Wed, 28 Mar 2012 19:18:25 +0200 Subject: OPENGL: Don't leak surfaces. --- backends/graphics/opengl/opengl-graphics.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 45804b5d6e..cd820ae3b2 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -70,6 +70,11 @@ OpenGLGraphicsManager::~OpenGLGraphicsManager() { free(_gamePalette); free(_cursorPalette); + _screenData.free(); + _overlayData.free(); + _cursorData.free(); + _osdSurface.free(); + delete _gameTexture; delete _overlayTexture; delete _cursorTexture; -- cgit v1.2.3 From fe4cd8d9ff680e7eb84cba73e0f688e4b64cf68e Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Thu, 26 Apr 2012 21:27:08 +0200 Subject: CONFIGURE: fix typo in --with-freetype2-prefix help message --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index cdc44a8c01..46b7308ceb 100755 --- a/configure +++ b/configure @@ -840,7 +840,7 @@ Optional Libraries: --with-sdl-prefix=DIR Prefix where the sdl-config script is installed (optional) - --with-freetype-prefix=DIR Prefix where the freetype-config script is + --with-freetype2-prefix=DIR Prefix where the freetype-config script is installed (optional) --with-nasm-prefix=DIR Prefix where nasm executable is installed (optional) -- cgit v1.2.3 From cc2b95b068b4dc7cc8dbb33578589d9d3316869c Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Fri, 27 Apr 2012 14:12:55 +0200 Subject: PS3: Fix build using lastest ps3toolchain --- configure | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 46b7308ceb..88dc161595 100755 --- a/configure +++ b/configure @@ -1403,6 +1403,10 @@ ps3) echo "Please set PS3DEV in your environment. export PS3DEV=" exit 1 fi + if test -z "$PSL1GHT"; then + echo "Please set PSL1GHT in your environment. export PSL1GHT=" + exit 1 + fi ;; psp) if test -z "$PSPDEV"; then @@ -2068,8 +2072,8 @@ case $_host_os in _sdlpath="$PS3DEV/portlibs/ppu:$PS3DEV/portlibs/ppu/bin" DEFINES="$DEFINES -DPLAYSTATION3" - CXXFLAGS="$CXXFLAGS -mcpu=cell -mminimal-toc -I$PS3DEV/psl1ght/ppu/include -I$PS3DEV/portlibs/ppu/include" - LDFLAGS="$LDFLAGS -L$PS3DEV/psl1ght/ppu/lib -L$PS3DEV/portlibs/ppu/lib" + CXXFLAGS="$CXXFLAGS -mcpu=cell -mminimal-toc -I$PSL1GHT/ppu/include -I$PS3DEV/portlibs/ppu/include" + LDFLAGS="$LDFLAGS -L$PSL1GHT/ppu/lib -L$PS3DEV/portlibs/ppu/lib" add_line_to_config_mk 'PLAYSTATION3 = 1' add_line_to_config_h "#define PREFIX \"${prefix}\"" ;; -- cgit v1.2.3 From bdb12a9c658fa0e8661c7a8370f1d926ed31ae62 Mon Sep 17 00:00:00 2001 From: Ben Castricum Date: Mon, 23 Apr 2012 18:51:15 +0200 Subject: SCUMM: Fix bug #3493317 by removing assert() in detection algorithm. Bug #3493317 ("SCUMM: Detecting Loom PCE without 16bpp support crashes") is caused by an assert() in detection algorithm. In case an MD5 is found the md5table, but the variant from the md5table is not found in detection_tables.h this assert triggers. However since certain variants can be left out compile-time this situation can occur. By ignoring instead of assert()-ing the entry ScummVM will no longer abort but continue the detection process. --- engines/scumm/detection.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index b47982af00..2da0abb5df 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -589,11 +589,11 @@ static void detectGames(const Common::FSList &fslist, Common::ListeditCount && position < Timestamp(0, _parentTrack->editList[_curEdit].timeOffset, _decoder->_timeScale); _curEdit++) + for (_curEdit = 0; _curEdit < _parentTrack->editCount - 1 && position > Timestamp(0, _parentTrack->editList[_curEdit].timeOffset, _decoder->_timeScale); _curEdit++) ; enterNewEdit(position); -- cgit v1.2.3 From 201336367b2e864b960966568df0a472efdbe1e5 Mon Sep 17 00:00:00 2001 From: Tobias Gunkel Date: Sun, 29 Apr 2012 17:23:07 +0200 Subject: ANDROID: disable compression for zip-file assets and recompress uncompressed zip-files before adding them as assets to the apk --- backends/platform/android/android.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/backends/platform/android/android.mk b/backends/platform/android/android.mk index 2e8fd62152..9292a16595 100644 --- a/backends/platform/android/android.mk +++ b/backends/platform/android/android.mk @@ -130,7 +130,18 @@ $(PATH_STAGE_PREFIX).%/res/drawable/scummvm.png: $(PATH_RESOURCES)/drawable/scum $(FILE_RESOURCES_MAIN): $(FILE_MANIFEST) $(RESOURCES) $(ANDROID_JAR8) $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(INSTALL) -d $(PATH_BUILD_ASSETS) $(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(PATH_BUILD_ASSETS)/ - $(AAPT) package -f -M $< -S $(PATH_RESOURCES) -A $(PATH_BUILD_ASSETS) -I $(ANDROID_JAR8) -F $@ + work_dir=`pwd`; \ + for i in $(PATH_BUILD_ASSETS)/*.zip; do \ + echo "recompress $$i"; \ + cd $$work_dir; \ + $(RM) -rf $(PATH_BUILD_ASSETS)/tmp; \ + $(MKDIR) $(PATH_BUILD_ASSETS)/tmp; \ + unzip -q $$i -d $(PATH_BUILD_ASSETS)/tmp; \ + cd $(PATH_BUILD_ASSETS)/tmp; \ + zip -r ../`basename $$i` *; \ + done + @$(RM) -rf $(PATH_BUILD_ASSETS)/tmp + $(AAPT) package -f -0 zip -M $< -S $(PATH_RESOURCES) -A $(PATH_BUILD_ASSETS) -I $(ANDROID_JAR8) -F $@ $(PATH_BUILD)/%/$(FILE_RESOURCES): $(PATH_BUILD)/%/AndroidManifest.xml $(PATH_STAGE_PREFIX).%/res/values/strings.xml $(PATH_STAGE_PREFIX).%/res/drawable/scummvm.png plugins/lib%.so $(ANDROID_JAR8) $(AAPT) package -f -M $< -S $(PATH_STAGE_PREFIX).$*/res -I $(ANDROID_JAR8) -F $@ -- cgit v1.2.3 From ad248c9b0b28a50208930c3b49fa4b51420f1f56 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 29 Apr 2012 20:21:52 +0300 Subject: SCI: Add the French floppy version of SQ4 (bug #3515247) --- engines/sci/detection_tables.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index d741bb801f..ff78d4f18b 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -3445,6 +3445,19 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Space Quest 4 1.000 - French DOS Floppy (supplied by misterhands in bug report #3515247) + {"sq4", "", { + + {"resource.map", 0, "1fd6f356f6a59ad2057686ce6573caeb", 6159}, + {"resource.000", 0, "8000a55aebc50a68b7cce07a8c33758c", 205287}, + {"resource.001", 0, "99a6df6d366b3f061271ff3450ac0d32", 1269850}, + {"resource.002", 0, "a6a8d7a24dbb7a266a26b084e7275e89", 1242668}, + {"resource.003", 0, "482a99c8103b4bcb5706e5969d1c1193", 1323083}, + {"resource.004", 0, "b2cca3afcf2e013b8ce86b64155af766", 1254353}, + {"resource.005", 0, "9e520577e035547c4b5149a6d12ef85b", 1098814}, + AD_LISTEND}, + Common::FR_FRA, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Space Quest 4 1.000 - English DOS Floppy (from abevi, bug report #2612718) {"sq4", "", { {"resource.map", 0, "8f08b97ca093f370c56d99715b015554", 6153}, -- cgit v1.2.3 From 24e57808aa946ad38379b43ca205af6ef151c66a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 29 Apr 2012 20:26:05 +0300 Subject: SCI: Add a hack to fix the cursor colors in Longbow (bug #3489101) --- engines/sci/graphics/cursor.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp index 71f4598afc..14ffa69f91 100644 --- a/engines/sci/graphics/cursor.cpp +++ b/engines/sci/graphics/cursor.cpp @@ -148,11 +148,13 @@ void GfxCursor::kernelSetShape(GuiResourceId resourceId) { colorMapping[1] = _screen->getColorWhite(); // White is also hardcoded colorMapping[2] = SCI_CURSOR_SCI0_TRANSPARENCYCOLOR; colorMapping[3] = _palette->matchColor(170, 170, 170); // Grey - // Special case for the magnifier cursor in LB1 (bug #3487092). - // No other SCI0 game has a cursor resource of 1, so this is handled - // specifically for LB1. + // TODO: Figure out if the grey color is hardcoded + // HACK for the magnifier cursor in LB1, fixes its color (bug #3487092) if (g_sci->getGameId() == GID_LAURABOW && resourceId == 1) colorMapping[3] = _screen->getColorWhite(); + // HACK for Longbow cursors, fixes the shade of grey they're using (bug #3489101) + if (g_sci->getGameId() == GID_LONGBOW) + colorMapping[3] = _palette->matchColor(223, 223, 223); // Light Grey // Seek to actual data resourceData += 4; -- cgit v1.2.3 From e41e412c9ee6c277233ef9f7a5304f8cc40fa370 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 29 Apr 2012 20:43:04 +0300 Subject: SCI: Fix for bug #3522046 "Detection of SQ4CD as Windows breaks Music" Fall back to the DOS soundtracks in Windows CD versions if the user picks a non-General MIDI music device, as the Windows tracks only contain MIDI music --- engines/sci/engine/features.cpp | 3 ++- engines/sci/engine/features.h | 7 +++++++ engines/sci/sound/music.cpp | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp index cad95b1c18..8a932232f8 100644 --- a/engines/sci/engine/features.cpp +++ b/engines/sci/engine/features.cpp @@ -45,6 +45,7 @@ GameFeatures::GameFeatures(SegManager *segMan, Kernel *kernel) : _segMan(segMan) _usesCdTrack = Common::File::exists("cdaudio.map"); if (!ConfMan.getBool("use_cdaudio")) _usesCdTrack = false; + _forceDOSTracks = false; } reg_t GameFeatures::getDetectionAddr(const Common::String &objName, Selector slc, int methodNum) { @@ -642,7 +643,7 @@ MoveCountType GameFeatures::detectMoveCountType() { } bool GameFeatures::useAltWinGMSound() { - if (g_sci && g_sci->getPlatform() == Common::kPlatformWindows && g_sci->isCD()) { + if (g_sci && g_sci->getPlatform() == Common::kPlatformWindows && g_sci->isCD() && !_forceDOSTracks) { SciGameId id = g_sci->getGameId(); return (id == GID_ECOQUEST || id == GID_JONES || diff --git a/engines/sci/engine/features.h b/engines/sci/engine/features.h index 4592c5be9c..f6bb0b5759 100644 --- a/engines/sci/engine/features.h +++ b/engines/sci/engine/features.h @@ -117,6 +117,12 @@ public: */ bool useAltWinGMSound(); + /** + * Forces DOS soundtracks in Windows CD versions when the user hasn't + * selected a MIDI output device + */ + void forceDOSTracks() { _forceDOSTracks = true; } + private: reg_t getDetectionAddr(const Common::String &objName, Selector slc, int methodNum = -1); @@ -137,6 +143,7 @@ private: MoveCountType _moveCountType; bool _usesCdTrack; + bool _forceDOSTracks; SegManager *_segMan; Kernel *_kernel; diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 09cab75c39..918b045cb9 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -88,6 +88,12 @@ void SciMusic::init() { uint32 dev = MidiDriver::detectDevice(deviceFlags); _musicType = MidiDriver::getMusicType(dev); + if (g_sci->_features->useAltWinGMSound() && _musicType != MT_GM) { + warning("A Windows CD version with an alternate MIDI soundtrack has been chosen, " + "but no MIDI music device has been selected. Reverting to the DOS soundtrack"); + g_sci->_features->forceDOSTracks(); + } + switch (_musicType) { case MT_ADLIB: // FIXME: There's no Amiga sound option, so we hook it up to AdLib -- cgit v1.2.3 From f23ca8b62b6be15e570311dcaad301067c8e052a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 30 Apr 2012 00:09:56 +0200 Subject: COMMON: Use the file cache in ZipArchive::listMembers for performance. This avoids a new iteration through the .zip file for every listMember call. Instead it uses the "_hash" HashMap, which already contains all the filenames and is filled on initializing the ZipArchive by unzOpen. --- common/unzip.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/common/unzip.cpp b/common/unzip.cpp index 8cfcd605fa..ab659343a2 100644 --- a/common/unzip.cpp +++ b/common/unzip.cpp @@ -1463,22 +1463,16 @@ bool ZipArchive::hasFile(const String &name) const { } int ZipArchive::listMembers(ArchiveMemberList &list) const { - int matches = 0; - int err = unzGoToFirstFile(_zipFile); + int members = 0; - while (err == UNZ_OK) { - char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; - if (unzGetCurrentFileInfo(_zipFile, NULL, - szCurrentFileName, sizeof(szCurrentFileName)-1, - NULL, 0, NULL, 0) == UNZ_OK) { - list.push_back(ArchiveMemberList::value_type(new GenericArchiveMember(szCurrentFileName, this))); - matches++; - } - - err = unzGoToNextFile(_zipFile); + const unz_s *const archive = (const unz_s *)_zipFile; + for (ZipHash::const_iterator i = archive->_hash.begin(), end = archive->_hash.end(); + i != end; ++i) { + list.push_back(ArchiveMemberList::value_type(new GenericArchiveMember(i->_key, this))); + ++members; } - return matches; + return members; } const ArchiveMemberPtr ZipArchive::getMember(const String &name) const { -- cgit v1.2.3 From ec1070678caa1070e3d229a80f77ad78a8360b33 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Wed, 2 May 2012 20:22:04 +0100 Subject: CREATE_PROJECT: Fix tool help output to reflect command line changes. --- devtools/create_project/create_project.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 293cc0b2de..df220f0934 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -654,14 +654,14 @@ void displayHelp(const char *exe) { "\n" "Engines settings:\n" " --list-engines list all available engines and their default state\n" - " --enable-engine enable building of the engine with the name \"engine\"\n" - " --disable-engine disable building of the engine with the name \"engine\"\n" + " --enable-engine= enable building of the engine with the name \"name\"\n" + " --disable-engine= disable building of the engine with the name \"name\"\n" " --enable-all-engines enable building of all engines\n" " --disable-all-engines disable building of all engines\n" "\n" "Optional features settings:\n" - " --enable-name enable inclusion of the feature \"name\"\n" - " --disable-name disable inclusion of the feature \"name\"\n" + " --enable- enable inclusion of the feature \"name\"\n" + " --disable- disable inclusion of the feature \"name\"\n" "\n" " There are the following features available:\n" "\n"; -- cgit v1.2.3 From d6bedc8a36d5a0785f27912cd99a3137a2a7062d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 2 May 2012 23:51:02 +0300 Subject: AGI: Proper handling of the cancel button when saving/loading --- engines/agi/saveload.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index 8e524c8d9a..d58e55a6b9 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -831,6 +831,9 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) { delete dialog; + if (slot < 0) + return true; + if (isSave) return doSave(slot, desc); else -- cgit v1.2.3 From 8d157ae1858c6aab2acc78c732b547dd4e94723a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 3 May 2012 04:28:43 +0300 Subject: NEWS: Mention all of the new games that have been announced --- NEWS | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/NEWS b/NEWS index b208646d74..0a48ccab9a 100644 --- a/NEWS +++ b/NEWS @@ -3,7 +3,17 @@ For a more comprehensive changelog of the latest experimental code, see: 1.5.0 (????-??-??) New Games: + - Added support for Blue Force. + - Added support for Darby the Dragon. + - Added support for Dreamweb. + - Added support for Gregory and the Hot Air Balloon. + - Added support for Magic Tales: Baba Yaga and the Magic Geese. + - Added support for Magic Tales: Imo and the King. + - Added support for Magic Tales: Liam Finds a Story. + - Added support for Magic Tales: The Little Samurai. + - Added support for Sleeping Cub's Test of Courage. - Added support for Soltys. + - Added support for The Princess and the Crab. General: - Updated MT-32 emulation code to latest munt project snapshot. The emulation -- cgit v1.2.3 From e6c317a9226b71af572d2e2004e307c0e895b77c Mon Sep 17 00:00:00 2001 From: Oleksiy Kurochko Date: Thu, 3 May 2012 19:32:08 +0300 Subject: GUI: Implemented pressed state for buttons --- gui/ThemeEngine.cpp | 5 +++ gui/ThemeEngine.h | 6 ++- gui/dialog.cpp | 13 ++++++- gui/dialog.h | 7 ++++ gui/gui-manager.cpp | 13 ++++++- gui/launcher.cpp | 1 - gui/themes/default.inc | 11 ++++++ gui/themes/scummclassic.zip | Bin 93076 -> 93390 bytes gui/themes/scummclassic/THEMERC | 2 +- gui/themes/scummclassic/classic_gfx.stx | 13 +++++++ gui/themes/scummmodern.zip | Bin 1449403 -> 1449894 bytes gui/themes/scummmodern/THEMERC | 2 +- gui/themes/scummmodern/scummmodern_gfx.stx | 21 +++++++++++ gui/widget.cpp | 58 ++++++++++++++++++++++++++--- gui/widget.h | 18 ++++++++- 15 files changed, 155 insertions(+), 15 deletions(-) diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index fdd7750af9..be0a5db601 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -175,6 +175,7 @@ static const DrawDataInfo kDrawDataDefaults[] = { {kDDButtonIdle, "button_idle", true, kDDWidgetBackgroundSlider}, {kDDButtonHover, "button_hover", false, kDDButtonIdle}, {kDDButtonDisabled, "button_disabled", true, kDDNone}, + {kDDButtonPressed, "button_pressed", false, kDDButtonIdle}, {kDDSliderFull, "slider_full", false, kDDNone}, {kDDSliderHover, "slider_hover", false, kDDNone}, @@ -877,6 +878,8 @@ void ThemeEngine::drawButton(const Common::Rect &r, const Common::String &str, W dd = kDDButtonHover; else if (state == kStateDisabled) dd = kDDButtonDisabled; + else if (state == kStatePressed) + dd = kDDButtonPressed; queueDD(dd, r, 0, hints & WIDGET_CLEARBG); queueDDText(getTextData(dd), getTextColor(dd), r, str, false, true, _widgets[dd]->_textAlignH, _widgets[dd]->_textAlignV); @@ -1125,6 +1128,7 @@ void ThemeEngine::drawText(const Common::Rect &r, const Common::String &str, Wid break; case kStateEnabled: + case kStatePressed: colorId = kTextColorNormal; break; } @@ -1145,6 +1149,7 @@ void ThemeEngine::drawText(const Common::Rect &r, const Common::String &str, Wid break; case kStateEnabled: + case kStatePressed: colorId = kTextColorAlternative; break; } diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index 0495a85c88..acded085f5 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -35,7 +35,7 @@ #include "graphics/pixelformat.h" -#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.11" +#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.12" class OSystem; @@ -81,6 +81,7 @@ enum DrawData { kDDButtonIdle, kDDButtonHover, kDDButtonDisabled, + kDDButtonPressed, kDDSliderFull, kDDSliderHover, @@ -178,7 +179,8 @@ public: enum State { kStateDisabled, ///< Indicates that the widget is disabled, that does NOT include that it is invisible kStateEnabled, ///< Indicates that the widget is enabled - kStateHighlight ///< Indicates that the widget is highlighted by the user + kStateHighlight, ///< Indicates that the widget is highlighted by the user + kStatePressed ///< Indicates that the widget is pressed, currently works for buttons }; typedef State WidgetStateInfo; diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 2201e83ca5..ffca15bbc8 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -42,7 +42,7 @@ namespace GUI { Dialog::Dialog(int x, int y, int w, int h) : GuiObject(x, y, w, h), - _mouseWidget(0), _focusedWidget(0), _dragWidget(0), _visible(false), + _mouseWidget(0), _focusedWidget(0), _dragWidget(0), _tickleWidget(0), _visible(false), _backgroundType(GUI::ThemeEngine::kDialogBackgroundDefault) { // Some dialogs like LauncherDialog use internally a fixed size, even though // their widgets rely on the layout to be initialized correctly by the theme. @@ -54,7 +54,7 @@ Dialog::Dialog(int x, int y, int w, int h) Dialog::Dialog(const Common::String &name) : GuiObject(name), - _mouseWidget(0), _focusedWidget(0), _dragWidget(0), _visible(false), + _mouseWidget(0), _focusedWidget(0), _dragWidget(0), _tickleWidget(0), _visible(false), _backgroundType(GUI::ThemeEngine::kDialogBackgroundDefault) { // It may happen that we have 3x scaler in launcher (960xY) and then 640x480 @@ -117,6 +117,12 @@ void Dialog::reflowLayout() { GuiObject::reflowLayout(); } +void Dialog::lostFocus() { + if (_tickleWidget) { + _tickleWidget->lostFocus(); + } +} + void Dialog::setFocusWidget(Widget *widget) { // The focus will change. Tell the old focused widget (if any) // that it lost the focus. @@ -308,6 +314,9 @@ void Dialog::handleTickle() { // Focused widget receives tickle notifications if (_focusedWidget && _focusedWidget->getFlags() & WIDGET_WANT_TICKLE) _focusedWidget->handleTickle(); + + if (_tickleWidget && _tickleWidget->getFlags() & WIDGET_WANT_TICKLE) + _tickleWidget->handleTickle(); } void Dialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { diff --git a/gui/dialog.h b/gui/dialog.h index f5a5f94a68..f923c1f5b8 100644 --- a/gui/dialog.h +++ b/gui/dialog.h @@ -52,6 +52,7 @@ protected: Widget *_mouseWidget; Widget *_focusedWidget; Widget *_dragWidget; + Widget *_tickleWidget; bool _visible; ThemeEngine::DialogBackground _backgroundType; @@ -71,7 +72,13 @@ public: void setFocusWidget(Widget *widget); Widget *getFocusWidget() { return _focusedWidget; } + void setTickleWidget(Widget *widget) { _tickleWidget = widget; } + void unSetTickleWidget() { _tickleWidget = NULL; } + Widget *getTickleWidget() { return _tickleWidget; } + virtual void reflowLayout(); + virtual void lostFocus(); + virtual void receivedFocus() {}; protected: virtual void open(); diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index ffecd928bc..abd781e1a3 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -381,7 +381,7 @@ void GuiManager::runLoop() { if (tooltipCheck && _lastMousePosition.time + kTooltipDelay < _system->getMillis()) { Widget *wdg = activeDialog->findWidget(_lastMousePosition.x, _lastMousePosition.y); - if (wdg && wdg->getTooltip()) { + if (wdg && wdg->getTooltip() && !(wdg->getFlags() & WIDGET_PRESSED)) { Tooltip *tooltip = new Tooltip(); tooltip->setup(activeDialog, wdg, _lastMousePosition.x, _lastMousePosition.y); tooltip->runModal(); @@ -441,6 +441,11 @@ void GuiManager::restoreState() { } void GuiManager::openDialog(Dialog *dialog) { + dialog->receivedFocus(); + + if (!_dialogStack.empty()) + getTopDialog()->lostFocus(); + _dialogStack.push(dialog); if (_redrawStatus != kRedrawFull) _redrawStatus = kRedrawOpenDialog; @@ -458,7 +463,11 @@ void GuiManager::closeTopDialog() { return; // Remove the dialog from the stack - _dialogStack.pop(); + _dialogStack.pop()->lostFocus(); + + if (!_dialogStack.empty()) + getTopDialog()->receivedFocus(); + if (_redrawStatus != kRedrawFull) _redrawStatus = kRedrawCloseDialog; diff --git a/gui/launcher.cpp b/gui/launcher.cpp index a86a98f819..c8ed3126c4 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -663,7 +663,6 @@ LauncherDialog::LauncherDialog() _list->setEditable(false); _list->setNumberingMode(kListNumberingOff); - // Populate the list updateListing(); diff --git a/gui/themes/default.inc b/gui/themes/default.inc index 542f776dbd..5ee9b9202a 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -460,6 +460,17 @@ "bevel='2' " "/> " " " +" " +" " +" " +" " " " " + + + + + + + + + + + + = 0 && x < _w && y >= 0 && y < _h) + if (isEnabled() && x >= 0 && x < _w && y >= 0 && y < _h) { sendCommand(_cmd, 0); + startAnimatePressedState(); + } +} + +void ButtonWidget::handleMouseDown(int x, int y, int button, int clickCount) { + setPressedState(); } void ButtonWidget::drawWidget() { @@ -324,6 +334,44 @@ ButtonWidget *addClearButton(GuiObject *boss, const Common::String &name, uint32 return button; } +void ButtonWidget::setHighLighted(bool enable) { + (enable) ? setFlags(WIDGET_HILITED) : clearFlags(WIDGET_HILITED); + draw(); +} + +void ButtonWidget::handleTickle() { + if (_lastTime) { + uint32 curTime = g_system->getMillis(); + if (curTime - _lastTime > kPressedButtonTime) { + stopAnimatePressedState(); + } + } +} + +void ButtonWidget::setPressedState() { + wantTickle(true); + setFlags(WIDGET_PRESSED); + draw(); +} + +void ButtonWidget::stopAnimatePressedState() { + wantTickle(false); + _lastTime = 0; + clearFlags(WIDGET_PRESSED); + draw(); +} + +void ButtonWidget::startAnimatePressedState() { + _lastTime = g_system->getMillis(); +} + +void ButtonWidget::wantTickle(bool tickled) { + if (tickled) + ((GUI::Dialog *)_boss)->setTickleWidget(this); + else + ((GUI::Dialog *)_boss)->unSetTickleWidget(); +} + #pragma mark - PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd, uint8 hotkey) diff --git a/gui/widget.h b/gui/widget.h index 789fc09231..6a6c67ced9 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -38,6 +38,7 @@ enum { WIDGET_INVISIBLE = 1 << 1, WIDGET_HILITED = 1 << 2, WIDGET_BORDER = 1 << 3, + WIDGET_PRESSED = 1 << 4, //WIDGET_INV_BORDER = 1 << 4, WIDGET_CLEARBG = 1 << 5, WIDGET_WANT_TICKLE = 1 << 7, @@ -73,6 +74,10 @@ enum { kCaretBlinkTime = 300 }; +enum { + kPressedButtonTime = 200 +}; + /* Widget */ class Widget : public GuiObject { friend class Dialog; @@ -189,11 +194,22 @@ public: void setLabel(const Common::String &label); void handleMouseUp(int x, int y, int button, int clickCount); + void handleMouseDown(int x, int y, int button, int clickCount); void handleMouseEntered(int button) { setFlags(WIDGET_HILITED); draw(); } - void handleMouseLeft(int button) { clearFlags(WIDGET_HILITED); draw(); } + void handleMouseLeft(int button) { clearFlags(WIDGET_HILITED | WIDGET_PRESSED); draw(); } + void handleTickle(); + + void setHighLighted(bool enable); + void setPressedState(); + void startAnimatePressedState(); + void stopAnimatePressedState(); + void lostFocusWidget() { stopAnimatePressedState(); } protected: void drawWidget(); + void wantTickle(bool tickled); +private: + uint32 _lastTime; }; /* PicButtonWidget */ -- cgit v1.2.3 From 24a45beceb1d9228168fc0911b90da3bd45a923e Mon Sep 17 00:00:00 2001 From: Oleksiy Kurochko Date: Thu, 3 May 2012 19:32:34 +0300 Subject: GUI: Use pressed state in predictive dialog in keyboard mode. This adds more visual feedback to the user. --- gui/predictivedialog.cpp | 288 +++++++++++++++++++++++++++++------------------ gui/predictivedialog.h | 9 +- 2 files changed, 183 insertions(+), 114 deletions(-) diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp index 9cd18b81ba..b827d49416 100644 --- a/gui/predictivedialog.cpp +++ b/gui/predictivedialog.cpp @@ -69,31 +69,33 @@ enum { PredictiveDialog::PredictiveDialog() : Dialog("Predictive") { new StaticTextWidget(this, "Predictive.Headline", "Enter Text"); - new ButtonWidget(this, "Predictive.Cancel" , _("Cancel"), 0, kCancelCmd); - new ButtonWidget(this, "Predictive.OK" , _("Ok") , 0, kOkCmd); - new ButtonWidget(this, "Predictive.Button1", "1 `-.&" , 0, kBut1Cmd); - new ButtonWidget(this, "Predictive.Button2", "2 abc" , 0, kBut2Cmd); - new ButtonWidget(this, "Predictive.Button3", "3 def" , 0, kBut3Cmd); - new ButtonWidget(this, "Predictive.Button4", "4 ghi" , 0, kBut4Cmd); - new ButtonWidget(this, "Predictive.Button5", "5 jkl" , 0, kBut5Cmd); - new ButtonWidget(this, "Predictive.Button6", "6 mno" , 0, kBut6Cmd); - new ButtonWidget(this, "Predictive.Button7", "7 pqrs" , 0, kBut7Cmd); - new ButtonWidget(this, "Predictive.Button8", "8 tuv" , 0, kBut8Cmd); - new ButtonWidget(this, "Predictive.Button9", "9 wxyz" , 0, kBut9Cmd); - new ButtonWidget(this, "Predictive.Button0", "0" , 0, kBut0Cmd); - // I18N: You must leave "#" as is, only word 'next' is translatable - new ButtonWidget(this, "Predictive.Next" , _("# next"), 0, kNextCmd); - _addBtn = new ButtonWidget(this, "Predictive.Add", _("add"), 0, kAddCmd); - _addBtn->setEnabled(false); - -#ifndef DISABLE_FANCY_THEMES - _delbtn = new PicButtonWidget(this, "Predictive.Delete", _("Delete char"), kDelCmd); - ((PicButtonWidget *)_delbtn)->useThemeTransparency(true); - ((PicButtonWidget *)_delbtn)->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageDelbtn)); -#endif - _delbtn = new ButtonWidget(this, "Predictive.Delete" , _("<"), 0, kDelCmd); - // I18N: Pre means 'Predictive', leave '*' as is - _modebutton = new ButtonWidget(this, "Predictive.Pre", _("* Pre"), 0, kModeCmd); + _btns = (ButtonWidget **)calloc(1, sizeof(ButtonWidget *) * 16); + + _btns[kCancelAct] = new ButtonWidget(this, "Predictive.Cancel", _("Cancel") , 0, kCancelCmd); + _btns[kOkAct] = new ButtonWidget(this, "Predictive.OK", _("Ok") , 0, kOkCmd); + _btns[kBtn1Act] = new ButtonWidget(this, "Predictive.Button1", "1 `-.&" , 0, kBut1Cmd); + _btns[kBtn2Act] = new ButtonWidget(this, "Predictive.Button2", "2 abc" , 0, kBut2Cmd); + _btns[kBtn3Act] = new ButtonWidget(this, "Predictive.Button3", "3 def" , 0, kBut3Cmd); + _btns[kBtn4Act] = new ButtonWidget(this, "Predictive.Button4", "4 ghi" , 0, kBut4Cmd); + _btns[kBtn5Act] = new ButtonWidget(this, "Predictive.Button5", "5 jkl" , 0, kBut5Cmd); + _btns[kBtn6Act] = new ButtonWidget(this, "Predictive.Button6", "6 mno" , 0, kBut6Cmd); + _btns[kBtn7Act] = new ButtonWidget(this, "Predictive.Button7", "7 pqrs" , 0, kBut7Cmd); + _btns[kBtn8Act] = new ButtonWidget(this, "Predictive.Button8", "8 tuv" , 0, kBut8Cmd); + _btns[kBtn9Act] = new ButtonWidget(this, "Predictive.Button9", "9 wxyz" , 0, kBut9Cmd); + _btns[kBtn0Act] = new ButtonWidget(this, "Predictive.Button0", "0" , 0, kBut0Cmd); + // I18N: You must leave "#" as is, only word 'next' is translatable + _btns[kNextAct] = new ButtonWidget(this, "Predictive.Next", _("# next") , 0, kNextCmd); + _btns[kAddAct] = new ButtonWidget(this, "Predictive.Add", _("add") , 0, kAddCmd); + _btns[kAddAct]->setEnabled(false); + + #ifndef DISABLE_FANCY_THEMES + _btns[kDelAct] = new PicButtonWidget(this, "Predictive.Delete", _("Delete char"), kDelCmd); + ((PicButtonWidget *)_btns[kDelAct])->useThemeTransparency(true); + ((PicButtonWidget *)_btns[kDelAct])->setGfx(g_gui.theme()->getImageSurface(ThemeEngine::kImageDelbtn)); + #endif + _btns[kDelAct] = new ButtonWidget(this, "Predictive.Delete" , _("<") , 0, kDelCmd); + // I18N: Pre means 'Predictive', leave '*' as is + _btns[kModeAct] = new ButtonWidget(this, "Predictive.Pre", _("* Pre"), 0, kModeCmd); _edittext = new EditTextWidget(this, "Predictive.Word", _search, 0, 0, 0); _userDictHasChanged = false; @@ -164,6 +166,8 @@ PredictiveDialog::~PredictiveDialog() { free(_userDict.dictLine); free(_predictiveDict.dictLine); free(_unitedDict.dictLine); + + free(_btns); } void PredictiveDialog::saveUserDictToFile() { @@ -182,11 +186,23 @@ void PredictiveDialog::saveUserDictToFile() { } } +void PredictiveDialog::handleKeyUp(Common::KeyState state) { + if (_currBtn != kNoAct && !_needRefresh) { + _btns[_currBtn]->startAnimatePressedState(); + processBtnActive(_currBtn); + } +} + void PredictiveDialog::handleKeyDown(Common::KeyState state) { - ButtonId act = kNoAct; + _currBtn = kNoAct; + _needRefresh = false; if (getFocusWidget() == _edittext) { - setFocusWidget(_addBtn); + setFocusWidget(_btns[kAddAct]); + } + + if (_lastbutton == kNoAct) { + _lastbutton = kBtn5Act; } switch (state.keycode) { @@ -197,96 +213,126 @@ void PredictiveDialog::handleKeyDown(Common::KeyState state) { case Common::KEYCODE_LEFT: _navigationwithkeys = true; if (_lastbutton == kBtn1Act || _lastbutton == kBtn4Act || _lastbutton == kBtn7Act) - act = ButtonId(_lastbutton + 2); + _currBtn = ButtonId(_lastbutton + 2); + else if (_lastbutton == kDelAct) + _currBtn = kBtn1Act; + else if (_lastbutton == kModeAct) + _currBtn = kNextAct; else if (_lastbutton == kNextAct) - act = kBtn0Act; - else if (_lastbutton == kDelAct) - act = kDelAct; + _currBtn = kBtn0Act; + else if (_lastbutton == kAddAct) + _currBtn = kOkAct; else if (_lastbutton == kCancelAct) - act = kOkAct; - else if (_lastbutton == kModeAct) - act = kAddAct; + _currBtn = kAddAct; else - act = ButtonId(_lastbutton - 1); - _lastbutton = act; - //needRefresh = true; + _currBtn = ButtonId(_lastbutton - 1); + + + if (_mode != kModeAbc && _lastbutton == kCancelAct) + _currBtn = kOkAct; + + _needRefresh = true; break; case Common::KEYCODE_RIGHT: _navigationwithkeys = true; - if (_lastbutton == kBtn3Act || _lastbutton == kBtn6Act || _lastbutton == kBtn9Act) - act = ButtonId(_lastbutton - 2); + if (_lastbutton == kBtn3Act || _lastbutton == kBtn6Act || _lastbutton == kBtn9Act || _lastbutton == kOkAct) + _currBtn = ButtonId(_lastbutton - 2); + else if (_lastbutton == kDelAct) + _currBtn = kBtn3Act; + else if (_lastbutton == kBtn0Act) + _currBtn = kNextAct; + else if (_lastbutton == kNextAct) + _currBtn = kModeAct; else if (_lastbutton == kAddAct) - act = kModeAct; - else if (_lastbutton == kDelAct) - act = kDelAct; + _currBtn = kCancelAct; else if (_lastbutton == kOkAct) - act = kCancelAct; - else if (_lastbutton == kBtn0Act) - act = kNextAct; + _currBtn = kAddAct; else - act = ButtonId(_lastbutton + 1); - _lastbutton = act; - //needRefresh = true; + _currBtn = ButtonId(_lastbutton + 1); + + if (_mode != kModeAbc && _lastbutton == kOkAct) + _currBtn = kCancelAct; + _needRefresh = true; break; case Common::KEYCODE_UP: _navigationwithkeys = true; if (_lastbutton <= kBtn3Act) - act = kDelAct; - else if (_lastbutton == kNextAct || _lastbutton == kAddAct) - act = ButtonId(_lastbutton - 2); + _currBtn = kDelAct; else if (_lastbutton == kDelAct) - act = kOkAct; - else if (_lastbutton == kModeAct) - act = kBtn9Act; + _currBtn = kOkAct; + else if (_lastbutton == kModeAct) + _currBtn = kBtn7Act; else if (_lastbutton == kBtn0Act) - act = kBtn7Act; + _currBtn = kBtn8Act; + else if (_lastbutton == kNextAct) + _currBtn = kBtn9Act; + else if (_lastbutton == kAddAct) + _currBtn = kModeAct; + else if (_lastbutton == kCancelAct) + _currBtn = kBtn0Act; + else if (_lastbutton == kOkAct) + _currBtn = kNextAct; else - act = ButtonId(_lastbutton - 3); - _lastbutton = act; - //needRefresh = true; + _currBtn = ButtonId(_lastbutton - 3); + _needRefresh = true; break; case Common::KEYCODE_DOWN: _navigationwithkeys = true; - if (_lastbutton == kBtn7Act) - act = kBtn0Act; - else if (_lastbutton == kBtn8Act || _lastbutton == kBtn9Act) - act = ButtonId(_lastbutton + 2); - else if (_lastbutton == kDelAct) - act = kBtn1Act; - else if (_lastbutton == kCancelAct || _lastbutton == kOkAct) - act = kDelAct; - else if (_lastbutton == kModeAct || _lastbutton == kBtn0Act) - act = ButtonId(_lastbutton - 2); + if (_lastbutton == kDelAct) + _currBtn = kBtn3Act; + else if (_lastbutton == kBtn7Act) + _currBtn = kModeAct; + else if (_lastbutton == kBtn8Act) + _currBtn = kBtn0Act; + else if (_lastbutton == kBtn9Act) + _currBtn = kNextAct; + else if (_lastbutton == kModeAct) + _currBtn = kAddAct; + else if (_lastbutton == kBtn0Act) + _currBtn = kCancelAct; + else if (_lastbutton == kNextAct) + _currBtn = kOkAct; + else if (_lastbutton == kAddAct || _lastbutton == kCancelAct || _lastbutton == kOkAct) + _currBtn = kDelAct; else - act = ButtonId(_lastbutton + 3); - _lastbutton = act; - //needRefresh = true; + _currBtn = ButtonId(_lastbutton + 3); + + if (_mode != kModeAbc && _lastbutton == kModeAct) + _currBtn = kCancelAct; + + _needRefresh = true; break; case Common::KEYCODE_KP_ENTER: + case Common::KEYCODE_RETURN: + if (state.flags & Common::KBD_CTRL) { + _currBtn = kOkAct; + break; + } if (_navigationwithkeys) { // when the user has utilized arrow key navigation, - // interpret enter as 'click' on the act button - act = _lastbutton; + // interpret enter as 'click' on the _currBtn button + _currBtn = _lastbutton; + _needRefresh = false; } else { // else it is a shortcut for 'Ok' - act = kOkAct; + _currBtn = kOkAct; } break; case Common::KEYCODE_KP_PLUS: - act = kAddAct; + _currBtn = kAddAct; break; case Common::KEYCODE_BACKSPACE: case Common::KEYCODE_KP_MINUS: - act = kDelAct; + _currBtn = kDelAct; break; case Common::KEYCODE_KP_DIVIDE: - act = kNextAct; + _currBtn = kNextAct; break; case Common::KEYCODE_KP_MULTIPLY: - act = kModeAct; + _currBtn = kModeAct; break; case Common::KEYCODE_KP0: - act = kBtn0Act; + _currBtn = kBtn0Act; break; case Common::KEYCODE_KP1: case Common::KEYCODE_KP2: @@ -297,78 +343,93 @@ void PredictiveDialog::handleKeyDown(Common::KeyState state) { case Common::KEYCODE_KP7: case Common::KEYCODE_KP8: case Common::KEYCODE_KP9: - act = ButtonId(state.keycode - Common::KEYCODE_KP1); + _currBtn = ButtonId(state.keycode - Common::KEYCODE_KP1); break; default: Dialog::handleKeyDown(state); } - if (act != kNoAct) { - processBtnActive(act); + if (_lastbutton != _currBtn) + _btns[_lastbutton]->stopAnimatePressedState(); + + if (_currBtn != kNoAct && !_needRefresh) + _btns[_currBtn]->setPressedState(); + else + updateHighLightedButton(_currBtn); +} + +void PredictiveDialog::updateHighLightedButton(ButtonId act) { + if (_currBtn != kNoAct) { + _btns[_lastbutton]->setHighLighted(false); + _lastbutton = act; + _btns[_lastbutton]->setHighLighted(true); } } void PredictiveDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { - ButtonId act = kNoAct; + _currBtn = kNoAct; _navigationwithkeys = false; + if (_lastbutton != kNoAct) + _btns[_lastbutton]->setHighLighted(false); + switch (cmd) { case kDelCmd: - act = kDelAct; + _currBtn = kDelAct; break; case kNextCmd: - act = kNextAct; + _currBtn = kNextAct; break; case kAddCmd: - act = kAddAct; + _currBtn = kAddAct; break; case kModeCmd: - act = kModeAct; + _currBtn = kModeAct; break; case kBut1Cmd: - act = kBtn1Act; + _currBtn = kBtn1Act; break; case kBut2Cmd: - act = kBtn2Act; + _currBtn = kBtn2Act; break; case kBut3Cmd: - act = kBtn3Act; + _currBtn = kBtn3Act; break; case kBut4Cmd: - act = kBtn4Act; + _currBtn = kBtn4Act; break; case kBut5Cmd: - act = kBtn5Act; + _currBtn = kBtn5Act; break; case kBut6Cmd: - act = kBtn6Act; + _currBtn = kBtn6Act; break; case kBut7Cmd: - act = kBtn7Act; + _currBtn = kBtn7Act; break; case kBut8Cmd: - act = kBtn8Act; + _currBtn = kBtn8Act; break; case kBut9Cmd: - act = kBtn9Act; + _currBtn = kBtn9Act; break; case kBut0Cmd: - act = kBtn0Act; + _currBtn = kBtn0Act; break; case kCancelCmd: saveUserDictToFile(); close(); return; case kOkCmd: - act = kOkAct; + _currBtn = kOkAct; break; default: Dialog::handleCommand(sender, cmd, data); } - if (act != kNoAct) { - processBtnActive(act); + if (_currBtn != kNoAct) { + processBtnActive(_currBtn); } } @@ -500,18 +561,18 @@ void PredictiveDialog::processBtnActive(ButtonId button) { bringWordtoTop(_unitedDict.dictActLine, _wordNumber); } else if (button == kModeAct) { // Mode _mode++; - _addBtn->setEnabled(false); + _btns[kAddAct]->setEnabled(false); if (_mode > kModeAbc) { _mode = kModePre; // I18N: Pre means 'Predictive', leave '*' as is - _modebutton->setLabel("* Pre"); + _btns[kModeAct]->setLabel("* Pre"); } else if (_mode == kModeNum) { // I18N: 'Num' means Numbers - _modebutton->setLabel("* Num"); + _btns[kModeAct]->setLabel("* Num"); } else { // I18N: 'Abc' means Latin alphabet input - _modebutton->setLabel("* Abc"); - _addBtn->setEnabled(true); + _btns[kModeAct]->setLabel("* Abc"); + _btns[kAddAct]->setEnabled(true); } // truncate current input at mode change @@ -532,18 +593,23 @@ void PredictiveDialog::processBtnActive(ButtonId button) { if (button == kOkAct) close(); + + if (button == kCancelAct) { + saveUserDictToFile(); + close(); + } } void PredictiveDialog::handleTickle() { - // TODO/FIXME: This code does not seem to make any sense. It is only - // triggered when _lastTime is zero and sets _lastTime to zero again - // under some condition. This should really be a nop. Probably this - // code intends to check "_lastTime" instead of "!_lastTime". - if (!_lastTime) { + if (_lastTime) { if ((_curTime - _lastTime) > kRepeatDelay) { _lastTime = 0; } } + + if (getTickleWidget()) { + getTickleWidget()->handleTickle(); + } } void PredictiveDialog::mergeDicts() { @@ -664,7 +730,7 @@ bool PredictiveDialog::matchWord() { // The entries in the dictionary consist of a code, a space, and then // a space-separated list of words matching this code. - // To exactly match a code, we therefore match the code plus the trailing + // To ex_currBtnly match a code, we therefore match the code plus the trailing // space in the dictionary. Common::String code = _currentCode + " "; diff --git a/gui/predictivedialog.h b/gui/predictivedialog.h index 32de36d5f2..0e3d2967c0 100644 --- a/gui/predictivedialog.h +++ b/gui/predictivedialog.h @@ -68,6 +68,7 @@ public: ~PredictiveDialog(); virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); + virtual void handleKeyUp(Common::KeyState state); virtual void handleKeyDown(Common::KeyState state); virtual void handleTickle(); @@ -98,6 +99,8 @@ private: void saveUserDictToFile(); void mergeDicts(); + + void updateHighLightedButton(ButtonId active); private: Dict _unitedDict; Dict _predictiveDict; @@ -118,6 +121,7 @@ private: uint32 _curTime, _lastTime; ButtonId _lastPressBtn; + ButtonId _currBtn; char _temp[kMaxWordLen + 1]; int _repeatcount[kMaxWordLen]; @@ -128,11 +132,10 @@ private: Common::String _search; bool _navigationwithkeys; + bool _needRefresh; private: EditTextWidget *_edittext; - ButtonWidget *_modebutton; - ButtonWidget *_delbtn; - ButtonWidget *_addBtn; + ButtonWidget **_btns; }; } // namespace GUI -- cgit v1.2.3 From 18ae64ed5a7992b09b55f77c1ee0f973fac48235 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 3 May 2012 18:37:42 +0200 Subject: CONFIGURE: Enable dreamweb and composer by default. --- engines/configure.engines | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/configure.engines b/engines/configure.engines index 6e8db01e66..8eaee730cc 100644 --- a/engines/configure.engines +++ b/engines/configure.engines @@ -7,11 +7,11 @@ add_engine agos "AGOS" yes "agos2" add_engine agos2 "AGOS 2 games" yes add_engine cge "CGE" yes add_engine cine "Cinematique evo 1" yes -add_engine composer "Magic Composer" no +add_engine composer "Magic Composer" yes add_engine cruise "Cinematique evo 2" yes add_engine draci "Dragon History" yes add_engine drascula "Drascula: The Vampire Strikes Back" yes -add_engine dreamweb "Dreamweb" no +add_engine dreamweb "Dreamweb" yes add_engine gob "Gobli*ns" yes add_engine groovie "Groovie" yes "groovie2" add_engine groovie2 "Groovie 2 games" no -- cgit v1.2.3 From 0c312f87531ae6ed8b3ee83a6ac9b452b09f3668 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 3 May 2012 18:43:09 +0200 Subject: GUI: Remove unecessary ";". --- gui/dialog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/dialog.h b/gui/dialog.h index f923c1f5b8..1773c6633e 100644 --- a/gui/dialog.h +++ b/gui/dialog.h @@ -78,7 +78,7 @@ public: virtual void reflowLayout(); virtual void lostFocus(); - virtual void receivedFocus() {}; + virtual void receivedFocus() {} protected: virtual void open(); -- cgit v1.2.3 From e72f51129bfd11d0c926a2e21015a57740980928 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 3 May 2012 18:44:02 +0200 Subject: DREAMWEB: Tag all detection entries as testing instead of unstable. --- engines/dreamweb/detection_tables.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/engines/dreamweb/detection_tables.h b/engines/dreamweb/detection_tables.h index 8ca24d1724..d54b2402c8 100644 --- a/engines/dreamweb/detection_tables.h +++ b/engines/dreamweb/detection_tables.h @@ -45,7 +45,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformPC, - ADGF_UNSTABLE, + ADGF_TESTING, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -62,7 +62,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformPC, - ADGF_CD | ADGF_UNSTABLE, + ADGF_CD | ADGF_TESTING, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -96,7 +96,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::FR_FRA, Common::kPlatformPC, - ADGF_CD | ADGF_UNSTABLE, + ADGF_CD | ADGF_TESTING, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -113,7 +113,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::DE_DEU, Common::kPlatformPC, - ADGF_UNSTABLE, + ADGF_TESTING, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -130,7 +130,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::DE_DEU, Common::kPlatformPC, - ADGF_CD | ADGF_UNSTABLE, + ADGF_CD | ADGF_TESTING, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -147,7 +147,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::ES_ESP, Common::kPlatformPC, - ADGF_UNSTABLE, + ADGF_TESTING, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -164,7 +164,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::ES_ESP, Common::kPlatformPC, - ADGF_CD | ADGF_UNSTABLE, + ADGF_CD | ADGF_TESTING, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -181,7 +181,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::IT_ITA, Common::kPlatformPC, - ADGF_UNSTABLE, + ADGF_TESTING, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, -- cgit v1.2.3 From 3b212fdb51c4933bbc7eeb827f514cd1e120b3c5 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 3 May 2012 23:25:00 +0200 Subject: GRAPHICS: Remove unused function ftFloor26_6 in ttf.cpp. --- graphics/fonts/ttf.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/graphics/fonts/ttf.cpp b/graphics/fonts/ttf.cpp index 7f5c616710..96241e923c 100644 --- a/graphics/fonts/ttf.cpp +++ b/graphics/fonts/ttf.cpp @@ -43,10 +43,6 @@ namespace Graphics { namespace { -inline int ftFloor26_6(FT_Pos x) { - return x / 64; -} - inline int ftCeil26_6(FT_Pos x) { return (x + 63) / 64; } -- cgit v1.2.3 From b93b17e7f4af0ad28ad0d2bde36302cdbd3aeeff Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 3 May 2012 12:03:27 -0400 Subject: TINSEL: Capitalize 'demo' --- engines/tinsel/detection_tables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h index be44b1c462..b6b19f6ee7 100644 --- a/engines/tinsel/detection_tables.h +++ b/engines/tinsel/detection_tables.h @@ -397,7 +397,7 @@ static const TinselGameDescription gameDescriptions[] = { { // multilanguage PSX demo { "dw", - "CD demo", + "CD Demo", { {"french.txt", 0, "e7020d35f58d0d187052ac406d86cc87", 273914}, {"german.txt", 0, "52f0a01e0ff0d340b02a36fd5109d705", 263942}, -- cgit v1.2.3 From 76dfbbede41dd43dad3fa114f409654807c239a3 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 3 May 2012 12:18:10 -0400 Subject: TINSEL: Add basic PSX SEQ playback support Instrument bank support is not implemented yet --- engines/tinsel/music.cpp | 94 +++++++++++++++++++++++++++++++++++++++++------ engines/tinsel/music.h | 6 ++- engines/tinsel/tinlib.cpp | 2 +- 3 files changed, 89 insertions(+), 13 deletions(-) diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp index 781a378f13..fa5334a033 100644 --- a/engines/tinsel/music.cpp +++ b/engines/tinsel/music.cpp @@ -131,11 +131,6 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) { g_currentMidi = dwFileOffset; g_currentLoop = bLoop; - // Tinsel V1 PSX uses a different music format, so i - // disable it here. - // TODO: Maybe this should be moved to a better place... - if (TinselV1PSX) return false; - if (_vm->_config->_musicVolume != 0) { bool mute = false; if (ConfMan.hasKey("mute")) @@ -231,14 +226,14 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) { _vm->_midiMusic->send(0x7F07B0 | 13); } - _vm->_midiMusic->playXMIDI(g_midiBuffer.pDat, dwSeqLen, bLoop); + _vm->_midiMusic->playMIDI(dwSeqLen, bLoop); // Store the length //dwLastSeqLen = dwSeqLen; } else { // dwFileOffset == dwLastMidiIndex _vm->_midiMusic->stop(); - _vm->_midiMusic->playXMIDI(g_midiBuffer.pDat, dwSeqLen, bLoop); + _vm->_midiMusic->playMIDI(dwSeqLen, bLoop); } return true; @@ -314,8 +309,7 @@ void OpenMidiFiles() { Common::File midiStream; // Demo version has no midi file - // Also, Discworld PSX uses still unsupported psx SEQ format for music... - if ((_vm->getFeatures() & GF_DEMO) || (TinselVersion == TINSEL_V2) || TinselV1PSX) + if ((_vm->getFeatures() & GF_DEMO) || (TinselVersion == TINSEL_V2)) return; if (g_midiBuffer.pDat) @@ -412,7 +406,7 @@ void MidiMusicPlayer::send(uint32 b) { } } -void MidiMusicPlayer::playXMIDI(byte *midiData, uint32 size, bool loop) { +void MidiMusicPlayer::playMIDI(uint32 size, bool loop) { Common::StackLock lock(_mutex); if (_isPlaying) @@ -420,6 +414,13 @@ void MidiMusicPlayer::playXMIDI(byte *midiData, uint32 size, bool loop) { stop(); + if (TinselV1PSX) + playSEQ(size, loop); + else + playXMIDI(size, loop); +} + +void MidiMusicPlayer::playXMIDI(uint32 size, bool loop) { // It seems like not all music (the main menu music, for instance) set // all the instruments explicitly. That means the music will sound // different, depending on which music played before it. This appears @@ -433,7 +434,78 @@ void MidiMusicPlayer::playXMIDI(byte *midiData, uint32 size, bool loop) { // Load XMID resource data MidiParser *parser = MidiParser::createParser_XMIDI(); - if (parser->loadMusic(midiData, size)) { + if (parser->loadMusic(g_midiBuffer.pDat, size)) { + parser->setTrack(0); + parser->setMidiDriver(this); + parser->setTimerRate(getBaseTempo()); + parser->property(MidiParser::mpCenterPitchWheelOnUnload, 1); + parser->property(MidiParser::mpSendSustainOffOnNotesOff, 1); + + _parser = parser; + + _isLooping = loop; + _isPlaying = true; + } else { + delete parser; + } +} + +void MidiMusicPlayer::playSEQ(uint32 size, bool loop) { + // MIDI.DAT holds the file names in DW1 PSX + Common::String baseName((char *)g_midiBuffer.pDat, size); + Common::String seqName = baseName + ".SEQ"; + + // TODO: Load the instrument bank (.VB and .VH) + + Common::File seqFile; + if (!seqFile.open(seqName)) + error("Failed to open SEQ file '%s'", seqName.c_str()); + + if (seqFile.readUint32LE() != MKTAG('S', 'E', 'Q', 'p')) + error("Failed to find SEQp tag"); + + // Make sure we don't have a SEP file (with multiple SEQ's inside) + if (seqFile.readUint32BE() != 1) + error("Can only play SEQ files, not SEP"); + + uint16 ppqn = seqFile.readUint16BE(); + uint32 tempo = seqFile.readUint16BE() << 8; + tempo |= seqFile.readByte(); + /* uint16 beat = */ seqFile.readUint16BE(); + + // SEQ is directly based on SMF and we'll use that to our advantage here + // and convert to SMF and then use the SMF MidiParser. + + // Calculate the SMF size we'll need + uint32 dataSize = seqFile.size() - 15; + uint32 actualSize = dataSize + 7 + 22; + + // Resize the buffer if necessary + if (g_midiBuffer.size < actualSize) { + g_midiBuffer.pDat = (byte *)realloc(g_midiBuffer.pDat, actualSize); + assert(g_midiBuffer.pDat); + } + + // Now construct the header + WRITE_BE_UINT32(g_midiBuffer.pDat, MKTAG('M', 'T', 'h', 'd')); + WRITE_BE_UINT32(g_midiBuffer.pDat + 4, 6); // header size + WRITE_BE_UINT16(g_midiBuffer.pDat + 8, 0); // type 0 + WRITE_BE_UINT16(g_midiBuffer.pDat + 10, 1); // one track + WRITE_BE_UINT16(g_midiBuffer.pDat + 12, ppqn); + WRITE_BE_UINT32(g_midiBuffer.pDat + 14, MKTAG('M', 'T', 'r', 'k')); + WRITE_BE_UINT32(g_midiBuffer.pDat + 18, dataSize + 7); // SEQ data size + tempo change event size + + // Add in a fake tempo change event + WRITE_BE_UINT32(g_midiBuffer.pDat + 22, 0x00FF5103); // no delta, meta event, tempo change, param size = 3 + WRITE_BE_UINT16(g_midiBuffer.pDat + 26, tempo >> 8); + g_midiBuffer.pDat[28] = tempo & 0xFF; + + // Now copy in the rest of the events + seqFile.read(g_midiBuffer.pDat + 29, dataSize); + seqFile.close(); + + MidiParser *parser = MidiParser::createParser_SMF(); + if (parser->loadMusic(g_midiBuffer.pDat, actualSize)) { parser->setTrack(0); parser->setMidiDriver(this); parser->setTimerRate(getBaseTempo()); diff --git a/engines/tinsel/music.h b/engines/tinsel/music.h index d43fed268d..121bf3d79b 100644 --- a/engines/tinsel/music.h +++ b/engines/tinsel/music.h @@ -64,7 +64,7 @@ public: virtual void setVolume(int volume); - void playXMIDI(byte *midiData, uint32 size, bool loop); + void playMIDI(uint32 size, bool loop); // void stop(); void pause(); @@ -76,6 +76,10 @@ public: // The original sets the "sequence timing" to 109 Hz, whatever that // means. The default is 120. uint32 getBaseTempo() { return _driver ? (109 * _driver->getBaseTempo()) / 120 : 0; } + +private: + void playXMIDI(uint32 size, bool loop); + void playSEQ(uint32 size, bool loop); }; class PCMMusicPlayer : public Audio::AudioStream { diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp index c652abca25..cd65a4ec32 100644 --- a/engines/tinsel/tinlib.cpp +++ b/engines/tinsel/tinlib.cpp @@ -1626,7 +1626,7 @@ static void Play(CORO_PARAM, SCNHANDLE hFilm, int x, int y, bool bComplete, int */ static void PlayMidi(CORO_PARAM, SCNHANDLE hMidi, int loop, bool complete) { // FIXME: This is a workaround for the FIXME below - if (GetMidiVolume() == 0 || TinselV1PSX) + if (GetMidiVolume() == 0) return; CORO_BEGIN_CONTEXT; -- cgit v1.2.3 From 5a1f458bd08313e3ae278a9933ef9391ec5f122c Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 4 May 2012 23:33:44 +0200 Subject: DREAMWEB: Add character map for the Italian version. It is the same as the French version. This fixes bug #3523338. --- engines/dreamweb/dreamweb.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index 0a35bcdecc..299dd74b53 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -522,6 +522,7 @@ uint8 DreamWebEngine::modifyChar(uint8 c) const { return c; } case Common::FR_FRA: + case Common::IT_ITA: switch(c) { case 133: return 'Z' + 1; -- cgit v1.2.3 From e5808c740a62cb87a1ceeef7873af3b21e912c73 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 4 May 2012 23:18:28 -0400 Subject: GRAPHICS: Fix 32-bit DirectBits images --- graphics/decoders/pict.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/graphics/decoders/pict.cpp b/graphics/decoders/pict.cpp index 9963873b54..bdb733a87d 100644 --- a/graphics/decoders/pict.cpp +++ b/graphics/decoders/pict.cpp @@ -361,14 +361,14 @@ void PICTDecoder::unpackBitsRect(Common::SeekableReadStream &stream, bool hasPal memcpy(_outputSurface->pixels, buffer, _outputSurface->w * _outputSurface->h); break; case 2: - // Convert from 16-bit to whatever surface we need + // We have a 16-bit surface _outputSurface->create(width, height, PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0)); for (uint16 y = 0; y < _outputSurface->h; y++) for (uint16 x = 0; x < _outputSurface->w; x++) WRITE_UINT16(_outputSurface->getBasePtr(x, y), READ_UINT16(buffer + (y * _outputSurface->w + x) * 2)); break; case 3: - // Convert from 24-bit (planar!) to whatever surface we need + // We have a planar 24-bit surface _outputSurface->create(width, height, Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0)); for (uint16 y = 0; y < _outputSurface->h; y++) { for (uint16 x = 0; x < _outputSurface->w; x++) { @@ -380,15 +380,18 @@ void PICTDecoder::unpackBitsRect(Common::SeekableReadStream &stream, bool hasPal } break; case 4: - // Convert from 32-bit (planar!) to whatever surface we need + // We have a planar 32-bit surface + // Note that we ignore the alpha channel since it seems to not be correct + // Mac OS X does not ignore it, but then displays it incorrectly. Photoshop + // does ignore it and displays it correctly. _outputSurface->create(width, height, Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0)); for (uint16 y = 0; y < _outputSurface->h; y++) { for (uint16 x = 0; x < _outputSurface->w; x++) { - byte r = *(buffer + y * _outputSurface->w * 4 + x); - byte g = *(buffer + y * _outputSurface->w * 4 + _outputSurface->w + x); - byte b = *(buffer + y * _outputSurface->w * 4 + _outputSurface->w * 2 + x); - byte a = *(buffer + y * _outputSurface->w * 4 + _outputSurface->w * 3 + x); - *((uint32 *)_outputSurface->getBasePtr(x, y)) = _outputSurface->format.ARGBToColor(r, g, b, a); + byte a = 0xFF; + byte r = *(buffer + y * _outputSurface->w * 4 + _outputSurface->w + x); + byte g = *(buffer + y * _outputSurface->w * 4 + _outputSurface->w * 2 + x); + byte b = *(buffer + y * _outputSurface->w * 4 + _outputSurface->w * 3 + x); + *((uint32 *)_outputSurface->getBasePtr(x, y)) = _outputSurface->format.ARGBToColor(a, r, g, b); } } break; -- cgit v1.2.3 From 44a076caf829b979fdc4799f958760fa93d9bcf0 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 6 May 2012 09:19:51 +0200 Subject: TSAGE: Remove extra semicolons. --- engines/tsage/ringworld2/ringworld2_scenes1.cpp | 4 ++-- engines/tsage/ringworld2/ringworld2_scenes3.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index 304d3a4298..216444e722 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -5571,7 +5571,7 @@ void Scene1337::subCF979() { tmpVal = subC26CB(0, i); if (tmpVal != -1) { - bool flag = false;; + bool flag = false; for (int j = 0; j <= 7; j++) { if (_arrunkObj1337[0]._arr2[j]._field34 == _arrunkObj1337[0]._arr1[tmpVal]._field34) { flag = true; @@ -11068,7 +11068,7 @@ bool Scene1850::Actor5::startAction(CursorType action, Event &event) { case R2_REBREATHER_TANK: if (R2_INVENTORY.getObjectScene(R2_AIRBAG) == 1850) { if (R2_GLOBALS.getFlag(30)) - return SceneActor::startAction(action, event);; + return SceneActor::startAction(action, event); R2_GLOBALS._player.disableControl(); scene->_sceneMode = 1878; diff --git a/engines/tsage/ringworld2/ringworld2_scenes3.cpp b/engines/tsage/ringworld2/ringworld2_scenes3.cpp index 3dd566c900..61711d0a4f 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes3.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes3.cpp @@ -3294,7 +3294,7 @@ void Scene3500::Action1::signal() { NpcMover *mover = new NpcMover(); scene->_actor8.addMover(mover, &pt, this); - scene->_actor9.setPosition(Common::Point(160 + ((_field1E * 2) * 160), 73));; + scene->_actor9.setPosition(Common::Point(160 + ((_field1E * 2) * 160), 73)); scene->_actor9._moveDiff.x = 160 - scene->_field126E; scene->_fieldB9E = 160; Common::Point pt2(scene->_fieldB9E, 73); -- cgit v1.2.3 From 89ea3e016f8fa35dc220535f5ba5c62b74f11ff6 Mon Sep 17 00:00:00 2001 From: athrxx Date: Sat, 28 Apr 2012 22:43:07 +0200 Subject: KYRA: fix bug No. IX. from http://forums.scummvm.org/viewtopic.php?t=11487 (experience points awarded after Knowles/Xeobs quest missing 1 point) --- engines/kyra/lol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index 38e9d33259..d7ec965312 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -1436,7 +1436,7 @@ void LoLEngine::increaseExperience(int charNum, int skill, uint32 points) { bool loop = true; while (loop) { - if (_characters[charNum].experiencePts[skill] <= _expRequirements[_characters[charNum].skillLevels[skill]]) + if (_characters[charNum].experiencePts[skill] < _expRequirements[_characters[charNum].skillLevels[skill]]) break; _characters[charNum].skillLevels[skill]++; -- cgit v1.2.3 From e7ba09be63a556236bd19c5e89faa524289aced9 Mon Sep 17 00:00:00 2001 From: athrxx Date: Sat, 28 Apr 2012 23:48:31 +0200 Subject: KYRA: fix bug No. VI. from http://forums.scummvm.org/viewtopic.php?t=11487 (Vaelan's Cube should be able to remove illusionary walls) --- engines/kyra/lol.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index d7ec965312..d3028c5e2d 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -2894,11 +2894,11 @@ int LoLEngine::processMagicVaelansCube() { uint8 s = _levelBlockProperties[bl].walls[_currentDirection ^ 2]; uint8 flg = _wllWallFlags[s]; - int v = (s == 47 && (_currentLevel == 17 || _currentLevel == 24)) ? 1 : 0; - if ((_wllVmpMap[s] == 1 || _wllVmpMap[s] == 2) && (flg & 1) && (_currentLevel == 22)) { + int res = (s == 47 && (_currentLevel == 17 || _currentLevel == 24)) ? 1 : 0; + if ((_wllVmpMap[s] == 1 || _wllVmpMap[s] == 2) && (!(flg & 1)) && (_currentLevel != 22)) { memset(_levelBlockProperties[bl].walls, 0, 4); gui_drawScene(0); - v = 1; + res = 1; } uint16 o = _levelBlockProperties[bl].assignedObjects; @@ -2906,7 +2906,7 @@ int LoLEngine::processMagicVaelansCube() { LoLMonster *m = &_monsters[o & 0x7fff]; if (m->properties->flags & 0x1000) { inflictDamage(o, 100, 0xffff, 0, 0x80); - v = 1; + res = 1; } o = m->nextAssignedObject; } @@ -2922,7 +2922,7 @@ int LoLEngine::processMagicVaelansCube() { delete[] tmpPal1; delete[] tmpPal2; - return v; + return res; } int LoLEngine::processMagicGuardian(int charNum) { -- cgit v1.2.3 From 13876931683778587746c50592656f2b3c2af732 Mon Sep 17 00:00:00 2001 From: athrxx Date: Sun, 6 May 2012 01:03:33 +0200 Subject: KYRA: fix bug No. X. from http://forums.scummvm.org/viewtopic.php?t=11487 (monsters not getting hit by fireball trap) --- engines/kyra/items_lol.cpp | 53 +++++++++++++++------------------ engines/kyra/lol.h | 10 +++---- engines/kyra/script_lol.cpp | 5 ++-- engines/kyra/sprites_lol.cpp | 70 +++++++++++++++++++++++--------------------- 4 files changed, 68 insertions(+), 70 deletions(-) diff --git a/engines/kyra/items_lol.cpp b/engines/kyra/items_lol.cpp index ea2acaf64d..409b53f6f0 100644 --- a/engines/kyra/items_lol.cpp +++ b/engines/kyra/items_lol.cpp @@ -441,20 +441,20 @@ bool LoLEngine::launchObject(int objectType, Item item, int startX, int startY, return true; } -void LoLEngine::endObjectFlight(FlyingObject *t, int x, int y, int collisionObject) { +void LoLEngine::endObjectFlight(FlyingObject *t, int x, int y, int collisionType) { int cx = x; int cy = y; uint16 block = calcBlockIndex(t->x, t->y); removeAssignedObjectFromBlock(&_levelBlockProperties[block], t->item); removeDrawObjectFromBlock(&_levelBlockProperties[block], t->item); - if (collisionObject == 1) { + if (collisionType == 1) { cx = t->x; cy = t->y; } if (t->objectType == 0 || t->objectType == 1) { - objectFlightProcessHits(t, cx, cy, collisionObject); + objectFlightProcessHits(t, cx, cy, collisionType); t->x = (cx & 0xffc0) | 0x40; t->y = (cy & 0xffc0) | 0x40; t->flyingHeight = 0; @@ -488,27 +488,23 @@ void LoLEngine::updateObjectFlightPosition(FlyingObject *t) { } } -void LoLEngine::objectFlightProcessHits(FlyingObject *t, int x, int y, int objectOnNextBlock) { - uint16 r = 0; - - if (objectOnNextBlock == 1) { +void LoLEngine::objectFlightProcessHits(FlyingObject *t, int x, int y, int collisionType) { + if (collisionType == 1) { runLevelScriptCustom(calcNewBlockPosition(_itemsInPlay[t->item].block, t->direction >> 1), 0x8000, -1, t->item, 0, 0); - } else if (objectOnNextBlock == 2) { + } else if (collisionType == 2) { if (_itemProperties[_itemsInPlay[t->item].itemPropertyIndex].flags & 0x4000) { - int o = _levelBlockProperties[_itemsInPlay[t->item].block].assignedObjects; - while (o & 0x8000) { - LoLObject *i = findObject(o); - o = i->nextAssignedObject; - runItemScript(t->attackerId, t->item, 0x8000, o, 0); + uint16 obj = _levelBlockProperties[_itemsInPlay[t->item].block].assignedObjects; + while (obj & 0x8000) { + runItemScript(t->attackerId, t->item, 0x8000, obj, 0); + obj = findObject(obj)->nextAssignedObject; } } else { - r = getNearestMonsterFromPos(x, y); - runItemScript(t->attackerId, t->item, 0x8000, r, 0); + runItemScript(t->attackerId, t->item, 0x8000, getNearestMonsterFromPos(x, y), 0); } - } else if (objectOnNextBlock == 4) { + } else if (collisionType == 4) { _partyAwake = true; if (_itemProperties[_itemsInPlay[t->item].itemPropertyIndex].flags & 0x4000) { for (int i = 0; i < 4; i++) { @@ -516,8 +512,7 @@ void LoLEngine::objectFlightProcessHits(FlyingObject *t, int x, int y, int objec runItemScript(t->attackerId, t->item, 0x8000, i, 0); } } else { - r = getNearestPartyMemberFromPos(x, y); - runItemScript(t->attackerId, t->item, 0x8000, r, 0); + runItemScript(t->attackerId, t->item, 0x8000, getNearestPartyMemberFromPos(x, y), 0); } } } @@ -543,9 +538,9 @@ void LoLEngine::updateFlyingObject(FlyingObject *t) { middle of a block (or making the monsters align to the middle before casting them) wouldn't help here (and wouldn't be faithful to the original either). */ - int objectOnNextBlock = checkBlockBeforeObjectPlacement(x, y, /*_itemProperties[_itemsInPlay[t->item].itemPropertyIndex].flags & 0x4000 ? 256 :*/ 63, t->flags, t->wallFlags); - if (objectOnNextBlock) { - endObjectFlight(t, x, y, objectOnNextBlock); + int collisionType = checkBlockBeforeObjectPlacement(x, y, /*_itemProperties[_itemsInPlay[t->item].itemPropertyIndex].flags & 0x4000 ? 256 :*/ 63, t->flags, t->wallFlags); + if (collisionType) { + endObjectFlight(t, x, y, collisionType); } else { if (--t->distance) { processObjectFlight(t, x, y); @@ -567,16 +562,16 @@ void LoLEngine::assignItemToBlock(uint16 *assignedBlockObjects, int id) { *assignedBlockObjects = id; } -int LoLEngine::checkDrawObjectSpace(int itemX, int itemY, int partyX, int partyY) { - int a = itemX - partyX; - if (a < 0) - a = -a; +int LoLEngine::checkDrawObjectSpace(int x1, int y1, int x2, int y2) { + int dx = x1 - x2; + if (dx < 0) + dx = -dx; - int b = itemY - partyY; - if (b < 0) - b = -b; + int dy = y1 - y2; + if (dy < 0) + dy = -dy; - return a + b; + return dx + dy; } int LoLEngine::checkSceneForItems(uint16 *blockDrawObjects, int color) { diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index dbd461267f..dcd13804b3 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -1047,14 +1047,14 @@ private: void setItemPosition(Item item, uint16 x, uint16 y, int flyingHeight, int moveable); void removeLevelItem(Item item, int block); bool launchObject(int objectType, Item item, int startX, int startY, int flyingHeight, int direction, int, int attackerId, int c); - void endObjectFlight(FlyingObject *t, int x, int y, int collisionObject); + void endObjectFlight(FlyingObject *t, int x, int y, int collisionType); void processObjectFlight(FlyingObject *t, int x, int y); void updateObjectFlightPosition(FlyingObject *t); - void objectFlightProcessHits(FlyingObject *t, int x, int y, int objectOnNextBlock); + void objectFlightProcessHits(FlyingObject *t, int x, int y, int collisionType); void updateFlyingObject(FlyingObject *t); void assignItemToBlock(uint16 *assignedBlockObjects, int id); - int checkDrawObjectSpace(int itemX, int itemY, int partyX, int partyY); + int checkDrawObjectSpace(int x1, int y1, int x2, int y2); int checkSceneForItems(uint16 *blockDrawObjects, int color); uint8 _moneyColumnHeight[5]; @@ -1095,7 +1095,7 @@ private: void monsterDropItems(LoLMonster *monster); void giveItemToMonster(LoLMonster *monster, Item item); int checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 objectWidth, uint16 testFlag, uint16 wallFlag); - int checkBlockForWallsAndSufficientSpace(int block, int x, int y, int objectWidth, int testFlag, int wallFlag); + int testBlockPassability(int block, int x, int y, int objectWidth, int testFlag, int wallFlag); int calcMonsterSkillLevel(int id, int a); int checkBlockOccupiedByParty(int x, int y, int testFlag); const uint16 *getCharacterOrMonsterStats(int id); @@ -1122,7 +1122,7 @@ private: int checkForPossibleDistanceAttack(uint16 monsterBlock, int direction, int distance, uint16 curBlock); int walkMonsterCheckDest(int x, int y, LoLMonster *monster, int unk); void getNextStepCoords(int16 monsterX, int16 monsterY, int &newX, int &newY, uint16 direction); - void rearrangeAttackingMonster(LoLMonster *monster); + void alignMonsterToParty(LoLMonster *monster); void moveStrayingMonster(LoLMonster *monster); void killMonster(LoLMonster *monster); diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp index c5d1d49030..9c0fe21ad4 100644 --- a/engines/kyra/script_lol.cpp +++ b/engines/kyra/script_lol.cpp @@ -958,10 +958,9 @@ int LoLEngine::olol_loadMonsterProperties(EMCState *script) { l->hitPoints = stackPos(26); l->speedTotalWaitTicks = 1; l->flags = stackPos(27); - l->unk5 = stackPos(28); - // FIXME??? + // This is what the original does here (setting the value first to stackPos(28) and then to stackPos(29): + //l->unk5 = stackPos(28); l->unk5 = stackPos(29); - // l->numDistAttacks = stackPos(30); l->numDistWeapons = stackPos(31); diff --git a/engines/kyra/sprites_lol.cpp b/engines/kyra/sprites_lol.cpp index a07abd4580..f4bae113c5 100644 --- a/engines/kyra/sprites_lol.cpp +++ b/engines/kyra/sprites_lol.cpp @@ -355,7 +355,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object int yOffs = 0; int flag = 0; - int r = checkBlockForWallsAndSufficientSpace(calcBlockIndex(x, y), x, y, objectWidth, testFlag, wallFlag); + int r = testBlockPassability(calcBlockIndex(x, y), x, y, objectWidth, testFlag, wallFlag); if (r) return r; @@ -369,7 +369,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object _objectLastDirection = 2; x2 = x + objectWidth; - r = checkBlockForWallsAndSufficientSpace(calcBlockIndex(x2, y), x, y, objectWidth, testFlag, wallFlag); + r = testBlockPassability(calcBlockIndex(x2, y), x, y, objectWidth, testFlag, wallFlag); if (r) return r; @@ -385,7 +385,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object _objectLastDirection = 6; x2 = x - objectWidth; - r = checkBlockForWallsAndSufficientSpace(calcBlockIndex(x2, y), x, y, objectWidth, testFlag, wallFlag); + r = testBlockPassability(calcBlockIndex(x2, y), x, y, objectWidth, testFlag, wallFlag); if (r) return r; @@ -403,7 +403,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object _objectLastDirection = 4; y2 = y + objectWidth; - r = checkBlockForWallsAndSufficientSpace(calcBlockIndex(x, y2), x, y, objectWidth, testFlag, wallFlag); + r = testBlockPassability(calcBlockIndex(x, y2), x, y, objectWidth, testFlag, wallFlag); if (r) return r; @@ -420,7 +420,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object _objectLastDirection = 0; y2 = y - objectWidth; - r = checkBlockForWallsAndSufficientSpace(calcBlockIndex(x, y2), x, y, objectWidth, testFlag, wallFlag); + r = testBlockPassability(calcBlockIndex(x, y2), x, y, objectWidth, testFlag, wallFlag); if (r) return r; @@ -436,7 +436,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object if (!flag) return 0; - r = checkBlockForWallsAndSufficientSpace(calcBlockIndex(x2, y2), x, y, objectWidth, testFlag, wallFlag); + r = testBlockPassability(calcBlockIndex(x2, y2), x, y, objectWidth, testFlag, wallFlag); if (r) return r; @@ -447,7 +447,7 @@ int LoLEngine::checkBlockBeforeObjectPlacement(uint16 x, uint16 y, uint16 object return 0; } -int LoLEngine::checkBlockForWallsAndSufficientSpace(int block, int x, int y, int objectWidth, int testFlag, int wallFlag) { +int LoLEngine::testBlockPassability(int block, int x, int y, int objectWidth, int testFlag, int wallFlag) { if (block == _currentBlock) testFlag &= 0xfffe; @@ -461,9 +461,9 @@ int LoLEngine::checkBlockForWallsAndSufficientSpace(int block, int x, int y, int if (!(testFlag & 2)) return 0; - uint16 b = _levelBlockProperties[block].assignedObjects; - while (b & 0x8000) { - LoLMonster *monster = &_monsters[b & 0x7fff]; + uint16 obj = _levelBlockProperties[block].assignedObjects; + while (obj & 0x8000) { + LoLMonster *monster = &_monsters[obj & 0x7fff]; if (monster->mode < 13) { int r = checkDrawObjectSpace(x, y, monster->x, monster->y); @@ -471,7 +471,7 @@ int LoLEngine::checkBlockForWallsAndSufficientSpace(int block, int x, int y, int return 2; } - b = findObject(b)->nextAssignedObject; + obj = findObject(obj)->nextAssignedObject; } return 0; @@ -1105,7 +1105,7 @@ void LoLEngine::updateMonster(LoLMonster *monster) { if ((monster->fightCurTick <= 0) || (checkDrawObjectSpace(_partyPosX, _partyPosY, monster->x, monster->y) > 256) || (monster->flags & 8)) setMonsterMode(monster, 7); else - rearrangeAttackingMonster(monster); + alignMonsterToParty(monster); break; case 6: @@ -1428,26 +1428,26 @@ int LoLEngine::walkMonsterCheckDest(int x, int y, LoLMonster *monster, int unk) uint8 m = monster->mode; monster->mode = 15; - int res = checkBlockBeforeObjectPlacement(x, y, monster->properties->maxWidth, 7, monster->properties->flags & 0x1000 ? 32 : unk); + int objType = checkBlockBeforeObjectPlacement(x, y, monster->properties->maxWidth, 7, monster->properties->flags & 0x1000 ? 32 : unk); monster->mode = m; - return res; + return objType; } void LoLEngine::getNextStepCoords(int16 srcX, int16 srcY, int &newX, int &newY, uint16 direction) { - static const int8 shiftTableX[] = { 0, 32, 32, 32, 0, -32, -32, -32 }; - static const int8 shiftTableY[] = { -32, -32, 0, 32, 32, 32, 0, -32 }; + static const int8 stepAdjustX[] = { 0, 32, 32, 32, 0, -32, -32, -32 }; + static const int8 stepAdjustY[] = { -32, -32, 0, 32, 32, 32, 0, -32 }; - newX = (srcX + shiftTableX[direction]) & 0x1fff; - newY = (srcY + shiftTableY[direction]) & 0x1fff; + newX = (srcX + stepAdjustX[direction]) & 0x1fff; + newY = (srcY + stepAdjustY[direction]) & 0x1fff; } -void LoLEngine::rearrangeAttackingMonster(LoLMonster *monster) { - int t = (monster->direction >> 1); +void LoLEngine::alignMonsterToParty(LoLMonster *monster) { + uint8 mdir = monster->direction >> 1; uint16 mx = monster->x; uint16 my = monster->y; - uint16 *c = (t & 1) ? &my : &mx; - bool centered = (*c & 0x7f) == 0; + uint16 *pos = (mdir & 1) ? &my : &mx; + bool centered = (*pos & 0x7f) == 0; bool posFlag = true; if (monster->properties->maxWidth <= 63) { @@ -1464,11 +1464,13 @@ void LoLEngine::rearrangeAttackingMonster(LoLMonster *monster) { r = true; } else { for (int i = 0; i < 3; i++) { - t = (t + 1) & 3; - id = _levelBlockProperties[calcNewBlockPosition(monster->block, t)].assignedObjects; + mdir = (mdir + 1) & 3; + id = _levelBlockProperties[calcNewBlockPosition(monster->block, mdir)].assignedObjects; id = (id & 0x8000) ? (id & 0x7fff) : 0xffff; - if (id != 0xffff) + if (id != 0xffff) { r = true; + break; + } } } } @@ -1484,15 +1486,15 @@ void LoLEngine::rearrangeAttackingMonster(LoLMonster *monster) { return; if (posFlag) { - if (*c & 0x80) - *c -= 32; + if (*pos & 0x80) + *pos -= 32; else - *c += 32; + *pos += 32; } else { - if (*c & 0x80) - *c += 32; + if (*pos & 0x80) + *pos += 32; else - *c -= 32; + *pos -= 32; } if (walkMonsterCheckDest(mx, my, monster, 4)) @@ -1502,8 +1504,10 @@ void LoLEngine::rearrangeAttackingMonster(LoLMonster *monster) { int fy = _partyPosY; calcSpriteRelPosition(mx, my, fx, fy, monster->direction >> 1); - t = (fx < 0) ? -fx : fx; - if (fy > 160 || t > 80) + if (fx < 0) + fx = -fx; + + if (fy > 160 || fx > 80) return; placeMonster(monster, mx, my); -- cgit v1.2.3 From 97065c95e654f36070b8f12f20b3bff1752b5e0c Mon Sep 17 00:00:00 2001 From: Oleksiy Kurochko Date: Mon, 7 May 2012 09:54:32 +0300 Subject: GUI: Fix bug with button pressed state --- gui/widget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/widget.cpp b/gui/widget.cpp index 6ae4e5cee5..fc6510b976 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -281,7 +281,7 @@ ButtonWidget::ButtonWidget(GuiObject *boss, int x, int y, int w, int h, const Co if (hotkey == 0) _hotkey = parseHotkey(label); - setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG | WIDGET_WANT_TICKLE); + setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG); _type = kButtonWidget; } @@ -290,7 +290,7 @@ ButtonWidget::ButtonWidget(GuiObject *boss, const Common::String &name, const Co _cmd(cmd), _lastTime(0) { if (hotkey == 0) _hotkey = parseHotkey(label); - setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG | WIDGET_WANT_TICKLE); + setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG); _type = kButtonWidget; } -- cgit v1.2.3 From 4161d83cba5ab549b46fe993bda84464d1dbfe5a Mon Sep 17 00:00:00 2001 From: D G Turner Date: Mon, 7 May 2012 23:21:20 +0100 Subject: DREAMWEB: Add detection entry for another French/Spanish CD variant. The MD5sums are taken from bug #3524362 "DREAMWEB: Problem with Spanish/French version". --- engines/dreamweb/detection_tables.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/engines/dreamweb/detection_tables.h b/engines/dreamweb/detection_tables.h index d54b2402c8..f7dc556a8c 100644 --- a/engines/dreamweb/detection_tables.h +++ b/engines/dreamweb/detection_tables.h @@ -101,6 +101,24 @@ static const DreamWebGameDescription gameDescriptions[] = { }, }, + // French CD release + // From bug #3524362 + { + { + "dreamweb", + "CD", + { + {"dreamwfr.r00", 0, "e354582a8564faf5c515df92f207e8d1", 154657}, + {"dreamwfr.r02", 0, "cb99f08d5aefd04184eac76927eced80", 200575}, + AD_LISTEND + }, + Common::FR_FRA, + Common::kPlatformPC, + ADGF_CD | ADGF_TESTING, + GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) + }, + }, + // German floppy release { { @@ -169,6 +187,24 @@ static const DreamWebGameDescription gameDescriptions[] = { }, }, + // Spanish CD release + // From bug #3524362 + { + { + "dreamweb", + "CD", + { + {"dreamwsp.r00", 0, "2df07174321de39c4f17c9ff654b268a", 153608}, + {"dreamwsp.r02", 0, "f97d435ad5da08fb1bcf6ea3dd6e0b9e", 199499}, + AD_LISTEND + }, + Common::ES_ESP, + Common::kPlatformPC, + ADGF_CD | ADGF_TESTING, + GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) + }, + }, + // Italian floppy release { { -- cgit v1.2.3 From 0cff5c547c4051f920fde17f772bad4634895be9 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 8 May 2012 16:48:01 +0100 Subject: DREAMWEB: Add _speechDirName to remove duplication of Directory name. --- engines/dreamweb/dreamweb.cpp | 3 ++- engines/dreamweb/dreamweb.h | 1 + engines/dreamweb/sound.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index 299dd74b53..cdc1789e3e 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -63,6 +63,7 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam _channel1 = 0; _datafilePrefix = "DREAMWEB."; + _speechDirName = "SPEECH"; // ES and FR CD release use a different data file prefix if (isCD()) { switch(getLanguage()) { @@ -381,7 +382,7 @@ Common::Error DreamWebEngine::run() { ConfMan.registerDefault("originalsaveload", "false"); ConfMan.registerDefault("bright_palette", true); - _hasSpeech = Common::File::exists("speech/r01c0000.raw") && !ConfMan.getBool("speech_mute"); + _hasSpeech = Common::File::exists(_speechDirName + "/r01c0000.raw") && !ConfMan.getBool("speech_mute"); _brightPalette = ConfMan.getBool("bright_palette"); _timer->installTimerProc(vSyncInterrupt, 1000000 / 70, this, "dreamwebVSync"); diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index 4065e5a860..6744b53ebc 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -164,6 +164,7 @@ private: const DreamWebGameDescription *_gameDescription; Common::RandomSource _rnd; Common::String _datafilePrefix; + Common::String _speechDirName; uint _speed; bool _turbo; diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index b51527a8cd..800936e8e8 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -177,7 +177,7 @@ bool DreamWebEngine::loadSpeech(const Common::String &filename) { return false; Common::File file; - if (!file.open("speech/" + filename)) + if (!file.open(_speechDirName + "/" + filename)) return false; debug(1, "loadSpeech(%s)", filename.c_str()); -- cgit v1.2.3 From 29a866217f2e8ae5928b53c200b5dba059471894 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 8 May 2012 16:58:43 +0100 Subject: DREAMWEB: Fix Speech Directory Name for SP/FR CD Variant. This should fix the remaining issues on bug #3524362 "DREAMWEB: Problem with Spanish/French version". --- engines/dreamweb/dreamweb.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index cdc1789e3e..11e8e3f8cc 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -65,13 +65,16 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam _datafilePrefix = "DREAMWEB."; _speechDirName = "SPEECH"; // ES and FR CD release use a different data file prefix + // and speech directory naming. if (isCD()) { switch(getLanguage()) { case Common::ES_ESP: _datafilePrefix = "DREAMWSP."; + _speechDirName = "SPANISH"; break; case Common::FR_FRA: _datafilePrefix = "DREAMWFR."; + _speechDirName = "FRENCH"; break; default: // Nothing to do -- cgit v1.2.3 From f6acc5d5bef3c472fc3788407486a242fdd68a65 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 10 May 2012 23:05:29 +0200 Subject: DREAMWEB: Fix crash when entering short console password _inputLine is not a string, so it shouldn't be cast to Common::String. This fixes bug #3525602. --- engines/dreamweb/monitor.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 95aa400c3a..25435ae0e9 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -626,15 +626,12 @@ void DreamWebEngine::signOn() { _monAdX = prevX; _monAdY = prevY; - inputLine = (const char *)_inputLine; - inputLine.toUppercase(); - // The entered line has zeroes in-between each character uint32 len = strlen(monitorKeyEntries[foundIndex].password); bool found = true; for (uint32 i = 0; i < len; i++) { - if (monitorKeyEntries[foundIndex].password[i] != inputLine[i * 2]) { + if (monitorKeyEntries[foundIndex].password[i] != _inputLine[i * 2]) { found = false; break; } -- cgit v1.2.3 From c424c22f19a050b1a2ee421e80172f7dda571dac Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 11 May 2012 12:54:06 +0300 Subject: SCI: Fix bug #3040625 - "SCI: ECOQUEST French/German: Speech balloon graphic glitch" This bug is caused by the fact that the sprites in that scene and the speech bubble share the same priority, so we compensate for that with a workaround --- engines/sci/graphics/view.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp index a77bcccc52..4e5c4da8b2 100644 --- a/engines/sci/graphics/view.cpp +++ b/engines/sci/graphics/view.cpp @@ -720,6 +720,19 @@ void GfxView::draw(const Common::Rect &rect, const Common::Rect &clipRect, const bitmap += (clipRect.top - rect.top) * celWidth + (clipRect.left - rect.left); + // WORKAROUND: EcoQuest French and German draw the fish and anemone sprites + // with priority 15 in scene 440. Afterwards, a dialog is shown on top of + // these sprites with priority 15 as well. This is undefined behavior + // actually, as the sprites and dialog share the same priority, so in our + // implementation the sprites get drawn incorrectly on top of the dialog. + // Perhaps this worked by mistake in SSCI because of subtle differences in + // how sprites are drawn. We compensate for this by resetting the priority + // of all sprites that have a priority of 15 in scene 440 to priority 14, + // so that the speech bubble can be drawn correctly on top of them. Fixes + // bug #3040625. + if (g_sci->getGameId() == GID_ECOQUEST && g_sci->getEngineState()->currentRoomNumber() == 440 && priority == 15) + priority = 14; + if (!_EGAmapping) { for (y = 0; y < height; y++, bitmap += celWidth) { for (x = 0; x < width; x++) { -- cgit v1.2.3 From 0f6059580e9e4eedbc66460da0e8ef4c56c830dc Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 12 May 2012 21:16:03 -0400 Subject: VIDEO: Update seekToTime() comments to require subframe accuracy now --- video/video_decoder.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/video/video_decoder.h b/video/video_decoder.h index 52ced4777c..91c1ae2f11 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -247,11 +247,6 @@ class SeekableVideoDecoder : public virtual RewindableVideoDecoder { public: /** * Seek to the specified time. - * - * This will round to the previous frame showing. If the time would happen to - * land while a frame is showing, this function will seek to the beginning of that - * frame. In other words, there is *no* subframe accuracy. This may change in a - * later revision of the API. */ virtual void seekToTime(Audio::Timestamp time) = 0; -- cgit v1.2.3 From 9e330174c8b8a0d2574746f1bc055423be263311 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 12 May 2012 21:28:13 -0400 Subject: VIDEO: Change getElapsedTime() into getTime() This name change accompanies a slight meaning change; now it means the current time position from the beginning of the video and not from starting the video. --- engines/mohawk/myst_stacks/dni.cpp | 2 +- engines/mohawk/riven.cpp | 2 +- engines/mohawk/riven_external.cpp | 4 ++-- engines/mohawk/video.cpp | 6 +++--- engines/mohawk/video.h | 2 +- engines/sword1/animation.cpp | 4 ++-- engines/sword1/animation.h | 2 +- engines/sword2/animation.cpp | 4 ++-- engines/sword2/animation.h | 2 +- engines/sword25/fmv/movieplayer.cpp | 2 +- engines/sword25/fmv/theora_decoder.cpp | 6 +++--- engines/sword25/fmv/theora_decoder.h | 2 +- video/avi_decoder.cpp | 4 ++-- video/avi_decoder.h | 2 +- video/bink_decoder.cpp | 2 +- video/bink_decoder.h | 2 +- video/psx_decoder.cpp | 6 +++--- video/psx_decoder.h | 2 +- video/qt_decoder.cpp | 6 +++--- video/qt_decoder.h | 2 +- video/smk_decoder.cpp | 4 ++-- video/smk_decoder.h | 2 +- video/video_decoder.cpp | 4 ++-- video/video_decoder.h | 15 ++++++++++----- 24 files changed, 47 insertions(+), 42 deletions(-) diff --git a/engines/mohawk/myst_stacks/dni.cpp b/engines/mohawk/myst_stacks/dni.cpp index 2ced265f02..cae165ccf0 100644 --- a/engines/mohawk/myst_stacks/dni.cpp +++ b/engines/mohawk/myst_stacks/dni.cpp @@ -103,7 +103,7 @@ void Dni::o_handPage(uint16 op, uint16 var, uint16 argc, uint16 *argv) { VideoHandle atrus = _vm->_video->findVideoHandle(_video); // Good ending and Atrus asked to give page - if (_globals.ending == 1 && _vm->_video->getElapsedTime(atrus) > (uint)Audio::Timestamp(0, 6801, 600).msecs()) { + if (_globals.ending == 1 && _vm->_video->getTime(atrus) > (uint)Audio::Timestamp(0, 6801, 600).msecs()) { _globals.ending = 2; _globals.heldPage = 0; _vm->setMainCursor(kDefaultMystCursor); diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp index 95a8313536..07b1b59929 100644 --- a/engines/mohawk/riven.cpp +++ b/engines/mohawk/riven.cpp @@ -979,7 +979,7 @@ void MohawkEngine_Riven::doVideoTimer(VideoHandle handle, bool force) { return; // Run the opcode if we can at this point - if (force || _video->getElapsedTime(handle) >= _scriptMan->getStoredMovieOpcodeTime()) + if (force || _video->getTime(handle) >= _scriptMan->getStoredMovieOpcodeTime()) _scriptMan->runStoredMovieOpcode(); } diff --git a/engines/mohawk/riven_external.cpp b/engines/mohawk/riven_external.cpp index 8dfc74ebf0..337a57e3e1 100644 --- a/engines/mohawk/riven_external.cpp +++ b/engines/mohawk/riven_external.cpp @@ -2059,7 +2059,7 @@ void RivenExternal::xbookclick(uint16 argc, uint16 *argv) { debug(0, "\tHotspot = %d -> %d", argv[3], hotspotMap[argv[3] - 1]); // Just let the video play while we wait until Gehn opens the trap book for us - while (_vm->_video->getElapsedTime(video) < startTime && !_vm->shouldQuit()) { + while (_vm->_video->getTime(video) < startTime && !_vm->shouldQuit()) { if (_vm->_video->updateMovies()) _vm->_system->updateScreen(); @@ -2084,7 +2084,7 @@ void RivenExternal::xbookclick(uint16 argc, uint16 *argv) { // OK, Gehn has opened the trap book and has asked us to go in. Let's watch // and see what the player will do... - while (_vm->_video->getElapsedTime(video) < endTime && !_vm->shouldQuit()) { + while (_vm->_video->getTime(video) < endTime && !_vm->shouldQuit()) { bool updateScreen = _vm->_video->updateMovies(); Common::Event event; diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index 80fa4bf9a0..83fca9ac35 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -49,7 +49,7 @@ void VideoEntry::clear() { } bool VideoEntry::endOfVideo() { - return !video || video->endOfVideo() || video->getElapsedTime() >= (uint)end.msecs(); + return !video || video->endOfVideo() || video->getTime() >= (uint)end.msecs(); } VideoManager::VideoManager(MohawkEngine* vm) : _vm(vm) { @@ -481,9 +481,9 @@ uint32 VideoManager::getFrameCount(VideoHandle handle) { return _videoStreams[handle]->getFrameCount(); } -uint32 VideoManager::getElapsedTime(VideoHandle handle) { +uint32 VideoManager::getTime(VideoHandle handle) { assert(handle != NULL_VID_HANDLE); - return _videoStreams[handle]->getElapsedTime(); + return _videoStreams[handle]->getTime(); } uint32 VideoManager::getDuration(VideoHandle handle) { diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h index 34c287497f..8736782d7a 100644 --- a/engines/mohawk/video.h +++ b/engines/mohawk/video.h @@ -100,7 +100,7 @@ public: VideoHandle findVideoHandle(const Common::String &filename); int32 getCurFrame(VideoHandle handle); uint32 getFrameCount(VideoHandle handle); - uint32 getElapsedTime(VideoHandle handle); + uint32 getTime(VideoHandle handle); uint32 getDuration(VideoHandle videoHandle); bool endOfVideo(VideoHandle handle); void setVideoBounds(VideoHandle handle, Audio::Timestamp start, Audio::Timestamp end); diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index 1e2964054a..a70ca960ba 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -510,11 +510,11 @@ DXADecoderWithSound::DXADecoderWithSound(Audio::Mixer *mixer, Audio::SoundHandle : _mixer(mixer), _bgSoundHandle(bgSoundHandle) { } -uint32 DXADecoderWithSound::getElapsedTime() const { +uint32 DXADecoderWithSound::getTime() const { if (_mixer->isSoundHandleActive(*_bgSoundHandle)) return _mixer->getSoundElapsedTime(*_bgSoundHandle); - return DXADecoder::getElapsedTime(); + return DXADecoder::getTime(); } /////////////////////////////////////////////////////////////////////////////// diff --git a/engines/sword1/animation.h b/engines/sword1/animation.h index f64b03dd1b..c2ed86a1a3 100644 --- a/engines/sword1/animation.h +++ b/engines/sword1/animation.h @@ -60,7 +60,7 @@ public: DXADecoderWithSound(Audio::Mixer *mixer, Audio::SoundHandle *bgSoundHandle); ~DXADecoderWithSound() {} - uint32 getElapsedTime() const; + uint32 getTime() const; private: Audio::Mixer *_mixer; diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index e77ae98163..90ee7375ab 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -410,11 +410,11 @@ DXADecoderWithSound::DXADecoderWithSound(Audio::Mixer *mixer, Audio::SoundHandle : _mixer(mixer), _bgSoundHandle(bgSoundHandle) { } -uint32 DXADecoderWithSound::getElapsedTime() const { +uint32 DXADecoderWithSound::getTime() const { if (_mixer->isSoundHandleActive(*_bgSoundHandle)) return _mixer->getSoundElapsedTime(*_bgSoundHandle); - return DXADecoder::getElapsedTime(); + return DXADecoder::getTime(); } /////////////////////////////////////////////////////////////////////////////// diff --git a/engines/sword2/animation.h b/engines/sword2/animation.h index 3ef8dac754..3d5c42b7f7 100644 --- a/engines/sword2/animation.h +++ b/engines/sword2/animation.h @@ -60,7 +60,7 @@ public: DXADecoderWithSound(Audio::Mixer *mixer, Audio::SoundHandle *bgSoundHandle); ~DXADecoderWithSound() {} - uint32 getElapsedTime() const; + uint32 getTime() const; private: Audio::Mixer *_mixer; Audio::SoundHandle *_bgSoundHandle; diff --git a/engines/sword25/fmv/movieplayer.cpp b/engines/sword25/fmv/movieplayer.cpp index 1acb366b3a..4609565223 100644 --- a/engines/sword25/fmv/movieplayer.cpp +++ b/engines/sword25/fmv/movieplayer.cpp @@ -167,7 +167,7 @@ void MoviePlayer::setScaleFactor(float scaleFactor) { } double MoviePlayer::getTime() { - return _decoder.getElapsedTime() / 1000.0; + return _decoder.getTime() / 1000.0; } #else // USE_THEORADEC diff --git a/engines/sword25/fmv/theora_decoder.cpp b/engines/sword25/fmv/theora_decoder.cpp index a7ebb5df8c..082c569fda 100644 --- a/engines/sword25/fmv/theora_decoder.cpp +++ b/engines/sword25/fmv/theora_decoder.cpp @@ -507,7 +507,7 @@ uint32 TheoraDecoder::getTimeToNextFrame() const { if (endOfVideo() || _curFrame < 0) return 0; - uint32 elapsedTime = getElapsedTime(); + uint32 elapsedTime = getTime(); uint32 nextFrameStartTime = (uint32)(_nextFrameStartTime * 1000); if (nextFrameStartTime <= elapsedTime) @@ -516,11 +516,11 @@ uint32 TheoraDecoder::getTimeToNextFrame() const { return nextFrameStartTime - elapsedTime; } -uint32 TheoraDecoder::getElapsedTime() const { +uint32 TheoraDecoder::getTime() const { if (_audStream) return g_system->getMixer()->getSoundElapsedTime(*_audHandle); - return VideoDecoder::getElapsedTime(); + return VideoDecoder::getTime(); } void TheoraDecoder::pauseVideoIntern(bool pause) { diff --git a/engines/sword25/fmv/theora_decoder.h b/engines/sword25/fmv/theora_decoder.h index e8cc5ab8b9..4fd7cc0f03 100644 --- a/engines/sword25/fmv/theora_decoder.h +++ b/engines/sword25/fmv/theora_decoder.h @@ -81,7 +81,7 @@ public: } Graphics::PixelFormat getPixelFormat() const { return _displaySurface.format; } - uint32 getElapsedTime() const; + uint32 getTime() const; uint32 getTimeToNextFrame() const; bool endOfVideo() const; diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp index 9685952304..28fa712d4f 100644 --- a/video/avi_decoder.cpp +++ b/video/avi_decoder.cpp @@ -305,11 +305,11 @@ void AviDecoder::close() { reset(); } -uint32 AviDecoder::getElapsedTime() const { +uint32 AviDecoder::getTime() const { if (_audStream) return _mixer->getSoundElapsedTime(*_audHandle); - return FixedRateVideoDecoder::getElapsedTime(); + return FixedRateVideoDecoder::getTime(); } const Graphics::Surface *AviDecoder::decodeNextFrame() { diff --git a/video/avi_decoder.h b/video/avi_decoder.h index 508760ec89..edd08c42a0 100644 --- a/video/avi_decoder.h +++ b/video/avi_decoder.h @@ -195,7 +195,7 @@ public: uint16 getWidth() const { return _header.width; } uint16 getHeight() const { return _header.height; } uint32 getFrameCount() const { return _header.totalFrames; } - uint32 getElapsedTime() const; + uint32 getTime() const; const Graphics::Surface *decodeNextFrame(); Graphics::PixelFormat getPixelFormat() const; const byte *getPalette() { _dirtyPalette = false; return _palette; } diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp index 884ca69f17..4738c3c8c0 100644 --- a/video/bink_decoder.cpp +++ b/video/bink_decoder.cpp @@ -181,7 +181,7 @@ void BinkDecoder::close() { _frames.clear(); } -uint32 BinkDecoder::getElapsedTime() const { +uint32 BinkDecoder::getTime() const { if (_audioStream && g_system->getMixer()->isSoundHandleActive(_audioHandle)) return g_system->getMixer()->getSoundElapsedTime(_audioHandle) + _audioStartOffset; diff --git a/video/bink_decoder.h b/video/bink_decoder.h index 3d5e882dd7..f1eadc6f17 100644 --- a/video/bink_decoder.h +++ b/video/bink_decoder.h @@ -70,7 +70,7 @@ public: uint16 getHeight() const { return _surface.h; } Graphics::PixelFormat getPixelFormat() const { return _surface.format; } uint32 getFrameCount() const { return _frames.size(); } - uint32 getElapsedTime() const; + uint32 getTime() const; const Graphics::Surface *decodeNextFrame(); // FixedRateVideoDecoder diff --git a/video/psx_decoder.cpp b/video/psx_decoder.cpp index 7c04b7f041..74f740f614 100644 --- a/video/psx_decoder.cpp +++ b/video/psx_decoder.cpp @@ -236,13 +236,13 @@ void PSXStreamDecoder::close() { reset(); } -uint32 PSXStreamDecoder::getElapsedTime() const { +uint32 PSXStreamDecoder::getTime() const { // TODO: Currently, the audio is always after the video so using this // can often lead to gaps in the audio... //if (_audStream) // return _mixer->getSoundElapsedTime(_audHandle); - return VideoDecoder::getElapsedTime(); + return VideoDecoder::getTime(); } uint32 PSXStreamDecoder::getTimeToNextFrame() const { @@ -250,7 +250,7 @@ uint32 PSXStreamDecoder::getTimeToNextFrame() const { return 0; uint32 nextTimeMillis = _nextFrameStartTime.msecs(); - uint32 elapsedTime = getElapsedTime(); + uint32 elapsedTime = getTime(); if (elapsedTime > nextTimeMillis) return 0; diff --git a/video/psx_decoder.h b/video/psx_decoder.h index c8ad92c45a..3695cb0f42 100644 --- a/video/psx_decoder.h +++ b/video/psx_decoder.h @@ -75,7 +75,7 @@ public: uint16 getWidth() const { return _surface->w; } uint16 getHeight() const { return _surface->h; } uint32 getFrameCount() const { return _frameCount; } - uint32 getElapsedTime() const; + uint32 getTime() const; uint32 getTimeToNextFrame() const; const Graphics::Surface *decodeNextFrame(); Graphics::PixelFormat getPixelFormat() const { return _surface->format; } diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 0d80c93a1f..5c841b30fb 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -185,7 +185,7 @@ bool QuickTimeDecoder::endOfVideo() const { return true; } -uint32 QuickTimeDecoder::getElapsedTime() const { +uint32 QuickTimeDecoder::getTime() const { // Try to base sync off an active audio track for (uint32 i = 0; i < _audioHandles.size(); i++) { if (g_system->getMixer()->isSoundHandleActive(_audioHandles[i])) { @@ -196,7 +196,7 @@ uint32 QuickTimeDecoder::getElapsedTime() const { } // Just use time elapsed since the beginning - return SeekableVideoDecoder::getElapsedTime(); + return SeekableVideoDecoder::getTime(); } uint32 QuickTimeDecoder::getTimeToNextFrame() const { @@ -211,7 +211,7 @@ uint32 QuickTimeDecoder::getTimeToNextFrame() const { // TODO: Add support for rate modification - uint32 elapsedTime = getElapsedTime(); + uint32 elapsedTime = getTime(); if (elapsedTime < nextFrameStartTime) return nextFrameStartTime - elapsedTime; diff --git a/video/qt_decoder.h b/video/qt_decoder.h index 583b4b44b5..7f2d32e515 100644 --- a/video/qt_decoder.h +++ b/video/qt_decoder.h @@ -106,7 +106,7 @@ public: bool isVideoLoaded() const { return isOpen(); } const Graphics::Surface *decodeNextFrame(); bool endOfVideo() const; - uint32 getElapsedTime() const; + uint32 getTime() const; uint32 getTimeToNextFrame() const; Graphics::PixelFormat getPixelFormat() const; diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp index 084028300d..439fe9027d 100644 --- a/video/smk_decoder.cpp +++ b/video/smk_decoder.cpp @@ -289,11 +289,11 @@ SmackerDecoder::~SmackerDecoder() { close(); } -uint32 SmackerDecoder::getElapsedTime() const { +uint32 SmackerDecoder::getTime() const { if (_audioStream && _audioStarted) return _mixer->getSoundElapsedTime(_audioHandle); - return FixedRateVideoDecoder::getElapsedTime(); + return FixedRateVideoDecoder::getTime(); } bool SmackerDecoder::loadStream(Common::SeekableReadStream *stream) { diff --git a/video/smk_decoder.h b/video/smk_decoder.h index 72cd32a222..fd5d658bdd 100644 --- a/video/smk_decoder.h +++ b/video/smk_decoder.h @@ -69,7 +69,7 @@ public: uint16 getWidth() const { return _surface->w; } uint16 getHeight() const { return _surface->h; } uint32 getFrameCount() const { return _frameCount; } - uint32 getElapsedTime() const; + uint32 getTime() const; const Graphics::Surface *decodeNextFrame(); Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); } const byte *getPalette() { _dirtyPalette = false; return _palette; } diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index e1122132a8..ae82a3374c 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -45,7 +45,7 @@ bool VideoDecoder::loadFile(const Common::String &filename) { return loadStream(file); } -uint32 VideoDecoder::getElapsedTime() const { +uint32 VideoDecoder::getTime() const { return g_system->getMillis() - _startTime; } @@ -98,7 +98,7 @@ uint32 FixedRateVideoDecoder::getTimeToNextFrame() const { if (endOfVideo() || _curFrame < 0) return 0; - uint32 elapsedTime = getElapsedTime(); + uint32 elapsedTime = getTime(); uint32 nextFrameStartTime = getFrameBeginTime(_curFrame + 1); // If the time that the next frame should be shown has past diff --git a/video/video_decoder.h b/video/video_decoder.h index 91c1ae2f11..73134307a4 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -125,15 +125,20 @@ public: virtual uint32 getFrameCount() const = 0; /** - * Returns the time (in ms) that the video has been running. - * This is based on the "wall clock" time as determined by - * OSystem::getMillis, and takes pausing the video into account. + * Returns the time position (in ms) of the current video. + * This can be based on the "wall clock" time as determined by + * OSystem::getMillis() or the current time of any audio track + * running in the video, and takes pausing the video into account. * - * As such, it can differ from what multiplying getCurFrame() by + * As such, it will differ from what multiplying getCurFrame() by * some constant would yield, e.g. for a video with non-constant * frame rate. + * + * Due to the nature of the timing, this value may not always be + * completely accurate (since our mixer does not have precise + * timing). */ - virtual uint32 getElapsedTime() const; + virtual uint32 getTime() const; /** * Return the time (in ms) until the next frame should be displayed. -- cgit v1.2.3 From 0aacf4c4c08baf512b98afa63bd3d052bfec0716 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 12 May 2012 22:05:32 -0400 Subject: VIDEO: Make seekToTime() take a const Timestamp reference --- video/qt_decoder.cpp | 2 +- video/qt_decoder.h | 2 +- video/video_decoder.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 5c841b30fb..585f5927a1 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -406,7 +406,7 @@ void QuickTimeDecoder::freeAllTrackHandlers() { _handlers.clear(); } -void QuickTimeDecoder::seekToTime(Audio::Timestamp time) { +void QuickTimeDecoder::seekToTime(const Audio::Timestamp &time) { stopAudio(); _audioStartOffset = time; diff --git a/video/qt_decoder.h b/video/qt_decoder.h index 7f2d32e515..1f614df18b 100644 --- a/video/qt_decoder.h +++ b/video/qt_decoder.h @@ -112,7 +112,7 @@ public: // SeekableVideoDecoder API void seekToFrame(uint32 frame); - void seekToTime(Audio::Timestamp time); + void seekToTime(const Audio::Timestamp &time); uint32 getDuration() const { return _duration * 1000 / _timeScale; } protected: diff --git a/video/video_decoder.h b/video/video_decoder.h index 73134307a4..2b99a2b1bf 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -253,7 +253,7 @@ public: /** * Seek to the specified time. */ - virtual void seekToTime(Audio::Timestamp time) = 0; + virtual void seekToTime(const Audio::Timestamp &time) = 0; /** * Seek to the specified time (in ms). -- cgit v1.2.3 From 4f6d42d77b5284552b12a7c0f427e060b27c3077 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 13 May 2012 16:23:15 +0200 Subject: SCI: Add a few FIXMEs --- engines/sci/resource.cpp | 2 ++ engines/sci/resource.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 77a6a40a92..11c3e2bab5 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -93,6 +93,8 @@ const char *getSciVersionDesc(SciVersion version) { //#define SCI_VERBOSE_RESMAN 1 +// FIXME: This list is out of sync with the enum in resource.h with +// its indices. static const char *const sci_error_types[] = { "No error", "I/O error", diff --git a/engines/sci/resource.h b/engines/sci/resource.h index 294a4672e2..6c2eb0b025 100644 --- a/engines/sci/resource.h +++ b/engines/sci/resource.h @@ -54,6 +54,7 @@ enum ResourceStatus { kResStatusLocked /**< Allocated and in use */ }; +// FIXME: This enum is out of sync with its textual descriptions in resource.cpp /** Initialization result types */ enum { SCI_ERROR_IO_ERROR = 1, @@ -64,6 +65,7 @@ enum { SCI_ERROR_DECOMPRESSION_ERROR = 6, /**< sanity checks failed during decompression */ SCI_ERROR_RESOURCE_TOO_BIG = 8 /**< Resource size exceeds SCI_MAX_RESOURCE_SIZE */ + // FIXME: This comment makes no sense. Track down in history what it means: /* the first critical error number */ }; -- cgit v1.2.3 From 398d0ffceffc2dc1241b3f667c180573c288ccbf Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 14 May 2012 02:30:15 +0300 Subject: SCI: Check for object visibility, if an object defines it Fixes the inventory in GK1 --- engines/sci/engine/selector.cpp | 1 + engines/sci/engine/selector.h | 1 + engines/sci/graphics/frameout.cpp | 10 ++++++++++ engines/sci/graphics/frameout.h | 1 + 4 files changed, 13 insertions(+) diff --git a/engines/sci/engine/selector.cpp b/engines/sci/engine/selector.cpp index a8b1cf7ec2..2f6b4d58dd 100644 --- a/engines/sci/engine/selector.cpp +++ b/engines/sci/engine/selector.cpp @@ -181,6 +181,7 @@ void Kernel::mapSelectors() { FIND_SELECTOR(skip); FIND_SELECTOR(fixPriority); FIND_SELECTOR(mirrored); + FIND_SELECTOR(visible); FIND_SELECTOR(useInsetRect); FIND_SELECTOR(inTop); FIND_SELECTOR(inLeft); diff --git a/engines/sci/engine/selector.h b/engines/sci/engine/selector.h index 4b913a866a..2308a6c387 100644 --- a/engines/sci/engine/selector.h +++ b/engines/sci/engine/selector.h @@ -149,6 +149,7 @@ struct SelectorCache { Selector fixPriority; Selector mirrored; + Selector visible; Selector useInsetRect; Selector inTop, inLeft, inBottom, inRight; diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index b12413ab69..42b51e409d 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -237,6 +237,7 @@ void GfxFrameout::kernelAddScreenItem(reg_t object) { memset(itemEntry, 0, sizeof(FrameoutEntry)); itemEntry->object = object; itemEntry->givenOrderNr = _screenItems.size(); + itemEntry->visible = true; _screenItems.push_back(itemEntry); kernelUpdateScreenItem(object); @@ -266,6 +267,11 @@ void GfxFrameout::kernelUpdateScreenItem(reg_t object) { itemEntry->signal = readSelectorValue(_segMan, object, SELECTOR(signal)); itemEntry->scaleX = readSelectorValue(_segMan, object, SELECTOR(scaleX)); itemEntry->scaleY = readSelectorValue(_segMan, object, SELECTOR(scaleY)); + itemEntry->visible = true; + + // Check if the entry can be hidden + if (lookupSelector(_segMan, object, SELECTOR(visible), NULL, NULL) != kSelectorNone) + itemEntry->visible = readSelectorValue(_segMan, object, SELECTOR(visible)); } void GfxFrameout::kernelDeleteScreenItem(reg_t object) { @@ -433,6 +439,7 @@ void GfxFrameout::createPlaneItemList(reg_t planeObject, FrameoutList &itemList) picEntry->x = planePicture->getSci32celX(pictureCelNr); picEntry->picStartX = pictureIt->startX; picEntry->picStartY = pictureIt->startY; + picEntry->visible = true; picEntry->priority = planePicture->getSci32celPriority(pictureCelNr); @@ -541,6 +548,9 @@ void GfxFrameout::kernelFrameout() { for (FrameoutList::iterator listIterator = itemList.begin(); listIterator != itemList.end(); listIterator++) { FrameoutEntry *itemEntry = *listIterator; + if (!itemEntry->visible) + continue; + if (itemEntry->object.isNull()) { // Picture cel data itemEntry->x = upscaleHorizontalCoordinate(itemEntry->x); diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index 8c3cc261d5..a3d686c592 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -60,6 +60,7 @@ struct FrameoutEntry { GfxPicture *picture; int16 picStartX; int16 picStartY; + bool visible; }; typedef Common::List FrameoutList; -- cgit v1.2.3 From 6b38731d393cdc85937c74b301df5f3b3de5af9e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 14 May 2012 11:04:58 +0300 Subject: SCI: Implement savegame deletion functionality in SCI32 This is based on two kernel functions, kMakeSaveCatName and kMakeSaveFileName --- engines/sci/engine/kernel.h | 2 ++ engines/sci/engine/kernel_tables.h | 14 ++----------- engines/sci/engine/kfile.cpp | 42 ++++++++++++++++++++++++++++++++------ engines/sci/graphics/text32.cpp | 7 +++++-- 4 files changed, 45 insertions(+), 20 deletions(-) diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index e549c1f8ae..42651ec4a5 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -458,6 +458,8 @@ reg_t kListAllTrue(EngineState *s, int argc, reg_t *argv); reg_t kInPolygon(EngineState *s, int argc, reg_t *argv); reg_t kObjectIntersect(EngineState *s, int argc, reg_t *argv); reg_t kEditText(EngineState *s, int argc, reg_t *argv); +reg_t kMakeSaveCatName(EngineState *s, int argc, reg_t *argv); +reg_t kMakeSaveFileName(EngineState *s, int argc, reg_t *argv); // SCI2.1 Kernel Functions reg_t kText(EngineState *s, int argc, reg_t *argv); diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 622511c906..ff06b79d72 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -500,6 +500,8 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(UpdateScreenItem), SIG_EVERYWHERE, "o", NULL, NULL }, { MAP_CALL(ObjectIntersect), SIG_EVERYWHERE, "oo", NULL, NULL }, { MAP_CALL(EditText), SIG_EVERYWHERE, "o", NULL, NULL }, + { MAP_CALL(MakeSaveCatName), SIG_EVERYWHERE, "rr", NULL, NULL }, + { MAP_CALL(MakeSaveFileName), SIG_EVERYWHERE, "rri", NULL, NULL }, // SCI2 unmapped functions - TODO! @@ -512,18 +514,6 @@ static SciKernelMapEntry s_kernelMap[] = { // Debug function used to track resources { MAP_EMPTY(ResourceTrack), SIG_EVERYWHERE, "(.*)", NULL, NULL }, - // SCI2 functions that are used in the original save/load menus. Marked as dummy, so - // that the engine errors out on purpose. TODO: Implement once the original save/load - // menus are implemented. - - // Creates the name of the save catalogue/directory to save into. - // TODO: Implement once the original save/load menus are implemented. - { MAP_DUMMY(MakeSaveCatName), SIG_EVERYWHERE, "(.*)", NULL, NULL }, - - // Creates the name of the save file to save into - // TODO: Implement once the original save/load menus are implemented. - { MAP_DUMMY(MakeSaveFileName), SIG_EVERYWHERE, "(.*)", NULL, NULL }, - // Unused / debug SCI2 unused functions, always mapped to kDummy // AddMagnify/DeleteMagnify are both called by script 64979 (the Magnifier diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 312497720a..24ef500d80 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -863,6 +863,10 @@ reg_t kFileIOUnlink(EngineState *s, int argc, reg_t *argv) { int savedir_nr = saves[slotNum].id; name = g_sci->getSavegameName(savedir_nr); result = saveFileMan->removeSavefile(name); + } else if (getSciVersion() >= SCI_VERSION_2) { + // We don't need to wrap the filename in SCI32 games, as it's already + // constructed here + result = saveFileMan->removeSavefile(name); } else { const Common::String wrappedName = g_sci->wrapFilename(name); result = saveFileMan->removeSavefile(wrappedName); @@ -1168,6 +1172,35 @@ reg_t kCD(EngineState *s, int argc, reg_t *argv) { return NULL_REG; } +reg_t kMakeSaveCatName(EngineState *s, int argc, reg_t *argv) { + // Normally, this creates the name of the save catalogue/directory to save into. + // First parameter is the string to save the result into. Second is a string + // with game parameters. We don't have a use for this at all, as we have our own + // savegame directory management, thus we always return an empty string. + return argv[0]; +} + +reg_t kMakeSaveFileName(EngineState *s, int argc, reg_t *argv) { + // Creates a savegame name from a slot number. Used when deleting saved games. + // Param 0: the output buffer (same as in kMakeSaveCatName) + // Param 1: a string with game parameters, ignored + // Param 2: the selected slot + + SciString *resultString = s->_segMan->lookupString(argv[0]); + uint16 saveSlot = argv[2].toUint16(); + // For some reason, the save slot is incremented by 100... fix it here + if (saveSlot > 100) + saveSlot -= 100; + + Common::Array saves; + listSavegames(saves); + + Common::String filename = g_sci->getSavegameName(saveSlot); + resultString->fromString(filename); + + return argv[0]; +} + reg_t kSave(EngineState *s, int argc, reg_t *argv) { switch (argv[0].toUint16()) { case 0: @@ -1181,12 +1214,9 @@ reg_t kSave(EngineState *s, int argc, reg_t *argv) { case 5: return kGetSaveFiles(s, argc - 1, argv + 1); case 6: - // This is used in Shivers to delete saved games, however it - // always passes the same file name (SHIVER), so it doesn't - // actually delete anything... - // TODO: Check why this happens - // argv[1] is a string (most likely the save game directory) - return kFileIOUnlink(s, argc - 2, argv + 2); + return kMakeSaveCatName(s, argc - 1, argv + 1); + case 7: + return kMakeSaveFileName(s, argc - 1, argv + 1); case 8: // TODO // This is a timer callback, with 1 parameter: the timer object diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp index 7894c7109c..cd24ca5a99 100644 --- a/engines/sci/graphics/text32.cpp +++ b/engines/sci/graphics/text32.cpp @@ -187,8 +187,11 @@ void GfxText32::drawTextBitmap(int16 x, int16 y, Common::Rect planeRect, reg_t t byte *memoryPtr = _segMan->getHunkPointer(hunkId); - if (!memoryPtr) - error("Attempt to draw an invalid text bitmap"); + if (!memoryPtr) { + // Happens when restoring in some SCI32 games + warning("Attempt to draw an invalid text bitmap"); + return; + } byte *surface = memoryPtr + BITMAP_HEADER_SIZE; -- cgit v1.2.3 From c3f0a426fcbe2c8991b29c0e4bda1e7f0c9263b9 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 14 May 2012 11:14:10 +0300 Subject: SCI: kMakeSaveFileName is actually using virtual savegame IDs --- engines/sci/engine/kfile.cpp | 12 ++++++------ engines/sci/engine/script_patches.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 24ef500d80..af438bdaff 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -331,7 +331,7 @@ reg_t kDeviceInfo(EngineState *s, int argc, reg_t *argv) { s->_segMan->strcpy(argv[1], "__throwaway"); debug(3, "K_DEVICE_INFO_GET_SAVEFILE_NAME(%s,%d) -> %s", game_prefix.c_str(), virtualId, "__throwaway"); if ((virtualId < SAVEGAMEID_OFFICIALRANGE_START) || (virtualId > SAVEGAMEID_OFFICIALRANGE_END)) - error("kDeviceInfo(deleteSave): invalid savegame-id specified"); + error("kDeviceInfo(deleteSave): invalid savegame ID specified"); uint savegameId = virtualId - SAVEGAMEID_OFFICIALRANGE_START; Common::Array saves; listSavegames(saves); @@ -526,7 +526,7 @@ reg_t kGetSaveFiles(EngineState *s, int argc, reg_t *argv) { char *saveNamePtr = saveNames; for (uint i = 0; i < totalSaves; i++) { - *slot++ = make_reg(0, saves[i].id + SAVEGAMEID_OFFICIALRANGE_START); // Store the virtual savegame-id ffs. see above + *slot++ = make_reg(0, saves[i].id + SAVEGAMEID_OFFICIALRANGE_START); // Store the virtual savegame ID ffs. see above strcpy(saveNamePtr, saves[i].name); saveNamePtr += SCI_MAX_SAVENAME_LENGTH; } @@ -1187,10 +1187,10 @@ reg_t kMakeSaveFileName(EngineState *s, int argc, reg_t *argv) { // Param 2: the selected slot SciString *resultString = s->_segMan->lookupString(argv[0]); - uint16 saveSlot = argv[2].toUint16(); - // For some reason, the save slot is incremented by 100... fix it here - if (saveSlot > 100) - saveSlot -= 100; + uint16 virtualId = argv[2].toUint16(); + if ((virtualId < SAVEGAMEID_OFFICIALRANGE_START) || (virtualId > SAVEGAMEID_OFFICIALRANGE_END)) + error("kMakeSaveFileName: invalid savegame ID specified"); + uint saveSlot = virtualId - SAVEGAMEID_OFFICIALRANGE_START; Common::Array saves; listSavegames(saves); diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 187f1ce021..69eb377684 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -775,7 +775,7 @@ const uint16 mothergoose256PatchReplay[] = { PATCH_END }; -// when saving, it also checks if the savegame-id is below 13. +// when saving, it also checks if the savegame ID is below 13. // we change this to check if below 113 instead const byte mothergoose256SignatureSaveLimit[] = { 5, -- cgit v1.2.3 From d789df894552bf73709628f09a0282b462df797e Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 14 May 2012 00:49:10 -0400 Subject: GRAPHICS: Add palette start index and color count functions to ImageDecoder --- graphics/decoders/bmp.cpp | 12 +++++++----- graphics/decoders/bmp.h | 2 ++ graphics/decoders/image_decoder.h | 5 +++++ graphics/decoders/pict.cpp | 7 +++++-- graphics/decoders/pict.h | 2 ++ graphics/decoders/png.cpp | 4 +++- graphics/decoders/png.h | 1 + 7 files changed, 25 insertions(+), 8 deletions(-) diff --git a/graphics/decoders/bmp.cpp b/graphics/decoders/bmp.cpp index 0d44881d7c..5f764e1bd3 100644 --- a/graphics/decoders/bmp.cpp +++ b/graphics/decoders/bmp.cpp @@ -31,6 +31,7 @@ namespace Graphics { BitmapDecoder::BitmapDecoder() { _surface = 0; _palette = 0; + _paletteColorCount = 0; } BitmapDecoder::~BitmapDecoder() { @@ -44,6 +45,7 @@ void BitmapDecoder::destroy() { } delete[] _palette; _palette = 0; + _paletteColorCount = 0; } bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) { @@ -95,16 +97,16 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) { /* uint32 imageSize = */ stream.readUint32LE(); /* uint32 pixelsPerMeterX = */ stream.readUint32LE(); /* uint32 pixelsPerMeterY = */ stream.readUint32LE(); - uint32 colorsUsed = stream.readUint32LE(); + _paletteColorCount = stream.readUint32LE(); /* uint32 colorsImportant = */ stream.readUint32LE(); - if (colorsUsed == 0) - colorsUsed = 256; + if (_paletteColorCount == 0) + _paletteColorCount = 256; if (bitsPerPixel == 8) { // Read the palette - _palette = new byte[colorsUsed * 3]; - for (uint16 i = 0; i < colorsUsed; i++) { + _palette = new byte[_paletteColorCount * 3]; + for (uint16 i = 0; i < _paletteColorCount; i++) { _palette[i * 3 + 2] = stream.readByte(); _palette[i * 3 + 1] = stream.readByte(); _palette[i * 3 + 0] = stream.readByte(); diff --git a/graphics/decoders/bmp.h b/graphics/decoders/bmp.h index 8a37538ee1..59da682e4d 100644 --- a/graphics/decoders/bmp.h +++ b/graphics/decoders/bmp.h @@ -52,10 +52,12 @@ public: virtual bool loadStream(Common::SeekableReadStream &stream); virtual const Surface *getSurface() const { return _surface; } const byte *getPalette() const { return _palette; } + uint16 getPaletteColorCount() const { return _paletteColorCount; } private: Surface *_surface; byte *_palette; + uint16 _paletteColorCount; }; } // End of namespace Graphics diff --git a/graphics/decoders/image_decoder.h b/graphics/decoders/image_decoder.h index e768f7f9a2..7fa00749ff 100644 --- a/graphics/decoders/image_decoder.h +++ b/graphics/decoders/image_decoder.h @@ -78,6 +78,11 @@ public: * @return the decoded palette, or 0 if no palette is present */ virtual const byte *getPalette() const { return 0; } + + /** Return the starting index of the palette. */ + virtual byte getPaletteStartIndex() const { return 0; } + /** Return the number of colors in the palette. */ + virtual uint16 getPaletteColorCount() const { return 0; } }; } // End of namespace Graphics diff --git a/graphics/decoders/pict.cpp b/graphics/decoders/pict.cpp index bdb733a87d..7eddd3b893 100644 --- a/graphics/decoders/pict.cpp +++ b/graphics/decoders/pict.cpp @@ -38,6 +38,7 @@ namespace Graphics { PICTDecoder::PICTDecoder() { _outputSurface = 0; + _paletteColorCount = 0; } PICTDecoder::~PICTDecoder() { @@ -50,6 +51,8 @@ void PICTDecoder::destroy() { delete _outputSurface; _outputSurface = 0; } + + _paletteColorCount = 0; } #define OPCODE(a, b, c) _opcodes.push_back(PICTOpcode(a, &PICTDecoder::b, c)) @@ -298,9 +301,9 @@ void PICTDecoder::unpackBitsRect(Common::SeekableReadStream &stream, bool hasPal // See http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-267.html stream.readUint32BE(); // seed stream.readUint16BE(); // flags - uint16 colorCount = stream.readUint16BE() + 1; + _paletteColorCount = stream.readUint16BE() + 1; - for (uint32 i = 0; i < colorCount; i++) { + for (uint32 i = 0; i < _paletteColorCount; i++) { stream.readUint16BE(); _palette[i * 3] = stream.readUint16BE() >> 8; _palette[i * 3 + 1] = stream.readUint16BE() >> 8; diff --git a/graphics/decoders/pict.h b/graphics/decoders/pict.h index 1d07df1ab9..417a7c5134 100644 --- a/graphics/decoders/pict.h +++ b/graphics/decoders/pict.h @@ -57,6 +57,7 @@ public: void destroy(); const Surface *getSurface() const { return _outputSurface; } const byte *getPalette() const { return _palette; } + uint16 getPaletteColorCount() const { return _paletteColorCount; } struct PixMap { uint32 baseAddr; @@ -81,6 +82,7 @@ public: private: Common::Rect _imageRect; byte _palette[256 * 3]; + uint16 _paletteColorCount; Graphics::Surface *_outputSurface; bool _continueParsing; diff --git a/graphics/decoders/png.cpp b/graphics/decoders/png.cpp index b87b6fdc7a..492c69779f 100644 --- a/graphics/decoders/png.cpp +++ b/graphics/decoders/png.cpp @@ -99,7 +99,7 @@ enum PNGFilters { }; PNGDecoder::PNGDecoder() : _compressedBuffer(0), _compressedBufferSize(0), - _transparentColorSpecified(false), _outputSurface(0) { + _transparentColorSpecified(false), _outputSurface(0), _paletteEntries(0) { } PNGDecoder::~PNGDecoder() { @@ -112,6 +112,8 @@ void PNGDecoder::destroy() { delete _outputSurface; _outputSurface = 0; } + + _paletteEntries = 0; } bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) { diff --git a/graphics/decoders/png.h b/graphics/decoders/png.h index 1da0bea1ab..ca204f6dd3 100644 --- a/graphics/decoders/png.h +++ b/graphics/decoders/png.h @@ -73,6 +73,7 @@ public: void destroy(); const Graphics::Surface *getSurface() const { return _outputSurface; } const byte *getPalette() const { return _palette; } + uint16 getPaletteColorCount() const { return _paletteEntries; } private: enum PNGColorType { -- cgit v1.2.3 From b253a05454cd4088a70ac1a90589ebf5db85ed5a Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 14 May 2012 00:59:50 -0400 Subject: GRAPHICS: Hide the WinCursor implementation --- engines/mohawk/cursors.cpp | 4 ++-- engines/scumm/he/resource_he.cpp | 2 +- graphics/wincursor.cpp | 40 ++++++++++++++++++++++++++++++++++++++ graphics/wincursor.h | 42 +--------------------------------------- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp index 8c72c9875e..3cf5ac740e 100644 --- a/engines/mohawk/cursors.cpp +++ b/engines/mohawk/cursors.cpp @@ -157,7 +157,7 @@ void NECursorManager::setCursor(uint16 id) { Graphics::WinCursorGroup *cursorGroup = Graphics::WinCursorGroup::createCursorGroup(*_exe, id); if (cursorGroup) { - Graphics::WinCursor *cursor = cursorGroup->cursors[0].cursor; + Graphics::Cursor *cursor = cursorGroup->cursors[0].cursor; CursorMan.replaceCursor(cursor->getSurface(), cursor->getWidth(), cursor->getHeight(), cursor->getHotspotX(), cursor->getHotspotY(), cursor->getKeyColor()); CursorMan.replaceCursorPalette(cursor->getPalette(), 0, 256); return; @@ -257,7 +257,7 @@ void PECursorManager::setCursor(uint16 id) { Graphics::WinCursorGroup *cursorGroup = Graphics::WinCursorGroup::createCursorGroup(*_exe, id); if (cursorGroup) { - Graphics::WinCursor *cursor = cursorGroup->cursors[0].cursor; + Graphics::Cursor *cursor = cursorGroup->cursors[0].cursor; CursorMan.replaceCursor(cursor->getSurface(), cursor->getWidth(), cursor->getHeight(), cursor->getHotspotX(), cursor->getHotspotY(), cursor->getKeyColor()); CursorMan.replaceCursorPalette(cursor->getPalette(), 0, 256); delete cursorGroup; diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp index 42748d08ed..ce4b2239d2 100644 --- a/engines/scumm/he/resource_he.cpp +++ b/engines/scumm/he/resource_he.cpp @@ -129,7 +129,7 @@ bool Win32ResExtractor::extractResource(int id, CachedCursor *cc) { if (!group) return false; - Graphics::WinCursor *cursor = group->cursors[0].cursor; + Graphics::Cursor *cursor = group->cursors[0].cursor; cc->bitmap = new byte[cursor->getWidth() * cursor->getHeight()]; cc->width = cursor->getWidth(); diff --git a/graphics/wincursor.cpp b/graphics/wincursor.cpp index 2db72a2874..1d599f7130 100644 --- a/graphics/wincursor.cpp +++ b/graphics/wincursor.cpp @@ -30,6 +30,46 @@ namespace Graphics { +/** A Windows cursor. */ +class WinCursor : public Cursor { +public: + WinCursor(); + ~WinCursor(); + + /** Return the cursor's width. */ + uint16 getWidth() const; + /** Return the cursor's height. */ + uint16 getHeight() const; + /** Return the cursor's hotspot's x coordinate. */ + uint16 getHotspotX() const; + /** Return the cursor's hotspot's y coordinate. */ + uint16 getHotspotY() const; + /** Return the cursor's transparent key. */ + byte getKeyColor() const; + + const byte *getSurface() const { return _surface; } + + const byte *getPalette() const { return _palette; } + byte getPaletteStartIndex() const { return 0; } + uint16 getPaletteCount() const { return 256; } + + /** Read the cursor's data out of a stream. */ + bool readFromStream(Common::SeekableReadStream &stream); + +private: + byte *_surface; + byte _palette[256 * 3]; + + uint16 _width; ///< The cursor's width. + uint16 _height; ///< The cursor's height. + uint16 _hotspotX; ///< The cursor's hotspot's x coordinate. + uint16 _hotspotY; ///< The cursor's hotspot's y coordinate. + byte _keyColor; ///< The cursor's transparent key + + /** Clear the cursor. */ + void clear(); +}; + WinCursor::WinCursor() { _width = 0; _height = 0; diff --git a/graphics/wincursor.h b/graphics/wincursor.h index e6b35dc80c..9e73e3a12f 100644 --- a/graphics/wincursor.h +++ b/graphics/wincursor.h @@ -36,46 +36,6 @@ class SeekableReadStream; namespace Graphics { -/** A Windows cursor. */ -class WinCursor : public Cursor { -public: - WinCursor(); - ~WinCursor(); - - /** Return the cursor's width. */ - uint16 getWidth() const; - /** Return the cursor's height. */ - uint16 getHeight() const; - /** Return the cursor's hotspot's x coordinate. */ - uint16 getHotspotX() const; - /** Return the cursor's hotspot's y coordinate. */ - uint16 getHotspotY() const; - /** Return the cursor's transparent key. */ - byte getKeyColor() const; - - const byte *getSurface() const { return _surface; } - - const byte *getPalette() const { return _palette; } - byte getPaletteStartIndex() const { return 0; } - uint16 getPaletteCount() const { return 256; } - - /** Read the cursor's data out of a stream. */ - bool readFromStream(Common::SeekableReadStream &stream); - -private: - byte *_surface; - byte _palette[256 * 3]; - - uint16 _width; ///< The cursor's width. - uint16 _height; ///< The cursor's height. - uint16 _hotspotX; ///< The cursor's hotspot's x coordinate. - uint16 _hotspotY; ///< The cursor's hotspot's y coordinate. - byte _keyColor; ///< The cursor's transparent key - - /** Clear the cursor. */ - void clear(); -}; - /** * A structure holding an array of cursors from a single Windows Executable cursor group. * @@ -91,7 +51,7 @@ struct WinCursorGroup { struct CursorItem { Common::WinResourceID id; - WinCursor *cursor; + Cursor *cursor; }; Common::Array cursors; -- cgit v1.2.3 From 623ae7f1793a2fb535b1abd6290a071ad90ee757 Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Mon, 14 May 2012 17:15:17 +0200 Subject: CRUISE: Add detection entry for Amiga Italian ver --- engines/cruise/detection.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp index eb7c1c524f..3603ffa862 100644 --- a/engines/cruise/detection.cpp +++ b/engines/cruise/detection.cpp @@ -171,6 +171,19 @@ static const CRUISEGameDescription gameDescriptions[] = { GType_CRUISE, 0, }, + { // Amiga Italian US GOLD edition. + { + "cruise", + 0, + AD_ENTRY1("D1", "a0011075413b7335e003e8e3c9cf51b9"), + Common::EN_ANY, + Common::kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO0() + }, + GType_CRUISE, + 0, + }, { // AtariST English KixxXL edition. { "cruise", -- cgit v1.2.3 From ef280e81a6a2239236103bc511e2de939709564d Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Mon, 14 May 2012 17:18:30 +0200 Subject: CRUISE: Correct Italian detection entry Actually mark Amiga italian detection entry as Italian --- engines/cruise/detection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp index 3603ffa862..b2e267ca49 100644 --- a/engines/cruise/detection.cpp +++ b/engines/cruise/detection.cpp @@ -176,7 +176,7 @@ static const CRUISEGameDescription gameDescriptions[] = { "cruise", 0, AD_ENTRY1("D1", "a0011075413b7335e003e8e3c9cf51b9"), - Common::EN_ANY, + Common::IT_ITA, Common::kPlatformAmiga, ADGF_NO_FLAGS, GUIO0() -- cgit v1.2.3 From 3296e872f4ad3d57e6294cb67aca272110b4077a Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Mon, 14 May 2012 20:27:15 +0200 Subject: CRUISE: Add italian language strings Add italian menu strings, taken from Italian Amiga version --- engines/cruise/cruise.cpp | 3 +++ engines/cruise/staticres.cpp | 4 ++++ engines/cruise/staticres.h | 1 + 3 files changed, 8 insertions(+) diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp index cf01d9bdbc..2147419886 100644 --- a/engines/cruise/cruise.cpp +++ b/engines/cruise/cruise.cpp @@ -169,6 +169,9 @@ bool CruiseEngine::loadLanguageStrings() { case Common::DE_DEU: p = germanLanguageStrings; break; + case Common::IT_ITA: + p = italianLanguageStrings; + break; default: return false; } diff --git a/engines/cruise/staticres.cpp b/engines/cruise/staticres.cpp index 1565f254d0..a3fc4f884b 100644 --- a/engines/cruise/staticres.cpp +++ b/engines/cruise/staticres.cpp @@ -320,5 +320,9 @@ const char *germanLanguageStrings[13] = { " ", NULL, NULL, NULL, NULL, "Inventar", "Sprechen ""\xFC""ber", "Speilermen\xFC", "Speicherlaufwerk", "Speichern", "Laden", "Neu beginnen", "Ende" }; +const char *italianLanguageStrings[13] = { + "Pausa", NULL, NULL, NULL, NULL, "Inventario", "Parla di...", "Menu giocatore", NULL, + "Salva", "Carica", "Ricomincia", "Esci" +}; } // End of namespace Cruise diff --git a/engines/cruise/staticres.h b/engines/cruise/staticres.h index a3cf13e41c..acf0b640be 100644 --- a/engines/cruise/staticres.h +++ b/engines/cruise/staticres.h @@ -57,6 +57,7 @@ extern const byte mouseCursorMagnifyingGlass[]; extern const char *englishLanguageStrings[13]; extern const char *frenchLanguageStrings[13]; extern const char *germanLanguageStrings[13]; +extern const char *italianLanguageStrings[13]; } // End of namespace Cruise -- cgit v1.2.3 From ec7dfedc9f275133523b82a08bc62f5c5dbc4d80 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 14 May 2012 21:43:27 +0300 Subject: NEWS: Add GUI-related items. --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index 0a48ccab9a..4b3203dc66 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,8 @@ For a more comprehensive changelog of the latest experimental code, see: Engine tab when adding or editing a configuration for a game. In most cases, you will have to run each game once or readd them all in ScummVM's launcher in order to get the custom options tab. + - Improved predicitve dialog look. + - Various GUI improvements. SDL ports: - Added support for OpenGL (GSoC Task). -- cgit v1.2.3 From c64a69c363093df946d2a8555d3e7264f16441ef Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 15 May 2012 03:05:08 +0300 Subject: SCI: Resolve some resource related FIXMEs These were introduced in 4f6d42d. The odd comment dates back to FreeSCI, as far as our history goes, and seems to be a leftover from an old refactoring during FreeSCI's history --- engines/sci/resource.cpp | 17 ++++++++--------- engines/sci/resource.h | 20 +++++++++----------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 11c3e2bab5..f8ddf64551 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -93,9 +93,7 @@ const char *getSciVersionDesc(SciVersion version) { //#define SCI_VERBOSE_RESMAN 1 -// FIXME: This list is out of sync with the enum in resource.h with -// its indices. -static const char *const sci_error_types[] = { +static const char *const s_errorDescriptions[] = { "No error", "I/O error", "Resource is empty (size 0)", @@ -103,10 +101,8 @@ static const char *const sci_error_types[] = { "resource.map file not found", "No resource files found", "Unknown compression method", - "Decompression failed: Decompression buffer overflow", "Decompression failed: Sanity check failed", - "Decompression failed: Resource too big", - "SCI version is unsupported" + "Decompression failed: Resource too big" }; static const char *const s_resourceTypeNames[] = { @@ -578,7 +574,7 @@ void ResourceSource::loadResource(ResourceManager *resMan, Resource *res) { if (error) { warning("Error %d occurred while reading %s from resource file %s: %s", error, res->_id.toString().c_str(), res->getResourceLocation().c_str(), - sci_error_types[error]); + s_errorDescriptions[error]); res->unalloc(); } @@ -1878,6 +1874,9 @@ int Resource::readResourceInfo(ResVersion volVersion, Common::SeekableReadStream uint32 wCompression, szUnpacked; ResourceType type; + if (file->size() == 0) + return SCI_ERROR_EMPTY_RESOURCE; + switch (volVersion) { case kResVersionSci0Sci1Early: case kResVersionSci1Middle: @@ -1922,7 +1921,7 @@ int Resource::readResourceInfo(ResVersion volVersion, Common::SeekableReadStream break; #endif default: - return SCI_ERROR_INVALID_RESMAP_ENTRY; + return SCI_ERROR_RESMAP_INVALID_ENTRY; } // check if there were errors while reading @@ -1963,7 +1962,7 @@ int Resource::readResourceInfo(ResVersion volVersion, Common::SeekableReadStream compression = kCompUnknown; } - return compression == kCompUnknown ? SCI_ERROR_UNKNOWN_COMPRESSION : 0; + return (compression == kCompUnknown) ? SCI_ERROR_UNKNOWN_COMPRESSION : SCI_ERROR_NONE; } int Resource::decompress(ResVersion volVersion, Common::SeekableReadStream *file) { diff --git a/engines/sci/resource.h b/engines/sci/resource.h index 6c2eb0b025..4baf39c67f 100644 --- a/engines/sci/resource.h +++ b/engines/sci/resource.h @@ -54,19 +54,17 @@ enum ResourceStatus { kResStatusLocked /**< Allocated and in use */ }; -// FIXME: This enum is out of sync with its textual descriptions in resource.cpp -/** Initialization result types */ -enum { +/** Resource error codes. Should be in sync with s_errorDescriptions */ +enum ResourceErrorCodes { + SCI_ERROR_NONE = 0, SCI_ERROR_IO_ERROR = 1, - SCI_ERROR_INVALID_RESMAP_ENTRY = 2, /**< Invalid resource.map entry */ - SCI_ERROR_RESMAP_NOT_FOUND = 3, - SCI_ERROR_NO_RESOURCE_FILES_FOUND = 4, /**< No resource at all was found */ - SCI_ERROR_UNKNOWN_COMPRESSION = 5, - SCI_ERROR_DECOMPRESSION_ERROR = 6, /**< sanity checks failed during decompression */ + SCI_ERROR_EMPTY_RESOURCE = 2, + SCI_ERROR_RESMAP_INVALID_ENTRY = 3, /**< Invalid resource.map entry */ + SCI_ERROR_RESMAP_NOT_FOUND = 4, + SCI_ERROR_NO_RESOURCE_FILES_FOUND = 5, /**< No resource at all was found */ + SCI_ERROR_UNKNOWN_COMPRESSION = 6, + SCI_ERROR_DECOMPRESSION_ERROR = 7, /**< sanity checks failed during decompression */ SCI_ERROR_RESOURCE_TOO_BIG = 8 /**< Resource size exceeds SCI_MAX_RESOURCE_SIZE */ - - // FIXME: This comment makes no sense. Track down in history what it means: - /* the first critical error number */ }; enum { -- cgit v1.2.3 From 8cfe25cd658ddbbb811ff2b9fce7e46ea6bc855a Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Mon, 14 May 2012 23:37:30 +1000 Subject: MIDI: add sndio midi backend New sndio MIDI backend for OpenBSD written by Alexandre Ratchov. Tested with an external MT-32 and fluidsynth. --- backends/midi/sndio.cpp | 152 ++++++++++++++++++++++++++++++++++++++++++++++++ backends/module.mk | 1 + base/plugins.cpp | 3 + base/version.cpp | 4 ++ configure | 30 ++++++++++ 5 files changed, 190 insertions(+) create mode 100644 backends/midi/sndio.cpp diff --git a/backends/midi/sndio.cpp b/backends/midi/sndio.cpp new file mode 100644 index 0000000000..21c9ea4fec --- /dev/null +++ b/backends/midi/sndio.cpp @@ -0,0 +1,152 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + +#include "common/scummsys.h" + +#if defined(USE_SNDIO) + +#include "common/error.h" +#include "common/textconsole.h" +#include "common/util.h" +#include "audio/musicplugin.h" +#include "audio/mpu401.h" + +#include + +//////////////////////////////////////// +// +// sndio MIDI driver +// +//////////////////////////////////////// + +class MidiDriver_Sndio : public MidiDriver_MPU401 { +public: + MidiDriver_Sndio(); + int open(); + bool isOpen() const { return hdl != NULL; } + void close(); + void send(uint32 b); + void sysEx(const byte *msg, uint16 length); + +private: + struct mio_hdl *hdl; +}; + +MidiDriver_Sndio::MidiDriver_Sndio() { + hdl = NULL; +} + +int MidiDriver_Sndio::open() { + if (hdl != NULL) + return MERR_ALREADY_OPEN; + + hdl = ::mio_open(NULL, MIO_OUT, 0); + if (hdl == NULL) + warning("Could open MIDI port (no music)"); + return 0; +} + +void MidiDriver_Sndio::close() { + MidiDriver_MPU401::close(); + if (!hdl) + return; + mio_close(hdl); + hdl = NULL; +} + +void MidiDriver_Sndio::send(uint32 b) { + unsigned char buf[4]; + unsigned int len; + + if (!hdl) + return; + buf[0] = b & 0xff; + buf[1] = (b >> 8) & 0xff; + buf[2] = (b >> 16) & 0xff; + buf[3] = (b >> 24) & 0xff; + switch (buf[0] & 0xf0) { + case 0xf0: + return; + case 0xc0: + case 0xd0: + len = 2; + break; + default: + len = 3; + } + mio_write(hdl, buf, len); +} + +void MidiDriver_Sndio::sysEx(const byte *msg, uint16 length) { + if (!hdl) + return; + + unsigned char buf[266]; + + assert(length + 2 <= ARRAYSIZE(buf)); + + // Add SysEx frame + buf[0] = 0xF0; + memcpy(buf + 1, msg, length); + buf[length + 1] = 0xF7; + + mio_write(hdl, buf, length + 2); +} + + +// Plugin interface + +class SndioMusicPlugin : public MusicPluginObject { +public: + const char *getName() const { + return "Sndio"; + } + + const char *getId() const { + return "sndio"; + } + + MusicDevices getDevices() const; + Common::Error createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle = 0) const; +}; + +MusicDevices SndioMusicPlugin::getDevices() const { + MusicDevices devices; + devices.push_back(MusicDevice(this, "", MT_GM)); + return devices; +} + +Common::Error SndioMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const { + *mididriver = new MidiDriver_Sndio(); + + return Common::kNoError; +} + +//#if PLUGIN_ENABLED_DYNAMIC(Sndio) + //REGISTER_PLUGIN_DYNAMIC(SNDIO, PLUGIN_TYPE_MUSIC, SndioMusicPlugin); +//#else + REGISTER_PLUGIN_STATIC(SNDIO, PLUGIN_TYPE_MUSIC, SndioMusicPlugin); +//#endif + +#endif diff --git a/backends/module.mk b/backends/module.mk index 95725d9d87..a4f525d21d 100644 --- a/backends/module.mk +++ b/backends/module.mk @@ -11,6 +11,7 @@ MODULE_OBJS := \ midi/alsa.o \ midi/dmedia.o \ midi/seq.o \ + midi/sndio.o \ midi/stmidi.o \ midi/timidity.o \ saves/savefile.o \ diff --git a/base/plugins.cpp b/base/plugins.cpp index c19b60782d..b8cd097683 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -101,6 +101,9 @@ public: #if defined(USE_SEQ_MIDI) LINK_PLUGIN(SEQ) #endif + #if defined(USE_SNDIO) + LINK_PLUGIN(SNDIO) + #endif #if defined(__MINT__) LINK_PLUGIN(STMIDI) #endif diff --git a/base/version.cpp b/base/version.cpp index 7943552418..89fae90c2e 100644 --- a/base/version.cpp +++ b/base/version.cpp @@ -94,6 +94,10 @@ const char *gScummVMFeatures = "" "SEQ " #endif +#ifdef USE_SNDIO + "sndio " +#endif + #ifdef USE_TIMIDITY "TiMidity " #endif diff --git a/configure b/configure index 88dc161595..d310148f06 100755 --- a/configure +++ b/configure @@ -93,6 +93,7 @@ _flac=auto _mad=auto _alsa=auto _seq_midi=auto +_sndio=auto _timidity=auto _zlib=auto _sparkle=auto @@ -852,6 +853,9 @@ Optional Libraries: --with-libunity-prefix=DIR Prefix where libunity is installed (optional) --disable-libunity disable Unity launcher integration [autodetect] + --with-sndio-prefix=DIR Prefix where sndio is installed (optional) + --disable-sndio disable sndio MIDI driver [autodetect] + Some influential environment variables: LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory @@ -877,6 +881,8 @@ for ac_option in $@; do --disable-alsa) _alsa=no ;; --enable-seq-midi) _seq_midi=yes ;; --disable-seq-midi) _seq_midi=no ;; + --enable-sndio) _sndio=yes ;; + --disable-sndio) _sndio=no ;; --enable-timidity) _timidity=yes ;; --disable-timidity) _timidity=no ;; --enable-vorbis) _vorbis=yes ;; @@ -937,6 +943,11 @@ for ac_option in $@; do ALSA_CFLAGS="-I$arg/include" ALSA_LIBS="-L$arg/lib" ;; + --with-sndio-prefix=*) + arg=`echo $ac_option | cut -d '=' -f 2` + SNDIO_CFLAGS="-I$arg/include" + SNDIO_LIBS="-L$arg/lib" + ;; --with-ogg-prefix=*) arg=`echo $ac_option | cut -d '=' -f 2` OGG_CFLAGS="-I$arg/include" @@ -3257,6 +3268,25 @@ fi define_in_config_h_if_yes "$_seq_midi" 'USE_SEQ_MIDI' echo "$_seq_midi" +# +# Check for sndio +# +echocheck "sndio" +if test "$_sndio" = auto ; then + _sndio=no + cat > $TMPC << EOF +#include +int main(void) { struct sio_par par; sio_initpar(&par); return 0; } +EOF + cc_check $SNDIO_CFLAGS $SNDIO_LIBS -lsndio && _sndio=yes +fi +if test "$_sndio" = yes ; then + LIBS="$LIBS $SNDIO_LIBS -lsndio" + INCLUDES="$INCLUDES $SNDIO_CFLAGS" +fi +define_in_config_h_if_yes "$_sndio" 'USE_SNDIO' +echo "$_sndio" + # # Check for TiMidity(++) # -- cgit v1.2.3 From c6810c174e06aa85fc58808f916c6e9cd1d989ea Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 11 May 2012 23:08:27 +1000 Subject: COMMON: Moved the Tinsel Coroutine code into it's own Common class --- common/coroutines.cpp | 881 +++++++++++++++++++++++++++++++++++++++++++++ common/coroutines.h | 398 ++++++++++++++++++++ common/module.mk | 1 + engines/tinsel/coroutine.h | 282 --------------- 4 files changed, 1280 insertions(+), 282 deletions(-) create mode 100644 common/coroutines.cpp create mode 100644 common/coroutines.h delete mode 100644 engines/tinsel/coroutine.h diff --git a/common/coroutines.cpp b/common/coroutines.cpp new file mode 100644 index 0000000000..fff6198c22 --- /dev/null +++ b/common/coroutines.cpp @@ -0,0 +1,881 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "common/coroutines.h" +#include "common/textconsole.h" +#include "common/system.h" + +namespace Common { + +/** Helper null context instance */ +CoroContext nullContext = NULL; + +DECLARE_SINGLETON(CoroutineScheduler); + + +#if COROUTINE_DEBUG +namespace { +static int s_coroCount = 0; + +typedef Common::HashMap CoroHashMap; +static CoroHashMap *s_coroFuncs = 0; + +static void changeCoroStats(const char *func, int change) { + if (!s_coroFuncs) + s_coroFuncs = new CoroHashMap(); + + (*s_coroFuncs)[func] += change; +} + +static void displayCoroStats() { + debug("%d active coros", s_coroCount); + + // Loop over s_coroFuncs and print info about active coros + if (!s_coroFuncs) + return; + for (CoroHashMap::const_iterator it = s_coroFuncs->begin(); + it != s_coroFuncs->end(); ++it) { + if (it->_value != 0) + debug(" %3d x %s", it->_value, it->_key.c_str()); + } +} + +} +#endif + +CoroBaseContext::CoroBaseContext(const char *func) + : _line(0), _sleep(0), _subctx(0) { +#if COROUTINE_DEBUG + _funcName = func; + changeCoroStats(_funcName, +1); + s_coroCount++; +#endif +} + +CoroBaseContext::~CoroBaseContext() { +#if COROUTINE_DEBUG + s_coroCount--; + changeCoroStats(_funcName, -1); + debug("Deleting coro in %s at %p (subctx %p)", + _funcName, (void *)this, (void *)_subctx); + displayCoroStats(); +#endif + delete _subctx; +} + +//--------------------- Scheduler Class ------------------------ + +/** + * Constructor + */ +CoroutineScheduler::CoroutineScheduler() { + processList = NULL; + pFreeProcesses = NULL; + pCurrent = NULL; + +#ifdef DEBUG + // diagnostic process counters + numProcs = 0; + maxProcs = 0; +#endif + + pRCfunction = NULL; + pidCounter = 0; + + active = new PROCESS; + active->pPrevious = NULL; + active->pNext = NULL; + + reset(); +} + +/** + * Destructor + */ +CoroutineScheduler::~CoroutineScheduler() { + // Kill all running processes (i.e. free memory allocated for their state). + PROCESS *pProc = active->pNext; + while (pProc != NULL) { + delete pProc->state; + pProc->state = 0; + pProc = pProc->pNext; + } + + free(processList); + processList = NULL; + + delete active; + active = 0; + + // Clear the event list + Common::List::iterator i; + for (i = _events.begin(); i != _events.end(); ++i) + delete (*i); +} + +/** + * Kills all processes and places them on the free list. + */ +void CoroutineScheduler::reset() { + +#ifdef DEBUG + // clear number of process in use + numProcs = 0; +#endif + + if (processList == NULL) { + // first time - allocate memory for process list + processList = (PROCESS *)calloc(CORO_MAX_PROCESSES, sizeof(PROCESS)); + + // make sure memory allocated + if (processList == NULL) { + error("Cannot allocate memory for process data"); + } + + // fill with garbage + memset(processList, 'S', CORO_MAX_PROCESSES * sizeof(PROCESS)); + } + + // Kill all running processes (i.e. free memory allocated for their state). + PROCESS *pProc = active->pNext; + while (pProc != NULL) { + delete pProc->state; + pProc->state = 0; + pProc->waiting = false; + pProc = pProc->pNext; + } + + // no active processes + pCurrent = active->pNext = NULL; + + // place first process on free list + pFreeProcesses = processList; + + // link all other processes after first + for (int i = 1; i <= CORO_NUM_PROCESS; i++) { + processList[i - 1].pNext = (i == CORO_NUM_PROCESS) ? NULL : processList + i; + processList[i - 1].pPrevious = (i == 1) ? active : processList + (i - 2); + } +} + + +#ifdef DEBUG +/** + * Shows the maximum number of process used at once. + */ +void CoroutineScheduler::printStats() { + debug("%i process of %i used", maxProcs, CORO_NUM_PROCESS); +} +#endif + +#ifdef DEBUG +/** + * Checks both the active and free process list to insure all the links are valid, + * and that no processes have been lost + */ +void CoroutineScheduler::CheckStack() { + Common::List pList; + + // Check both the active and free process lists + for (int i = 0; i < 2; ++i) { + PROCESS *p = (i == 0) ? active : pFreeProcesses; + + if (p != NULL) { + // Make sure the linkages are correct + while (p->pNext != NULL) { + assert(p->pNext->pPrevious == p); + pList.push_back(p); + p = p->pNext; + } + pList.push_back(p); + } + } + + // Make sure all processes are accounted for + for (int idx = 0; idx < CORO_NUM_PROCESS; idx++) { + bool found = false; + for (Common::List::iterator i = pList.begin(); i != pList.end(); ++i) { + PROCESS *pTemp = *i; + if (*i == &processList[idx]) { + found = true; + break; + } + } + + assert(found); + } +} +#endif + +/** + * Give all active processes a chance to run + */ +void CoroutineScheduler::schedule() { + // start dispatching active process list + PROCESS *pNext; + PROCESS *pProc = active->pNext; + while (pProc != NULL) { + pNext = pProc->pNext; + + if (--pProc->sleepTime <= 0) { + // process is ready for dispatch, activate it + pCurrent = pProc; + pProc->coroAddr(pProc->state, pProc->param); + + if (!pProc->state || pProc->state->_sleep <= 0) { + // Coroutine finished + pCurrent = pCurrent->pPrevious; + killProcess(pProc); + } else { + pProc->sleepTime = pProc->state->_sleep; + } + + // pCurrent may have been changed + pNext = pCurrent->pNext; + pCurrent = NULL; + } + + pProc = pNext; + } +} + +/** + * Reschedules all the processes to run again this query + */ +void CoroutineScheduler::rescheduleAll() { + assert(pCurrent); + + // Unlink current process + pCurrent->pPrevious->pNext = pCurrent->pNext; + if (pCurrent->pNext) + pCurrent->pNext->pPrevious = pCurrent->pPrevious; + + // Add process to the start of the active list + pCurrent->pNext = active->pNext; + active->pNext->pPrevious = pCurrent; + active->pNext = pCurrent; + pCurrent->pPrevious = active; +} + +/** + * If the specified process has already run on this tick, make it run + * again on the current tick. + */ +void CoroutineScheduler::reschedule(PPROCESS pReSchedProc) { + // If not currently processing the schedule list, then no action is needed + if (!pCurrent) + return; + + if (!pReSchedProc) + pReSchedProc = pCurrent; + + PPROCESS pEnd; + + // Find the last process in the list. + // But if the target process is down the list from here, do nothing + for (pEnd = pCurrent; pEnd->pNext != NULL; pEnd = pEnd->pNext) { + if (pEnd->pNext == pReSchedProc) + return; + } + + assert(pEnd->pNext == NULL); + + // Could be in the middle of a KillProc()! + // Dying process was last and this process was penultimate + if (pReSchedProc->pNext == NULL) + return; + + // If we're moving the current process, move it back by one, so that the next + // schedule() iteration moves to the now next one + if (pCurrent == pReSchedProc) + pCurrent = pCurrent->pPrevious; + + // Unlink the process, and add it at the end + pReSchedProc->pPrevious->pNext = pReSchedProc->pNext; + pReSchedProc->pNext->pPrevious = pReSchedProc->pPrevious; + pEnd->pNext = pReSchedProc; + pReSchedProc->pPrevious = pEnd; + pReSchedProc->pNext = NULL; +} + +/** + * Moves the specified process to the end of the dispatch queue + * allowing it to run again within the current game cycle. + * @param pGiveProc Which process + */ +void CoroutineScheduler::giveWay(PPROCESS pReSchedProc) { + // If not currently processing the schedule list, then no action is needed + if (!pCurrent) + return; + + if (!pReSchedProc) + pReSchedProc = pCurrent; + + // If the process is already at the end of the queue, nothing has to be done + if (!pReSchedProc->pNext) + return; + + PPROCESS pEnd; + + // Find the last process in the list. + for (pEnd = pCurrent; pEnd->pNext != NULL; pEnd = pEnd->pNext) + ; + assert(pEnd->pNext == NULL); + + + // If we're moving the current process, move it back by one, so that the next + // schedule() iteration moves to the now next one + if (pCurrent == pReSchedProc) + pCurrent = pCurrent->pPrevious; + + // Unlink the process, and add it at the end + pReSchedProc->pPrevious->pNext = pReSchedProc->pNext; + pReSchedProc->pNext->pPrevious = pReSchedProc->pPrevious; + pEnd->pNext = pReSchedProc; + pReSchedProc->pPrevious = pEnd; + pReSchedProc->pNext = NULL; +} + +/** + * Continously makes a given process wait for another process to finish or event to signal. + * + * @param pid Process/Event identifier + * @param duration Duration in milliseconds + * @param expired If specified, set to true if delay period expired + */ +void CoroutineScheduler::waitForSingleObject(CORO_PARAM, int pid, uint32 duration, bool *expired) { + if (!pCurrent) + error("Called CoroutineScheduler::waitForSingleObject from the main process"); + + CORO_BEGIN_CONTEXT; + uint32 endTime; + PROCESS *pProcess; + EVENT *pEvent; + CORO_END_CONTEXT(_ctx); + + CORO_BEGIN_CODE(_ctx); + + // Signal as waiting + pCurrent->waiting = true; + + _ctx->endTime = (duration == CORO_INFINITE) ? CORO_INFINITE : g_system->getMillis() + duration; + if (expired) + // Presume it will expire + *expired = true; + + // Outer loop for doing checks until expiry + while (g_system->getMillis() < _ctx->endTime) { + // Check to see if a process or event with the given Id exists + _ctx->pProcess = getProcess(pid); + _ctx->pEvent = !_ctx->pProcess ? getEvent(pid) : NULL; + + // If there's no active process or event, presume it's a process that's finished, + // so the waiting can immediately exit + if ((_ctx->pProcess == NULL) && (_ctx->pEvent == NULL)) { + if (expired) + *expired = false; + break; + } + + // If a process was found, don't go into the if statement, and keep waiting. + // Likewise if it's an event that's not yet signalled + if ((_ctx->pEvent != NULL) && _ctx->pEvent->signalled) { + // Unless the event is flagged for manual reset, reset it now + if (!_ctx->pEvent->manualReset) + _ctx->pEvent->signalled = false; + + if (expired) + *expired = false; + break; + } + + // Sleep until the next cycle + CORO_SLEEP(1); + } + + // Signal waiting is done + pCurrent->waiting = false; + + CORO_END_CODE; +} + +/** + * Continously makes a given process wait for given prcesses to finished or events to be set + * + * @param nCount Number of Id's being passed + * @param evtList List of pids to wait for + * @param bWaitAll Specifies whether all or any of the processes/events + * @param duration Duration in milliseconds + * @param expired Set to true if delay period expired + */ +void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 *pidList, bool bWaitAll, + uint32 duration, bool *expired) { + if (!pCurrent) + error("Called CoroutineScheduler::waitForMultipleEvents from the main process"); + + CORO_BEGIN_CONTEXT; + uint32 endTime; + bool signalled; + bool pidSignalled; + int i; + PROCESS *pProcess; + EVENT *pEvent; + CORO_END_CONTEXT(_ctx); + + CORO_BEGIN_CODE(_ctx); + + // Signal as waiting + pCurrent->waiting = true; + + _ctx->endTime = (duration == CORO_INFINITE) ? CORO_INFINITE : g_system->getMillis() + duration; + if (expired) + // Presume that delay will expire + *expired = true; + + // Outer loop for doing checks until expiry + while (g_system->getMillis() < _ctx->endTime) { + _ctx->signalled = bWaitAll; + + for (_ctx->i = 0; _ctx->i < nCount; ++_ctx->i) { + _ctx->pProcess = getProcess(pidList[_ctx->i]); + _ctx->pEvent = !_ctx->pProcess ? getEvent(pidList[_ctx->i]) : NULL; + + // Determine the signalled state + _ctx->pidSignalled = (_ctx->pProcess) || !_ctx->pEvent ? false : _ctx->pEvent->signalled; + + if (bWaitAll && _ctx->pidSignalled) + _ctx->signalled = false; + else if (!bWaitAll & _ctx->pidSignalled) + _ctx->signalled = true; + } + + // At this point, if the signalled variable is set, waiting is finished + if (_ctx->signalled) { + // Automatically reset any events not flagged for manual reset + for (_ctx->i = 0; _ctx->i < nCount; ++_ctx->i) { + _ctx->pEvent = getEvent(pidList[_ctx->i]); + + if (_ctx->pEvent->manualReset) + _ctx->pEvent->signalled = false; + } + + if (expired) + *expired = false; + break; + } + + // Sleep until the next cycle + CORO_SLEEP(1); + } + + // Signal waiting is done + pCurrent->waiting = false; + + CORO_END_CODE; +} + +/** + * Make the active process sleep for the given duration in milliseconds + * @param duration Duration in milliseconds + * @remarks This duration won't be precise, since it relies on the frequency the + * scheduler is called. + */ +void CoroutineScheduler::sleep(CORO_PARAM, uint32 duration) { + if (!pCurrent) + error("Called CoroutineScheduler::waitForSingleObject from the main process"); + + CORO_BEGIN_CONTEXT; + uint32 endTime; + PROCESS *pProcess; + EVENT *pEvent; + CORO_END_CONTEXT(_ctx); + + CORO_BEGIN_CODE(_ctx); + + // Signal as waiting + pCurrent->waiting = true; + + _ctx->endTime = g_system->getMillis() + duration; + + // Outer loop for doing checks until expiry + while (g_system->getMillis() < _ctx->endTime) { + // Sleep until the next cycle + CORO_SLEEP(1); + } + + // Signal waiting is done + pCurrent->waiting = false; + + CORO_END_CODE; +} + +/** + * Creates a new process. + * + * @param pid process identifier + * @param CORO_ADDR coroutine start address + * @param pParam process specific info + * @param sizeParam size of process specific info + */ +PROCESS *CoroutineScheduler::createProcess(uint32 pid, CORO_ADDR coroAddr, const void *pParam, int sizeParam) { + PROCESS *pProc; + + // get a free process + pProc = pFreeProcesses; + + // trap no free process + assert(pProc != NULL); // Out of processes + +#ifdef DEBUG + // one more process in use + if (++numProcs > maxProcs) + maxProcs = numProcs; +#endif + + // get link to next free process + pFreeProcesses = pProc->pNext; + if (pFreeProcesses) + pFreeProcesses->pPrevious = NULL; + + if (pCurrent != NULL) { + // place new process before the next active process + pProc->pNext = pCurrent->pNext; + if (pProc->pNext) + pProc->pNext->pPrevious = pProc; + + // make this new process the next active process + pCurrent->pNext = pProc; + pProc->pPrevious = pCurrent; + + } else { // no active processes, place process at head of list + pProc->pNext = active->pNext; + pProc->pPrevious = active; + + if (pProc->pNext) + pProc->pNext->pPrevious = pProc; + active->pNext = pProc; + + } + + // set coroutine entry point + pProc->coroAddr = coroAddr; + + // clear coroutine state + pProc->state = 0; + + // wake process up as soon as possible + pProc->sleepTime = 1; + + // set new process id + pProc->pid = pid; + + // set new process specific info + if (sizeParam) { + assert(sizeParam > 0 && sizeParam <= CORO_PARAM_SIZE); + + // set new process specific info + memcpy(pProc->param, pParam, sizeParam); + } + + // return created process + return pProc; +} + +/** + * Creates a new process with an auto-incrementing Process Id. + * + * @param CORO_ADDR coroutine start address + * @param pParam process specific info + * @param sizeParam size of process specific info + */ +uint32 CoroutineScheduler::createProcess(CORO_ADDR coroAddr, const void *pParam, int sizeParam) { + PROCESS *pProc = createProcess(++pidCounter, coroAddr, pParam, sizeParam); + return pProc->pid; +} + +/** + * Creates a new process with an auto-incrementing Process Id, and a single pointer parameter. + * + * @param CORO_ADDR coroutine start address + * @param pParam process specific info + * @param sizeParam size of process specific info + */ +uint32 CoroutineScheduler::createProcess(CORO_ADDR coroAddr, const void *pParam) { + return createProcess(coroAddr, &pParam, sizeof(void *)); +} + + +/** + * Kills the specified process. + * + * @param pKillProc which process to kill + */ +void CoroutineScheduler::killProcess(PROCESS *pKillProc) { + // make sure a valid process pointer + assert(pKillProc >= processList && pKillProc <= processList + CORO_NUM_PROCESS - 1); + + // can not kill the current process using killProcess ! + assert(pCurrent != pKillProc); + +#ifdef DEBUG + // one less process in use + --numProcs; + assert(numProcs >= 0); +#endif + + // Free process' resources + if (pRCfunction != NULL) + (pRCfunction)(pKillProc); + + delete pKillProc->state; + pKillProc->state = 0; + + // Take the process out of the active chain list + pKillProc->pPrevious->pNext = pKillProc->pNext; + if (pKillProc->pNext) + pKillProc->pNext->pPrevious = pKillProc->pPrevious; + + // link first free process after pProc + pKillProc->pNext = pFreeProcesses; + if (pFreeProcesses) + pKillProc->pNext->pPrevious = pKillProc; + pKillProc->pPrevious = NULL; + + // make pKillProc the first free process + pFreeProcesses = pKillProc; +} + + + +/** + * Returns a pointer to the currently running process. + */ +PROCESS *CoroutineScheduler::getCurrentProcess() { + return pCurrent; +} + +/** + * Returns the process identifier of the specified process. + * + * @param pProc which process + */ +int CoroutineScheduler::getCurrentPID() const { + PROCESS *pProc = pCurrent; + + // make sure a valid process pointer + assert(pProc >= processList && pProc <= processList + CORO_NUM_PROCESS - 1); + + // return processes PID + return pProc->pid; +} + +/** + * Kills any process matching the specified PID. The current + * process cannot be killed. + * + * @param pidKill process identifier of process to kill + * @param pidMask mask to apply to process identifiers before comparison + * @return The number of processes killed is returned. + */ +int CoroutineScheduler::killMatchingProcess(uint32 pidKill, int pidMask) { + int numKilled = 0; + PROCESS *pProc, *pPrev; // process list pointers + + for (pProc = active->pNext, pPrev = active; pProc != NULL; pPrev = pProc, pProc = pProc->pNext) { + if ((pProc->pid & (uint32)pidMask) == pidKill) { + // found a matching process + + // dont kill the current process + if (pProc != pCurrent) { + // kill this process + numKilled++; + + // Free the process' resources + if (pRCfunction != NULL) + (pRCfunction)(pProc); + + delete pProc->state; + pProc->state = 0; + + // make prev point to next to unlink pProc + pPrev->pNext = pProc->pNext; + if (pProc->pNext) + pPrev->pNext->pPrevious = pPrev; + + // link first free process after pProc + pProc->pNext = pFreeProcesses; + pProc->pPrevious = NULL; + pFreeProcesses->pPrevious = pProc; + + // make pProc the first free process + pFreeProcesses = pProc; + + // set to a process on the active list + pProc = pPrev; + } + } + } + +#ifdef DEBUG + // adjust process in use + numProcs -= numKilled; + assert(numProcs >= 0); +#endif + + // return number of processes killed + return numKilled; +} + +/** + * Set pointer to a function to be called by killProcess(). + * + * May be called by a resource allocator, the function supplied is + * called by killProcess() to allow the resource allocator to free + * resources allocated to the dying process. + * + * @param pFunc Function to be called by killProcess() + */ +void CoroutineScheduler::setResourceCallback(VFPTRPP pFunc) { + pRCfunction = pFunc; +} + +PROCESS *CoroutineScheduler::getProcess(uint32 pid) { + PROCESS *pProc = active->pNext; + while ((pProc != NULL) && (pProc->pid != pid)) + pProc = pProc->pNext; + + return pProc; +} + +EVENT *CoroutineScheduler::getEvent(uint32 pid) { + Common::List::iterator i; + for (i = _events.begin(); i != _events.end(); ++i) { + EVENT *evt = *i; + if (evt->pid == pid) + return evt; + } + + return NULL; +} + + +/** + * Creates a new event object + * @param bManualReset Events needs to be manually reset. Otherwise, events + * will be automatically reset after a process waits on the event finishes + * @param bInitialState Specifies whether the event is signalled or not initially + */ +uint32 CoroutineScheduler::createEvent(bool bManualReset, bool bInitialState) { + EVENT *evt = new EVENT(); + evt->pid = ++pidCounter; + evt->manualReset = bManualReset; + evt->signalled = bInitialState; + + _events.push_back(evt); + return evt->pid; +} + +/** + * Destroys the given event + * @param pidEvent Event PID + */ +void CoroutineScheduler::closeEvent(uint32 pidEvent) { + EVENT *evt = getEvent(pidEvent); + if (evt) { + _events.remove(evt); + delete evt; + } +} + +/** + * Sets the event + * @param pidEvent Event PID + */ +void CoroutineScheduler::setEvent(uint32 pidEvent) { + EVENT *evt = getEvent(pidEvent); + if (evt) + evt->signalled = true; +} + +/** + * Resets the event + * @param pidEvent Event PID + */ +void CoroutineScheduler::resetEvent(uint32 pidEvent) { + EVENT *evt = getEvent(pidEvent); + if (evt) + evt->signalled = false; +} + +/** + * Temporarily sets a given event to true, and then runs all waiting processes, allowing any + * processes waiting on the event to be fired. It then immediately resets the event again. + * @param pidEvent Event PID + * + * @remarks Should not be run inside of another process + */ +void CoroutineScheduler::pulseEvent(uint32 pidEvent) { + EVENT *evt = getEvent(pidEvent); + if (!evt) + return; + + // Set the event as true + evt->signalled = true; + + // start dispatching active process list for any processes that are currently waiting + PROCESS *pOriginal = pCurrent; + PROCESS *pNext; + PROCESS *pProc = active->pNext; + while (pProc != NULL) { + pNext = pProc->pNext; + + // Only call processes that are currently waiting (either in waitForSingleObject or + // waitForMultipleObjects). If one is found, execute it immediately + if (pProc->waiting) { + // Dispatch the process + pCurrent = pProc; + pProc->coroAddr(pProc->state, pProc->param); + + if (!pProc->state || pProc->state->_sleep <= 0) { + // Coroutine finished + pCurrent = pCurrent->pPrevious; + killProcess(pProc); + } else { + pProc->sleepTime = pProc->state->_sleep; + } + + // pCurrent may have been changed + pNext = pCurrent->pNext; + pCurrent = NULL; + } + + pProc = pNext; + } + + // Restore the original current process (if one was active) + pCurrent = pOriginal; + + // Reset the event back to non-signalled + evt->signalled = false; +} + + +} // end of namespace Common diff --git a/common/coroutines.h b/common/coroutines.h new file mode 100644 index 0000000000..3303028e1c --- /dev/null +++ b/common/coroutines.h @@ -0,0 +1,398 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef COMMON_COROUTINES_H +#define COMMON_COROUTINES_H + +#include "common/scummsys.h" +#include "common/util.h" // for SCUMMVM_CURRENT_FUNCTION +#include "common/list.h" +#include "common/singleton.h" + +namespace Common { + +/** + * @defgroup Coroutine support for simulating multi-threading. + * + * The following is loosely based on an article by Simon Tatham: + * . + * However, many improvements and tweaks have been made, in particular + * by taking advantage of C++ features not available in C. + */ +//@{ + +#define CoroScheduler (Common::CoroutineScheduler::instance()) + + +// Enable this macro to enable some debugging support in the coroutine code. +//#define COROUTINE_DEBUG 1 + +/** + * The core of any coroutine context which captures the 'state' of a coroutine. + * Private use only. + */ +struct CoroBaseContext { + int _line; + int _sleep; + CoroBaseContext *_subctx; +#if COROUTINE_DEBUG + const char *_funcName; +#endif + CoroBaseContext(const char *func); + ~CoroBaseContext(); +}; + +typedef CoroBaseContext *CoroContext; + + +/** This is a special constant that can be temporarily used as a parameter to call coroutine-ised + * from methods from methods that haven't yet been converted to being a coroutine, so code at least + * compiles correctly. Be aware, though, that if you use this, you will get runtime errors. + */ +extern CoroContext nullContext; + +/** + * Wrapper class which holds a pointer to a pointer to a CoroBaseContext. + * The interesting part is the destructor, which kills the context being held, + * but ONLY if the _sleep val of that context is zero. This way, a coroutine + * can just 'return' w/o having to worry about freeing the allocated context + * (in Simon Tatham's original code, one had to use a special macro to + * return from a coroutine). + */ +class CoroContextHolder { + CoroContext &_ctx; +public: + CoroContextHolder(CoroContext &ctx) : _ctx(ctx) { + assert(ctx); + assert(ctx->_sleep >= 0); + ctx->_sleep = 0; + } + ~CoroContextHolder() { + if (_ctx && _ctx->_sleep == 0) { + delete _ctx; + _ctx = 0; + } + } +}; + +/** Methods that have been converted to being a coroutine should have this as the first parameter */ +#define CORO_PARAM Common::CoroContext &coroParam + + +/** + * Begin the declaration of a coroutine context. + * This allows declaring variables which are 'persistent' during the + * lifetime of the coroutine. An example use would be: + * + * CORO_BEGIN_CONTEXT; + * int var; + * char *foo; + * CORO_END_CONTEXT(_ctx); + * + * It is not possible to initialize variables here, due to the way this + * macro is implemented. Furthermore, to use the variables declared in + * the coroutine context, you have to access them via the context variable + * name that was specified as parameter to CORO_END_CONTEXT, e.g. + * _ctx->var = 0; + * + * @see CORO_END_CONTEXT + * + * @note We declare a variable 'DUMMY' to allow the user to specify an 'empty' + * context, and so compilers won't complain about ";" following the macro. + */ +#define CORO_BEGIN_CONTEXT \ + struct CoroContextTag : Common::CoroBaseContext { \ + CoroContextTag() : CoroBaseContext(SCUMMVM_CURRENT_FUNCTION) {} \ + int DUMMY + +/** + * End the declaration of a coroutine context. + * @param x name of the coroutine context + * @see CORO_BEGIN_CONTEXT + */ +#define CORO_END_CONTEXT(x) } *x = (CoroContextTag *)coroParam + +/** + * Begin the code section of a coroutine. + * @param x name of the coroutine context + * @see CORO_BEGIN_CODE + */ +#define CORO_BEGIN_CODE(x) \ + if (&coroParam == &Common::nullContext) assert(!Common::nullContext);\ + if (!x) {coroParam = x = new CoroContextTag();}\ + Common::CoroContextHolder tmpHolder(coroParam);\ + switch (coroParam->_line) { case 0:; + +/** + * End the code section of a coroutine. + * @see CORO_END_CODE + */ +#define CORO_END_CODE \ + if (&coroParam == &Common::nullContext) { \ + delete Common::nullContext; \ + Common::nullContext = NULL; \ + } \ + } + +/** + * Sleep for the specified number of scheduler cycles. + */ +#define CORO_SLEEP(delay) do {\ + coroParam->_line = __LINE__;\ + coroParam->_sleep = delay;\ + assert(&coroParam != &Common::nullContext);\ + return; case __LINE__:;\ + } while (0) + +#define CORO_GIVE_WAY do { CoroScheduler.giveWay(); CORO_SLEEP(1); } while (0) +#define CORO_RESCHEDULE do { CoroScheduler.reschedule(); CORO_SLEEP(1); } while (0) + +/** + * Stop the currently running coroutine and all calling coroutines. + * + * This sets _sleep to -1 rather than 0 so that the context doesn't get + * deleted by CoroContextHolder, since we want CORO_INVOKE_ARGS to + * propogate the _sleep value and return immediately (the scheduler will + * then delete the entire coroutine's state, including all subcontexts). + */ +#define CORO_KILL_SELF() \ + do { if (&coroParam != &Common::nullContext) { coroParam->_sleep = -1; } return; } while (0) + + +/** + * This macro is to be used in conjunction with CORO_INVOKE_ARGS and + * similar macros for calling coroutines-enabled subroutines. + */ +#define CORO_SUBCTX coroParam->_subctx + +/** + * Invoke another coroutine. + * + * If the subcontext still exists after the coroutine is invoked, it has + * either yielded/slept or killed itself, and so we copy the _sleep value + * to our own context and return (execution will continue at the case + * statement below, where we loop and call the coroutine again). + * If the subcontext is null, the coroutine ended normally, and we can + * simply break out of the loop and continue execution. + * + * @param subCoro name of the coroutine-enabled function to invoke + * @param ARGS list of arguments to pass to subCoro + * + * @note ARGS must be surrounded by parentheses, and the first argument + * in this list must always be CORO_SUBCTX. For example, the + * regular function call + * myFunc(a, b); + * becomes the following: + * CORO_INVOKE_ARGS(myFunc, (CORO_SUBCTX, a, b)); + */ +#define CORO_INVOKE_ARGS(subCoro, ARGS) \ + do {\ + coroParam->_line = __LINE__;\ + coroParam->_subctx = 0;\ + do {\ + subCoro ARGS;\ + if (!coroParam->_subctx) break;\ + coroParam->_sleep = coroParam->_subctx->_sleep;\ + assert(&coroParam != &Common::nullContext);\ + return; case __LINE__:;\ + } while (1);\ + } while (0) + +/** + * Invoke another coroutine. Similar to CORO_INVOKE_ARGS, + * but allows specifying a return value which is returned + * if invoked coroutine yields (thus causing the current + * coroutine to yield, too). + */ +#define CORO_INVOKE_ARGS_V(subCoro, RESULT, ARGS) \ + do {\ + coroParam->_line = __LINE__;\ + coroParam->_subctx = 0;\ + do {\ + subCoro ARGS;\ + if (!coroParam->_subctx) break;\ + coroParam->_sleep = coroParam->_subctx->_sleep;\ + assert(&coroParam != &Common::nullContext);\ + return RESULT; case __LINE__:;\ + } while (1);\ + } while (0) + +/** + * Convenience wrapper for CORO_INVOKE_ARGS for invoking a coroutine + * with no parameters. + */ +#define CORO_INVOKE_0(subCoroutine) \ + CORO_INVOKE_ARGS(subCoroutine,(CORO_SUBCTX)) + +/** + * Convenience wrapper for CORO_INVOKE_ARGS for invoking a coroutine + * with one parameter. + */ +#define CORO_INVOKE_1(subCoroutine, a0) \ + CORO_INVOKE_ARGS(subCoroutine,(CORO_SUBCTX,a0)) + +/** + * Convenience wrapper for CORO_INVOKE_ARGS for invoking a coroutine + * with two parameters. + */ +#define CORO_INVOKE_2(subCoroutine, a0,a1) \ + CORO_INVOKE_ARGS(subCoroutine,(CORO_SUBCTX,a0,a1)) + +/** + * Convenience wrapper for CORO_INVOKE_ARGS for invoking a coroutine + * with three parameters. + */ +#define CORO_INVOKE_3(subCoroutine, a0,a1,a2) \ + CORO_INVOKE_ARGS(subCoroutine,(CORO_SUBCTX,a0,a1,a2)) + +/** + * Convenience wrapper for CORO_INVOKE_ARGS for invoking a coroutine + * with four parameters. + */ +#define CORO_INVOKE_4(subCoroutine, a0,a1,a2,a3) \ + CORO_INVOKE_ARGS(subCoroutine,(CORO_SUBCTX,a0,a1,a2,a3)) + + + +// the size of process specific info +#define CORO_PARAM_SIZE 32 + +// the maximum number of processes +#define CORO_NUM_PROCESS 100 +#define CORO_MAX_PROCESSES 100 + +#define CORO_INFINITE 0xffffffff +#define CORO_INVALID_PID_VALUE 0 + +typedef void (*CORO_ADDR)(CoroContext &, const void *); + +/** process structure */ +struct PROCESS { + PROCESS *pNext; ///< pointer to next process in active or free list + PROCESS *pPrevious; ///< pointer to previous process in active or free list + + CoroContext state; ///< the state of the coroutine + CORO_ADDR coroAddr; ///< the entry point of the coroutine + + int sleepTime; ///< number of scheduler cycles to sleep + uint32 pid; ///< process ID + bool waiting; ///< process is currently in a waiting state + char param[CORO_PARAM_SIZE]; ///< process specific info +}; +typedef PROCESS *PPROCESS; + + +/** Event structure */ +struct EVENT { + uint32 pid; + bool manualReset; + bool signalled; +}; + + +/** + * Creates and manages "processes" (really coroutines). + */ +class CoroutineScheduler: public Singleton { +public: + /** Pointer to a function of the form "void function(PPROCESS)" */ + typedef void (*VFPTRPP)(PROCESS *); + +private: + + /** list of all processes */ + PROCESS *processList; + + /** active process list - also saves scheduler state */ + PROCESS *active; + + /** pointer to free process list */ + PROCESS *pFreeProcesses; + + /** the currently active process */ + PROCESS *pCurrent; + + /** Auto-incrementing process Id */ + int pidCounter; + + /** Event list */ + Common::List _events; + +#ifdef DEBUG + // diagnostic process counters + int numProcs; + int maxProcs; + + void CheckStack(); +#endif + + /** + * Called from killProcess() to enable other resources + * a process may be allocated to be released. + */ + VFPTRPP pRCfunction; + + PROCESS *getProcess(uint32 pid); + EVENT *getEvent(uint32 pid); +public: + + CoroutineScheduler(); + ~CoroutineScheduler(); + + void reset(); + + #ifdef DEBUG + void printStats(); + #endif + + void schedule(); + void rescheduleAll(); + void reschedule(PPROCESS pReSchedProc = NULL); + void giveWay(PPROCESS pReSchedProc = NULL); + void waitForSingleObject(CORO_PARAM, int pid, uint32 duration, bool *expired = NULL); + void waitForMultipleObjects(CORO_PARAM, int nCount, uint32 *pidList, bool bWaitAll, + uint32 duration, bool *expired = NULL); + void sleep(CORO_PARAM, uint32 duration); + + PROCESS *createProcess(uint32 pid, CORO_ADDR coroAddr, const void *pParam, int sizeParam); + uint32 createProcess(CORO_ADDR coroAddr, const void *pParam, int sizeParam); + uint32 createProcess(CORO_ADDR coroAddr, const void *pParam); + void killProcess(PROCESS *pKillProc); + + PROCESS *getCurrentProcess(); + int getCurrentPID() const; + int killMatchingProcess(uint32 pidKill, int pidMask = -1); + + void setResourceCallback(VFPTRPP pFunc); + + /* Event methods */ + uint32 createEvent(bool bManualReset, bool bInitialState); + void closeEvent(uint32 pidEvent); + void setEvent(uint32 pidEvent); + void resetEvent(uint32 pidEvent); + void pulseEvent(uint32 pidEvent); +}; + +//@} + +} // end of namespace Common + +#endif // COMMON_COROUTINES_H diff --git a/common/module.mk b/common/module.mk index 7e31ddfa01..92279740e5 100644 --- a/common/module.mk +++ b/common/module.mk @@ -4,6 +4,7 @@ MODULE_OBJS := \ archive.o \ config-file.o \ config-manager.o \ + coroutines.o \ dcl.o \ debug.o \ error.o \ diff --git a/engines/tinsel/coroutine.h b/engines/tinsel/coroutine.h deleted file mode 100644 index 5bcf1149d9..0000000000 --- a/engines/tinsel/coroutine.h +++ /dev/null @@ -1,282 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#ifndef TINSEL_COROUTINE_H -#define TINSEL_COROUTINE_H - -#include "common/scummsys.h" -#include "common/util.h" // for SCUMMVM_CURRENT_FUNCTION - -namespace Tinsel { - -/** - * @defgroup TinselCoroutines Coroutine support for Tinsel - * - * The following is loosely based on an article by Simon Tatham: - * . - * However, many improvements and tweaks have been made, in particular - * by taking advantage of C++ features not available in C. - * - * Why is this code here? Well, the Tinsel engine apparently used - * setjmp/longjmp based coroutines as a core tool from the start, and - * so they are deeply ingrained into the whole code base. When we - * started to get Tinsel ready for ScummVM, we had to deal with that. - * It soon got clear that we could not simply rewrite the code to work - * without some form of coroutines. While possible in principle, it - * would have meant a major restructuring of the entire code base, a - * rather daunting task. Also, it would have very likely introduced - * tons of regressons. - * - * So instead of getting rid of the coroutines, we chose to implement - * them in an alternate way, using Simon Tatham's trick as described - * above. While the trick is dirty, the result seems to be clear enough, - * we hope; plus, it allowed us to stay relatively close to the - * original structure of the code, which made it easier to avoid - * regressions, and will be helpful in the future when comparing things - * against the original code base. - */ -//@{ - - -// Enable this macro to enable some debugging support in the coroutine code. -//#define COROUTINE_DEBUG 1 - -/** - * The core of any coroutine context which captures the 'state' of a coroutine. - * Private use only. - */ -struct CoroBaseContext { - int _line; - int _sleep; - CoroBaseContext *_subctx; -#if COROUTINE_DEBUG - const char *_funcName; -#endif - CoroBaseContext(const char *func); - ~CoroBaseContext(); -}; - -typedef CoroBaseContext *CoroContext; - - -// FIXME: Document this! -extern CoroContext nullContext; - -/** - * Wrapper class which holds a pointer to a pointer to a CoroBaseContext. - * The interesting part is the destructor, which kills the context being held, - * but ONLY if the _sleep val of that context is zero. This way, a coroutine - * can just 'return' w/o having to worry about freeing the allocated context - * (in Simon Tatham's original code, one had to use a special macro to - * return from a coroutine). - */ -class CoroContextHolder { - CoroContext &_ctx; -public: - CoroContextHolder(CoroContext &ctx) : _ctx(ctx) { - assert(ctx); - assert(ctx->_sleep >= 0); - ctx->_sleep = 0; - } - ~CoroContextHolder() { - if (_ctx && _ctx->_sleep == 0) { - delete _ctx; - _ctx = 0; - } - } -}; - - -#define CORO_PARAM CoroContext &coroParam - - -/** - * Begin the declaration of a coroutine context. - * This allows declaring variables which are 'persistent' during the - * lifetime of the coroutine. An example use would be: - * - * CORO_BEGIN_CONTEXT; - * int var; - * char *foo; - * CORO_END_CONTEXT(_ctx); - * - * It is not possible to initialize variables here, due to the way this - * macro is implemented. Furthermore, to use the variables declared in - * the coroutine context, you have to access them via the context variable - * name that was specified as parameter to CORO_END_CONTEXT, e.g. - * _ctx->var = 0; - * - * @see CORO_END_CONTEXT - * - * @note We declare a variable 'DUMMY' to allow the user to specify an 'empty' - * context, and so compilers won't complain about ";" following the macro. - */ -#define CORO_BEGIN_CONTEXT \ - struct CoroContextTag : CoroBaseContext { \ - CoroContextTag() : CoroBaseContext(SCUMMVM_CURRENT_FUNCTION) {} \ - int DUMMY - -/** - * End the declaration of a coroutine context. - * @param x name of the coroutine context - * @see CORO_BEGIN_CONTEXT - */ -#define CORO_END_CONTEXT(x) } *x = (CoroContextTag *)coroParam - -/** - * Begin the code section of a coroutine. - * @param x name of the coroutine context - * @see CORO_BEGIN_CODE - */ -#define CORO_BEGIN_CODE(x) \ - if (&coroParam == &nullContext) assert(!nullContext);\ - if (!x) {coroParam = x = new CoroContextTag();}\ - CoroContextHolder tmpHolder(coroParam);\ - switch (coroParam->_line) { case 0:; - -/** - * End the code section of a coroutine. - * @see CORO_END_CODE - */ -#define CORO_END_CODE \ - if (&coroParam == &nullContext) { \ - delete nullContext; \ - nullContext = NULL; \ - } \ - } - -/** - * Sleep for the specified number of scheduler cycles. - */ -#define CORO_SLEEP(delay) do {\ - coroParam->_line = __LINE__;\ - coroParam->_sleep = delay;\ - assert(&coroParam != &nullContext);\ - return; case __LINE__:;\ - } while (0) - -#define CORO_GIVE_WAY do { g_scheduler->giveWay(); CORO_SLEEP(1); } while (0) -#define CORO_RESCHEDULE do { g_scheduler->reschedule(); CORO_SLEEP(1); } while (0) - -/** - * Stop the currently running coroutine and all calling coroutines. - * - * This sets _sleep to -1 rather than 0 so that the context doesn't get - * deleted by CoroContextHolder, since we want CORO_INVOKE_ARGS to - * propogate the _sleep value and return immediately (the scheduler will - * then delete the entire coroutine's state, including all subcontexts). - */ -#define CORO_KILL_SELF() \ - do { if (&coroParam != &nullContext) { coroParam->_sleep = -1; } return; } while (0) - - -/** - * This macro is to be used in conjunction with CORO_INVOKE_ARGS and - * similar macros for calling coroutines-enabled subroutines. - */ -#define CORO_SUBCTX coroParam->_subctx - -/** - * Invoke another coroutine. - * - * If the subcontext still exists after the coroutine is invoked, it has - * either yielded/slept or killed itself, and so we copy the _sleep value - * to our own context and return (execution will continue at the case - * statement below, where we loop and call the coroutine again). - * If the subcontext is null, the coroutine ended normally, and we can - * simply break out of the loop and continue execution. - * - * @param subCoro name of the coroutine-enabled function to invoke - * @param ARGS list of arguments to pass to subCoro - * - * @note ARGS must be surrounded by parentheses, and the first argument - * in this list must always be CORO_SUBCTX. For example, the - * regular function call - * myFunc(a, b); - * becomes the following: - * CORO_INVOKE_ARGS(myFunc, (CORO_SUBCTX, a, b)); - */ -#define CORO_INVOKE_ARGS(subCoro, ARGS) \ - do {\ - coroParam->_line = __LINE__;\ - coroParam->_subctx = 0;\ - do {\ - subCoro ARGS;\ - if (!coroParam->_subctx) break;\ - coroParam->_sleep = coroParam->_subctx->_sleep;\ - assert(&coroParam != &nullContext);\ - return; case __LINE__:;\ - } while (1);\ - } while (0) - -/** - * Invoke another coroutine. Similar to CORO_INVOKE_ARGS, - * but allows specifying a return value which is returned - * if invoked coroutine yields (thus causing the current - * coroutine to yield, too). - */ -#define CORO_INVOKE_ARGS_V(subCoro, RESULT, ARGS) \ - do {\ - coroParam->_line = __LINE__;\ - coroParam->_subctx = 0;\ - do {\ - subCoro ARGS;\ - if (!coroParam->_subctx) break;\ - coroParam->_sleep = coroParam->_subctx->_sleep;\ - assert(&coroParam != &nullContext);\ - return RESULT; case __LINE__:;\ - } while (1);\ - } while (0) - -/** - * Convenience wrapper for CORO_INVOKE_ARGS for invoking a coroutine - * with no parameters. - */ -#define CORO_INVOKE_0(subCoroutine) \ - CORO_INVOKE_ARGS(subCoroutine,(CORO_SUBCTX)) - -/** - * Convenience wrapper for CORO_INVOKE_ARGS for invoking a coroutine - * with one parameter. - */ -#define CORO_INVOKE_1(subCoroutine, a0) \ - CORO_INVOKE_ARGS(subCoroutine,(CORO_SUBCTX,a0)) - -/** - * Convenience wrapper for CORO_INVOKE_ARGS for invoking a coroutine - * with two parameters. - */ -#define CORO_INVOKE_2(subCoroutine, a0,a1) \ - CORO_INVOKE_ARGS(subCoroutine,(CORO_SUBCTX,a0,a1)) - -/** - * Convenience wrapper for CORO_INVOKE_ARGS for invoking a coroutine - * with three parameters. - */ -#define CORO_INVOKE_3(subCoroutine, a0,a1,a2) \ - CORO_INVOKE_ARGS(subCoroutine,(CORO_SUBCTX,a0,a1,a2)) - -//@} - -} // End of namespace Tinsel - -#endif // TINSEL_COROUTINE_H -- cgit v1.2.3 From 41692ef48ab9cb5b38d80e580316186e9c76cec5 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 11 May 2012 23:10:12 +1000 Subject: TINSEL: Refactored Tinsel engine to use the Common coroutine scheduler --- engines/tinsel/actors.cpp | 12 +- engines/tinsel/background.h | 2 +- engines/tinsel/bg.cpp | 6 +- engines/tinsel/bmv.cpp | 4 +- engines/tinsel/bmv.h | 2 +- engines/tinsel/coroutine.cpp | 82 -------- engines/tinsel/dialogs.cpp | 20 +- engines/tinsel/drives.cpp | 6 +- engines/tinsel/drives.h | 2 +- engines/tinsel/effect.cpp | 2 +- engines/tinsel/events.cpp | 18 +- engines/tinsel/events.h | 4 +- engines/tinsel/faders.cpp | 4 +- engines/tinsel/handle.cpp | 2 +- engines/tinsel/module.mk | 1 - engines/tinsel/move.cpp | 4 +- engines/tinsel/pcode.cpp | 20 +- engines/tinsel/pcode.h | 12 +- engines/tinsel/pdisplay.cpp | 6 +- engines/tinsel/play.cpp | 16 +- engines/tinsel/play.h | 2 +- engines/tinsel/polygons.cpp | 4 +- engines/tinsel/rince.cpp | 8 +- engines/tinsel/rince.h | 4 +- engines/tinsel/savescn.cpp | 10 +- engines/tinsel/scene.cpp | 20 +- engines/tinsel/sched.cpp | 487 +------------------------------------------ engines/tinsel/sched.h | 93 +-------- engines/tinsel/text.h | 2 +- engines/tinsel/tinlib.cpp | 12 +- engines/tinsel/tinsel.cpp | 33 ++- engines/tinsel/token.cpp | 14 +- 32 files changed, 137 insertions(+), 777 deletions(-) delete mode 100644 engines/tinsel/coroutine.cpp diff --git a/engines/tinsel/actors.cpp b/engines/tinsel/actors.cpp index acacd89667..a784ff5788 100644 --- a/engines/tinsel/actors.cpp +++ b/engines/tinsel/actors.cpp @@ -340,7 +340,7 @@ void RestoreActorProcess(int id, INT_CONTEXT *pic, bool savegameFlag) { if (savegameFlag) pic->resumeState = RES_SAVEGAME; - g_scheduler->createProcess(PID_TCODE, ActorRestoredProcess, &r, sizeof(r)); + CoroScheduler.createProcess(PID_TCODE, ActorRestoredProcess, &r, sizeof(r)); } /** @@ -358,7 +358,7 @@ void ActorEvent(int ano, TINSEL_EVENT event, PLR_EVENT be) { atp.event = event; atp.bev = be; atp.pic = NULL; - g_scheduler->createProcess(PID_TCODE, ActorTinselProcess, &atp, sizeof(atp)); + CoroScheduler.createProcess(PID_TCODE, ActorTinselProcess, &atp, sizeof(atp)); } } @@ -369,7 +369,7 @@ void ActorEvent(CORO_PARAM, int ano, TINSEL_EVENT tEvent, bool bWait, int myEsca ATP_INIT atp; int index; CORO_BEGIN_CONTEXT; - PPROCESS pProc; + Common::PPROCESS pProc; CORO_END_CONTEXT(_ctx); CORO_BEGIN_CODE(_ctx); @@ -389,7 +389,7 @@ void ActorEvent(CORO_PARAM, int ano, TINSEL_EVENT tEvent, bool bWait, int myEsca myEscape); if (atp.pic != NULL) { - _ctx->pProc = g_scheduler->createProcess(PID_TCODE, ActorTinselProcess, &atp, sizeof(atp)); + _ctx->pProc = CoroScheduler.createProcess(PID_TCODE, ActorTinselProcess, &atp, sizeof(atp)); AttachInterpret(atp.pic, _ctx->pProc); if (bWait) @@ -474,8 +474,8 @@ void StartTaggedActors(SCNHANDLE ah, int numActors, bool bRunScript) { // Run actor's script for this scene if (bRunScript) { // Send in reverse order - they get swapped round in the scheduler - ActorEvent(nullContext, taggedActors[i].id, SHOWEVENT, false, 0); - ActorEvent(nullContext, taggedActors[i].id, STARTUP, false, 0); + ActorEvent(Common::nullContext, taggedActors[i].id, SHOWEVENT, false, 0); + ActorEvent(Common::nullContext, taggedActors[i].id, STARTUP, false, 0); } } } diff --git a/engines/tinsel/background.h b/engines/tinsel/background.h index 34f1bd6dd2..cfa3998eda 100644 --- a/engines/tinsel/background.h +++ b/engines/tinsel/background.h @@ -24,9 +24,9 @@ #ifndef TINSEL_BACKGND_H // prevent multiple includes #define TINSEL_BACKGND_H +#include "common/coroutines.h" #include "common/frac.h" #include "common/rect.h" -#include "tinsel/coroutine.h" #include "tinsel/dw.h" // for SCNHANDLE #include "tinsel/palette.h" // palette definitions diff --git a/engines/tinsel/bg.cpp b/engines/tinsel/bg.cpp index 72ba05f0b9..a3e21a8227 100644 --- a/engines/tinsel/bg.cpp +++ b/engines/tinsel/bg.cpp @@ -255,17 +255,17 @@ void StartupBackground(CORO_PARAM, SCNHANDLE hFilm) { g_BGspeed = ONE_SECOND / FROM_LE_32(pfilm->frate); // Start display process for each reel in the film - g_scheduler->createProcess(PID_REEL, BGmainProcess, &pfilm->reels[0], sizeof(FREEL)); + CoroScheduler.createProcess(PID_REEL, BGmainProcess, &pfilm->reels[0], sizeof(FREEL)); if (TinselV0) { for (uint i = 1; i < FROM_LE_32(pfilm->numreels); ++i) - g_scheduler->createProcess(PID_REEL, BGotherProcess, &pfilm->reels[i], sizeof(FREEL)); + CoroScheduler.createProcess(PID_REEL, BGotherProcess, &pfilm->reels[i], sizeof(FREEL)); } if (g_pBG[0] == NULL) ControlStartOff(); - if (TinselV2 && (coroParam != nullContext)) + if (TinselV2 && (coroParam != Common::nullContext)) CORO_GIVE_WAY; CORO_END_CODE; diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp index 24d47b920f..438fd52a81 100644 --- a/engines/tinsel/bmv.cpp +++ b/engines/tinsel/bmv.cpp @@ -529,7 +529,7 @@ int BMVPlayer::MovieCommand(char cmd, int commandOffset) { if (cmd & CD_PRINT) { PRINT_CMD *pCmd = (PRINT_CMD *)(bigBuffer + commandOffset); - MovieText(nullContext, (int16)READ_LE_UINT16(&pCmd->stringId), + MovieText(Common::nullContext, (int16)READ_LE_UINT16(&pCmd->stringId), (int16)READ_LE_UINT16(&pCmd->x), (int16)READ_LE_UINT16(&pCmd->y), pCmd->fontId, @@ -542,7 +542,7 @@ int BMVPlayer::MovieCommand(char cmd, int commandOffset) { TALK_CMD *pCmd = (TALK_CMD *)(bigBuffer + commandOffset); talkColor = TINSEL_RGB(pCmd->r, pCmd->g, pCmd->b); - MovieText(nullContext, (int16)READ_LE_UINT16(&pCmd->stringId), + MovieText(Common::nullContext, (int16)READ_LE_UINT16(&pCmd->stringId), (int16)READ_LE_UINT16(&pCmd->x), (int16)READ_LE_UINT16(&pCmd->y), 0, diff --git a/engines/tinsel/bmv.h b/engines/tinsel/bmv.h index eadf65c3aa..fa254ed26d 100644 --- a/engines/tinsel/bmv.h +++ b/engines/tinsel/bmv.h @@ -24,12 +24,12 @@ #ifndef TINSEL_BMV_H #define TINSEL_BMV_H +#include "common/coroutines.h" #include "common/file.h" #include "audio/audiostream.h" #include "audio/mixer.h" -#include "tinsel/coroutine.h" #include "tinsel/object.h" #include "tinsel/palette.h" diff --git a/engines/tinsel/coroutine.cpp b/engines/tinsel/coroutine.cpp deleted file mode 100644 index ef0097f043..0000000000 --- a/engines/tinsel/coroutine.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "tinsel/coroutine.h" -#include "common/hashmap.h" -#include "common/hash-str.h" - -namespace Tinsel { - - -CoroContext nullContext = NULL; // FIXME: Avoid non-const global vars - - -#if COROUTINE_DEBUG -namespace { -static int s_coroCount = 0; - -typedef Common::HashMap CoroHashMap; -static CoroHashMap *s_coroFuncs = 0; - -static void changeCoroStats(const char *func, int change) { - if (!s_coroFuncs) - s_coroFuncs = new CoroHashMap(); - - (*s_coroFuncs)[func] += change; -} - -static void displayCoroStats() { - debug("%d active coros", s_coroCount); - - // Loop over s_coroFuncs and print info about active coros - if (!s_coroFuncs) - return; - for (CoroHashMap::const_iterator it = s_coroFuncs->begin(); - it != s_coroFuncs->end(); ++it) { - if (it->_value != 0) - debug(" %3d x %s", it->_value, it->_key.c_str()); - } -} - -} -#endif - -CoroBaseContext::CoroBaseContext(const char *func) - : _line(0), _sleep(0), _subctx(0) { -#if COROUTINE_DEBUG - _funcName = func; - changeCoroStats(_funcName, +1); - s_coroCount++; -#endif -} - -CoroBaseContext::~CoroBaseContext() { -#if COROUTINE_DEBUG - s_coroCount--; - changeCoroStats(_funcName, -1); - debug("Deleting coro in %s at %p (subctx %p)", - _funcName, (void *)this, (void *)_subctx); - displayCoroStats(); -#endif - delete _subctx; -} - -} // End of namespace Tinsel diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp index 5396e47566..fbe9e8d1f6 100644 --- a/engines/tinsel/dialogs.cpp +++ b/engines/tinsel/dialogs.cpp @@ -1075,7 +1075,7 @@ static void PrimeSceneHopper() { uint32 vSize; // Open the file (it's on the CD) - CdCD(nullContext); + CdCD(Common::nullContext); if (!f.open(HOPPER_FILENAME)) error(CANNOT_FIND_FILE, HOPPER_FILENAME); @@ -1191,13 +1191,13 @@ static void HopAction() { debugC(DEBUG_BASIC, kTinselDebugAnimations, "Scene hopper chose scene %xh,%d\n", hScene, eNumber); if (FROM_LE_32(pEntry->flags) & fCall) { - SaveScene(nullContext); - NewScene(nullContext, g_pChosenScene->hScene, pEntry->eNumber, TRANS_FADE); + SaveScene(Common::nullContext); + NewScene(Common::nullContext, g_pChosenScene->hScene, pEntry->eNumber, TRANS_FADE); } else if (FROM_LE_32(pEntry->flags) & fHook) HookScene(hScene, eNumber, TRANS_FADE); else - NewScene(nullContext, hScene, eNumber, TRANS_CUT); + NewScene(Common::nullContext, hScene, eNumber, TRANS_CUT); } /**************************************************************************/ @@ -1406,13 +1406,13 @@ static void InvTinselEvent(INV_OBJECT *pinvo, TINSEL_EVENT event, PLR_EVENT be, return; g_GlitterIndex = index; - g_scheduler->createProcess(PID_TCODE, ObjectProcess, &to, sizeof(to)); + CoroScheduler.createProcess(PID_TCODE, ObjectProcess, &to, sizeof(to)); } extern void ObjectEvent(CORO_PARAM, int objId, TINSEL_EVENT event, bool bWait, int myEscape, bool *result) { // COROUTINE CORO_BEGIN_CONTEXT; - PROCESS *pProc; + Common::PROCESS *pProc; INV_OBJECT *pInvo; OP_INIT op; CORO_END_CONTEXT(_ctx); @@ -1428,7 +1428,7 @@ extern void ObjectEvent(CORO_PARAM, int objId, TINSEL_EVENT event, bool bWait, i _ctx->op.event = event; _ctx->op.myEscape = myEscape; - g_scheduler->createProcess(PID_TCODE, ObjectProcess, &_ctx->op, sizeof(_ctx->op)); + CoroScheduler.createProcess(PID_TCODE, ObjectProcess, &_ctx->op, sizeof(_ctx->op)); if (bWait) CORO_INVOKE_2(WaitInterpret, _ctx->pProc, result); @@ -3540,9 +3540,9 @@ extern void ConvAction(int index) { } if (g_thisConvPoly != NOPOLY) - PolygonEvent(nullContext, g_thisConvPoly, CONVERSE, 0, false, 0); + PolygonEvent(Common::nullContext, g_thisConvPoly, CONVERSE, 0, false, 0); else - ActorEvent(nullContext, g_thisConvActor, CONVERSE, false, 0); + ActorEvent(Common::nullContext, g_thisConvActor, CONVERSE, false, 0); } } @@ -5128,7 +5128,7 @@ static void InvPickup(int index) { if (TinselV2) InvPutDown(index); else - g_scheduler->createProcess(PID_TCODE, InvPdProcess, &index, sizeof(index)); + CoroScheduler.createProcess(PID_TCODE, InvPdProcess, &index, sizeof(index)); } } } diff --git a/engines/tinsel/drives.cpp b/engines/tinsel/drives.cpp index d815fd165d..5c4b939e4e 100644 --- a/engines/tinsel/drives.cpp +++ b/engines/tinsel/drives.cpp @@ -48,13 +48,13 @@ void CdCD(CORO_PARAM) { CORO_BEGIN_CODE(_ctx); while (g_bChangingCD) { - if (g_scheduler->getCurrentProcess()) { - // FIXME: CdCD gets passed a nullContext in RegisterGlobals() and + if (CoroScheduler.getCurrentProcess()) { + // FIXME: CdCD gets passed a Common::nullContext in RegisterGlobals() and // PrimeSceneHopper(), because I didn't know how to get a proper // context without converting the whole calling stack to CORO'd // functions. If these functions really get called while a CD // change is requested, this needs to be resolved. - if (coroParam == nullContext) + if (coroParam == Common::nullContext) error("CdCD needs context"); CORO_SLEEP(1); } else diff --git a/engines/tinsel/drives.h b/engines/tinsel/drives.h index 907071d2f8..9e97b92fa5 100644 --- a/engines/tinsel/drives.h +++ b/engines/tinsel/drives.h @@ -24,9 +24,9 @@ #ifndef TINSEL_DRIVES_H #define TINSEL_DRIVES_H +#include "common/coroutines.h" #include "common/stream.h" #include "tinsel/dw.h" -#include "tinsel/coroutine.h" namespace Tinsel { diff --git a/engines/tinsel/effect.cpp b/engines/tinsel/effect.cpp index 22027b0f02..f5adb63c2b 100644 --- a/engines/tinsel/effect.cpp +++ b/engines/tinsel/effect.cpp @@ -108,7 +108,7 @@ static void FettleEffectPolys(int x, int y, int index, PMOVER pActor) { epi.hEpoly = hPoly; epi.pMover = pActor; epi.index = index; - g_scheduler->createProcess(PID_TCODE, EffectProcess, &epi, sizeof(epi)); + CoroScheduler.createProcess(PID_TCODE, EffectProcess, &epi, sizeof(epi)); } } } diff --git a/engines/tinsel/events.cpp b/engines/tinsel/events.cpp index 74454c5f2a..1aa4d34227 100644 --- a/engines/tinsel/events.cpp +++ b/engines/tinsel/events.cpp @@ -22,10 +22,10 @@ * Also provides a couple of utility functions. */ +#include "common/coroutines.h" #include "tinsel/actors.h" #include "tinsel/background.h" #include "tinsel/config.h" -#include "tinsel/coroutine.h" #include "tinsel/cursor.h" #include "tinsel/dw.h" #include "tinsel/events.h" @@ -276,7 +276,7 @@ static void WalkProcess(CORO_PARAM, const void *param) { void WalkTo(int x, int y) { WP_INIT to = { x, y }; - g_scheduler->createProcess(PID_TCODE, WalkProcess, &to, sizeof(to)); + CoroScheduler.createProcess(PID_TCODE, WalkProcess, &to, sizeof(to)); } /** @@ -295,7 +295,7 @@ static void ProcessUserEvent(TINSEL_EVENT uEvent, const Common::Point &coOrds, P if ((actor = GetTaggedActor()) != 0) { // Event for a tagged actor if (TinselV2) - ActorEvent(nullContext, actor, uEvent, false, 0); + ActorEvent(Common::nullContext, actor, uEvent, false, 0); else ActorEvent(actor, uEvent, be); } else if ((hPoly = GetTaggedPoly()) != NOPOLY) { @@ -303,7 +303,7 @@ static void ProcessUserEvent(TINSEL_EVENT uEvent, const Common::Point &coOrds, P if (!TinselV2) RunPolyTinselCode(hPoly, uEvent, be, false); else if (uEvent != PROV_WALKTO) - PolygonEvent(nullContext, hPoly, uEvent, 0, false, 0); + PolygonEvent(Common::nullContext, hPoly, uEvent, 0, false, 0); } else { GetCursorXY(&aniX, &aniY, true); @@ -312,7 +312,7 @@ static void ProcessUserEvent(TINSEL_EVENT uEvent, const Common::Point &coOrds, P if ((hPoly = InPolygon(aniX, aniY, TAG)) != NOPOLY || (!TinselV2 && ((hPoly = InPolygon(aniX, aniY, EXIT)) != NOPOLY))) { if (TinselV2 && (uEvent != PROV_WALKTO)) - PolygonEvent(nullContext, hPoly, uEvent, 0, false, 0); + PolygonEvent(Common::nullContext, hPoly, uEvent, 0, false, 0); else if (!TinselV2) RunPolyTinselCode(hPoly, uEvent, be, false); } else if ((uEvent == PROV_WALKTO) || (uEvent == WALKTO)) { @@ -604,7 +604,7 @@ void PolyTinselProcess(CORO_PARAM, const void *param) { void PolygonEvent(CORO_PARAM, HPOLYGON hPoly, TINSEL_EVENT tEvent, int actor, bool bWait, int myEscape, bool *result) { CORO_BEGIN_CONTEXT; - PPROCESS pProc; + Common::PPROCESS pProc; CORO_END_CONTEXT(_ctx); CORO_BEGIN_CODE(_ctx); @@ -623,7 +623,7 @@ void PolygonEvent(CORO_PARAM, HPOLYGON hPoly, TINSEL_EVENT tEvent, int actor, bo NULL, // No Object myEscape); if (to.pic != NULL) { - _ctx->pProc = g_scheduler->createProcess(PID_TCODE, PolyTinselProcess, &to, sizeof(to)); + _ctx->pProc = CoroScheduler.createProcess(PID_TCODE, PolyTinselProcess, &to, sizeof(to)); AttachInterpret(to.pic, _ctx->pProc); if (bWait) @@ -640,14 +640,14 @@ void RunPolyTinselCode(HPOLYGON hPoly, TINSEL_EVENT event, PLR_EVENT be, bool tc PTP_INIT to = { hPoly, event, be, tc, 0, NULL }; assert(!TinselV2); - g_scheduler->createProcess(PID_TCODE, PolyTinselProcess, &to, sizeof(to)); + CoroScheduler.createProcess(PID_TCODE, PolyTinselProcess, &to, sizeof(to)); } void effRunPolyTinselCode(HPOLYGON hPoly, TINSEL_EVENT event, int actor) { PTP_INIT to = { hPoly, event, PLR_NOEVENT, false, actor, NULL }; assert(!TinselV2); - g_scheduler->createProcess(PID_TCODE, PolyTinselProcess, &to, sizeof(to)); + CoroScheduler.createProcess(PID_TCODE, PolyTinselProcess, &to, sizeof(to)); } /** diff --git a/engines/tinsel/events.h b/engines/tinsel/events.h index f2b4d7f663..cdf5ae2ae4 100644 --- a/engines/tinsel/events.h +++ b/engines/tinsel/events.h @@ -24,9 +24,9 @@ #ifndef TINSEL_EVENTS_H #define TINSEL_EVENTS_H -#include "tinsel/dw.h" -#include "tinsel/coroutine.h" +#include "common/coroutines.h" #include "common/rect.h" +#include "tinsel/dw.h" namespace Tinsel { diff --git a/engines/tinsel/faders.cpp b/engines/tinsel/faders.cpp index 86d117af81..c1574ff963 100644 --- a/engines/tinsel/faders.cpp +++ b/engines/tinsel/faders.cpp @@ -145,7 +145,7 @@ static void Fader(const long multTable[], SCNHANDLE noFadeTable[]) { if (TinselV2) { // The is only ever one cuncurrent fade // But this could be a fade out and the fade in is still going! - g_scheduler->killMatchingProcess(PID_FADER); + CoroScheduler.killMatchingProcess(PID_FADER); NoFadingPalettes(); } @@ -176,7 +176,7 @@ static void Fader(const long multTable[], SCNHANDLE noFadeTable[]) { fade.pPalQ = pPal; // create a fader process for this palette - g_scheduler->createProcess(PID_FADER, FadeProcess, (void *)&fade, sizeof(FADE)); + CoroScheduler.createProcess(PID_FADER, FadeProcess, (void *)&fade, sizeof(FADE)); } } } diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp index e31b2141f5..c3089db990 100644 --- a/engines/tinsel/handle.cpp +++ b/engines/tinsel/handle.cpp @@ -361,7 +361,7 @@ byte *LockMem(SCNHANDLE offset) { if (TinselV2) { SetCD(pH->flags2 & fAllCds); - CdCD(nullContext); + CdCD(Common::nullContext); } LoadFile(pH); } diff --git a/engines/tinsel/module.mk b/engines/tinsel/module.mk index 2ab94b830a..3485bac74b 100644 --- a/engines/tinsel/module.mk +++ b/engines/tinsel/module.mk @@ -9,7 +9,6 @@ MODULE_OBJS := \ bmv.o \ cliprect.o \ config.o \ - coroutine.o \ cursor.o \ debugger.o \ detection.o \ diff --git a/engines/tinsel/move.cpp b/engines/tinsel/move.cpp index bb49e59fe7..275b6006f5 100644 --- a/engines/tinsel/move.cpp +++ b/engines/tinsel/move.cpp @@ -1299,14 +1299,14 @@ static void SetOffWithinNodePath(PMOVER pMover, HPOLYGON StartPath, HPOLYGON Des */ void SSetActorDest(PMOVER pActor) { if (pActor->UtargetX != -1 && pActor->UtargetY != -1) { - Stand(nullContext, pActor->actorID, pActor->objX, pActor->objY, 0); + Stand(Common::nullContext, pActor->actorID, pActor->objX, pActor->objY, 0); if (pActor->UtargetX != -1 && pActor->UtargetY != -1) { SetActorDest(pActor, pActor->UtargetX, pActor->UtargetY, pActor->bIgPath, 0); } } else { - Stand(nullContext, pActor->actorID, pActor->objX, pActor->objY, 0); + Stand(Common::nullContext, pActor->actorID, pActor->objX, pActor->objY, 0); } } diff --git a/engines/tinsel/pcode.cpp b/engines/tinsel/pcode.cpp index 145a6a8e5d..60f04b47fd 100644 --- a/engines/tinsel/pcode.cpp +++ b/engines/tinsel/pcode.cpp @@ -243,13 +243,13 @@ static INT_CONTEXT *AllocateInterpretContext(GSORT gsort) { for (i = 0, pic = g_icList; i < NUM_INTERPRET; i++, pic++) { if (pic->GSort == GS_NONE) { - pic->pProc = g_scheduler->getCurrentProcess(); + pic->pProc = CoroScheduler.getCurrentProcess(); pic->GSort = gsort; return pic; } #ifdef DEBUG else { - if (pic->pProc == g_scheduler->getCurrentProcess()) + if (pic->pProc == CoroScheduler.getCurrentProcess()) error("Found unreleased interpret context"); } #endif @@ -277,7 +277,7 @@ static void FreeWaitCheck(PINT_CONTEXT pic, bool bVoluntary) { if ((g_icList + i)->waitNumber1 == pic->waitNumber2) { (g_icList + i)->waitNumber1 = 0; (g_icList + i)->resumeCode = bVoluntary ? RES_FINISHED : RES_CUTSHORT; - g_scheduler->reschedule((g_icList + i)->pProc); + CoroScheduler.reschedule((g_icList + i)->pProc); break; } } @@ -301,7 +301,7 @@ static void FreeInterpretContextPi(INT_CONTEXT *pic) { * Ensures that interpret contexts don't get lost when an Interpret() * call doesn't complete. */ -void FreeInterpretContextPr(PROCESS *pProc) { +void FreeInterpretContextPr(Common::PROCESS *pProc) { INT_CONTEXT *pic; int i; @@ -393,7 +393,7 @@ INT_CONTEXT *RestoreInterpretContext(INT_CONTEXT *ric) { ic = AllocateInterpretContext(GS_NONE); // Sort will soon be overridden memcpy(ic, ric, sizeof(INT_CONTEXT)); - ic->pProc = g_scheduler->getCurrentProcess(); + ic->pProc = CoroScheduler.getCurrentProcess(); ic->resumeState = RES_1; LockCode(ic); @@ -422,7 +422,7 @@ void RegisterGlobals(int num) { if (g_icList == NULL) { error("Cannot allocate memory for interpret contexts"); } - g_scheduler->setResourceCallback(FreeInterpretContextPr); + CoroScheduler.setResourceCallback(FreeInterpretContextPr); } else { // Check size is still the same assert(g_numGlobals == num); @@ -433,7 +433,7 @@ void RegisterGlobals(int num) { if (TinselV2) { // read initial values - CdCD(nullContext); + CdCD(Common::nullContext); Common::File f; if (!f.open(GLOBALS_FILENAME)) @@ -839,7 +839,7 @@ void Interpret(CORO_PARAM, INT_CONTEXT *ic) { * Associates an interpret context with the * process that will run it. */ -void AttachInterpret(INT_CONTEXT *pic, PROCESS *pProc) { +void AttachInterpret(INT_CONTEXT *pic, Common::PROCESS *pProc) { // Attach the process which is using this context pic->pProc = pProc; } @@ -869,9 +869,9 @@ static uint32 UniqueWaitNumber() { /** * WaitInterpret */ -void WaitInterpret(CORO_PARAM, PPROCESS pWaitProc, bool *result) { +void WaitInterpret(CORO_PARAM, Common::PPROCESS pWaitProc, bool *result) { int i; - PPROCESS currentProcess = g_scheduler->getCurrentProcess(); + Common::PPROCESS currentProcess = CoroScheduler.getCurrentProcess(); assert(currentProcess); assert(currentProcess != pWaitProc); if (result) *result = false; diff --git a/engines/tinsel/pcode.h b/engines/tinsel/pcode.h index 5d16dae432..4980fc6ed9 100644 --- a/engines/tinsel/pcode.h +++ b/engines/tinsel/pcode.h @@ -25,7 +25,7 @@ #define TINSEL_PCODE_H #include "tinsel/events.h" // for TINSEL_EVENT -#include "tinsel/sched.h" // for PROCESS +#include "tinsel/sched.h" // for Common::PROCESS namespace Common { class Serializer; @@ -56,7 +56,7 @@ struct WorkaroundEntry; struct INT_CONTEXT { // Elements for interpret context management - PROCESS *pProc; ///< processes owning this context + Common::PROCESS *pProc; ///< processes owning this context GSORT GSort; ///< sort of this context // Previously parameters to Interpret() @@ -114,12 +114,12 @@ void SaveInterpretContexts(INT_CONTEXT *sICInfo); void RegisterGlobals(int num); void FreeGlobals(); -void AttachInterpret(INT_CONTEXT *pic, PROCESS *pProc); +void AttachInterpret(INT_CONTEXT *pic, Common::PROCESS *pProc); -void WaitInterpret(CORO_PARAM, PPROCESS pWaitProc, bool *result); +void WaitInterpret(CORO_PARAM, Common::PPROCESS pWaitProc, bool *result); -#define NUM_INTERPRET (NUM_PROCESS - 20) -#define MAX_INTERPRET (MAX_PROCESSES - 20) +#define NUM_INTERPRET (CORO_NUM_PROCESS - 20) +#define MAX_INTERPRET (CORO_MAX_PROCESSES - 20) /*----------------------------------------------------------------------*\ |* Library Procedure and Function codes parameter enums *| diff --git a/engines/tinsel/pdisplay.cpp b/engines/tinsel/pdisplay.cpp index 9a9e6ab00f..b821c5dee2 100644 --- a/engines/tinsel/pdisplay.cpp +++ b/engines/tinsel/pdisplay.cpp @@ -23,9 +23,9 @@ * PointProcess() */ +#include "common/coroutines.h" #include "tinsel/actors.h" #include "tinsel/background.h" -#include "tinsel/coroutine.h" #include "tinsel/cursor.h" #include "tinsel/dw.h" #include "tinsel/events.h" @@ -265,7 +265,7 @@ void DisablePointing() { if (hPoly != NOPOLY && PolyType(hPoly) == TAG && PolyIsPointedTo(hPoly)) { SetPolyPointedTo(hPoly, false); SetPolyTagWanted(hPoly, false, false, 0); - PolygonEvent(nullContext, hPoly, UNPOINT, 0, false, 0); + PolygonEvent(Common::nullContext, hPoly, UNPOINT, 0, false, 0); } } @@ -275,7 +275,7 @@ void DisablePointing() { SetActorPointedTo(i, false); SetActorTagWanted(i, false, false, 0); - ActorEvent(nullContext, i, UNPOINT, false, 0); + ActorEvent(Common::nullContext, i, UNPOINT, false, 0); } } } diff --git a/engines/tinsel/play.cpp b/engines/tinsel/play.cpp index 40729d9f3a..9e0baa749e 100644 --- a/engines/tinsel/play.cpp +++ b/engines/tinsel/play.cpp @@ -21,9 +21,9 @@ * Plays films within a scene, takes into account the actor in each 'column'. | */ +#include "common/coroutines.h" #include "tinsel/actors.h" #include "tinsel/background.h" -#include "tinsel/coroutine.h" #include "tinsel/dw.h" #include "tinsel/film.h" #include "tinsel/handle.h" @@ -395,7 +395,7 @@ static void SoundReelWaitCheck() { if (--g_soundReelWait == 0) { for (int i = 0; i < MAX_SOUNDREELS; i++) { if (g_soundReels[i].hFilm) { - g_scheduler->createProcess(PID_REEL, ResSoundReel, &i, sizeof(i)); + CoroScheduler.createProcess(PID_REEL, ResSoundReel, &i, sizeof(i)); } } } @@ -1001,7 +1001,7 @@ void PlayFilm(CORO_PARAM, SCNHANDLE hFilm, int x, int y, int actorid, bool splay NewestFilm(hFilm, &pFilm->reels[i]); ppi.column = i; - g_scheduler->createProcess(PID_REEL, PlayProcess, &ppi, sizeof(PPINIT)); + CoroScheduler.createProcess(PID_REEL, PlayProcess, &ppi, sizeof(PPINIT)); } if (TinselV2) { @@ -1011,7 +1011,7 @@ void PlayFilm(CORO_PARAM, SCNHANDLE hFilm, int x, int y, int actorid, bool splay CORO_GIVE_WAY; if (myescEvent && myescEvent != GetEscEvents()) - g_scheduler->rescheduleAll(); + CoroScheduler.rescheduleAll(); } CORO_END_CODE; @@ -1063,7 +1063,7 @@ void PlayFilmc(CORO_PARAM, SCNHANDLE hFilm, int x, int y, int actorid, bool spla NewestFilm(hFilm, &pFilm->reels[i]); _ctx->ppi.column = i; - g_scheduler->createProcess(PID_REEL, PlayProcess, &_ctx->ppi, sizeof(PPINIT)); + CoroScheduler.createProcess(PID_REEL, PlayProcess, &_ctx->ppi, sizeof(PPINIT)); } if (TinselV2) { @@ -1078,7 +1078,7 @@ void PlayFilmc(CORO_PARAM, SCNHANDLE hFilm, int x, int y, int actorid, bool spla // Wait until film changes or loop count increases while (GetActorPresFilm(_ctx->i) == hFilm && GetLoopCount(_ctx->i) == _ctx->loopCount) { if (myescEvent && myescEvent != GetEscEvents()) { - g_scheduler->rescheduleAll(); + CoroScheduler.rescheduleAll(); break; } @@ -1126,7 +1126,7 @@ void RestoreActorReels(SCNHANDLE hFilm, short reelnum, short z, int x, int y) { NewestFilm(hFilm, &pfilm->reels[reelnum]); // Start display process for the reel - g_scheduler->createProcess(PID_REEL, PlayProcess, &ppi, sizeof(ppi)); + CoroScheduler.createProcess(PID_REEL, PlayProcess, &ppi, sizeof(ppi)); } /** @@ -1160,7 +1160,7 @@ void RestoreActorReels(SCNHANDLE hFilm, int actor, int x, int y) { NewestFilm(hFilm, &pFilm->reels[i]); // Start display process for the reel - g_scheduler->createProcess(PID_REEL, PlayProcess, &ppi, sizeof(ppi)); + CoroScheduler.createProcess(PID_REEL, PlayProcess, &ppi, sizeof(ppi)); g_soundReelWait++; } diff --git a/engines/tinsel/play.h b/engines/tinsel/play.h index 041b7096a8..fffa8a9329 100644 --- a/engines/tinsel/play.h +++ b/engines/tinsel/play.h @@ -24,7 +24,7 @@ #ifndef TINSEL_PLAY_H // prevent multiple includes #define TINSEL_PLAY_H -#include "tinsel/coroutine.h" +#include "common/coroutines.h" #include "tinsel/dw.h" #include "tinsel/multiobj.h" diff --git a/engines/tinsel/polygons.cpp b/engines/tinsel/polygons.cpp index 6fc1c65ec5..d8c1cef0b6 100644 --- a/engines/tinsel/polygons.cpp +++ b/engines/tinsel/polygons.cpp @@ -1469,7 +1469,7 @@ static void SetExTags(SCNHANDLE ph) { pts = &TagStates[SceneTags[i].offset]; for (j = 0; j < SceneTags[i].nooftags; j++, pts++) { if (!pts->enabled) - DisableTag(nullContext, pts->tid); + DisableTag(Common::nullContext, pts->tid); } return; } @@ -1873,7 +1873,7 @@ void InitPolygons(SCNHANDLE ph, int numPoly, bool bRestart) { } else { for (int i = numPoly - 1; i >= 0; i--) { if (Polys[i]->polyType == TAG) { - PolygonEvent(nullContext, i, STARTUP, 0, false, 0); + PolygonEvent(Common::nullContext, i, STARTUP, 0, false, 0); } } } diff --git a/engines/tinsel/rince.cpp b/engines/tinsel/rince.cpp index bb0aeabd2f..ba8f47f9cf 100644 --- a/engines/tinsel/rince.cpp +++ b/engines/tinsel/rince.cpp @@ -202,8 +202,8 @@ void KillMover(PMOVER pMover) { pMover->bActive = false; MultiDeleteObject(GetPlayfieldList(FIELD_WORLD), pMover->actorObj); pMover->actorObj = NULL; - assert(g_scheduler->getCurrentProcess() != pMover->pProc); - g_scheduler->killProcess(pMover->pProc); + assert(CoroScheduler.getCurrentProcess() != pMover->pProc); + CoroScheduler.killProcess(pMover->pProc); } } @@ -856,10 +856,10 @@ void MoverProcessCreate(int X, int Y, int id, PMOVER pMover) { iStruct.Y = Y; iStruct.pMover = pMover; - g_scheduler->createProcess(PID_MOVER, T2MoverProcess, &iStruct, sizeof(MAINIT)); + CoroScheduler.createProcess(PID_MOVER, T2MoverProcess, &iStruct, sizeof(MAINIT)); } else { MoverProcessHelper(X, Y, id, pMover); - pMover->pProc = g_scheduler->createProcess(PID_MOVER, T1MoverProcess, &pMover, sizeof(PMOVER)); + pMover->pProc = CoroScheduler.createProcess(PID_MOVER, T1MoverProcess, &pMover, sizeof(PMOVER)); } } diff --git a/engines/tinsel/rince.h b/engines/tinsel/rince.h index 93fd191172..b34c3f20de 100644 --- a/engines/tinsel/rince.h +++ b/engines/tinsel/rince.h @@ -31,7 +31,7 @@ namespace Tinsel { struct OBJECT; -struct PROCESS; +struct Common::PROCESS; enum NPS {NOT_IN, GOING_UP, GOING_DOWN, LEAVING, ENTERING}; @@ -110,7 +110,7 @@ struct MOVER { /* NOTE: If effect polys can overlap, this needs improving */ bool bInEffect; - PROCESS *pProc; + Common::PROCESS *pProc; // Discworld 2 specific fields int32 zOverride; diff --git a/engines/tinsel/savescn.cpp b/engines/tinsel/savescn.cpp index 1b06e3929c..0c0cc5c81e 100644 --- a/engines/tinsel/savescn.cpp +++ b/engines/tinsel/savescn.cpp @@ -190,7 +190,7 @@ void sortActors(SAVED_DATA *sd) { RestoreAuxScales(sd->SavedMoverInfo); for (int i = 0; i < MAX_MOVERS; i++) { if (sd->SavedMoverInfo[i].bActive) - Stand(nullContext, sd->SavedMoverInfo[i].actorID, sd->SavedMoverInfo[i].objX, + Stand(Common::nullContext, sd->SavedMoverInfo[i].actorID, sd->SavedMoverInfo[i].objX, sd->SavedMoverInfo[i].objY, sd->SavedMoverInfo[i].hLastfilm); } } @@ -245,7 +245,7 @@ static void SortMAProcess(CORO_PARAM, const void *) { void ResumeInterprets() { // Master script only affected on restore game, not restore scene if (!TinselV2 && (g_rsd == &g_sgData)) { - g_scheduler->killMatchingProcess(PID_MASTER_SCR, -1); + CoroScheduler.killMatchingProcess(PID_MASTER_SCR, -1); FreeMasterInterpretContext(); } @@ -314,7 +314,7 @@ static int DoRestoreSceneFrame(SAVED_DATA *sd, int n) { // Master script only affected on restore game, not restore scene if (sd == &g_sgData) { - g_scheduler->killMatchingProcess(PID_MASTER_SCR); + CoroScheduler.killMatchingProcess(PID_MASTER_SCR); KillGlobalProcesses(); FreeMasterInterpretContext(); } @@ -340,7 +340,7 @@ static int DoRestoreSceneFrame(SAVED_DATA *sd, int n) { SetDoFadeIn(!g_bNoFade); g_bNoFade = false; - StartupBackground(nullContext, sd->SavedBgroundHandle); + StartupBackground(Common::nullContext, sd->SavedBgroundHandle); if (TinselV2) { Offset(EX_USEXY, sd->SavedLoffset, sd->SavedToffset); @@ -354,7 +354,7 @@ static int DoRestoreSceneFrame(SAVED_DATA *sd, int n) { if (TinselV2) { // create process to sort out the moving actors - g_scheduler->createProcess(PID_MOVER, SortMAProcess, NULL, 0); + CoroScheduler.createProcess(PID_MOVER, SortMAProcess, NULL, 0); g_bNotDoneYet = true; RestoreActorZ(sd->savedActorZ); diff --git a/engines/tinsel/scene.cpp b/engines/tinsel/scene.cpp index f635ce13a3..79bb30f7a3 100644 --- a/engines/tinsel/scene.cpp +++ b/engines/tinsel/scene.cpp @@ -193,7 +193,7 @@ void SendSceneTinselProcess(TINSEL_EVENT event) { init.event = event; init.hTinselCode = ss->hSceneScript; - g_scheduler->createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); + CoroScheduler.createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); } } } @@ -271,7 +271,7 @@ static void LoadScene(SCNHANDLE scene, int entry) { init.event = STARTUP; init.hTinselCode = es->hScript; - g_scheduler->createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); + CoroScheduler.createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); } break; } @@ -291,7 +291,7 @@ static void LoadScene(SCNHANDLE scene, int entry) { init.event = STARTUP; init.hTinselCode = ss->hSceneScript; - g_scheduler->createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); + CoroScheduler.createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); } } @@ -344,7 +344,7 @@ void EndScene() { KillAllObjects(); // kill all destructable process - g_scheduler->killMatchingProcess(PID_DESTROY, PID_DESTROY); + CoroScheduler.killMatchingProcess(PID_DESTROY, PID_DESTROY); } /** @@ -405,16 +405,16 @@ void PrimeScene() { if (!TinselV2) EnableTags(); // Next scene with tags enabled - g_scheduler->createProcess(PID_SCROLL, ScrollProcess, NULL, 0); - g_scheduler->createProcess(PID_SCROLL, EffectPolyProcess, NULL, 0); + CoroScheduler.createProcess(PID_SCROLL, ScrollProcess, NULL, 0); + CoroScheduler.createProcess(PID_SCROLL, EffectPolyProcess, NULL, 0); #ifdef DEBUG if (g_ShowPosition) - g_scheduler->createProcess(PID_POSITION, CursorPositionProcess, NULL, 0); + CoroScheduler.createProcess(PID_POSITION, CursorPositionProcess, NULL, 0); #endif - g_scheduler->createProcess(PID_TAG, TagProcess, NULL, 0); - g_scheduler->createProcess(PID_TAG, PointProcess, NULL, 0); + CoroScheduler.createProcess(PID_TAG, TagProcess, NULL, 0); + CoroScheduler.createProcess(PID_TAG, PointProcess, NULL, 0); // init the current background PrimeBackground(); @@ -471,7 +471,7 @@ void DoHailScene(SCNHANDLE scene) { init.event = NOEVENT; init.hTinselCode = ss->hSceneScript; - g_scheduler->createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); + CoroScheduler.createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); } } diff --git a/engines/tinsel/sched.cpp b/engines/tinsel/sched.cpp index 343758d924..4bf356ba36 100644 --- a/engines/tinsel/sched.cpp +++ b/engines/tinsel/sched.cpp @@ -32,8 +32,6 @@ namespace Tinsel { -Scheduler *g_scheduler = 0; - #include "common/pack-start.h" // START STRUCT PACKING struct PROCESS_STRUC { @@ -53,471 +51,6 @@ static SCNHANDLE g_hSceneProcess; static uint32 g_numGlobalProcess; static PROCESS_STRUC *g_pGlobalProcess; -//--------------------- FUNCTIONS ------------------------ - -Scheduler::Scheduler() { - processList = 0; - pFreeProcesses = 0; - pCurrent = 0; - -#ifdef DEBUG - // diagnostic process counters - numProcs = 0; - maxProcs = 0; -#endif - - pRCfunction = 0; - - active = new PROCESS; - active->pPrevious = NULL; - active->pNext = NULL; - - g_scheduler = this; // FIXME HACK -} - -Scheduler::~Scheduler() { - // Kill all running processes (i.e. free memory allocated for their state). - PROCESS *pProc = active->pNext; - while (pProc != NULL) { - delete pProc->state; - pProc->state = 0; - pProc = pProc->pNext; - } - - free(processList); - processList = NULL; - - delete active; - active = 0; -} - -/** - * Kills all processes and places them on the free list. - */ -void Scheduler::reset() { - -#ifdef DEBUG - // clear number of process in use - numProcs = 0; -#endif - - if (processList == NULL) { - // first time - allocate memory for process list - processList = (PROCESS *)calloc(MAX_PROCESSES, sizeof(PROCESS)); - - // make sure memory allocated - if (processList == NULL) { - error("Cannot allocate memory for process data"); - } - - // fill with garbage - memset(processList, 'S', MAX_PROCESSES * sizeof(PROCESS)); - } - - // Kill all running processes (i.e. free memory allocated for their state). - PROCESS *pProc = active->pNext; - while (pProc != NULL) { - delete pProc->state; - pProc->state = 0; - pProc = pProc->pNext; - } - - // no active processes - pCurrent = active->pNext = NULL; - - // place first process on free list - pFreeProcesses = processList; - - // link all other processes after first - for (int i = 1; i <= NUM_PROCESS; i++) { - processList[i - 1].pNext = (i == NUM_PROCESS) ? NULL : processList + i; - processList[i - 1].pPrevious = (i == 1) ? active : processList + (i - 2); - } -} - - -#ifdef DEBUG -/** - * Shows the maximum number of process used at once. - */ -void Scheduler::printStats() { - debug("%i process of %i used", maxProcs, NUM_PROCESS); -} -#endif - -#ifdef DEBUG -/** - * Checks both the active and free process list to insure all the links are valid, - * and that no processes have been lost - */ -void Scheduler::CheckStack() { - Common::List pList; - - // Check both the active and free process lists - for (int i = 0; i < 2; ++i) { - PROCESS *p = (i == 0) ? active : pFreeProcesses; - - if (p != NULL) { - // Make sure the linkages are correct - while (p->pNext != NULL) { - assert(p->pNext->pPrevious == p); - pList.push_back(p); - p = p->pNext; - } - pList.push_back(p); - } - } - - // Make sure all processes are accounted for - for (int idx = 0; idx < NUM_PROCESS; idx++) { - bool found = false; - for (Common::List::iterator i = pList.begin(); i != pList.end(); ++i) { - PROCESS *pTemp = *i; - if (*i == &processList[idx]) { - found = true; - break; - } - } - - assert(found); - } -} -#endif - -/** - * Give all active processes a chance to run - */ -void Scheduler::schedule() { - // start dispatching active process list - PROCESS *pNext; - PROCESS *pProc = active->pNext; - while (pProc != NULL) { - pNext = pProc->pNext; - - if (--pProc->sleepTime <= 0) { - // process is ready for dispatch, activate it - pCurrent = pProc; - pProc->coroAddr(pProc->state, pProc->param); - - if (!pProc->state || pProc->state->_sleep <= 0) { - // Coroutine finished - pCurrent = pCurrent->pPrevious; - killProcess(pProc); - } else { - pProc->sleepTime = pProc->state->_sleep; - } - - // pCurrent may have been changed - pNext = pCurrent->pNext; - pCurrent = NULL; - } - - pProc = pNext; - } -} - -/** - * Reschedules all the processes to run again this query - */ -void Scheduler::rescheduleAll() { - assert(pCurrent); - - // Unlink current process - pCurrent->pPrevious->pNext = pCurrent->pNext; - if (pCurrent->pNext) - pCurrent->pNext->pPrevious = pCurrent->pPrevious; - - // Add process to the start of the active list - pCurrent->pNext = active->pNext; - active->pNext->pPrevious = pCurrent; - active->pNext = pCurrent; - pCurrent->pPrevious = active; -} - -/** - * If the specified process has already run on this tick, make it run - * again on the current tick. - */ -void Scheduler::reschedule(PPROCESS pReSchedProc) { - // If not currently processing the schedule list, then no action is needed - if (!pCurrent) - return; - - if (!pReSchedProc) - pReSchedProc = pCurrent; - - PPROCESS pEnd; - - // Find the last process in the list. - // But if the target process is down the list from here, do nothing - for (pEnd = pCurrent; pEnd->pNext != NULL; pEnd = pEnd->pNext) { - if (pEnd->pNext == pReSchedProc) - return; - } - - assert(pEnd->pNext == NULL); - - // Could be in the middle of a KillProc()! - // Dying process was last and this process was penultimate - if (pReSchedProc->pNext == NULL) - return; - - // If we're moving the current process, move it back by one, so that the next - // schedule() iteration moves to the now next one - if (pCurrent == pReSchedProc) - pCurrent = pCurrent->pPrevious; - - // Unlink the process, and add it at the end - pReSchedProc->pPrevious->pNext = pReSchedProc->pNext; - pReSchedProc->pNext->pPrevious = pReSchedProc->pPrevious; - pEnd->pNext = pReSchedProc; - pReSchedProc->pPrevious = pEnd; - pReSchedProc->pNext = NULL; -} - -/** - * Moves the specified process to the end of the dispatch queue - * allowing it to run again within the current game cycle. - * @param pGiveProc Which process - */ -void Scheduler::giveWay(PPROCESS pReSchedProc) { - // If not currently processing the schedule list, then no action is needed - if (!pCurrent) - return; - - if (!pReSchedProc) - pReSchedProc = pCurrent; - - // If the process is already at the end of the queue, nothing has to be done - if (!pReSchedProc->pNext) - return; - - PPROCESS pEnd; - - // Find the last process in the list. - for (pEnd = pCurrent; pEnd->pNext != NULL; pEnd = pEnd->pNext) - ; - assert(pEnd->pNext == NULL); - - - // If we're moving the current process, move it back by one, so that the next - // schedule() iteration moves to the now next one - if (pCurrent == pReSchedProc) - pCurrent = pCurrent->pPrevious; - - // Unlink the process, and add it at the end - pReSchedProc->pPrevious->pNext = pReSchedProc->pNext; - pReSchedProc->pNext->pPrevious = pReSchedProc->pPrevious; - pEnd->pNext = pReSchedProc; - pReSchedProc->pPrevious = pEnd; - pReSchedProc->pNext = NULL; -} - -/** - * Creates a new process. - * - * @param pid process identifier - * @param CORO_ADDR coroutine start address - * @param pParam process specific info - * @param sizeParam size of process specific info - */ -PROCESS *Scheduler::createProcess(int pid, CORO_ADDR coroAddr, const void *pParam, int sizeParam) { - PROCESS *pProc; - - // get a free process - pProc = pFreeProcesses; - - // trap no free process - assert(pProc != NULL); // Out of processes - -#ifdef DEBUG - // one more process in use - if (++numProcs > maxProcs) - maxProcs = numProcs; -#endif - - // get link to next free process - pFreeProcesses = pProc->pNext; - if (pFreeProcesses) - pFreeProcesses->pPrevious = NULL; - - if (pCurrent != NULL) { - // place new process before the next active process - pProc->pNext = pCurrent->pNext; - if (pProc->pNext) - pProc->pNext->pPrevious = pProc; - - // make this new process the next active process - pCurrent->pNext = pProc; - pProc->pPrevious = pCurrent; - - } else { // no active processes, place process at head of list - pProc->pNext = active->pNext; - pProc->pPrevious = active; - - if (pProc->pNext) - pProc->pNext->pPrevious = pProc; - active->pNext = pProc; - - } - - // set coroutine entry point - pProc->coroAddr = coroAddr; - - // clear coroutine state - pProc->state = 0; - - // wake process up as soon as possible - pProc->sleepTime = 1; - - // set new process id - pProc->pid = pid; - - // set new process specific info - if (sizeParam) { - assert(sizeParam > 0 && sizeParam <= PARAM_SIZE); - - // set new process specific info - memcpy(pProc->param, pParam, sizeParam); - } - - // return created process - return pProc; -} - -/** - * Kills the specified process. - * - * @param pKillProc which process to kill - */ -void Scheduler::killProcess(PROCESS *pKillProc) { - // make sure a valid process pointer - assert(pKillProc >= processList && pKillProc <= processList + NUM_PROCESS - 1); - - // can not kill the current process using killProcess ! - assert(pCurrent != pKillProc); - -#ifdef DEBUG - // one less process in use - --numProcs; - assert(numProcs >= 0); -#endif - - // Free process' resources - if (pRCfunction != NULL) - (pRCfunction)(pKillProc); - - delete pKillProc->state; - pKillProc->state = 0; - - // Take the process out of the active chain list - pKillProc->pPrevious->pNext = pKillProc->pNext; - if (pKillProc->pNext) - pKillProc->pNext->pPrevious = pKillProc->pPrevious; - - // link first free process after pProc - pKillProc->pNext = pFreeProcesses; - if (pFreeProcesses) - pKillProc->pNext->pPrevious = pKillProc; - pKillProc->pPrevious = NULL; - - // make pKillProc the first free process - pFreeProcesses = pKillProc; -} - - - -/** - * Returns a pointer to the currently running process. - */ -PROCESS *Scheduler::getCurrentProcess() { - return pCurrent; -} - -/** - * Returns the process identifier of the specified process. - * - * @param pProc which process - */ -int Scheduler::getCurrentPID() const { - PROCESS *pProc = pCurrent; - - // make sure a valid process pointer - assert(pProc >= processList && pProc <= processList + NUM_PROCESS - 1); - - // return processes PID - return pProc->pid; -} - -/** - * Kills any process matching the specified PID. The current - * process cannot be killed. - * - * @param pidKill process identifier of process to kill - * @param pidMask mask to apply to process identifiers before comparison - * @return The number of processes killed is returned. - */ -int Scheduler::killMatchingProcess(int pidKill, int pidMask) { - int numKilled = 0; - PROCESS *pProc, *pPrev; // process list pointers - - for (pProc = active->pNext, pPrev = active; pProc != NULL; pPrev = pProc, pProc = pProc->pNext) { - if ((pProc->pid & pidMask) == pidKill) { - // found a matching process - - // dont kill the current process - if (pProc != pCurrent) { - // kill this process - numKilled++; - - // Free the process' resources - if (pRCfunction != NULL) - (pRCfunction)(pProc); - - delete pProc->state; - pProc->state = 0; - - // make prev point to next to unlink pProc - pPrev->pNext = pProc->pNext; - if (pProc->pNext) - pPrev->pNext->pPrevious = pPrev; - - // link first free process after pProc - pProc->pNext = pFreeProcesses; - pProc->pPrevious = NULL; - pFreeProcesses->pPrevious = pProc; - - // make pProc the first free process - pFreeProcesses = pProc; - - // set to a process on the active list - pProc = pPrev; - } - } - } - -#ifdef DEBUG - // adjust process in use - numProcs -= numKilled; - assert(numProcs >= 0); -#endif - - // return number of processes killed - return numKilled; -} - -/** - * Set pointer to a function to be called by killProcess(). - * - * May be called by a resource allocator, the function supplied is - * called by killProcess() to allow the resource allocator to free - * resources allocated to the dying process. - * - * @param pFunc Function to be called by killProcess() - */ -void Scheduler::setResourceCallback(VFPTRPP pFunc) { - pRCfunction = pFunc; -} /**************************************************************************\ |*********** Stuff to do with scene and global processes ************| @@ -537,7 +70,7 @@ static void RestoredProcessProcess(CORO_PARAM, const void *param) { _ctx->pic = *(const PINT_CONTEXT *)param; _ctx->pic = RestoreInterpretContext(_ctx->pic); - AttachInterpret(_ctx->pic, g_scheduler->getCurrentProcess()); + AttachInterpret(_ctx->pic, CoroScheduler.getCurrentProcess()); CORO_INVOKE_1(Interpret, _ctx->pic); @@ -577,7 +110,7 @@ void RestoreSceneProcess(INT_CONTEXT *pic) { pStruc = (PROCESS_STRUC *)LockMem(g_hSceneProcess); for (i = 0; i < g_numSceneProcess; i++) { if (FROM_LE_32(pStruc[i].hProcessCode) == pic->hCode) { - g_scheduler->createProcess(PID_PROCESS + i, RestoredProcessProcess, + CoroScheduler.createProcess(PID_PROCESS + i, RestoredProcessProcess, &pic, sizeof(pic)); break; } @@ -596,7 +129,7 @@ void SceneProcessEvent(CORO_PARAM, uint32 procID, TINSEL_EVENT event, bool bWait CORO_BEGIN_CONTEXT; PROCESS_STRUC *pStruc; - PPROCESS pProc; + Common::PPROCESS pProc; PINT_CONTEXT pic; CORO_END_CONTEXT(_ctx); @@ -617,7 +150,7 @@ void SceneProcessEvent(CORO_PARAM, uint32 procID, TINSEL_EVENT event, bool bWait if (_ctx->pic == NULL) return; - _ctx->pProc = g_scheduler->createProcess(PID_PROCESS + i, ProcessTinselProcess, + _ctx->pProc = CoroScheduler.createProcess(PID_PROCESS + i, ProcessTinselProcess, &_ctx->pic, sizeof(_ctx->pic)); AttachInterpret(_ctx->pic, _ctx->pProc); break; @@ -644,7 +177,7 @@ void KillSceneProcess(uint32 procID) { pStruc = (PROCESS_STRUC *) LockMem(g_hSceneProcess); for (i = 0; i < g_numSceneProcess; i++) { if (FROM_LE_32(pStruc[i].processId) == procID) { - g_scheduler->killMatchingProcess(PID_PROCESS + i, -1); + CoroScheduler.killMatchingProcess(PID_PROCESS + i, -1); break; } } @@ -671,7 +204,7 @@ void RestoreGlobalProcess(INT_CONTEXT *pic) { for (i = 0; i < g_numGlobalProcess; i++) { if (g_pGlobalProcess[i].hProcessCode == pic->hCode) { - g_scheduler->createProcess(PID_GPROCESS + i, RestoredProcessProcess, + CoroScheduler.createProcess(PID_GPROCESS + i, RestoredProcessProcess, &pic, sizeof(pic)); break; } @@ -686,7 +219,7 @@ void RestoreGlobalProcess(INT_CONTEXT *pic) { void KillGlobalProcesses() { for (uint32 i = 0; i < g_numGlobalProcess; ++i) { - g_scheduler->killMatchingProcess(PID_GPROCESS + i, -1); + CoroScheduler.killMatchingProcess(PID_GPROCESS + i, -1); } } @@ -696,7 +229,7 @@ void KillGlobalProcesses() { bool GlobalProcessEvent(CORO_PARAM, uint32 procID, TINSEL_EVENT event, bool bWait, int myEscape) { CORO_BEGIN_CONTEXT; PINT_CONTEXT pic; - PPROCESS pProc; + Common::PPROCESS pProc; CORO_END_CONTEXT(_ctx); bool result = false; @@ -720,7 +253,7 @@ bool GlobalProcessEvent(CORO_PARAM, uint32 procID, TINSEL_EVENT event, bool bWai if (_ctx->pic != NULL) { - _ctx->pProc = g_scheduler->createProcess(PID_GPROCESS + i, ProcessTinselProcess, + _ctx->pProc = CoroScheduler.createProcess(PID_GPROCESS + i, ProcessTinselProcess, &_ctx->pic, sizeof(_ctx->pic)); AttachInterpret(_ctx->pic, _ctx->pProc); } @@ -745,7 +278,7 @@ void xKillGlobalProcess(uint32 procID) { for (i = 0; i < g_numGlobalProcess; ++i) { if (g_pGlobalProcess[i].processId == procID) { - g_scheduler->killMatchingProcess(PID_GPROCESS + i, -1); + CoroScheduler.killMatchingProcess(PID_GPROCESS + i, -1); break; } } diff --git a/engines/tinsel/sched.h b/engines/tinsel/sched.h index a1eafcdc47..3e791cecd8 100644 --- a/engines/tinsel/sched.h +++ b/engines/tinsel/sched.h @@ -24,105 +24,16 @@ #ifndef TINSEL_SCHED_H // prevent multiple includes #define TINSEL_SCHED_H +#include "common/coroutines.h" #include "tinsel/dw.h" // new data types -#include "tinsel/coroutine.h" #include "tinsel/events.h" +#include "tinsel/pcode.h" #include "tinsel/tinsel.h" namespace Tinsel { -// the size of process specific info -#define PARAM_SIZE 32 - -// the maximum number of processes -#define NUM_PROCESS (TinselV2 ? 70 : 64) -#define MAX_PROCESSES 70 - -typedef void (*CORO_ADDR)(CoroContext &, const void *); - -/** process structure */ -struct PROCESS { - PROCESS *pNext; ///< pointer to next process in active or free list - PROCESS *pPrevious; ///< pointer to previous process in active or free list - - CoroContext state; ///< the state of the coroutine - CORO_ADDR coroAddr; ///< the entry point of the coroutine - - int sleepTime; ///< number of scheduler cycles to sleep - int pid; ///< process ID - char param[PARAM_SIZE]; ///< process specific info -}; -typedef PROCESS *PPROCESS; - struct INT_CONTEXT; -/** - * Create and manage "processes" (really coroutines). - */ -class Scheduler { -public: - /** Pointer to a function of the form "void function(PPROCESS)" */ - typedef void (*VFPTRPP)(PROCESS *); - -private: - - /** list of all processes */ - PROCESS *processList; - - /** active process list - also saves scheduler state */ - PROCESS *active; - - /** pointer to free process list */ - PROCESS *pFreeProcesses; - - /** the currently active process */ - PROCESS *pCurrent; - -#ifdef DEBUG - // diagnostic process counters - int numProcs; - int maxProcs; - - void CheckStack(); -#endif - - /** - * Called from killProcess() to enable other resources - * a process may be allocated to be released. - */ - VFPTRPP pRCfunction; - - -public: - - Scheduler(); - ~Scheduler(); - - void reset(); - - #ifdef DEBUG - void printStats(); - #endif - - void schedule(); - void rescheduleAll(); - void reschedule(PPROCESS pReSchedProc = NULL); - void giveWay(PPROCESS pReSchedProc = NULL); - - PROCESS *createProcess(int pid, CORO_ADDR coroAddr, const void *pParam, int sizeParam); - void killProcess(PROCESS *pKillProc); - - PROCESS *getCurrentProcess(); - int getCurrentPID() const; - int killMatchingProcess(int pidKill, int pidMask = -1); - - - void setResourceCallback(VFPTRPP pFunc); - -}; - -extern Scheduler *g_scheduler; // FIXME: Temporary global var, to be used until everything has been OOifyied - //----------------- FUNCTION PROTOTYPES -------------------- void SceneProcesses(uint32 numProcess, SCNHANDLE hProcess); diff --git a/engines/tinsel/text.h b/engines/tinsel/text.h index 4c80300c46..97e82c7a93 100644 --- a/engines/tinsel/text.h +++ b/engines/tinsel/text.h @@ -24,7 +24,7 @@ #ifndef TINSEL_TEXT_H // prevent multiple includes #define TINSEL_TEXT_H -#include "tinsel/coroutine.h" +#include "common/coroutines.h" #include "tinsel/object.h" // object manager defines namespace Tinsel { diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp index cd65a4ec32..5dda836144 100644 --- a/engines/tinsel/tinlib.cpp +++ b/engines/tinsel/tinlib.cpp @@ -28,11 +28,11 @@ #define BODGE +#include "common/coroutines.h" #include "tinsel/actors.h" #include "tinsel/background.h" #include "tinsel/bmv.h" #include "tinsel/config.h" -#include "tinsel/coroutine.h" #include "tinsel/cursor.h" #include "tinsel/drives.h" #include "tinsel/dw.h" @@ -1468,7 +1468,7 @@ void NewScene(CORO_PARAM, SCNHANDLE scene, int entrance, int transition) { ++g_sceneCtr; // Prevent code subsequent to this call running before scene changes - if (g_scheduler->getCurrentPID() != PID_MASTER_SCR) + if (CoroScheduler.getCurrentPID() != PID_MASTER_SCR) CORO_KILL_SELF(); CORO_END_CODE; } @@ -2594,7 +2594,7 @@ static void Scroll(CORO_PARAM, EXTREME extreme, int xp, int yp, int xIter, int y sm.y = _ctx->y; sm.thisScroll = g_scrollNumber; sm.myEscape = myEscape; - g_scheduler->createProcess(PID_TCODE, ScrollMonitorProcess, &sm, sizeof(sm)); + CoroScheduler.createProcess(PID_TCODE, ScrollMonitorProcess, &sm, sizeof(sm)); } } CORO_END_CODE; @@ -2975,12 +2975,12 @@ static void StandTag(int actor, HPOLYGON hp) { && hFilm != TF_LEFT && hFilm != TF_RIGHT) hFilm = 0; - Stand(nullContext, actor, pnodex, pnodey, hFilm); + Stand(Common::nullContext, actor, pnodex, pnodey, hFilm); } else if (hFilm && (actor == LEAD_ACTOR || actor == GetLeadId())) - Stand(nullContext, actor, pnodex, pnodey, hFilm); + Stand(Common::nullContext, actor, pnodex, pnodey, hFilm); else - Stand(nullContext, actor, pnodex, pnodey, 0); + Stand(Common::nullContext, actor, pnodex, pnodey, 0); } diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp index 65900cc7f3..e09e2c1dcf 100644 --- a/engines/tinsel/tinsel.cpp +++ b/engines/tinsel/tinsel.cpp @@ -109,8 +109,8 @@ static Scene g_NextScene = { 0, 0, 0 }; static Scene g_HookScene = { 0, 0, 0 }; static Scene g_DelayedScene = { 0, 0, 0 }; -static PROCESS *g_pMouseProcess = 0; -static PROCESS *g_pKeyboardProcess = 0; +static Common::PROCESS *g_pMouseProcess = 0; +static Common::PROCESS *g_pKeyboardProcess = 0; static SCNHANDLE g_hCdChangeScene; @@ -324,7 +324,7 @@ static void MouseProcess(CORO_PARAM, const void *) { if (TinselV2) { // Kill off the button process and fire off the action command - g_scheduler->killMatchingProcess(PID_BTN_CLICK, -1); + CoroScheduler.killMatchingProcess(PID_BTN_CLICK, -1); PlayerEvent(PLR_ACTION, _ctx->clickPos); } else { // signal left drag start @@ -368,7 +368,7 @@ static void MouseProcess(CORO_PARAM, const void *) { // will activate a single button click if (TinselV2 && ControlIsOn()) { _ctx->clickPos = mousePos; - g_scheduler->createProcess(PID_BTN_CLICK, SingleLeftProcess, &_ctx->clickPos, sizeof(Common::Point)); + CoroScheduler.createProcess(PID_BTN_CLICK, SingleLeftProcess, &_ctx->clickPos, sizeof(Common::Point)); } } else _ctx->lastLeftClick -= _vm->_config->_dclickSpeed; @@ -616,11 +616,11 @@ static void RestoredProcess(CORO_PARAM, const void *param) { } void RestoreProcess(INT_CONTEXT *pic) { - g_scheduler->createProcess(PID_TCODE, RestoredProcess, &pic, sizeof(pic)); + CoroScheduler.createProcess(PID_TCODE, RestoredProcess, &pic, sizeof(pic)); } void RestoreMasterProcess(INT_CONTEXT *pic) { - g_scheduler->createProcess(PID_MASTER_SCR, RestoredProcess, &pic, sizeof(pic)); + CoroScheduler.createProcess(PID_MASTER_SCR, RestoredProcess, &pic, sizeof(pic)); } // FIXME: CountOut is used by ChangeScene @@ -878,7 +878,6 @@ TinselEngine::~TinselEngine() { FreeObjectList(); FreeGlobalProcesses(); FreeGlobals(); - delete _scheduler; delete _config; @@ -905,7 +904,7 @@ Common::Error TinselEngine::run() { _console = new Console(); - _scheduler = new Scheduler(); + CoroScheduler.reset(); InitSysVars(); @@ -1022,7 +1021,7 @@ void TinselEngine::NextGameCycle() { ResetEcount(); // schedule process - _scheduler->schedule(); + CoroScheduler.schedule(); if (_bmv->MoviePlaying()) _bmv->CopyMovieToScreen(); @@ -1078,11 +1077,11 @@ bool TinselEngine::pollEvent() { */ void TinselEngine::CreateConstProcesses() { // Process to run the master script - _scheduler->createProcess(PID_MASTER_SCR, MasterScriptProcess, NULL, 0); + CoroScheduler.createProcess(PID_MASTER_SCR, MasterScriptProcess, NULL, 0); // Processes to run the cursor and inventory, - _scheduler->createProcess(PID_CURSOR, CursorProcess, NULL, 0); - _scheduler->createProcess(PID_INVENTORY, InventoryProcess, NULL, 0); + CoroScheduler.createProcess(PID_CURSOR, CursorProcess, NULL, 0); + CoroScheduler.createProcess(PID_INVENTORY, InventoryProcess, NULL, 0); } /** @@ -1132,11 +1131,11 @@ void TinselEngine::RestartDrivers() { KillAllObjects(); // init the process scheduler - _scheduler->reset(); + CoroScheduler.reset(); // init the event handlers - g_pMouseProcess = _scheduler->createProcess(PID_MOUSE, MouseProcess, NULL, 0); - g_pKeyboardProcess = _scheduler->createProcess(PID_KEYBOARD, KeyboardProcess, NULL, 0); + g_pMouseProcess = CoroScheduler.createProcess(PID_MOUSE, MouseProcess, NULL, 0); + g_pKeyboardProcess = CoroScheduler.createProcess(PID_KEYBOARD, KeyboardProcess, NULL, 0); // open MIDI files OpenMidiFiles(); @@ -1164,8 +1163,8 @@ void TinselEngine::ChopDrivers() { DeleteMidiBuffer(); // remove event drivers - _scheduler->killProcess(g_pMouseProcess); - _scheduler->killProcess(g_pKeyboardProcess); + CoroScheduler.killProcess(g_pMouseProcess); + CoroScheduler.killProcess(g_pKeyboardProcess); } /** diff --git a/engines/tinsel/token.cpp b/engines/tinsel/token.cpp index c26fa40466..080c005c3c 100644 --- a/engines/tinsel/token.cpp +++ b/engines/tinsel/token.cpp @@ -31,7 +31,7 @@ namespace Tinsel { //----------------- LOCAL GLOBAL DATA -------------------- struct Token { - PROCESS *proc; + Common::PROCESS *proc; }; static Token g_tokens[NUMTOKENS]; // FIXME: Avoid non-const global vars @@ -40,7 +40,7 @@ static Token g_tokens[NUMTOKENS]; // FIXME: Avoid non-const global vars /** * Release all tokens held by this process, and kill the process. */ -static void TerminateProcess(PROCESS *tProc) { +static void TerminateProcess(Common::PROCESS *tProc) { // Release tokens held by the process for (int i = 0; i < NUMTOKENS; i++) { @@ -50,7 +50,7 @@ static void TerminateProcess(PROCESS *tProc) { } // Kill the process - g_scheduler->killProcess(tProc); + CoroScheduler.killProcess(tProc); } /** @@ -60,7 +60,7 @@ void GetControlToken() { const int which = TOKEN_CONTROL; if (g_tokens[which].proc == NULL) { - g_tokens[which].proc = g_scheduler->getCurrentProcess(); + g_tokens[which].proc = CoroScheduler.getCurrentProcess(); } } @@ -85,11 +85,11 @@ void GetToken(int which) { assert(TOKEN_LEAD <= which && which < NUMTOKENS); if (g_tokens[which].proc != NULL) { - assert(g_tokens[which].proc != g_scheduler->getCurrentProcess()); + assert(g_tokens[which].proc != CoroScheduler.getCurrentProcess()); TerminateProcess(g_tokens[which].proc); } - g_tokens[which].proc = g_scheduler->getCurrentProcess(); + g_tokens[which].proc = CoroScheduler.getCurrentProcess(); } /** @@ -99,7 +99,7 @@ void GetToken(int which) { void FreeToken(int which) { assert(TOKEN_LEAD <= which && which < NUMTOKENS); - assert(g_tokens[which].proc == g_scheduler->getCurrentProcess()); // we'd have been killed if some other proc had taken this token + assert(g_tokens[which].proc == CoroScheduler.getCurrentProcess()); // we'd have been killed if some other proc had taken this token g_tokens[which].proc = NULL; } -- cgit v1.2.3 From ac20e271730462aeb1006683a22aca2b9ab25f66 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 11 May 2012 23:11:17 +1000 Subject: CREATE_PROJECT: Updated MSVC scummvm.vcproj generation to handle coroutine compilation properly --- devtools/create_project/visualstudio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp index a0fd239db4..9bf031704e 100644 --- a/devtools/create_project/visualstudio.cpp +++ b/devtools/create_project/visualstudio.cpp @@ -144,7 +144,7 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std: void VisualStudioProvider::outputConfiguration(std::ostream &project, const BuildSetup &setup, const std::string &libraries, const std::string &config, const std::string &platform, const std::string &props, const bool isWin32) { project << "\t\t\n" - "\t\t\t\n" + "\t\t\t\n" "\t\t\t\n"; -- cgit v1.2.3 From 8153d7868b048bcea6df6e8e6c8227ccda0b83dc Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 13 May 2012 00:19:04 +1000 Subject: COMMON: Improved waiting processes to store what PIDs they're waiting for This is then used in PulseEvent to only execute processes that are specifically waiting on the given PID, rather than all waiting events. --- common/coroutines.cpp | 58 +++++++++++++++++++++++++-------------------------- common/coroutines.h | 3 ++- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/common/coroutines.cpp b/common/coroutines.cpp index fff6198c22..5a2baccfae 100644 --- a/common/coroutines.cpp +++ b/common/coroutines.cpp @@ -20,8 +20,9 @@ */ #include "common/coroutines.h" -#include "common/textconsole.h" +#include "common/algorithm.h" #include "common/system.h" +#include "common/textconsole.h" namespace Common { @@ -159,7 +160,7 @@ void CoroutineScheduler::reset() { while (pProc != NULL) { delete pProc->state; pProc->state = 0; - pProc->waiting = false; + Common::fill(&pProc->pidWaiting[0], &pProc->pidWaiting[CORO_MAX_PID_WAITING], 0); pProc = pProc->pNext; } @@ -373,8 +374,8 @@ void CoroutineScheduler::waitForSingleObject(CORO_PARAM, int pid, uint32 duratio CORO_BEGIN_CODE(_ctx); - // Signal as waiting - pCurrent->waiting = true; + // Signal the process Id this process is now waiting for + pCurrent->pidWaiting[0] = pid; _ctx->endTime = (duration == CORO_INFINITE) ? CORO_INFINITE : g_system->getMillis() + duration; if (expired) @@ -412,7 +413,7 @@ void CoroutineScheduler::waitForSingleObject(CORO_PARAM, int pid, uint32 duratio } // Signal waiting is done - pCurrent->waiting = false; + Common::fill(&pCurrent->pidWaiting[0], &pCurrent->pidWaiting[CORO_MAX_PID_WAITING], 0); CORO_END_CODE; } @@ -442,8 +443,9 @@ void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 * CORO_BEGIN_CODE(_ctx); - // Signal as waiting - pCurrent->waiting = true; + // Signal the waiting events + assert(nCount < CORO_MAX_PID_WAITING); + Common::copy(pidList, pidList + nCount, pCurrent->pidWaiting); _ctx->endTime = (duration == CORO_INFINITE) ? CORO_INFINITE : g_system->getMillis() + duration; if (expired) @@ -487,7 +489,7 @@ void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 * } // Signal waiting is done - pCurrent->waiting = false; + Common::fill(&pCurrent->pidWaiting[0], &pCurrent->pidWaiting[CORO_MAX_PID_WAITING], 0); CORO_END_CODE; } @@ -510,9 +512,6 @@ void CoroutineScheduler::sleep(CORO_PARAM, uint32 duration) { CORO_BEGIN_CODE(_ctx); - // Signal as waiting - pCurrent->waiting = true; - _ctx->endTime = g_system->getMillis() + duration; // Outer loop for doing checks until expiry @@ -521,9 +520,6 @@ void CoroutineScheduler::sleep(CORO_PARAM, uint32 duration) { CORO_SLEEP(1); } - // Signal waiting is done - pCurrent->waiting = false; - CORO_END_CODE; } @@ -848,23 +844,27 @@ void CoroutineScheduler::pulseEvent(uint32 pidEvent) { pNext = pProc->pNext; // Only call processes that are currently waiting (either in waitForSingleObject or - // waitForMultipleObjects). If one is found, execute it immediately - if (pProc->waiting) { - // Dispatch the process - pCurrent = pProc; - pProc->coroAddr(pProc->state, pProc->param); + // waitForMultipleObjects) for the given event Pid + for (int i = 0; i < CORO_MAX_PID_WAITING; ++i) { + if (pProc->pidWaiting[i] == pidEvent) { + // Dispatch the process + pCurrent = pProc; + pProc->coroAddr(pProc->state, pProc->param); + + if (!pProc->state || pProc->state->_sleep <= 0) { + // Coroutine finished + pCurrent = pCurrent->pPrevious; + killProcess(pProc); + } else { + pProc->sleepTime = pProc->state->_sleep; + } + + // pCurrent may have been changed + pNext = pCurrent->pNext; + pCurrent = NULL; - if (!pProc->state || pProc->state->_sleep <= 0) { - // Coroutine finished - pCurrent = pCurrent->pPrevious; - killProcess(pProc); - } else { - pProc->sleepTime = pProc->state->_sleep; + break; } - - // pCurrent may have been changed - pNext = pCurrent->pNext; - pCurrent = NULL; } pProc = pNext; diff --git a/common/coroutines.h b/common/coroutines.h index 3303028e1c..80748e352d 100644 --- a/common/coroutines.h +++ b/common/coroutines.h @@ -278,6 +278,7 @@ public: // the maximum number of processes #define CORO_NUM_PROCESS 100 #define CORO_MAX_PROCESSES 100 +#define CORO_MAX_PID_WAITING 5 #define CORO_INFINITE 0xffffffff #define CORO_INVALID_PID_VALUE 0 @@ -294,7 +295,7 @@ struct PROCESS { int sleepTime; ///< number of scheduler cycles to sleep uint32 pid; ///< process ID - bool waiting; ///< process is currently in a waiting state + uint32 pidWaiting[CORO_MAX_PID_WAITING]; ///< Process ID(s) process is currently waiting on char param[CORO_PARAM_SIZE]; ///< process specific info }; typedef PROCESS *PPROCESS; -- cgit v1.2.3 From 68b0412ce983899eab8dc0ce45debf17da37eba5 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 13 May 2012 00:47:28 +1000 Subject: TINSEL: Fix compiler warning --- engines/tinsel/rince.h | 1 - 1 file changed, 1 deletion(-) diff --git a/engines/tinsel/rince.h b/engines/tinsel/rince.h index b34c3f20de..623f3ee137 100644 --- a/engines/tinsel/rince.h +++ b/engines/tinsel/rince.h @@ -31,7 +31,6 @@ namespace Tinsel { struct OBJECT; -struct Common::PROCESS; enum NPS {NOT_IN, GOING_UP, GOING_DOWN, LEAVING, ENTERING}; -- cgit v1.2.3 From bd5b65f0071ecb907a8930cff8e91e565b990fb9 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 13 May 2012 18:19:40 +1000 Subject: COMMON: Fix compilation of coroutines code when COROUTINE_DEBUG is defined --- common/coroutines.cpp | 9 ++++++--- common/coroutines.h | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/common/coroutines.cpp b/common/coroutines.cpp index 5a2baccfae..d511ab4b35 100644 --- a/common/coroutines.cpp +++ b/common/coroutines.cpp @@ -21,6 +21,9 @@ #include "common/coroutines.h" #include "common/algorithm.h" +#include "common/debug.h" +#include "common/hashmap.h" +#include "common/hash-str.h" #include "common/system.h" #include "common/textconsole.h" @@ -32,7 +35,7 @@ CoroContext nullContext = NULL; DECLARE_SINGLETON(CoroutineScheduler); -#if COROUTINE_DEBUG +#ifdef COROUTINE_DEBUG namespace { static int s_coroCount = 0; @@ -64,7 +67,7 @@ static void displayCoroStats() { CoroBaseContext::CoroBaseContext(const char *func) : _line(0), _sleep(0), _subctx(0) { -#if COROUTINE_DEBUG +#ifdef COROUTINE_DEBUG _funcName = func; changeCoroStats(_funcName, +1); s_coroCount++; @@ -72,7 +75,7 @@ CoroBaseContext::CoroBaseContext(const char *func) } CoroBaseContext::~CoroBaseContext() { -#if COROUTINE_DEBUG +#ifdef COROUTINE_DEBUG s_coroCount--; changeCoroStats(_funcName, -1); debug("Deleting coro in %s at %p (subctx %p)", diff --git a/common/coroutines.h b/common/coroutines.h index 80748e352d..fed82bf3f9 100644 --- a/common/coroutines.h +++ b/common/coroutines.h @@ -43,7 +43,7 @@ namespace Common { // Enable this macro to enable some debugging support in the coroutine code. -//#define COROUTINE_DEBUG 1 +//#define COROUTINE_DEBUG /** * The core of any coroutine context which captures the 'state' of a coroutine. @@ -53,7 +53,7 @@ struct CoroBaseContext { int _line; int _sleep; CoroBaseContext *_subctx; -#if COROUTINE_DEBUG +#ifdef COROUTINE_DEBUG const char *_funcName; #endif CoroBaseContext(const char *func); -- cgit v1.2.3 From 2341570e04e50fbe3c07af349cfe21534ccc4ea7 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 13 May 2012 18:51:41 +1000 Subject: COMMON: Converted Coro context structure definitions to instead use classes. This fixes a known problem with class variables declared in a method's context definition were not having their destructors called. --- common/coroutines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/coroutines.h b/common/coroutines.h index fed82bf3f9..6df843887c 100644 --- a/common/coroutines.h +++ b/common/coroutines.h @@ -57,7 +57,7 @@ struct CoroBaseContext { const char *_funcName; #endif CoroBaseContext(const char *func); - ~CoroBaseContext(); + virtual ~CoroBaseContext(); }; typedef CoroBaseContext *CoroContext; -- cgit v1.2.3 From e23ac65799b47babe2cfb88d5436a742278f6b02 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Fri, 18 May 2012 17:13:37 +0100 Subject: DREAMWEB: Modify detection entries to allow for early UK CD Release. As this version has identical dreamweb.r00 and r02 files to the international floppy release, have added the executable to clarify between the two versions. Fixes bug #3526483 - "DREAMWEB: No speech playing in CD version" --- engines/dreamweb/detection_tables.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/engines/dreamweb/detection_tables.h b/engines/dreamweb/detection_tables.h index f7dc556a8c..70c42eeeda 100644 --- a/engines/dreamweb/detection_tables.h +++ b/engines/dreamweb/detection_tables.h @@ -41,6 +41,7 @@ static const DreamWebGameDescription gameDescriptions[] = { { {"dreamweb.r00", 0, "3b5c87717fc40cc5a5ae19c155662ee3", 152918}, {"dreamweb.r02", 0, "28458718167a040d7e988cf7d2298eae", 210466}, + {"dreamweb.exe", 0, "56b1d73aa56e964b45872ff552402341", 64985}, AD_LISTEND }, Common::EN_ANY, @@ -67,6 +68,27 @@ static const DreamWebGameDescription gameDescriptions[] = { }, }, + // UK-V (Early UK) CD Release - From bug #3526483 + // Note: r00 and r02 files are identical to international floppy release + // so was misidentified as floppy, resulting in disabled CD speech. + // Added executable to detection to avoid this. + { + { + "dreamweb", + "CD", + { + {"dreamweb.r00", 0, "3b5c87717fc40cc5a5ae19c155662ee3", 152918}, + {"dreamweb.r02", 0, "28458718167a040d7e988cf7d2298eae", 210466}, + {"dreamweb.exe", 0, "dd1c7793b151489e67b83cd1ecab51cd", -1}, + AD_LISTEND + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_CD | ADGF_TESTING, + GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) + }, + }, + // US CD release { { -- cgit v1.2.3 From 6f9e49faeb1e6e2839fce4b0ef4cd418ecdb8573 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 20 May 2012 19:54:08 +0300 Subject: SCI: Add another workaround for the map scene in TMM Thanks to TMM for details on reproducing this --- engines/sci/engine/workarounds.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 4a0aea81ff..81c6fbb246 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -321,8 +321,9 @@ const SciWorkaroundEntry kGraphRedrawBox_workarounds[] = { // gameID, room,script,lvl, object-name, method-name, call,index, workaround const SciWorkaroundEntry kGraphUpdateBox_workarounds[] = { { GID_ECOQUEST2, 100, 333, 0, "showEcorder", "changeState", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // necessary workaround for our ecorder script patch, because there isn't enough space to patch the function - { GID_PQ3, 202, 202, 0, "MapEdit", "movePt", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // when plotting crimes, gets called with 2 extra parameters - bug #3038077 { GID_PQ3, 202, 202, 0, "MapEdit", "addPt", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // when plotting crimes, gets called with 2 extra parameters - bug #3038077 + { GID_PQ3, 202, 202, 0, "MapEdit", "movePt", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // when plotting crimes, gets called with 2 extra parameters - bug #3038077 + { GID_PQ3, 202, 202, 0, "MapEdit", "dispose", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // when plotting crimes, gets called with 2 extra parameters SCI_WORKAROUNDENTRY_TERMINATOR }; -- cgit v1.2.3 From fceeca266600b82c0ef3ab4488a93f7509ff8d96 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 20 May 2012 19:56:22 +0300 Subject: SCI: Change sci_opcodes to CamelCase --- engines/sci/engine/vm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index 334d224baf..23f5a09d34 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -139,7 +139,7 @@ enum { GC_INTERVAL = 0x8000 }; -enum sci_opcodes { +enum sciOpcodes { op_bnot = 0x00, // 000 op_add = 0x01, // 001 op_sub = 0x02, // 002 -- cgit v1.2.3 From f8c24b5d8847f512c559ff5b5d7e385eebecd79e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 20 May 2012 19:57:34 +0300 Subject: SCI: Split the SCI32 graphics kernel functions in a separate file --- engines/sci/engine/kgraphics.cpp | 623 ---------------------------------- engines/sci/engine/kgraphics32.cpp | 679 +++++++++++++++++++++++++++++++++++++ engines/sci/module.mk | 1 + 3 files changed, 680 insertions(+), 623 deletions(-) create mode 100644 engines/sci/engine/kgraphics32.cpp diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index caae562d67..8bf7be4ca3 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -25,12 +25,10 @@ #include "engines/util.h" #include "graphics/cursorman.h" #include "graphics/surface.h" -#include "graphics/palette.h" // temporary, for the fadeIn()/fadeOut() functions below #include "gui/message.h" #include "sci/sci.h" -#include "sci/debug.h" // for g_debug_sleeptime_factor #include "sci/event.h" #include "sci/resource.h" #include "sci/engine/features.h" @@ -50,10 +48,7 @@ #include "sci/graphics/text16.h" #include "sci/graphics/view.h" #ifdef ENABLE_SCI32 -#include "sci/graphics/controls32.h" -#include "sci/graphics/font.h" // TODO: remove once kBitmap is moved in a separate class #include "sci/graphics/text32.h" -#include "sci/graphics/frameout.h" #endif namespace Sci { @@ -1275,622 +1270,4 @@ reg_t kRemapColors(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } -#ifdef ENABLE_SCI32 - -reg_t kIsHiRes(EngineState *s, int argc, reg_t *argv) { - // Returns 0 if the screen width or height is less than 640 or 400, - // respectively. - if (g_system->getWidth() < 640 || g_system->getHeight() < 400) - return make_reg(0, 0); - - return make_reg(0, 1); -} - -// SCI32 variant, can't work like sci16 variants -reg_t kCantBeHere32(EngineState *s, int argc, reg_t *argv) { - // TODO -// reg_t curObject = argv[0]; -// reg_t listReference = (argc > 1) ? argv[1] : NULL_REG; - - return NULL_REG; -} - -reg_t kAddScreenItem(EngineState *s, int argc, reg_t *argv) { - if (g_sci->_gfxFrameout->findScreenItem(argv[0]) == NULL) - g_sci->_gfxFrameout->kernelAddScreenItem(argv[0]); - else - g_sci->_gfxFrameout->kernelUpdateScreenItem(argv[0]); - return s->r_acc; -} - -reg_t kUpdateScreenItem(EngineState *s, int argc, reg_t *argv) { - g_sci->_gfxFrameout->kernelUpdateScreenItem(argv[0]); - return s->r_acc; -} - -reg_t kDeleteScreenItem(EngineState *s, int argc, reg_t *argv) { - g_sci->_gfxFrameout->kernelDeleteScreenItem(argv[0]); - return s->r_acc; -} - -reg_t kAddPlane(EngineState *s, int argc, reg_t *argv) { - g_sci->_gfxFrameout->kernelAddPlane(argv[0]); - return s->r_acc; -} - -reg_t kDeletePlane(EngineState *s, int argc, reg_t *argv) { - g_sci->_gfxFrameout->kernelDeletePlane(argv[0]); - return s->r_acc; -} - -reg_t kUpdatePlane(EngineState *s, int argc, reg_t *argv) { - g_sci->_gfxFrameout->kernelUpdatePlane(argv[0]); - return s->r_acc; -} - -reg_t kAddPicAt(EngineState *s, int argc, reg_t *argv) { - reg_t planeObj = argv[0]; - GuiResourceId pictureId = argv[1].toUint16(); - int16 pictureX = argv[2].toSint16(); - int16 pictureY = argv[3].toSint16(); - - g_sci->_gfxFrameout->kernelAddPicAt(planeObj, pictureId, pictureX, pictureY); - return s->r_acc; -} - -reg_t kGetHighPlanePri(EngineState *s, int argc, reg_t *argv) { - return make_reg(0, g_sci->_gfxFrameout->kernelGetHighPlanePri()); -} - -reg_t kFrameOut(EngineState *s, int argc, reg_t *argv) { - g_sci->_gfxFrameout->kernelFrameout(); - return NULL_REG; -} - -reg_t kObjectIntersect(EngineState *s, int argc, reg_t *argv) { - Common::Rect objRect1 = g_sci->_gfxCompare->getNSRect(argv[0]); - Common::Rect objRect2 = g_sci->_gfxCompare->getNSRect(argv[1]); - return make_reg(0, objRect1.intersects(objRect2)); -} - -// Tests if the coordinate is on the passed object -reg_t kIsOnMe(EngineState *s, int argc, reg_t *argv) { - uint16 x = argv[0].toUint16(); - uint16 y = argv[1].toUint16(); - reg_t targetObject = argv[2]; - uint16 illegalBits = argv[3].offset; - Common::Rect nsRect = g_sci->_gfxCompare->getNSRect(targetObject, true); - - // we assume that x, y are local coordinates - - bool contained = nsRect.contains(x, y); - if (contained && illegalBits) { - // If illegalbits are set, we check the color of the pixel that got clicked on - // for now, we return false if the pixel is transparent - // although illegalBits may get differently set, don't know yet how this really works out - uint16 viewId = readSelectorValue(s->_segMan, targetObject, SELECTOR(view)); - int16 loopNo = readSelectorValue(s->_segMan, targetObject, SELECTOR(loop)); - int16 celNo = readSelectorValue(s->_segMan, targetObject, SELECTOR(cel)); - if (g_sci->_gfxCompare->kernelIsItSkip(viewId, loopNo, celNo, Common::Point(x - nsRect.left, y - nsRect.top))) - contained = false; - } - return make_reg(0, contained); -} - -reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv) { - switch (argv[0].toUint16()) { - case 0: { - if (argc != 4) { - warning("kCreateTextBitmap(0): expected 4 arguments, got %i", argc); - return NULL_REG; - } - reg_t object = argv[3]; - Common::String text = s->_segMan->getString(readSelector(s->_segMan, object, SELECTOR(text))); - debugC(kDebugLevelStrings, "kCreateTextBitmap case 0 (%04x:%04x, %04x:%04x, %04x:%04x)", - PRINT_REG(argv[1]), PRINT_REG(argv[2]), PRINT_REG(argv[3])); - debugC(kDebugLevelStrings, "%s", text.c_str()); - uint16 maxWidth = argv[1].toUint16(); // nsRight - nsLeft + 1 - uint16 maxHeight = argv[2].toUint16(); // nsBottom - nsTop + 1 - return g_sci->_gfxText32->createTextBitmap(object, maxWidth, maxHeight); - } - case 1: { - if (argc != 2) { - warning("kCreateTextBitmap(1): expected 2 arguments, got %i", argc); - return NULL_REG; - } - reg_t object = argv[1]; - Common::String text = s->_segMan->getString(readSelector(s->_segMan, object, SELECTOR(text))); - debugC(kDebugLevelStrings, "kCreateTextBitmap case 1 (%04x:%04x)", PRINT_REG(argv[1])); - debugC(kDebugLevelStrings, "%s", text.c_str()); - return g_sci->_gfxText32->createTextBitmap(object); - } - default: - warning("CreateTextBitmap(%d)", argv[0].toUint16()); - return NULL_REG; - } -} - -reg_t kDisposeTextBitmap(EngineState *s, int argc, reg_t *argv) { - g_sci->_gfxText32->disposeTextBitmap(argv[0]); - return s->r_acc; -} - -reg_t kGetWindowsOption(EngineState *s, int argc, reg_t *argv) { - uint16 windowsOption = argv[0].toUint16(); - switch (windowsOption) { - case 0: - // Title bar on/off in Phantasmagoria, we return 0 (off) - return NULL_REG; - default: - warning("GetWindowsOption: Unknown option %d", windowsOption); - return NULL_REG; - } -} - -reg_t kWinHelp(EngineState *s, int argc, reg_t *argv) { - switch (argv[0].toUint16()) { - case 1: - // Load a help file - // Maybe in the future we can implement this, but for now this message should suffice - showScummVMDialog("Please use an external viewer to open the game's help file: " + s->_segMan->getString(argv[1])); - break; - case 2: - // Looks like some init function - break; - default: - warning("Unknown kWinHelp subop %d", argv[0].toUint16()); - } - - return s->r_acc; -} - -// Taken from the SCI16 GfxTransitions class -static void fadeOut() { - byte oldPalette[3 * 256], workPalette[3 * 256]; - int16 stepNr, colorNr; - // Sierra did not fade in/out color 255 for sci1.1, but they used it in - // several pictures (e.g. qfg3 demo/intro), so the fading looked weird - int16 tillColorNr = getSciVersion() >= SCI_VERSION_1_1 ? 255 : 254; - - g_system->getPaletteManager()->grabPalette(oldPalette, 0, 256); - - for (stepNr = 100; stepNr >= 0; stepNr -= 10) { - for (colorNr = 1; colorNr <= tillColorNr; colorNr++) { - if (g_sci->_gfxPalette->colorIsFromMacClut(colorNr)) { - workPalette[colorNr * 3 + 0] = oldPalette[colorNr * 3]; - workPalette[colorNr * 3 + 1] = oldPalette[colorNr * 3 + 1]; - workPalette[colorNr * 3 + 2] = oldPalette[colorNr * 3 + 2]; - } else { - workPalette[colorNr * 3 + 0] = oldPalette[colorNr * 3] * stepNr / 100; - workPalette[colorNr * 3 + 1] = oldPalette[colorNr * 3 + 1] * stepNr / 100; - workPalette[colorNr * 3 + 2] = oldPalette[colorNr * 3 + 2] * stepNr / 100; - } - } - g_system->getPaletteManager()->setPalette(workPalette + 3, 1, tillColorNr); - g_sci->getEngineState()->wait(2); - } -} - -// Taken from the SCI16 GfxTransitions class -static void fadeIn() { - int16 stepNr; - // Sierra did not fade in/out color 255 for sci1.1, but they used it in - // several pictures (e.g. qfg3 demo/intro), so the fading looked weird - int16 tillColorNr = getSciVersion() >= SCI_VERSION_1_1 ? 255 : 254; - - for (stepNr = 0; stepNr <= 100; stepNr += 10) { - g_sci->_gfxPalette->kernelSetIntensity(1, tillColorNr + 1, stepNr, true); - g_sci->getEngineState()->wait(2); - } -} - -/** - * Used for scene transitions, replacing (but reusing parts of) the old - * transition code. - */ -reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) { - // Can be called with 7 or 8 parameters - // The style defines which transition to perform. Related to the transition - // tables inside graphics/transitions.cpp - uint16 showStyle = argv[0].toUint16(); // 0 - 15 - reg_t planeObj = argv[1]; // the affected plane - uint16 seconds = argv[2].toUint16(); // seconds that the transition lasts - uint16 backColor = argv[3].toUint16(); // target back color(?). When fading out, it's 0x0000. When fading in, it's 0xffff - int16 priority = argv[4].toSint16(); // always 0xc8 (200) when fading in/out - uint16 animate = argv[5].toUint16(); // boolean, animate or not while the transition lasts - uint16 refFrame = argv[6].toUint16(); // refFrame, always 0 when fading in/out - int16 divisions; - - // If the game has the pFadeArray selector, another parameter is used here, - // before the optional last parameter - bool hasFadeArray = g_sci->getKernel()->findSelector("pFadeArray") > 0; - if (hasFadeArray) { - // argv[7] - divisions = (argc >= 9) ? argv[8].toSint16() : -1; // divisions (transition steps?) - } else { - divisions = (argc >= 8) ? argv[7].toSint16() : -1; // divisions (transition steps?) - } - - if (showStyle > 15) { - warning("kSetShowStyle: Illegal style %d for plane %04x:%04x", showStyle, PRINT_REG(planeObj)); - return s->r_acc; - } - - // TODO: Proper implementation. This is a very basic version. I'm not even - // sure if the rest of the styles will work with this mechanism. - - // Check if the passed parameters are the ones we expect - if (showStyle == 13 || showStyle == 14) { // fade out / fade in - if (seconds != 1) - warning("kSetShowStyle(fade): seconds isn't 1, it's %d", seconds); - if (backColor != 0 && backColor != 0xFFFF) - warning("kSetShowStyle(fade): backColor isn't 0 or 0xFFFF, it's %d", backColor); - if (priority != 200) - warning("kSetShowStyle(fade): priority isn't 200, it's %d", priority); - if (animate != 0) - warning("kSetShowStyle(fade): animate isn't 0, it's %d", animate); - if (refFrame != 0) - warning("kSetShowStyle(fade): refFrame isn't 0, it's %d", refFrame); - if (divisions >= 0 && divisions != 20) - warning("kSetShowStyle(fade): divisions isn't 20, it's %d", divisions); - } - - // TODO: Check if the plane is in the list of planes to draw - - switch (showStyle) { - //case 0: // no transition, perhaps? (like in the previous SCI versions) - case 13: // fade out - // TODO: Temporary implementation, which ignores all additional parameters - fadeOut(); - break; - case 14: // fade in - // TODO: Temporary implementation, which ignores all additional parameters - g_sci->_gfxFrameout->kernelFrameout(); // draw new scene before fading in - fadeIn(); - break; - default: - // TODO: This is all a stub/skeleton, thus we're invoking kStub() for now - kStub(s, argc, argv); - break; - } - - return s->r_acc; -} - -reg_t kCelInfo(EngineState *s, int argc, reg_t *argv) { - // Used by Shivers 1, room 23601 to determine what blocks on the red door puzzle board - // are occupied by pieces already - - switch (argv[0].toUint16()) { // subops 0 - 4 - // 0 - return the view - // 1 - return the loop - // 2, 3 - nop - case 4: { - GuiResourceId viewId = argv[1].toSint16(); - int16 loopNo = argv[2].toSint16(); - int16 celNo = argv[3].toSint16(); - int16 x = argv[4].toUint16(); - int16 y = argv[5].toUint16(); - byte color = g_sci->_gfxCache->kernelViewGetColorAtCoordinate(viewId, loopNo, celNo, x, y); - return make_reg(0, color); - } - default: { - kStub(s, argc, argv); - return s->r_acc; - } - } -} - -reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv) { - // Used by Phantasmagoria 1 and SQ6. In SQ6, it is used for the messages - // shown in the scroll window at the bottom of the screen. - - // TODO: This is all a stub/skeleton, thus we're invoking kStub() for now - kStub(s, argc, argv); - - switch (argv[0].toUint16()) { - case 0: // Init - // 2 parameters - // argv[1] points to the scroll object (e.g. textScroller in SQ6) - // argv[2] is an integer (e.g. 0x32) - break; - case 1: // Show message - // 5 or 6 parameters - // Seems to be called with 5 parameters when the narrator speaks, and - // with 6 when Roger speaks - // argv[1] unknown (usually 0) - // argv[2] the text to show - // argv[3] a small integer (e.g. 0x32) - // argv[4] a small integer (e.g. 0x54) - // argv[5] optional, unknown (usually 0) - warning("kScrollWindow: '%s'", s->_segMan->getString(argv[2]).c_str()); - break; - case 2: // Clear - // 2 parameters - // TODO - break; - case 3: // Page up - // 2 parameters - // TODO - break; - case 4: // Page down - // 2 parameters - // TODO - break; - case 5: // Up arrow - // 2 parameters - // TODO - break; - case 6: // Down arrow - // 2 parameters - // TODO - break; - case 7: // Home - // 2 parameters - // TODO - break; - case 8: // End - // 2 parameters - // TODO - break; - case 9: // Resize - // 3 parameters - // TODO - break; - case 10: // Where - // 3 parameters - // TODO - break; - case 11: // Go - // 4 parameters - // TODO - break; - case 12: // Insert - // 7 parameters - // TODO - break; - case 13: // Delete - // 3 parameters - // TODO - break; - case 14: // Modify - // 7 or 8 parameters - // TODO - break; - case 15: // Hide - // 2 parameters - // TODO - break; - case 16: // Show - // 2 parameters - // TODO - break; - case 17: // Destroy - // 2 parameters - // TODO - break; - case 18: // Text - // 2 parameters - // TODO - break; - case 19: // Reconstruct - // 3 parameters - // TODO - break; - default: - error("kScrollWindow: unknown subop %d", argv[0].toUint16()); - break; - } - - return s->r_acc; -} - -reg_t kSetFontRes(EngineState *s, int argc, reg_t *argv) { - // TODO: This defines the resolution that the fonts are supposed to be displayed - // in. Currently, this is only used for showing high-res fonts in GK1 Mac, but - // should be extended to handle other font resolutions such as those - - int xResolution = argv[0].toUint16(); - //int yResolution = argv[1].toUint16(); - - g_sci->_gfxScreen->setFontIsUpscaled(xResolution == 640 && - g_sci->_gfxScreen->getUpscaledHires() != GFX_SCREEN_UPSCALED_DISABLED); - - return s->r_acc; -} - -reg_t kFont(EngineState *s, int argc, reg_t *argv) { - // Handle font settings for SCI2.1 - - switch (argv[0].toUint16()) { - case 1: - // Set font resolution - return kSetFontRes(s, argc - 1, argv + 1); - default: - warning("kFont: unknown subop %d", argv[0].toUint16()); - } - - return s->r_acc; -} - -// TODO: Eventually, all of the kBitmap operations should be put -// in a separate class - -#define BITMAP_HEADER_SIZE 46 - -reg_t kBitmap(EngineState *s, int argc, reg_t *argv) { - // Used for bitmap operations in SCI2.1 and SCI3. - // This is the SCI2.1 version, the functionality seems to have changed in SCI3. - - switch (argv[0].toUint16()) { - case 0: // init bitmap surface - { - // 6 params, called e.g. from TextView::init() in Torin's Passage, - // script 64890 and TransView::init() in script 64884 - uint16 width = argv[1].toUint16(); - uint16 height = argv[2].toUint16(); - //uint16 skip = argv[3].toUint16(); - uint16 back = argv[4].toUint16(); // usually equals skip - //uint16 width2 = (argc >= 6) ? argv[5].toUint16() : 0; - //uint16 height2 = (argc >= 7) ? argv[6].toUint16() : 0; - //uint16 transparentFlag = (argc >= 8) ? argv[7].toUint16() : 0; - - // TODO: skip, width2, height2, transparentFlag - // (used for transparent bitmaps) - int entrySize = width * height + BITMAP_HEADER_SIZE; - reg_t memoryId = s->_segMan->allocateHunkEntry("Bitmap()", entrySize); - byte *memoryPtr = s->_segMan->getHunkPointer(memoryId); - memset(memoryPtr, 0, BITMAP_HEADER_SIZE); // zero out the bitmap header - memset(memoryPtr + BITMAP_HEADER_SIZE, back, width * height); - // Save totalWidth, totalHeight - // TODO: Save the whole bitmap header, like SSCI does - WRITE_LE_UINT16(memoryPtr, width); - WRITE_LE_UINT16(memoryPtr + 2, height); - return memoryId; - } - break; - case 1: // dispose text bitmap surface - return kDisposeTextBitmap(s, argc - 1, argv + 1); - case 2: // dispose bitmap surface, with extra param - // 2 params, called e.g. from MenuItem::dispose in Torin's Passage, - // script 64893 - warning("kBitmap(2), unk1 %d, bitmap ptr %04x:%04x", argv[1].toUint16(), PRINT_REG(argv[2])); - break; - case 3: // tiled surface - { - // 6 params, called e.g. from TiledBitmap::resize() in Torin's Passage, - // script 64869 - reg_t hunkId = argv[1]; // obtained from kBitmap(0) - // The tiled view seems to always have 2 loops. - // These loops need to have 1 cel in loop 0 and 8 cels in loop 1. - uint16 viewNum = argv[2].toUint16(); // vTiles selector - uint16 loop = argv[3].toUint16(); - uint16 cel = argv[4].toUint16(); - uint16 x = argv[5].toUint16(); - uint16 y = argv[6].toUint16(); - - byte *memoryPtr = s->_segMan->getHunkPointer(hunkId); - // Get totalWidth, totalHeight - uint16 totalWidth = READ_LE_UINT16(memoryPtr); - uint16 totalHeight = READ_LE_UINT16(memoryPtr + 2); - byte *bitmap = memoryPtr + BITMAP_HEADER_SIZE; - - GfxView *view = g_sci->_gfxCache->getView(viewNum); - uint16 tileWidth = view->getWidth(loop, cel); - uint16 tileHeight = view->getHeight(loop, cel); - const byte *tileBitmap = view->getBitmap(loop, cel); - uint16 width = MIN(totalWidth - x, tileWidth); - uint16 height = MIN(totalHeight - y, tileHeight); - - for (uint16 curY = 0; curY < height; curY++) { - for (uint16 curX = 0; curX < width; curX++) { - bitmap[(curY + y) * totalWidth + (curX + x)] = tileBitmap[curY * tileWidth + curX]; - } - } - - } - break; - case 4: // add text to bitmap - { - // 13 params, called e.g. from TextButton::createBitmap() in Torin's Passage, - // script 64894 - reg_t hunkId = argv[1]; // obtained from kBitmap(0) - Common::String text = s->_segMan->getString(argv[2]); - uint16 textX = argv[3].toUint16(); - uint16 textY = argv[4].toUint16(); - //reg_t unk5 = argv[5]; - //reg_t unk6 = argv[6]; - //reg_t unk7 = argv[7]; // skip? - //reg_t unk8 = argv[8]; // back? - //reg_t unk9 = argv[9]; - uint16 fontId = argv[10].toUint16(); - //uint16 mode = argv[11].toUint16(); - uint16 dimmed = argv[12].toUint16(); - //warning("kBitmap(4): bitmap ptr %04x:%04x, font %d, mode %d, dimmed %d - text: \"%s\"", - // PRINT_REG(bitmapPtr), font, mode, dimmed, text.c_str()); - uint16 foreColor = 255; // TODO - - byte *memoryPtr = s->_segMan->getHunkPointer(hunkId); - // Get totalWidth, totalHeight - uint16 totalWidth = READ_LE_UINT16(memoryPtr); - uint16 totalHeight = READ_LE_UINT16(memoryPtr + 2); - byte *bitmap = memoryPtr + BITMAP_HEADER_SIZE; - - GfxFont *font = g_sci->_gfxCache->getFont(fontId); - - int16 charCount = 0; - uint16 curX = textX, curY = textY; - const char *txt = text.c_str(); - - while (*txt) { - charCount = g_sci->_gfxText32->GetLongest(txt, totalWidth, font); - if (charCount == 0) - break; - - for (int i = 0; i < charCount; i++) { - unsigned char curChar = txt[i]; - font->drawToBuffer(curChar, curY, curX, foreColor, dimmed, bitmap, totalWidth, totalHeight); - curX += font->getCharWidth(curChar); - } - - curX = textX; - curY += font->getHeight(); - txt += charCount; - while (*txt == ' ') - txt++; // skip over breaking spaces - } - - } - break; - case 5: // fill with color - { - // 6 params, called e.g. from TextView::init() and TextView::draw() - // in Torin's Passage, script 64890 - reg_t hunkId = argv[1]; // obtained from kBitmap(0) - uint16 x = argv[2].toUint16(); - uint16 y = argv[3].toUint16(); - uint16 fillWidth = argv[4].toUint16(); // width - 1 - uint16 fillHeight = argv[5].toUint16(); // height - 1 - uint16 back = argv[6].toUint16(); - - byte *memoryPtr = s->_segMan->getHunkPointer(hunkId); - // Get totalWidth, totalHeight - uint16 totalWidth = READ_LE_UINT16(memoryPtr); - uint16 totalHeight = READ_LE_UINT16(memoryPtr + 2); - uint16 width = MIN(totalWidth - x, fillWidth); - uint16 height = MIN(totalHeight - y, fillHeight); - byte *bitmap = memoryPtr + BITMAP_HEADER_SIZE; - - for (uint16 curY = 0; curY < height; curY++) { - for (uint16 curX = 0; curX < width; curX++) { - bitmap[(curY + y) * totalWidth + (curX + x)] = back; - } - } - - } - break; - default: - kStub(s, argc, argv); - break; - } - - return s->r_acc; -} - -// Used for edit boxes in save/load dialogs. It's a rewritten version of kEditControl, -// but it handles events on its own, using an internal loop, instead of using SCI -// scripts for event management like kEditControl does. Called by script 64914, -// DEdit::hilite(). -reg_t kEditText(EngineState *s, int argc, reg_t *argv) { - reg_t controlObject = argv[0]; - - if (!controlObject.isNull()) { - g_sci->_gfxControls32->kernelTexteditChange(controlObject); - } - - return s->r_acc; -} - -#endif - } // End of namespace Sci diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp new file mode 100644 index 0000000000..178c5d6e43 --- /dev/null +++ b/engines/sci/engine/kgraphics32.cpp @@ -0,0 +1,679 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/system.h" + +#include "engines/util.h" +#include "graphics/cursorman.h" +#include "graphics/surface.h" +#include "graphics/palette.h" // temporary, for the fadeIn()/fadeOut() functions below + +#include "gui/message.h" + +#include "sci/sci.h" +#include "sci/event.h" +#include "sci/resource.h" +#include "sci/engine/features.h" +#include "sci/engine/state.h" +#include "sci/engine/selector.h" +#include "sci/engine/kernel.h" +#include "sci/graphics/animate.h" +#include "sci/graphics/cache.h" +#include "sci/graphics/compare.h" +#include "sci/graphics/controls16.h" +#include "sci/graphics/cursor.h" +#include "sci/graphics/palette.h" +#include "sci/graphics/paint16.h" +#include "sci/graphics/picture.h" +#include "sci/graphics/ports.h" +#include "sci/graphics/screen.h" +#include "sci/graphics/text16.h" +#include "sci/graphics/view.h" +#ifdef ENABLE_SCI32 +#include "sci/graphics/controls32.h" +#include "sci/graphics/font.h" // TODO: remove once kBitmap is moved in a separate class +#include "sci/graphics/text32.h" +#include "sci/graphics/frameout.h" +#endif + +namespace Sci { +#ifdef ENABLE_SCI32 + +extern void showScummVMDialog(const Common::String &message); + +reg_t kIsHiRes(EngineState *s, int argc, reg_t *argv) { + // Returns 0 if the screen width or height is less than 640 or 400, + // respectively. + if (g_system->getWidth() < 640 || g_system->getHeight() < 400) + return make_reg(0, 0); + + return make_reg(0, 1); +} + +// SCI32 variant, can't work like sci16 variants +reg_t kCantBeHere32(EngineState *s, int argc, reg_t *argv) { + // TODO +// reg_t curObject = argv[0]; +// reg_t listReference = (argc > 1) ? argv[1] : NULL_REG; + + return NULL_REG; +} + +reg_t kAddScreenItem(EngineState *s, int argc, reg_t *argv) { + if (g_sci->_gfxFrameout->findScreenItem(argv[0]) == NULL) + g_sci->_gfxFrameout->kernelAddScreenItem(argv[0]); + else + g_sci->_gfxFrameout->kernelUpdateScreenItem(argv[0]); + return s->r_acc; +} + +reg_t kUpdateScreenItem(EngineState *s, int argc, reg_t *argv) { + g_sci->_gfxFrameout->kernelUpdateScreenItem(argv[0]); + return s->r_acc; +} + +reg_t kDeleteScreenItem(EngineState *s, int argc, reg_t *argv) { + g_sci->_gfxFrameout->kernelDeleteScreenItem(argv[0]); + return s->r_acc; +} + +reg_t kAddPlane(EngineState *s, int argc, reg_t *argv) { + g_sci->_gfxFrameout->kernelAddPlane(argv[0]); + return s->r_acc; +} + +reg_t kDeletePlane(EngineState *s, int argc, reg_t *argv) { + g_sci->_gfxFrameout->kernelDeletePlane(argv[0]); + return s->r_acc; +} + +reg_t kUpdatePlane(EngineState *s, int argc, reg_t *argv) { + g_sci->_gfxFrameout->kernelUpdatePlane(argv[0]); + return s->r_acc; +} + +reg_t kAddPicAt(EngineState *s, int argc, reg_t *argv) { + reg_t planeObj = argv[0]; + GuiResourceId pictureId = argv[1].toUint16(); + int16 pictureX = argv[2].toSint16(); + int16 pictureY = argv[3].toSint16(); + + g_sci->_gfxFrameout->kernelAddPicAt(planeObj, pictureId, pictureX, pictureY); + return s->r_acc; +} + +reg_t kGetHighPlanePri(EngineState *s, int argc, reg_t *argv) { + return make_reg(0, g_sci->_gfxFrameout->kernelGetHighPlanePri()); +} + +reg_t kFrameOut(EngineState *s, int argc, reg_t *argv) { + g_sci->_gfxFrameout->kernelFrameout(); + return NULL_REG; +} + +reg_t kObjectIntersect(EngineState *s, int argc, reg_t *argv) { + Common::Rect objRect1 = g_sci->_gfxCompare->getNSRect(argv[0]); + Common::Rect objRect2 = g_sci->_gfxCompare->getNSRect(argv[1]); + return make_reg(0, objRect1.intersects(objRect2)); +} + +// Tests if the coordinate is on the passed object +reg_t kIsOnMe(EngineState *s, int argc, reg_t *argv) { + uint16 x = argv[0].toUint16(); + uint16 y = argv[1].toUint16(); + reg_t targetObject = argv[2]; + uint16 illegalBits = argv[3].offset; + Common::Rect nsRect = g_sci->_gfxCompare->getNSRect(targetObject, true); + + // we assume that x, y are local coordinates + + bool contained = nsRect.contains(x, y); + if (contained && illegalBits) { + // If illegalbits are set, we check the color of the pixel that got clicked on + // for now, we return false if the pixel is transparent + // although illegalBits may get differently set, don't know yet how this really works out + uint16 viewId = readSelectorValue(s->_segMan, targetObject, SELECTOR(view)); + int16 loopNo = readSelectorValue(s->_segMan, targetObject, SELECTOR(loop)); + int16 celNo = readSelectorValue(s->_segMan, targetObject, SELECTOR(cel)); + if (g_sci->_gfxCompare->kernelIsItSkip(viewId, loopNo, celNo, Common::Point(x - nsRect.left, y - nsRect.top))) + contained = false; + } + return make_reg(0, contained); +} + +reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv) { + switch (argv[0].toUint16()) { + case 0: { + if (argc != 4) { + warning("kCreateTextBitmap(0): expected 4 arguments, got %i", argc); + return NULL_REG; + } + reg_t object = argv[3]; + Common::String text = s->_segMan->getString(readSelector(s->_segMan, object, SELECTOR(text))); + debugC(kDebugLevelStrings, "kCreateTextBitmap case 0 (%04x:%04x, %04x:%04x, %04x:%04x)", + PRINT_REG(argv[1]), PRINT_REG(argv[2]), PRINT_REG(argv[3])); + debugC(kDebugLevelStrings, "%s", text.c_str()); + uint16 maxWidth = argv[1].toUint16(); // nsRight - nsLeft + 1 + uint16 maxHeight = argv[2].toUint16(); // nsBottom - nsTop + 1 + return g_sci->_gfxText32->createTextBitmap(object, maxWidth, maxHeight); + } + case 1: { + if (argc != 2) { + warning("kCreateTextBitmap(1): expected 2 arguments, got %i", argc); + return NULL_REG; + } + reg_t object = argv[1]; + Common::String text = s->_segMan->getString(readSelector(s->_segMan, object, SELECTOR(text))); + debugC(kDebugLevelStrings, "kCreateTextBitmap case 1 (%04x:%04x)", PRINT_REG(argv[1])); + debugC(kDebugLevelStrings, "%s", text.c_str()); + return g_sci->_gfxText32->createTextBitmap(object); + } + default: + warning("CreateTextBitmap(%d)", argv[0].toUint16()); + return NULL_REG; + } +} + +reg_t kDisposeTextBitmap(EngineState *s, int argc, reg_t *argv) { + g_sci->_gfxText32->disposeTextBitmap(argv[0]); + return s->r_acc; +} + +reg_t kGetWindowsOption(EngineState *s, int argc, reg_t *argv) { + uint16 windowsOption = argv[0].toUint16(); + switch (windowsOption) { + case 0: + // Title bar on/off in Phantasmagoria, we return 0 (off) + return NULL_REG; + default: + warning("GetWindowsOption: Unknown option %d", windowsOption); + return NULL_REG; + } +} + +reg_t kWinHelp(EngineState *s, int argc, reg_t *argv) { + switch (argv[0].toUint16()) { + case 1: + // Load a help file + // Maybe in the future we can implement this, but for now this message should suffice + showScummVMDialog("Please use an external viewer to open the game's help file: " + s->_segMan->getString(argv[1])); + break; + case 2: + // Looks like some init function + break; + default: + warning("Unknown kWinHelp subop %d", argv[0].toUint16()); + } + + return s->r_acc; +} + +// Taken from the SCI16 GfxTransitions class +static void fadeOut() { + byte oldPalette[3 * 256], workPalette[3 * 256]; + int16 stepNr, colorNr; + // Sierra did not fade in/out color 255 for sci1.1, but they used it in + // several pictures (e.g. qfg3 demo/intro), so the fading looked weird + int16 tillColorNr = getSciVersion() >= SCI_VERSION_1_1 ? 255 : 254; + + g_system->getPaletteManager()->grabPalette(oldPalette, 0, 256); + + for (stepNr = 100; stepNr >= 0; stepNr -= 10) { + for (colorNr = 1; colorNr <= tillColorNr; colorNr++) { + if (g_sci->_gfxPalette->colorIsFromMacClut(colorNr)) { + workPalette[colorNr * 3 + 0] = oldPalette[colorNr * 3]; + workPalette[colorNr * 3 + 1] = oldPalette[colorNr * 3 + 1]; + workPalette[colorNr * 3 + 2] = oldPalette[colorNr * 3 + 2]; + } else { + workPalette[colorNr * 3 + 0] = oldPalette[colorNr * 3] * stepNr / 100; + workPalette[colorNr * 3 + 1] = oldPalette[colorNr * 3 + 1] * stepNr / 100; + workPalette[colorNr * 3 + 2] = oldPalette[colorNr * 3 + 2] * stepNr / 100; + } + } + g_system->getPaletteManager()->setPalette(workPalette + 3, 1, tillColorNr); + g_sci->getEngineState()->wait(2); + } +} + +// Taken from the SCI16 GfxTransitions class +static void fadeIn() { + int16 stepNr; + // Sierra did not fade in/out color 255 for sci1.1, but they used it in + // several pictures (e.g. qfg3 demo/intro), so the fading looked weird + int16 tillColorNr = getSciVersion() >= SCI_VERSION_1_1 ? 255 : 254; + + for (stepNr = 0; stepNr <= 100; stepNr += 10) { + g_sci->_gfxPalette->kernelSetIntensity(1, tillColorNr + 1, stepNr, true); + g_sci->getEngineState()->wait(2); + } +} + +/** + * Used for scene transitions, replacing (but reusing parts of) the old + * transition code. + */ +reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) { + // Can be called with 7 or 8 parameters + // The style defines which transition to perform. Related to the transition + // tables inside graphics/transitions.cpp + uint16 showStyle = argv[0].toUint16(); // 0 - 15 + reg_t planeObj = argv[1]; // the affected plane + uint16 seconds = argv[2].toUint16(); // seconds that the transition lasts + uint16 backColor = argv[3].toUint16(); // target back color(?). When fading out, it's 0x0000. When fading in, it's 0xffff + int16 priority = argv[4].toSint16(); // always 0xc8 (200) when fading in/out + uint16 animate = argv[5].toUint16(); // boolean, animate or not while the transition lasts + uint16 refFrame = argv[6].toUint16(); // refFrame, always 0 when fading in/out + int16 divisions; + + // If the game has the pFadeArray selector, another parameter is used here, + // before the optional last parameter + bool hasFadeArray = g_sci->getKernel()->findSelector("pFadeArray") > 0; + if (hasFadeArray) { + // argv[7] + divisions = (argc >= 9) ? argv[8].toSint16() : -1; // divisions (transition steps?) + } else { + divisions = (argc >= 8) ? argv[7].toSint16() : -1; // divisions (transition steps?) + } + + if (showStyle > 15) { + warning("kSetShowStyle: Illegal style %d for plane %04x:%04x", showStyle, PRINT_REG(planeObj)); + return s->r_acc; + } + + // TODO: Proper implementation. This is a very basic version. I'm not even + // sure if the rest of the styles will work with this mechanism. + + // Check if the passed parameters are the ones we expect + if (showStyle == 13 || showStyle == 14) { // fade out / fade in + if (seconds != 1) + warning("kSetShowStyle(fade): seconds isn't 1, it's %d", seconds); + if (backColor != 0 && backColor != 0xFFFF) + warning("kSetShowStyle(fade): backColor isn't 0 or 0xFFFF, it's %d", backColor); + if (priority != 200) + warning("kSetShowStyle(fade): priority isn't 200, it's %d", priority); + if (animate != 0) + warning("kSetShowStyle(fade): animate isn't 0, it's %d", animate); + if (refFrame != 0) + warning("kSetShowStyle(fade): refFrame isn't 0, it's %d", refFrame); + if (divisions >= 0 && divisions != 20) + warning("kSetShowStyle(fade): divisions isn't 20, it's %d", divisions); + } + + // TODO: Check if the plane is in the list of planes to draw + + switch (showStyle) { + //case 0: // no transition, perhaps? (like in the previous SCI versions) + case 13: // fade out + // TODO: Temporary implementation, which ignores all additional parameters + fadeOut(); + break; + case 14: // fade in + // TODO: Temporary implementation, which ignores all additional parameters + g_sci->_gfxFrameout->kernelFrameout(); // draw new scene before fading in + fadeIn(); + break; + default: + // TODO: This is all a stub/skeleton, thus we're invoking kStub() for now + kStub(s, argc, argv); + break; + } + + return s->r_acc; +} + +reg_t kCelInfo(EngineState *s, int argc, reg_t *argv) { + // Used by Shivers 1, room 23601 to determine what blocks on the red door puzzle board + // are occupied by pieces already + + switch (argv[0].toUint16()) { // subops 0 - 4 + // 0 - return the view + // 1 - return the loop + // 2, 3 - nop + case 4: { + GuiResourceId viewId = argv[1].toSint16(); + int16 loopNo = argv[2].toSint16(); + int16 celNo = argv[3].toSint16(); + int16 x = argv[4].toUint16(); + int16 y = argv[5].toUint16(); + byte color = g_sci->_gfxCache->kernelViewGetColorAtCoordinate(viewId, loopNo, celNo, x, y); + return make_reg(0, color); + } + default: { + kStub(s, argc, argv); + return s->r_acc; + } + } +} + +reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv) { + // Used by Phantasmagoria 1 and SQ6. In SQ6, it is used for the messages + // shown in the scroll window at the bottom of the screen. + + // TODO: This is all a stub/skeleton, thus we're invoking kStub() for now + kStub(s, argc, argv); + + switch (argv[0].toUint16()) { + case 0: // Init + // 2 parameters + // argv[1] points to the scroll object (e.g. textScroller in SQ6) + // argv[2] is an integer (e.g. 0x32) + break; + case 1: // Show message + // 5 or 6 parameters + // Seems to be called with 5 parameters when the narrator speaks, and + // with 6 when Roger speaks + // argv[1] unknown (usually 0) + // argv[2] the text to show + // argv[3] a small integer (e.g. 0x32) + // argv[4] a small integer (e.g. 0x54) + // argv[5] optional, unknown (usually 0) + warning("kScrollWindow: '%s'", s->_segMan->getString(argv[2]).c_str()); + break; + case 2: // Clear + // 2 parameters + // TODO + break; + case 3: // Page up + // 2 parameters + // TODO + break; + case 4: // Page down + // 2 parameters + // TODO + break; + case 5: // Up arrow + // 2 parameters + // TODO + break; + case 6: // Down arrow + // 2 parameters + // TODO + break; + case 7: // Home + // 2 parameters + // TODO + break; + case 8: // End + // 2 parameters + // TODO + break; + case 9: // Resize + // 3 parameters + // TODO + break; + case 10: // Where + // 3 parameters + // TODO + break; + case 11: // Go + // 4 parameters + // TODO + break; + case 12: // Insert + // 7 parameters + // TODO + break; + case 13: // Delete + // 3 parameters + // TODO + break; + case 14: // Modify + // 7 or 8 parameters + // TODO + break; + case 15: // Hide + // 2 parameters + // TODO + break; + case 16: // Show + // 2 parameters + // TODO + break; + case 17: // Destroy + // 2 parameters + // TODO + break; + case 18: // Text + // 2 parameters + // TODO + break; + case 19: // Reconstruct + // 3 parameters + // TODO + break; + default: + error("kScrollWindow: unknown subop %d", argv[0].toUint16()); + break; + } + + return s->r_acc; +} + +reg_t kSetFontRes(EngineState *s, int argc, reg_t *argv) { + // TODO: This defines the resolution that the fonts are supposed to be displayed + // in. Currently, this is only used for showing high-res fonts in GK1 Mac, but + // should be extended to handle other font resolutions such as those + + int xResolution = argv[0].toUint16(); + //int yResolution = argv[1].toUint16(); + + g_sci->_gfxScreen->setFontIsUpscaled(xResolution == 640 && + g_sci->_gfxScreen->getUpscaledHires() != GFX_SCREEN_UPSCALED_DISABLED); + + return s->r_acc; +} + +reg_t kFont(EngineState *s, int argc, reg_t *argv) { + // Handle font settings for SCI2.1 + + switch (argv[0].toUint16()) { + case 1: + // Set font resolution + return kSetFontRes(s, argc - 1, argv + 1); + default: + warning("kFont: unknown subop %d", argv[0].toUint16()); + } + + return s->r_acc; +} + +// TODO: Eventually, all of the kBitmap operations should be put +// in a separate class + +#define BITMAP_HEADER_SIZE 46 + +reg_t kBitmap(EngineState *s, int argc, reg_t *argv) { + // Used for bitmap operations in SCI2.1 and SCI3. + // This is the SCI2.1 version, the functionality seems to have changed in SCI3. + + switch (argv[0].toUint16()) { + case 0: // init bitmap surface + { + // 6 params, called e.g. from TextView::init() in Torin's Passage, + // script 64890 and TransView::init() in script 64884 + uint16 width = argv[1].toUint16(); + uint16 height = argv[2].toUint16(); + //uint16 skip = argv[3].toUint16(); + uint16 back = argv[4].toUint16(); // usually equals skip + //uint16 width2 = (argc >= 6) ? argv[5].toUint16() : 0; + //uint16 height2 = (argc >= 7) ? argv[6].toUint16() : 0; + //uint16 transparentFlag = (argc >= 8) ? argv[7].toUint16() : 0; + + // TODO: skip, width2, height2, transparentFlag + // (used for transparent bitmaps) + int entrySize = width * height + BITMAP_HEADER_SIZE; + reg_t memoryId = s->_segMan->allocateHunkEntry("Bitmap()", entrySize); + byte *memoryPtr = s->_segMan->getHunkPointer(memoryId); + memset(memoryPtr, 0, BITMAP_HEADER_SIZE); // zero out the bitmap header + memset(memoryPtr + BITMAP_HEADER_SIZE, back, width * height); + // Save totalWidth, totalHeight + // TODO: Save the whole bitmap header, like SSCI does + WRITE_LE_UINT16(memoryPtr, width); + WRITE_LE_UINT16(memoryPtr + 2, height); + return memoryId; + } + break; + case 1: // dispose text bitmap surface + return kDisposeTextBitmap(s, argc - 1, argv + 1); + case 2: // dispose bitmap surface, with extra param + // 2 params, called e.g. from MenuItem::dispose in Torin's Passage, + // script 64893 + warning("kBitmap(2), unk1 %d, bitmap ptr %04x:%04x", argv[1].toUint16(), PRINT_REG(argv[2])); + break; + case 3: // tiled surface + { + // 6 params, called e.g. from TiledBitmap::resize() in Torin's Passage, + // script 64869 + reg_t hunkId = argv[1]; // obtained from kBitmap(0) + // The tiled view seems to always have 2 loops. + // These loops need to have 1 cel in loop 0 and 8 cels in loop 1. + uint16 viewNum = argv[2].toUint16(); // vTiles selector + uint16 loop = argv[3].toUint16(); + uint16 cel = argv[4].toUint16(); + uint16 x = argv[5].toUint16(); + uint16 y = argv[6].toUint16(); + + byte *memoryPtr = s->_segMan->getHunkPointer(hunkId); + // Get totalWidth, totalHeight + uint16 totalWidth = READ_LE_UINT16(memoryPtr); + uint16 totalHeight = READ_LE_UINT16(memoryPtr + 2); + byte *bitmap = memoryPtr + BITMAP_HEADER_SIZE; + + GfxView *view = g_sci->_gfxCache->getView(viewNum); + uint16 tileWidth = view->getWidth(loop, cel); + uint16 tileHeight = view->getHeight(loop, cel); + const byte *tileBitmap = view->getBitmap(loop, cel); + uint16 width = MIN(totalWidth - x, tileWidth); + uint16 height = MIN(totalHeight - y, tileHeight); + + for (uint16 curY = 0; curY < height; curY++) { + for (uint16 curX = 0; curX < width; curX++) { + bitmap[(curY + y) * totalWidth + (curX + x)] = tileBitmap[curY * tileWidth + curX]; + } + } + + } + break; + case 4: // add text to bitmap + { + // 13 params, called e.g. from TextButton::createBitmap() in Torin's Passage, + // script 64894 + reg_t hunkId = argv[1]; // obtained from kBitmap(0) + Common::String text = s->_segMan->getString(argv[2]); + uint16 textX = argv[3].toUint16(); + uint16 textY = argv[4].toUint16(); + //reg_t unk5 = argv[5]; + //reg_t unk6 = argv[6]; + //reg_t unk7 = argv[7]; // skip? + //reg_t unk8 = argv[8]; // back? + //reg_t unk9 = argv[9]; + uint16 fontId = argv[10].toUint16(); + //uint16 mode = argv[11].toUint16(); + uint16 dimmed = argv[12].toUint16(); + //warning("kBitmap(4): bitmap ptr %04x:%04x, font %d, mode %d, dimmed %d - text: \"%s\"", + // PRINT_REG(bitmapPtr), font, mode, dimmed, text.c_str()); + uint16 foreColor = 255; // TODO + + byte *memoryPtr = s->_segMan->getHunkPointer(hunkId); + // Get totalWidth, totalHeight + uint16 totalWidth = READ_LE_UINT16(memoryPtr); + uint16 totalHeight = READ_LE_UINT16(memoryPtr + 2); + byte *bitmap = memoryPtr + BITMAP_HEADER_SIZE; + + GfxFont *font = g_sci->_gfxCache->getFont(fontId); + + int16 charCount = 0; + uint16 curX = textX, curY = textY; + const char *txt = text.c_str(); + + while (*txt) { + charCount = g_sci->_gfxText32->GetLongest(txt, totalWidth, font); + if (charCount == 0) + break; + + for (int i = 0; i < charCount; i++) { + unsigned char curChar = txt[i]; + font->drawToBuffer(curChar, curY, curX, foreColor, dimmed, bitmap, totalWidth, totalHeight); + curX += font->getCharWidth(curChar); + } + + curX = textX; + curY += font->getHeight(); + txt += charCount; + while (*txt == ' ') + txt++; // skip over breaking spaces + } + + } + break; + case 5: // fill with color + { + // 6 params, called e.g. from TextView::init() and TextView::draw() + // in Torin's Passage, script 64890 + reg_t hunkId = argv[1]; // obtained from kBitmap(0) + uint16 x = argv[2].toUint16(); + uint16 y = argv[3].toUint16(); + uint16 fillWidth = argv[4].toUint16(); // width - 1 + uint16 fillHeight = argv[5].toUint16(); // height - 1 + uint16 back = argv[6].toUint16(); + + byte *memoryPtr = s->_segMan->getHunkPointer(hunkId); + // Get totalWidth, totalHeight + uint16 totalWidth = READ_LE_UINT16(memoryPtr); + uint16 totalHeight = READ_LE_UINT16(memoryPtr + 2); + uint16 width = MIN(totalWidth - x, fillWidth); + uint16 height = MIN(totalHeight - y, fillHeight); + byte *bitmap = memoryPtr + BITMAP_HEADER_SIZE; + + for (uint16 curY = 0; curY < height; curY++) { + for (uint16 curX = 0; curX < width; curX++) { + bitmap[(curY + y) * totalWidth + (curX + x)] = back; + } + } + + } + break; + default: + kStub(s, argc, argv); + break; + } + + return s->r_acc; +} + +// Used for edit boxes in save/load dialogs. It's a rewritten version of kEditControl, +// but it handles events on its own, using an internal loop, instead of using SCI +// scripts for event management like kEditControl does. Called by script 64914, +// DEdit::hilite(). +reg_t kEditText(EngineState *s, int argc, reg_t *argv) { + reg_t controlObject = argv[0]; + + if (!controlObject.isNull()) { + g_sci->_gfxControls32->kernelTexteditChange(controlObject); + } + + return s->r_acc; +} + +#endif + +} // End of namespace Sci diff --git a/engines/sci/module.mk b/engines/sci/module.mk index 90a0f33f06..2842e4724e 100644 --- a/engines/sci/module.mk +++ b/engines/sci/module.mk @@ -81,6 +81,7 @@ ifdef ENABLE_SCI32 MODULE_OBJS += \ graphics/controls32.o \ graphics/frameout.o \ + engine/kgraphics32.o \ graphics/paint32.o \ graphics/text32.o \ video/robot_decoder.o -- cgit v1.2.3 From 8c1ca6548d9dd656f093f7b7962612715c0bf5e9 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 20 May 2012 20:14:28 +0300 Subject: SAGA: Fix bug #3528338 - "ITE: Subtitles always shown in introduction" --- engines/saga/introproc_ite.cpp | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/engines/saga/introproc_ite.cpp b/engines/saga/introproc_ite.cpp index 9248f2b530..484ebe1779 100644 --- a/engines/saga/introproc_ite.cpp +++ b/engines/saga/introproc_ite.cpp @@ -126,21 +126,25 @@ EventColumns *Scene::ITEQueueDialogue(EventColumns *eventColumns, int n_dialogue textEntry.text = dialogue[i].i_str; entry = _vm->_scene->_textList.addEntry(textEntry); - // Display text - event.type = kEvTOneshot; - event.code = kTextEvent; - event.op = kEventDisplay; - event.data = entry; - event.time = (i == 0) ? 0 : VOICE_PAD; - eventColumns = _vm->_events->chain(eventColumns, event); + if (_vm->_subtitlesEnabled) { + // Display text + event.type = kEvTOneshot; + event.code = kTextEvent; + event.op = kEventDisplay; + event.data = entry; + event.time = (i == 0) ? 0 : VOICE_PAD; + eventColumns = _vm->_events->chain(eventColumns, event); + } - // Play voice - event.type = kEvTOneshot; - event.code = kVoiceEvent; - event.op = kEventPlay; - event.param = dialogue[i].i_voice_rn; - event.time = 0; - _vm->_events->chain(eventColumns, event); + if (_vm->_voicesEnabled) { + // Play voice + event.type = kEvTOneshot; + event.code = kVoiceEvent; + event.op = kEventPlay; + event.param = dialogue[i].i_voice_rn; + event.time = 0; + _vm->_events->chain(eventColumns, event); + } voice_len = _vm->_sndRes->getVoiceLength(dialogue[i].i_voice_rn); if (voice_len < 0) { -- cgit v1.2.3 From 6fb9511c93393a73a7177ed5fb56c3776e5f3a23 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 20 May 2012 20:26:45 +0300 Subject: SCI: Remove the hackish (and wrong) SCI32 fade code --- engines/sci/engine/kgraphics32.cpp | 75 +++++--------------------------------- 1 file changed, 9 insertions(+), 66 deletions(-) diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 178c5d6e43..786a58aae9 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -25,7 +25,6 @@ #include "engines/util.h" #include "graphics/cursorman.h" #include "graphics/surface.h" -#include "graphics/palette.h" // temporary, for the fadeIn()/fadeOut() functions below #include "gui/message.h" @@ -227,46 +226,6 @@ reg_t kWinHelp(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } -// Taken from the SCI16 GfxTransitions class -static void fadeOut() { - byte oldPalette[3 * 256], workPalette[3 * 256]; - int16 stepNr, colorNr; - // Sierra did not fade in/out color 255 for sci1.1, but they used it in - // several pictures (e.g. qfg3 demo/intro), so the fading looked weird - int16 tillColorNr = getSciVersion() >= SCI_VERSION_1_1 ? 255 : 254; - - g_system->getPaletteManager()->grabPalette(oldPalette, 0, 256); - - for (stepNr = 100; stepNr >= 0; stepNr -= 10) { - for (colorNr = 1; colorNr <= tillColorNr; colorNr++) { - if (g_sci->_gfxPalette->colorIsFromMacClut(colorNr)) { - workPalette[colorNr * 3 + 0] = oldPalette[colorNr * 3]; - workPalette[colorNr * 3 + 1] = oldPalette[colorNr * 3 + 1]; - workPalette[colorNr * 3 + 2] = oldPalette[colorNr * 3 + 2]; - } else { - workPalette[colorNr * 3 + 0] = oldPalette[colorNr * 3] * stepNr / 100; - workPalette[colorNr * 3 + 1] = oldPalette[colorNr * 3 + 1] * stepNr / 100; - workPalette[colorNr * 3 + 2] = oldPalette[colorNr * 3 + 2] * stepNr / 100; - } - } - g_system->getPaletteManager()->setPalette(workPalette + 3, 1, tillColorNr); - g_sci->getEngineState()->wait(2); - } -} - -// Taken from the SCI16 GfxTransitions class -static void fadeIn() { - int16 stepNr; - // Sierra did not fade in/out color 255 for sci1.1, but they used it in - // several pictures (e.g. qfg3 demo/intro), so the fading looked weird - int16 tillColorNr = getSciVersion() >= SCI_VERSION_1_1 ? 255 : 254; - - for (stepNr = 0; stepNr <= 100; stepNr += 10) { - g_sci->_gfxPalette->kernelSetIntensity(1, tillColorNr + 1, stepNr, true); - g_sci->getEngineState()->wait(2); - } -} - /** * Used for scene transitions, replacing (but reusing parts of) the old * transition code. @@ -299,38 +258,22 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } - // TODO: Proper implementation. This is a very basic version. I'm not even - // sure if the rest of the styles will work with this mechanism. - - // Check if the passed parameters are the ones we expect - if (showStyle == 13 || showStyle == 14) { // fade out / fade in - if (seconds != 1) - warning("kSetShowStyle(fade): seconds isn't 1, it's %d", seconds); - if (backColor != 0 && backColor != 0xFFFF) - warning("kSetShowStyle(fade): backColor isn't 0 or 0xFFFF, it's %d", backColor); - if (priority != 200) - warning("kSetShowStyle(fade): priority isn't 200, it's %d", priority); - if (animate != 0) - warning("kSetShowStyle(fade): animate isn't 0, it's %d", animate); - if (refFrame != 0) - warning("kSetShowStyle(fade): refFrame isn't 0, it's %d", refFrame); - if (divisions >= 0 && divisions != 20) - warning("kSetShowStyle(fade): divisions isn't 20, it's %d", divisions); - } + // GK1 calls fadeout (13) / fadein (14) with the following parameters: + // seconds: 1 + // backColor: 0 / -1 + // fade: 200 + // animate: 0 + // refFrame: 0 + // divisions: 0 / 20 // TODO: Check if the plane is in the list of planes to draw switch (showStyle) { //case 0: // no transition, perhaps? (like in the previous SCI versions) case 13: // fade out - // TODO: Temporary implementation, which ignores all additional parameters - fadeOut(); - break; + // TODO case 14: // fade in - // TODO: Temporary implementation, which ignores all additional parameters - g_sci->_gfxFrameout->kernelFrameout(); // draw new scene before fading in - fadeIn(); - break; + // TODO default: // TODO: This is all a stub/skeleton, thus we're invoking kStub() for now kStub(s, argc, argv); -- cgit v1.2.3 From 9feac7215efe42efe615ceac0c7b1cc8eb11f68c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 20 May 2012 20:57:59 +0300 Subject: CREATE_PROJECT: Disable edit and continue in the scummvm project Edit and continue is not compatible with the coroutine code. Previously, it was disabled in the tinsel project only, but now that the coroutine code has been moved into common, we need to disable edit and continue in the scummvm project instead --- devtools/create_project/msbuild.cpp | 4 ++-- devtools/create_project/visualstudio.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index f8768ecc73..dfd3f1d1c7 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -235,7 +235,7 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s std::map::iterator warningsIterator = _projectWarnings.find(name); // Nothing to add here, move along! - if (!setup.devTools && name != setup.projectName && name != "sword25" && name != "tinsel" && name != "grim" && warningsIterator == _projectWarnings.end()) + if (!setup.devTools && name != setup.projectName && name != "sword25" && name != "scummvm" && name != "grim" && warningsIterator == _projectWarnings.end()) return; std::string warnings = ""; @@ -250,7 +250,7 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s if (setup.devTools || name == setup.projectName || name == "sword25" || name == "grim") { project << "\t\t\tfalse\n"; } else { - if (name == "tinsel" && !isRelease) + if (name == "scummvm" && !isRelease) project << "\t\t\tProgramDatabase\n"; if (warningsIterator != _projectWarnings.end()) diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp index 9bf031704e..62b30ddcd0 100644 --- a/devtools/create_project/visualstudio.cpp +++ b/devtools/create_project/visualstudio.cpp @@ -110,7 +110,7 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std: std::string toolConfig; toolConfig = (!warnings.empty() ? "DisableSpecificWarnings=\"" + warnings + "\"" : ""); - toolConfig += (name == "tinsel" ? "DebugInformationFormat=\"3\" " : ""); + toolConfig += (name == "scummvm" ? "DebugInformationFormat=\"3\" " : ""); toolConfig += (name == "sword25" ? "DisableLanguageExtensions=\"false\" " : ""); toolConfig += (name == "grim" ? "DisableLanguageExtensions=\"false\" " : ""); -- cgit v1.2.3 From b5eac1b35b5982a86bbe6d7a672609de8ef717a0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 20 May 2012 21:35:27 +0300 Subject: SCI: Fix case of the SciOpcodes enum --- engines/sci/engine/vm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index 23f5a09d34..cdd9b9a06e 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -139,7 +139,7 @@ enum { GC_INTERVAL = 0x8000 }; -enum sciOpcodes { +enum SciOpcodes { op_bnot = 0x00, // 000 op_add = 0x01, // 001 op_sub = 0x02, // 002 -- cgit v1.2.3 From e7a7e2244e40aa1fe83ddb2dec55232831dfa6a8 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 20 May 2012 22:44:51 +0100 Subject: I18N: Update translations file from source code --- po/ca_ES.po | 594 +++++++++++++++++++++++++++++++++++--------------------- po/cs_CZ.po | 596 +++++++++++++++++++++++++++++++++++--------------------- po/da_DA.po | 594 +++++++++++++++++++++++++++++++++++--------------------- po/de_DE.po | 598 +++++++++++++++++++++++++++++++++++---------------------- po/es_ES.po | 594 +++++++++++++++++++++++++++++++++++--------------------- po/eu.po | 596 +++++++++++++++++++++++++++++++++++--------------------- po/fr_FR.po | 594 +++++++++++++++++++++++++++++++++++--------------------- po/hu_HU.po | 594 +++++++++++++++++++++++++++++++++++--------------------- po/it_IT.po | 594 +++++++++++++++++++++++++++++++++++--------------------- po/nb_NO.po | 594 +++++++++++++++++++++++++++++++++++--------------------- po/nn_NO.po | 592 +++++++++++++++++++++++++++++++++++--------------------- po/pl_PL.po | 594 +++++++++++++++++++++++++++++++++++--------------------- po/pt_BR.po | 594 +++++++++++++++++++++++++++++++++++--------------------- po/ru_RU.po | 598 +++++++++++++++++++++++++++++++++++---------------------- po/scummvm.pot | 587 ++++++++++++++++++++++++++++++++++--------------------- po/se_SE.po | 594 +++++++++++++++++++++++++++++++++++--------------------- po/uk_UA.po | 594 +++++++++++++++++++++++++++++++++++--------------------- 17 files changed, 6304 insertions(+), 3797 deletions(-) diff --git a/po/ca_ES.po b/po/ca_ES.po index 4c0ad8bbbe..35d5810ed6 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2011-10-04 20:51+0100\n" "Last-Translator: Jordi Vilalta Prat \n" "Language-Team: Catalan \n" @@ -43,7 +43,7 @@ msgid "Go up" msgstr "Amunt" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -68,15 +68,15 @@ msgstr "Tanca" msgid "Mouse click" msgstr "Clic del ratolí" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Mostra el teclat" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Assigna les tecles" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 #, fuzzy msgid "Toggle FullScreen" msgstr "Commuta la pantalla completa" @@ -89,8 +89,8 @@ msgstr "Sel msgid "Map" msgstr "Assigna" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -127,15 +127,15 @@ msgstr "Seleccioneu una acci msgid "Press the key to associate" msgstr "Premeu la tecla a associar" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "Joc" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "Identificador:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -143,29 +143,29 @@ msgstr "" "Identificador de joc curt utilitzat per referir-se a les partides i per " "executar el joc des de la línia de comandes" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "Nom:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Títol complet del joc" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "Nom:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Idioma:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" @@ -173,283 +173,288 @@ msgstr "" "Idioma del joc. Això no convertirà la vostra versió Espanyola del joc a " "Anglès" -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "Plataforma:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Plataforma per la que el joc es va dissenyar originalment" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "Platafor.:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "Examina" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Gràfics" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "GFX" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "Fer canvis sobre les opcions globals de gràfics" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "Canviar les opcions de gràfics" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Àudio" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "Fer canvis sobre les opcions globals d'àudio" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "Canviar les opcions d'àudio" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Volum" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Volum" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "Fer canvis sobre les opcions globals de volum" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "Canviar les opcions de volum" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "Fer canvis sobre les opcions globals de MIDI" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Canviar les opcions de MIDI" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "Fer canvis sobre les opcions globals de MT-32" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Canviar les opcions de MT-32" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Camins" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Camins" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "Camí del joc:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "Camí joc:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Camí extra:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Especifica el camí de dades addicionals utilitzades pel joc" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Camí extra:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Camí de partides:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Especifica on es desaran les partides" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Partides:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Cap" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Per defecte" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Seleccioneu el fitxer SoundFont" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Seleccioneu el directori amb les dades del joc" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "Seleccioneu el directori addicional del joc" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "Seleccioneu el directori de les partides desades" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "" "Aquest identificador de joc ja està en ús. Si us plau, trieu-ne un altre." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~T~anca" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Surt de ScummVM" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "~Q~uant a..." -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "Quant a ScummVM" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~O~pcions..." -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "Canvia les opcions globals de ScummVM" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "~I~nicia" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "Iniciant el joc seleccionat" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~C~arrega..." -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "Carrega una partida pel joc seleccionat" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~A~fegeix Joc..." -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Mantingueu premut Shift per a l'Addició Massiva" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "~E~dita Joc..." -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Canvia les opcions del joc" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "~S~uprimeix Joc" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "" "Elimina un joc de la llista. Els fitxers de dades del joc es mantenen " "intactes" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~A~fegeix Joc..." -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "~E~dita Joc..." -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "~S~uprimeix" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "Cerca a la llista de jocs" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Cerca:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "Carrega partida:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Carrega" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." @@ -457,7 +462,7 @@ msgstr "" "Esteu segur que voleu executar el detector massiu de jocs? Això pot afegir " "una gran quantitat de jocs." -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -465,7 +470,7 @@ msgstr "" msgid "Yes" msgstr "Sí" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -473,37 +478,37 @@ msgstr "S msgid "No" msgstr "No" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM no ha pogut obrir el directori especificat!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "ScummVM no ha pogut trobar cap joc al directori especificat!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "Seleccioneu el joc:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "Realment voleu suprimir la configuració d'aquest joc?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "Aquest joc no suporta la càrrega de partides des del llançador." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "" "ScummVM no ha pogut trobar cap motor capaç d'executar el joc seleccionat!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "Afegeix Jocs" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "Addició Massiva..." @@ -571,101 +576,93 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Cap" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "No s'han pogut aplicar alguns canvis de les opcions gràfiques:" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "no s'ha pogut canviar el mode de vídeo" -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "no s'ha pogut canviar l'ajust de pantalla completa" -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "no s'ha pogut canviar l'ajust de la correcció d'aspecte" -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "Mode gràfic:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "Mode de pintat:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Modes de tramat especials suportats per alguns jocs" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Mode pantalla completa" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "Correcció de la relació d'aspecte" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "Corregeix la relació d'aspecte per jocs de 320x200" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "Elimina el tramat d'EGA" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "Activa l'eliminació del tramat en els jocs EGA que ho suportin" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "Disp. preferit:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "Disp. de música:" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "Especifica el dispositiu de so o l'emulador de tarja de so preferit" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Especifica el dispositiu de so o l'emulador de tarja de so de sortida" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Disp. preferit:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "Disp. de música:" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "Emulador AdLib:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib s'utilitza per la música de molts jocs" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "Freq. sortida:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -673,63 +670,63 @@ msgstr "" "Valors més alts especifiquen millor qualitat de so però pot ser que la " "vostra tarja de so no ho suporti" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "Dispositiu GM:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "" "Especifica el dispositiu de so per defecte per a la sortida General MIDI" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "No utilitzis música General MIDI" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "Utilitza el primer dispositiu disponible" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "Fitxer SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "Algunes targes de so, Fluidsynth i Timidity suporten SoundFont" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "Mode combinat AdLib/MIDI" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "Utilitza MIDI i la generació de so AdLib alhora" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "Guany MIDI:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "Disposit. MT-32:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Especifica el dispositiu de so per defecte per a la sortida de Roland MT-32/" "LAPC1/CM32l/CM64" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Roland MT-32 real (desactiva l'emulació GM)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -737,196 +734,196 @@ msgstr "" "Marqueu si voleu utilitzar el vostre dispositiu hardware real de so " "compatible amb Roland connectat al vostre ordinador" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Roland MT-32 real (sense emulació GM)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "Activa el Mode Roland GS" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "" "Desactiva la conversió General MIDI pels jocs que tenen banda sonora per a " "Roland MT-32" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "No utilitzis música de Roland MT-32" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "Text i Veus:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Veus" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Subtítols" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "Ambdós" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "Velocitat de subt.:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "Text i Veus:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "Veus" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "Subt" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "Ambdós" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "Mostra els subtítols i reprodueix la veu" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Veloc. de subt.:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "Volum de música:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "Volum de música:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "Silenciar tot" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "Volum d'efectes:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Volum dels sons d'efectes especials" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "Volum d'efectes:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "Volum de veus:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "Volum de veus:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "Camí dels temes:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "Camí temes:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Especifica el camí de les dades addicionals utilitzades per tots els jocs o " "pel ScummVM" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "Camí dels connectors:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "Camí de connectors:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Misc" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Misc" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "Pintat GUI:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "Desat automàtic:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "Auto-desat:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "Tecles" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "Idioma GUI:" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "Idioma de la interfície d'usuari de ScummVM" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Heu de reiniciar ScummVM perquè tots els canvis tinguin efecte." -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "Seleccioneu el directori de les partides desades" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "" "No es pot escriure al directori seleccionat. Si us plau, escolliu-ne un " "altre." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "Seleccioneu el directori dels temes" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "Seleccioneu el directori dels fitxers extra" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "Seleccioneu el directori dels connectors" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -974,64 +971,64 @@ msgstr "Partida sense t msgid "Select a Theme" msgstr "Seleccioneu un Tema" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "GFX desactivats" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX desactivats" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "Pintat estàndard (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "Estàndard (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "Pintat amb antialias (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "Amb antialias (16bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Neteja el valor" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "El motor no suporta el nivell de depuració '%s'" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "Menú" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Salta" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pausa" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "Salta la línia" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "Error al executar el joc:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "No s'ha pogut trobar cap motor capaç d'executar el joc seleccionat" @@ -1099,17 +1096,17 @@ msgstr "Cancel msgid "Unknown error" msgstr "Error desconegut" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "El joc a '%s' sembla ser desconegut." -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Informeu de la següent informació a l'equip de ScummVM juntament amb el" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "nom del joc que heu provat d'afegir i la seva versió/llengua/etc.:" @@ -1146,13 +1143,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~R~etorna al Llançador" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "Desa la partida:" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1260,6 +1258,88 @@ msgstr "" msgid "Start anyway" msgstr "Inicia de totes maneres" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "Recupera la partida:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "Restaura" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "Element superior dret" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "Elimina el tramat d'EGA" + +#: engines/sci/detection.cpp:371 +#, fuzzy +msgid "Enable undithering in EGA games" +msgstr "Activa l'eliminació del tramat en els jocs EGA que ho suportin" + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "Volum dels sons d'efectes especials" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "Cursor normal" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1917,7 +1997,7 @@ msgstr "" "El suport de MIDI natiu requereix l'actualització Roland de LucasArts,\n" "però no s'ha trobat %s. S'utilitzarà AdLib." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1928,7 +2008,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1939,7 +2019,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1986,14 +2066,6 @@ msgstr "~M~en msgid "~W~ater Effect Enabled" msgstr "~E~fecte de l'aigua activat" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "Recupera la partida:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "Restaura" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2016,6 +2088,66 @@ msgstr "No s'ha pogut esborrar el fitxer." msgid "Failed to save game" msgstr "No s'ha pogut desar l'estat del joc" +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "Activa el Mode Roland GS" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "Cursor normal" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "" @@ -2084,6 +2216,14 @@ msgstr "" "Roland MT32 als de General MIDI. És possible\n" "que algunes pistes no es reprodueixin correctament." +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2167,6 +2307,14 @@ msgstr "" "S'han trobat escenes en DXA, però s'ha compilat el ScummVM sense suport de " "zlib" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2403,19 +2551,19 @@ msgstr "Alta qualitat d' msgid "Disable power off" msgstr "Desactiva l'apagat automàtic" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "S'ha activat el mode de clic-i-arrossega." -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "S'ha desactivat el mode clic-i-arrossega." -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "Mode Touchpad activat." -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "Mode Touchpad desactivat." @@ -2492,15 +2640,15 @@ msgstr "Filtre de gr msgid "Windowed mode" msgstr "Mode de finestra" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL Normal" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL Conserva" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL Original" diff --git a/po/cs_CZ.po b/po/cs_CZ.po index 9d786be555..f6005d02f1 100644 --- a/po/cs_CZ.po +++ b/po/cs_CZ.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.4.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2012-03-17 19:07+0100\n" "Last-Translator: Zbynìk Schwarz \n" "Language-Team: \n" -"Language: Cesky\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-2\n" "Content-Transfer-Encoding: 8bit\n" +"Language: Cesky\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n" "X-Poedit-Language: Czech\n" "X-Poedit-Country: CZECH REPUBLIC\n" @@ -47,7 +47,7 @@ msgid "Go up" msgstr "Jít nahoru" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -72,15 +72,15 @@ msgstr "Zav msgid "Mouse click" msgstr "Kliknutí my¹í" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Zobrazit klávesnici" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Pøemapovat klávesy" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 msgid "Toggle FullScreen" msgstr "Pøepnout celou obrazovku" @@ -92,8 +92,8 @@ msgstr "Zvolte msgid "Map" msgstr "Mapovat" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -130,15 +130,15 @@ msgstr "Pros msgid "Press the key to associate" msgstr "Zmáèknìte klávesu pro pøiøazení" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "Hra" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -146,308 +146,313 @@ msgstr "" "Krátký identifikátor her, pou¾ívaný jako odkaz k ulo¾eným hrám a spu¹tìní " "hry z pøíkazového øádku" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "Jméno" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Úplný název hry" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "Jméno:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Jazyk:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" msgstr "Jazyk hry. Toto z Va¹í ©panìlské verze neudìlá Anglickou" -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "Platforma:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Platforma, pro kterou byla hra pùvodnì vytvoøena" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "Platforma:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "Prohlédnout" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Obraz" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "GFX" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "Potlaèit globální nastavení obrazu" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "Potlaèit globální nastavení obrazu" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Zvuk" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "Potlaèit globální nastavení zvuku" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "Potlaèit globální nastavení zvuku" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Hlasitost" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Hlasitost" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "Potlaèit globální nastavení hlasitosti" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "Potlaèit globální nastavení hlasitosti" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "Potlaèit globální nastavení MIDI" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Potlaèit globální nastavení MIDI" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "Potlaèit globální nastavení MT-32" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Potlaèit globální nastavení MT-32" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Cesty" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Cesty" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "Cesta Hry:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "Cesta Hry:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Dodateèná Cesta:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Stanoví cestu pro dodateèná data pou¾itá ve høe" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Dodateèná Cesta:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Cesta pro ulo¾ení:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Stanovuje, kam jsou umístìny Va¹e ulo¾ené hry" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Cesta pro ulo¾ení:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "®ádné" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Výchozí" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Vybrat SoundFont" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Vyberte adresáø s daty hry" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "Vyberte dodateèný adresáø hry" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "Vyberte adresáø pro ulo¾ené hry" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "Toto ID hry je u¾ zabrané. Vyberte si, prosím, jiné." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~U~konèit" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Ukonèit ScummVM" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "~O~ Programu..." -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "O ScummVM" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~V~olby..." -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "Zmìnit globální volby ScummVM" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "~S~pustit" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "Spustit zvolenou hru" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~N~ahrát..." -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "Nahrát ulo¾enou pozici pro zvolenou hru" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~P~øidat hru..." -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Podr¾te Shift pro Hromadné Pøidání" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "~U~pravit Hru..." -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Zmìnit volby hry" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "~O~dstranit Hru" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Odstranit hru ze seznamu. Herní data zùstanou zachována" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~P~øidat hru..." -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "~U~pravit hru..." -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "~O~dstranit hru" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "Hledat v seznamu her" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Hledat:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "Nahrát hru:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Nahrát" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." @@ -455,7 +460,7 @@ msgstr "" "Opravdu chcete spustit hromadnou detekci her? Toto by mohlo potenciálnì " "pøidat velkou spoustu her. " -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -463,7 +468,7 @@ msgstr "" msgid "Yes" msgstr "Ano" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -471,36 +476,36 @@ msgstr "Ano" msgid "No" msgstr "Ne" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM nemohl tento adresáø otevøít!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "ScummVM nemohl v zadaném adresáøi najít ¾ádnou hru!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "Vybrat hru:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "Opravdu chcete odstranit nastavení této hry?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "Tato hra nepodporuje spou¹tìní her ze spou¹tìèe" -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "ScummVM nemohl najít ¾ádné jádro schopné vybranou hru spustit!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "Hromadné Pøidání..." -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "Hromadné Pøidání..." @@ -567,101 +572,93 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "®ádné" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "Nelze pou¾ít nìkteré zmìny mo¾ností grafiky:" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "re¾im obrazu nemohl být zmìnìn." -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "nastavení celé obrazovky nemohlo být zmìnìno" -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "nastavení pomìru stran nemohlo být zmìnìno" -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "Re¾im obrazu:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "Re¾im vykreslení:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Speciální re¾imy chvìní podporované nìkterými hrami" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Re¾im celé obrazovky" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "Korekce pomìru stran" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "Korigovat pomìr stran pro hry 320x200" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "Nerozkládání EGA" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "Povolit nerozkládání v EGA hrách, které to podporují" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "Prioritní Zaøízení:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "Hudební zaøízení" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "Stanoví prioritní zvukové zaøízení nebo emulátor zvukové karty" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Stanoví výstupní zvukové zaøízení nebo emulátor zvukové karty" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Prioritní Zaø.:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "Hudební zaøízení" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "AdLib emulátor" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib se pou¾ívá pro hudbu v mnoha hrách" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "Výstup. frekvence:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -669,62 +666,62 @@ msgstr "" "Vy¹¹í hodnota zpùsobí lep¹í kvalitu zvuku, ale nemusí být podporována Va¹i " "zvukovou kartou" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "GM Zaøízení:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "Stanoví výchozí zvukové zaøízení pro výstup General MIDI" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "Nepou¾ívat hudbu General MIDI" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "Pou¾ít první dostupné zaøízení" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "" "SoundFont je podporován nìkterými zvukovými kartami, Fluidsynth a Timidity" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "Smí¹ený re¾im AdLib/MIDI" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "Pou¾ít obì zvukové generace MIDI a AdLib" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "Zesílení MIDI:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "Zaøízení MT-32:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Stanoví výchozí zvukové výstupní zaøízení pro Roland MT-32/LAPC1/CM32l/CM64" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Opravdový Roland MT-32 (vypne GM emulaci)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -732,190 +729,190 @@ msgstr "" "Za¹krtnìte, pokud chcete pou¾ít pravé hardwarové zaøízení kompatibilní s " "Roland, pøipojené k Va¹emu poèítaèi" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Opravdový Roland MT-32 (¾ádná GM emulace)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "Zapnout re¾im Roland GS" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "Vypne mapování General MIDI pro hry s Roland MT-32 zvukovým doprovodem" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "Nepou¾ívat hudbu Roland MT-32" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "Text a Øeè" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Øeè" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Titulky" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "Oba" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "Rychlost titulkù:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "Text a Øeè:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "Øeè" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "Titl" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "Oba" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "Zobrazit titulky a pøehrávat øeè" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Rychlost titulkù" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "Hlasitost hudby" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "Hlasitost hudby" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "Ztlumit V¹e" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "Hlasitost zvukù" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Hlasitost speciálních zvukových efektù" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "Hlasitost zvukù" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "Hlasitost øeèi" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "Hlasitost øeèi" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "Cesta ke Vzhledu:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "Cesta ke Vzhledu:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Stanoví cestu k dodateèným datùm pou¾ívaná v¹emi hrami nebo ScummVM" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "Cesta k Pluginùm:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "Cesta k Pluginùm:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Rùzné" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Rùzné" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "Vzhled:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "GUI Vykreslovaè:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "Autoukládání:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "Autoukládání:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "Klávesy" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "Jazyk GUI" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "Jazyk GUI ScummVM" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Pro pou¾ití tìchto nastavení musíte restartovat ScummVM." -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "Vybrat adresáø pro ulo¾ené hry" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Do zvoleného adresáøe nelze zapisovat. Vyberte, prosím, jiný." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "Vyberte adresáø pro vhledy GUI" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "Vyberte adresáø pro dodateèné soubory" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "Vyberte adresáø pro zásuvné moduly" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -963,64 +960,64 @@ msgstr "Bezejmenn msgid "Select a Theme" msgstr "Vyberte Vzhled" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "GFX zakázáno" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX zakázáno" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "Standardní Vykreslovaè (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "Standardní (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "Vykreslovaè s vyhlazenými hranami (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "S vyhlazenými hranami (16bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Vyèistit hodnotu" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Jádro nepodporuje úroveò ladìní '%s'" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "Menu" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Pøeskoèit" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pauza" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "Pøeskoèit øádek" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "Chyba pøi spu¹tìní hry:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "Nelze nalézt ¾ádné jádro schopné vybranou hru spustit" @@ -1088,16 +1085,16 @@ msgstr "Zru msgid "Unknown error" msgstr "Neznámá chyba" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Hra v '%s' se zdá být neznámá." -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Prosím nahlaste následující data týmu ScummVM spolu se jménem" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "hry, kterou jste se pokusili pøidat a její verzi/jazyk/atd.:" @@ -1134,13 +1131,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~N~ávrat do Spou¹tìèe" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "Ulo¾it hru:" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1249,6 +1247,88 @@ msgstr "" msgid "Start anyway" 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 "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "Obnovit hru" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "Obnovit" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "Polo¾ka vpravo nahoøe" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: 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í" + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "Hlasitost speciálních zvukových efektù" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "Obyèejný kurzor" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1905,7 +1985,7 @@ msgstr "" "Pøirozená podpora MIDI vy¾aduje Aktualizaci Roland od LucasArts,\n" "ale %s chybí. Místo toho je pou¾it AdLib." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1916,7 +1996,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1927,7 +2007,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1974,14 +2054,6 @@ msgstr "~H~lavn msgid "~W~ater Effect Enabled" msgstr "~E~fekt Vody Zapnut" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "Obnovit hru" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "Obnovit" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2004,6 +2076,66 @@ msgstr "Nelze smazat soubor." msgid "Failed to save game" msgstr "Nelze ulo¾it hru." +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "Zapnout re¾im Roland GS" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "Útok 1" @@ -2066,6 +2198,14 @@ msgstr "" "ty od General MIDI. Po tomto se mù¾e stát,\n" "¾e pár stop nebude správnì pøehráno." +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2144,6 +2284,14 @@ msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "Videa PSX nalezena, ale ScummVM byl sestaven bez podpory barev RGB" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2378,19 +2526,19 @@ msgstr "Vysok msgid "Disable power off" msgstr "Zakázat vypnutí" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "Re¾im pøetáhnutí my¹i zapnut." -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "Re¾im pøetáhnutí my¹i vypnut." -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "Touchpad re¾im zapnut" -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "Touchpad re¾im vypnut" @@ -2466,15 +2614,15 @@ msgstr "Aktivn msgid "Windowed mode" msgstr "Re¾im do okna" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL Normální" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL Zachovávající" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL Pùvodní" diff --git a/po/da_DA.po b/po/da_DA.po index 59f7ae63a7..76374027ba 100644 --- a/po/da_DA.po +++ b/po/da_DA.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2011-01-08 22:53+0100\n" "Last-Translator: Steffen Nyeland \n" "Language-Team: Steffen Nyeland \n" @@ -43,7 +43,7 @@ msgid "Go up" msgstr "Gå op" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -68,15 +68,15 @@ msgstr "Luk" msgid "Mouse click" msgstr "Muse klik" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Vis tastatur" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Kortlæg taster" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 #, fuzzy msgid "Toggle FullScreen" msgstr "Skift fuldskærm" @@ -89,8 +89,8 @@ msgstr "V msgid "Map" msgstr "Kortlæg" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -127,15 +127,15 @@ msgstr "V msgid "Press the key to associate" msgstr "Tryk tasten for at tilknytte" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "Spil" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -143,29 +143,29 @@ msgstr "" "Kort spil identifikator til brug for gemmer, og for at køre spillet fra " "kommandolinien" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "Navn:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Fuld titel på spillet" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "Navn:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Sprog:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" @@ -173,280 +173,285 @@ msgstr "" "Spillets sprog. Dette vil ikke ændre din spanske version af spillet til " "engelsk" -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "Platform:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Platform som spillet oprindeligt var designet til" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "Platform:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "Undersøg" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Grafik" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "GFX" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "Overstyr globale grafik indstillinger" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "Overstyr globale grafik indstillinger" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Lyd" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "Overstyr globale lyd indstillinger" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "Overstyr globale lyd indstillinger" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Lydstyrke" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Lydstyrke" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "Overstyr globale lydstyrke indstillinger" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "Overstyr globale lydstyrke indstillinger" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "Overstyr globale MIDI indstillinger" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Overstyr globale MIDI indstillinger" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "Overstyr globale MT-32 indstillinger" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Overstyr globale MT-32 indstillinger" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Stier" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Stier" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "Spil sti:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "Spil sti:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Ekstra sti:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Angiver sti til ekstra data der bruges i spillet" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Ekstra sti:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Gemme sti:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Angiver hvor dine gemmer bliver lagt" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Gemme sti:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Ingen" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standard" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Vælg SoundFont" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Vælg bibliotek med spil data" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "Vælg ekstra spil bibliotek" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "Vælg bibliotek til spil gemmer" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "Dette spil ID er allerede i brug. Vælg venligst et andet." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~A~fslut" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Slut ScummVM" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "~O~m..." -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "Om ScummVM" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~I~ndstillinger..." -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "Ændre globale ScummVM indstillinger" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "~S~tart" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "Start det valgte spil" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~H~ent..." -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "Hent gemmer for det valgte spil" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~T~ilføj spil..." -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Hold Skift for at tilføje flere" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "~R~ediger spil..." -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Ændre spil indstillinger" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "~F~jern spil" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Fjerner spil fra listen. Spillets data filer forbliver uberørt" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~T~ilføj spil..." -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "~R~ediger spil..." -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "~F~jern spil" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "Søg i spil liste" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Søg:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "Indlæs spil:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Indlæs" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." @@ -454,7 +459,7 @@ msgstr "" "Vil du virkelig køre fler spils detektoren? Dette kunne potentielt tilføje " "et stort antal spil." -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -462,7 +467,7 @@ msgstr "" msgid "Yes" msgstr "Ja" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -470,37 +475,37 @@ msgstr "Ja" msgid "No" msgstr "Nej" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM kunne ikke åbne det angivne bibliotek!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "ScummVM kunne ikke finde noget spil i det angivne bibliotek!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "Vælg spillet:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "Vil du virkelig fjerne denne spil konfiguration?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "Dette spil understøtter ikke hentning af spil fra spiloversigten." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "" "ScummVM kunne ikke finde en motor, istand til at afvikle det valgte spil!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "Tilføj flere..." -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "Tilføj flere..." @@ -567,101 +572,93 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Ingen" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "" -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "" -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "" -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "Grafik tilstand:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "Rendere tilstand:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Speciel farvereduceringstilstand understøttet a nogle spil" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Fuldskærms tilstand" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "Billedformat korrektion" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "Korrekt billedformat til 320x200 spil" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "EGA farveforøgelse" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "Aktiver farveforøgelse i EGA spil der understøtter det" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "Foretruk. enhed:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "Musik enhed:" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "Angiver foretukket lyd enhed eller lydkort emulator" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Angiver lyd udgangsenhed eller lydkorts emulator" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Foretruk. enh.:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "Musik enhed:" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "AdLib emulator:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib bliver brugt til musik i mange spil" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "Udgangsfrekvens:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -669,60 +666,60 @@ msgstr "" "Højere værdi angiver bedre lyd kvalitet, men understøttes måske ikke af dit " "lydkort" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "GM enhed:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "Angiver standard lyd enhed for General MIDI udgang" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "Brug ikke General MIDI musik" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "Brug første tilgængelig enhed" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "SoundFont er understøttet af nogle lydkort, Fluidsynth og Timidity" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "Blandet AdLib/MIDI tilstand" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "Brug både MIDI og AdLib lyd generering" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "MIDI lydstyrke:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "MT-32 enhed:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "Angiver standard lyd enhed for Roland MT-32/LAPC1/CM32I/CM64 udgang" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Ægte Roland MT-32 (undlad GM emulering)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -730,191 +727,191 @@ msgstr "" "Kontroller om du vil bruge din rigtige hardware Roland-kompatible lyd enhed " "tilsluttet til din computer" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Ægte Roland MT-32 (ingen GM emulering)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "Aktivér Roland GS tilstand" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "Sluk for General MIDI kortlægning for spil med Roland MT-32 lydspor" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "Brug ikke Roland MT-32 musik" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "Tekst og tale:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Tale" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Undertekster" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "Begge" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "Tekst hastighed:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "Tekst og tale:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "Tale" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "Tekst" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "Begge" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "Vis undertekster og afspil tale" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Tekst hastighed:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "Musik lydstyrke:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "Musik lydstyrke:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "Mute alle" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "SFX lydstyrke:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Lydstyrke for specielle lydeffekter" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "SFX lydstyrke:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "Tale lydstyrke:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "Tale lydstyrke:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "Tema sti:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "Tema sti:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Angiver sti til ekstra data brugt af alle spil eller ScummVM" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "Plugin sti:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "Plugin sti:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Andet" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Andet" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "GUI renderer:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "Auto gemme:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "Auto gemme:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "Taster" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "Sprog:" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "Sprog for brugerfladen i ScummVM" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 #, fuzzy msgid "You have to restart ScummVM before your changes will take effect." msgstr "Du skal genstarte ScummVM for at ændringer vises." -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "Vælg bibliotek til gemmer" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Der kan ikke skrives til det valgte bibliotek. Vælg venligst et andet." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "Vælg bibliotek for GUI temaer" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "Vælg bibliotek for ekstra filer" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "Vælg bibliotek for plugins" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -962,64 +959,64 @@ msgstr "Unavngivet gemmetilstand" msgid "Select a Theme" msgstr "Vælg et tema" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "Deaktiveret GFX" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "Deaktiveret GFX" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "Standard renderer (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "Standard (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "Antialias renderer (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "Antialias (16bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Slet værdi" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Motor understøtter ikke fejlfindingsniveau '%s'" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "Menu" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Spring over" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pause" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "Spring linje over" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "Fejl ved kørsel af spil:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "Kunne ikke finde nogen motor istand til at afvikle det valgte spil" @@ -1094,16 +1091,16 @@ msgstr "" msgid "Unknown error" msgstr "Ukendt fejl" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "" -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "" @@ -1140,13 +1137,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~R~etur til oversigt" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "Gemmer:" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1237,6 +1235,88 @@ msgstr "" msgid "Start anyway" msgstr "" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "Gendan spil:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "Gendan" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "Øverste højre punkt" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "EGA farveforøgelse" + +#: engines/sci/detection.cpp:371 +#, fuzzy +msgid "Enable undithering in EGA games" +msgstr "Aktiver farveforøgelse i EGA spil der understøtter det" + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "Lydstyrke for specielle lydeffekter" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "Normal markør" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1900,7 +1980,7 @@ msgid "" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1911,7 +1991,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1922,7 +2002,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1967,14 +2047,6 @@ msgstr "ScummVM Hovedmenu" msgid "~W~ater Effect Enabled" msgstr "~V~andeffekter aktiveret" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "Gendan spil:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "Gendan" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2013,6 +2085,66 @@ msgstr "" "\n" "%s" +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "Aktivér Roland GS tilstand" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "Normal markør" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "" @@ -2076,6 +2208,14 @@ msgid "" "that a few tracks will not be correctly played." msgstr "" +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2141,6 +2281,14 @@ msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2359,21 +2507,21 @@ msgstr "H msgid "Disable power off" msgstr "Deaktiver slukning" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 #, fuzzy msgid "Mouse-click-and-drag mode enabled." msgstr "Pegeplade tilstand aktiveret." -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 #, fuzzy msgid "Mouse-click-and-drag mode disabled." msgstr "Pegeplade tilstand deaktiveret." -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "Pegeplade tilstand aktiveret." -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "Pegeplade tilstand deaktiveret." @@ -2455,15 +2603,15 @@ msgstr "Skift mellem grafik filtre" msgid "Windowed mode" msgstr "Rendere tilstand:" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL Normal" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL Bevar" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL Original" diff --git a/po/de_DE.po b/po/de_DE.po index fd60d11d4a..e11a3d4fc7 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.4.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2012-01-29 21:11+0100\n" "Last-Translator: Simon Sawatzki \n" "Language-Team: Simon Sawatzki (Lead), Lothar Serra Mari " @@ -45,7 +45,7 @@ msgid "Go up" msgstr "Pfad hoch" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -70,15 +70,15 @@ msgstr "Schlie msgid "Mouse click" msgstr "Mausklick" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Tastatur anzeigen" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Tasten neu zuweisen" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 #, fuzzy msgid "Toggle FullScreen" msgstr "Vollbild-/Fenster-Modus" @@ -91,8 +91,8 @@ msgstr "Eine Aktion zum Zuweisen ausw msgid "Map" msgstr "Zuweisen" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -129,15 +129,15 @@ msgstr "Bitte eine Aktion ausw msgid "Press the key to associate" msgstr "Taste drücken, um sie zuzuweisen" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "Spiel" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "Kennung:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -145,29 +145,29 @@ msgstr "" "Kurzer Spielname, um die Spielstände zuzuordnen und das Spiel von der " "Kommandozeile aus starten zu können" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "Name:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Voller Name des Spiels" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "Name:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Sprache:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" @@ -175,282 +175,287 @@ msgstr "" "Sprache des Spiels. Diese Funktion wird nicht eine spanische Version des " "Spiels in eine deutsche verwandeln." -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "Plattform:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Plattform, für die das Spiel ursprünglich erstellt wurde" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "Plattform:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "Betrachte" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Grafik" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "GFX" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "Globale Grafikeinstellungen übergehen" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "Globale Grafikeinstellungen übergehen" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Audio" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "Globale Audioeinstellungen übergehen" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "Globale Audioeinstellungen übergehen" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Lautstärke" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Lautst." -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "Globale Lautstärke-Einstellungen übergehen" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "Globale Lautstärkeeinstellungen übergehen" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "Globale MIDI-Einstellungen übergehen" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Globale MIDI-Einstellungen übergehen" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "Globale MT-32-Einstellungen übergehen" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Globale MT-32-Einstellungen übergehen" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Pfade" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Pfade" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "Spielpfad:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "Spielpfad:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Extrapfad:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Legt das Verzeichnis für zusätzliche Spieldateien fest." -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Extrapfad:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Spielstände:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Legt fest, wo die Spielstände abgelegt werden." -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Speichern:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Keiner" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standard" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "SoundFont auswählen" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Verzeichnis mit Spieldateien auswählen" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "Verzeichnis mit zusätzlichen Dateien auswählen" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "Verzeichnis für Spielstände auswählen" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "Diese Spielkennung ist schon vergeben. Bitte eine andere wählen." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~B~eenden" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "ScummVM beenden" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "Übe~r~" -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "Über ScummVM" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~O~ptionen" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "Globale ScummVM-Einstellungen bearbeiten" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "~S~tarten" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "Ausgewähltes Spiel starten" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~L~aden..." -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "Spielstand für ausgewähltes Spiel laden" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "Spiel ~h~inzufügen" -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "" "Umschalttaste (Shift) gedrückt halten, um Verzeichnisse nach Spielen zu " "durchsuchen" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "Spielo~p~tionen" -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Spieloptionen ändern" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "Spiel ~e~ntfernen" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Spiel aus der Liste entfernen. Die Spieldateien bleiben erhalten." -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~H~inzufügen" -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "Spielo~p~tion" -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "~E~ntfernen" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "In Spieleliste suchen" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Suchen:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "Spiel laden:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Laden" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." @@ -458,7 +463,7 @@ msgstr "" "Möchten Sie wirklich den PC nach Spielen durchsuchen? Möglicherweise wird " "dabei eine größere Menge an Spielen hinzugefügt." -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -466,7 +471,7 @@ msgstr "" msgid "Yes" msgstr "Ja" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -474,37 +479,37 @@ msgstr "Ja" msgid "No" msgstr "Nein" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM konnte das gewählte Verzeichnis nicht öffnen!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "ScummVM konnte im gewählten Verzeichnis kein Spiel finden!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "Spiel auswählen:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "Möchten Sie wirklich diese Spielkonfiguration entfernen?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "" "Für dieses Spiel wird das Laden aus der Spieleliste heraus nicht unterstützt." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "ScummVM konnte keine Engine finden, um das Spiel zu starten!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "Durchsuchen" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "Durchsuchen" @@ -571,106 +576,96 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "-" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "Fehler bei einigen Änderungen in Grafikoptionen:" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "Grafikmodus konnte nicht geändert werden." -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "Vollbildeinstellung konnte nicht geändert werden." -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "" "Einstellung für Seitenverhältniskorrektur konnte nicht geändert werden." -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "Grafikmodus:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "Render-Modus:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "" "Spezielle Farbmischungsmethoden werden von manchen Spielen unterstützt." -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Vollbildmodus" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "Seitenverhältnis korrigieren" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "Seitenverhältnis für Spiele mit der Auflösung 320x200 korrigieren" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "Antifehlerdiffusion für EGA" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "" -"Aktiviert die Aufhebung der Fehlerdiffusion in EGA-Spielen, die dies " -"unterstützen." - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "Standard-Gerät:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "Musikgerät:" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "" "Legt das bevorzugte Tonwiedergabe-Gerät oder den Soundkarten-Emulator fest." -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Legt das Musikwiedergabe-Gerät oder den Soundkarten-Emulator fest." -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Standard-Gerät:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "Musikgerät:" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "AdLib-Emulator" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib wird für die Musik in vielen Spielen verwendet." -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "Ausgabefrequenz:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -678,64 +673,64 @@ msgstr "" "Höhere Werte bewirken eine bessere Soundqualität, werden aber möglicherweise " "nicht von jeder Soundkarte unterstützt." -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "GM-Gerät:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "" "Legt das standardmäßige Musikwiedergabe-Gerät für General-MIDI-Ausgabe fest." -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "Keine General-MIDI-Musik" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "Erstes verfügbares Gerät" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "" "SoundFont wird von einigen Soundkarten, Fluidsynth und Timidity unterstützt." -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "AdLib-/MIDI-Modus" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "Benutzt MIDI und AdLib zur Sounderzeugung." -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "MIDI-Lautstärke:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "MT-32-Gerät:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Legt das standardmäßige Tonwiedergabe-Gerät für die Ausgabe von Roland MT-32/" "LAPC1/CM32l/CM64 fest." -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Echte Roland-MT-32-Emulation (GM-Emulation deaktiviert)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -743,197 +738,197 @@ msgstr "" "Wählen Sie dies aus, wenn Sie Ihre echte Hardware, die mit einer Roland-" "kompatiblen Soundkarte verbunden ist, verwenden möchten." -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Echte Roland-MT-32-Emulation (kein GM)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "Roland-GS-Modus" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "" "Schaltet die General-MIDI-Zuweisung für Spiele mit Roland-MT-32-Audiospur " "aus." -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "Keine Roland-MT-32-Musik" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "Sprache und Text:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Sprache" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Untertitel" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "Beides" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "Untertitel-Tempo:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "Sprache + Text:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "Spr." -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "TXT" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "S+T" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "Untertitel anzeigen und Sprachausgabe aktivieren" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Text-Tempo:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "Musiklautstärke:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "Musiklautstärke:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "Alles aus" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "Effektlautstärke:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Lautstärke spezieller Soundeffekte" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "Effektlautst.:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "Sprachlautstärke:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "Sprachlautst.:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "Themenpfad:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "Themenpfad:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Legt das Verzeichnis für zusätzliche Spieldateien für alle Spiele in ScummVM " "fest." -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "Plugin-Pfad:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "Plugin-Pfad:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Sonstiges" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Andere" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "Thema:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "GUI-Renderer:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "Autom. Speichern:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "Speich.(auto)" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "Tasten" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "Sprache:" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "Sprache der ScummVM-Oberfläche" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Sie müssen ScummVM neu starten, damit die Änderungen wirksam werden." -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "Verzeichnis für Spielstände auswählen" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "" "In das gewählte Verzeichnis kann nicht geschrieben werden. Bitte ein anderes " "auswählen." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "Verzeichnis für Oberflächen-Themen" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "Verzeichnis für zusätzliche Dateien auswählen" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "Verzeichnis für Erweiterungen auswählen" # Nicht übersetzen, da diese Nachricht nur für nicht-lateinische Sprachen relevant ist. -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -979,64 +974,64 @@ msgstr "Unbenannt" msgid "Select a Theme" msgstr "Thema auswählen" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "GFX ausgeschaltet" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX ausgeschaltet" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "Standard-Renderer (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "Standard (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "Kantenglättung (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "Kantenglättung (16bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Wert löschen" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Engine unterstützt den Debug-Level \"%s\" nicht." -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "Menü" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Überspringen" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pause" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "Zeile überspringen" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "Fehler beim Ausführen des Spiels:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "Konnte keine Spiel-Engine finden, die dieses Spiel starten kann." @@ -1104,18 +1099,18 @@ msgstr "Abbruch durch Benutzer" msgid "Unknown error" msgstr "Unbekannter Fehler" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Das Spiel im Verzeichnis \"%s\" scheint nicht bekannt zu sein." -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Bitte geben Sie die folgenden Daten auf Englisch an das ScummVM-Team weiter " "sowie" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "" "den Namen des Spiels, das Sie hinzufügen wollten, als auch die Version/" @@ -1154,13 +1149,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "Zur Spiele~l~iste" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "Speichern:" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1275,6 +1271,90 @@ msgstr "" msgid "Start anyway" msgstr "Trotzdem starten" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "Spiel laden:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "Laden" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "Oberer rechter Gegenstand" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "Antifehlerdiffusion für EGA" + +#: engines/sci/detection.cpp:371 +#, fuzzy +msgid "Enable undithering in EGA games" +msgstr "" +"Aktiviert die Aufhebung der Fehlerdiffusion in EGA-Spielen, die dies " +"unterstützen." + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "Lautstärke spezieller Soundeffekte" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "Normaler Mauszeiger" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1931,7 +2011,7 @@ msgstr "" "Systemeigene MIDI-Ünterstützung erfordert das Roland-Upgrade von LucasArts,\n" "aber %s fehlt. Stattdessen wird AdLib verwendet." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1942,7 +2022,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1953,7 +2033,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2001,14 +2081,6 @@ msgstr "Haupt~m~en msgid "~W~ater Effect Enabled" msgstr "~W~assereffekt aktiviert" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "Spiel laden:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "Laden" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2031,6 +2103,66 @@ msgstr "Konnte Datei nicht l msgid "Failed to save game" msgstr "Konnte Spielstand nicht speichern." +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "Roland-GS-Modus" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "Normaler Mauszeiger" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "Attacke 1" @@ -2094,6 +2226,14 @@ msgstr "" "zuzuordnen. Es kann jedoch vorkommen, dass ein\n" "paar Musikstücke nicht richtig abgespielt werden." +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2179,6 +2319,14 @@ msgstr "" "DXA-Zwischensequenzen gefunden, aber ScummVM wurde ohne Zlib-Unterstützung " "erstellt." +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2415,19 +2563,19 @@ msgstr "Hohe Audioqualit msgid "Disable power off" msgstr "Stromsparmodus abschalten" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "Maus-klick-und-zieh-Modus aktiviert." -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "Maus-klick-und-zieh-Modus ausgeschaltet." -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "Touchpad-Modus aktiviert." -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "Touchpad-Modus ausgeschaltet." @@ -2504,15 +2652,15 @@ msgstr "Aktiver Grafikfilter:" msgid "Windowed mode" msgstr "Fenstermodus" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL: normal" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL: beibehalten" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL: original" diff --git a/po/es_ES.po b/po/es_ES.po index 2be6dd051c..366dcf4905 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.4.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2011-10-23 21:53+0100\n" "Last-Translator: Tomás Maidagan\n" "Language-Team: \n" @@ -43,7 +43,7 @@ msgid "Go up" msgstr "Arriba" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -68,15 +68,15 @@ msgstr "Cerrar" msgid "Mouse click" msgstr "Clic de ratón" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Mostrar el teclado" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Asignar teclas" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 #, fuzzy msgid "Toggle FullScreen" msgstr "Activar pantalla completa" @@ -89,8 +89,8 @@ msgstr "Elige la acci msgid "Map" msgstr "Asignar" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -127,15 +127,15 @@ msgstr "Por favor, selecciona una acci msgid "Press the key to associate" msgstr "Pulsa la tecla a asignar" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "Juego" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -143,29 +143,29 @@ msgstr "" "Identificador usado para las partidas guardadas y para ejecutar el juego " "desde la línea de comando" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "Nombre:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Título completo del juego" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "Nom.:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Idioma:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" @@ -173,280 +173,285 @@ msgstr "" "Idioma del juego. No sirve para pasar al inglés la versión española de un " "juego" -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "Plataforma:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Plataforma para la que se diseñó el juego" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "Plat.:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "Examinar" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Gráficos" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "GFX" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "Ignorar opciones gráficas generales" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "Opciones gráficas específicas" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Sonido" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "Ignorar opciones de sonido generales" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "Opciones de sonido específicas" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Volumen" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Volumen" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "Ignorar opciones de volumen generales" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "Opciones de volumen específicas" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "Ignorar opciones de MIDI generales" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Opciones de MIDI específicas" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "Ignorar opciones de MT-32 generales" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Opciones de MT-32 específicas" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Rutas" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Rutas" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "Juego:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "Juego:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Adicional:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Especifica un directorio para datos adicionales del juego" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Adicional:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Partidas:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Especifica dónde guardar tus partidas" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Partidas:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Ninguna" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Por defecto" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Selecciona un SoundFont" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Selecciona el directorio del juego" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "Selecciona el directorio adicional" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "Selecciona el directorio para partidas guardadas" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "Esta ID ya está siendo usada. Por favor, elige otra." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~S~alir" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Salir de ScummVM" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "Acerca ~d~e" -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "Acerca de ScummVM" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~O~pciones..." -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "Cambiar opciones generales de ScummVM" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "~J~ugar" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "Jugar al juego seleccionado" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~C~argar..." -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "Cargar partida del juego seleccionado" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~A~ñadir juego..." -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Mantener pulsado Mayús para añadir varios juegos" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "~E~ditar juego..." -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Cambiar opciones de juego" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "E~l~iminar juego" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Eliminar el juego de la lista. Los archivos no se borran" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~A~ñadir..." -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "~E~ditar..." -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "E~l~iminar" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "Buscar en la lista de juegos" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Buscar:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "Cargar juego:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Cargar" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." @@ -454,7 +459,7 @@ msgstr "" "¿Seguro que quieres ejecutar la detección masiva? Puede que se añada un gran " "número de juegos." -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -462,7 +467,7 @@ msgstr "" msgid "Yes" msgstr "Sí" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -470,37 +475,37 @@ msgstr "S msgid "No" msgstr "No" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "¡ScummVM no ha podido abrir el directorio!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "¡ScummVM no ha encontrado ningún juego en el directorio!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "Elige el juego:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "¿Seguro que quieres eliminar la configuración de este juego?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "Este juego no permite cargar partidas desde el lanzador." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "" "¡ScummVM no ha podido encontrar ningún motor capaz de ejecutar el juego!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "Añad. varios" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "Añadir varios..." @@ -567,104 +572,96 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Ninguno" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "Fallo al aplicar algunos cambios en las opciones gráficas:" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "no se ha podido cambiar el modo de vídeo." -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "no se ha podido cambiar el ajuste de pantalla completa" -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "no se ha podido cambiar el ajuste de corrección de aspecto" -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "Modo gráfico:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "Renderizado:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Modos especiales de expansión soportados por algunos juegos" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Pantalla completa" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "Corrección de aspecto" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "Corregir relación de aspecto en juegos 320x200" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "Difuminado EGA" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "Activar difuminado en los juegos EGA compatibles" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "Disp. preferido:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "Disp. de música:" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "" "Especifica qué dispositivo de sonido o emulador de tarjeta de sonido " "prefieres" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "" "Especifica el dispositivo de sonido o emulador de tarjeta de sonido de salida" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Disp. preferido:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "Disp. de música:" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "Emul. de AdLib:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib se usa para la música en muchos juegos" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "Frec. de salida:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -672,64 +669,64 @@ msgstr "" "Los valores más altos ofrecen mayor calidad, pero puede que tu tarjeta de " "sonido no sea compatible" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "Dispositivo GM:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "Especifica el dispositivo de salida General MIDI por defecto" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "No usar música General MIDI" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "Utilizar el primer dispositivo disponible" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "" "SoundFont está soportado por algunas tarjetas de sonido, además de " "Fluidsynth y Timidity" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "Modo AdLib/MIDI" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "Usar tanto MIDI como AdLib en la generación de sonido" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "Ganancia MIDI:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "Disp. MT-32:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Especifica el dispositivo de sonido para la salida Roland MT-32/LAPC1/CM32l/" "CM64 por defecto" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Roland MT-32 auténtica (desactivar emulación GM)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -737,191 +734,191 @@ msgstr "" "Marcar si se quiere usar un dispositivo de sonido real conectado al " "ordenador y compatible con Roland" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Roland MT-32 real (sin emulación GM)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "Activar modo Roland GS" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "Desactiva la conversión General MIDI en juegos con sonido Roland MT-32" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "No usar música Roland MT-32" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "Texto y voces:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Voces" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Subtítulos" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "Ambos" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "Vel. de subtítulos:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "Texto y voces:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "Voz" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "Subt" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "V&S" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "Reproducir voces y subtítulos" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Vel. de subt.:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "Música:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "Música:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "Silenciar" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "Efectos:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Volumen de los efectos de sonido" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "Efectos:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "Voces:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "Voces:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "Temas:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "Temas:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Especifica el directorio adicional usado por los juegos y ScummVM" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "Plugins:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "Plugins:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Otras" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Otras" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "Interfaz:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "Autoguardado:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "Autoguardado:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "Teclas" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "Idioma:" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "Idioma de la interfaz de ScummVM" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Tienes que reiniciar ScummVM para que los cambios surjan efecto." -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "Selecciona el directorio de guardado" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "" "No se puede escribir en el directorio elegido. Por favor, selecciona otro." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "Selecciona el directorio de temas" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "Selecciona el directorio adicional" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "Selecciona el directorio de plugins" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -969,64 +966,64 @@ msgstr "Partida sin nombre" msgid "Select a Theme" msgstr "Selecciona un tema" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "GFX desactivados" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX desactivados" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "Estándar (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "Estándar (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "Suavizado (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "Suavizado (16bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Eliminar valor" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "El motor no soporta el nivel de debug '%s'" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "Menú" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Saltar" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pausar" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "Saltar frase" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "Error al ejecutar el juego:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "No se ha podido encontrar ningún motor capaz de ejecutar el juego" @@ -1094,16 +1091,16 @@ msgstr "Cancel msgid "Unknown error" msgstr "Error desconocido" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "El juego en '%s' parece ser desconocido." -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Por favor, envía al equipo de ScummVM esta información junto al nombre" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "del juego que has intentado añadir y su versión/idioma/etc.:" @@ -1140,13 +1137,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~V~olver al lanzador" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "Guardar partida" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1257,6 +1255,88 @@ msgstr "" msgid "Start anyway" msgstr "Jugar de todos modos" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "Cargar partida:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "Cargar" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "Objeto superior derecho" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "Difuminado EGA" + +#: engines/sci/detection.cpp:371 +#, fuzzy +msgid "Enable undithering in EGA games" +msgstr "Activar difuminado en los juegos EGA compatibles" + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "Volumen de los efectos de sonido" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "Cursor normal" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1913,7 +1993,7 @@ msgstr "" "El soporte MIDI nativo requiere la actualización Roland de LucasArts,\n" "pero %s no está disponible. Se usará AdLib." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1924,7 +2004,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1935,7 +2015,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1982,14 +2062,6 @@ msgstr "~M~en msgid "~W~ater Effect Enabled" msgstr "Efecto ag~u~a activado" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "Cargar partida:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "Cargar" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2012,6 +2084,66 @@ msgstr "Fallo al borrar el archivo." msgid "Failed to save game" msgstr "Fallo al guardar la partida" +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "Activar modo Roland GS" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "Cursor normal" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "" @@ -2080,6 +2212,14 @@ msgstr "" "a los de General MIDI, pero es posible que algunas\n" "de las pistas no se reproduzcan correctamente." +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2161,6 +2301,14 @@ msgid "" msgstr "" "Se han encontrado vídeos DXA, pero se ha compilado ScummVM sin soporte zlib" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2397,19 +2545,19 @@ msgstr "Sonido de alta calidad (m msgid "Disable power off" msgstr "Desactivar apagado" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "Modo clic-de-ratón-y-arrastrar activado." -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "Modo clic-de-ratón-y-arrastrar desactivado." -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "Modo Touchpad activado." -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "Modo Touchpad desactivado." @@ -2486,15 +2634,15 @@ msgstr "Filtro de gr msgid "Windowed mode" msgstr "Modo ventana" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL Normal" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL Conservar" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL Original" diff --git a/po/eu.po b/po/eu.po index ab677fda82..7df042dc14 100644 --- a/po/eu.po +++ b/po/eu.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2011-12-15 14:53+0100\n" "Last-Translator: Mikel Iturbe Urretxa \n" "Language-Team: Librezale \n" -"Language: Euskara\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" +"Language: Euskara\n" #: gui/about.cpp:91 #, c-format @@ -43,7 +43,7 @@ msgid "Go up" msgstr "Joan gora" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -68,15 +68,15 @@ msgstr "Itxi" msgid "Mouse click" msgstr "Sagu-klika" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Teklatua erakutsi" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Teklak esleitu" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 msgid "Toggle FullScreen" msgstr "Txandakatu pantaila osoa" @@ -88,8 +88,8 @@ msgstr "Aukeratu esleituko den ekintza" msgid "Map" msgstr "Esleitu" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -126,15 +126,15 @@ msgstr "Mesedez, aukeratu ekintza bat" msgid "Press the key to associate" msgstr "Sakatu esleituko den tekla" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "Jokoa" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -142,309 +142,314 @@ msgstr "" "Partida gordeak identifikatzeko eta jokoa komando lerrotik abiarazteko " "erabiltzen den identifikatzailea" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "Izena:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Jokoaren izen osoa" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "Izena:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Hizkuntza:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" msgstr "" "Jokoaren hizkuntza. Honek ez du zure ingelesezko bertsioa frantsesera pasako" -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "Plataforma:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Jatorriz, jokoa diseinatua izan zen plataforma" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "Plataforma:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "Aztertu" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Grafikoak" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "GFX" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "Ezarpen grafiko globalak baliogabetu" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "Ezarpen grafiko globalak baliogabetu" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Soinua" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "Soinu ezarpen globalak baliogabetu" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "Soinu ezarpen globalak baliogabetu" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Bolumena" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Bolumena" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "Bolumen ezarpen globalak baliogabetu" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "Bolumen ezarpen globalak baliogabetu" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "MIDI ezarpen globalak baliogabetu" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "MIDI ezarpen globalak baliogabetu" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "MT-32 ezarpen globalak baliogabetu" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "MT-32 ezarpen globalak baliogabetu" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Bide-izenak" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Bideak" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "Jokoa:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "Jokoa:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Gehigarriak:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Jokoak erabiltzen duen datu gehigarrien bide-izena" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Gehigarria:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Partida gordeak:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Zure gordetako partidak non gordeko diren zehazten du" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Partida gordeak:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Bat ere ez" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Lehenetsia" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "SoundFont-a aukeratu" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Jokoaren direktorioa aukeratu" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "Direktorio gehigarria aukeratu" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "Partida gordeen direktorioa aukeratu" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "ID hau jada erabilia izaten ari da. Mesedez, aukeratu beste bat." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~I~rten" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Irten ScummVM-tik" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "Ho~n~i buruz..." -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "ScummVM-i buruz" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~A~ukerak" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "ScummVM-ren aukera globalak aldatu" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "~H~asi" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "Aukeraturiko jokora jolastu" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~K~argatu" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "Aukeraturiko jokorako partida gordea kargatu" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~G~ehitu..." -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Shift mantendu sakaturik hainbat joko gehitzeko" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "~E~ditatu..." -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Aldatu jokoaren aukerak" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "~K~endu jokoa" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Jokoa zerrendatik kendu. Jokoaren fitxategiak ez dira ezabatzen" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~G~ehitu..." -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "~E~ditatu..." -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "~K~endu" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "Bilatu joko-zerrendan" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Bilatu:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "Jokoa kargatu:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Kargatu" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." @@ -452,7 +457,7 @@ msgstr "" "Joko detektatzaile masiboa exekutatu nahi al duzu? Honek joko kantitate " "handia gehitu dezake." -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -460,7 +465,7 @@ msgstr "" msgid "Yes" msgstr "Bai" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -468,38 +473,38 @@ msgstr "Bai" msgid "No" msgstr "Ez" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM-k ezin izan du zehazturiko direktorioa ireki!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "ScummVM-k ezin izan du jokorik aurkitu zehazturiko direktorioan!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "Jokoa aukeratu:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "Benetan ezabatu nahi duzu joko-konfigurazio hau?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "Joko honek ez du uzten partidak abiarazletik kargatzen." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "" "ScummVM-k ezin izan du aukeraturiko jokoa exekutatzeko gai den motorerik " "aurkitu!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "Hainbat gehitu..." -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "Hainbat gehitu..." @@ -568,101 +573,93 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Bat ere ez" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "Ezin izan da grafikoen aukeretako batzuk aplikatu:" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "ezin izan da bideo-modua aldatu." -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "ezin izan da pantaila-osoaren ezarpena aldatu" -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "formatu-ratioaren ezarpena ezin izan da aldatu" -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "Modu grafikoa:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "Renderizazioa:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Joko batzuk onarturiko lausotze-modu bereziak" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Pantaila osoa" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "Formatu-ratioaren zuzenketa" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "320x200 jokoentzako formatu-ratioa zuzendu" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "EGA lausotzea" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "EGA lausotzea gaitu joko bateragarrietan" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "Gogoko gailua:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "Musika gailua:" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "Gogoko soinu txartel edo emuladorea zein den ezartzen du" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Irteerako soinu txartel edo emuladorea ezartzen du" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Gail. gogokoa:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "Musika gailua:" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "AdLib emuladorea:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib musikarako hainbat jokotan erabiltzen da" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "Irteera maizt.:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -670,64 +667,64 @@ msgstr "" "Balio altuagoek soinu kalitate hobea ezartzen dute, baina baliteke zure " "soinu-txartela bateragarria ez izatea" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "GM gailua:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "Defektuzko soinu txartela ezartzen du General MIDI irteerarako" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "Ez erabili General MIDI musika" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "Erabilgarri dagoen lehen gailua erabili" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "" "Zenbait soinu txartel bateragarriak dira SoundFont-ekin, Fluidsynth eta " "Timidity besteak beste" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "AdLib/MIDI modua" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "Soinua sortzerakoan MIDI eta AdLib erabili" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "MIDI irabazia:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "MT-32 gailua:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Roland MT-32/LAPC1/CM32l/CM64 irteerarako defektuzko soinu txartela ezartzen " "du" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Benetako Roland MT-32 (GM emulazio gabe)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -735,192 +732,192 @@ msgstr "" "Markatu ordenagailura konektaturiko Roland-ekin bateragarria den soinu-" "gailua erabiltzeko" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Benetako Roland MT-32 (GM emulazio gabe)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "Roland GS modua gaitu" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "" "Roland MT-32 soinua duten jokoetan General MIDI bihurtzea desgaitzen du" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "Ez erabili Roland MT-32 musika" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "Testu eta ahotsa:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Ahotsa" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Azpitituluak" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "Biak" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "Azpitit. abiadura:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "Testu eta ahotsa:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "Ahots." -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "Azp." -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "Biak" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "Ahotsak erreproduzitu eta azpitituluak erakutsi" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Azpit. abiadura:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "Musika:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "Musika:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "Mututu dena" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "Efektuak:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Soinu efektu berezien bolumena" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "Efektuak:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "Ahotsak:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "Ahotsak:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "Gaiak:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "Gaiak:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Joko guztiek edo ScummVM-k darabilten datu gehigarrien bide-izena ezartzen du" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "Pluginak:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "Pluginak:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Beste" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Beste" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "Gaia:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "Interfazea:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "Autogordetzea:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "Autogordetzea:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "Teklak" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "Hizkuntza" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "ScummVM interfazearen hizkuntza" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." msgstr "ScummVM berrabiarazi behar duzu aldaketak indarrean jartzeko" -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "Gordetako partiden direktorioa aukeratu" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Aukeraturiko direktorioan ezin da idatzi. Mesedez, aukeratu beste bat." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "Gaien direktorioa aukeratu" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "Fitxategi gehigarrien direktorioa aukeratu" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "Pluginen direktorioa aukeratu" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -968,64 +965,64 @@ msgstr "Titulurik gabeko partida" msgid "Select a Theme" msgstr "Gaia aukeratu" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "GFX desgaituta" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX desgaituta" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "Estandarra (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "Estandarra (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "Lausotua (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "Lausotua (16bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Balioa kendu:" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Motoreak ez da '%s' debug mailarekin bateragarria" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "Menua" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Saltatu" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Gelditu" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "Lerroa saltatu" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "Jokoa exekutatzean errorea:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "Ezin izan da aukeraturiko jokoa exekutatzeko gai den motorerik aurkitu" @@ -1093,16 +1090,16 @@ msgstr "Erabiltzaileak utzia" msgid "Unknown error" msgstr "Errore ezezaguna" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "'%s'-(e)ko jokoa ezezaguna dela dirudi" -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Mesedez, bidali hurrengo datuak ScummVM taldeari gehitzen saiatu zaren" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "jokoaren izen, bertsio/hizkuntza/e.a.-ekin batera:" @@ -1139,13 +1136,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "It~z~uli abiarazlera" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "Gorde jokoa:" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1253,6 +1251,88 @@ msgstr "" msgid "Start anyway" msgstr "Jolastu berdin-berdin" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "Jokoa kargatu:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "Kargatu" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "Goiko eskuineko objektua" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "EGA lausotzea" + +#: engines/sci/detection.cpp:371 +#, fuzzy +msgid "Enable undithering in EGA games" +msgstr "EGA lausotzea gaitu joko bateragarrietan" + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "Soinu efektu berezien bolumena" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "Kurtsore normala" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1909,7 +1989,7 @@ msgstr "" "MIDI euskarri natiboak LucasArts-en Roland eguneraketa behar du,\n" "baina %s ez dago eskuragarri. AdLib erabiliko da." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1920,7 +2000,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1931,7 +2011,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1978,14 +2058,6 @@ msgstr "Menu ~n~agusia" msgid "~W~ater Effect Enabled" msgstr "~U~r-efektua gaituta" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "Jokoa kargatu:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "Kargatu" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2008,6 +2080,66 @@ msgstr "Ezin izan da fitxategia ezabatu" msgid "Failed to save game" msgstr "Ezin izan da jokoa gorde" +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "Roland GS modua gaitu" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "Kurtsore normala" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "1 erasoa" @@ -2070,6 +2202,14 @@ msgstr "" "General MIDIkoetara egokitzen saiatuko gara,\n" "baina posible da pista batzuk egoki ez entzutea." +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2151,6 +2291,14 @@ msgstr "" "PSX eszenak aurkitu dira, baina ScummVM RGB kolorearen euskarri gabe " "konpilatu da" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2386,19 +2534,19 @@ msgstr "Kalitate altuko soinua (geldoagoa) (berrabiarazi)" msgid "Disable power off" msgstr "Itzaltzea desgaitu" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "Saguko klik-eta-arrastratu modua gaituta." -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "Saguko klik-eta-arrastratu modua desgaituta." -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "Touchpad modua gaituta." -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "Touchpad modua desgaituta." @@ -2474,15 +2622,15 @@ msgstr "Filtro grafiko aktiboa:" msgid "Windowed mode" msgstr "Leiho modua" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL normala" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL aurreztu" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL jatorrizkoa" diff --git a/po/fr_FR.po b/po/fr_FR.po index bf6ac4424d..6270ab3f73 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2011-10-23 14:52+0100\n" "Last-Translator: Thierry Crozat \n" "Language-Team: French \n" @@ -44,7 +44,7 @@ msgid "Go up" msgstr "Remonter" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -69,15 +69,15 @@ msgstr "Fermer" msgid "Mouse click" msgstr "Clic de souris" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Afficher le clavier" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Changer l'affectation des touches" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 msgid "Toggle FullScreen" msgstr "Basculer en plein écran" @@ -89,8 +89,8 @@ msgstr "S msgid "Map" msgstr "Affecter" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -127,15 +127,15 @@ msgstr "Selectionnez une action" msgid "Press the key to associate" msgstr "Appuyez sur la touche à associer" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "Jeu" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -143,29 +143,29 @@ msgstr "" "ID compact du jeu utilisée pour identifier les sauvegardes et démarrer le " "jeu depuis la ligne de commande" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "Nom:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Nom complet du jeu" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "Nom:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Langue:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" @@ -173,281 +173,286 @@ msgstr "" "Langue du jeu. Cela ne traduira pas en anglais par magie votre version " "espagnole du jeu." -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "Plateforme:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Plateforme pour laquelle votre jeu a été conçu" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "Système:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "Examiner" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Graphique" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "GFX" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "Utiliser des réglages graphiques spécifiques à ce jeux" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "Réglages spécifiques à ce jeux" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Audio" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "Utiliser des réglages audio spécifiques à ce jeux" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "Réglages spécifiques à ce jeux" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Volume" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Volume" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "Utiliser des réglages de volume sonore spécifiques à ce jeux" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "Réglages spécifiques à ce jeux" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "Utiliser des réglages MIDI spécifiques à ce jeux" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Réglages spécifiques à ce jeux" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "Utiliser des réglages MT-32 spécifiques à ce jeux" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Réglages spécifiques à ce jeux" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Chemins" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Chemins" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "Chemin du Jeu:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "Chemin du Jeu:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Extra:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Définie un chemin vers des données suplémentaires utilisées par le jeu" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Extra:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Sauvegardes:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Définie l'emplacement où les fichiers de sauvegarde sont créés" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Sauvegardes:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Aucun" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Défaut" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Choisir une banque de sons" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Sélectionner le répertoire contenant les données du jeu" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "Sélectionner un répertoire supplémentaire" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "Sélectionner le répertoire pour les sauvegardes" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "Cet ID est déjà utilisé par un autre jeu. Choisissez en un autre svp." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~Q~uitter" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Quitter ScummVM" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "À ~P~ropos..." -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "À propos de ScummVM" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~O~ptions..." -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "Change les options globales de ScummVM" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "~D~émarrer" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "Démarre le jeu sélectionné" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~C~harger" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "Charge une sauvegarde pour le jeu sélectionné" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~A~jouter..." -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "" "Ajoute un jeu à la Liste. Maintenez Shift enfoncée pour un Ajout Massif" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "~E~diter..." -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Change les options du jeu" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "~S~upprimer" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Supprime le jeu de la liste. Les fichiers sont conservés" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~A~jouter..." -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "~E~diter..." -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "~S~upprimer" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "Recherche dans la liste de jeux" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Filtre:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "Charger le jeu:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Charger" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." @@ -455,7 +460,7 @@ msgstr "" "Voulez-vous vraiment lancer la détection automatique des jeux? Cela peut " "potentiellement ajouter un grand nombre de jeux." -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -463,7 +468,7 @@ msgstr "" msgid "Yes" msgstr "Oui" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -471,37 +476,37 @@ msgstr "Oui" msgid "No" msgstr "Non" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM n'a pas pu ouvrir le répertoire sélectionné." -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "ScummVM n'a pas trouvé de jeux dans le répertoire sélectionné." -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "Choisissez le jeu:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "Voulez-vous vraiment supprimer ce jeu?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "" "Le chargement de sauvegarde depuis le lanceur n'est pas supporté pour ce jeu." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "ScummVM n'a pas pu trouvé de moteur pour lancer le jeu sélectionné." -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "Ajout Massif..." -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "Ajout Massif..." @@ -569,103 +574,95 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Aucune" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "Certaines options graphiques n'ont pu être changées:" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "le mode vidéo n'a pu être changé." -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "le mode plein écran n'a pu être changé." -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "la correction de rapport d'aspect n'a pu être changée." -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "Mode graphique:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "Mode de rendu:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Mode spécial de tramage supporté par certains jeux" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Plein écran" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "Correction du rapport d'aspect" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "Corrige le rapport d'aspect pour les jeu 320x200" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "Détramage EGA" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "Active le détramage dans les jeux EGA qui le supporte" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "Sortie Préféré:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "Sortie Audio:" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "" "Spécifie le périphérique de sortie audio ou l'émulateur de carte audio " "préféré" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Spécifie le périphérique de sortie audio ou l'émulateur de carte audio" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Sortie Préféré:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "Sortie Audio:" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "Émulateur AdLib:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib est utilisé pour la musique dans de nombreux jeux" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "Fréquence:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -673,64 +670,64 @@ msgstr "" "Une valeur plus élevée donne une meilleure qualité audio mais peut ne pas " "être supporté par votre carte son" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "Sortie GM:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "Spécifie le périphérique audio par défaut pour la sortie General MIDI" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "Ne pas utiliser la musique General MIDI" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "Utiliser le premier périphérique disponible" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "Banque de sons:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "" "La banque de sons (SoundFont) est utilisée par certaines cartes audio, " "Fluidsynth et Timidity" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "Mode mixe AdLib/MIDI" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "Utiliser à la fois MIDI et AdLib" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "Gain MIDI:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "Sortie MT-32:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Spécifie le périphérique audio par défaut pour la sortie Roland MT-32/LAPC1/" "CM32l/CM64" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Roland MT-32 exacte (désactive l'émulation GM)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -738,195 +735,195 @@ msgstr "" "Vérifie si vous voulez utiliser un périphérique audio compatible Roland " "connecté à l'ordinateur" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Roland MT-32 exacte (pas d'ému GM)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "Activer le mode Roland GS" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "Désactiver la conversion des pistes MT-32 en General MIDI" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "Ne pas utiliser la musique Roland MT-32" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "Dialogue:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Voix" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Sous-titres" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "Les deux" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "Vitesse des ST:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "Dialogue:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "Voix" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "Subs" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "V&S" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "Affiche les sous-titres et joue les dialogues audio" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Vitesse des ST:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "Volume Musique:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "Musique:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "Silence" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "Volume Bruitage:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Volume des effets spéciaux sonores" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "Bruitage:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "Volume Dialogues:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "Dialogues:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "Thèmes:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "Thèmes:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Spécifie un chemin vers des données supplémentaires utilisées par tous les " "jeux ou ScummVM" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "Plugins:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "Plugins:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Divers" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Divers" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "Thème:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "Interface:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "Sauvegarde auto:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "Sauvegarde:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "Touches" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "Langue:" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "Langue de l'interface graphique de ScummVM" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." msgstr "" "Vous devez relancer ScummVM pour que le changement soit pris en compte." -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "Sélectionner le répertoire pour les sauvegardes" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "" "Le répertoire sélectionné est vérouillé en écriture. Sélectionnez un autre " "répertoire." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "Sélectionner le répertoire des thèmes d'interface" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "Sélectionner le répertoire pour les fichiers suplémentaires" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "Sélectionner le répertoire des plugins" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -974,64 +971,64 @@ msgstr "Sauvegarde sans nom" msgid "Select a Theme" msgstr "Sélectionnez un Thème" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "GFX désactivé" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX désactivé" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "Rendu Standard (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "Standard (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "Rendu Anti-crénelé (16 bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "Anti-crénelé (16 bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Effacer la valeur" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Le niveau de debug '%s' n'est pas supporté par ce moteur de jeu" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "Menu" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Passer" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Mettre en pause" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "Passer la phrase" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "Erreur lors de l'éxécution du jeu:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "Impossible de trouver un moteur pour exécuter le jeu sélectionné" @@ -1099,18 +1096,18 @@ msgstr "Annuler par l'utilisateur" msgid "Unknown error" msgstr "Erreur inconnue" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Le jeu dans '%s' n'est pas reconnu." -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Veuillez reporter les informations suivantes à l'équipe ScummVM ainsi que le " "nom" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "du jeu que vous avez essayé d'ajouter, sa version, le langage, etc..." @@ -1147,13 +1144,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "Retour au ~L~anceur" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "Sauvegarde:" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1264,6 +1262,88 @@ msgstr "" msgid "Start anyway" msgstr "Jouer quand même" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "Charger le jeu:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "Charger" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "Élément en haut à droite" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "Détramage EGA" + +#: engines/sci/detection.cpp:371 +#, fuzzy +msgid "Enable undithering in EGA games" +msgstr "Active le détramage dans les jeux EGA qui le supporte" + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "Volume des effets spéciaux sonores" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "Curseur normal" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1920,7 +2000,7 @@ msgstr "" "Support MIDI natif requière la mise à jour Roland de LucasArt,\n" "mais %s manque. Utilise AdLib à la place." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1931,7 +2011,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1942,7 +2022,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1990,14 +2070,6 @@ msgstr "~M~enu Principal" msgid "~W~ater Effect Enabled" msgstr "~E~ffets de l'Eau Activés" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "Charger le jeu:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "Charger" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2020,6 +2092,66 @@ msgstr " msgid "Failed to save game" msgstr "Échec de la sauvegarde." +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "Activer le mode Roland GS" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "Curseur normal" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "Attaque 1" @@ -2082,6 +2214,14 @@ msgstr "" "MIDI. Mais il est possible que quelquespistes ne soient pas jouées " "correctement." +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2165,6 +2305,14 @@ msgstr "" "Les séquences DXA sont présente mais ScummVM a été compilé sans le support " "zlib." +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2399,19 +2547,19 @@ msgstr "Audio haute qualit msgid "Disable power off" msgstr "Désactivé l'extinction" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "Mode souris-cliquer-et-déplacer activé" -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "Mode souris-cliquer-et-déplacer désactivé" -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "Mode touchpad activé" -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "Mode touchpad désactivé" @@ -2487,15 +2635,15 @@ msgstr "Mode graphique actif:" msgid "Windowed mode" msgstr "Mode Fenêtre" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL Normal" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL Préserve" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL Originel" diff --git a/po/hu_HU.po b/po/hu_HU.po index 76e01da44b..321e5b7e70 100644 --- a/po/hu_HU.po +++ b/po/hu_HU.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2012-04-18 08:20+0100\n" "Last-Translator: Gruby \n" "Language-Team: Hungarian\n" @@ -47,7 +47,7 @@ msgid "Go up" msgstr "Feljebb" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -72,15 +72,15 @@ msgstr "Bez msgid "Mouse click" msgstr "Egérkattintás" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Billentyûzet beállítások" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Billentyûk átállítása" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 msgid "Toggle FullScreen" msgstr "Teljesképernyõ kapcsoló" @@ -92,8 +92,8 @@ msgstr "V msgid "Map" msgstr "Kiosztás" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -130,324 +130,329 @@ msgstr "V msgid "Press the key to associate" msgstr "Nyomj egy billentyût a társításhoz" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "Játék" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" msgstr "" "Rövid játékazonosító a játékmentésekhez és a játék parancssori futtatásához" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "Név:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "A játék teljes neve" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "Név:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Nyelv:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" msgstr "" "A játék nyelve. Ne állítsd át a pl. Spanyol nyelvû játékodat Angol nyelvre" -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "Platform:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Platform amire a játékot eredetileg készítették" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "Platform:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "Vizsgál" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Grafika" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "GFX" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "Globális grafikai beállítások felülbírálása" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "Globális grafikai beállítások felülbírálása" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Audió" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "Globális audió beállítások felülbírálása" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "Globális audió beállítások felülbírálása" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Hangerõ" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Hangerõ" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "Globális hangerõbeállítások felülbírálása" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "Globális hangerõbeállítások felülbírálása" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "Globális MIDI beállítások felülbírálása" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Globális MIDI beállítások felülbírálása" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "Globális MT-32 beállítások felülbírálása" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Globális MT-32 beállítások felülbírálása" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Mappák" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Mappák" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "Játék Mappa:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "Játék Mappa:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Extra Mappa:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Mappa kiválasztás a játékok kiegészítõ fájljaihoz" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Extra Mappa:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Mentés Mappa:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Játékmentések helyének meghatározása" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Mentés Mappa:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Nincs" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Alapértelmezett" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "SoundFont kiválasztás" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Játékok helyének kiválasztása" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "Válassz mappát a játék kiegészítõkhöz" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "Válaszz játékmentéseknek mappát" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "Ez a játékazonosító ID már foglalt, Válassz egy másikat." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "Kilépés" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "ScummVM bezárása" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "Névjegy" -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "ScummVM névjegy" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~O~pciók..." -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "Globális ScummVM opciók cseréje" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "Indítás" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "A választott játék indítása" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "Betöltés" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "Kimentett játékállás betöltése" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "Játék hozzáadás" -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Tratsd lenyomva a Shift-et a Masszív módhoz" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "Játékopciók" -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Játék beállítások megváltoztatása" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "Játék törlése" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Törli a játék nevét a listáról. A játékfájlok megmaradnak" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "Játék hozzáadás" -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "Játékopciók" -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "Játék törlése" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "Keresés a játéklistában" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Keresés:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "Játék betöltése:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Betöltés" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." @@ -455,7 +460,7 @@ msgstr "" "Biztos hogy futtatod a Masszív játékdetektort? Ez potenciálisan sok játékot " "hozzáad a listához." -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -463,7 +468,7 @@ msgstr "" msgid "Yes" msgstr "Igen" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -471,37 +476,37 @@ msgstr "Igen" msgid "No" msgstr "Nem" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM nem tudja megnyitni a választott mappát!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "A ScummVM nem talált egy játékot sem a választott mappában!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "Válassztott játék:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "Biztosan törölni akarod ezt a játékkonfigurációt?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "Ez a játék nem támogatja a játékállás betöltést az indítóból." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "" "ScummVM nem talált olyan játékmotort ami a választott játékot támogatja!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "Masszív mód..." -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "Masszív mód..." @@ -568,162 +573,154 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Nincs" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "Néhány grafikus opció változtatása sikertelen:" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "a videómód nem változott." -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "a teljesképernyõs beállítás nem változott" -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "a képméretarány beállítások nem változtak" -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "Grafikus mód:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "Kirajzolás mód:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Néhány játék támogatja a speciális árnyalási módokat" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Teljesképernyõs mód:" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "Képméretarány korrekció" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "Helyes oldalarány a 320x200 játékokhoz" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "EGA szinjavítás" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "EGA színjavítás támogatott EGA játékokban" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "Elsõdleges eszköz:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "Zene eszköz:" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "Elsõdleges hangeszköz vagy hang emulátor beállítások" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Hangeszköz vagy hangkártya emulátor beállítások" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Elsõdleges eszk.:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "Zene eszköz:" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "AdLib emulátor:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib meghajtót sok játék használja zenéhez" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "Kimeneti ráta:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" msgstr "" "Nagyobb értékek jobb hangminõséget adnak, de nem minden hangkártya támogatja" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "GM Eszköz:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "Alapértelmezett hangeszköz General MIDI kimenethez" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "Ne használj General MIDI zenét" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "Elsõ elérhetõ eszköz használata" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "" "Néhány hangkárya, Fluidsynth és Timidyti támogatja a SoundFont betöltését" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "Vegyes AdLib/MIDI mód" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "MIDI és AdLib hanggenerátorok használata" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "MIDI erõsítés:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "MT-32 Eszköz:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "Roland MT-32/LAPC1/CM32l/CM64 alapértelmezett hangeszközök beállítása" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Roland MT-32 Hardver (GM emuláció tiltva)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -731,190 +728,190 @@ msgstr "" "Jelöld be, ha hardveres Roland-Kompatibilis hangeszköz van csatlakoztatva a " "gépedhez és használni akarod" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Roland MT-32 Hardver (GM emuláció nincs)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "Roland GS Mód engedélyezve" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "General MIDI leképezés Roland MT-32 zenés játékokhoz kikapcsolva" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "Ne használj Roland MT-32 zenét" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "Szöveg és beszéd:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Csak beszéd" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Csak felirat" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "Mind" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "Felirat sebesség:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "Felirat és beszéd:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "Besz" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "Text" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "Mind" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "Hang és feliratok megjelenítése" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Felirat sebesség:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "Zene hangerõ:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "Zene hangerõ:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "Összes némítása" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "SFX hangerõ:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Speciális hangeffektusok hangereje" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "SFX hangerõ:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "Beszéd hangerõ:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "Beszéd hangerõ:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "Téma Mappa:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "Téma Mappa:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Minden jéték és ScummVM kiegészítõ fájljainak mappája:" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "Plugin Mappa:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "Plugin Mappa:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Vegyes" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Vegyes" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "Téma:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "GUI Renderelõ:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "Automentés:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "Automentés:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "Billentyûk" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "GUI nyelve:" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "A ScummVM GUI nyelve" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Indítsd újra a ScummVM-et a változások érvényesítéséhez." -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "Válassz játékmentés mappát" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "A kiválasztott mappába nem lehet írni, válassz egy másikat" -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "GUI téma mappa kiválasztása" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "Mappa választás az extra fájloknak" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "Plugin mappa kiválasztása" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -962,64 +959,64 @@ msgstr "N msgid "Select a Theme" msgstr "Válassz témát" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "GFX letiltva" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX letiltva" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "Standard leképezõ (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "Standard (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "Élsimításos leképezõ (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "Élsimított (16bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Érték törlése" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "A motor nem támogatja a '%s' debug szintet" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "Menü" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Tovább" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Szünet" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "Sor átlépése" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "Hiba a játék futtatásakor:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "Nem található olyan játékmotor ami a választott játékot támogatja" @@ -1087,16 +1084,16 @@ msgstr "Felhaszn msgid "Unknown error" msgstr "Ismeretlen hiba" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "A '%s' játék ismeretlennek tûnik." -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Kérlek jelezd a ScummVM csapatnak a következõ adatokat, együtt a játék" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "címével és megbízható adataival játékverzió/nyelv(ek)/stb.:" @@ -1133,13 +1130,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "Visszatérés az indítóba" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "Játék mentése:" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1247,6 +1245,88 @@ msgstr "" msgid "Start anyway" msgstr "Indítás így is" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "Játékmenet visszaállítása:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "Visszaállítás" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "Jobb felsõ tárgy" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "EGA szinjavítás" + +#: engines/sci/detection.cpp:371 +#, fuzzy +msgid "Enable undithering in EGA games" +msgstr "EGA színjavítás támogatott EGA játékokban" + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "Speciális hangeffektusok hangereje" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "Szabvány kurzor" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1903,7 +1983,7 @@ msgstr "" "Native MIDI támogatáshoz kell a Roland Upgrade a LucasArts-tól,\n" "a %s hiányzik. AdLib-ot használok helyette." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1914,7 +1994,7 @@ msgstr "" "\n" "%s fájlba nem sikerült" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1925,7 +2005,7 @@ msgstr "" "\n" "%s fájlból nem sikerült" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1972,14 +2052,6 @@ msgstr "F msgid "~W~ater Effect Enabled" msgstr "Vízeffektus engedélyezve" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "Játékmenet visszaállítása:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "Visszaállítás" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2002,6 +2074,66 @@ msgstr "F msgid "Failed to save game" msgstr "Játék mentés nem sikerült" +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "Roland GS Mód engedélyezve" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "Szabvány kurzor" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "Támadás 1" @@ -2064,6 +2196,14 @@ msgstr "" "a General MIDI-t. Különben néhány\n" "sávot nem lehet rendesen lejátszani." +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2144,6 +2284,14 @@ msgstr "" "PSX átvezetõfilmet találtam, de ez a ScummVM RGB színtámogatás nélkül van " "lefordítva" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2376,19 +2524,19 @@ msgstr "J msgid "Disable power off" msgstr "Leállítás tiltva" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "Egér kattint-és-húz mód engedélyezve." -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "Egér kattint-és-húz mód letiltva." -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "Touchpad mód engedélyezve." -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "Touchpad mód letiltva." @@ -2464,15 +2612,15 @@ msgstr "Akt msgid "Windowed mode" msgstr "Ablakos mód" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL Normál" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL Megtartott" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL Eredeti" diff --git a/po/it_IT.po b/po/it_IT.po index 8ac8a62216..bee74f5a68 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2011-10-08 17:29+0100\n" "Last-Translator: Matteo 'Maff' Angelino \n" "Language-Team: Italian\n" @@ -43,7 +43,7 @@ msgid "Go up" msgstr "Su" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -68,15 +68,15 @@ msgstr "Chiudi" msgid "Mouse click" msgstr "Clic del mouse" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Mostra tastiera" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Riprogramma tasti" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 #, fuzzy msgid "Toggle FullScreen" msgstr "Attiva / disattiva schermo intero" @@ -89,8 +89,8 @@ msgstr "Scegli un'azione da mappare" msgid "Map" msgstr "Mappa" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -127,15 +127,15 @@ msgstr "Seleziona un'azione" msgid "Press the key to associate" msgstr "Premi il tasto da associare" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "Gioco" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -143,309 +143,314 @@ msgstr "" "Breve identificatore di gioco utilizzato per il riferimento a salvataggi e " "per l'esecuzione del gioco dalla riga di comando" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "Nome:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Titolo completo del gioco" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "Nome:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Lingua:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" msgstr "" "Lingua del gioco. Un gioco inglese non potrà risultare tradotto in italiano" -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "Piattaforma:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "La piattaforma per la quale il gioco è stato concepito" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "Piattaf.:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "Esamina" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Grafica" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "Grafica" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "Ignora le impostazioni grafiche globali" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "Ignora le impostazioni grafiche globali" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Audio" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "Ignora le impostazioni audio globali" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "Ignora le impostazioni audio globali" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Volume" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Volume" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "Ignora le impostazioni globali di volume" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "Ignora le impostazioni globali di volume" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "Ignora le impostazioni MIDI globali" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Ignora le impostazioni MIDI globali" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "Ignora le impostazioni MT-32 globali" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Ignora le impostazioni MT-32 globali" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Percorsi" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Perc." -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "Percorso gioco:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "Perc. gioco:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Percorso extra:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Specifica il percorso di ulteriori dati usati dal gioco" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Perc. extra:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Salvataggi:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Specifica dove archiviare i salvataggi" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Salvataggi:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Nessuno" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Predefinito" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Seleziona SoundFont" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Seleziona la cartella contenente i file di gioco" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "Seleziona la cartella di gioco aggiuntiva" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "Seleziona la cartella dei salvataggi" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "Questo ID di gioco è già in uso. Si prega di sceglierne un'altro." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "C~h~iudi" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Esci da ScummVM" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "~I~nfo..." -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "Informazioni su ScummVM" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~O~pzioni..." -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "Modifica le opzioni globali di ScummVM" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "~G~ioca" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "Esegue il gioco selezionato" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~C~arica..." -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "Carica un salvataggio del gioco selezionato" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~A~ggiungi gioco..." -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Tieni premuto Shift per l'aggiunta in massa" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "~M~odifica gioco..." -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Modifica le opzioni di gioco" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "~R~imuovi gioco" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Rimuove il gioco dalla lista. I file del gioco rimarranno intatti" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~A~gg. gioco..." -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "~M~odif. gioco..." -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "~R~im. gioco" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "Cerca nella lista dei giochi" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Cerca:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "Carica gioco:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Carica" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." @@ -453,7 +458,7 @@ msgstr "" "Vuoi davvero eseguire il rilevatore di giochi in massa? Potrebbe aggiungere " "un numero enorme di giochi." -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -461,7 +466,7 @@ msgstr "" msgid "Yes" msgstr "Sì" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -469,40 +474,40 @@ msgstr "S msgid "No" msgstr "No" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM non ha potuto aprire la cartella specificata!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "ScummVM non ha potuto trovare nessun gioco nella cartella specificata!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "Scegli il gioco:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "Sei sicuro di voler rimuovere questa configurazione di gioco?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "" "Questo gioco non supporta il caricamento di salvataggi dalla schermata di " "avvio." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "" "ScummVM non ha potuto trovare un motore in grado di eseguire il gioco " "selezionato!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "Agg. massa..." -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "Agg. in massa..." @@ -569,103 +574,95 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Nessuno" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "Impossibile applicare alcuni dei cambiamenti nelle opzioni grafiche." -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "impossibile modificare la modalità video." -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "impossibile modificare l'impostazione schermo intero" -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "impossibile modificare l'impostazione proporzioni" -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "Modalità:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "Resa grafica:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Modalità di resa grafica speciali supportate da alcuni giochi" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Modalità a schermo intero" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "Correzione proporzioni" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "Corregge le proporzioni dei giochi 320x200" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "Undithering EGA" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "Attiva undithering nei giochi EGA che lo supportano" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "Disp. preferito:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "Dispositivo audio:" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "" "Specifica il dispositivo audio o l'emulatore della scheda audio preferiti" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "" "Specifica il dispositivo di output audio o l'emulatore della scheda audio" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Disp. preferito:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "Disposit. audio:" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "Emulatore AdLib:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib è utilizzato per la musica in molti giochi" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "Frequenza:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -673,62 +670,62 @@ msgstr "" "Valori più alti restituiscono un suono di maggior qualità, ma potrebbero non " "essere supportati dalla tua scheda audio" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "Dispositivo GM:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "Specifica il dispositivo audio predefinito per l'output General MIDI" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "Non utilizzare la musica General MIDI" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "Utilizza il primo dispositivo disponibile" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "SoundFont è supportato da alcune schede audio, Fluidsynth e Timidity" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "Modalità mista AdLib/MIDI" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "Utilizza generazione di suono sia MIDI che AdLib" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "Guadagno MIDI:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "Disposit. MT-32:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Specifica il dispositivo audio predefinito per l'output Roland MT-32/LAPC1/" "CM32l/CM64" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Roland MT-32 effettivo (disattiva emulazione GM)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -736,192 +733,192 @@ msgstr "" "Seleziona se vuoi usare il dispositivo hardware audio compatibile con Roland " "che è connesso al tuo computer" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Roland MT-32 effettivo (disat.emul.GM)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "Attiva la modalità Roland GS" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "" "Disattiva la mappatura General MIDI per i giochi con colonna sonora Roland " "MT-32" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "Non utilizzare la musica Roland MT-32" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "Testo e voci:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Voci" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Sottotitoli" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "Entrambi" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "Velocità testo:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "Testo e voci:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "Voci" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "Sub" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "Entr." -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "Mostra i sottotitoli e attiva le voci" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Velocità testo:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "Volume musica:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "Volume musica:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "Disattiva audio" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "Volume effetti:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Volume degli effetti sonori" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "Volume effetti:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "Volume voci:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "Volume voci:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "Percorso tema:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "Perc. tema:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Specifica il percorso di ulteriori dati usati dai giochi o da ScummVM" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "Percorso plugin:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "Perc. plugin:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Varie" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Varie" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "Renderer GUI:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "Autosalva:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "Autosalva:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "Tasti" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "Lingua GUI:" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "Lingua dell'interfaccia grafica di ScummVM" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Devi riavviare ScummVM affinché le modifiche abbiano effetto." -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "Seleziona la cartella per i salvataggi" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "La cartella scelta è in sola lettura. Si prega di sceglierne un'altra." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "Seleziona la cartella dei temi dell'interfaccia" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "Seleziona la cartella dei file aggiuntivi" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "Seleziona la cartella dei plugin" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -969,64 +966,64 @@ msgstr "Salvataggio senza titolo" msgid "Select a Theme" msgstr "Seleziona un tema" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "Grafica disattivata" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "Grafica disattivata" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "Renderer standard (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "Standard (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "Renderer con antialiasing (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "Con antialiasing (16bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Cancella" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Il motore non supporta il livello di debug '%s'" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "Menu" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Salta" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pausa" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "Salta battuta" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "Errore nell'esecuzione del gioco:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "" "Impossibile trovare un motore in grado di eseguire il gioco selezionato" @@ -1095,16 +1092,16 @@ msgstr "Utente cancellato" msgid "Unknown error" msgstr "Errore sconosciuto" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Il gioco in '%s' sembra essere sconosciuto." -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Per favore, riporta i seguenti dati al team di ScummVM con il nome" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "del gioco che hai provato ad aggiungere e la sua versione/lingua/ecc.:" @@ -1141,13 +1138,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~V~ai a elenco giochi" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "Salva gioco:" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1258,6 +1256,88 @@ msgstr "" msgid "Start anyway" msgstr "Avvia comunque" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "Ripristina gioco:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "Ripristina" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "Oggetto in alto a destra" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "Undithering EGA" + +#: engines/sci/detection.cpp:371 +#, fuzzy +msgid "Enable undithering in EGA games" +msgstr "Attiva undithering nei giochi EGA che lo supportano" + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "Volume degli effetti sonori" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "Cursore normale" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1914,7 +1994,7 @@ msgstr "" "Il supporto nativo MIDI richiede il Roland Upgrade della LucasArts,\n" "ma %s non è presente. Verrà usato AdLib." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1925,7 +2005,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1936,7 +2016,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1984,14 +2064,6 @@ msgstr "~M~enu principale" msgid "~W~ater Effect Enabled" msgstr "~E~ffetto acqua attivo" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "Ripristina gioco:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "Ripristina" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2014,6 +2086,66 @@ msgstr "Impossibile eliminare il file." msgid "Failed to save game" msgstr "Impossibile salvare il gioco" +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "Attiva la modalità Roland GS" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "Cursore normale" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "" @@ -2082,6 +2214,14 @@ msgstr "" "Roland MT32 in quelli General MIDI. Alcune tracce\n" "potrebbero non essere riprodotte correttamente." +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2165,6 +2305,14 @@ msgstr "" "Sono state trovare scene di intermezzo DXA ma ScummVM è stato compilato " "senza il supporto zlib" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2401,19 +2549,19 @@ msgstr "Audio ad alta qualit msgid "Disable power off" msgstr "Disattiva spegnimento in chiusura" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "Modalità mouse-clicca-e-trascina attivata." -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "Modalità mouse-clicca-e-trascina disattivata." -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "Modalità touchpad attivata." -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "Modalità touchpad disattivata." @@ -2490,15 +2638,15 @@ msgstr "Filtro grafico attivo:" msgid "Windowed mode" msgstr "Modalità finestra" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL Normal" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL Conserve" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL Original" diff --git a/po/nb_NO.po b/po/nb_NO.po index 780cd8daa7..cdc102f394 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2011-04-25 22:56+0100\n" "Last-Translator: Einar Johan T. Sømåen \n" "Language-Team: somaen \n" @@ -47,7 +47,7 @@ msgid "Go up" msgstr "Gå tilbake" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -72,15 +72,15 @@ msgstr "Lukk" msgid "Mouse click" msgstr "Musklikk" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Vis tastatur" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Omkoble taster" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 #, fuzzy msgid "Toggle FullScreen" msgstr "Veksle fullskjerm" @@ -93,8 +93,8 @@ msgstr "Velg en handling for kobling" msgid "Map" msgstr "Koble" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -131,15 +131,15 @@ msgstr "Vennligst velg en handling" msgid "Press the key to associate" msgstr "Trykk tasten som skal kobles" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "Spill" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -147,29 +147,29 @@ msgstr "" "Kort spill-identifikator, brukt for å referere til lagrede spill, og å kjøre " "spillet fra kommandolinjen" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "Navn:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Full spilltittel" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "Navn:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Språk:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" @@ -177,280 +177,285 @@ msgstr "" "Spillets språk. Dette vil ikke gjøre din spanske spillversjon om til engelsk " "versjon" -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "Plattform:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Plattform spillet opprinnelig ble designet for" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "Plattform:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "Undersøk" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Grafikk" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "GFX" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "Overstyr globale grafikkinstillinger" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "Overstyr globale grafikkinstillinger" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Lyd" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "Overstyr globale lydinstillinger" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "Overstyr globale lydinstillinger" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Volum" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Volum" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "Overstyr globale voluminstillinger" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "Overstyr globale voluminstillinger" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "Overstyr globale MIDI-instillinger" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Overstyr globale MIDI-instillinger" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "Overstyr globale MT-32-instillinger" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Overstyr globale MT-32-instillinger" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Sti" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Sti" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "Spillsti:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "Spillsti:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Ekstrasti:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Bestemmer sti til ytterligere data brukt av spillet" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Ekstrasti:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Lagringssti:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Bestemmer sti til lagrede spill" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Lagringssti:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Ingen" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standard" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Velg SoundFont" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Velg mappe med spilldata" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "Velg mappe med ytterligere data" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "Velg mappe for lagrede spill" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "Denne spill-IDen er allerede i bruk. Vennligst velg en annen." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~A~vslutt" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Avslutt ScummVM" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "~O~m..." -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "Om ScummVM" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~V~alg..." -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "Endre globale ScummVM-innstillinger" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "~S~tart" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "Start valgt spill" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~Å~pne..." -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "Åpne lagret spill for det valgte spillet" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~L~egg til spill..." -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Hold Shift for å legge til flere" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "~R~ediger spill..." -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Endre spillinstillinger" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "~F~jern spill" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Fjern spill fra listen. Spilldataene forblir intakte" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~L~egg til spill..." -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "~R~ediger spill..." -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "~F~jern spill" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "Søk i spilliste" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Søk:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "Åpne spill:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Åpne" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." @@ -458,7 +463,7 @@ msgstr "" "Vil du virkelig kjøre flerspill-finneren? Dette kan potensielt legge til et " "stort antall spill." -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -466,7 +471,7 @@ msgstr "" msgid "Yes" msgstr "Ja" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -474,37 +479,37 @@ msgstr "Ja" msgid "No" msgstr "Nei" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM kunne ikke åpne den valgte mappen!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "ScummVM kunne ikke finne noe spill i den valgte mappen!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "Velg spill:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "Vil du virkelig fjerne denne spillkonfigurasjonen?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "Dette spillet støtter ikke lasting av spill fra oppstarteren." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "" "ScummVM kunne ikke finne noen motor som kunne kjøre det valgte spillet!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "Legg til flere..." -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "Legg til flere..." @@ -571,101 +576,93 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Ingen" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "" -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "" -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "" -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "Grafikkmodus:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "Tegnemodus:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Spesiel dithering-modus støttet av enkelte spill" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Fullskjermsmodus" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "Aspekt-rate korrigering" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "Korriger aspekt-rate for 320x200-spill" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "EGA av-dithering" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "Slår av dithering i EGA-spill som støtter det." - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "Foretrukket enhet:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "Musikkenhet:" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "Velger foretrukket lydenhet eller lydkort-emulator" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Velger ut-lydenhet eller lydkortemulator" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Foretrukket enh.:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "Musikkenhet:" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "AdLib-emulator:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib brukes til musikk i mange spill" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "Utrate:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -673,60 +670,60 @@ msgstr "" "Høyere verdier gir bedre lydkvalitet, men støttes kanskje ikke av ditt " "lydkort " -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "GM-enhet:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "Velger standard lydenhet for General MIDI-utdata" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "Ikke bruk General MIDI-musikk" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "Bruk første tilgjengelige enhet" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "SoundFont støttes ikke av enkelte lydkort, FluidSynth og Timidity" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "Mikset AdLib/MIDI-modus" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "Bruk både MIDI- og AdLib- lydgenerering" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "MIDI gain:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "MT-32 Enhet:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "Velger standard lydenhet for Roland MT-32/LAPC1/CM32I/CM64-avspilling" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -734,191 +731,191 @@ msgstr "" "Velg hvis du har et ekte Roland-kompatible lydkort tilkoblet maskinen, og " "vil bruke dette." -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "Aktiver Roland GS-modus" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "Slå av General MIDI-kobling for spill som har Roland MT-32-lydspor" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "Ikke bruk Roland MT-32-musikk" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "Tekst og Tale:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Tale" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Undertekster" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "Begge" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "Teksthastighet:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "Tekst og Tale:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "Tale" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "Tekst" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "Begge" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "Vis undertekster, og spill av tale" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Underteksthastighet:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "Musikkvolum:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "Musikkvolum:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "Demp alle" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "Lydeffektvolum:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Volum for spesielle lydeffekter" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "Lydeffektvolum:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "Talevolum:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "Talevolum:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "Temasti:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "Temasti:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Velger sti for ytterligere data brukt av alle spill eller ScummVM" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "Pluginsti:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "Pluginsti:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Div" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Div" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "GUI-tegner:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "Autolagre:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "Autolagre:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "Taster" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "GUI-språk:" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "Språk i ScummVM-GUIet" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 #, fuzzy msgid "You have to restart ScummVM before your changes will take effect." msgstr "Du må omstarte ScummVM for at endringene skal skje. " -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "Velg mappe for lagrede spill" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Den valgte mappen kan ikke skrives til. Vennligst velg en annen." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "Velg mappe for GUI-temaer" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "Velg mappe for ytterligere filer" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "Velg mappe for plugins" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -966,64 +963,64 @@ msgstr "Ikke navngitt spilltilstand" msgid "Select a Theme" msgstr "Velg et tema" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "Deaktivert GFX" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "Deaktivert GFX" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "Standard Tegner (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "Standard (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "Antialiased Tegner (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "Antialiased (16bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Tøm verdi" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Motoren støtter ikke debug-nivå '%s'" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "Meny" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Hopp over" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pause" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "Hopp over linje" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "Problem ved kjøring av spill:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "Kunne ikke finne noen motor som kunne kjøre det valgte spillet" @@ -1091,16 +1088,16 @@ msgstr "" msgid "Unknown error" msgstr "Ukjent feil" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "" -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "" @@ -1137,13 +1134,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~T~ilbake til oppstarter" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "Lagret spill:" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1234,6 +1232,88 @@ msgstr "" msgid "Start anyway" msgstr "" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "Gjennopprett spill:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "Gjenopprett" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "Øvre høyre gjenstand" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "EGA av-dithering" + +#: engines/sci/detection.cpp:371 +#, fuzzy +msgid "Enable undithering in EGA games" +msgstr "Slår av dithering i EGA-spill som støtter det." + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "Volum for spesielle lydeffekter" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "Vanlig muspeker" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1897,7 +1977,7 @@ msgid "" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1908,7 +1988,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1919,7 +1999,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1967,14 +2047,6 @@ msgstr "ScummVM Hovedmeny" msgid "~W~ater Effect Enabled" msgstr "~V~anneffekt aktivert" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "Gjennopprett spill:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "Gjenopprett" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2013,6 +2085,66 @@ msgstr "" "\n" "%s" +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "Aktiver Roland GS-modus" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "Vanlig muspeker" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "" @@ -2076,6 +2208,14 @@ msgid "" "that a few tracks will not be correctly played." msgstr "" +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2141,6 +2281,14 @@ msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2359,21 +2507,21 @@ msgstr "H msgid "Disable power off" msgstr "Deaktiver strømsparing" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 #, fuzzy msgid "Mouse-click-and-drag mode enabled." msgstr "Touchpad-modus aktivert." -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 #, fuzzy msgid "Mouse-click-and-drag mode disabled." msgstr "Touchpad-modus deaktivert." -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "Touchpad-modus aktivert." -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "Touchpad-modus deaktivert." @@ -2455,15 +2603,15 @@ msgstr "Bytt grafikkfiltre" msgid "Windowed mode" msgstr "Tegnemodus:" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL Normal" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL Bevar" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL Original" diff --git a/po/nn_NO.po b/po/nn_NO.po index 00dce83302..a5b01a7c52 100644 --- a/po/nn_NO.po +++ b/po/nn_NO.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2011-04-25 23:07+0100\n" "Last-Translator: Einar Johan T. Sømåen \n" "Language-Team: somaen \n" @@ -47,7 +47,7 @@ msgid "Go up" msgstr "Gå tilbake" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -72,15 +72,15 @@ msgstr "Steng" msgid "Mouse click" msgstr "Musklikk" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Syn Tastatur" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Omkople tastar" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 #, fuzzy msgid "Toggle FullScreen" msgstr "Veksle fullskjerm" @@ -93,8 +93,8 @@ msgstr "Vel ei handling for kopling:" msgid "Map" msgstr "Kople" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -131,15 +131,15 @@ msgstr "Vel ei handling" msgid "Press the key to associate" msgstr "Trykk tasten du vil kople" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "Spel" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -147,29 +147,29 @@ msgstr "" "Kort spelidentifikator nytta for å referere til lagra spel, og å køyre " "spelet frå kommandolinja" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "Namn:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Full speltittel:" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "Namn:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Språk:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" @@ -177,286 +177,291 @@ msgstr "" "Spelets språk. Dette vil ikkje gjere den spanske versjonen av spelet til ein " "engelsk versjon" -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "Plattform:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Plattform spelet opprineleg vart designa for" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "Plattform:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "Undersøk" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Grafikk" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "GFX" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "Overstyr globale grafikkinstillingar" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "Overstyr globale grafikkinstillingar" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Lyd" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "Overstyr globale lydinstillingar" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "Overstyr globale lydinstillingar" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Volum" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Volum" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "Overstyr globale voluminstillingar" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "Overstyr globale voluminstillingar" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "Overstyr globale MIDI-instillingar" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Overstyr globale MIDI-instillingar" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "Overstyr globale MT-32-instillingar" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Overstyr globale MT-32-instillingar" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Stiar" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Stiar" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "Spelsti:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "Spelsti:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Ekstrasti:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Ekstrasti:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Lagringssti:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Lagringssti:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Ingen" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standard" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Vel SoundFont" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Vel mappe med speldata" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "Vel mappe for lagra spel" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "" -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~A~vslutt" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Avslutt ScummVM" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "~O~m..." -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "Om ScummVM" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~V~al..." -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "Endre globale ScummVM-instillingar" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "~S~tart" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "Start det velde spelet" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~Å~pne..." -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "Åpne eit lagra spel for the velde spelet" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~L~egg til spel..." -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Hold Shift nede for å legge til fleire" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "~R~ediger spel..." -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Endre spelinstillingar" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "~F~jern spel" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~L~egg til spel..." -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "~R~ediger spel..." -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "~F~jern spel" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "Søk i spelliste" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Søk:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "Åpne spel:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Åpne" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." msgstr "" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -464,7 +469,7 @@ msgstr "" msgid "Yes" msgstr "Ja" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -472,38 +477,38 @@ msgstr "Ja" msgid "No" msgstr "Nei" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM kunne ikkje åpne den velde mappa!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "ScummVM kunne ikkje finne noko spel i den velde mappa!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "Vel spelet:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "Vil du verkeleg fjerne denne spelkonfigurasjonen?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "Dette spelet støttar ikkje åpning av lagra spel frå oppstartaren." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "" "ScummVM kunne ikkje finne nokon motor som var i stand til å køyre det velde " "spelet!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "Legg til fleire..." -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "Legg til fleire..." @@ -570,101 +575,93 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Ingen" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "" -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "" -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "" -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "Grafikkmodus:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "Teiknemodus:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Spesielle dithering-modus som støttast av nokre spel" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Fullskjermsmodus" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "Aspekt-korrigering" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "Rett opp aspekt for 320x200 spel" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "Føretrukken eining:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "AdLib emulator:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib nyttast til musikk i mange spel" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -672,250 +669,250 @@ msgstr "" "Høgare verdier gir betre lydkvalitet, men støttast kanskje ikkje av " "lydkortet ditt" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "Ikkje nytt General MIDI musikk" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "SoundFont støttast av enkelte lydkort, Fluidsynth og Timidity" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "Blanda AdLib/MIDI-modus" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "Nytt båe MIDI og AdLib lydskaping" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "MIDI gain:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" msgstr "" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Ekte Roland MT-32 (ingen GS-emulering)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "Aktiver Roland GS-modus" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "Slår av General MIDI-kopling for spel med Roland MT-32 lydspor" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "Ikkje nytt Roland MT-32 musikk" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "Tekst og Tale:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Tale" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Teksting" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "Begge" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "Undertekstfart:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "Tekst og Tale:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "Tale" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "Tekst" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "Båe" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "Vis teksting og spel av tale" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Undertekstfart:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "Musikkvolum:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "Musikkvolum:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "Demp alle" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "Lydeffektvolum:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "Lydeffektvolum:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "Talevolum:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "Talevolum:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "Temasti:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "Temasti:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "Pluginsti:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "Pluginsti:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Div" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Div" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "GUI-teiknar:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "Autolagre:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "Autolagre:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "Tastar" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "GUI-språk:" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "Språk i ScummVM-GUIet" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 #, fuzzy msgid "You have to restart ScummVM before your changes will take effect." msgstr "Du må omstarte ScummVM for at endringane skal skje." -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "Vel mappe for lagra spel" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Den velde mappa kan ikkje skrivast til. Vennlegst vel ein annan." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "Vel ei mappe for GUI-tema:" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "Vel ei mappe for ekstra filer" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "Vel ei mappe for plugins" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -963,64 +960,64 @@ msgstr "Ikkje navngjeven speltilstand" msgid "Select a Theme" msgstr "Vel eit tema" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "Deaktivert GFX" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "Deaktivert GFX" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "Standard Teiknar (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "Standard (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "Antialiased Teiknar (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "Antialiased (16bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Tøm verdi" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Motoren støttar ikkje debug-nivå '%s'" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "Meny" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Hopp over" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pause" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "Hopp over linje" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "Feil under køyring av spel:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "Kunne ikkje finne nokon motor som kunne køyre det velde spelet." @@ -1089,16 +1086,16 @@ msgstr "" msgid "Unknown error" msgstr "Ukjend feil" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "" -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "" @@ -1137,13 +1134,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~T~ilbake til oppstarter" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "Lagra spel:" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1234,6 +1232,86 @@ msgstr "" msgid "Start anyway" msgstr "" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "Gjenopprett spel:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "Gjenopprett" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "Øvre høgre gjenstand" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "" + +#: engines/sci/detection.cpp:371 +msgid "Enable undithering in EGA games" +msgstr "" + +#: engines/sci/detection.cpp:380 +msgid "Prefer digital sound effects" +msgstr "" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "Vanleg peikar" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1897,7 +1975,7 @@ msgid "" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1905,7 +1983,7 @@ msgid "" "%s" msgstr "" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1913,7 +1991,7 @@ msgid "" "%s" msgstr "" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1958,14 +2036,6 @@ msgstr "ScummVM Hovudmeny" msgid "~W~ater Effect Enabled" msgstr "~V~anneffekt aktivert" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "Gjenopprett spel:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "Gjenopprett" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -1989,6 +2059,66 @@ msgstr "" msgid "Failed to save game" msgstr "Full speltittel:" +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "Aktiver Roland GS-modus" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "Vanleg peikar" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "" @@ -2052,6 +2182,14 @@ msgid "" "that a few tracks will not be correctly played." msgstr "" +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2117,6 +2255,14 @@ msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2335,19 +2481,19 @@ msgstr "" msgid "Disable power off" msgstr "Deaktiver strømsparing" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "" -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "" -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "" -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "" @@ -2429,15 +2575,15 @@ msgstr "Veksle grafikkfiltre" msgid "Windowed mode" msgstr "Teiknemodus:" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL Normal" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL Bevar" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL Original" diff --git a/po/pl_PL.po b/po/pl_PL.po index d74c40f47d..94929760cc 100644 --- a/po/pl_PL.po +++ b/po/pl_PL.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2011-10-24 21:14+0100\n" "Last-Translator: Micha³ Zi±bkowski \n" "Language-Team: Grajpopolsku.pl \n" @@ -47,7 +47,7 @@ msgid "Go up" msgstr "W górê" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -72,15 +72,15 @@ msgstr "Zamknij" msgid "Mouse click" msgstr "Klikniêcie" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Wy¶wietl klawiaturê" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Dostosuj klawisze" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 #, fuzzy msgid "Toggle FullScreen" msgstr "W³±cz/wy³±cz pe³ny ekran" @@ -93,8 +93,8 @@ msgstr "Wybierz akcj msgid "Map" msgstr "Przypisz" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -131,15 +131,15 @@ msgstr "Wybierz akcj msgid "Press the key to associate" msgstr "Wci¶nij klawisz do przypisania" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "Gra" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -147,315 +147,320 @@ msgstr "" "Krótki identyfikator gry u¿ywany do rozpoznawania zapisów i uruchamiania gry " "z linii komend" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "Nazwa:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Pe³ny tytu³ gry:" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "Nazwa:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Jêzyk:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" msgstr "Jêzyk gry. Nie zmieni to hiszpañskiej wersji gry w angielsk±." -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "Platforma:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Platforma, na któr± stworzono grê" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "Platforma:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "Zbadaj" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Grafika" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "Grafika" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "U¿yj w³asnych ustawieñ grafiki" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "U¿yj w³asnych ustawieñ grafiki" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "D¼wiêk" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "U¿yj w³asnych ustawieñ d¼wiêku" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "U¿yj w³asnych ustawieñ d¼wiêku" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "G³o¶no¶æ" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "G³o¶no¶æ" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "U¿yj w³asnych ustawieñ g³o¶no¶ci" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "U¿yj w³asnych ustawieñ g³o¶no¶ci" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "U¿yj w³asnych ustawieñ MIDI" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "U¿yj w³asnych ustawieñ MIDI" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "U¿yj w³asnych ustawieñ MT-32" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "U¿yj w³asnych ustawieñ MT-32" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "¦cie¿ki" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "¦cie¿ki" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "¦cie¿ka gry:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "¦cie¿ka gry:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "¦c. dodatków:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Okre¶la ¶cie¿kê dodatkowych danych gry" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "¦c. dodatków:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "¦cie¿ka zapisów:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Okre¶la gdzie zapisywaæ stan gry" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "¦cie¿ka zapisów:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Brak" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Domy¶lnie" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Wybierz SoundFont" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Wybierz katalog z plikami gry" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "Wybierz dodatkowy katalog gry" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "Wybierz katalog dla zapisów" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "Identyfikator jest ju¿ zajêty. Wybierz inny." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~Z~akoñcz" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Zakoñcz ScummVM" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "I~n~formacje..." -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "Ksi±¿ka ScummVM" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~O~pcje..." -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "Zmieñ ustawienia ScummVM" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "~S~tart" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "Rozpocznij wybran± grê" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~W~czytaj..." -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "Wczytaj zapis wybranej gry" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~D~odaj grê..." -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Przytrzymaj Shift, by dodawaæ zbiorowo" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "~E~dytuj grê..." -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Zmieñ opcje gry" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "~U~suñ grê" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Usuwa grê z listy. Pliki gry pozostaj± nietkniête" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~D~odaj grê..." -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "~E~dytuj grê..." -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "~U~suñ grê" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "Wyszukaj grê na li¶cie" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Szukaj" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "Wczytaj grê:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Wczytaj" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." msgstr "" "Chcesz uruchomiæ masowy detektor gier? Mo¿e dodaæ wiele tytu³ów do listy" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -463,7 +468,7 @@ msgstr "" msgid "Yes" msgstr "Tak" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -471,36 +476,36 @@ msgstr "Tak" msgid "No" msgstr "Nie" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM nie mo¿e otworzyæ katalogu!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "ScummVM nie znalaz³ ¿adnej gry w tym katalogu!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "Wybierz grê:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "Na pewno chcesz usun±æ tê grê z konfiguracji?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "Ta gra nie wspiera wczytywania z launchera." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "ScummVM nie znalaz³ silnika zdolnego uruchomiæ wybran± grê!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "Masowe dodawanie..." -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "Masowe dodawanie..." @@ -567,101 +572,93 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Brak" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "Nie uda³o siê zastosowaæ czê¶ci zmian opcji grafiki:" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "nie uda³o siê zmieniæ trybu wideo." -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "nie uda³o siê zmieniæ trybu pe³noekranowego" -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "nie uda³o siê zmieniæ formatu obrazu" -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "Tryb grafiki:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "Renderer:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Specjalne tryby ditheringu wspierane przez niektóre gry" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Pe³ny ekran" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "Korekcja formatu obrazu" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "Korekcja formatu obrazu dla gier 320x200" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "Anty-dithering EGA" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "W³±cz anty-dithering we wspieranych grach EGA" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "Pref. urz±dzenie:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "Urz. muzyczne:" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "Okre¶la preferowane urz±dzenie d¼wiêkowe lub emulator karty d¼wiêkowej" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Okre¶la wyj¶ciowe urz±dzenie d¼wiêkowe lub emulator karty d¼wiêkowej" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Pref. urz±dzenie:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "Urz. muzyczne:" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "Emulator AdLib:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib jest u¿ywany do muzyki w wielu grach" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "Czêst. wyj.:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -669,63 +666,63 @@ msgstr "" "Wy¿sze warto¶ci daj± lepsz± jako¶æ d¼wiêku, ale mog± byæ nieobs³ugiwane " "przez twoj± kartê d¼wiêkow±" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "Urz±dzenie GM:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "Okre¶la domy¶lne urz±dzenie d¼wiêkowe dla wyj¶cia General MIDI" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "Nie u¿ywaj muzyki General MIDI" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "U¿yj pierwszego dostêpnego urz±dzenia" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "" "SoundFont jest wspierany przez niektóre karty d¼wiêkowe, Fluidsynth i " "Timidity" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "Tryb miksowanego AdLib/MIDI" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "U¿ywaj obu generatorów d¼wiêku, MIDI i AdLib, jednocze¶nie" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "Wzm. MIDI:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "Urz±dzenie MT-32:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Okre¶la domy¶lne urz±dzenie d¼wiêku dla wyj¶cia Roland MT-32/LAPC1/CM32l/CM64" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Prawdziwy Roland MT-32 (wy³±cz emulacjê GM)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -733,191 +730,191 @@ msgstr "" "Zaznacz, je¶li chcesz u¿ywaæ swojej prawdziwej karty kompatybilnej z Roland " "pod³±czonej do twojego komputera" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Prawdziwy Roland MT-32 (brak emulacji GM)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "W³±cz tryb Roland GS" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "" "Wy³±cza mapowanie General MIDI dla gier ze ¶cie¿k± d¼wiêkow± Roland MT-32" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "Nie u¿ywaj muzyki Roland MT-32" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "Tekst i mowa:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Mowa" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Napisy" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "Oba" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "Prêd. napisów:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "Tekst i mowa:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "Mowa" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "Napisy" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "Oba" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "Wy¶wietlaj napisy i odtwarzaj mowê" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Prêd. napisów:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "G³o¶no¶æ muzyki:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "G³o¶no¶æ muzyki:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "Wycisz" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "G³. efekt. d¼w.:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "G³o¶no¶æ efektów d¼w." -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "G³. efekt. d¼w.:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "G³o¶no¶æ mowy:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "G³o¶no¶æ mowy:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "¦cie¿ka stylu:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "¦cie¿ka stylu:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Okre¶la ¶cie¿kê dla dodatkowych danych dla wszystkich gier lub ScummVM" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "¦cie¿ka wtyczek:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "¦cie¿ka wtyczek:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Ró¿ne" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Ró¿ne" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "Styl:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "Renderer interf.:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "Autozapis:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "Autozapis:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "Klawisze" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "Jêzyk interfejsu:" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "Jêzyk interfejsu ScummVM" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Musisz zrestartowaæ ScummVM, by zmiany zosta³y uwzglêdnione." -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "Wybierz katalog zapisów" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "Ten katalog jest zabezpieczony przed zapisem. Wybierz inny." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "Wybierz katalog dla stylów GUI." -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "Wybierz katalog dla dodatkowych plików" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "Wybierz katalog dla wtyczek" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -965,64 +962,64 @@ msgstr "Zapis bez nazwy" msgid "Select a Theme" msgstr "Wybierz styl" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "Wy³±czona grafika" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "Wy³±czona grafika" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "Standardowy renderer (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "Standardowy (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "Wyg³adzany renderer (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "Wyg³adzany (16bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Wyczy¶æ" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Silnik nie wspiera poziomu debugowania '%s'" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "Menu" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Pomiñ" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Wstrzymaj" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "Pomiñ liniê" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "B³±d podczas uruchamiania gry:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "Nie uda³o siê znale¼æ silnika zdolnego do uruchomienia zaznaczonej gry" @@ -1090,16 +1087,16 @@ msgstr "Przerwane przez u msgid "Unknown error" msgstr "Nieznany b³±d" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Gra w '%s' wygl±da na nieznan±." -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Przeka¿ poni¿sze dane zespo³owi ScummVM razem z nazw±" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "gry, któr± próbowa³e¶ dodaæ oraz jej wersj±, jêzykiem itd.:" @@ -1136,13 +1133,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~P~owrót do launchera" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "Zapis:" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1249,6 +1247,88 @@ msgstr "" msgid "Start anyway" msgstr "W³±cz mimo tego" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "Wznów grê:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "Wznów" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "Przedmiot u góry, z prawej" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "Anty-dithering EGA" + +#: engines/sci/detection.cpp:371 +#, fuzzy +msgid "Enable undithering in EGA games" +msgstr "W³±cz anty-dithering we wspieranych grach EGA" + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "G³o¶no¶æ efektów d¼w." + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "Zwyk³y kursor" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1906,7 +1986,7 @@ msgstr "" "Natywne wsparcie MIDI wymaga aktualizacji Rolanda od LucasArts,\n" "ale brakuje %s. Prze³±czam na tryb AdLib." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1917,7 +1997,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1928,7 +2008,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1975,14 +2055,6 @@ msgstr "~M~enu g msgid "~W~ater Effect Enabled" msgstr "~E~fekty wody w³±czone" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "Wznów grê:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "Wznów" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2005,6 +2077,66 @@ msgstr "Nie uda msgid "Failed to save game" msgstr "Nie uda³o siê zapisaæ stanu gry" +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "W³±cz tryb Roland GS" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "Zwyk³y kursor" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "" @@ -2072,6 +2204,14 @@ msgstr "" "Próbujemy przypisaæ instrumenty Rolanda MT32 do instrumentów General MIDI. " "Niektóre utwory mog± byæ ¼le odtwarzane." +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2155,6 +2295,14 @@ msgstr "" "Znaleziono przerywniki w formacie DXA, ale ScummVM jest skompilowany bez " "obs³ugi zlib" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2390,19 +2538,19 @@ msgstr "D msgid "Disable power off" msgstr "Nie wy³±czaj zasilania" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "W³±czono tryb kliknij i przeci±gaj." -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "Wy³±czono tryb kliknij i przeci±gaj." -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "Tryb touchpada w³±czony." -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "Tryb touchpada wy³±czony." @@ -2479,15 +2627,15 @@ msgstr "Aktywny filtr graficzny:" msgid "Windowed mode" msgstr "Okno" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL - normalny" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL - zachowanie proporcji" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL - oryginalny rozmiar" diff --git a/po/pt_BR.po b/po/pt_BR.po index 16293a543f..2c3a530b30 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2011-10-21 21:30-0300\n" "Last-Translator: Saulo Benigno \n" "Language-Team: ScummBR (www.scummbr.com) \n" @@ -47,7 +47,7 @@ msgid "Go up" msgstr "Acima" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -72,15 +72,15 @@ msgstr "Fechar" msgid "Mouse click" msgstr "Clique do mouse" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Mostrar teclado" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Remapear teclas" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 #, fuzzy msgid "Toggle FullScreen" msgstr "Habilita Tela Cheia" @@ -93,8 +93,8 @@ msgstr "Selecione uma a msgid "Map" msgstr "Mapear" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -131,15 +131,15 @@ msgstr "Por favor selecione uma a msgid "Press the key to associate" msgstr "Pressione a tecla para associar" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "Jogo" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "Código:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -147,309 +147,314 @@ msgstr "" "Código identificador usado para se referir a jogos salvos e execução do jogo " "a partir da linha de comando" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "Código:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "Nome:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Título completo do jogo" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "Nome:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Idioma:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" msgstr "Idioma do jogo. Isto não irá passar seu jogo Inglês para Português" -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "Sistema:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Sistema que o jogo foi desenvolvido originalmente" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "Sistema:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "Examinar" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Gráficos" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "GFX" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "Sobrepor configuração global de gráficos" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "Sobrepor configuração global de gráficos" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Áudio" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "Sobrepor configuração global de áudio" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "Sobrepor configuração global de áudio" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Volume" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Volume" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "Sobrepor configuração global de volume" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "Sobrepor configuração global de volume" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "Sobrepor configuração global de MIDI" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Sobrepor configuração global de MIDI" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "Sobrepor configuração global de MT-32" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Sobrepor configuração global de MT-32" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Pastas" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Pastas" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "Pasta do Jogo:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "Pasta do Jogo:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Pasta de Extras" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Especifique a pasta para dados utilizados no jogo" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Pasta de Extras" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Pasta para Salvar" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Especifique onde guardar seus jogos salvos" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Pasta para Salvar" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Nenhum(a)" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Padrão" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Selecione o SoundFont" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Selecione a pasta com os arquivos do jogo" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "Selecione a pasta adicional do jogo" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "Selecione a pasta para os jogos salvos" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "Este código já esta sendo utilizado. Por favor, escolha outro." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~S~air" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Sair do ScummVM" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "So~b~re..." -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "Sobre o ScumnmVM" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~O~pções" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "Alterar opções globais do ScummVM" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "~I~niciar" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "Iniciar jogo selecionado" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~C~arregar" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "Carregar jogo salvo do jogo selecionado" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~A~dicionar Jogo..." -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Segure Shift para Multi-Adição" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "~E~ditar Jogo..." -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Alterar opções do jogo" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "~R~emover Jogo" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "" "Remover jogo da lista. Os arquivos de dados do jogo permanecem intactos" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~A~dicionar Jogo..." -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "~E~ditar Jogo..." -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "~R~emover Jogo" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "Pesquisar na lista de jogos" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Pesquisar:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "Carregar jogo:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Carregar" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." @@ -457,7 +462,7 @@ msgstr "" "Você realmente deseja adicionar vários jogos ao mesmo tempo? Isso poderá " "resultar em uma adição gigantesca de jogos." -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -465,7 +470,7 @@ msgstr "" msgid "Yes" msgstr "Sim" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -473,38 +478,38 @@ msgstr "Sim" msgid "No" msgstr "Não" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM não conseguiu abrir a pasta especificada!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "ScummVM não encontrou nenhum jogo na pasta especificada!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "Escolha o jogo:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "Você deseja realmente remover a configuração deste jogo?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "Este jogo não suporta abrir jogos a partir do menu principal." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "" "ScummVM não conseguiu encontrar qualquer programa capaz de rodar o jogo " "selecionado!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "Multi-Adição..." -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "Multi-Adição..." @@ -575,101 +580,93 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Nenhum(a)" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "Falha ao aplicar algumas mudanças nas opções de gráfico:" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "o modo de vídeo não pôde ser alterado." -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "a configuração de tela cheia não pôde ser mudada" -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "a configuração de proporção não pôde ser mudada" -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "Modo gráfico:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "Renderização" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Modos especiais de dithering suportados por alguns jogos" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Modo Tela Cheia" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "Correção de proporção" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "Correção de proporção para jogos 320x200" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "EGA sem dithering" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "Habilita EGA sem dithering em jogos com suporte" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "Dispositivo pref.:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "Disp. de música:" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "Especifica o dispositivo de som preferido ou emulador de placa de som" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Especifica o dispositivo de saída de som ou emulador de placa de som" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Dispositivo pref.:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "Dispositivo de música:" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "Emulador AdLib:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib é utilizado para música em vários jogos" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "Taxa de saída:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -677,62 +674,62 @@ msgstr "" "Maior valor especifica melhor qualidade de som, mas pode não ser suportado " "por sua placa de som" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "Dispositivo GM:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "Especifique o dispositivo de som padrão para a saída General MIDI" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "Não usar música General MIDI" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "Usar o primeiro dispositivo disponível" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "SoundFont é suportado por algumas placas de som, Fluidsynth e Timidity" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "Mixar AdLib/MIDI" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "Usar MIDI e AdLib juntos na geração de som" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "Ganho MIDI:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "Dispositivo MT-32:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Especifique o dispositivo de som padrão para a saída Roland MT-32/LAPC1/" "CM32l/CM64" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Roland MT-32 real (desligar emulação GM)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -740,193 +737,193 @@ msgstr "" "Verifique se você quer usar o seu dispositivo de hardware de som compatível " "com Roland" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Roland MT-32 real (sem emulação GM)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "Ligar modo Roland GS" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "" "Desliga o mapeamento General MIDI para jogos com trilha sonora Roland MT-32" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "Não usar música Roland MT-32" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "Texto e Voz:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Voz" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Legendas" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "Ambos" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "Rapidez legendas:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "Texto e Voz:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "Voz" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "Legs" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "Ambos" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "Mostrar legenda e vozes (dublagem)" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Velocidade das legendas:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "Volume da Música:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "Volume da Música:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "Mudo" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "Volume dos Sons:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Volume dos efeitos sonoros especiais" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "Volume dos Sons:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "Volume da Voz:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "Volume da Voz:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "Pasta do Tema" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "Pasta do Tema" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Especifica a pasta para os dados adicionais usados por todos os jogos ou " "ScummVM" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "Pasta de Plugins:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "Pasta de Plugins:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Outros" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Outros" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "Renderizador GUI:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "Auto-Salvar:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "Auto-Salvar:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "Teclas" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "Idioma do GUI:" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "Linguagem do ScummVM GUI" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Você tem que reiniciar o ScummVM para funcionar." -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "Selecione a pasta para o jogos salvos" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "O diretório escolhido não pode ser usado. Por favor, selecione outro." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "Selecione a pasta para os temas da Interface de Uso Gráfico" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "Selecione a pasta para os arquivos extras" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "Selecione a pasta para os plugins" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -974,64 +971,64 @@ msgstr "N msgid "Select a Theme" msgstr "Selecione um Tema" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "GFX desabilitado" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX desabilitado" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "Renderizador padrão (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "Padrão (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "Renderizador Anti-Serrilhamento (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "Anti-Serrilhamento (16bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Limpar valor" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Esse programa não suporta o nível de debug '%s'" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "Menu" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Pular" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pausar" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "Pula linha" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "Erro ao executar o jogo:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "" "Não foi possível encontrar qualquer programa capaz de rodar o jogo " @@ -1101,17 +1098,17 @@ msgstr "Usu msgid "Unknown error" msgstr "Erro desconhecido" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "O jogo em '% s' parece ser desconhecido." -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Por favor, informe os seguintes dados para a equipe ScummVM junto com o nome" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "do jogo que você tentou adicionar e sua versão/idioma/etc.:" @@ -1148,13 +1145,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~V~oltar ao menu" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "Salvar jogo:" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1265,6 +1263,88 @@ msgstr "" msgid "Start anyway" msgstr "Iniciar de qualquer maneira" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "Restaurar jogo:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "Restaurar" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "Item da direita superior" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "EGA sem dithering" + +#: engines/sci/detection.cpp:371 +#, fuzzy +msgid "Enable undithering in EGA games" +msgstr "Habilita EGA sem dithering em jogos com suporte" + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "Volume dos efeitos sonoros especiais" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "Cursor normal" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1923,7 +2003,7 @@ msgstr "" "LucasArts,\n" "mas %s está faltando. Utilizando AdLib ao invés." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1934,7 +2014,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1945,7 +2025,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1993,14 +2073,6 @@ msgstr "~M~enu Principal ScummVM" msgid "~W~ater Effect Enabled" msgstr "Modo ~E~feitos de água ativado" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "Restaurar jogo:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "Restaurar" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2029,6 +2101,66 @@ msgstr "Falha ao excluir arquivo." msgid "Failed to save game" msgstr "Falha ao salvar o jogo" +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "Ligar modo Roland GS" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "Cursor normal" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "" @@ -2097,6 +2229,14 @@ msgstr "" "o modelo General MIDI. Talvez possa acontecer\n" "que algumas faixas não sejam corretamente tocadas." +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2180,6 +2320,14 @@ msgstr "" "Vídeos no formato DXA foram encontrados, mas o ScummVM foi compilado sem " "suporte a zlib" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2416,19 +2564,19 @@ msgstr "Som de alta qualidade (mais lento) (reiniciar)" msgid "Disable power off" msgstr "Desativar desligamento" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "Modo clique-e-arraste do mouse ligado." -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "Modo clique-e-arraste do mouse desligado." -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "Modo Touchpad ligado." -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "Modo Touchpad desligado." @@ -2505,15 +2653,15 @@ msgstr "Ativa os filtros gr msgid "Windowed mode" msgstr "Modo janela" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL Normal" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL Conserve" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL Original" diff --git a/po/ru_RU.po b/po/ru_RU.po index fe2204f6e5..dbeb07298e 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2012-02-16 13:09+0200+0200\n" "Last-Translator: Eugene Sandulenko \n" "Language-Team: Russian\n" @@ -45,7 +45,7 @@ msgid "Go up" msgstr "²ÒÕàå" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -70,15 +70,15 @@ msgstr " msgid "Mouse click" msgstr "ºÛØÚ Üëèìî" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "¿ÞÚÐ×Ðâì ÚÛÐÒØÐâãàã" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "¿ÕàÕÝÐ×ÝÐçØâì ÚÛÐÒØèØ" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 msgid "Toggle FullScreen" msgstr "¿ÕàÕÚÛîçÕÝØÕ ÝÐ ÒÕáì íÚàÐÝ" @@ -90,8 +90,8 @@ msgstr " msgid "Map" msgstr "½Ð×ÝÐçØâì" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -128,15 +128,15 @@ msgstr " msgid "Press the key to associate" msgstr "½ÐÖÜØâÕ ÚÛÐÒØèã ÔÛï ÝÐ×ÝÐçÕÝØï" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "¸ÓàÐ" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -144,309 +144,314 @@ msgstr "" "ºÞàÞâÚØÙ ØÔÕÝâØäØÚÐâÞà, ØáßÞÛì×ãÕÜëÙ ÔÛï ØÜÕÝ áÞåàÐÝÕÝØÙ ØÓà Ø ÔÛï ×ÐßãáÚÐ " "Ø× ÚÞÜÐÝÔÝÞÙ áâàÞÚØ" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "½Ð×ÒÐÝØÕ:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "¿ÞÛÝÞÕ ÝÐ×ÒÐÝØÕ ØÓàë" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "½Ð×Ò:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Ï×ëÚ:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" msgstr "" "Ï×ëÚ ØÓàë. ¸×ÜÕÝÕÝØÕ íâÞÙ ÝÐáâàÞÙÚØ ÝÕ ßàÕÒàÐâØâ ØÓàã ÝÐ ÐÝÓÛØÙáÚÞÜ Ò àãááÚãî" -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "<ßÞ ãÜÞÛçÐÝØî>" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "¿ÛÐâäÞàÜÐ:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "¿ÛÐâäÞàÜÐ, ÔÛï ÚÞâÞàÞÙ ØÓàÐ ÑëÛÐ Ø×ÝÐçÐÛìÝÞ àÐ×àÐÑÞâÐÝÐ" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "¿ÛÐâäÞàÜÐ:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "¿àÞÒÕàØâì" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "³àÐäØÚÐ" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "³àä" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "¿ÕàÕÚàëâì ÓÛÞÑÐÛìÝëÕ ãáâÐÝÞÒÚØ ÓàÐäØÚØ" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "¿ÕàÕÚàëâì ÓÛÞÑÐÛìÝëÕ ãáâÐÝÞÒÚØ ÓàÐäØÚØ" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "°ãÔØÞ" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "¿ÕàÕÚàëâì ÓÛÞÑÐÛìÝëÕ ãáâÐÝÞÒÚØ ÐãÔØÞ" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "¿ÕàÕÚàëâì ÓÛÞÑÐÛìÝëÕ ãáâÐÝÞÒÚØ ÐãÔØÞ" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "³àÞÜÚÞáâì" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "³àÞÜÚ" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "¿ÕàÕÚàëâì ÓÛÞÑÐÛìÝëÕ ãáâÐÝÞÒÚØ ÓàÞÜÚÞáâØ" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "¿ÕàÕÚàëâì ÓÛÞÑÐÛìÝëÕ ãáâÐÝÞÒÚØ ÓàÞÜÚÞáâØ" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "¿ÕàÕÚàëâì ÓÛÞÑÐÛìÝëÕ ãáâÐÝÞÒÚØ MIDI" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "¿ÕàÕÚàëâì ÓÛÞÑÐÛìÝëÕ ãáâÐÝÞÒÚØ MIDI" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "¿ÕàÕÚàëâì ÓÛÞÑÐÛìÝëÕ ãáâÐÝÞÒÚØ MT-32" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "¿ÕàÕÚàëâì ÓÛÞÑÐÛìÝëÕ ãáâÐÝÞÒÚØ MT-32" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "¿ãâØ" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "¿ãâØ" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "¿ãâì Ú ØÓàÕ:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "³ÔÕ ØÓàÐ:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "´Þß. ßãâì:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "ÃÚÐ×ëÒÐÕâ ßãâì Ú ÔÞßÞÛÝØâÕÛìÝëÜ äÐÙÛÐÜ ÔÐÝÝëå ÔÛï ØÓàë" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "´Þß. ßãâì:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "ÁÞåàÐÝÕÝØï ØÓà:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "ÃÚÐ×ëÒÐÕâ ßãâì Ú áÞåàÐÝÕÝØïÜ ØÓàë" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "¿ãâì áÞåà:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "½Õ ×ÐÔÐÝ" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "¿Þ ãÜÞÛçÐÝØî" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "²ëÑÕàØâÕ SoundFont" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "²ëÑÕàØâÕ ÔØàÕÚâÞàØî á äÐÙÛÐÜØ ØÓàë" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "²ëÑÕàØâÕ ÔÞßÞÛÝØâÕÛìÝãî ÔØàÕÚâÞàØî ØÓàë" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "²ëÑÕàØâÕ ÔØàÕÚâÞàØî ÔÛï áÞåàÐÝÕÝØÙ" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "ÍâÞâ ID ØÓàë ãÖÕ ØáßÞÛì×ãÕâáï. ¿ÞÖÐÛãÙáâÐ, ÒëÑÕàØâÕ ÔàãÓÞÙ." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~²~ëåÞÔ" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "·ÐÒÕàèØâì ScummVM" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "¾ ß~à~ÞÓàÐÜÜÕ..." -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "¾ ßàÞÓàÐÜÜÕ ScummVM" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~½~ÐáâàÞÙÚØ..." -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "¸×ÜÕÝØâì ÓÛÞÑÐÛìÝëÕ ÝÐáâàÞÙÚØ ScummVM" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "¿~ã~áÚ" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "·ÐßãáâØâì ÒëÑàÐÝÝãî ØÓàã" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~·~ÐÓàã×Øâì..." -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "·ÐÓàã×Øâì áÞåàÝÕÝØÕ ÔÛï ÒëÑàÐÝÝÞÙ ØÓàë" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~´~ÞÑÐÒØâì ØÓàã..." -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "ÃÔÕàÖØÒÐÙâÕ ÚÛÐÒØèã Shift ÔÛï âÞÓÞ, çâÞÑë ÔÞÑÐÒØâì ÝÕáÚÞÛìÚÞ ØÓà" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "½~Ð~áâàÞÙÚØ ØÓàë..." -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "¸×ÜÕÝØâì ÝÐáâàÞÙÚØ ØÓàë" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "~Ã~ÔÐÛØâì ØÓàã" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "ÃÔÐÛØâì ØÓàã Ø× áßØáÚÐ. ½Õ ãÔÐÛïÕâ ØÓàã á ÖÕáâÚÞÓÞ ÔØáÚÐ" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~´~ÞÑ. ØÓàã..." -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "½~Ð~á. ØÓàë..." -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "~Ã~ÔÐÛØâì ØÓàã" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "¿ÞØáÚ Ò áßØáÚÕ ØÓà" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "¿ÞØáÚ:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "·ÐÓàã×Øâì ØÓàã:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "·ÐÓàã×Øâì" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." @@ -454,7 +459,7 @@ msgstr "" "²ë ÔÕÙáâÒØâÕÛìÝÞ åÞâØâÕ ×ÐßãáâØâì ÔÕâÕÚâÞà ÒáÕå ØÓà? ÍâÞ ßÞâÕÝæØÐÛìÝÞ ÜÞÖÕâ " "ÔÞÑÐÒØâì ÑÞÛìèÞÕ ÚÞÛØçÕáâÒÞ ØÓà." -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -462,7 +467,7 @@ msgstr "" msgid "Yes" msgstr "´Ð" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -470,36 +475,36 @@ msgstr " msgid "No" msgstr "½Õâ" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM ÝÕ ÜÞÖÕâ ÞâÚàëâì ãÚÐ×ÐÝÝãî ÔØàÕÚâÞàØî!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "ScummVM ÝÕ ÜÞÖÕâ ÝÐÙâØ ØÓàã Ò ãÚÐ×ÐÝÝÞÙ ÔØàÕÚâÞàØØ!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "²ëÑÕàØâÕ ØÓàã:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "²ë ÔÕÙáâÒØâÕÛìÝÞ åÞâØâÕ ãÔÐÛØâì ÝÐáâàÞÙÚØ ÔÛï íâÞÙ ØÓàë?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "ÍâÐ ØÓàÐ ÝÕ ßÞÔÔÕàÖØÒÐÕâ ×ÐÓàã×Úã áÞåàÐÝÕÝØÙ çÕàÕ× ÓÛÐÒÝÞÕ ÜÕÝî." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "ScummVM ÝÕ áÜÞÓ ÝÐÙâØ ÔÒØÖÞÚ ÔÛï ×ÐßãáÚÐ ÒëÑàÐÝÝÞÙ ØÓàë!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "¼ÝÞÓÞ ØÓà..." -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "¼ÝÞÓÞ ØÓà..." @@ -566,104 +571,94 @@ msgstr "44 Ú³ msgid "48 kHz" msgstr "48 Ú³æ" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "½Õ ×ÐÔÐÝ" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "½Õ ãÔÐÛÞáì ßàØÜÕÝØâì Ø×ÜÕÝÕÝØï ÝÕÚâÞàëå ÓàÐäØçÕáÚØå ÝÐáâàÞÕÚ:" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "ÒØÔÕÞàÕÖØÜ ÝÕ ÜÞÖÕâ Ñëâì Ø×ÜÕÝñÝ." -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "ßÞÛÝÞíÚàÐÝÝëÙ àÕÖØÜ ÝÕ ÜÞÖÕâ Ñëâì Ø×ÜÕÝñÝ" -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "àÕÖØÜ ÚÞààÕÚâØàÞÒÚØ áÞÞâÝÞèÕÝØï áâÞàÞÝ ÝÕ ÜÞÖÕâ Ñëâì Ø×ÜÕÝñÝ" -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "³àÐä. àÕÖØÜ:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "ÀÕÖØÜ àÐáâàÐ:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "ÁßÕæØÐÛìÝëÕ àÕÖØÜë àÕÝÔÕàØÝÓÐ, ßÞÔÔÕàÖØÒÐÕÜëÕ ÝÕÚÞâÞàëÜØ ØÓàÐÜØ" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "¿ÞÛÝÞíÚàÐÝÝëÙ àÕÖØÜ" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "ºÞààÕÚæØï áÞÞâÝÞèÕÝØï áâÞàÞÝ" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "ºÞààÕÚâØàÞÒÐâì áÞÞâÝÞèÕÝØÕ áâÞàÞÝ ÔÛï ØÓà á àÐ×àÕèÕÝØÕÜ 320x200" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "EGA ÑÕ× àÐáâàÐ" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "" -"²ÚÛîçÐÕâ àÕÖØÜ ÑÕ× àÐáâàØàÞÒÐÝØï Ò EGA ØÓàÐå, ÚÞâÞàëÕ ßÞÔÔÕàÖØÒÐîâ âÐÚÞÙ " -"àÕÖØÜ" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "¿àÕÔßÞçØâÐÕÜÞÕ:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "·ÒãÚÞÒÞÕ ãáâ-ÒÞ:" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "" "ÃÚÐ×ëÒÐÕâ ßàÕÔßÞçØâÐÕÜÞÕ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ ØÛØ íÜãÛïâÞà ×ÒãÚÞÒÞÙ ÚÐàâë" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "ÃÚÐ×ëÒÐÕâ ÒëåÞÔÝÞÕ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ ØÛØ íÜãÛïâÞà ×ÒãÚÞÒÞÙ ÚÐàâë" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "¿àÕÔßÞçØâÐÕÜÞÕ:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "·ÒãÚÞÒÞÕ ãáâ-ÒÞ:" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "ÍÜãÛïâÞà AdLib:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "·ÒãÚÞÒÐï ÚÐàâÐ AdLib ØáßÞÛì×ãÕâáï ÜÝÞÓØÜØ ØÓàÐÜØ" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "ÇÐáâÞâÐ ×ÒãÚÐ:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -671,64 +666,64 @@ msgstr "" "±¾ÛìèØÕ ×ÝÐçÕÝØï ×ÐÔÐîâ ÛãçèÕÕ ÚÐçÕáâÒÞ ×ÒãÚÐ, ÞÔÝÐÚÞ ÞÝØ ÜÞÓãâ ÝÕ " "ßÞÔÔÕàÖØÒÐâìáï ÒÐèÕÙ ×ÒãÚÞÒÞÙ ÚÐàâÞÙ" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "ÃáâàÞÙáâÒÞ GM:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "ÃÚÐ×ëÒÐÕâ ÒëåÞÔÝÞÕ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ ÔÛï MIDI" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "½Õ ØáßÞÛì×ÞÒÐâì Üã×ëÚã ÔÛï General MIDI" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "¸áßÞÛì×ÞÒÐâì ßÕàÒÞÕ ÔÞáâãßÝÞÕ ãáâàÞÙáâÒÞ" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "" "SoundFontë ßÞÔÔÕàÔÖØÒÐîâáï ÝÕÚÞâÞàëÜØ ×ÒãÚÞÒëÜØ ÚÐàâÐÜØ, Fluidsynth Ø " "Timidity" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "ÁÜÕèÐÝÝëÙ àÕÖØÜ AdLib/MIDI" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "¸áßÞÛì×ÞÒÐâì Ø MIDI Ø AdLib ÔÛï ÓÕÝÕàÐæØØ ×ÒãÚÐ" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "ÃáØÛÕÝØÕ MIDI:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "Ãáâà. MT-32:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "ÃÚÐ×ëÒÐÕâ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ ßÞ ãÜÞÛçÐÝØï ÔÛï ÒëÒÞÔÐ ÝÐ Roland MT-32/LAPC1/" "CM32l/CM64" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "½ÐáâÞïéØÙ Roland MT-32 (×ÐßàÕâØâì íÜãÛïæØî GM)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -736,193 +731,193 @@ msgstr "" "¾âÜÕâìâÕ, ÕáÛØ ã ÒÐá ßÞÔÚÛîçÕÝÞ Roland-áÞÒÜÕáâØÜÞÕ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ Ø Òë " "åÞâØâÕ ÕÓÞ ØáßÞÛì×ÞÒÐâì" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "½ÐáâÞïéØÙ Roland MT-32 (×ÐßàÕâØâì GM)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "²ÚÛîçØâì àÕÖØÜ Roland GS" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "" "²ëÚÛîçÐÕâ ÜÐßßØÝÓ General MIDI ÔÛï ØÓà á ×ÒãÚÞÒÞÙ ÔÞàÞÖÚÞÙ ÔÛï Roland MT-32" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "½Õ ØáßÞÛì×ÞÒÐâì Üã×ëÚã ÔÛï MT-32" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "ÂÕÚáâ Ø Þ×ÒãçÚÐ:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "¾×ÒãçÚÐ" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "ÁãÑâØâàë" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "¾ÑÐ" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "ÁÚÞàÞáâì âØâàÞÒ:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "ÂÕÚáâ Ø Þ×ÒãçÚÐ:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "¾×Ò" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "ÁãÑ" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "¾ÑÐ" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "¿ÞÚÐ×ëÒÐâì áãÑâØâàë Ø ÒÞáßàÞØ×ÒÞÔØâì àÕçì" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "ÁÚÞàÞáâì âØâàÞÒ:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "³àÞÜÚ. Üã×ëÚØ:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "³àÞÜÚ. Üã×ëÚØ:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "²ëÚÛ. Òáñ" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "³àÞÜÚÞáâì SFX:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "³àÞÜÚÞáâì áßÕæØÐÛìÝëå ×ÒãÚÞÒëå íääÕÚâÞÒ" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "³àÞÜÚ. SFX:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "³àÞÜÚ. Þ×ÒãçÚØ:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "³àÞÜÚ. Þ×ÒãçÚØ:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "¿ãâì Ú âÕÜÐÜ:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "³ÔÕ âÕÜë:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "ÃÚÐ×ëÒÐÕâ ßãâì Ú ÔÞßÞÛÝØâÕÛìÝëÜ äÐÙÛÐÜ ÔÐÝÝëå, ØáßÞÛì×ãÕÜëå ÒáÕÜØ ØÓàÐÜØ, " "ÛØÑÞ ScummVM" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "¿ãâì Ú ßÛÐÓØÝÐÜ:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "¿ãâì Ú ßÛÐÓØÝÐÜ:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "ÀÐ×ÝÞÕ" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "ÀÐ×ÝÞÕ" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "ÂÕÜÐ:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "ÀØáÞÒÐÛÚÐ GUI:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "°ÒâÞáÞåàÐÝÕÝØÕ:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "°ÒâÞáÞåà.:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "ºÛÐÒØèØ" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "Ï×ëÚ GUI:" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "Ï×ëÚ ÓàÐäØçÕáÚÞÓÞ ØÝâÕàäÕÙáÐ ScummVM" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." msgstr "²ë ÔÞÛÖÝë ßÕàÕ×ÐßãáâØâì ScummVM çâÞÑë ßàØÜÕÝØâì Ø×ÜÕÝÕÝØï." -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "²ëÑÕàØâÕ ÔØàÕÚâÞàØî ÔÛï áÞåàÐÝÕÝØÙ" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "½Õ ÜÞÓã ßØáÐâì Ò ÒëÑàÐÝÝãî ÔØàÕÚâÞàØî. ¿ÞÖÐÛãÙáâÐ, ãÚÐÖØâÕ ÔàãÓãî." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "²ëÑÕàØâÕ ÔØàÕÚâÞàØî ÔÛï âÕÜ GUI" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "²ëÑÕàØâÕ ÔØàÕÚâÞàØî á ÔÞßÞÛÝØâÕÛìÝëÜØ äÐÙÛÐÜØ" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "²ëÑÕàØâÕ ÔØàÕÚâÞàØî á ßÛÐÓØÝÐÜØ" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -970,64 +965,64 @@ msgstr " msgid "Select a Theme" msgstr "²ëÑÕàØâÕ âÕÜã" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "±Õ× ÓàÐäØÚØ" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "±Õ× ÓàÐäØÚØ" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "ÁâÐÝÔÐàâÝëÙ àÐáâÕàØ×ÐâÞà (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "ÁâÐÝÔÐàâÝëÙ àÐáâÕàØ×ÐâÞà (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "ÀÐáâÕàØ×ÐâÞà áÞ áÓÛÐÖØÒÐÝØÕÜ (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "ÀÐáâÕàØ×ÐâÞà áÞ áÓÛÐÖØÒÐÝØÕÜ (16bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "¾çØáâØâì ×ÝÐçÕÝØÕ" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "´ÒØÖÞÚ ÝÕ ßÞÔÔÕàÖØÒÐÕâ ãàÞÒÕÝì ÞâÛÐÔÚØ '%s'" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "¼ÕÝî" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "¿àÞßãáâØâì" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "¿Ðã×Ð" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "¿àÞßãáâØâì áâàÞÚã" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "¾èØÑÚÐ ×ÐßãáÚÐ ØÓàë:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "½Õ ÜÞÓã ÝÐÙâØ ÔÒØÖÞÚ ÔÛï ×ÐßãáÚÐ ÒëÑàÐÝÝÞÙ ØÓàë" @@ -1095,17 +1090,17 @@ msgstr " msgid "Unknown error" msgstr "½ÕØ×ÒÕáâÝÐï ÞèØÑÚÐ" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "ºÐÖÕâáï, çâÞ ØÓàÐ '%s' Õéñ ÝÕØ×ÒÕáâÝÐ." -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "¿ÞÖÐÛãÙáâÐ, ßÕàÕÔÐÙâÕ áÛÕÔãîéØÕ ÔÐÝÝëÕ ÚÞÜÐÝÔÕ ScummVM ÒÜÕáâÕ á ÝÐ×ÒÐÝØÕÜ" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "ØÓàë, ÚÞâÞàãî Òë ßëâÐÕâÕáì ÔÞÑÐÒØâì, Ø ãÚÐÖØâÕ Õñ ÒÕàáØî, ï×ëÚ Ø â.Ô." @@ -1142,13 +1137,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~²~ ÓÛÐÒÝÞÕ ÜÕÝî" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "ÁÞåàÐÝØâì ØÓàã:" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1260,6 +1256,90 @@ msgstr "" msgid "Start anyway" msgstr "²áñ àÐÒÝÞ ×ÐßãáâØâì" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "²ÞááâÐÝÞÒØâì ØÓàã:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "²ÞááâÒÝÞÒØâì" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "²ÕàåÝØÙ ßàÐÒëÙ ßàÕÔÜÕâ" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "EGA ÑÕ× àÐáâàÐ" + +#: engines/sci/detection.cpp:371 +#, fuzzy +msgid "Enable undithering in EGA games" +msgstr "" +"²ÚÛîçÐÕâ àÕÖØÜ ÑÕ× àÐáâàØàÞÒÐÝØï Ò EGA ØÓàÐå, ÚÞâÞàëÕ ßÞÔÔÕàÖØÒÐîâ âÐÚÞÙ " +"àÕÖØÜ" + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "³àÞÜÚÞáâì áßÕæØÐÛìÝëå ×ÒãÚÞÒëå íääÕÚâÞÒ" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "¾ÑëçÝëÙ ÚãàáÞà" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1916,7 +1996,7 @@ msgstr "" "ÀÕÖØÜ \"àÞÔÝÞÓÞ\" MIDI âàÕÑãÕâ ÞÑÝÞÒÛÕÝØÕ Roland Upgrade Þâ\n" "LucasArts, ÝÞ ÝÕ åÒÐâÐÕâ %s. ¿ÕàÕÚÛîçÐîáì ÝÐ AdLib." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1927,7 +2007,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1938,7 +2018,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1985,14 +2065,6 @@ msgstr " msgid "~W~ater Effect Enabled" msgstr "ÍääÕÚâë ÒÞÔë ÒÚÛîçÕÝë" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "²ÞááâÐÝÞÒØâì ØÓàã:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "²ÞááâÒÝÞÒØâì" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2015,6 +2087,66 @@ msgstr " msgid "Failed to save game" msgstr "½Õ ãÔÐÛÞáì áÞåàÐÝØâì ØÓàã" +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "²ÚÛîçØâì àÕÖØÜ Roland GS" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "¾ÑëçÝëÙ ÚãàáÞà" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "°âÐÚÐ 1" @@ -2078,6 +2210,14 @@ msgstr "" "ÜÞÖÕâ âÐÚ ßÞÛãçØâìáï, çâÞ ÝÕÚÞâÞàëÕ âàÕÚØ ÑãÔãâ\n" "áëÓàÐÝë ÝÕÒÕàÝÞ." +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2158,6 +2298,14 @@ msgid "" msgstr "" "½ÐÙÔÕÝë ×ÐáâÐÒÚØ Ò äÞàÜÐâÕ DXA, ÝÞ ScummVM ÑëÛ áÞÑàÐÝ ÑÕ× ßÞÔÔÕàÖÚØ zlib" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2392,19 +2540,19 @@ msgstr " msgid "Disable power off" msgstr "·ÐßàÕâØâì ÒëÚÛîçÕÝØÕ" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "ÀÕÖØÜ ÜëèØ ÝÐÖÐâì-Ø-âïÝãâì ÒÚÛîçÕÝ." -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "ÀÕÖØÜ ÜëèØ ÝÐÖÐâì-Ø-âïÝãâì ÒëÚÛîçÕÝ." -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "ÀÕÖØÜ âÐçßÐÔÐ ÒÚÛîçÕÝ." -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "ÀÕÖØÜ âÐçßÐÔÐ ÒëÚÛîçÕÝ." @@ -2480,15 +2628,15 @@ msgstr " msgid "Windowed mode" msgstr "¾ÚÞÝÝëÙ àÕÖØÜ" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL ÑÕ× ãÒÕÛØçÕÝØï" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL á áÞåàÐÝÕÝØÕÜ" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL Ø×ÝÐçÐÛìÝëÙ" diff --git a/po/scummvm.pot b/po/scummvm.pot index 989779fc91..33ab8552db 100644 --- a/po/scummvm.pot +++ b/po/scummvm.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -43,7 +43,7 @@ msgid "Go up" msgstr "" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -68,15 +68,15 @@ msgstr "" msgid "Mouse click" msgstr "" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 msgid "Toggle FullScreen" msgstr "" @@ -88,8 +88,8 @@ msgstr "" msgid "Map" msgstr "" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -126,328 +126,332 @@ msgstr "" msgid "Press the key to associate" msgstr "" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" msgstr "" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" msgstr "" -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +msgid "Engine" +msgstr "" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "" -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "" -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "" -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "" -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "" -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "" -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." msgstr "" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -455,7 +459,7 @@ msgstr "" msgid "Yes" msgstr "" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -463,36 +467,36 @@ msgstr "" msgid "No" msgstr "" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "" -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "" @@ -559,349 +563,341 @@ msgstr "" msgid "48 kHz" msgstr "" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "" -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "" -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "" -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" msgstr "" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" msgstr "" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." msgstr "" -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "" -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -947,64 +943,64 @@ msgstr "" msgid "Select a Theme" msgstr "" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "" @@ -1072,16 +1068,16 @@ msgstr "" msgid "Unknown error" msgstr "" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "" -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "" @@ -1118,13 +1114,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1213,6 +1210,84 @@ msgstr "" msgid "Start anyway" msgstr "" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "" + +#: engines/dreamweb/detection.cpp:57 +msgid "Use bright palette mode" +msgstr "" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "" + +#: engines/sci/detection.cpp:371 +msgid "Enable undithering in EGA games" +msgstr "" + +#: engines/sci/detection.cpp:380 +msgid "Prefer digital sound effects" +msgstr "" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +msgid "Use silver cursors" +msgstr "" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1867,7 +1942,7 @@ msgid "" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1875,7 +1950,7 @@ msgid "" "%s" msgstr "" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1883,7 +1958,7 @@ msgid "" "%s" msgstr "" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1924,14 +1999,6 @@ msgstr "" msgid "~W~ater Effect Enabled" msgstr "" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -1954,6 +2021,64 @@ msgstr "" msgid "Failed to save game" msgstr "" +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +msgid "Enable helium mode" +msgstr "" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 +msgid "Floating cursors" +msgstr "" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "" @@ -2011,6 +2136,14 @@ msgid "" "that a few tracks will not be correctly played." msgstr "" +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2076,6 +2209,14 @@ msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2290,19 +2431,19 @@ msgstr "" msgid "Disable power off" msgstr "" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "" -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "" -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "" -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "" @@ -2378,15 +2519,15 @@ msgstr "" msgid "Windowed mode" msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "" diff --git a/po/se_SE.po b/po/se_SE.po index 812852ca53..592fbcdd58 100644 --- a/po/se_SE.po +++ b/po/se_SE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2011-11-27 19:00+0100\n" "Last-Translator: Hampus Flink \n" "Language-Team: \n" @@ -47,7 +47,7 @@ msgid "Go up" msgstr "Uppåt" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -72,15 +72,15 @@ msgstr "St msgid "Mouse click" msgstr "Musklick" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Visa tangentbord" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Ställ in tangenter" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 #, fuzzy msgid "Toggle FullScreen" msgstr "Fullskärmsläge" @@ -93,8 +93,8 @@ msgstr "V msgid "Map" msgstr "Ställ in" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -131,15 +131,15 @@ msgstr "Var god v msgid "Press the key to associate" msgstr "Tryck på en tangent för att ställa in" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "Spel" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -147,29 +147,29 @@ msgstr "" "Kortnamn för spel. Används för att hänvisa till spardata och att starta " "spelet från kommandoraden" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "Namn:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Spelets fullständiga titel" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "Namn:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "Språk:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" @@ -177,280 +177,285 @@ msgstr "" "Spelets språk. Den här inställningen omvandlar inte din spanska spelversion " "till en engelsk" -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "Plattform:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Plattformen spelet ursprungligen tillverkades för" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "Plattform:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "Undersök" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Grafik" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "GFX" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "Överskrid globala grafikinställningar" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "Överskrid globala grafikinställningar" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Ljud" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "Överskrid globala ljudinställningar" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "Överskrid globala ljudinställningar" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Volym" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Volym" -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "Överskrid globala volyminställningar" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "Överskrid globala volyminställningar" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "Överskrid globala MIDI-inställningar" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Överskrid globala MIDI-inställningar" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "Överskrid globala MT-32 inställningar" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Överskrid globala MT-32 inställningar" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Sökvägar" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Sökvägar" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "Sökv. spel:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "Sökv. spel:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Sökv. extra:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Bestämmer sökvägen till ytterligare data som spelet använder" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Sökv. extra:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Sökv. sparat:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Bestämmer var dina spardata lagras" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Sökv. sparat:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Ingen" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standard" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Välj SoundFont" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Välj katalog med speldata" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "Välj en ytterligare spelkatalog" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "Välj katalog för spardata" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "Detta ID-namn är upptaget. Var god välj ett annat." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~A~vsluta" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Avsluta ScummVM" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "O~m~..." -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "Om ScummVM" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~I~nställningar..." -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "Redigera globala ScummVM-inställningar" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "~S~tarta" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "Starta det valda spelet" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~L~adda..." -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "Ladda spardata för det valda spelet" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "Lä~g~g till spel..." -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Håll ned Skift för masstillägg" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "R~e~digera spel..." -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Redigera spelinställningarna" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "~R~adera spel" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Radera spelet från listan. Spelets datafiler påverkas inte." -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "Lä~g~g till spel..." -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "R~e~digera spel..." -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "~R~adera spel" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "Sök i spellistan" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Sök:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "Ladda spel:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Ladda" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." @@ -458,7 +463,7 @@ msgstr "" "Vill du verkligen använda mass-speldetektorn? Processen kan potentiellt " "lägga till ett enormt antal spel." -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -466,7 +471,7 @@ msgstr "" msgid "Yes" msgstr "Ja" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -474,37 +479,37 @@ msgstr "Ja" msgid "No" msgstr "Nej" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM kunde inte öppna den valda katalogen!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "ScummVM kunde inte hitta några spel i den valda katalogen!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "Välj spel:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "Vill du verkligen radera den här spelkonfigurationen?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "Det här spelet stöder inte laddning av spardata från launchern." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "" "ScummVM kunde inte hitta en motor kapabel till att köra det valda spelet!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "Masstillägg..." -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "Masstillägg..." @@ -571,101 +576,93 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Ingen" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "Kunde inte verkställa några av grafikinställningarna:" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "videoläget kunde inte ändras." -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "fullskärmsinställningen kunde inte ändras." -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "inställningen för bildförhållandet kunde inte ändras." -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "Grafikläge:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "Renderingsläge:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Speciella gitterlägen stödda av vissa spel" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Fullskärmsläge" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "Korrektion av bildförhållande" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "Korrigerar bildförhållanden för 320x200-spel" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "EGA anti-gitter" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "Aktiverar anti-gitter i EGA spel som stöder det" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "Föredragen enhet:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "Musikenhet:" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "Bestämmer din föredragna emulator för ljudenhet eller ljudkort" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Bestämmer emulator för ljudenhet eller ljudkort" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "Föredr. enhet:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "Musikenhet:" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "AdLib-emulator:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib används för musik i många spel" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "Ljudfrekvens:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -673,61 +670,61 @@ msgstr "" "Ett högre värde betecknar bättre ljudkvalitet men stöds kanske inte av ditt " "ljudkort" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "GM-enhet:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "Bestämmer standardenheten för General MIDI-uppspelning" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "Använd inte General MIDI-musik" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "Använd första tillgängliga enhet" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "SoundFont stöds endast av vissa ljudkort, Fluidsynth och Timidity" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "Blandat AdLib/MIDI-läge" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "Använd både MIDI och AdLib för ljudgeneration" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "MIDI gain:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "MT-32 enhet:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "Bestämmer standardenheten för Roland MT-32/LAPC1/CM32I/CM64-uppspelning" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "Äkta Roland MT-32 (inaktivera GM-emulation)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -735,193 +732,193 @@ msgstr "" "Aktivera om du vill använda din verkliga Roland-kompatibla och dator-" "anslutna ljudenhet" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "Äkta Roland MT-32 (ingen GM-emulation)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "Aktivera Roland GS-läge" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "" "Stänger av General MIDI-kartläggning för spel med Roland MT-32 soundtrack" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "Använd inte Roland MT-32 musik" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "Undertext och tal:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Tal" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Undertexter" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "Båda" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "Texthastighet:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "Text och tal:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "Tal" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "Text" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "Båda" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "Visa undertexter och spela upp tal" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "Texthastighet:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "Musikvolym:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "Musikvolym:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "Ljud av" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "SFX-volym:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Volym för specialeffekter" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "SFX-volym:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "Talvolym:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "Talvolym:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "Sökv. tema:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "Sökv. tema:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "Bestämmer sökväg till andra data som används av alla spel eller ScummVM" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "Sökv. tillägg:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "Sökv. tillägg:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Diverse" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Diverse" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "Tema:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "GUI-rendering:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "Autospara:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "Autospara:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "Tangenter" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "GUI-språk:" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "Språk för ScummVM:s användargränssnitt" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." msgstr "Du måste starta om ScummVM för att ändringarna ska få effekt." -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "Välj katalog för spardata" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "" "Det går inte att skriva till den valda katalogen. Var god välj en annan." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "Välj katalog för GUI-teman" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "Välj katalog för extra filer" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "Välj katalog för tillägg" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -969,64 +966,64 @@ msgstr "Namnl msgid "Select a Theme" msgstr "Välj ett tema" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "Inaktiverad GFX" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "Inaktiverad GFX" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "Standard rendering (16 bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "Standard (16 bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "Antialiserad rendering (16 bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "Antialiserad (16 bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Töm sökfältet" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "Motorn stöder inte debug-nivå '%s'" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "Meny" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Skippa" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Paus" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "Skippa rad" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "Fel under körning av spel:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "Kunde inte hitta en motor kapabel till att köra det valda spelet" @@ -1094,17 +1091,17 @@ msgstr "Avbrutit av anv msgid "Unknown error" msgstr "Okänt fel" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Spelet i '%s' verkar vara okänt." -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Var god rapportera följande data till ScummVM-teamet tillsammans med namnet" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "på spelet du försökte lägga till och dess version/språk/etc.:" @@ -1141,13 +1138,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "Åte~r~vänd till launcher" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "Spara spelet:" -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1258,6 +1256,88 @@ msgstr "" msgid "Start anyway" msgstr "Starta ändå" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "Återställ spel:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "Återställ" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "Övre högra föremålet" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "EGA anti-gitter" + +#: engines/sci/detection.cpp:371 +#, fuzzy +msgid "Enable undithering in EGA games" +msgstr "Aktiverar anti-gitter i EGA spel som stöder det" + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "Volym för specialeffekter" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "Vanlig pekare" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1915,7 +1995,7 @@ msgstr "" "Stöd för Native MIDI kräver Roland-uppdateringen från LucasArts,\n" "men %s saknas. Använder AdLib istället." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1926,7 +2006,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1937,7 +2017,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1984,14 +2064,6 @@ msgstr "Huvud~m~eny" msgid "~W~ater Effect Enabled" msgstr "~V~atteneffekt aktiverad" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "Återställ spel:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "Återställ" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2014,6 +2086,66 @@ msgstr "Kunde inte radera filen." msgid "Failed to save game" msgstr "Kunde inte spara spelet." +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "Aktivera Roland GS-läge" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "Vanlig pekare" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "Attack 1" @@ -2076,6 +2208,14 @@ msgstr "" "General MIDI instrument. Det kan trots allt hända\n" "att ett fåtal ljudspår inte spelas korrekt." +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2155,6 +2295,14 @@ msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "DXA filmscener hittades men ScummVM har byggts utan stöd för zlib" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2391,19 +2539,19 @@ msgstr "H msgid "Disable power off" msgstr "Inaktivera strömsparning" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "Dra-och-släpp-läge med mus aktiverat." -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "Dra-och-släpp-läge med mus deaktiverat." -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "Touchpad-läge aktiverat." -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "Touchpad-läge inaktiverat." @@ -2480,15 +2628,15 @@ msgstr "Aktivt grafikfilter:" msgid "Windowed mode" msgstr "Fönsterläge" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL normal" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL konservation" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL original" diff --git a/po/uk_UA.po b/po/uk_UA.po index 3971b29f6e..3d8ec456a6 100644 --- a/po/uk_UA.po +++ b/po/uk_UA.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-03-07 22:09+0000\n" +"POT-Creation-Date: 2012-05-20 22:39+0100\n" "PO-Revision-Date: 2012-02-16 13:09+0200\n" "Last-Translator: Eugene Sandulenko\n" "Language-Team: Ukrainian\n" @@ -45,7 +45,7 @@ msgid "Go up" msgstr "²ÓÞàã" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:320 gui/massadd.cpp:94 gui/options.cpp:1253 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 #: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 @@ -70,15 +70,15 @@ msgstr " msgid "Mouse click" msgstr "ºÛöÚ ÜØèÚÞî" -#: gui/gui-manager.cpp:122 base/main.cpp:288 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "¿ÞÚÐ×ÐâØ ÚÛÐÒöÐâãàã" -#: gui/gui-manager.cpp:126 base/main.cpp:292 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "¿ÕàÕßàØ×ÝÐçØâØ ÚÛÐÒöèö" -#: gui/gui-manager.cpp:129 base/main.cpp:295 +#: gui/gui-manager.cpp:129 base/main.cpp:307 msgid "Toggle FullScreen" msgstr "¿ÕàÕÜÚÝãâØ ßÞÒÝÞÕÚàÐÝÝØÙ àÕÖØÜ" @@ -90,8 +90,8 @@ msgstr " msgid "Map" msgstr "¿àØ×ÝÐçØâØ" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:321 gui/launcher.cpp:960 -#: gui/launcher.cpp:964 gui/massadd.cpp:91 gui/options.cpp:1254 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 #: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 @@ -128,15 +128,15 @@ msgstr " msgid "Press the key to associate" msgstr "½ÐâØáÝöâì ÚÛÐÒöèã ÔÛï ßàØ×ÝÐçÕÝÝï" -#: gui/launcher.cpp:170 +#: gui/launcher.cpp:187 msgid "Game" msgstr "³àÐ" -#: gui/launcher.cpp:174 +#: gui/launcher.cpp:191 msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:174 gui/launcher.cpp:176 gui/launcher.cpp:177 +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 msgid "" "Short game identifier used for referring to savegames and running the game " "from the command line" @@ -144,29 +144,29 @@ msgstr "" "ºÞàÞâÚØÙ öÔÕÝâØäöÚÐâÞà, ïÚØÙ ÒØÚÞàØáâÞÒãôâìáï ÔÛï ÝÐ×Ò ×ÑÕàÕÖÕÝØå öÓÞà ö ÔÛï " "×ÐßãáÚã × ÚÞÜÐÝÔÝÞ÷ áâàöçÚØ" -#: gui/launcher.cpp:176 +#: gui/launcher.cpp:193 msgctxt "lowres" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:181 +#: gui/launcher.cpp:198 msgid "Name:" msgstr "½Ð×ÒÐ:" -#: gui/launcher.cpp:181 gui/launcher.cpp:183 gui/launcher.cpp:184 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "¿ÞÒÝÐ ÝÐ×ÒÐ ÓàØ" -#: gui/launcher.cpp:183 +#: gui/launcher.cpp:200 msgctxt "lowres" msgid "Name:" msgstr "½Ð×ÒÐ:" -#: gui/launcher.cpp:187 +#: gui/launcher.cpp:204 msgid "Language:" msgstr "¼ÞÒÐ:" -#: gui/launcher.cpp:187 gui/launcher.cpp:188 +#: gui/launcher.cpp:204 gui/launcher.cpp:205 msgid "" "Language of the game. This will not turn your Spanish game version into " "English" @@ -174,280 +174,285 @@ msgstr "" "¼ÞÒÐ ÓàØ. ·ÜöÝÐ æìÞÓÞ ÝÐÛÐèâãÒÐÝÝï ÝÕ ßÕàÕâÒÞàØâì Óàã ÐÝÓÛöÙáìÚÞî ÝÐ " "ãÚàÐ÷ÝáìÚã" -#: gui/launcher.cpp:189 gui/launcher.cpp:203 gui/options.cpp:80 -#: gui/options.cpp:745 gui/options.cpp:758 gui/options.cpp:1224 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "<×Ð ãÜÞÒçÐÝÝïÜ>" -#: gui/launcher.cpp:199 +#: gui/launcher.cpp:216 msgid "Platform:" msgstr "¿ÛÐâäÞàÜÐ:" -#: gui/launcher.cpp:199 gui/launcher.cpp:201 gui/launcher.cpp:202 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "¿ÛÐâäÞàÜÐ, ÔÛï ïÚÞ÷ Óàã ÑãÛÞ àÞ×àÞÑÛÕÝÞ ßÞçÐâÚÞÒÞ" -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:218 msgctxt "lowres" msgid "Platform:" msgstr "¿ÛÐâäÞàÜÐ:" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:231 +#, fuzzy +msgid "Engine" +msgstr "ÀÞ×ÓÛïÝãâØ" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "³àÐäöÚÐ" -#: gui/launcher.cpp:213 gui/options.cpp:1087 gui/options.cpp:1104 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "³àä" -#: gui/launcher.cpp:216 +#: gui/launcher.cpp:242 msgid "Override global graphic settings" msgstr "¿ÕàÕÚàØâØ ÓÛÞÑÐÛìÝö ãáâÐÝÞÒÚØ ÓàÐäöÚØ" -#: gui/launcher.cpp:218 +#: gui/launcher.cpp:244 msgctxt "lowres" msgid "Override global graphic settings" msgstr "¿ÕàÕÚàØâØ ÓÛÞÑÐÛìÝö ãáâÐÝÞÒÚØ ÓàÐäöÚØ" -#: gui/launcher.cpp:225 gui/options.cpp:1110 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "°ãÔöÞ" -#: gui/launcher.cpp:228 +#: gui/launcher.cpp:254 msgid "Override global audio settings" msgstr "¿ÕàÕÚàØâØ ÓÛÞÑÐÛìÝö ãáâÐÝÞÒÚØ ÐãÔöÞ" -#: gui/launcher.cpp:230 +#: gui/launcher.cpp:256 msgctxt "lowres" msgid "Override global audio settings" msgstr "¿ÕàÕÚàØâØ ÓÛÞÑÐÛìÝö ãáâÐÝÞÒÚØ ÐãÔöÞ" -#: gui/launcher.cpp:239 gui/options.cpp:1115 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "³ãçÝöáâì" -#: gui/launcher.cpp:241 gui/options.cpp:1117 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "³ãçÝ." -#: gui/launcher.cpp:244 +#: gui/launcher.cpp:270 msgid "Override global volume settings" msgstr "¿ÕàÕÚàØâØ ÓÛÞÑÐÛìÝö ãáâÐÝÞÒÚØ ÓãçÝÞáâö" -#: gui/launcher.cpp:246 +#: gui/launcher.cpp:272 msgctxt "lowres" msgid "Override global volume settings" msgstr "¿ÕàÕÚàØâØ ÓÛÞÑÐÛìÝö ãáâÐÝÞÒÚØ ÓãçÝÞáâö" -#: gui/launcher.cpp:254 gui/options.cpp:1125 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" -#: gui/launcher.cpp:257 +#: gui/launcher.cpp:283 msgid "Override global MIDI settings" msgstr "¿ÕàÕÚàØâØ ÓÛÞÑÐÛìÝö ãáâÐÝÞÒÚØ MIDI" -#: gui/launcher.cpp:259 +#: gui/launcher.cpp:285 msgctxt "lowres" msgid "Override global MIDI settings" msgstr "¿ÕàÕÚàØâØ ÓÛÞÑÐÛìÝö ãáâÐÝÞÒÚØ MIDI" -#: gui/launcher.cpp:268 gui/options.cpp:1131 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" -#: gui/launcher.cpp:271 +#: gui/launcher.cpp:297 msgid "Override global MT-32 settings" msgstr "¿ÕàÕÚàØâØ ÓÛÞÑÐÛìÝö ãáâÐÝÞÒÚØ MT-32" -#: gui/launcher.cpp:273 +#: gui/launcher.cpp:299 msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "¿ÕàÕÚàØâØ ÓÛÞÑÐÛìÝö ãáâÐÝÞÒÚØ MT-32" -#: gui/launcher.cpp:282 gui/options.cpp:1138 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "ÈÛïåØ" -#: gui/launcher.cpp:284 gui/options.cpp:1140 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "ÈÛïåØ" -#: gui/launcher.cpp:291 +#: gui/launcher.cpp:317 msgid "Game Path:" msgstr "ÈÛïå ÔÞ ÓàØ:" -#: gui/launcher.cpp:293 +#: gui/launcher.cpp:319 msgctxt "lowres" msgid "Game Path:" msgstr "ÈÛïå ÔÞ ÓàØ:" -#: gui/launcher.cpp:298 gui/options.cpp:1164 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "´ÞÔÐâÚ. èÛïå:" -#: gui/launcher.cpp:298 gui/launcher.cpp:300 gui/launcher.cpp:301 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "²ÚÐ×ãô èÛïå ÔÞ ÔÞÔÐâÚÞÒØå äÐÙÛöÒ ÔÐÝØå ÔÛï ÓàØ" -#: gui/launcher.cpp:300 gui/options.cpp:1166 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "´ÞÔ. èÛïå:" -#: gui/launcher.cpp:307 gui/options.cpp:1148 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "ÈÛïå ×ÑÕà.:" -#: gui/launcher.cpp:307 gui/launcher.cpp:309 gui/launcher.cpp:310 -#: gui/options.cpp:1148 gui/options.cpp:1150 gui/options.cpp:1151 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "²ÚÐ×ãô èÛïå ÔÞ ×ÑÕàÕÖÕÝì ÓàØ" -#: gui/launcher.cpp:309 gui/options.cpp:1150 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "ÈÛïå ×ÑÕà.:" -#: gui/launcher.cpp:329 gui/launcher.cpp:416 gui/launcher.cpp:469 -#: gui/launcher.cpp:523 gui/options.cpp:1159 gui/options.cpp:1167 -#: gui/options.cpp:1176 gui/options.cpp:1283 gui/options.cpp:1289 -#: gui/options.cpp:1297 gui/options.cpp:1327 gui/options.cpp:1333 -#: gui/options.cpp:1340 gui/options.cpp:1433 gui/options.cpp:1436 -#: gui/options.cpp:1448 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "½Õ ×ÐÒÔÐÝØÙ" -#: gui/launcher.cpp:334 gui/launcher.cpp:422 gui/launcher.cpp:527 -#: gui/options.cpp:1277 gui/options.cpp:1321 gui/options.cpp:1439 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "·Ð ãÜÞÒçÐÝÝïÜ" -#: gui/launcher.cpp:462 gui/options.cpp:1442 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "²ØÑÕàöâì SoundFont" -#: gui/launcher.cpp:481 gui/launcher.cpp:636 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "²ØÑÕàöâì ßÐßÚã × äÐÙÛÐÜØ ÓàØ" -#: gui/launcher.cpp:499 +#: gui/launcher.cpp:541 msgid "Select additional game directory" msgstr "²ØÑÕàöâì ÔÞÔÐâÚÞÒã ßÐßÚã ÓàØ" -#: gui/launcher.cpp:511 +#: gui/launcher.cpp:553 msgid "Select directory for saved games" msgstr "²ØÑÕàöâì ßÐßÚã ÔÛï ×ÑÕàÕÖÕÝì" -#: gui/launcher.cpp:538 +#: gui/launcher.cpp:580 msgid "This game ID is already taken. Please choose another one." msgstr "ÆÕÙ ID ÓàØ ÒÖÕ ÒØÚÞàØáâÞÒãôâìáï. ±ãÔì ÛÐáÚÐ, ÒØÑÕàöâì öÝèØÙ." -#: gui/launcher.cpp:579 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~²~ØåöÔ" -#: gui/launcher.cpp:579 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "²ØåöÔ ×ö ScummVM" -#: gui/launcher.cpp:580 +#: gui/launcher.cpp:622 msgid "A~b~out..." msgstr "¿àÞ ß~à~ÞÓàÐÜã..." -#: gui/launcher.cpp:580 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "¿àÞ ScummVM" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "~O~ptions..." msgstr "~½~ÐÛÐèâãÒÐÝÝï" -#: gui/launcher.cpp:581 +#: gui/launcher.cpp:623 msgid "Change global ScummVM options" msgstr "·ÜöÝØâØ ÓÛÞÑÐÛìÝö ÝÐÛÐèâãÒÐÝÝï ScummVM" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "~S~tart" msgstr "·~Ð~ßãáÚ" -#: gui/launcher.cpp:583 +#: gui/launcher.cpp:625 msgid "Start selected game" msgstr "·ÐßãáâØâØ ÒØÑàÐÝã Óàã" -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "~L~oad..." msgstr "~·~ÐÒÐÝâÐÖØâØ..." -#: gui/launcher.cpp:586 +#: gui/launcher.cpp:628 msgid "Load savegame for selected game" msgstr "·ÐÒÐÝâÐÖØâØ ×ÑÕàÕÖÕÝÝï ÔÛï ÒØÑàÐÝÞ÷ ÓàØ" -#: gui/launcher.cpp:591 gui/launcher.cpp:1079 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~´~ÞÔÐâØ Óàã..." -#: gui/launcher.cpp:591 gui/launcher.cpp:598 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "ÃâàØÜãÙâÕ ÚÛÐÒöèã Shift ÔÛï âÞÓÞ, éÞÑ ÔÞÔÐâØ ÔÕÚöÛìÚÐ öÓÞà" -#: gui/launcher.cpp:593 +#: gui/launcher.cpp:635 msgid "~E~dit Game..." msgstr "ÀÕÔÐ~Ó~ãÒÐâØ Óàã" -#: gui/launcher.cpp:593 gui/launcher.cpp:600 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "·ÜöÝØâØ ÝÐÛÐèâãÒÐÝÝï ÓàØ" -#: gui/launcher.cpp:595 +#: gui/launcher.cpp:637 msgid "~R~emove Game" msgstr "~²~ØÔÐÛØâØ Óàã" -#: gui/launcher.cpp:595 gui/launcher.cpp:602 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "²ØÔÐÛØâØ Óàã ×ö áßØáÚã. ½Õ ÒØÔÐÛïô Óàã × ÖÞàáâÚÞÓÞ ÔØáÚã" -#: gui/launcher.cpp:598 gui/launcher.cpp:1079 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~´~ÞÔÐâØ Óàã..." -#: gui/launcher.cpp:600 +#: gui/launcher.cpp:642 msgctxt "lowres" msgid "~E~dit Game..." msgstr "ÀÕÔÐ~Ó~. Óàã..." -#: gui/launcher.cpp:602 +#: gui/launcher.cpp:644 msgctxt "lowres" msgid "~R~emove Game" msgstr "~²~ØÔÐÛØâØ Óàã" -#: gui/launcher.cpp:610 +#: gui/launcher.cpp:652 msgid "Search in game list" msgstr "¿ÞèãÚ ã áßØáÚã öÓÞà" -#: gui/launcher.cpp:614 gui/launcher.cpp:1126 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "¿ÞèãÚ:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 msgid "Load game:" msgstr "·ÐÒÐÝâÐÖØâØ Óàã:" -#: gui/launcher.cpp:639 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "·ÐÒÐÝâÐÖØâØ" -#: gui/launcher.cpp:747 +#: gui/launcher.cpp:788 msgid "" "Do you really want to run the mass game detector? This could potentially add " "a huge number of games." @@ -455,7 +460,7 @@ msgstr "" "ÇØ ÒØ ÔöÙáÝÞ åÞçÕâÕ ×ÐßãáâØâØ ßÞèãÚ ãáöå öÓÞà? ÆÕ ßÞâÕÝæöÙÝÞ ÜÞÖÕ ÔÞÔÐâØ " "ÒÕÛØÚã ÚöÛìÚöáâì öÓÞà." -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -463,7 +468,7 @@ msgstr "" msgid "Yes" msgstr "ÂÐÚ" -#: gui/launcher.cpp:748 gui/launcher.cpp:896 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -471,36 +476,36 @@ msgstr " msgid "No" msgstr "½ö" -#: gui/launcher.cpp:796 +#: gui/launcher.cpp:837 msgid "ScummVM couldn't open the specified directory!" msgstr "ScummVM ÝÕ ÜÞÖÕ ÒöÔÚàØâØ ÒÚÐ×ÐÝã ßÐßÚã!" -#: gui/launcher.cpp:808 +#: gui/launcher.cpp:849 msgid "ScummVM could not find any game in the specified directory!" msgstr "ScummVM ÝÕ ÜÞÖÕ ×ÝÐÙâØ Óàã ã ÒÚÐ×ÐÝöÙ ßÐßæö!" -#: gui/launcher.cpp:822 +#: gui/launcher.cpp:863 msgid "Pick the game:" msgstr "²ØÑÕàöâì Óàã:" -#: gui/launcher.cpp:896 +#: gui/launcher.cpp:937 msgid "Do you really want to remove this game configuration?" msgstr "²Ø ÔöÙáÝÞ åÞçÕâÕ ÒØÔÐÛØâØ ãáâÐÝÞÒÚØ ÔÛï æöô÷ ÓàØ?" -#: gui/launcher.cpp:960 +#: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." msgstr "Æï ÓàÐ ÝÕ ßöÔâàØÜãô ×ÐÒÐÝâÐÖÕÝÝï ×ÑÕàÕÖÕÝì çÕàÕ× ÓÞÛÞÒÝÕ ÜÕÝî." -#: gui/launcher.cpp:964 +#: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" msgstr "ScummVM ÝÕ ×ÜöÓ ×ÝÐÙâØ ÔÒØÖÞÚ ÔÛï ×ÐßãáÚã ÒØÑàÐÝÞ÷ ÓàØ!" -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgctxt "lowres" msgid "Mass Add..." msgstr "´ÞÔ. ÑÐÓÐâÞ..." -#: gui/launcher.cpp:1078 +#: gui/launcher.cpp:1119 msgid "Mass Add..." msgstr "´ÞÔ. ÑÐÓÐâÞ..." @@ -567,101 +572,93 @@ msgstr "44 Ú³ msgid "48 kHz" msgstr "48 Ú³æ" -#: gui/options.cpp:257 gui/options.cpp:485 gui/options.cpp:586 -#: gui/options.cpp:659 gui/options.cpp:868 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "½Õ ×ÐÔÐÝØÙ" -#: gui/options.cpp:393 +#: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" msgstr "½Õ ÒÔÐÛÞáï ×ÐáâÞáãÒÐâØ ÔÕïÚö ×ö ×ÜöÝ ÓàÐäöçÝØå ÝÐÛÐèâãÒÐÝì:" -#: gui/options.cpp:405 +#: gui/options.cpp:394 msgid "the video mode could not be changed." msgstr "ÝÕ ÒÔÐÛÞáï ×ÜöÝØâØ ÓàÐäöçÝØÙ àÕÖØÜ." -#: gui/options.cpp:411 +#: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" msgstr "ÝÕ ÒÔÐÛÞáï ×ÜöÝØâØ àÕÖØÜ ßÞÒÝÞÓÞ ÕÚàÐÝã" -#: gui/options.cpp:417 +#: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" msgstr "ÝÕ ÒÔÐÛÞáï ×ÜöÝØâØ àÕÖØÜ ÚÞàÕÚæö÷ áßöÒÒöÔÝÞèÕÝÝï áâÞàöÝ" -#: gui/options.cpp:742 +#: gui/options.cpp:727 msgid "Graphics mode:" msgstr "³àÐäöçÝ. àÕÖØÜ:" -#: gui/options.cpp:756 +#: gui/options.cpp:741 msgid "Render mode:" msgstr "ÀÕÖØÜ àÐáâàãÒ.:" -#: gui/options.cpp:756 gui/options.cpp:757 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "ÁßÕæöÐÛìÝö àÕÖØÜØ àÐáâàãÒÐÝÝï, ïÚö ßöÔâàØÜãîâì ÔÕïÚö öÓàØ" -#: gui/options.cpp:768 +#: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "¿ÞÒÝÞÕÚàÐÝÝØÙ àÕÖØÜ" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Aspect ratio correction" msgstr "ºÞàÕÚæöï áßöÒÒöÔÝÞèÕÝÝï áâÞàöÝ" -#: gui/options.cpp:771 +#: gui/options.cpp:756 msgid "Correct aspect ratio for 320x200 games" msgstr "ºÞàØÓãÒÐâØ áßöÒÒöÔÝÞèÕÝÝï áâÞàöÝ ÔÛï öÓÞà × ÓàÐäöÚÞî 320x200" -#: gui/options.cpp:772 -msgid "EGA undithering" -msgstr "EGA ÑÕ× àÐáâàãÒÐÝÝï" - -#: gui/options.cpp:772 -msgid "Enable undithering in EGA games that support it" -msgstr "²öÜÚÝãâØ àÐáâàãÒÐÝÝï Ò EGA öÓàÐå ïÚö æÕ ßöÔâàØÜãîâì" - -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Preferred Device:" msgstr "ÃßÞÔÞÑÐÝØÙ ßàØáâàöÙ:" -#: gui/options.cpp:780 +#: gui/options.cpp:764 msgid "Music Device:" msgstr "¼ã×Øç. ßàØáâàöÙ:" -#: gui/options.cpp:780 gui/options.cpp:782 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "²ÚÐ×ãô ãßÞÔÞÑÐÝØÙ ×ÒãÚÞÒØÙ ßàØáâàöÙ ÐÑÞ ÕÜãÛïâÞà ×ÒãÚÞÒÞ÷ ÚÐàâØ" -#: gui/options.cpp:780 gui/options.cpp:782 gui/options.cpp:783 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "²ÚÐ×ãô ÒØåöÔÝØÙ ×ÒãÚÞÒØÙ ßàØáâàöÙ ÐÑÞ ÕÜãÛïâÞà ×ÒãÚÞÒÞ÷ ÚÐàâØ" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Preferred Dev.:" msgstr "ÃßÞÔÞÑ. ßàØáâàöÙ:" -#: gui/options.cpp:782 +#: gui/options.cpp:766 msgctxt "lowres" msgid "Music Device:" msgstr "¼ã×ØçÝØÙ ßàØáâàöÙ:" -#: gui/options.cpp:809 +#: gui/options.cpp:793 msgid "AdLib emulator:" msgstr "µÜãÛïâÞà AdLib:" -#: gui/options.cpp:809 gui/options.cpp:810 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "·ÒãÚÞÒÐ ÚÐàâÐ AdLib ÒØÚÞàØáâÞÒãôâìáï ÑÐÓÐâìÜÐ öÓàÐÜØ" -#: gui/options.cpp:820 +#: gui/options.cpp:804 msgid "Output rate:" msgstr "²ØåöÔÝÐ çÐáâÞâÐ:" -#: gui/options.cpp:820 gui/options.cpp:821 +#: gui/options.cpp:804 gui/options.cpp:805 msgid "" "Higher value specifies better sound quality but may be not supported by your " "soundcard" @@ -669,63 +666,63 @@ msgstr "" "²ÕÛØÚö ×ÝÐçÕÝÝï ×ÐÔÐîâì ÚàÐéã ïÚöáâì ×ÒãÚã, ßàÞâÕ ÒÞÝØ ÜÞÖãâì ÝÕ " "ßöÔâàØÜãÒÐâØáï ÒÐèÞî ×ÒãÚÞÒÞî ÚÐàâÞî" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "GM Device:" msgstr "¿àØáâàöÙ GM:" -#: gui/options.cpp:831 +#: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" msgstr "²ÚÐ×ãô ÒØåöÔÝØÙ ×ÒãÚÞÒØÙ ßàØáâàöÙ ÔÛï General MIDI" -#: gui/options.cpp:842 +#: gui/options.cpp:826 msgid "Don't use General MIDI music" msgstr "½Õ ÒØÚÞàØáâÞÒãÒÐâØ Üã×ØÚã General MIDI" -#: gui/options.cpp:853 gui/options.cpp:915 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "²ØÚÞàØáâÞÒãÒÐâØ ßÕàèØÙ ÝÐïÒÝØÙ ßàØáâàöÙ" -#: gui/options.cpp:865 +#: gui/options.cpp:849 msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:865 gui/options.cpp:867 gui/options.cpp:868 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "" "SoundFont ßöÔâàØÜãôâìáï ÔÕïÚØÜØ ×ÒãÚÞÒØÜØ ÚÐàâÐÜØ, Fluidsynth âÐ Timidity" -#: gui/options.cpp:867 +#: gui/options.cpp:851 msgctxt "lowres" msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Mixed AdLib/MIDI mode" msgstr "·ÜöèÐÝØÙ àÕÖØÜ AdLib/MIDI" -#: gui/options.cpp:873 +#: gui/options.cpp:857 msgid "Use both MIDI and AdLib sound generation" msgstr "²ØÚÞàØáâÞÒãÒÐâØ ö MIDI ö AdLib ÔÛï ÓÕÝÕàÐæö÷ ×ÒãÚã" -#: gui/options.cpp:876 +#: gui/options.cpp:860 msgid "MIDI gain:" msgstr "¿ÞáØÛÕÝÝï MIDI:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "MT-32 Device:" msgstr "¿àØáâàöÙ MT-32:" -#: gui/options.cpp:886 +#: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" "²ÚÐ×ãô ×ÒãÚÞÒØÙ ßàØáâàöÙ ×Ð ãÜÞÒçÐÝÝïÜ ÔÛï ÒØÒÞÔã ÝÐ Roland MT-32/LAPC1/" "CM32l/CM64" -#: gui/options.cpp:891 +#: gui/options.cpp:875 msgid "True Roland MT-32 (disable GM emulation)" msgstr "ÁßàÐÒÖÝöÙ Roland MT-32 (ÒØÜÚÝãâØ ÕÜãÛïæØî GM)" -#: gui/options.cpp:891 gui/options.cpp:893 +#: gui/options.cpp:875 gui/options.cpp:877 msgid "" "Check if you want to use your real hardware Roland-compatible sound device " "connected to your computer" @@ -733,193 +730,193 @@ msgstr "" "²öÔÜöâìâÕ, ïÚéÞ ã ÒÐá ßöÔÚÛîçÕÝÞ Roland-áãÜöáÝØÙ ×ÒãÚÞÒØÙ ßàØáâàöÙ ö ÒØ " "åÞçÕâÕ ÙÞÓÞ ÒØÚÞàØáâÞÒãÒÐâØ" -#: gui/options.cpp:893 +#: gui/options.cpp:877 msgctxt "lowres" msgid "True Roland MT-32 (no GM emulation)" msgstr "ÁßàÐÒÖÝöÙ Roland MT-32 (ÒØÜÚÝãâØ ÕÜãÛïæØî GM)" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Enable Roland GS Mode" msgstr "ÃÒöÜÚÝãâØ àÕÖØÜ Roland GS" -#: gui/options.cpp:896 +#: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "" "²ØÜØÚÐô ÜÐßöÝÓ General MIDI ÔÛï öÓÞà ×ö ×ÒãÚÞÒÞî ÔÞàöÖÚÞî ÔÛï Roland MT-32" -#: gui/options.cpp:905 +#: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" msgstr "½Õ ÒØÚÞàØáâÞÒãÒÐâØ Roland MT-32" -#: gui/options.cpp:932 +#: gui/options.cpp:916 msgid "Text and Speech:" msgstr "ÂÕÚáâ ö Þ×ÒãçÚÐ:" -#: gui/options.cpp:936 gui/options.cpp:946 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "¾×ÒãçÚÐ" -#: gui/options.cpp:937 gui/options.cpp:947 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "ÁãÑâØâàØ" -#: gui/options.cpp:938 +#: gui/options.cpp:922 msgid "Both" msgstr "²áÕ" -#: gui/options.cpp:940 +#: gui/options.cpp:924 msgid "Subtitle speed:" msgstr "ÈÒØÔ. áãÑâØâàöÒ:" -#: gui/options.cpp:942 +#: gui/options.cpp:926 msgctxt "lowres" msgid "Text and Speech:" msgstr "ÂÕÚáâ ö Þ×ÒãçÚÐ:" -#: gui/options.cpp:946 +#: gui/options.cpp:930 msgid "Spch" msgstr "¾×Ò" -#: gui/options.cpp:947 +#: gui/options.cpp:931 msgid "Subs" msgstr "ÁãÑ" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgctxt "lowres" msgid "Both" msgstr "²áÕ" -#: gui/options.cpp:948 +#: gui/options.cpp:932 msgid "Show subtitles and play speech" msgstr "¿ÞÚÐ×ãÒÐâØ áãÑâØâàØ ö ÒöÔâÒÞàîÒÐâØ ÜÞÒã" -#: gui/options.cpp:950 +#: gui/options.cpp:934 msgctxt "lowres" msgid "Subtitle speed:" msgstr "ÈÒØÔ. áãÑâØâàöÒ:" -#: gui/options.cpp:966 +#: gui/options.cpp:950 msgid "Music volume:" msgstr "³ãçÝöáâì Üã×ØÚØ:" -#: gui/options.cpp:968 +#: gui/options.cpp:952 msgctxt "lowres" msgid "Music volume:" msgstr "³ãçÝöáâì Üã×ØÚØ:" -#: gui/options.cpp:975 +#: gui/options.cpp:959 msgid "Mute All" msgstr "²ØÜÚÝãâØ ÒáÕ" -#: gui/options.cpp:978 +#: gui/options.cpp:962 msgid "SFX volume:" msgstr "³ãçÝöáâì ÕäÕÚâöÒ:" -#: gui/options.cpp:978 gui/options.cpp:980 gui/options.cpp:981 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "³ãçÝöáâì áßÕæöÐÛìÝØå ×ÒãÚÞÒØå ÕäÕÚâöÒ" -#: gui/options.cpp:980 +#: gui/options.cpp:964 msgctxt "lowres" msgid "SFX volume:" msgstr "³ãçÝ. ÕäÕÚâöÒ:" -#: gui/options.cpp:988 +#: gui/options.cpp:972 msgid "Speech volume:" msgstr "³ãçÝöáâì Þ×ÒãçÚØ:" -#: gui/options.cpp:990 +#: gui/options.cpp:974 msgctxt "lowres" msgid "Speech volume:" msgstr "³ãçÝ. Þ×ÒãçÚØ:" -#: gui/options.cpp:1156 +#: gui/options.cpp:1131 msgid "Theme Path:" msgstr "ÈÛïå ÔÞ âÕÜ:" -#: gui/options.cpp:1158 +#: gui/options.cpp:1133 msgctxt "lowres" msgid "Theme Path:" msgstr "ÈÛïå ÔÞ âÕÜ:" -#: gui/options.cpp:1164 gui/options.cpp:1166 gui/options.cpp:1167 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "" "²ÚÐ×ãô èÛïå ÔÞ ÔÞÔÐâÚÞÒØå äÐÙÛöÒ ÔÐÝØå, ïÚö ÒØÚÞàØáâÞÒãîâìáï ãáöÜÐ öÓàÐÜØ " "ÐÑÞ ScummVM" -#: gui/options.cpp:1173 +#: gui/options.cpp:1148 msgid "Plugins Path:" msgstr "ÈÛïå ÔÞ ÒâãÛÚöÒ:" -#: gui/options.cpp:1175 +#: gui/options.cpp:1150 msgctxt "lowres" msgid "Plugins Path:" msgstr "ÈÛïå ÔÞ ÒâãÛÚöÒ:" -#: gui/options.cpp:1184 +#: gui/options.cpp:1159 msgid "Misc" msgstr "Àö×ÝÕ" -#: gui/options.cpp:1186 +#: gui/options.cpp:1161 msgctxt "lowres" msgid "Misc" msgstr "Àö×ÝÕ" -#: gui/options.cpp:1188 +#: gui/options.cpp:1163 msgid "Theme:" msgstr "ÂÕÜÐ:" -#: gui/options.cpp:1192 +#: gui/options.cpp:1167 msgid "GUI Renderer:" msgstr "ÀÐáâÕà. GUI:" -#: gui/options.cpp:1204 +#: gui/options.cpp:1179 msgid "Autosave:" msgstr "°ÒâÞ×ÑÕàÕÖÕÝÝï:" -#: gui/options.cpp:1206 +#: gui/options.cpp:1181 msgctxt "lowres" msgid "Autosave:" msgstr "°ÒâÞ×ÑÕàÕÖ.:" -#: gui/options.cpp:1214 +#: gui/options.cpp:1189 msgid "Keys" msgstr "ºÛÐÒöèö" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "GUI Language:" msgstr "¼ÞÒÐ öÝâÕàä.:" -#: gui/options.cpp:1221 +#: gui/options.cpp:1196 msgid "Language of ScummVM GUI" msgstr "¼ÞÒÐ ÓàÐäöçÝÞÓÞ öÝâÕàäÕÙáã ScummVM" -#: gui/options.cpp:1372 +#: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." msgstr "²Ø ßÞÒØÝÝö ßÕàÕ×ÐßãáâØâØ ScummVM éÞÑ ×ÐáâÞáãÒÐâØ ×ÜöÝØ." -#: gui/options.cpp:1385 +#: gui/options.cpp:1360 msgid "Select directory for savegames" msgstr "²ØÑÕàöâì ßÐßÚã ÔÛï ×ÑÕàÕÖÕÝì" -#: gui/options.cpp:1392 +#: gui/options.cpp:1367 msgid "The chosen directory cannot be written to. Please select another one." msgstr "½Õ ÜÞÖã ßØáÐâØ ã ÒØÑàÐÝã ßÐßÚã. ±ãÔì ÛÐáÚÐ, ÒÚÐÖöâì öÝèã." -#: gui/options.cpp:1401 +#: gui/options.cpp:1376 msgid "Select directory for GUI themes" msgstr "²ØÑÕàöâì ßÐßÚã ÔÛï âÕÜ GUI" -#: gui/options.cpp:1411 +#: gui/options.cpp:1386 msgid "Select directory for extra files" msgstr "²ØÑÕàöâì ßÐßÚã × ÔÞÔÐâÚÞÒØÜØ äÐÙÛÐÜØ" -#: gui/options.cpp:1422 +#: gui/options.cpp:1397 msgid "Select directory for plugins" msgstr "²ØÑÕàöâì ßÐßÚã ×ö ÒâãÛÚÐÜØ" -#: gui/options.cpp:1475 +#: gui/options.cpp:1450 msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." @@ -967,64 +964,64 @@ msgstr " msgid "Select a Theme" msgstr "²ØÑÕàöâì âÕÜã" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgid "Disabled GFX" msgstr "±Õ× ÓàÐäöÚØ" -#: gui/ThemeEngine.cpp:333 +#: gui/ThemeEngine.cpp:335 msgctxt "lowres" msgid "Disabled GFX" msgstr "±Õ× ÓàÐäöÚØ" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard Renderer (16bpp)" msgstr "ÁâÐÝÔÐàâÝØÙ àÐáâÕàØ×ÐâÞà (16bpp)" -#: gui/ThemeEngine.cpp:334 +#: gui/ThemeEngine.cpp:336 msgid "Standard (16bpp)" msgstr "ÁâÐÝÔÐàâÝØÙ àÐáâÕàØ×ÐâÞà (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased Renderer (16bpp)" msgstr "ÀÐáâÕàØ×ÐâÞà ×ö ×ÓÛÐÔÖãÒÐÝÝïÜ (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Antialiased (16bpp)" msgstr "ÀÐáâÕàØ×ÐâÞà ×ö ×ÓÛÐÔÖãÒÐÝÝïÜ (16bpp)" -#: gui/widget.cpp:312 gui/widget.cpp:314 gui/widget.cpp:320 gui/widget.cpp:322 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "¾çØáâØâØ ×ÝÐçÕÝÝï" -#: base/main.cpp:203 +#: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" msgstr "´ÒØÖÞÚ ÝÕ ßöÔâàØÜãô àöÒÕÝì ÒöÔÛÐÔÚØ '%s'" -#: base/main.cpp:275 +#: base/main.cpp:287 msgid "Menu" msgstr "¼ÕÝî" -#: base/main.cpp:278 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "¿àÞßãáâØâØ" -#: base/main.cpp:281 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "¿Ðã×Ð" -#: base/main.cpp:284 +#: base/main.cpp:296 msgid "Skip line" msgstr "¿àÞßãáâØâØ àïÔÞÚ" -#: base/main.cpp:455 +#: base/main.cpp:467 msgid "Error running game:" msgstr "¿ÞÜØÛÚÐ ×ÐßãáÚã ÓàØ:" -#: base/main.cpp:479 +#: base/main.cpp:491 msgid "Could not find any engine capable of running the selected game" msgstr "½Õ ÜÞÖã ×ÝÐÙâØ ÔÒØÖÞÚ ÔÛï ×ÐßãáÚã ÒØÑàÐÝÞ÷ ÓàØ" @@ -1092,16 +1089,16 @@ msgstr " msgid "Unknown error" msgstr "½ÕÒöÔÞÜÐ ßÞÜØÛÚÐ" -#: engines/advancedDetector.cpp:296 +#: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "³àÐ ã '%s' ÝÕÒöÔÞÜÐ." -#: engines/advancedDetector.cpp:297 +#: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "±ãÔì ÛÐáÚÐ, ßÕàÕÔÐÙâÕ ÝØÖçÕÝÐÒÕÔÕÝã öÝäÞàÜÐæöî ÚÞÜÐÝÔö ScummVM àÐ×ÞÜ ×" -#: engines/advancedDetector.cpp:299 +#: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" msgstr "ÝÐ×ÒÞî ÓàØ, ïÚã ÒØ ÝÐÜÐÓÐôâÕáì ÔÞÔÐâØ, Ð âÐÚÞÖ ÷÷ ÒÕàáöî/ÜÞÒã/âÐ öÝèÕ:" @@ -1138,13 +1135,14 @@ msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~¿~ÞÒÕà.Ò ÓÞÛÞÒÝÕ ÜÕÝî" -#: engines/dialogs.cpp:116 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 msgid "Save game:" msgstr "·ÑÕàÕÓâØ Óàã: " -#: engines/dialogs.cpp:116 engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:566 +#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 +#: engines/sci/engine/kfile.cpp:567 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1255,6 +1253,88 @@ msgstr "" msgid "Start anyway" msgstr "²áÕ ÞÔÝÞ ×ÐßãáâØâØ" +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "" + +#: 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 "" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore game:" +msgstr "²öÔÝÞÒØâØ Óàã:" + +#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +msgid "Restore" +msgstr "²öÔÝÞÒØâØ" + +#: engines/dreamweb/detection.cpp:57 +#, fuzzy +msgid "Use bright palette mode" +msgstr "²ÕàåÝï áßàÐÒÐ àöç" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "EGA ÑÕ× àÐáâàãÒÐÝÝï" + +#: engines/sci/detection.cpp:371 +#, fuzzy +msgid "Enable undithering in EGA games" +msgstr "²öÜÚÝãâØ àÐáâàãÒÐÝÝï Ò EGA öÓàÐå ïÚö æÕ ßöÔâàØÜãîâì" + +#: engines/sci/detection.cpp:380 +#, fuzzy +msgid "Prefer digital sound effects" +msgstr "³ãçÝöáâì áßÕæöÐÛìÝØå ×ÒãÚÞÒØå ÕäÕÚâöÒ" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yahama FB-01 for MIDI output" +msgstr "" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"output" +msgstr "" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" + +#: engines/sci/detection.cpp:433 +#, fuzzy +msgid "Use silver cursors" +msgstr "·ÒØçÐÙÝØÙ ÚãàáÞà" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" + #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." @@ -1911,7 +1991,7 @@ msgstr "" "ÀÕÖØÜ \"àöÔÝÞÓÞ\" MIDI ßÞâàÕÑãô ßÞÝÞÒÛÕÝÝï Roland Upgrade ÒöÔ\n" "LucasArts, ßàÞâÕ %s ÒöÔáãâÝöÙ. ¿ÕàÕÜØÚÐîáì ÝÐ AdLib." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:189 +#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1922,7 +2002,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:154 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1933,7 +2013,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:197 +#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1980,14 +2060,6 @@ msgstr " msgid "~W~ater Effect Enabled" msgstr "µäÕÚâØ ÒÞÔØ ãÒöÜÚÝÕÝÞ" -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore game:" -msgstr "²öÔÝÞÒØâØ Óàã:" - -#: engines/sci/engine/kfile.cpp:673 -msgid "Restore" -msgstr "²öÔÝÞÒØâØ" - #: engines/agos/animation.cpp:550 #, c-format msgid "Cutscene file '%s' not found!" @@ -2010,6 +2082,66 @@ msgstr " msgid "Failed to save game" msgstr "½Õ ÒÔÐÛÞáï ×ÐßØáÐâØ Óàã" +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "" + +#: engines/kyra/detection.cpp:85 +#, fuzzy +msgid "Enable helium mode" +msgstr "ÃÒöÜÚÝãâØ àÕÖØÜ Roland GS" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "" + +#. 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 "·ÒØçÐÙÝØÙ ÚãàáÞà" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "" + #: engines/kyra/lol.cpp:478 msgid "Attack 1" msgstr "°âÐÚÐ 1" @@ -2072,6 +2204,14 @@ msgstr "" "MT32 ÝÐ General MIDI. °ÛÕ Ò àÕ×ãÛìâÐâö ÜÞÖÕ\n" "áâÐâØáï, éÞ ÔÕïÚö âàÕÚØ ÑãÔãâì ÓàÐâØ ÝÕßàÐÒØÛìÝÞ." +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" @@ -2150,6 +2290,14 @@ msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "·ÝÐÙÔÕÝÞ ×ÐáâÐÒÚØ DXA, ÐÛÕ ScummVM ÑãÒ ßÞÑãÔÞÒÐÝØÙ ÑÕ× ßöÔâàØÜÚØ zlib" +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2384,19 +2532,19 @@ msgstr " msgid "Disable power off" msgstr "·ÐÑÞàÞÝØâØ ÒØÜÚÝÕÝÝï" -#: backends/platform/iphone/osys_events.cpp:301 +#: backends/platform/iphone/osys_events.cpp:300 msgid "Mouse-click-and-drag mode enabled." msgstr "ÀÕÖØÜ ÜØèö ÚÛöÚÝãâØ-âÐ-âïÓÝãâØ ãÒöÜÚÝÕÝÞ." -#: backends/platform/iphone/osys_events.cpp:303 +#: backends/platform/iphone/osys_events.cpp:302 msgid "Mouse-click-and-drag mode disabled." msgstr "ÀÕÖØÜ ÜØèö ÚÛöÚÝãâØ-âÐ-âïÓÝãâØ ÒØÜÚÝÕÝÞ." -#: backends/platform/iphone/osys_events.cpp:314 +#: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." msgstr "ÀÕÖØÜ âÐçßÐÔã ãÒöÜÚÝÕÝÞ." -#: backends/platform/iphone/osys_events.cpp:316 +#: backends/platform/iphone/osys_events.cpp:315 msgid "Touchpad mode disabled." msgstr "ÀÕÖØÜ âÐçßÐÔã ÒØÜÚÝÕÝÞ." @@ -2472,15 +2620,15 @@ msgstr " msgid "Windowed mode" msgstr "²öÚÞÝÝØÙ àÕÖØÜ" -#: backends/graphics/opengl/opengl-graphics.cpp:130 +#: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" msgstr "OpenGL ÝÞàÜÐÛìÝØÙ" -#: backends/graphics/opengl/opengl-graphics.cpp:131 +#: backends/graphics/opengl/opengl-graphics.cpp:136 msgid "OpenGL Conserve" msgstr "OpenGL ·ÑÕàÕÖÕÝØÙ" -#: backends/graphics/opengl/opengl-graphics.cpp:132 +#: backends/graphics/opengl/opengl-graphics.cpp:137 msgid "OpenGL Original" msgstr "OpenGL ¾àØÓöÝÐÛìÝØÙ" -- cgit v1.2.3 From 6cda15ba8e57891471c53449433385f5992bce3a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 21 May 2012 01:29:30 +0300 Subject: SCI: Added two new debug commands, plane_list and plane_items These can be used to debug drawn items in SCI32 --- engines/sci/console.cpp | 54 ++++++++++++++++++++++++++++++++++++++- engines/sci/console.h | 2 ++ engines/sci/graphics/frameout.cpp | 51 ++++++++++++++++++++++++++++++++++++ engines/sci/graphics/frameout.h | 2 ++ 4 files changed, 108 insertions(+), 1 deletion(-) diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 9607a8e66d..5b5301b468 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -53,6 +53,7 @@ #include "video/avi_decoder.h" #include "sci/video/seq_decoder.h" #ifdef ENABLE_SCI32 +#include "sci/graphics/frameout.h" #include "video/coktel_decoder.h" #include "sci/video/robot_decoder.h" #endif @@ -131,6 +132,10 @@ Console::Console(SciEngine *engine) : GUI::Debugger(), DCmd_Register("al", WRAP_METHOD(Console, cmdAnimateList)); // alias DCmd_Register("window_list", WRAP_METHOD(Console, cmdWindowList)); DCmd_Register("wl", WRAP_METHOD(Console, cmdWindowList)); // alias + DCmd_Register("plane_list", WRAP_METHOD(Console, cmdPlaneList)); + DCmd_Register("pl", WRAP_METHOD(Console, cmdPlaneList)); // alias + DCmd_Register("plane_items", WRAP_METHOD(Console, cmdPlaneItemList)); + DCmd_Register("pi", WRAP_METHOD(Console, cmdPlaneItemList)); // alias DCmd_Register("saved_bits", WRAP_METHOD(Console, cmdSavedBits)); DCmd_Register("show_saved_bits", WRAP_METHOD(Console, cmdShowSavedBits)); // Segments @@ -365,7 +370,9 @@ bool Console::cmdHelp(int argc, const char **argv) { DebugPrintf(" pic_visualize - Enables visualization of the drawing process of EGA pictures\n"); DebugPrintf(" undither - Enable/disable undithering\n"); DebugPrintf(" play_video - Plays a SEQ, AVI, VMD, RBT or DUK video\n"); - DebugPrintf(" animate_object_list / al - Shows the current list of objects in kAnimate's draw list\n"); + DebugPrintf(" animate_list / al - Shows the current list of objects in kAnimate's draw list (SCI0 - SCI1.1)\n"); + DebugPrintf(" window_list / wl - Shows a list of all the windows (ports) in the draw list (SCI0 - SCI1.1)\n"); + DebugPrintf(" plane_list / pl - Shows a list of all the planes in the draw list (SCI2+)\n"); DebugPrintf(" saved_bits - List saved bits on the hunk\n"); DebugPrintf(" show_saved_bits - Display saved bits\n"); DebugPrintf("\n"); @@ -1589,6 +1596,8 @@ bool Console::cmdAnimateList(int argc, const char **argv) { if (_engine->_gfxAnimate) { DebugPrintf("Animate list:\n"); _engine->_gfxAnimate->printAnimateList(this); + } else { + DebugPrintf("This SCI version does not have an animate list\n"); } return true; } @@ -1597,9 +1606,52 @@ bool Console::cmdWindowList(int argc, const char **argv) { if (_engine->_gfxPorts) { DebugPrintf("Window list:\n"); _engine->_gfxPorts->printWindowList(this); + } else { + DebugPrintf("This SCI version does not have a list of ports\n"); } return true; +} +bool Console::cmdPlaneList(int argc, const char **argv) { +#ifdef ENABLE_SCI32 + if (_engine->_gfxFrameout) { + DebugPrintf("Plane list:\n"); + _engine->_gfxFrameout->printPlaneList(this); + } else { + DebugPrintf("This SCI version does not have a list of planes\n"); + } +#else + DebugPrintf("SCI32 isn't included in this compiled executable\n"); +#endif + return true; +} + +bool Console::cmdPlaneItemList(int argc, const char **argv) { + if (argc != 2) { + DebugPrintf("Shows the list of items for a plane\n"); + DebugPrintf("Usage: %s \n", argv[0]); + return true; + } + + reg_t planeObject = NULL_REG; + + if (parse_reg_t(_engine->_gamestate, argv[1], &planeObject, false)) { + DebugPrintf("Invalid address passed.\n"); + DebugPrintf("Check the \"addresses\" command on how to use addresses\n"); + return true; + } + +#ifdef ENABLE_SCI32 + if (_engine->_gfxFrameout) { + DebugPrintf("Plane item list:\n"); + _engine->_gfxFrameout->printPlaneItemList(this, planeObject); + } else { + DebugPrintf("This SCI version does not have a list of plane items\n"); + } +#else + DebugPrintf("SCI32 isn't included in this compiled executable\n"); +#endif + return true; } bool Console::cmdSavedBits(int argc, const char **argv) { diff --git a/engines/sci/console.h b/engines/sci/console.h index d943923ba1..be17fdb728 100644 --- a/engines/sci/console.h +++ b/engines/sci/console.h @@ -94,6 +94,8 @@ private: bool cmdPlayVideo(int argc, const char **argv); bool cmdAnimateList(int argc, const char **argv); bool cmdWindowList(int argc, const char **argv); + bool cmdPlaneList(int argc, const char **argv); + bool cmdPlaneItemList(int argc, const char **argv); bool cmdSavedBits(int argc, const char **argv); bool cmdShowSavedBits(int argc, const char **argv); // Segments diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 42b51e409d..709a708d8b 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -31,6 +31,7 @@ #include "graphics/surface.h" #include "sci/sci.h" +#include "sci/console.h" #include "sci/engine/kernel.h" #include "sci/engine/state.h" #include "sci/engine/selector.h" @@ -677,4 +678,54 @@ void GfxFrameout::kernelFrameout() { g_sci->getEngineState()->_throttleTrigger = true; } +void GfxFrameout::printPlaneList(Console *con) { + for (PlaneList::const_iterator it = _planes.begin(); it != _planes.end(); ++it) { + PlaneEntry p = *it; + Common::String curPlaneName = _segMan->getObjectName(p.object); + Common::Rect r = p.upscaledPlaneRect; + Common::Rect cr = p.upscaledPlaneClipRect; + + con->DebugPrintf("%04x:%04x (%s): prio %d, lastprio %d, offsetX %d, offsetY %d, pic %d, mirror %d, back %d\n", + PRINT_REG(p.object), curPlaneName.c_str(), + (int16)p.priority, (int16)p.lastPriority, + p.planeOffsetX, p.planeOffsetY, p.pictureId, + p.planePictureMirrored, p.planeBack); + con->DebugPrintf(" rect: (%d, %d, %d, %d), clip rect: (%d, %d, %d, %d)\n", + r.left, r.top, r.right, r.bottom, + cr.left, cr.top, cr.right, cr.bottom); + + if (p.pictureId != 0xffff && p.pictureId != 0xfffe) { + con->DebugPrintf("Pictures:\n"); + + for (PlanePictureList::iterator pictureIt = _planePictures.begin(); pictureIt != _planePictures.end(); pictureIt++) { + if (pictureIt->object == p.object) { + con->DebugPrintf(" Picture %d: x %d, y %d\n", pictureIt->pictureId, pictureIt->startX, pictureIt->startY); + } + } + } + } +} + +void GfxFrameout::printPlaneItemList(Console *con, reg_t planeObject) { + for (FrameoutList::iterator listIterator = _screenItems.begin(); listIterator != _screenItems.end(); listIterator++) { + FrameoutEntry *e = *listIterator; + reg_t itemPlane = readSelector(_segMan, e->object, SELECTOR(plane)); + + if (planeObject == itemPlane) { + Common::String curItemName = _segMan->getObjectName(e->object); + Common::Rect icr = e->celRect; + GuiResourceId picId = e->picture ? e->picture->getResourceId() : 0; + + con->DebugPrintf("%d: %04x:%04x (%s), view %d, loop %d, cel %d, x %d, y %d, z %d, " + "signal %d, scale signal %d, scaleX %d, scaleY %d, rect (%d, %d, %d, %d), " + "pic %d, picX %d, picY %d, visible %d\n", + e->givenOrderNr, PRINT_REG(e->object), curItemName.c_str(), + e->viewId, e->loopNo, e->celNo, e->x, e->y, e->z, + e->signal, e->scaleSignal, e->scaleX, e->scaleY, + icr.left, icr.top, icr.right, icr.bottom, + picId, e->picStartX, e->picStartY, e->visible); + } + } +} + } // End of namespace Sci diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index a3d686c592..ec4de62c0a 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -104,6 +104,8 @@ public: void addPlanePicture(reg_t object, GuiResourceId pictureId, uint16 startX, uint16 startY = 0); void deletePlanePictures(reg_t object); void clear(); + void printPlaneList(Console *con); + void printPlaneItemList(Console *con, reg_t planeObject); private: void showVideo(); -- cgit v1.2.3 From a07840931a638bffd9fc0e7325f87b745fc4af24 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 21 May 2012 00:06:42 -0400 Subject: SCI: Properly alphabetize the SCI32 objects --- engines/sci/module.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/module.mk b/engines/sci/module.mk index 2842e4724e..b6d5837b31 100644 --- a/engines/sci/module.mk +++ b/engines/sci/module.mk @@ -79,9 +79,9 @@ MODULE_OBJS := \ ifdef ENABLE_SCI32 MODULE_OBJS += \ + engine/kgraphics32.o \ graphics/controls32.o \ graphics/frameout.o \ - engine/kgraphics32.o \ graphics/paint32.o \ graphics/text32.o \ video/robot_decoder.o -- cgit v1.2.3 From 92b907e8560c689e6c61ccda9a08ae8306655db9 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 21 May 2012 00:07:28 -0400 Subject: SCI: Silence unused variable warnings --- engines/sci/engine/kgraphics32.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 786a58aae9..2bb8288cb7 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -236,11 +236,11 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) { // tables inside graphics/transitions.cpp uint16 showStyle = argv[0].toUint16(); // 0 - 15 reg_t planeObj = argv[1]; // the affected plane - uint16 seconds = argv[2].toUint16(); // seconds that the transition lasts - uint16 backColor = argv[3].toUint16(); // target back color(?). When fading out, it's 0x0000. When fading in, it's 0xffff - int16 priority = argv[4].toSint16(); // always 0xc8 (200) when fading in/out - uint16 animate = argv[5].toUint16(); // boolean, animate or not while the transition lasts - uint16 refFrame = argv[6].toUint16(); // refFrame, always 0 when fading in/out + //uint16 seconds = argv[2].toUint16(); // seconds that the transition lasts + //uint16 backColor = argv[3].toUint16(); // target back color(?). When fading out, it's 0x0000. When fading in, it's 0xffff + //int16 priority = argv[4].toSint16(); // always 0xc8 (200) when fading in/out + //uint16 animate = argv[5].toUint16(); // boolean, animate or not while the transition lasts + //uint16 refFrame = argv[6].toUint16(); // refFrame, always 0 when fading in/out int16 divisions; // If the game has the pFadeArray selector, another parameter is used here, -- cgit v1.2.3 From b678dca1c01be742b9d020b3be481aa3ce562eaf Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 21 May 2012 11:40:35 +0300 Subject: DREAMWEB: Fix bug #3528160 - "DREAMWEB: graphical glitch on UKV CD version loading screen" --- engines/dreamweb/detection_tables.h | 4 ++-- engines/dreamweb/saveload.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/engines/dreamweb/detection_tables.h b/engines/dreamweb/detection_tables.h index 70c42eeeda..063aabbd89 100644 --- a/engines/dreamweb/detection_tables.h +++ b/engines/dreamweb/detection_tables.h @@ -82,7 +82,7 @@ static const DreamWebGameDescription gameDescriptions[] = { {"dreamweb.exe", 0, "dd1c7793b151489e67b83cd1ecab51cd", -1}, AD_LISTEND }, - Common::EN_ANY, + Common::EN_GRB, Common::kPlatformPC, ADGF_CD | ADGF_TESTING, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) @@ -101,7 +101,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::EN_USA, Common::kPlatformPC, - ADGF_CD, + ADGF_CD | ADGF_TESTING, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp index 5d7f02c5cf..d30bf754de 100644 --- a/engines/dreamweb/saveload.cpp +++ b/engines/dreamweb/saveload.cpp @@ -839,8 +839,9 @@ void DreamWebEngine::showOpBox() { // This call displays half of the ops dialog in the CD version. It's not // in the floppy version, and if it's called, a stray red dot is shown in - // the game dialogs. - if (isCD()) + // the game dialogs. It is included in the early UK CD release, which had + // similar data files as the floppy release (bug #3528160). + if (isCD() && getLanguage() != Common::EN_GRB) showFrame(_saveGraphics, kOpsx, kOpsy + 55, 4, 0); } -- cgit v1.2.3 From ed4232cfeb3ab16ee6046f422f5827fa6c4992c8 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 21 May 2012 18:57:18 -0400 Subject: COMMON: Skip junk found at the end of QuickTime files Can occur in files and is ignored by QuickTime --- common/quicktime.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/quicktime.cpp b/common/quicktime.cpp index 5176f83a35..173d3c6a97 100644 --- a/common/quicktime.cpp +++ b/common/quicktime.cpp @@ -217,7 +217,11 @@ int QuickTimeParser::readDefault(Atom atom) { a.size -= 8; - if (_parseTable[i].type == 0) { // skip leaf atoms data + if (a.size + (uint32)_fd->pos() > (uint32)_fd->size()) { + _fd->seek(_fd->size()); + debug(0, "Skipping junk found at the end of the QuickTime file"); + return 0; + } else if (_parseTable[i].type == 0) { // skip leaf atom data debug(0, ">>> Skipped [%s]", tag2str(a.type)); _fd->seek(a.size, SEEK_CUR); -- cgit v1.2.3 From a3832ecd5d7c16f5be5119edff2024b50bbf2651 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 21 May 2012 22:38:32 -0400 Subject: AUDIO: Fix seeking to the end of a QuickTime audio track --- audio/decoders/quicktime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/decoders/quicktime.cpp b/audio/decoders/quicktime.cpp index 99c1527a71..8874a61c2e 100644 --- a/audio/decoders/quicktime.cpp +++ b/audio/decoders/quicktime.cpp @@ -338,7 +338,7 @@ bool QuickTimeAudioDecoder::QuickTimeAudioTrack::seek(const Timestamp &where) { _queue = createStream(); _samplesQueued = 0; - if (where > getLength()) { + if (where >= getLength()) { // We're done _curEdit = _parentTrack->editCount; return true; -- cgit v1.2.3 From 5a8a28bb22ac986e2f18a93fd6afd0252b5a2333 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 22 May 2012 10:45:57 +0300 Subject: SCI: Add a workaround for a hack used in the NRS script patches for QFG3 The patched script 33 in the NRS patch attempts to perform kAbs() on an object. Return a dummy value instead. Fixes bugs #3528416 and #3528542 --- engines/sci/engine/workarounds.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 81c6fbb246..c1d4a3d9f9 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -176,6 +176,7 @@ const SciWorkaroundEntry kAbs_workarounds[] = { { GID_HOYLE1, 2, 2, 0, "room2", "doit", -1, 0, { WORKAROUND_FAKE, 0x3e9 } }, // old maid - called with objects instead of integers { GID_HOYLE1, 3, 3, 0, "room3", "doit", -1, 0, { WORKAROUND_FAKE, 0x3e9 } }, // hearts - called with objects instead of integers { GID_QFG1VGA, -1, -1, 0, NULL, "doit", -1, 0, { WORKAROUND_FAKE, 0x3e9 } }, // when the game is patched with the NRS patch + { GID_QFG3 , -1, -1, 0, NULL, "doit", -1, 0, { WORKAROUND_FAKE, 0x3e9 } }, // when the game is patched with the NRS patch (bugs #3528416, #3528542) SCI_WORKAROUNDENTRY_TERMINATOR }; -- cgit v1.2.3 From a1554b9ddd719efc97cbf344fe84d20416810b0b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 22 May 2012 10:47:04 +0300 Subject: SCI: Fix the detection of the NRS patch for QFG3 --- engines/sci/sci.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 9b0ee6924b..960016764a 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -385,7 +385,7 @@ bool SciEngine::gameHasFanMadePatch() { { GID_PQ3, 994, 4686, 1291, 0x78 }, // English { GID_PQ3, 994, 4734, 1283, 0x78 }, // German { GID_QFG1VGA, 994, 4388, 0, 0x00 }, - { GID_QFG3, 994, 4714, 0, 0x00 }, + { GID_QFG3, 33, 260, 0, 0x00 }, // TODO: Disabled, as it fixes a whole lot of bugs which can't be tested till SCI2.1 support is finished //{ GID_QFG4, 710, 11477, 0, 0x00 }, { GID_SQ1, 994, 4740, 0, 0x00 }, -- cgit v1.2.3 From 45974a1bf03b25cd6a191702b190478cc4c1007e Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 22 May 2012 16:31:23 +0100 Subject: DREAMWEB: Increased debugging output from sound related code. This code is intended as temporary debugging code to aid investigation of bug #3528164 - "DREAMWEB: missing sound effects/music cues during main title" and can be removed once this bug is fixed. --- engines/dreamweb/sound.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index 800936e8e8..b3d5db9e0d 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -55,6 +55,7 @@ void DreamWebEngine::volumeAdjust() { } void DreamWebEngine::playChannel0(uint8 index, uint8 repeat) { + debug(1, "playChannel0(index:%d, repeat:%d)", index, repeat); _channel0Playing = index; if (index >= 12) index -= 12; @@ -72,6 +73,7 @@ void DreamWebEngine::playChannel1(uint8 index) { } void DreamWebEngine::cancelCh0() { + debug(1, "cancelCh0()"); _channel0Repeat = 0; _channel0Playing = 255; stopSound(0); @@ -83,6 +85,7 @@ void DreamWebEngine::cancelCh1() { } void DreamWebEngine::loadRoomsSample() { + debug(1, "loadRoomsSample() _roomsSample:%d", _roomsSample); uint8 sample = _roomsSample; if (sample == 255 || _currentSample == sample) @@ -190,6 +193,11 @@ bool DreamWebEngine::loadSpeech(const Common::String &filename) { } void DreamWebEngine::soundHandler() { + static uint8 volumeOld = 0, channel0Old = 0, channel0PlayingOld = 0; + if (_volume != volumeOld || _channel0 != channel0Old || _channel0Playing != channel0PlayingOld) + debug(1, "soundHandler() _volume: %d _channel0: %d _channel0Playing: %d", _volume, _channel0, _channel0Playing); + volumeOld = _volume, channel0Old = _channel0, channel0PlayingOld = _channel0Playing; + _subtitles = ConfMan.getBool("subtitles"); volumeAdjust(); @@ -230,6 +238,8 @@ void DreamWebEngine::soundHandler() { } } if (!_mixer->isSoundHandleActive(_channelHandle[0])) { + if (_channel0Playing != 255 && _channel0 != 0) + debug(1, "!_mixer->isSoundHandleActive _channelHandle[0] _channel0Playing:%d _channel0:%d", _channel0Playing, _channel0); _channel0Playing = 255; _channel0 = 0; } @@ -237,7 +247,6 @@ void DreamWebEngine::soundHandler() { _channel1Playing = 255; _channel1 = 0; } - } void DreamWebEngine::loadSounds(uint bank, const Common::String &suffix) { -- cgit v1.2.3 From beef27fc10bb714fe37f2ee0c35cd143dc706829 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 24 May 2012 01:43:03 +0300 Subject: SCI: Map the rarely used VibrateMouse kernel function to be an empty call This is a function used to implement vibration in the floppy version of QFG4 for exotic force feedback mice, such as the Logitech Cyberman --- engines/sci/engine/kernel_tables.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index ff06b79d72..1fa12b01fd 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -507,13 +507,20 @@ static SciKernelMapEntry s_kernelMap[] = { // SetScroll - called by script 64909, Styler::doit() // PalCycle - called by Game::newRoom. Related to RemapColors. - // VibrateMouse - used in QFG4 // SCI2 Empty functions // Debug function used to track resources { MAP_EMPTY(ResourceTrack), SIG_EVERYWHERE, "(.*)", NULL, NULL }, - + // Future TODO: This call is used in the floppy version of QFG4 to add + // vibration to exotic mice with force feedback, such as the Logitech + // Cyberman and Wingman mice. Since this is only used for very exotic + // hardware and we have no direct and cross-platform way of communicating + // with them via SDL, plus we would probably need to make changes to common + // code, this call is mapped to an empty function for now as it's a rare + // feature not worth the effort. + { MAP_EMPTY(VibrateMouse), SIG_EVERYWHERE, "(.*)", NULL, NULL }, + // Unused / debug SCI2 unused functions, always mapped to kDummy // AddMagnify/DeleteMagnify are both called by script 64979 (the Magnifier -- cgit v1.2.3 From 4719fd99007df8b4e20b93484a2229e32aed6261 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 20 May 2012 09:22:14 +1000 Subject: COMMON: Fix comparison operation on coroutine wait methods --- common/coroutines.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/coroutines.cpp b/common/coroutines.cpp index d511ab4b35..4a45f2ec23 100644 --- a/common/coroutines.cpp +++ b/common/coroutines.cpp @@ -386,7 +386,7 @@ void CoroutineScheduler::waitForSingleObject(CORO_PARAM, int pid, uint32 duratio *expired = true; // Outer loop for doing checks until expiry - while (g_system->getMillis() < _ctx->endTime) { + while (g_system->getMillis() <= _ctx->endTime) { // Check to see if a process or event with the given Id exists _ctx->pProcess = getProcess(pid); _ctx->pEvent = !_ctx->pProcess ? getEvent(pid) : NULL; @@ -456,7 +456,7 @@ void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 * *expired = true; // Outer loop for doing checks until expiry - while (g_system->getMillis() < _ctx->endTime) { + while (g_system->getMillis() <= _ctx->endTime) { _ctx->signalled = bWaitAll; for (_ctx->i = 0; _ctx->i < nCount; ++_ctx->i) { -- cgit v1.2.3 From 839527a9553e94234a1eb802648a4ed64e926a5c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 25 May 2012 23:13:55 +1000 Subject: COMMON: Fix method error messages --- common/coroutines.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/coroutines.cpp b/common/coroutines.cpp index 4a45f2ec23..aff13a5494 100644 --- a/common/coroutines.cpp +++ b/common/coroutines.cpp @@ -433,7 +433,7 @@ void CoroutineScheduler::waitForSingleObject(CORO_PARAM, int pid, uint32 duratio void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 *pidList, bool bWaitAll, uint32 duration, bool *expired) { if (!pCurrent) - error("Called CoroutineScheduler::waitForMultipleEvents from the main process"); + error("Called CoroutineScheduler::waitForMultipleObjects from the main process"); CORO_BEGIN_CONTEXT; uint32 endTime; @@ -505,7 +505,7 @@ void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 * */ void CoroutineScheduler::sleep(CORO_PARAM, uint32 duration) { if (!pCurrent) - error("Called CoroutineScheduler::waitForSingleObject from the main process"); + error("Called CoroutineScheduler::sleep from the main process"); CORO_BEGIN_CONTEXT; uint32 endTime; -- cgit v1.2.3 From a2b51174aad31f66280da91e9c7ec25babd045e6 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 25 May 2012 23:36:18 +1000 Subject: COMMON: Cleaned up coroutine comments --- common/coroutines.cpp | 58 +++++++++++++++++++++++++++++++-------------------- common/coroutines.h | 4 +++- 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/common/coroutines.cpp b/common/coroutines.cpp index aff13a5494..b1b08c6bae 100644 --- a/common/coroutines.cpp +++ b/common/coroutines.cpp @@ -37,11 +37,15 @@ DECLARE_SINGLETON(CoroutineScheduler); #ifdef COROUTINE_DEBUG namespace { +/** Count of active coroutines */ static int s_coroCount = 0; typedef Common::HashMap CoroHashMap; static CoroHashMap *s_coroFuncs = 0; +/** + * Change the current coroutine status + */ static void changeCoroStats(const char *func, int change) { if (!s_coroFuncs) s_coroFuncs = new CoroHashMap(); @@ -49,6 +53,9 @@ static void changeCoroStats(const char *func, int change) { (*s_coroFuncs)[func] += change; } +/** + * Display the details of active coroutines + */ static void displayCoroStats() { debug("%d active coros", s_coroCount); @@ -65,6 +72,9 @@ static void displayCoroStats() { } #endif +/** + * Creates a coroutine context + */ CoroBaseContext::CoroBaseContext(const char *func) : _line(0), _sleep(0), _subctx(0) { #ifdef COROUTINE_DEBUG @@ -74,6 +84,9 @@ CoroBaseContext::CoroBaseContext(const char *func) #endif } +/** + * Destructor for coroutine context + */ CoroBaseContext::~CoroBaseContext() { #ifdef COROUTINE_DEBUG s_coroCount--; @@ -499,7 +512,7 @@ void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 * /** * Make the active process sleep for the given duration in milliseconds - * @param duration Duration in milliseconds + * @param duration Duration in milliseconds * @remarks This duration won't be precise, since it relies on the frequency the * scheduler is called. */ @@ -530,9 +543,9 @@ void CoroutineScheduler::sleep(CORO_PARAM, uint32 duration) { * Creates a new process. * * @param pid process identifier - * @param CORO_ADDR coroutine start address - * @param pParam process specific info - * @param sizeParam size of process specific info + * @param CORO_ADDR Coroutine start address + * @param pParam Process specific info + * @param sizeParam Size of process specific info */ PROCESS *CoroutineScheduler::createProcess(uint32 pid, CORO_ADDR coroAddr, const void *pParam, int sizeParam) { PROCESS *pProc; @@ -601,9 +614,9 @@ PROCESS *CoroutineScheduler::createProcess(uint32 pid, CORO_ADDR coroAddr, const /** * Creates a new process with an auto-incrementing Process Id. * - * @param CORO_ADDR coroutine start address - * @param pParam process specific info - * @param sizeParam size of process specific info + * @param CORO_ADDR Coroutine start address + * @param pParam Process specific info + * @param sizeParam Size of process specific info */ uint32 CoroutineScheduler::createProcess(CORO_ADDR coroAddr, const void *pParam, int sizeParam) { PROCESS *pProc = createProcess(++pidCounter, coroAddr, pParam, sizeParam); @@ -613,9 +626,9 @@ uint32 CoroutineScheduler::createProcess(CORO_ADDR coroAddr, const void *pParam, /** * Creates a new process with an auto-incrementing Process Id, and a single pointer parameter. * - * @param CORO_ADDR coroutine start address - * @param pParam process specific info - * @param sizeParam size of process specific info + * @param CORO_ADDR Coroutine start address + * @param pParam Process specific info + * @param sizeParam Size of process specific info */ uint32 CoroutineScheduler::createProcess(CORO_ADDR coroAddr, const void *pParam) { return createProcess(coroAddr, &pParam, sizeof(void *)); @@ -625,7 +638,7 @@ uint32 CoroutineScheduler::createProcess(CORO_ADDR coroAddr, const void *pParam) /** * Kills the specified process. * - * @param pKillProc which process to kill + * @param pKillProc Which process to kill */ void CoroutineScheduler::killProcess(PROCESS *pKillProc) { // make sure a valid process pointer @@ -674,7 +687,7 @@ PROCESS *CoroutineScheduler::getCurrentProcess() { /** * Returns the process identifier of the specified process. * - * @param pProc which process + * @param pProc Which process */ int CoroutineScheduler::getCurrentPID() const { PROCESS *pProc = pCurrent; @@ -690,9 +703,9 @@ int CoroutineScheduler::getCurrentPID() const { * Kills any process matching the specified PID. The current * process cannot be killed. * - * @param pidKill process identifier of process to kill - * @param pidMask mask to apply to process identifiers before comparison - * @return The number of processes killed is returned. + * @param pidKill Process identifier of process to kill + * @param pidMask Mask to apply to process identifiers before comparison + * @return The number of processes killed is returned. */ int CoroutineScheduler::killMatchingProcess(uint32 pidKill, int pidMask) { int numKilled = 0; @@ -750,7 +763,7 @@ int CoroutineScheduler::killMatchingProcess(uint32 pidKill, int pidMask) { * called by killProcess() to allow the resource allocator to free * resources allocated to the dying process. * - * @param pFunc Function to be called by killProcess() + * @param pFunc Function to be called by killProcess() */ void CoroutineScheduler::setResourceCallback(VFPTRPP pFunc) { pRCfunction = pFunc; @@ -778,9 +791,9 @@ EVENT *CoroutineScheduler::getEvent(uint32 pid) { /** * Creates a new event object - * @param bManualReset Events needs to be manually reset. Otherwise, events + * @param bManualReset Events needs to be manually reset. Otherwise, events * will be automatically reset after a process waits on the event finishes - * @param bInitialState Specifies whether the event is signalled or not initially + * @param bInitialState Specifies whether the event is signalled or not initially */ uint32 CoroutineScheduler::createEvent(bool bManualReset, bool bInitialState) { EVENT *evt = new EVENT(); @@ -794,7 +807,7 @@ uint32 CoroutineScheduler::createEvent(bool bManualReset, bool bInitialState) { /** * Destroys the given event - * @param pidEvent Event PID + * @param pidEvent Event Process Id */ void CoroutineScheduler::closeEvent(uint32 pidEvent) { EVENT *evt = getEvent(pidEvent); @@ -806,7 +819,7 @@ void CoroutineScheduler::closeEvent(uint32 pidEvent) { /** * Sets the event - * @param pidEvent Event PID + * @param pidEvent Event Process Id */ void CoroutineScheduler::setEvent(uint32 pidEvent) { EVENT *evt = getEvent(pidEvent); @@ -816,7 +829,7 @@ void CoroutineScheduler::setEvent(uint32 pidEvent) { /** * Resets the event - * @param pidEvent Event PID + * @param pidEvent Event Process Id */ void CoroutineScheduler::resetEvent(uint32 pidEvent) { EVENT *evt = getEvent(pidEvent); @@ -827,7 +840,7 @@ void CoroutineScheduler::resetEvent(uint32 pidEvent) { /** * Temporarily sets a given event to true, and then runs all waiting processes, allowing any * processes waiting on the event to be fired. It then immediately resets the event again. - * @param pidEvent Event PID + * @param pidEvent Event Process Id * * @remarks Should not be run inside of another process */ @@ -880,5 +893,4 @@ void CoroutineScheduler::pulseEvent(uint32 pidEvent) { evt->signalled = false; } - } // end of namespace Common diff --git a/common/coroutines.h b/common/coroutines.h index 6df843887c..06af245ba7 100644 --- a/common/coroutines.h +++ b/common/coroutines.h @@ -65,7 +65,8 @@ typedef CoroBaseContext *CoroContext; /** This is a special constant that can be temporarily used as a parameter to call coroutine-ised * from methods from methods that haven't yet been converted to being a coroutine, so code at least - * compiles correctly. Be aware, though, that if you use this, you will get runtime errors. + * compiles correctly. Be aware, though, that an error will occur if a coroutine that was passed + * the nullContext tries to sleep or yield control. */ extern CoroContext nullContext; @@ -283,6 +284,7 @@ public: #define CORO_INFINITE 0xffffffff #define CORO_INVALID_PID_VALUE 0 +/** Coroutine parameter for methods converted to coroutines */ typedef void (*CORO_ADDR)(CoroContext &, const void *); /** process structure */ -- cgit v1.2.3 From 79926b305cada849e7881b4d10b8dc1ea8ad522a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 26 May 2012 16:23:03 +0300 Subject: SCI: Bugfix for kFileIOReadRaw Avoid overwriting the target buffer with junk when no data has been read --- engines/sci/engine/kfile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index af438bdaff..b1f85227c1 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -812,7 +812,8 @@ 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); + if (bytesRead > 0) + s->_segMan->memcpy(argv[1], (const byte*)buf, size); } delete[] buf; -- cgit v1.2.3 From b4152bd7ebe70dfff210bb74798c30012371812e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 26 May 2012 16:32:37 +0300 Subject: SCI: Add some missing game-specific options --- engines/sci/detection_tables.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- cgit v1.2.3 From 5af1ccbac66925f4521419a36a970bff4259e984 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 26 May 2012 16:41:11 +0300 Subject: SCI: Implement kGetConfig and kGetSierraProfileInt This fixes the sluggish game speed in Phantasmagoria (DOS/Windows) --- engines/sci/engine/kernel.h | 1 + engines/sci/engine/kernel_tables.h | 6 +---- engines/sci/engine/kmisc.cpp | 46 ++++++++++++++++++++++++++++++++++++-- 3 files changed, 46 insertions(+), 7 deletions(-) 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..d8414b3b4c 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -560,6 +560,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 +580,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/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 -- cgit v1.2.3 From f15582b190baeae3ab1ddf2b6fc9dc305810f5f0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 26 May 2012 16:42:38 +0300 Subject: SCI: Map another missing kFileIO call This is used to change directories in the save/load dialog (unused by us) --- engines/sci/engine/kernel_tables.h | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index d8414b3b4c..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 -- cgit v1.2.3 From e77fc29101dfec7e5e35559783dd4e729df8a0c7 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 26 May 2012 19:06:54 +0300 Subject: SCI: Add a TODO in kFileIOReadRaw --- engines/sci/engine/kfile.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index b1f85227c1..8d1b078697 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -812,6 +812,9 @@ reg_t kFileIOReadRaw(EngineState *s, int argc, reg_t *argv) { FileHandle *f = getFileFromHandle(s, handle); if (f) { bytesRead = f->_in->read(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); } -- cgit v1.2.3 From 6fdce5795e1bff6003b148ec41266aa59592b4d8 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 27 May 2012 21:01:59 +0100 Subject: I18N: Update Czech translation from patch #3528907 --- po/cs_CZ.po | 77 +++++++++++++++++++++++++++++-------------------------------- 1 file changed, 36 insertions(+), 41 deletions(-) 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 \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 #: 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 #. 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 -- cgit v1.2.3 From 792d1e6f6ae3d910fcc88f43dc92a1a761496c1e Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 27 May 2012 21:02:25 +0100 Subject: I18N: Regenerate translation data file --- gui/themes/translations.dat | Bin 311215 -> 312684 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index a9645f226a..1463b70212 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 10f7e805c20c164a7b3a20832237341136165e28 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 27 May 2012 21:18:32 -0400 Subject: VIDEO: Add volume/balance control to VideoDecoder --- engines/agos/animation.cpp | 12 ++++++++- engines/agos/animation.h | 5 ++++ engines/sci/video/robot_decoder.cpp | 12 ++++++++- engines/sci/video/robot_decoder.h | 5 ++++ engines/sword25/fmv/theora_decoder.cpp | 12 ++++++++- engines/sword25/fmv/theora_decoder.h | 3 +++ video/avi_decoder.cpp | 12 ++++++++- video/avi_decoder.h | 5 ++++ video/bink_decoder.cpp | 12 ++++++++- video/bink_decoder.h | 5 ++++ video/coktel_decoder.cpp | 24 ++++++++++++++++-- video/coktel_decoder.h | 10 ++++++++ video/psx_decoder.cpp | 12 ++++++++- video/psx_decoder.h | 5 ++++ video/qt_decoder.cpp | 14 ++++++++++- video/qt_decoder.h | 4 +++ video/smk_decoder.cpp | 12 ++++++++- video/smk_decoder.h | 8 +++++- video/video_decoder.cpp | 14 +++++++++++ video/video_decoder.h | 46 ++++++++++++++++++++++++++++++++++ 20 files changed, 221 insertions(+), 11 deletions(-) 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/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/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/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; }; /** -- cgit v1.2.3 From d67f9b89f275ddb092d0b833b7ca9adf6a722c5a Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 27 May 2012 21:19:53 -0400 Subject: MOHAWK: Use video volume control in Riven --- engines/mohawk/video.cpp | 8 +++++--- engines/mohawk/video.h | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) 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 _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 -- cgit v1.2.3 From d54e53d4620ae1d5e08ac48022f7a286a274473f Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 28 May 2012 14:29:44 -0400 Subject: SCUMM: Add support for Spy Fox iOS --- devtools/scumm-md5.txt | 1 + engines/scumm/detection.cpp | 10 ++++++++-- engines/scumm/detection.h | 1 + engines/scumm/detection_tables.h | 1 + engines/scumm/scumm-md5.h | 3 ++- 5 files changed, 13 insertions(+), 3 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/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 }, -- cgit v1.2.3 From da3f0ba44829708c35278341395285786b095c98 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 28 May 2012 20:16:39 -0400 Subject: SCUMM: Fix error in spyfox iOS credits --- engines/scumm/he/script_v90he.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp index 0beebdb7a1..9e8ac7e2f2 100644 --- a/engines/scumm/he/script_v90he.cpp +++ b/engines/scumm/he/script_v90he.cpp @@ -2373,8 +2373,8 @@ void ScummEngine_v90he::o90_kernelSetFunctions() { case 2001: _logicHE->dispatch(args[1], num - 2, (int32 *)&args[2]); break; - case 201102: - // Used in puttzoo iOS + case 201102: // Used in puttzoo iOS + case 20111014: // Used in spyfox iOS break; default: error("o90_kernelSetFunctions: default case %d (param count %d)", args[0], num); -- cgit v1.2.3 From e35e4a1f686a982e67247f5de0537ce44ed791cd Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Tue, 29 May 2012 10:58:06 +1000 Subject: SCUMM: Add Macintosh UK version of Freddi Fish 4. --- devtools/scumm-md5.txt | 2 +- engines/scumm/detection_tables.h | 3 ++- engines/scumm/scumm-md5.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt index 99e23f7aca..f08b7d29d2 100644 --- a/devtools/scumm-md5.txt +++ b/devtools/scumm-md5.txt @@ -540,8 +540,8 @@ freddi3 Freddi Fish 3: The Case of the Stolen Conch Shell freddi4 Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch 4f580a021eee026f3b4589e17d130d78 -1 All All - - - Kirben, sev 14d48c95b43ddeb983254cf6c43851f1 -1 nl All - - - adutchguy, daniel9 + 3b832f4a90740bf22e9b8ed42ca0128c -1 gb All HE 99 - - Reckless d74122362a77ec24525fdd50297dfd82 -1 fr Mac - - - ThierryFR - 3b832f4a90740bf22e9b8ed42ca0128c -1 gb Windows HE 99 - - Reckless 07b810e37be7489263f7bc7627d4765d -1 ru Windows unenc Unencrypted - sev a336134914eaab4892d35625aa15ad1d -1 ru Windows HE 99 - - George Kormendi b5298a5c15ffbe8b381d51ea4e26d35c -1 de All HE 99 - - Joachim Eberhard diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index f48b40dd48..34ec6b6543 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -704,7 +704,8 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "freddi4", "Freddi 4 Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "freddi4", "FreddiGS", kGenHEPC, Common::DE_DEU, UNK, 0 }, { "freddi4", "FreddiGS", kGenHEMac, Common::DE_DEU, Common::kPlatformMacintosh, 0 }, - { "freddi4", "FreddiHRBG", kGenHEPC, UNK_LANG, UNK, 0 }, + { "freddi4", "FreddiHRBG", kGenHEPC, Common::EN_GRB, UNK, 0 }, + { "freddi4", "FreddiHRBG", kGenHEMac, Common::EN_GRB, Common::kPlatformMacintosh, 0 }, { "freddi4", "FreddiMini", kGenHEPC, UNK_LANG, UNK, 0 }, { "freddi4", "Malice4", kGenHEMac, Common::FR_FRA, Common::kPlatformMacintosh, 0 }, { "freddi4", "MaliceMRC", kGenHEPC, Common::FR_FRA, UNK, 0 }, diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index f719f7df19..946e954a46 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 Mon May 28 18:17:29 2012 + This file was generated by the md5table tool on Tue May 29 00:49:03 2012 DO NOT EDIT MANUALLY! */ @@ -174,7 +174,7 @@ static const MD5Table md5table[] = { { "3ae7f002d9256b8bdf76aaf8a3a069f8", "freddi", "HE 100", "", 34837, Common::EN_GRB, Common::kPlatformWii }, { "3af61c5edf8e15b43dbafd285b2e9777", "puttcircus", "", "Demo", -1, Common::HE_ISR, Common::kPlatformWindows }, { "3b301b7892f883ce42ab4be6a274fea6", "samnmax", "Floppy", "Floppy", -1, Common::EN_ANY, Common::kPlatformPC }, - { "3b832f4a90740bf22e9b8ed42ca0128c", "freddi4", "HE 99", "", -1, Common::EN_GRB, Common::kPlatformWindows }, + { "3b832f4a90740bf22e9b8ed42ca0128c", "freddi4", "HE 99", "", -1, Common::EN_GRB, Common::kPlatformUnknown }, { "3c4c471342bd95505a42334367d8f127", "puttmoon", "HE 70", "", 12161, Common::RU_RUS, Common::kPlatformWindows }, { "3cce1913a3bc586b51a75c3892ff18dd", "indy3", "VGA", "VGA", -1, Common::RU_RUS, Common::kPlatformPC }, { "3d219e7546039543307b55a91282bf18", "funpack", "", "", -1, Common::EN_ANY, Common::kPlatformPC }, -- cgit v1.2.3 From 5ba886ce8b3dc5b543d81e3f3a655b328749d778 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 29 May 2012 21:43:23 +1000 Subject: COMMON: Fixed CORO_ADDR parameter names in Doxygen comments --- common/coroutines.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/coroutines.cpp b/common/coroutines.cpp index b1b08c6bae..6159bdc0f3 100644 --- a/common/coroutines.cpp +++ b/common/coroutines.cpp @@ -542,8 +542,8 @@ void CoroutineScheduler::sleep(CORO_PARAM, uint32 duration) { /** * Creates a new process. * - * @param pid process identifier - * @param CORO_ADDR Coroutine start address + * @param pid process identifier + * @param coroAddr Coroutine start address * @param pParam Process specific info * @param sizeParam Size of process specific info */ @@ -614,7 +614,7 @@ PROCESS *CoroutineScheduler::createProcess(uint32 pid, CORO_ADDR coroAddr, const /** * Creates a new process with an auto-incrementing Process Id. * - * @param CORO_ADDR Coroutine start address + * @param coroAddr Coroutine start address * @param pParam Process specific info * @param sizeParam Size of process specific info */ @@ -626,7 +626,7 @@ uint32 CoroutineScheduler::createProcess(CORO_ADDR coroAddr, const void *pParam, /** * Creates a new process with an auto-incrementing Process Id, and a single pointer parameter. * - * @param CORO_ADDR Coroutine start address + * @param coroAddr Coroutine start address * @param pParam Process specific info * @param sizeParam Size of process specific info */ -- cgit v1.2.3 From 415831987d542e249ef9032fdab49bece24934fa Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 29 May 2012 21:51:10 +1000 Subject: COMMON: Copied coroutine doxygen method descriptions to the header file --- common/coroutines.h | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/common/coroutines.h b/common/coroutines.h index 06af245ba7..5daec4b426 100644 --- a/common/coroutines.h +++ b/common/coroutines.h @@ -356,7 +356,6 @@ private: PROCESS *getProcess(uint32 pid); EVENT *getEvent(uint32 pid); public: - CoroutineScheduler(); ~CoroutineScheduler(); @@ -366,31 +365,62 @@ public: void printStats(); #endif + /** Give all active processes a chance to run */ void schedule(); + + /** Reschedules all the processes to run again this tick */ void rescheduleAll(); + + /** If the specified process has already run on this tick, make it run again on the current tick. */ void reschedule(PPROCESS pReSchedProc = NULL); + + /** Moves the specified process to the end of the dispatch queue, so it can again in the current tick */ void giveWay(PPROCESS pReSchedProc = NULL); + + /** Continously makes a given process wait for another process to finish or event to signal. */ void waitForSingleObject(CORO_PARAM, int pid, uint32 duration, bool *expired = NULL); + + /** Continously makes a given process wait for given prcesses to finished or events to be set */ void waitForMultipleObjects(CORO_PARAM, int nCount, uint32 *pidList, bool bWaitAll, uint32 duration, bool *expired = NULL); - void sleep(CORO_PARAM, uint32 duration); + /** Make the active process sleep for the given duration in milliseconds */ + void sleep(CORO_PARAM, uint32 duration); + + /** Creates a new process. */ PROCESS *createProcess(uint32 pid, CORO_ADDR coroAddr, const void *pParam, int sizeParam); uint32 createProcess(CORO_ADDR coroAddr, const void *pParam, int sizeParam); uint32 createProcess(CORO_ADDR coroAddr, const void *pParam); + + /** Kills the specified process. */ void killProcess(PROCESS *pKillProc); + /** Returns a pointer to the currently running process. */ PROCESS *getCurrentProcess(); + + /** Returns the process identifier of the specified process. */ int getCurrentPID() const; + + /** Kills any process matching the specified PID. The current process cannot be killed. */ int killMatchingProcess(uint32 pidKill, int pidMask = -1); + /** Set pointer to a function to be called by killProcess() */ void setResourceCallback(VFPTRPP pFunc); /* Event methods */ + /** Creates a new event (semaphore) object */ uint32 createEvent(bool bManualReset, bool bInitialState); + + /** Destroys the given event */ void closeEvent(uint32 pidEvent); + + /** Sets the event */ void setEvent(uint32 pidEvent); + + /** Resets the event */ void resetEvent(uint32 pidEvent); + + /** Temporarily sets a given event to true, allowing other waiting processes to fire */ void pulseEvent(uint32 pidEvent); }; -- cgit v1.2.3 From aa7c44a070ac6b33411749b66014f80a953b70c5 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 29 May 2012 14:16:31 +0200 Subject: GOB: Hook up the PE cursors to v7 loadCursor Addy Junior / Adibou2 now shows proper cursors. Thanks to clone2727 for the constant nagging. :P --- engines/gob/draw.cpp | 14 ++++++ engines/gob/draw.h | 7 +++ engines/gob/draw_v2.cpp | 39 ++++++++++----- engines/gob/inter.h | 10 +++- engines/gob/inter_v7.cpp | 125 +++++++++++++++++++++++++++++++++++++++++------ engines/gob/surface.cpp | 12 +++++ engines/gob/surface.h | 1 + engines/gob/video.cpp | 5 +- 8 files changed, 182 insertions(+), 31 deletions(-) diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index 4b659f51de..545c790fb8 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -117,6 +117,13 @@ Draw::Draw(GobEngine *vm) : _vm(vm) { _cursorAnimDelays[i] = 0; } + _cursorPalettes = 0; + _cursorKeyColors = 0; + _cursorPaletteStarts = 0; + _cursorPaletteCounts = 0; + _cursorHotspotsX = 0; + _cursorHotspotsY = 0; + _palLoadData1[0] = 0; _palLoadData1[1] = 17; _palLoadData1[2] = 34; @@ -134,6 +141,13 @@ Draw::Draw(GobEngine *vm) : _vm(vm) { } Draw::~Draw() { + delete[] _cursorPalettes; + delete[] _cursorKeyColors; + delete[] _cursorPaletteStarts; + delete[] _cursorPaletteCounts; + delete[] _cursorHotspotsX; + delete[] _cursorHotspotsY; + for (int i = 0; i < kFontCount; i++) delete _fonts[i]; } diff --git a/engines/gob/draw.h b/engines/gob/draw.h index 393822c33a..2d2c7fd0e7 100644 --- a/engines/gob/draw.h +++ b/engines/gob/draw.h @@ -145,6 +145,13 @@ public: int8 _cursorAnimHigh[40]; int8 _cursorAnimDelays[40]; + byte *_cursorPalettes; + byte *_cursorKeyColors; + uint16 *_cursorPaletteStarts; + uint16 *_cursorPaletteCounts; + int32 *_cursorHotspotsX; + int32 *_cursorHotspotsY; + int16 _palLoadData1[4]; int16 _palLoadData2[4]; diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 78702f2ec9..cf82df9c71 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -83,7 +83,7 @@ void Draw_v2::blitCursor() { void Draw_v2::animateCursor(int16 cursor) { int16 cursorIndex = cursor; int16 newX = 0, newY = 0; - uint16 hotspotX = 0, hotspotY = 0; + uint16 hotspotX, hotspotY; _showCursor |= 1; @@ -133,27 +133,42 @@ void Draw_v2::animateCursor(int16 cursor) { } // '------ - newX = _vm->_global->_inter_mouseX; - newY = _vm->_global->_inter_mouseY; + hotspotX = 0; + hotspotY = 0; + if (_cursorHotspotXVar != -1) { - newX -= hotspotX = (uint16) VAR(_cursorIndex + _cursorHotspotXVar); - newY -= hotspotY = (uint16) VAR(_cursorIndex + _cursorHotspotYVar); + hotspotX = (uint16) VAR(_cursorIndex + _cursorHotspotXVar); + hotspotY = (uint16) VAR(_cursorIndex + _cursorHotspotYVar); } else if (_cursorHotspotX != -1) { - newX -= hotspotX = _cursorHotspotX; - newY -= hotspotY = _cursorHotspotY; + hotspotX = _cursorHotspotX; + hotspotY = _cursorHotspotY; + } else if (_cursorHotspotsX != 0) { + hotspotX = _cursorHotspotsX[_cursorIndex]; + hotspotY = _cursorHotspotsY[_cursorIndex]; } + newX = _vm->_global->_inter_mouseX - hotspotX; + newY = _vm->_global->_inter_mouseY - hotspotY; + _scummvmCursor->clear(); _scummvmCursor->blit(*_cursorSprites, cursorIndex * _cursorWidth, 0, (cursorIndex + 1) * _cursorWidth - 1, _cursorHeight - 1, 0, 0); - if ((_vm->getGameType() != kGameTypeAdibou2) && - (_vm->getGameType() != kGameTypeAdi2) && - (_vm->getGameType() != kGameTypeAdi4)) - CursorMan.replaceCursor(_scummvmCursor->getData(), - _cursorWidth, _cursorHeight, hotspotX, hotspotY, 0, 1, &_vm->getPixelFormat()); + uint32 keyColor = 0; + if (_cursorKeyColors) + keyColor = _cursorKeyColors[cursorIndex]; + + CursorMan.replaceCursor(_scummvmCursor->getData(), + _cursorWidth, _cursorHeight, hotspotX, hotspotY, keyColor, 1, &_vm->getPixelFormat()); + + if (_cursorPalettes) { + CursorMan.replaceCursorPalette(_cursorPalettes + (cursorIndex * 256 * 3), + _cursorPaletteStarts[cursorIndex], _cursorPaletteCounts[cursorIndex]); + CursorMan.disableCursorPalette(false); + } else + CursorMan.disableCursorPalette(true); if (_frontSurface != _backSurface) { if (!_noInvalidated) { diff --git a/engines/gob/inter.h b/engines/gob/inter.h index c79b6e2260..ded016543e 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -31,6 +31,10 @@ #include "gob/iniconfig.h" #include "gob/databases.h" +namespace Common { + class PEResources; +} + namespace Gob { class Cheater_Geisha; @@ -648,7 +652,7 @@ private: class Inter_v7 : public Inter_Playtoons { public: Inter_v7(GobEngine *vm); - virtual ~Inter_v7() {} + virtual ~Inter_v7(); protected: virtual void setupOpcodesDraw(); @@ -684,7 +688,11 @@ private: INIConfig _inis; Databases _databases; + Common::PEResources *_cursors; + Common::String findFile(const Common::String &mask); + + bool loadCursorFile(); }; } // End of namespace Gob diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp index 81547f7362..71e4ac07ad 100644 --- a/engines/gob/inter_v7.cpp +++ b/engines/gob/inter_v7.cpp @@ -22,8 +22,11 @@ #include "common/endian.h" #include "common/archive.h" +#include "common/winexe.h" +#include "common/winexe_pe.h" #include "graphics/cursorman.h" +#include "graphics/wincursor.h" #include "gob/gob.h" #include "gob/global.h" @@ -42,7 +45,11 @@ namespace Gob { #define OPCODEFUNC(i, x) _opcodesFunc[i]._OPCODEFUNC(OPCODEVER, x) #define OPCODEGOB(i, x) _opcodesGob[i]._OPCODEGOB(OPCODEVER, x) -Inter_v7::Inter_v7(GobEngine *vm) : Inter_Playtoons(vm) { +Inter_v7::Inter_v7(GobEngine *vm) : Inter_Playtoons(vm), _cursors(0) { +} + +Inter_v7::~Inter_v7() { + delete _cursors; } void Inter_v7::setupOpcodesDraw() { @@ -88,25 +95,100 @@ void Inter_v7::o7_draw0x0C() { void Inter_v7::o7_loadCursor() { int16 cursorIndex = _vm->_game->_script->readValExpr(); - Common::String cursorFile = _vm->_game->_script->evalString(); + Common::String cursorName = _vm->_game->_script->evalString(); + + // Clear the cursor sprite at that index + _vm->_draw->_cursorSprites->fillRect(cursorIndex * _vm->_draw->_cursorWidth, 0, + cursorIndex * _vm->_draw->_cursorWidth + _vm->_draw->_cursorWidth - 1, + _vm->_draw->_cursorHeight - 1, 0); + + Graphics::WinCursorGroup *cursorGroup = 0; + Graphics::Cursor *defaultCursor = 0; + + // Load the cursor file and cursor group + if (loadCursorFile()) + cursorGroup = Graphics::WinCursorGroup::createCursorGroup(*_cursors, Common::WinResourceID(cursorName)); + + // If the requested cursor does not exist, create a default one + const Graphics::Cursor *cursor = 0; + if (!cursorGroup || cursorGroup->cursors.empty() || !cursorGroup->cursors[0].cursor) { + defaultCursor = Graphics::makeDefaultWinCursor(); - warning("Addy Stub: Load cursor \"%s\" to %d", cursorFile.c_str(), cursorIndex); + cursor = defaultCursor; + } else + cursor = cursorGroup->cursors[0].cursor; - byte cursor[9]; - byte palette[6]; + // Cursor sprite dimensions mismatch, recreate the cursor sprites + if ((cursor->getWidth() > _vm->_draw->_cursorWidth ) || + (cursor->getHeight() > _vm->_draw->_cursorHeight) || + (_vm->_draw->_cursorSprites->getWidth() < ((cursorIndex + 1) * _vm->_draw->_cursorWidth)) || + !_vm->_draw->_cursorPalettes) { - cursor[0] = 0; cursor[1] = 0; cursor[2] = 0; - cursor[3] = 0; cursor[4] = 1; cursor[5] = 0; - cursor[6] = 0; cursor[7] = 0; cursor[8] = 0; + const int count = cursorIndex + 1; - palette[0] = 0; palette[1] = 0; palette[2] = 0; - palette[3] = 255; palette[4] = 255; palette[5] = 255; + _vm->_draw->freeSprite(Draw::kCursorSurface); + _vm->_draw->_cursorSprites.reset(); + _vm->_draw->_cursorSpritesBack.reset(); + _vm->_draw->_scummvmCursor.reset(); - CursorMan.pushCursorPalette(palette, 0, 2); - CursorMan.disableCursorPalette(false); - CursorMan.replaceCursor(cursor, 3, 3, 1, 1, 255); + _vm->_draw->_cursorWidth = MAX(cursor->getWidth() , _vm->_draw->_cursorWidth); + _vm->_draw->_cursorHeight = MAX(cursor->getHeight(), _vm->_draw->_cursorHeight); - CursorMan.showMouse(true); + _vm->_draw->_transparentCursor = 1; + + _vm->_draw->initSpriteSurf(Draw::kCursorSurface, _vm->_draw->_cursorWidth * count, + _vm->_draw->_cursorHeight, 2); + + _vm->_draw->_cursorSpritesBack = _vm->_draw->_spritesArray[Draw::kCursorSurface]; + _vm->_draw->_cursorSprites = _vm->_draw->_cursorSpritesBack; + + _vm->_draw->_scummvmCursor = + _vm->_video->initSurfDesc(_vm->_draw->_cursorWidth, _vm->_draw->_cursorHeight, SCUMMVM_CURSOR); + + for (int i = 0; i < 40; i++) { + _vm->_draw->_cursorAnimLow[i] = -1; + _vm->_draw->_cursorAnimDelays[i] = 0; + _vm->_draw->_cursorAnimHigh[i] = 0; + } + _vm->_draw->_cursorAnimLow[1] = 0; + + delete[] _vm->_draw->_cursorPalettes; + delete[] _vm->_draw->_cursorKeyColors; + delete[] _vm->_draw->_cursorPaletteStarts; + delete[] _vm->_draw->_cursorPaletteCounts; + delete[] _vm->_draw->_cursorHotspotsX; + delete[] _vm->_draw->_cursorHotspotsY; + + _vm->_draw->_cursorPalettes = new byte[256 * 3 * count]; + _vm->_draw->_cursorKeyColors = new byte[count]; + _vm->_draw->_cursorPaletteStarts = new uint16[count]; + _vm->_draw->_cursorPaletteCounts = new uint16[count]; + _vm->_draw->_cursorHotspotsX = new int32[count]; + _vm->_draw->_cursorHotspotsY = new int32[count]; + + memset(_vm->_draw->_cursorPalettes , 0, count * 256 * 3); + memset(_vm->_draw->_cursorKeyColors , 0, count * sizeof(byte)); + memset(_vm->_draw->_cursorPaletteStarts, 0, count * sizeof(uint16)); + memset(_vm->_draw->_cursorPaletteCounts, 0, count * sizeof(uint16)); + memset(_vm->_draw->_cursorHotspotsX , 0, count * sizeof(int32)); + memset(_vm->_draw->_cursorHotspotsY , 0, count * sizeof(int32)); + } + + Surface cursorSurf(cursor->getWidth(), cursor->getHeight(), 1, cursor->getSurface()); + + _vm->_draw->_cursorSprites->blit(cursorSurf, 0, 0, cursor->getWidth() - 1, cursor->getHeight() - 1, + cursorIndex * _vm->_draw->_cursorWidth, 0, 0); + + memcpy(_vm->_draw->_cursorPalettes + cursorIndex * 256 * 3, cursor->getPalette(), cursor->getPaletteCount() * 3); + + _vm->_draw->_cursorKeyColors [cursorIndex] = cursor->getKeyColor(); + _vm->_draw->_cursorPaletteStarts[cursorIndex] = cursor->getPaletteStartIndex(); + _vm->_draw->_cursorPaletteCounts[cursorIndex] = cursor->getPaletteCount(); + _vm->_draw->_cursorHotspotsX [cursorIndex] = cursor->getHotspotX(); + _vm->_draw->_cursorHotspotsY [cursorIndex] = cursor->getHotspotY(); + + delete cursorGroup; + delete defaultCursor; } void Inter_v7::o7_displayWarning() { @@ -529,4 +611,19 @@ Common::String Inter_v7::findFile(const Common::String &mask) { return files.front()->getName(); } +bool Inter_v7::loadCursorFile() { + if (_cursors) + return true; + + _cursors = new Common::PEResources(); + + if (_cursors->loadFromEXE("cursor32.dll")) + return true; + + delete _cursors; + _cursors = 0; + + return false; +} + } // End of namespace Gob diff --git a/engines/gob/surface.cpp b/engines/gob/surface.cpp index e294209ed7..3af19f891d 100644 --- a/engines/gob/surface.cpp +++ b/engines/gob/surface.cpp @@ -280,6 +280,18 @@ Surface::Surface(uint16 width, uint16 height, uint8 bpp, byte *vidMem) : _ownVidMem = false; } +Surface::Surface(uint16 width, uint16 height, uint8 bpp, const byte *vidMem) : + _width(width), _height(height), _bpp(bpp), _vidMem(0) { + + assert((_width > 0) && (_height > 0)); + assert((_bpp == 1) || (_bpp == 2)); + + _vidMem = new byte[_bpp * _width * _height]; + _ownVidMem = true; + + memcpy(_vidMem, vidMem, _bpp * _width * _height); +} + Surface::~Surface() { if (_ownVidMem) delete[] _vidMem; diff --git a/engines/gob/surface.h b/engines/gob/surface.h index 866e63490f..5376603801 100644 --- a/engines/gob/surface.h +++ b/engines/gob/surface.h @@ -122,6 +122,7 @@ private: class Surface { public: Surface(uint16 width, uint16 height, uint8 bpp, byte *vidMem = 0); + Surface(uint16 width, uint16 height, uint8 bpp, const byte *vidMem); ~Surface(); uint16 getWidth () const; diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index ee5ff4abff..c865b2b40e 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -226,10 +226,7 @@ void Video::setSize(bool defaultTo1XScaler) { void Video::retrace(bool mouse) { if (mouse) - if ((_vm->getGameType() != kGameTypeAdibou2) && - (_vm->getGameType() != kGameTypeAdi2) && - (_vm->getGameType() != kGameTypeAdi4)) - CursorMan.showMouse((_vm->_draw->_showCursor & 2) != 0); + CursorMan.showMouse((_vm->_draw->_showCursor & 2) != 0); if (_vm->_global->_primarySurfDesc) { int screenX = _screenDeltaX; -- cgit v1.2.3 From be25e31a0a2da25c586a16a16ba9d55053f21524 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 29 May 2012 17:12:06 +0200 Subject: GOB: Fix v7 cursors drawn by the scripts When the cursor name is "", then that cursor is drawn by the scripts instead of loaded from cursor32.dll. That cursor does not have its own palette then. Fixes the cursors in the "paint" game in Adibou2. --- engines/gob/draw.cpp | 3 ++ engines/gob/draw.h | 2 + engines/gob/draw_v2.cpp | 4 +- engines/gob/inter.h | 1 + engines/gob/inter_v7.cpp | 133 +++++++++++++++++++++++++++-------------------- 5 files changed, 84 insertions(+), 59 deletions(-) diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index 545c790fb8..fe59b11f76 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -117,6 +117,8 @@ Draw::Draw(GobEngine *vm) : _vm(vm) { _cursorAnimDelays[i] = 0; } + _cursorCount = 0; + _doCursorPalettes = 0; _cursorPalettes = 0; _cursorKeyColors = 0; _cursorPaletteStarts = 0; @@ -142,6 +144,7 @@ Draw::Draw(GobEngine *vm) : _vm(vm) { Draw::~Draw() { delete[] _cursorPalettes; + delete[] _doCursorPalettes; delete[] _cursorKeyColors; delete[] _cursorPaletteStarts; delete[] _cursorPaletteCounts; diff --git a/engines/gob/draw.h b/engines/gob/draw.h index 2d2c7fd0e7..24c5550ea5 100644 --- a/engines/gob/draw.h +++ b/engines/gob/draw.h @@ -145,6 +145,8 @@ public: int8 _cursorAnimHigh[40]; int8 _cursorAnimDelays[40]; + int32 _cursorCount; + bool *_doCursorPalettes; byte *_cursorPalettes; byte *_cursorKeyColors; uint16 *_cursorPaletteStarts; diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index cf82df9c71..ab9a90de8f 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -157,13 +157,13 @@ void Draw_v2::animateCursor(int16 cursor) { _cursorHeight - 1, 0, 0); uint32 keyColor = 0; - if (_cursorKeyColors) + if (_doCursorPalettes && _cursorKeyColors && _doCursorPalettes[cursorIndex]) keyColor = _cursorKeyColors[cursorIndex]; CursorMan.replaceCursor(_scummvmCursor->getData(), _cursorWidth, _cursorHeight, hotspotX, hotspotY, keyColor, 1, &_vm->getPixelFormat()); - if (_cursorPalettes) { + if (_doCursorPalettes && _doCursorPalettes[cursorIndex]) { CursorMan.replaceCursorPalette(_cursorPalettes + (cursorIndex * 256 * 3), _cursorPaletteStarts[cursorIndex], _cursorPaletteCounts[cursorIndex]); CursorMan.disableCursorPalette(false); diff --git a/engines/gob/inter.h b/engines/gob/inter.h index ded016543e..1e6f74db4e 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -693,6 +693,7 @@ private: Common::String findFile(const Common::String &mask); bool loadCursorFile(); + void resizeCursors(int16 width, int16 height, int16 count, bool transparency); }; } // End of namespace Gob diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp index 71e4ac07ad..6cf69ed9df 100644 --- a/engines/gob/inter_v7.cpp +++ b/engines/gob/inter_v7.cpp @@ -93,6 +93,70 @@ void Inter_v7::o7_draw0x0C() { WRITE_VAR(17, 0); } +void Inter_v7::resizeCursors(int16 width, int16 height, int16 count, bool transparency) { + if (width <= 0) + width = _vm->_draw->_cursorWidth; + if (height <= 0) + height = _vm->_draw->_cursorHeight; + + width = MAX(width , _vm->_draw->_cursorWidth); + height = MAX(height, _vm->_draw->_cursorHeight); + + _vm->_draw->_transparentCursor = transparency; + + // Cursors sprite already big enough + if ((_vm->_draw->_cursorWidth >= width) && (_vm->_draw->_cursorHeight >= height) && + (_vm->_draw->_cursorCount >= count)) + return; + + _vm->_draw->_cursorCount = count; + _vm->_draw->_cursorWidth = width; + _vm->_draw->_cursorHeight = height; + + _vm->_draw->freeSprite(Draw::kCursorSurface); + _vm->_draw->_cursorSprites.reset(); + _vm->_draw->_cursorSpritesBack.reset(); + _vm->_draw->_scummvmCursor.reset(); + + _vm->_draw->initSpriteSurf(Draw::kCursorSurface, width * count, height, 2); + + _vm->_draw->_cursorSpritesBack = _vm->_draw->_spritesArray[Draw::kCursorSurface]; + _vm->_draw->_cursorSprites = _vm->_draw->_cursorSpritesBack; + + _vm->_draw->_scummvmCursor = _vm->_video->initSurfDesc(width, height, SCUMMVM_CURSOR); + + for (int i = 0; i < 40; i++) { + _vm->_draw->_cursorAnimLow[i] = -1; + _vm->_draw->_cursorAnimDelays[i] = 0; + _vm->_draw->_cursorAnimHigh[i] = 0; + } + _vm->_draw->_cursorAnimLow[1] = 0; + + delete[] _vm->_draw->_doCursorPalettes; + delete[] _vm->_draw->_cursorPalettes; + delete[] _vm->_draw->_cursorKeyColors; + delete[] _vm->_draw->_cursorPaletteStarts; + delete[] _vm->_draw->_cursorPaletteCounts; + delete[] _vm->_draw->_cursorHotspotsX; + delete[] _vm->_draw->_cursorHotspotsY; + + _vm->_draw->_cursorPalettes = new byte[256 * 3 * count]; + _vm->_draw->_doCursorPalettes = new bool[count]; + _vm->_draw->_cursorKeyColors = new byte[count]; + _vm->_draw->_cursorPaletteStarts = new uint16[count]; + _vm->_draw->_cursorPaletteCounts = new uint16[count]; + _vm->_draw->_cursorHotspotsX = new int32[count]; + _vm->_draw->_cursorHotspotsY = new int32[count]; + + memset(_vm->_draw->_cursorPalettes , 0, count * 256 * 3); + memset(_vm->_draw->_doCursorPalettes , 0, count * sizeof(bool)); + memset(_vm->_draw->_cursorKeyColors , 0, count * sizeof(byte)); + memset(_vm->_draw->_cursorPaletteStarts, 0, count * sizeof(uint16)); + memset(_vm->_draw->_cursorPaletteCounts, 0, count * sizeof(uint16)); + memset(_vm->_draw->_cursorHotspotsX , 0, count * sizeof(int32)); + memset(_vm->_draw->_cursorHotspotsY , 0, count * sizeof(int32)); +} + void Inter_v7::o7_loadCursor() { int16 cursorIndex = _vm->_game->_script->readValExpr(); Common::String cursorName = _vm->_game->_script->evalString(); @@ -102,6 +166,14 @@ void Inter_v7::o7_loadCursor() { cursorIndex * _vm->_draw->_cursorWidth + _vm->_draw->_cursorWidth - 1, _vm->_draw->_cursorHeight - 1, 0); + // If the cursor name is empty, that cursor will be drawn by the scripts + if (cursorName.empty()) { + // Make sure the cursors sprite is big enough and set to non-extern palette + resizeCursors(-1, -1, cursorIndex + 1, true); + _vm->_draw->_doCursorPalettes[cursorIndex] = false; + return; + } + Graphics::WinCursorGroup *cursorGroup = 0; Graphics::Cursor *defaultCursor = 0; @@ -118,69 +190,16 @@ void Inter_v7::o7_loadCursor() { } else cursor = cursorGroup->cursors[0].cursor; - // Cursor sprite dimensions mismatch, recreate the cursor sprites - if ((cursor->getWidth() > _vm->_draw->_cursorWidth ) || - (cursor->getHeight() > _vm->_draw->_cursorHeight) || - (_vm->_draw->_cursorSprites->getWidth() < ((cursorIndex + 1) * _vm->_draw->_cursorWidth)) || - !_vm->_draw->_cursorPalettes) { - - const int count = cursorIndex + 1; - - _vm->_draw->freeSprite(Draw::kCursorSurface); - _vm->_draw->_cursorSprites.reset(); - _vm->_draw->_cursorSpritesBack.reset(); - _vm->_draw->_scummvmCursor.reset(); - - _vm->_draw->_cursorWidth = MAX(cursor->getWidth() , _vm->_draw->_cursorWidth); - _vm->_draw->_cursorHeight = MAX(cursor->getHeight(), _vm->_draw->_cursorHeight); - - _vm->_draw->_transparentCursor = 1; - - _vm->_draw->initSpriteSurf(Draw::kCursorSurface, _vm->_draw->_cursorWidth * count, - _vm->_draw->_cursorHeight, 2); - - _vm->_draw->_cursorSpritesBack = _vm->_draw->_spritesArray[Draw::kCursorSurface]; - _vm->_draw->_cursorSprites = _vm->_draw->_cursorSpritesBack; - - _vm->_draw->_scummvmCursor = - _vm->_video->initSurfDesc(_vm->_draw->_cursorWidth, _vm->_draw->_cursorHeight, SCUMMVM_CURSOR); - - for (int i = 0; i < 40; i++) { - _vm->_draw->_cursorAnimLow[i] = -1; - _vm->_draw->_cursorAnimDelays[i] = 0; - _vm->_draw->_cursorAnimHigh[i] = 0; - } - _vm->_draw->_cursorAnimLow[1] = 0; - - delete[] _vm->_draw->_cursorPalettes; - delete[] _vm->_draw->_cursorKeyColors; - delete[] _vm->_draw->_cursorPaletteStarts; - delete[] _vm->_draw->_cursorPaletteCounts; - delete[] _vm->_draw->_cursorHotspotsX; - delete[] _vm->_draw->_cursorHotspotsY; - - _vm->_draw->_cursorPalettes = new byte[256 * 3 * count]; - _vm->_draw->_cursorKeyColors = new byte[count]; - _vm->_draw->_cursorPaletteStarts = new uint16[count]; - _vm->_draw->_cursorPaletteCounts = new uint16[count]; - _vm->_draw->_cursorHotspotsX = new int32[count]; - _vm->_draw->_cursorHotspotsY = new int32[count]; - - memset(_vm->_draw->_cursorPalettes , 0, count * 256 * 3); - memset(_vm->_draw->_cursorKeyColors , 0, count * sizeof(byte)); - memset(_vm->_draw->_cursorPaletteStarts, 0, count * sizeof(uint16)); - memset(_vm->_draw->_cursorPaletteCounts, 0, count * sizeof(uint16)); - memset(_vm->_draw->_cursorHotspotsX , 0, count * sizeof(int32)); - memset(_vm->_draw->_cursorHotspotsY , 0, count * sizeof(int32)); - } + // Make sure the cursors sprite it big enough + resizeCursors(cursor->getWidth(), cursor->getHeight(), cursorIndex + 1, true); Surface cursorSurf(cursor->getWidth(), cursor->getHeight(), 1, cursor->getSurface()); - _vm->_draw->_cursorSprites->blit(cursorSurf, 0, 0, cursor->getWidth() - 1, cursor->getHeight() - 1, - cursorIndex * _vm->_draw->_cursorWidth, 0, 0); + _vm->_draw->_cursorSprites->blit(cursorSurf, cursorIndex * _vm->_draw->_cursorWidth, 0); memcpy(_vm->_draw->_cursorPalettes + cursorIndex * 256 * 3, cursor->getPalette(), cursor->getPaletteCount() * 3); + _vm->_draw->_doCursorPalettes [cursorIndex] = true; _vm->_draw->_cursorKeyColors [cursorIndex] = cursor->getKeyColor(); _vm->_draw->_cursorPaletteStarts[cursorIndex] = cursor->getPaletteStartIndex(); _vm->_draw->_cursorPaletteCounts[cursorIndex] = cursor->getPaletteCount(); -- cgit v1.2.3 From 96ae10c7491aed3258912ef91c8787b7975376ad Mon Sep 17 00:00:00 2001 From: D G Turner Date: Wed, 30 May 2012 03:53:52 +0100 Subject: DREAMWEB: Removal of dead code and cleanup in sound code. The removed blocks in the playChannel functions referencing index are non-functional leftovers from more complex logic in the original code structure, and thus can be safely removed. --- engines/dreamweb/sound.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index b3d5db9e0d..fcbcb9d0a0 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -40,7 +40,6 @@ bool DreamWebEngine::loadSpeech(byte type1, int idx1, byte type2, int idx2) { return result; } - void DreamWebEngine::volumeAdjust() { if (_volumeDirection == 0) return; @@ -57,9 +56,6 @@ void DreamWebEngine::volumeAdjust() { void DreamWebEngine::playChannel0(uint8 index, uint8 repeat) { debug(1, "playChannel0(index:%d, repeat:%d)", index, repeat); _channel0Playing = index; - if (index >= 12) - index -= 12; - _channel0Repeat = repeat; } @@ -68,14 +64,12 @@ void DreamWebEngine::playChannel1(uint8 index) { return; _channel1Playing = index; - if (index >= 12) - index -= 12; } void DreamWebEngine::cancelCh0() { debug(1, "cancelCh0()"); - _channel0Repeat = 0; _channel0Playing = 255; + _channel0Repeat = 0; stopSound(0); } @@ -104,11 +98,6 @@ void DreamWebEngine::loadRoomsSample() { loadSounds(1, sampleSuffix.c_str()); } -} // End of namespace DreamWeb - - -namespace DreamWeb { - void DreamWebEngine::playSound(uint8 channel, uint8 id, uint8 loops) { debug(1, "playSound(%u, %u, %u)", channel, id, loops); -- cgit v1.2.3 From ae31469a9aa7163c4ed42414fbb2c6c95e2d7e8a Mon Sep 17 00:00:00 2001 From: D G Turner Date: Wed, 30 May 2012 04:23:34 +0100 Subject: DREAMWEB: Replaced vsync() function with waitForVSync(). As a call to waitForVSync() was the only contents of vsync(), there should be no functional change. --- engines/dreamweb/dreamweb.h | 1 - engines/dreamweb/keypad.cpp | 12 ++++++------ engines/dreamweb/monitor.cpp | 6 +++--- engines/dreamweb/newplace.cpp | 2 +- engines/dreamweb/object.cpp | 2 +- engines/dreamweb/print.cpp | 16 ++++++++-------- engines/dreamweb/saveload.cpp | 8 ++++---- engines/dreamweb/stubs.cpp | 22 +++++++++++----------- engines/dreamweb/talk.cpp | 4 ++-- engines/dreamweb/titles.cpp | 18 +++++++++--------- engines/dreamweb/vgafades.cpp | 2 +- engines/dreamweb/vgagrafx.cpp | 4 ---- 12 files changed, 46 insertions(+), 51 deletions(-) diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index 6744b53ebc..468a1f58a8 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -1135,7 +1135,6 @@ public: void frameOutBh(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y); void frameOutFx(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y); void doShake(); - void vSync(); void setMode(); void showPCX(const Common::String &suffix); void showFrameInternal(const uint8 *pSrc, uint16 x, uint16 y, uint8 effectsFlag, uint8 width, uint8 height); diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp index 2ab5835997..002588cb70 100644 --- a/engines/dreamweb/keypad.cpp +++ b/engines/dreamweb/keypad.cpp @@ -62,11 +62,11 @@ void DreamWebEngine::enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8 d readMouse(); showKeypad(); showPointer(); - vSync(); + waitForVSync(); if (_pressCount == 0) { _pressed = 255; _graphicPress = 255; - vSync(); + waitForVSync(); } else --_pressCount; @@ -252,7 +252,7 @@ void DreamWebEngine::useMenu() { showMenu(); readMouse(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); dumpMenu(); dumpTextLine(); @@ -311,7 +311,7 @@ void DreamWebEngine::viewFolder() { delPointer(); readMouse(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); dumpTextLine(); checkFolderCoords(); @@ -508,7 +508,7 @@ void DreamWebEngine::enterSymbol() { showSymbol(); readMouse(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); dumpTextLine(); dumpSymbol(); @@ -743,7 +743,7 @@ void DreamWebEngine::useDiary() { readMouse(); showDiaryKeys(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); dumpDiaryKeys(); dumpTextLine(); diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 25435ae0e9..4c66e7a599 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -202,7 +202,7 @@ void DreamWebEngine::input() { _cursLocY = _monAdY; while (true) { printCurs(); - vSync(); + waitForVSync(); delCurs(); readKey(); if (_quitRequested) @@ -318,8 +318,8 @@ void DreamWebEngine::accessLightOff() { void DreamWebEngine::randomAccess(uint16 count) { for (uint16 i = 0; i < count; ++i) { - vSync(); - vSync(); + waitForVSync(); + waitForVSync(); uint16 v = _rnd.getRandomNumber(15); if (v < 10) accessLightOff(); diff --git a/engines/dreamweb/newplace.cpp b/engines/dreamweb/newplace.cpp index 529c45bd4a..ab6537422a 100644 --- a/engines/dreamweb/newplace.cpp +++ b/engines/dreamweb/newplace.cpp @@ -65,7 +65,7 @@ void DreamWebEngine::selectLocation() { delPointer(); readMouse(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); dumpTextLine(); diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 443366561a..b42591ef91 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -147,7 +147,7 @@ void DreamWebEngine::examineOb(bool examineAgain) { readMouse(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); dumpTextLine(); delPointer(); diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp index a6b93a5590..a96d1f9d58 100644 --- a/engines/dreamweb/print.cpp +++ b/engines/dreamweb/print.cpp @@ -197,7 +197,7 @@ uint8 DreamWebEngine::kernChars(uint8 firstChar, uint8 secondChar, uint8 width) uint16 DreamWebEngine::waitFrames() { readMouse(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); delPointer(); return _mouseButton; @@ -231,7 +231,7 @@ const char *DreamWebEngine::monPrint(const char *string) { _cursLocY = _monAdY; _mainTimer = 1; printCurs(); - vSync(); + waitForVSync(); lockMon(); delCurs(); } while (--count); @@ -261,9 +261,9 @@ void DreamWebEngine::rollEndCreditsGameWon() { // then move it up one pixel until we shifted it by a complete // line of text. for (int j = 0; j < linespacing; ++j) { - vSync(); + waitForVSync(); multiPut(_mapStore, 75, 20, 160, 160); - vSync(); + waitForVSync(); // Output up to 18 lines of text uint16 y = 10 - j; @@ -273,7 +273,7 @@ void DreamWebEngine::rollEndCreditsGameWon() { y += linespacing; } - vSync(); + waitForVSync(); multiDump(75, 20, 160, 160); } @@ -300,9 +300,9 @@ void DreamWebEngine::rollEndCreditsGameLost() { // then move it up one pixel until we shifted it by a complete // line of text. for (int j = 0; j < linespacing; ++j) { - vSync(); + waitForVSync(); multiPut(_mapStore, 25, 20, 160, 160); - vSync(); + waitForVSync(); // Output up to 18 lines of text uint16 y = 10 - j; @@ -312,7 +312,7 @@ void DreamWebEngine::rollEndCreditsGameLost() { y += linespacing; } - vSync(); + waitForVSync(); multiDump(25, 20, 160, 160); if (_lastHardKey == 1) diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp index d30bf754de..8ed17c9348 100644 --- a/engines/dreamweb/saveload.cpp +++ b/engines/dreamweb/saveload.cpp @@ -136,7 +136,7 @@ void DreamWebEngine::doLoad(int savegameId) { delPointer(); readMouse(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); dumpTextLine(); RectWithCallback loadlist[] = { @@ -227,7 +227,7 @@ void DreamWebEngine::saveGame() { checkInput(); readMouse(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); dumpTextLine(); @@ -348,7 +348,7 @@ void DreamWebEngine::doSaveLoad() { readMouse(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); dumpTextLine(); delPointer(); @@ -429,7 +429,7 @@ void DreamWebEngine::discOps() { delPointer(); readMouse(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); dumpTextLine(); checkCoords(discOpsList); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 750dafe7b4..e453fced5f 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -754,7 +754,7 @@ void DreamWebEngine::screenUpdate() { showPointer(); if ((_vars._watchingTime == 0) && (_newLocation != 0xff)) return; - vSync(); + waitForVSync(); uint16 mouseState = 0; mouseState |= readMouseState(); dumpPointer(); @@ -769,7 +769,7 @@ void DreamWebEngine::screenUpdate() { showPointer(); if (_wonGame) return; - vSync(); + waitForVSync(); mouseState |= readMouseState(); dumpPointer(); @@ -781,7 +781,7 @@ void DreamWebEngine::screenUpdate() { afterNewRoom(); showPointer(); - vSync(); + waitForVSync(); mouseState |= readMouseState(); dumpPointer(); @@ -790,7 +790,7 @@ void DreamWebEngine::screenUpdate() { delPointer(); showPointer(); - vSync(); + waitForVSync(); _oldButton = _mouseButton; mouseState |= readMouseState(); _mouseButton = mouseState; @@ -871,7 +871,7 @@ void DreamWebEngine::loadTextSegment(TextFile &file, Common::File &inFile, unsig void DreamWebEngine::hangOnCurs(uint16 frameCount) { for (uint16 i = 0; i < frameCount; ++i) { printCurs(); - vSync(); + waitForVSync(); delCurs(); } } @@ -1634,7 +1634,7 @@ bool DreamWebEngine::checkIfSet(uint8 x, uint8 y) { void DreamWebEngine::hangOn(uint16 frameCount) { while (frameCount) { - vSync(); + waitForVSync(); --frameCount; if (_quitRequested) break; @@ -1647,7 +1647,7 @@ void DreamWebEngine::hangOnW(uint16 frameCount) { readMouse(); animPointer(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); --frameCount; if (_quitRequested) @@ -1665,7 +1665,7 @@ void DreamWebEngine::hangOnP(uint16 count) { readMouse(); animPointer(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); count *= 3; @@ -1674,7 +1674,7 @@ void DreamWebEngine::hangOnP(uint16 count) { readMouse(); animPointer(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); if (_quitRequested) break; @@ -2132,7 +2132,7 @@ void DreamWebEngine::workToScreenM() { animPointer(); readMouse(); showPointer(); - vSync(); + waitForVSync(); workToScreen(); delPointer(); } @@ -2607,7 +2607,7 @@ void DreamWebEngine::decide() { readMouse(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); dumpTextLine(); delPointer(); diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp index 0f59cad895..26eafdcb51 100644 --- a/engines/dreamweb/talk.cpp +++ b/engines/dreamweb/talk.cpp @@ -52,7 +52,7 @@ void DreamWebEngine::talk() { readMouse(); animPointer(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); dumpTextLine(); _getBack = 0; @@ -211,7 +211,7 @@ bool DreamWebEngine::hangOnPQ() { readMouse(); animPointer(); showPointer(); - vSync(); + waitForVSync(); dumpPointer(); dumpTextLine(); checkCoords(quitList); diff --git a/engines/dreamweb/titles.cpp b/engines/dreamweb/titles.cpp index f7486ce687..3ed31fe13a 100644 --- a/engines/dreamweb/titles.cpp +++ b/engines/dreamweb/titles.cpp @@ -134,7 +134,7 @@ void DreamWebEngine::bibleQuote() { void DreamWebEngine::hangOne(uint16 delay) { do { - vSync(); + waitForVSync(); if (_lastHardKey == 1) return; // "hangonearly" } while (--delay); @@ -200,13 +200,13 @@ void DreamWebEngine::runIntroSeq() { _getBack = 0; do { - vSync(); + waitForVSync(); if (_lastHardKey == 1) break; spriteUpdate(); - vSync(); + waitForVSync(); if (_lastHardKey == 1) break; @@ -216,14 +216,14 @@ void DreamWebEngine::runIntroSeq() { reelsOnScreen(); afterIntroRoom(); useTimedText(); - vSync(); + waitForVSync(); if (_lastHardKey == 1) break; dumpMap(); dumpTimedText(); - vSync(); + waitForVSync(); if (_lastHardKey == 1) break; @@ -247,18 +247,18 @@ void DreamWebEngine::runEndSeq() { _getBack = 0; do { - vSync(); + waitForVSync(); spriteUpdate(); - vSync(); + waitForVSync(); delEverything(); printSprites(); reelsOnScreen(); afterIntroRoom(); useTimedText(); - vSync(); + waitForVSync(); dumpMap(); dumpTimedText(); - vSync(); + waitForVSync(); } while (_getBack != 1 && !_quitRequested); } diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp index e8999ab18c..6f9fd5f53c 100644 --- a/engines/dreamweb/vgafades.cpp +++ b/engines/dreamweb/vgafades.cpp @@ -52,7 +52,7 @@ void DreamWebEngine::fadeDOS() { return; // FIXME later waitForVSync(); - //processEvents will be called from vsync + //processEvents will be called from waitForVSync uint8 *dst = _startPal; getPalette(dst, 0, 64); for (int fade = 0; fade < 64; ++fade) { diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp index a66f156a1d..ec306c4924 100644 --- a/engines/dreamweb/vgagrafx.cpp +++ b/engines/dreamweb/vgagrafx.cpp @@ -144,10 +144,6 @@ void DreamWebEngine::doShake() { setShakePos(offset >= 0 ? offset : -offset); } -void DreamWebEngine::vSync() { - waitForVSync(); -} - void DreamWebEngine::setMode() { waitForVSync(); initGraphics(320, 200, false); -- cgit v1.2.3 From de904c59c4bde9060efeb36896f7105f4e286e27 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 31 May 2012 00:05:05 +1000 Subject: SCUMM: Fix global script 255 never been resumed by runScriptNested. Thanks to clone2727 for tracking down the problem in baseball2003. --- engines/scumm/script.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp index 39420ee974..a26c64e690 100644 --- a/engines/scumm/script.cpp +++ b/engines/scumm/script.cpp @@ -318,7 +318,7 @@ void ScummEngine::runScriptNested(int script) { nest = &vm.nest[vm.numNestedScripts]; if (_currentScript == 0xFF) { - nest->number = 0xFF; + nest->number = 0; nest->where = 0xFF; } else { // Store information about the currently running script @@ -338,7 +338,7 @@ void ScummEngine::runScriptNested(int script) { if (vm.numNestedScripts != 0) vm.numNestedScripts--; - if (nest->number != 0xFF) { + if (nest->number) { // Try to resume the script which called us, if its status has not changed // since it invoked us. In particular, we only resume it if it hasn't been // stopped in the meantime, and if it did not already move on. -- cgit v1.2.3 From 403b646c13f0729a32c21f89a2e9284d84df34cf Mon Sep 17 00:00:00 2001 From: Lars Skovlund Date: Wed, 30 May 2012 18:43:39 +0200 Subject: SCI32: Case-insensitive configuration getters --- engines/sci/engine/kmisc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index 2be9432521..2911af97df 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -371,6 +371,8 @@ reg_t kGetConfig(EngineState *s, int argc, reg_t *argv) { // Anything below that makes Phantasmagoria awfully sluggish, so we're // setting everything to 500, which makes the game playable. + setting.toLowercase(); + if (setting == "videospeed") { s->_segMan->strcpy(data, "500"); } else if (setting == "cpu") { @@ -388,10 +390,12 @@ reg_t kGetConfig(EngineState *s, int argc, reg_t *argv) { reg_t kGetSierraProfileInt(EngineState *s, int argc, reg_t *argv) { Common::String category = s->_segMan->getString(argv[0]); // always "config" + category.toLowercase(); if (category != "config") error("GetSierraProfileInt: category isn't 'config', it's '%s'", category.c_str()); Common::String setting = s->_segMan->getString(argv[1]); + setting.toLowercase(); if (setting != "videospeed") error("GetSierraProfileInt: setting isn't 'videospeed', it's '%s'", setting.c_str()); -- cgit v1.2.3 From 29ebb2823dfe5fff95c47a2847f11e11bde95fd1 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 31 May 2012 08:06:59 +1000 Subject: COMMON: Fix comment typo in coroutine comments --- common/coroutines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/coroutines.h b/common/coroutines.h index 5daec4b426..abc114e0cf 100644 --- a/common/coroutines.h +++ b/common/coroutines.h @@ -64,7 +64,7 @@ typedef CoroBaseContext *CoroContext; /** This is a special constant that can be temporarily used as a parameter to call coroutine-ised - * from methods from methods that haven't yet been converted to being a coroutine, so code at least + * methods from code that haven't yet been converted to being a coroutine, so code at least * compiles correctly. Be aware, though, that an error will occur if a coroutine that was passed * the nullContext tries to sleep or yield control. */ -- cgit v1.2.3 From 4aec92e5e9d00d7a9b38d893682823777e088256 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 31 May 2012 11:39:54 +1000 Subject: SCUMM: Backyard Baseball 2003 uses a unique variable for the subtitle setting, fixes changing subtitles via ScummVM. --- engines/scumm/detection_tables.h | 2 +- engines/scumm/scumm.cpp | 7 +++++++ engines/scumm/scumm.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 34ec6b6543..452a6f0960 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -382,7 +382,7 @@ static const GameSettings gameVariantsTable[] = { {"pjgames", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, // Added the use of bink videos - {"Baseball2003", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, + {"Baseball2003", 0, 0, GID_BASEBALL2003, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, {"basketball", 0, 0, GID_BASKETBALL, 6, 100, MDT_NONE, GF_USE_KEY| GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, {"football2002", 0, 0, GID_FOOTBALL, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, {"Soccer2004", 0, 0, GID_SOCCER2004, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index fc46f88df4..d0f46f3e56 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1917,6 +1917,13 @@ void ScummEngine::syncSoundSettings() { if (VAR_CHARINC != 0xFF) VAR(VAR_CHARINC) = _defaultTalkDelay; } + + // Backyard Baseball 2003 uses a unique subtitle variable, + // rather than VAR_SUBTITLES + if (_game.id == GID_BASEBALL2003) { + _scummVars[632] = ConfMan.getBool("subtitles"); + } + } void ScummEngine::setTalkSpeed(int talkspeed) { diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index cacf8c214e..8c0070b5f5 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -245,6 +245,7 @@ enum ScummGameId { GID_SOCCERMLS, GID_SOCCER2004, GID_BASEBALL2001, + GID_BASEBALL2003, GID_BASKETBALL, GID_MOONBASE, GID_HECUP // CUP demos -- cgit v1.2.3 From 8860a83bf8a3dc02394a210b29aa6871928a7914 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 30 May 2012 23:31:16 -0400 Subject: NEWS: Backyard Baseball 2003 is now supported --- NEWS | 1 + README | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 4b3203dc66..ed98cdc83f 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ For a more comprehensive changelog of the latest experimental code, see: 1.5.0 (????-??-??) New Games: + - Added support for Backyard Baseball 2003. - Added support for Blue Force. - Added support for Darby the Dragon. - Added support for Dreamweb. diff --git a/README b/README index 8afe8c9bc8..81b28830c2 100644 --- a/README +++ b/README @@ -272,6 +272,7 @@ Other Games: SCUMM Games by Humongous Entertainment: Backyard Baseball [baseball] Backyard Baseball 2001 [baseball2001] + Backyard Baseball 2003 [baseball2003] Backyard Football [football] Big Thinkers First Grade [thinker1] Big Thinkers Kindergarten [thinkerk] @@ -342,7 +343,6 @@ these at your own risk, and please do not file bug reports about them. If you want the latest updates on game compatibility, visit our web site and view the compatibility chart. - Backyard Baseball 2003 [baseball2003] Backyard Football 2002 [football2002] Backyard Soccer [soccer] Backyard Soccer MLS [soccermls] -- cgit v1.2.3 From 628cfa3d47fb7ebad8dd26cb59f485e5c70dacb5 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 31 May 2012 05:16:10 +0100 Subject: DREAMWEB: Objectify Sound functions & data into DreamWebSound class. This change should have no functional change, but makes the sound code more decoupled, modular and readable, prior to attempting a fix for bug #3528164 - "DREAMWEB: missing sound effects/music cues during main title". --- engines/dreamweb/dreamweb.cpp | 23 +++-------- engines/dreamweb/dreamweb.h | 43 ++------------------ engines/dreamweb/keypad.cpp | 11 +++--- engines/dreamweb/monitor.cpp | 7 ++-- engines/dreamweb/newplace.cpp | 3 +- engines/dreamweb/people.cpp | 16 ++++---- engines/dreamweb/print.cpp | 8 ++-- engines/dreamweb/rain.cpp | 7 ++-- engines/dreamweb/saveload.cpp | 4 +- engines/dreamweb/sound.cpp | 90 ++++++++++++++++++++++++++---------------- engines/dreamweb/sound.h | 91 +++++++++++++++++++++++++++++++++++++++++++ engines/dreamweb/sprite.cpp | 26 ++++++------- engines/dreamweb/stubs.cpp | 42 ++++++++++---------- engines/dreamweb/talk.cpp | 28 +++++++------ engines/dreamweb/titles.cpp | 50 +++++++++++------------- engines/dreamweb/use.cpp | 33 ++++++++-------- engines/dreamweb/vgafades.cpp | 3 +- 17 files changed, 276 insertions(+), 209 deletions(-) create mode 100644 engines/dreamweb/sound.h diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index 11e8e3f8cc..0ca98d5a7b 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -35,6 +35,7 @@ #include "graphics/palette.h" #include "graphics/surface.h" +#include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" namespace DreamWeb { @@ -46,21 +47,15 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam _roomDesc(kNumRoomTexts), _freeDesc(kNumFreeTexts), _personText(kNumPersonTexts) { - // Setup mixer - _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); - _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); - _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); - _vSyncInterrupt = false; _console = 0; + _sound = 0; DebugMan.addDebugChannel(kDebugAnimation, "Animation", "Animation Debug Flag"); DebugMan.addDebugChannel(kDebugSaveLoad, "SaveLoad", "Track Save/Load Function"); _speed = 1; _turbo = false; _oldMouseState = 0; - _channel0 = 0; - _channel1 = 0; _datafilePrefix = "DREAMWEB."; _speechDirName = "SPEECH"; @@ -85,16 +80,6 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam _openChangeSize = kInventx+(4*kItempicsize); _quitRequested = false; - _currentSample = 0xff; - _channel0Playing = 0; - _channel0Repeat = 0; - _channel1Playing = 0xff; - - _volume = 0; - _volumeTo = 0; - _volumeDirection = 0; - _volumeCount = 0; - _speechLoaded = false; _backdropBlocks = 0; @@ -246,6 +231,7 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam DreamWebEngine::~DreamWebEngine() { DebugMan.clearAllDebugChannels(); delete _console; + delete _sound; } static void vSyncInterrupt(void *refCon) { @@ -286,7 +272,7 @@ void DreamWebEngine::processEvents() { return; } - soundHandler(); + _sound->soundHandler(); Common::Event event; int softKey, hardKey; while (_eventMan->pollEvent(event)) { @@ -382,6 +368,7 @@ void DreamWebEngine::processEvents() { Common::Error DreamWebEngine::run() { syncSoundSettings(); _console = new DreamWebConsole(this); + _sound = new DreamWebSound(this); ConfMan.registerDefault("originalsaveload", "false"); ConfMan.registerDefault("bright_palette", true); diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index 468a1f58a8..48d44c0380 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -99,10 +99,12 @@ enum { }; struct DreamWebGameDescription; +class DreamWebSound; class DreamWebEngine : public Engine { private: DreamWebConsole *_console; + DreamWebSound *_sound; bool _vSyncInterrupt; protected: @@ -142,7 +144,6 @@ public: void quit(); - void loadSounds(uint bank, const Common::String &suffix); bool loadSpeech(const Common::String &filename); void enableSavingOrLoading(bool enable = true) { _enableSavingOrLoading = enable; } @@ -151,15 +152,12 @@ public: uint8 modifyChar(uint8 c) const; Common::String modifyFileName(const char *); - void stopSound(uint8 channel); - const Common::String& getDatafilePrefix() { return _datafilePrefix; }; + const Common::String& getSpeechDirName() { return _speechDirName; }; private: void keyPressed(uint16 ascii); void setSpeed(uint speed); - void soundHandler(); - void playSound(uint8 channel, uint8 id, uint8 loops); const DreamWebGameDescription *_gameDescription; Common::RandomSource _rnd; @@ -171,22 +169,6 @@ private: uint _oldMouseState; bool _enableSavingOrLoading; - struct Sample { - uint offset; - uint size; - Sample(): offset(), size() {} - }; - - struct SoundData { - Common::Array samples; - Common::Array data; - }; - SoundData _soundData[2]; - Common::Array _speechData; - - Audio::SoundHandle _channelHandle[2]; - uint8 _channel0, _channel1; - protected: GameVars _vars; // saved variables @@ -327,16 +309,6 @@ public: // sound related uint8 _roomsSample; - uint8 _currentSample; - uint8 _channel0Playing; - uint8 _channel0Repeat; - uint8 _channel1Playing; - - uint8 _volume; - uint8 _volumeTo; - int8 _volumeDirection; - uint8 _volumeCount; - bool _speechLoaded; // misc variables @@ -715,15 +687,6 @@ public: void showSaveOps(); void showLoadOps(); - // from sound.cpp - bool loadSpeech(byte type1, int idx1, byte type2, int idx2); - void volumeAdjust(); - void cancelCh0(); - void cancelCh1(); - void loadRoomsSample(); - void playChannel0(uint8 index, uint8 repeat); - void playChannel1(uint8 index); - // from sprite.cpp void printSprites(); void printASprite(const Sprite *sprite); diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp index 002588cb70..3580f8ad52 100644 --- a/engines/dreamweb/keypad.cpp +++ b/engines/dreamweb/keypad.cpp @@ -20,6 +20,7 @@ * */ +#include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" namespace DreamWeb { @@ -85,7 +86,7 @@ void DreamWebEngine::enterCode(uint8 digit0, uint8 digit1, uint8 digit2, uint8 d if (_pressed == 11) { if (isItRight(digit0, digit1, digit2, digit3)) _vars._lockStatus = 0; - playChannel1(11); + _sound->playChannel1(11); _lightCount = 120; _pressPointer = 0; } @@ -180,7 +181,7 @@ void DreamWebEngine::buttonPress(uint8 buttonId) { _graphicPress = buttonId + 21; _pressCount = 40; if (buttonId != 11) - playChannel1(10); + _sound->playChannel1(10); } } @@ -532,7 +533,7 @@ void DreamWebEngine::enterSymbol() { _symbolGraphics.clear(); restoreReels(); workToScreenM(); - playChannel1(13); + _sound->playChannel1(13); } else { removeSetObject(46); placeSetObject(43); @@ -820,7 +821,7 @@ void DreamWebEngine::diaryKeyP() { _pressCount) return; // notkeyp - playChannel1(16); + _sound->playChannel1(16); _pressCount = 12; _pressed = 'P'; _diaryPage--; @@ -837,7 +838,7 @@ void DreamWebEngine::diaryKeyN() { _pressCount) return; // notkeyn - playChannel1(16); + _sound->playChannel1(16); _pressCount = 12; _pressed = 'N'; _diaryPage++; diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 4c66e7a599..4e9d8eecc1 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -20,6 +20,7 @@ * */ +#include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" namespace DreamWeb { @@ -97,7 +98,7 @@ void DreamWebEngine::useMon() { _textFile3.clear(); _getBack = 1; - playChannel1(26); + _sound->playChannel1(26); _manIsOffScreen = 0; restoreAll(); redrawMainScrn(); @@ -180,7 +181,7 @@ void DreamWebEngine::monitorLogo() { printLogo(); //fadeUpMon(); // FIXME: Commented out in ASM printLogo(); - playChannel1(26); + _sound->playChannel1(26); randomAccess(20); } else { printLogo(); @@ -288,7 +289,7 @@ void DreamWebEngine::scrollMonitor() { printLogo(); printUnderMonitor(); workToScreen(); - playChannel1(25); + _sound->playChannel1(25); } void DreamWebEngine::showCurrentFile() { diff --git a/engines/dreamweb/newplace.cpp b/engines/dreamweb/newplace.cpp index ab6537422a..5b4b0260f5 100644 --- a/engines/dreamweb/newplace.cpp +++ b/engines/dreamweb/newplace.cpp @@ -20,6 +20,7 @@ * */ +#include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" namespace DreamWeb { @@ -55,7 +56,7 @@ void DreamWebEngine::selectLocation() { _pointerFrame = 0; showPointer(); workToScreen(); - playChannel0(9, 255); + _sound->playChannel0(9, 255); _newLocation = 255; while (_newLocation == 255) { diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index dfb5c62618..36a756a49b 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -20,6 +20,7 @@ * */ +#include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" namespace DreamWeb { @@ -149,7 +150,7 @@ void DreamWebEngine::madmanText() { if (hasSpeech()) { if (_speechCount > 15) return; - if (_channel1Playing != 255) + if (_sound->isChannel1Playing()) return; origCount = _speechCount; ++_speechCount; @@ -250,7 +251,7 @@ bool DreamWebEngine::checkSpeed(ReelRoutine &routine) { void DreamWebEngine::sparkyDrip(ReelRoutine &routine) { if (checkSpeed(routine)) - playChannel0(14, 0); + _sound->playChannel0(14, 0); } void DreamWebEngine::genericPerson(ReelRoutine &routine) { @@ -430,7 +431,7 @@ void DreamWebEngine::drinker(ReelRoutine &routine) { void DreamWebEngine::alleyBarkSound(ReelRoutine &routine) { uint16 prevReelPointer = routine.reelPointer() - 1; if (prevReelPointer == 0) { - playChannel1(14); + _sound->playChannel1(14); routine.setReelPointer(1000); } else { routine.setReelPointer(prevReelPointer); @@ -523,7 +524,7 @@ void DreamWebEngine::gates(ReelRoutine &routine) { if (checkSpeed(routine)) { uint16 nextReelPointer = routine.reelPointer() + 1; if (nextReelPointer == 116) - playChannel1(17); + _sound->playChannel1(17); if (nextReelPointer >= 110) routine.period = 2; if (nextReelPointer == 120) { @@ -579,12 +580,12 @@ void DreamWebEngine::carParkDrip(ReelRoutine &routine) { if (!checkSpeed(routine)) return; // cantdrip2 - playChannel1(14); + _sound->playChannel1(14); } void DreamWebEngine::foghornSound(ReelRoutine &routine) { if (randomNumber() == 198) - playChannel1(13); + _sound->playChannel1(13); } void DreamWebEngine::train(ReelRoutine &routine) { @@ -1027,8 +1028,7 @@ void DreamWebEngine::endGameSeq(ReelRoutine &routine) { fadeScreenDownHalf(); } else if (nextReelPointer == 324) { fadeScreenDowns(); - _volumeTo = 7; - _volumeDirection = 1; + _sound->volumeChange(7, 1); } if (nextReelPointer == 340) diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp index a96d1f9d58..3a2c45e07b 100644 --- a/engines/dreamweb/print.cpp +++ b/engines/dreamweb/print.cpp @@ -20,6 +20,7 @@ * */ +#include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" namespace DreamWeb { @@ -246,10 +247,9 @@ const char *DreamWebEngine::monPrint(const char *string) { } void DreamWebEngine::rollEndCreditsGameWon() { - playChannel0(16, 255); - _volume = 7; - _volumeTo = 0; - _volumeDirection = -1; + _sound->playChannel0(16, 255); + _sound->volumeSet(7); + _sound->volumeChange(0, -1); multiGet(_mapStore, 75, 20, 160, 160); diff --git a/engines/dreamweb/rain.cpp b/engines/dreamweb/rain.cpp index 7db4744cbf..8e42e0c161 100644 --- a/engines/dreamweb/rain.cpp +++ b/engines/dreamweb/rain.cpp @@ -20,6 +20,7 @@ * */ +#include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" namespace DreamWeb { @@ -50,7 +51,7 @@ void DreamWebEngine::showRain() { } } - if (_channel1Playing != 255) + if (_sound->isChannel1Playing()) return; if (_realLocation == 2 && _vars._beenMugged != 1) return; @@ -61,11 +62,11 @@ void DreamWebEngine::showRain() { return; uint8 soundIndex; - if (_channel0Playing != 6) + if (_sound->getChannel0Playing() != 6) soundIndex = 4; else soundIndex = 7; - playChannel1(soundIndex); + _sound->playChannel1(soundIndex); } uint8 DreamWebEngine::getBlockOfPixel(uint8 x, uint8 y) { diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp index 8ed17c9348..c8fb537fec 100644 --- a/engines/dreamweb/saveload.cpp +++ b/engines/dreamweb/saveload.cpp @@ -20,7 +20,9 @@ * */ +#include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" + #include "engines/metaengine.h" #include "graphics/thumbnail.h" #include "gui/saveload.h" @@ -181,7 +183,7 @@ void DreamWebEngine::doLoad(int savegameId) { _saveGraphics.clear(); startLoading(g_madeUpRoomDat); - loadRoomsSample(); + _sound->loadRoomsSample(_roomsSample); _roomLoaded = 1; _newLocation = 255; clearSprites(); diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index fcbcb9d0a0..83ddebc552 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -20,27 +20,52 @@ * */ -#include "dreamweb/dreamweb.h" - -#include "audio/mixer.h" #include "audio/decoders/raw.h" - #include "common/config-manager.h" +#include "common/debug.h" +#include "common/file.h" + +#include "dreamweb/dreamweb.h" +#include "dreamweb/sound.h" namespace DreamWeb { -bool DreamWebEngine::loadSpeech(byte type1, int idx1, byte type2, int idx2) { +DreamWebSound::DreamWebSound(DreamWebEngine *vm) : _vm(vm) { + _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); + _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); + _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); + + _channel0 = 0; + _channel1 = 0; + + _currentSample = 0xff; + _channel0Playing = 0; + _channel0Repeat = 0; + _channel1Playing = 255; + + _volume = 0; + _volumeTo = 0; + _volumeDirection = 0; + _volumeCount = 0; +} + +DreamWebSound::~DreamWebSound() { +} + +bool DreamWebSound::loadSpeech(byte type1, int idx1, byte type2, int idx2) { cancelCh1(); Common::String name = Common::String::format("%c%02d%c%04d.RAW", type1, idx1, type2, idx2); - //debug("name = %s", name.c_str()); - bool result = loadSpeech(name); + debug(2, "loadSpeech() name:%s", name.c_str()); + return loadSpeech(name); +} - _speechLoaded = result; - return result; +void DreamWebSound::volumeChange(uint8 value, int8 direction) { + _volumeTo = value; + _volumeDirection = direction; } -void DreamWebEngine::volumeAdjust() { +void DreamWebSound::volumeAdjust() { if (_volumeDirection == 0) return; if (_volume != _volumeTo) { @@ -53,34 +78,33 @@ void DreamWebEngine::volumeAdjust() { } } -void DreamWebEngine::playChannel0(uint8 index, uint8 repeat) { +void DreamWebSound::playChannel0(uint8 index, uint8 repeat) { debug(1, "playChannel0(index:%d, repeat:%d)", index, repeat); _channel0Playing = index; _channel0Repeat = repeat; } -void DreamWebEngine::playChannel1(uint8 index) { +void DreamWebSound::playChannel1(uint8 index) { if (_channel1Playing == 7) return; _channel1Playing = index; } -void DreamWebEngine::cancelCh0() { +void DreamWebSound::cancelCh0() { debug(1, "cancelCh0()"); _channel0Playing = 255; _channel0Repeat = 0; stopSound(0); } -void DreamWebEngine::cancelCh1() { +void DreamWebSound::cancelCh1() { _channel1Playing = 255; stopSound(1); } -void DreamWebEngine::loadRoomsSample() { - debug(1, "loadRoomsSample() _roomsSample:%d", _roomsSample); - uint8 sample = _roomsSample; +void DreamWebSound::loadRoomsSample(uint8 sample) { + debug(1, "loadRoomsSample(sample:%d)", sample); if (sample == 255 || _currentSample == sample) return; // loaded already @@ -98,7 +122,7 @@ void DreamWebEngine::loadRoomsSample() { loadSounds(1, sampleSuffix.c_str()); } -void DreamWebEngine::playSound(uint8 channel, uint8 id, uint8 loops) { +void DreamWebSound::playSound(uint8 channel, uint8 id, uint8 loops) { debug(1, "playSound(%u, %u, %u)", channel, id, loops); int bank = 0; @@ -149,27 +173,27 @@ void DreamWebEngine::playSound(uint8 channel, uint8 id, uint8 loops) { } else stream = raw; - if (_mixer->isSoundHandleActive(_channelHandle[channel])) - _mixer->stopHandle(_channelHandle[channel]); - _mixer->playStream(type, &_channelHandle[channel], stream); + if (_vm->_mixer->isSoundHandleActive(_channelHandle[channel])) + _vm->_mixer->stopHandle(_channelHandle[channel]); + _vm->_mixer->playStream(type, &_channelHandle[channel], stream); } -void DreamWebEngine::stopSound(uint8 channel) { +void DreamWebSound::stopSound(uint8 channel) { debug(1, "stopSound(%u)", channel); assert(channel == 0 || channel == 1); - _mixer->stopHandle(_channelHandle[channel]); + _vm->_mixer->stopHandle(_channelHandle[channel]); if (channel == 0) _channel0 = 0; else _channel1 = 0; } -bool DreamWebEngine::loadSpeech(const Common::String &filename) { - if (!hasSpeech()) +bool DreamWebSound::loadSpeech(const Common::String &filename) { + if (!_vm->hasSpeech()) return false; Common::File file; - if (!file.open(_speechDirName + "/" + filename)) + if (!file.open(_vm->getSpeechDirName() + "/" + filename)) return false; debug(1, "loadSpeech(%s)", filename.c_str()); @@ -181,13 +205,13 @@ bool DreamWebEngine::loadSpeech(const Common::String &filename) { return true; } -void DreamWebEngine::soundHandler() { +void DreamWebSound::soundHandler() { static uint8 volumeOld = 0, channel0Old = 0, channel0PlayingOld = 0; if (_volume != volumeOld || _channel0 != channel0Old || _channel0Playing != channel0PlayingOld) debug(1, "soundHandler() _volume: %d _channel0: %d _channel0Playing: %d", _volume, _channel0, _channel0Playing); volumeOld = _volume, channel0Old = _channel0, channel0PlayingOld = _channel0Playing; - _subtitles = ConfMan.getBool("subtitles"); + _vm->_subtitles = ConfMan.getBool("subtitles"); volumeAdjust(); uint volume = _volume; @@ -204,7 +228,7 @@ void DreamWebEngine::soundHandler() { if (volume >= 8) volume = 7; volume = (8 - volume) * Audio::Mixer::kMaxChannelVolume / 8; - _mixer->setChannelVolume(_channelHandle[0], volume); + _vm->_mixer->setChannelVolume(_channelHandle[0], volume); uint8 ch0 = _channel0Playing; if (ch0 == 255) @@ -226,20 +250,20 @@ void DreamWebEngine::soundHandler() { playSound(1, ch1, 1); } } - if (!_mixer->isSoundHandleActive(_channelHandle[0])) { + if (!_vm->_mixer->isSoundHandleActive(_channelHandle[0])) { if (_channel0Playing != 255 && _channel0 != 0) debug(1, "!_mixer->isSoundHandleActive _channelHandle[0] _channel0Playing:%d _channel0:%d", _channel0Playing, _channel0); _channel0Playing = 255; _channel0 = 0; } - if (!_mixer->isSoundHandleActive(_channelHandle[1])) { + if (!_vm->_mixer->isSoundHandleActive(_channelHandle[1])) { _channel1Playing = 255; _channel1 = 0; } } -void DreamWebEngine::loadSounds(uint bank, const Common::String &suffix) { - Common::String filename = getDatafilePrefix() + suffix; +void DreamWebSound::loadSounds(uint bank, const Common::String &suffix) { + Common::String filename = _vm->getDatafilePrefix() + suffix; debug(1, "loadSounds(%u, %s)", bank, filename.c_str()); Common::File file; if (!file.open(filename)) { diff --git a/engines/dreamweb/sound.h b/engines/dreamweb/sound.h new file mode 100644 index 0000000000..62def157e7 --- /dev/null +++ b/engines/dreamweb/sound.h @@ -0,0 +1,91 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef DREAMWEB_SOUND_H +#define DREAMWEB_SOUND_H + +#include "common/array.h" +#include "common/str.h" +#include "audio/mixer.h" + +namespace DreamWeb { + +class DreamWebEngine; + +class DreamWebSound { +public: + DreamWebSound(DreamWebEngine *vm); + ~DreamWebSound(); + + bool loadSpeech(byte type1, int idx1, byte type2, int idx2); + void volumeSet(uint8 value) { _volume = value; } + void volumeChange(uint8 value, int8 direction); + void playChannel0(uint8 index, uint8 repeat); + void playChannel1(uint8 index); + uint8 getChannel0Playing() { return _channel0Playing; } + bool isChannel1Playing() { return _channel1Playing != 255; } + void cancelCh0(); + void cancelCh1(); + void loadRoomsSample(uint8 sample); + void soundHandler(); + void loadSounds(uint bank, const Common::String &suffix); + +private: + DreamWebEngine *_vm; + + struct Sample { + uint offset; + uint size; + Sample(): offset(), size() {} + }; + + struct SoundData { + Common::Array samples; + Common::Array data; + }; + + SoundData _soundData[2]; + Common::Array _speechData; + + Audio::SoundHandle _channelHandle[2]; + + uint8 _channel0, _channel1; + + uint8 _currentSample; + uint8 _channel0Playing; + uint8 _channel0Repeat; + uint8 _channel1Playing; + + uint8 _volume; + uint8 _volumeTo; + int8 _volumeDirection; + uint8 _volumeCount; + + void volumeAdjust(); + void playSound(uint8 channel, uint8 id, uint8 loops); + void stopSound(uint8 channel); + bool loadSpeech(const Common::String &filename); +}; + +} // End of namespace DreamWeb + +#endif diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index 3df324abe1..5b6cf6a6ac 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -20,6 +20,7 @@ * */ +#include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" namespace DreamWeb { @@ -298,7 +299,7 @@ void DreamWebEngine::doDoor(Sprite *sprite, SetObject *objData, Common::Rect che soundIndex = 13; else soundIndex = 0; - playChannel1(soundIndex); + _sound->playChannel1(soundIndex); } if (objData->frames[sprite->animFrame] == 255) --sprite->animFrame; @@ -315,7 +316,7 @@ void DreamWebEngine::doDoor(Sprite *sprite, SetObject *objData, Common::Rect che soundIndex = 13; else soundIndex = 1; - playChannel1(soundIndex); + _sound->playChannel1(soundIndex); } if (sprite->animFrame != 0) --sprite->animFrame; @@ -346,7 +347,7 @@ void DreamWebEngine::lockedDoorway(Sprite *sprite, SetObject *objData) { if (openDoor) { if (sprite->animFrame == 1) { - playChannel1(0); + _sound->playChannel1(0); } if (sprite->animFrame == 6) @@ -367,7 +368,7 @@ void DreamWebEngine::lockedDoorway(Sprite *sprite, SetObject *objData) { // shut door if (sprite->animFrame == 5) { - playChannel1(1); + _sound->playChannel1(1); } if (sprite->animFrame != 0) @@ -505,7 +506,7 @@ void DreamWebEngine::intro1Text() { if (_introCount != 2 && _introCount != 4 && _introCount != 6) return; - if (hasSpeech() && _channel1Playing != 255) { + if (hasSpeech() && _sound->isChannel1Playing()) { _introCount--; } else { if (_introCount == 2) @@ -578,7 +579,7 @@ void DreamWebEngine::textForEnd() { } void DreamWebEngine::textForMonkHelper(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount) { - if (hasSpeech() && _channel1Playing != 255) + if (hasSpeech() && _sound->isChannel1Playing()) _introCount--; else setupTimedTemp(textIndex, voiceIndex, x, y, countToTimed, timeCount); @@ -614,8 +615,7 @@ void DreamWebEngine::textForMonk() { else if (_introCount == 53) { fadeScreenDowns(); if (hasSpeech()) { - _volumeTo = 7; - _volumeDirection = 1; + _sound->volumeChange(7, 1); } } } @@ -905,14 +905,14 @@ void DreamWebEngine::soundOnReels(uint16 reelPointer) { continue; _lastSoundReel = r->_reelPointer; if (r->_sample < 64) { - playChannel1(r->_sample); + _sound->playChannel1(r->_sample); return; } if (r->_sample < 128) { - playChannel0(r->_sample & 63, 0); + _sound->playChannel0(r->_sample & 63, 0); return; } - playChannel0(r->_sample & 63, 255); + _sound->playChannel0(r->_sample & 63, 255); } if (_lastSoundReel != reelPointer) @@ -955,9 +955,9 @@ void DreamWebEngine::getRidOfReels() { void DreamWebEngine::liftNoise(uint8 index) { if (_realLocation == 5 || _realLocation == 21) - playChannel1(13); // hiss noise + _sound->playChannel1(13); // hiss noise else - playChannel1(index); + _sound->playChannel1(index); } void DreamWebEngine::checkForExit(Sprite *sprite) { diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index e453fced5f..3aa8e6da74 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -20,6 +20,7 @@ * */ +#include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" #include "common/config-manager.h" @@ -578,7 +579,7 @@ void DreamWebEngine::dreamweb() { readSetData(); _wonGame = false; - loadSounds(0, "V99"); // basic sample + _sound->loadSounds(0, "V99"); // basic sample bool firstLoop = true; @@ -654,7 +655,7 @@ void DreamWebEngine::dreamweb() { _vars._location = 255; _vars._roomAfterDream = 1; _newLocation = 35; - _volume = 7; + _sound->volumeSet(7); loadRoom(); clearSprites(); initMan(); @@ -664,8 +665,7 @@ void DreamWebEngine::dreamweb() { initialInv(); _lastFlag = 32; startup1(); - _volumeTo = 0; - _volumeDirection = -1; + _sound->volumeChange(0, -1); _commandType = 255; } @@ -930,7 +930,7 @@ void DreamWebEngine::processTrigger() { void DreamWebEngine::useTimedText() { if (_previousTimedTemp._string) { // TODO: It might be nice to make subtitles wait for the speech - // to finish (_channel1Playing) when we're in speech+subtitles mode, + // to finish (_sound->isChannel1Playing()) when we're in speech+subtitles mode, // instead of waiting the pre-specified amount of time. @@ -967,9 +967,9 @@ void DreamWebEngine::useTimedText() { void DreamWebEngine::setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount) { if (hasSpeech() && voiceIndex != 0) { - if (loadSpeech('T', voiceIndex, 'T', textIndex)) { - playChannel1(50+12); - } + _speechLoaded = _sound->loadSpeech('T', voiceIndex, 'T', textIndex); + if (_speechLoaded) + _sound->playChannel1(50+12); if (_speechLoaded && !_subtitles) return; @@ -1846,7 +1846,7 @@ void DreamWebEngine::loadRoom() { _vars._location = _newLocation; const Room &room = g_roomData[_newLocation]; startLoading(room); - loadRoomsSample(); + _sound->loadRoomsSample(_roomsSample); switchRyanOn(); drawFlags(); @@ -2146,12 +2146,12 @@ void DreamWebEngine::atmospheres() { continue; if (a->_mapX != _mapX || a->_mapY != _mapY) continue; - if (a->_sound != _channel0Playing) { + if (a->_sound != _sound->getChannel0Playing()) { if (_vars._location == 45 && _vars._reelToWatch == 45) continue; // "web" - playChannel0(a->_sound, a->_repeat); + _sound->playChannel0(a->_sound, a->_repeat); // NB: The asm here reads // cmp reallocation,2 @@ -2161,21 +2161,21 @@ void DreamWebEngine::atmospheres() { // I'm interpreting this as if the cmp reallocation is below the jz if (_mapY == 0) { - _volume = 0; // "fullvol" + _sound->volumeSet(0); // "fullvol" return; } if (_realLocation == 2 && _mapX == 22 && _mapY == 10) - _volume = 5; // "louisvol" + _sound->volumeSet(5); // "louisvol" if (hasSpeech() && _realLocation == 14) { if (_mapX == 33) { - _volume = 0; // "ismad2" + _sound->volumeSet(0); // "ismad2" return; } if (_mapX == 22) { - _volume = 5; + _sound->volumeSet(5); return; } @@ -2184,19 +2184,19 @@ void DreamWebEngine::atmospheres() { if (_realLocation == 2) { if (_mapX == 22) { - _volume = 5; // "louisvol" + _sound->volumeSet(5); // "louisvol" return; } if (_mapX == 11) { - _volume = 0; // "fullvol" + _sound->volumeSet(0); // "fullvol" return; } } return; } - cancelCh0(); + _sound->cancelCh0(); } void DreamWebEngine::readKey() { @@ -2642,8 +2642,8 @@ void DreamWebEngine::showGun() { _numToFade = 128; hangOn(200); _roomsSample = 34; - loadRoomsSample(); - _volume = 0; + _sound->loadRoomsSample(_roomsSample); + _sound->volumeSet(0); GraphicsFile graphics; loadGraphicsFile(graphics, "G13"); createPanel2(); @@ -2653,7 +2653,7 @@ void DreamWebEngine::showGun() { graphics.clear(); fadeScreenUp(); hangOn(160); - playChannel0(12, 0); + _sound->playChannel0(12, 0); loadTempText("T83"); rollEndCreditsGameLost(); getRidOfTempText(); diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp index 26eafdcb51..ca99269cc8 100644 --- a/engines/dreamweb/talk.cpp +++ b/engines/dreamweb/talk.cpp @@ -20,6 +20,7 @@ * */ +#include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" namespace DreamWeb { @@ -67,9 +68,8 @@ void DreamWebEngine::talk() { redrawMainScrn(); workToScreenM(); if (_speechLoaded) { - cancelCh1(); - _volumeDirection = -1; - _volumeTo = 0; + _sound->cancelCh1(); + _sound->volumeChange(0, -1); } } @@ -99,12 +99,10 @@ void DreamWebEngine::startTalk() { printDirect(&str, 66, &y, 241, true); if (hasSpeech()) { - _speechLoaded = false; - loadSpeech('R', _realLocation, 'C', 64*(_character & 0x7F)); + _speechLoaded = _sound->loadSpeech('R', _realLocation, 'C', 64*(_character & 0x7F)); if (_speechLoaded) { - _volumeDirection = 1; - _volumeTo = 6; - playChannel1(50 + 12); + _sound->volumeChange(6, 1); + _sound->playChannel1(50 + 12); } } } @@ -155,9 +153,9 @@ void DreamWebEngine::doSomeTalk() { printDirect(str, 164, 64, 144, false); - loadSpeech('R', _realLocation, 'C', (64 * (_character & 0x7F)) + _talkPos); + _speechLoaded = _sound->loadSpeech('R', _realLocation, 'C', (64 * (_character & 0x7F)) + _talkPos); if (_speechLoaded) - playChannel1(62); + _sound->playChannel1(62); _pointerMode = 3; workToScreenM(); @@ -181,9 +179,9 @@ void DreamWebEngine::doSomeTalk() { convIcons(); printDirect(str, 48, 128, 144, false); - loadSpeech('R', _realLocation, 'C', (64 * (_character & 0x7F)) + _talkPos); + _speechLoaded = _sound->loadSpeech('R', _realLocation, 'C', (64 * (_character & 0x7F)) + _talkPos); if (_speechLoaded) - playChannel1(62); + _sound->playChannel1(62); _pointerMode = 3; workToScreenM(); @@ -220,11 +218,11 @@ bool DreamWebEngine::hangOnPQ() { // Quit conversation delPointer(); _pointerMode = 0; - cancelCh1(); + _sound->cancelCh1(); return true; } - if (_speechLoaded && _channel1Playing == 255) { + if (_speechLoaded && !_sound->isChannel1Playing()) { speechFlag++; if (speechFlag == 40) break; @@ -237,7 +235,7 @@ bool DreamWebEngine::hangOnPQ() { } void DreamWebEngine::redes() { - if (_channel1Playing != 255 || _talkMode != 2) { + if (_sound->isChannel1Playing() || _talkMode != 2) { blank(); return; } diff --git a/engines/dreamweb/titles.cpp b/engines/dreamweb/titles.cpp index 3ed31fe13a..fa6b1060fb 100644 --- a/engines/dreamweb/titles.cpp +++ b/engines/dreamweb/titles.cpp @@ -20,6 +20,7 @@ * */ +#include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" #include "engines/util.h" @@ -32,38 +33,36 @@ void DreamWebEngine::endGame() { return; gettingShot(); getRidOfTempText(); - _volumeTo = 7; - _volumeDirection = 1; + _sound->volumeChange(7, 1); hangOn(200); } void DreamWebEngine::monkSpeaking() { _roomsSample = 35; - loadRoomsSample(); + _sound->loadRoomsSample(_roomsSample); GraphicsFile graphics; loadGraphicsFile(graphics, "G15"); clearWork(); showFrame(graphics, 160, 72, 0, 128); // show monk workToScreen(); - _volume = 7; - _volumeDirection = -1; - _volumeTo = hasSpeech() ? 5 : 0; - playChannel0(12, 255); + _sound->volumeSet(7); + _sound->volumeChange(hasSpeech() ? 5 : 0, -1); + _sound->playChannel0(12, 255); fadeScreenUps(); hangOn(300); // TODO: Subtitles+speech mode if (hasSpeech()) { for (int i = 40; i < 48; i++) { - loadSpeech('T', 83, 'T', i); + _speechLoaded = _sound->loadSpeech('T', 83, 'T', i); - playChannel1(50 + 12); + _sound->playChannel1(50 + 12); do { waitForVSync(); if (_quitRequested) return; - } while (_channel1Playing != 255); + } while (_sound->isChannel1Playing()); } } else { for (int i = 40; i <= 44; i++) { @@ -83,8 +82,7 @@ void DreamWebEngine::monkSpeaking() { } } - _volumeDirection = 1; - _volumeTo = 7; + _sound->volumeChange(7, 1); fadeScreenDowns(); hangOn(300); graphics.clear(); @@ -95,8 +93,7 @@ void DreamWebEngine::gettingShot() { clearPalette(); loadIntroRoom(); fadeScreenUps(); - _volumeTo = 0; - _volumeDirection = -1; + _sound->volumeChange(0, -1); runEndSeq(); clearBeforeLoad(); } @@ -127,7 +124,7 @@ void DreamWebEngine::bibleQuote() { return; // "biblequotearly" } - cancelCh0(); + _sound->cancelCh0(); _lastHardKey = 0; } @@ -147,10 +144,9 @@ void DreamWebEngine::intro() { _newLocation = 50; clearPalette(); loadIntroRoom(); - _volume = 7; - _volumeDirection = -1; - _volumeTo = hasSpeech() ? 4 : 0; - playChannel0(12, 255); + _sound->volumeSet(7); + _sound->volumeChange(hasSpeech() ? 4 : 0, -1); + _sound->playChannel0(12, 255); fadeScreenUps(); runIntroSeq(); @@ -286,14 +282,14 @@ void DreamWebEngine::set16ColPalette() { void DreamWebEngine::realCredits() { _roomsSample = 33; - loadRoomsSample(); - _volume = 0; + _sound->loadRoomsSample(_roomsSample); + _sound->volumeSet(0); initGraphics(640, 480, true); hangOn(35); showPCX("I01"); - playChannel0(12, 0); + _sound->playChannel0(12, 0); hangOne(2); @@ -319,7 +315,7 @@ void DreamWebEngine::realCredits() { } showPCX("I02"); - playChannel0(12, 0); + _sound->playChannel0(12, 0); hangOne(2); if (_lastHardKey == 1) { @@ -344,7 +340,7 @@ void DreamWebEngine::realCredits() { } showPCX("I03"); - playChannel0(12, 0); + _sound->playChannel0(12, 0); hangOne(2); if (_lastHardKey == 1) { @@ -369,7 +365,7 @@ void DreamWebEngine::realCredits() { } showPCX("I04"); - playChannel0(12, 0); + _sound->playChannel0(12, 0); hangOne(2); if (_lastHardKey == 1) { @@ -394,7 +390,7 @@ void DreamWebEngine::realCredits() { } showPCX("I05"); - playChannel0(12, 0); + _sound->playChannel0(12, 0); hangOne(2); if (_lastHardKey == 1) { @@ -427,7 +423,7 @@ void DreamWebEngine::realCredits() { return; // "realcreditsearly" } - playChannel0(13, 0); + _sound->playChannel0(13, 0); hangOne(350); if (_lastHardKey == 1) { diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index e59843539f..995eef04cd 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -20,6 +20,7 @@ * */ +#include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" namespace DreamWeb { @@ -201,13 +202,13 @@ void DreamWebEngine::edensCDPlayer() { } void DreamWebEngine::hotelBell() { - playChannel1(12); + _sound->playChannel1(12); showFirstUse(); putBackObStuff(); } void DreamWebEngine::playGuitar() { - playChannel1(14); + _sound->playChannel1(14); showFirstUse(); putBackObStuff(); } @@ -273,13 +274,13 @@ void DreamWebEngine::useHatch() { } void DreamWebEngine::wheelSound() { - playChannel1(17); + _sound->playChannel1(17); showFirstUse(); putBackObStuff(); } void DreamWebEngine::callHotelLift() { - playChannel1(12); + _sound->playChannel1(12); showFirstUse(); _vars._countToOpen = 8; _getBack = 1; @@ -382,7 +383,7 @@ void DreamWebEngine::sitDownInBar() { } void DreamWebEngine::useDryer() { - playChannel1(12); + _sound->playChannel1(12); showFirstUse(); _getBack = 1; } @@ -887,7 +888,7 @@ void DreamWebEngine::usePlate() { if (compare(_withObject, _withType, "SCRW")) { // Unscrew plate - playChannel1(20); + _sound->playChannel1(20); showFirstUse(); placeSetObject(28); placeSetObject(24); @@ -992,7 +993,7 @@ void DreamWebEngine::useCart() { removeSetObject(_command); placeSetObject(_command + 1); _vars._progressPoints++; - playChannel1(17); + _sound->playChannel1(17); showFirstUse(); _getBack = 1; } @@ -1035,7 +1036,7 @@ void DreamWebEngine::openHotelDoor() { if (defaultUseHandler("KEYA")) return; - playChannel1(16); + _sound->playChannel1(16); showFirstUse(); _vars._lockStatus = 0; _getBack = 1; @@ -1045,7 +1046,7 @@ void DreamWebEngine::openHotelDoor2() { if (defaultUseHandler("KEYA")) return; - playChannel1(16); + _sound->playChannel1(16); showFirstUse(); putBackObStuff(); } @@ -1067,7 +1068,7 @@ void DreamWebEngine::usePoolReader() { showSecondUse(); putBackObStuff(); } else { - playChannel1(17); + _sound->playChannel1(17); showFirstUse(); _vars._countToOpen = 6; _getBack = 1; @@ -1088,7 +1089,7 @@ void DreamWebEngine::useCardReader1() { putBackObStuff(); } else { // Get cash - playChannel1(16); + _sound->playChannel1(16); showPuzText(18, 300); _vars._progressPoints++; _vars._card1Money = 12432; @@ -1113,7 +1114,7 @@ void DreamWebEngine::useCardReader2() { showPuzText(22, 300); putBackObStuff(); } else { - playChannel1(18); + _sound->playChannel1(18); showPuzText(19, 300); placeSetObject(94); _vars._gunPassFlag = 1; @@ -1136,7 +1137,7 @@ void DreamWebEngine::useCardReader3() { showPuzText(26, 300); putBackObStuff(); } else { - playChannel1(16); + _sound->playChannel1(16); showPuzText(25, 300); _vars._progressPoints++; _vars._card1Money -= 8300; @@ -1232,7 +1233,7 @@ void DreamWebEngine::useControl() { } if (compare(_withObject, _withType, "KEYA")) { // Right key - playChannel1(16); + _sound->playChannel1(16); if (_vars._location == 21) { // Going down showPuzText(3, 300); _newLocation = 30; @@ -1257,7 +1258,7 @@ void DreamWebEngine::useControl() { placeSetObject(30); removeSetObject(16); removeSetObject(17); - playChannel1(14); + _sound->playChannel1(14); showPuzText(10, 300); _vars._progressPoints++; _getBack = 1; @@ -1375,7 +1376,7 @@ void DreamWebEngine::runTap() { // Fill cup from tap DynObject *exObject = getExAd(_withObject); exObject->objId[3] = 'F'-'A'; // CUPE (empty cup) -> CUPF (full cup) - playChannel1(8); + _sound->playChannel1(8); showPuzText(57, 300); putBackObStuff(); return; diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp index 6f9fd5f53c..c8f05641b5 100644 --- a/engines/dreamweb/vgafades.cpp +++ b/engines/dreamweb/vgafades.cpp @@ -20,6 +20,7 @@ * */ +#include "dreamweb/sound.h" #include "dreamweb/dreamweb.h" namespace DreamWeb { @@ -123,7 +124,7 @@ void DreamWebEngine::fadeUpMonFirst() { _colourPos = 0; _numToFade = 128; hangOn(64); - playChannel1(26); + _sound->playChannel1(26); hangOn(64); } -- cgit v1.2.3 From 6691424397bd9db6e022e64ca0b5c91e24d8d35d Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 31 May 2012 05:39:08 +0100 Subject: DREAMWEB: Remove irrelevant additions in SFX id 62 usage. --- engines/dreamweb/stubs.cpp | 2 +- engines/dreamweb/talk.cpp | 2 +- engines/dreamweb/titles.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 3aa8e6da74..4515939ebc 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -969,7 +969,7 @@ void DreamWebEngine::setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, if (hasSpeech() && voiceIndex != 0) { _speechLoaded = _sound->loadSpeech('T', voiceIndex, 'T', textIndex); if (_speechLoaded) - _sound->playChannel1(50+12); + _sound->playChannel1(62); if (_speechLoaded && !_subtitles) return; diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp index ca99269cc8..2629c23355 100644 --- a/engines/dreamweb/talk.cpp +++ b/engines/dreamweb/talk.cpp @@ -102,7 +102,7 @@ void DreamWebEngine::startTalk() { _speechLoaded = _sound->loadSpeech('R', _realLocation, 'C', 64*(_character & 0x7F)); if (_speechLoaded) { _sound->volumeChange(6, 1); - _sound->playChannel1(50 + 12); + _sound->playChannel1(62); } } } diff --git a/engines/dreamweb/titles.cpp b/engines/dreamweb/titles.cpp index fa6b1060fb..f005279ba0 100644 --- a/engines/dreamweb/titles.cpp +++ b/engines/dreamweb/titles.cpp @@ -56,7 +56,7 @@ void DreamWebEngine::monkSpeaking() { for (int i = 40; i < 48; i++) { _speechLoaded = _sound->loadSpeech('T', 83, 'T', i); - _sound->playChannel1(50 + 12); + _sound->playChannel1(62); do { waitForVSync(); -- cgit v1.2.3 From 5de3f9c765ff50ffb386bf62213c882bd5c93cf1 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 31 May 2012 10:30:29 +0200 Subject: ALL: Correct spelling of "Mac OS X" in various places --- backends/graphics/openglsdl/openglsdl-graphics.cpp | 2 +- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 2 +- common/taskbar.h | 2 +- common/updates.h | 2 +- configure | 4 ++-- dists/scummvm.6 | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index b37d631c6d..67041ae17b 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -160,7 +160,7 @@ void OpenGLSdlGraphicsManager::detectSupportedFormats() { _hwscreen->format->Rshift, _hwscreen->format->Gshift, _hwscreen->format->Bshift, _hwscreen->format->Ashift); - // Workaround to MacOSX SDL not providing an accurate Aloss value. + // Workaround to SDL not providing an accurate Aloss value on Mac OS X. if (_hwscreen->format->Amask == 0) format.aLoss = 8; diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 9631c3c07e..e841ecb834 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -458,7 +458,7 @@ void SurfaceSdlGraphicsManager::detectSupportedFormats() { _hwscreen->format->Rshift, _hwscreen->format->Gshift, _hwscreen->format->Bshift, _hwscreen->format->Ashift); - // Workaround to MacOSX SDL not providing an accurate Aloss value. + // Workaround to SDL not providing an accurate Aloss value on Mac OS X. if (_hwscreen->format->Amask == 0) format.aLoss = 8; diff --git a/common/taskbar.h b/common/taskbar.h index ba99d4e487..6f28028e74 100644 --- a/common/taskbar.h +++ b/common/taskbar.h @@ -34,7 +34,7 @@ namespace Common { * The TaskbarManager allows interaction with the ScummVM application icon: * - in the taskbar on Windows 7 and later * - in the launcher for Unity - * - in the dock on MacOSX + * - in the dock on Mac OS X * - ... * * This allows GUI code and engines to display a progress bar, an overlay icon and/or count diff --git a/common/updates.h b/common/updates.h index 1e0babdf6d..4d58a216fb 100644 --- a/common/updates.h +++ b/common/updates.h @@ -30,7 +30,7 @@ namespace Common { /** * The UpdateManager allows configuring of the automatic update checking * for systems that support it: - * - using Sparkle on MacOSX + * - using Sparkle on Mac OS X * - using WinSparkle on Windows * * Most of the update checking is completely automated and this class only diff --git a/configure b/configure index d310148f06..5905f408a0 100755 --- a/configure +++ b/configure @@ -835,8 +835,8 @@ Optional Libraries: installed (optional) --disable-fluidsynth disable fluidsynth MIDI driver [autodetect] - --with-sparkle-prefix=DIR Prefix where sparkle is installed (MacOSX only - optional) - --disable-sparkle disable sparkle automatic update support [MacOSX only - autodetect] + --with-sparkle-prefix=DIR Prefix where sparkle is installed (Mac OS X only - optional) + --disable-sparkle disable sparkle automatic update support [Mac OS X only - autodetect] --with-sdl-prefix=DIR Prefix where the sdl-config script is installed (optional) diff --git a/dists/scummvm.6 b/dists/scummvm.6 index b192104684..2075a5c8f5 100644 --- a/dists/scummvm.6 +++ b/dists/scummvm.6 @@ -37,7 +37,7 @@ Output using ALSA sequencer device .It Em amidi Use the MorphOS MIDI system, for MorphOS users .It Em core -CoreAudio sound, for MacOS X users +CoreAudio sound, for Mac OS X users .It Em mt32 MT-32 emulation .It Em null -- cgit v1.2.3 From dfa5405db8c33f91936d022954175799ea54658d Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 31 May 2012 18:53:47 +1000 Subject: SCUMM: Change the nest.number default to zero in stopScript and stopObjectScript too. --- engines/scumm/script.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp index a26c64e690..d8c4948ea8 100644 --- a/engines/scumm/script.cpp +++ b/engines/scumm/script.cpp @@ -250,7 +250,7 @@ void ScummEngine::stopScript(int script) { if (vm.nest[i].number == script && (vm.nest[i].where == WIO_GLOBAL || vm.nest[i].where == WIO_LOCAL)) { nukeArrays(vm.nest[i].slot); - vm.nest[i].number = 0xFF; + vm.nest[i].number = 0; vm.nest[i].slot = 0xFF; vm.nest[i].where = 0xFF; } @@ -284,7 +284,7 @@ void ScummEngine::stopObjectScript(int script) { if (vm.nest[i].number == script && (vm.nest[i].where == WIO_ROOM || vm.nest[i].where == WIO_INVENTORY || vm.nest[i].where == WIO_FLOBJECT)) { nukeArrays(vm.nest[i].slot); - vm.nest[i].number = 0xFF; + vm.nest[i].number = 0; vm.nest[i].slot = 0xFF; vm.nest[i].where = 0xFF; } -- cgit v1.2.3 From 79f6f63daf1c3f33631748234ba4b582bdc2a219 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 1 Jun 2012 14:30:47 +1000 Subject: SCUMM: Add debugInput opcode difference in Backyard Basketball. --- engines/scumm/he/script_v100he.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index 56ea10f507..d2e01a6564 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -2339,6 +2339,12 @@ void ScummEngine_v100he::o100_writeFile() { } void ScummEngine_v100he::o100_debugInput() { + // Backyard Basketball uses older code for this opcode + if (_game.id == GID_BASKETBALL) { + ScummEngine_v72he::o72_debugInput(); + return; + } + byte subOp = fetchScriptByte(); switch (subOp) { -- cgit v1.2.3 From d9983a6224dcc82d56a7b3d6d2aaad79def96766 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 2 Jun 2012 07:03:40 +0100 Subject: DREAMWEB: Cleanup of debugging code and formatting in sound code. This commit removes various temporary debugging output, cleans up some points of formatting and replaces some hexadecimal sizes and offsets with decimal for readability. --- engines/dreamweb/sound.cpp | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index 83ddebc552..4b636d4789 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -85,6 +85,7 @@ void DreamWebSound::playChannel0(uint8 index, uint8 repeat) { } void DreamWebSound::playChannel1(uint8 index) { + debug(1, "playChannel1(index:%d)", index); if (_channel1Playing == 7) return; @@ -99,6 +100,7 @@ void DreamWebSound::cancelCh0() { } void DreamWebSound::cancelCh1() { + debug(1, "cancelCh1()"); _channel1Playing = 255; stopSound(1); } @@ -123,7 +125,7 @@ void DreamWebSound::loadRoomsSample(uint8 sample) { } void DreamWebSound::playSound(uint8 channel, uint8 id, uint8 loops) { - debug(1, "playSound(%u, %u, %u)", channel, id, loops); + debug(1, "playSound(channel:%u, id:%u, loops:%u)", channel, id, loops); int bank = 0; bool speech = false; @@ -153,23 +155,18 @@ void DreamWebSound::playSound(uint8 channel, uint8 id, uint8 loops) { error("out of memory: cannot allocate memory for sound(%u bytes)", sample.size); memcpy(buffer, data.data.begin() + sample.offset, sample.size); - raw = Audio::makeRawStream( - buffer, - sample.size, 22050, Audio::FLAG_UNSIGNED); + raw = Audio::makeRawStream(buffer, sample.size, 22050, Audio::FLAG_UNSIGNED); } else { uint8 *buffer = (uint8 *)malloc(_speechData.size()); if (!buffer) error("out of memory: cannot allocate memory for sound(%u bytes)", _speechData.size()); memcpy(buffer, _speechData.begin(), _speechData.size()); - raw = Audio::makeRawStream( - buffer, - _speechData.size(), 22050, Audio::FLAG_UNSIGNED); - + raw = Audio::makeRawStream(buffer, _speechData.size(), 22050, Audio::FLAG_UNSIGNED); } Audio::AudioStream *stream; if (loops > 1) { - stream = new Audio::LoopingAudioStream(raw, loops < 255? loops: 0); + stream = new Audio::LoopingAudioStream(raw, (loops < 255) ? loops : 0); } else stream = raw; @@ -206,11 +203,6 @@ bool DreamWebSound::loadSpeech(const Common::String &filename) { } void DreamWebSound::soundHandler() { - static uint8 volumeOld = 0, channel0Old = 0, channel0PlayingOld = 0; - if (_volume != volumeOld || _channel0 != channel0Old || _channel0Playing != channel0PlayingOld) - debug(1, "soundHandler() _volume: %d _channel0: %d _channel0Playing: %d", _volume, _channel0, _channel0Playing); - volumeOld = _volume, channel0Old = _channel0, channel0PlayingOld = _channel0Playing; - _vm->_subtitles = ConfMan.getBool("subtitles"); volumeAdjust(); @@ -250,9 +242,8 @@ void DreamWebSound::soundHandler() { playSound(1, ch1, 1); } } + if (!_vm->_mixer->isSoundHandleActive(_channelHandle[0])) { - if (_channel0Playing != 255 && _channel0 != 0) - debug(1, "!_mixer->isSoundHandleActive _channelHandle[0] _channel0Playing:%d _channel0:%d", _channel0Playing, _channel0); _channel0Playing = 255; _channel0 = 0; } @@ -271,9 +262,9 @@ void DreamWebSound::loadSounds(uint bank, const Common::String &suffix) { return; } - uint8 header[0x60]; + uint8 header[96]; file.read(header, sizeof(header)); - uint tablesize = READ_LE_UINT16(header + 0x32); + uint tablesize = READ_LE_UINT16(header + 50); debug(1, "table size = %u", tablesize); SoundData &soundData = _soundData[bank]; @@ -283,8 +274,8 @@ void DreamWebSound::loadSounds(uint bank, const Common::String &suffix) { uint8 entry[6]; Sample &sample = soundData.samples[i]; file.read(entry, sizeof(entry)); - sample.offset = entry[0] * 0x4000 + READ_LE_UINT16(entry + 1); - sample.size = READ_LE_UINT16(entry + 3) * 0x800; + sample.offset = entry[0] * 16384 + READ_LE_UINT16(entry + 1); + sample.size = READ_LE_UINT16(entry + 3) * 2048; total += sample.size; debug(1, "offset: %08x, size: %u", sample.offset, sample.size); } -- cgit v1.2.3 From c1dd3d5c2986f6c688eaf5ea80034658840b2828 Mon Sep 17 00:00:00 2001 From: Lars Skovlund Date: Sat, 2 Jun 2012 18:50:46 +0200 Subject: SCI32: Implement GetConfig("language") --- engines/sci/engine/kmisc.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index 2911af97df..9a113bc5f9 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -381,6 +381,9 @@ reg_t kGetConfig(EngineState *s, int argc, reg_t *argv) { s->_segMan->strcpy(data, "586"); } else if (setting == "cpuspeed") { s->_segMan->strcpy(data, "500"); + } else if (setting == "language") { + Common::String languageId = Common::String::format("%d", g_sci->getSciLanguage()); + s->_segMan->strcpy(data, languageId.c_str()); } else { error("GetConfig: Unknown configuration setting %s", setting.c_str()); } -- cgit v1.2.3 From 3eeb3d74163f2682bc27968df5e5e389174cdc1e Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 2 Jun 2012 20:50:18 +0200 Subject: GOB: Correctly name the Penetration script variables --- engines/gob/inter_geisha.cpp | 10 +++++----- engines/gob/minigames/geisha/penetration.cpp | 2 +- engines/gob/minigames/geisha/penetration.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/engines/gob/inter_geisha.cpp b/engines/gob/inter_geisha.cpp index 7f21ceb91d..99f834d4d7 100644 --- a/engines/gob/inter_geisha.cpp +++ b/engines/gob/inter_geisha.cpp @@ -272,12 +272,12 @@ void Inter_Geisha::oGeisha_writeData(OpFuncParams ¶ms) { } void Inter_Geisha::oGeisha_gamePenetration(OpGobParams ¶ms) { - uint16 var1 = _vm->_game->_script->readUint16(); - uint16 var2 = _vm->_game->_script->readUint16(); - uint16 var3 = _vm->_game->_script->readUint16(); - uint16 resultVar = _vm->_game->_script->readUint16(); + uint16 hasAccessPass = _vm->_game->_script->readUint16(); + uint16 hasMaxEnergy = _vm->_game->_script->readUint16(); + uint16 testMode = _vm->_game->_script->readUint16(); + uint16 resultVar = _vm->_game->_script->readUint16(); - bool result = _penetration->play(var1, var2, var3); + bool result = _penetration->play(hasAccessPass, hasMaxEnergy, testMode); WRITE_VAR_UINT32(resultVar, result ? 1 : 0); } diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 121a45bc40..153f2a6766 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -62,7 +62,7 @@ Penetration::~Penetration() { delete _background; } -bool Penetration::play(uint16 var1, uint16 var2, uint16 var3) { +bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { init(); initScreen(); diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index c346a7bf5a..3f9aac7963 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -39,7 +39,7 @@ public: Penetration(GobEngine *vm); ~Penetration(); - bool play(uint16 var1, uint16 var2, uint16 var3); + bool play(bool hasAccessPass, bool hasMaxEnergy, bool testMode); private: GobEngine *_vm; -- cgit v1.2.3 From 585ceb566f27880ae7ea426efc70192b03a26d8d Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 2 Jun 2012 22:12:25 +0200 Subject: GOB: Add animation handling frame to Penetration --- engines/gob/minigames/geisha/penetration.cpp | 60 ++++++++++++++++++++++++++-- engines/gob/minigames/geisha/penetration.h | 9 +++++ 2 files changed, 65 insertions(+), 4 deletions(-) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 153f2a6766..1bdc574aa3 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -25,7 +25,9 @@ #include "gob/draw.h" #include "gob/video.h" #include "gob/decfile.h" +#include "gob/cmpfile.h" #include "gob/anifile.h" +#include "gob/aniobject.h" #include "gob/minigames/geisha/penetration.h" @@ -52,7 +54,7 @@ static const byte kPalette[48] = { 0x15, 0x3F, 0x15 }; -Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _objects(0) { +Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _objects(0) { _background = new Surface(320, 200, 1); } @@ -68,11 +70,28 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { _vm->_draw->blitInvalidated(); _vm->_video->retrace(); - while (!_vm->_util->keyPressed() && !_vm->shouldQuit()) - _vm->_util->longDelay(1); + + while (!_vm->shouldQuit()) { + updateAnims(); + + // Draw and wait for the end of the frame + _vm->_draw->blitInvalidated(); + _vm->_util->waitEndFrame(); + + // Handle input + _vm->_util->processInput(); + + int16 mouseX, mouseY; + MouseButtons mouseButtons; + + int16 key = checkInput(mouseX, mouseY, mouseButtons); + // Aborting the game + if (key == kKeyEscape) + break; + } deinit(); - return true; + return false; } void Penetration::init() { @@ -80,13 +99,18 @@ void Penetration::init() { _vm->_video->drawPackedSprite("hyprmef2.cmp", *_background); + _sprites = new CMPFile(_vm, "tcifplai.cmp", 320, 200); _objects = new ANIFile(_vm, "tcite.ani", 320); } void Penetration::deinit() { + _anims.clear(); + delete _objects; + delete _sprites; _objects = 0; + _sprites = 0; } void Penetration::initScreen() { @@ -101,6 +125,34 @@ void Penetration::initScreen() { _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, 0, 0, 319, 199); } +int16 Penetration::checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons) { + _vm->_util->getMouseState(&mouseX, &mouseY, &mouseButtons); + + return _vm->_util->checkKey(); +} + +void Penetration::updateAnims() { + int16 left, top, right, bottom; + + // Clear the previous animation frames + for (Common::List::iterator a = _anims.reverse_begin(); + a != _anims.end(); --a) { + + (*a)->clear(*_vm->_draw->_backSurface, left, top, right, bottom); + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + } + + // Draw the current animation frames + for (Common::List::iterator a = _anims.begin(); + a != _anims.end(); ++a) { + + (*a)->draw(*_vm->_draw->_backSurface, left, top, right, bottom); + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + + (*a)->advance(); + } +} + } // End of namespace Geisha } // End of namespace Gob diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 3f9aac7963..9bf87503f0 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -24,11 +24,13 @@ #define GOB_MINIGAMES_GEISHA_PENETRATION_H #include "common/system.h" +#include "common/list.h" namespace Gob { class GobEngine; class Surface; +class CMPFile; class ANIFile; namespace Geisha { @@ -45,13 +47,20 @@ private: GobEngine *_vm; Surface *_background; + CMPFile *_sprites; ANIFile *_objects; + Common::List _anims; + void init(); void deinit(); void initScreen(); + + void updateAnims(); + + int16 checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons); }; } // End of namespace Geisha -- cgit v1.2.3 From 030509c8eb4544885dabf67b85f83d3b296230de Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 2 Jun 2012 23:12:25 +0200 Subject: GOB: Draw the shield and health meters in Penetration --- engines/gob/minigames/geisha/meter.cpp | 4 +++ engines/gob/minigames/geisha/meter.h | 2 ++ engines/gob/minigames/geisha/penetration.cpp | 39 +++++++++++++++++++++++++++- engines/gob/minigames/geisha/penetration.h | 8 ++++++ 4 files changed, 52 insertions(+), 1 deletion(-) diff --git a/engines/gob/minigames/geisha/meter.cpp b/engines/gob/minigames/geisha/meter.cpp index e3b9bd1ccf..9dcc717e48 100644 --- a/engines/gob/minigames/geisha/meter.cpp +++ b/engines/gob/minigames/geisha/meter.cpp @@ -42,6 +42,10 @@ Meter::~Meter() { delete _surface; } +int32 Meter::getMaxValue() const { + return _maxValue; +} + int32 Meter::getValue() const { return _value; } diff --git a/engines/gob/minigames/geisha/meter.h b/engines/gob/minigames/geisha/meter.h index a9bdb14d0f..d3e82cb32e 100644 --- a/engines/gob/minigames/geisha/meter.h +++ b/engines/gob/minigames/geisha/meter.h @@ -44,6 +44,8 @@ public: Direction direction); ~Meter(); + /** Return the max value the meter is measuring. */ + int32 getMaxValue() const; /** Return the current value the meter is measuring. */ int32 getValue() const; diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 1bdc574aa3..8b5de27ad2 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -30,6 +30,7 @@ #include "gob/aniobject.h" #include "gob/minigames/geisha/penetration.h" +#include "gob/minigames/geisha/meter.h" namespace Gob { @@ -54,17 +55,29 @@ static const byte kPalette[48] = { 0x15, 0x3F, 0x15 }; -Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _objects(0) { +Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _objects(0), + _shieldMeter(0), _healthMeter(0) { + _background = new Surface(320, 200, 1); + + _shieldMeter = new Meter(11, 119, 92, 3, 11, 10, 1020, Meter::kFillToRight); + _healthMeter = new Meter(11, 137, 92, 3, 15, 10, 1020, Meter::kFillToRight); } Penetration::~Penetration() { deinit(); + delete _shieldMeter; + delete _healthMeter; + delete _background; } bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { + _hasAccessPass = hasAccessPass; + _hasMaxEnergy = hasMaxEnergy; + _testMode = testMode; + init(); initScreen(); @@ -101,6 +114,23 @@ void Penetration::init() { _sprites = new CMPFile(_vm, "tcifplai.cmp", 320, 200); _objects = new ANIFile(_vm, "tcite.ani", 320); + + // Draw the shield meter + _sprites->draw(*_background, 0, 0, 95, 6, 9, 117, 0); // Meter frame + _sprites->draw(*_background, 271, 176, 282, 183, 9, 108, 0); // Shield + + // Draw the health meter + _sprites->draw(*_background, 0, 0, 95, 6, 9, 135, 0); // Meter frame + _sprites->draw(*_background, 283, 176, 292, 184, 9, 126, 0); // Heart + + // The shield starts down + _shieldMeter->setValue(0); + + // If we don't have the max energy tokens, the health starts at 1/3 strength + if (_hasMaxEnergy) + _healthMeter->setMaxValue(); + else + _healthMeter->setValue(_healthMeter->getMaxValue() / 3); } void Penetration::deinit() { @@ -151,6 +181,13 @@ void Penetration::updateAnims() { (*a)->advance(); } + + // Draw the meters + _shieldMeter->draw(*_vm->_draw->_backSurface, left, top, right, bottom); + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + + _healthMeter->draw(*_vm->_draw->_backSurface, left, top, right, bottom); + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); } } // End of namespace Geisha diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 9bf87503f0..6c32d28942 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -35,6 +35,8 @@ class ANIFile; namespace Geisha { +class Meter; + /** Geisha's "Penetration" minigame. */ class Penetration { public: @@ -46,12 +48,18 @@ public: private: GobEngine *_vm; + bool _hasAccessPass; + bool _hasMaxEnergy; + bool _testMode; + Surface *_background; CMPFile *_sprites; ANIFile *_objects; Common::List _anims; + Meter *_shieldMeter; + Meter *_healthMeter; void init(); void deinit(); -- cgit v1.2.3 From db77b9e4a7f8491d45b47b539af2077fb15e9376 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 2 Jun 2012 22:28:34 +0100 Subject: DREAMWEB: Modify sound code to prevent missing sound effects. This should fix bug #3528164 "DREAMWEB: missing sound effects/music cues during main title" by preventing repeated calls of SFX id 12 being lost if the next call is made before the sound handler has cleared the previous one. --- engines/dreamweb/sound.cpp | 10 +++++++++- engines/dreamweb/sound.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index 4b636d4789..76c734e932 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -41,6 +41,7 @@ DreamWebSound::DreamWebSound(DreamWebEngine *vm) : _vm(vm) { _currentSample = 0xff; _channel0Playing = 0; _channel0Repeat = 0; + _channel0NewSound = false; _channel1Playing = 255; _volume = 0; @@ -80,6 +81,12 @@ void DreamWebSound::volumeAdjust() { void DreamWebSound::playChannel0(uint8 index, uint8 repeat) { debug(1, "playChannel0(index:%d, repeat:%d)", index, repeat); + + if (index == _channel0Playing) { + warning("playChannel0(index: %d) already playing! Forcing restart...", index); + _channel0NewSound = true; + } + _channel0Playing = index; _channel0Repeat = repeat; } @@ -230,8 +237,9 @@ void DreamWebSound::soundHandler() { ch1 = 0; uint8 ch0loop = _channel0Repeat; - if (_channel0 != ch0) { + if (_channel0 != ch0 || _channel0NewSound) { _channel0 = ch0; + _channel0NewSound = false; if (ch0) { playSound(0, ch0, ch0loop); } diff --git a/engines/dreamweb/sound.h b/engines/dreamweb/sound.h index 62def157e7..a38dbf3c1a 100644 --- a/engines/dreamweb/sound.h +++ b/engines/dreamweb/sound.h @@ -73,6 +73,7 @@ private: uint8 _currentSample; uint8 _channel0Playing; uint8 _channel0Repeat; + bool _channel0NewSound; uint8 _channel1Playing; uint8 _volume; -- cgit v1.2.3 From 43abb525d4004cb0816c8ea506b0b963d784ccf3 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 3 Jun 2012 00:20:39 +0200 Subject: GOB: Draw the map in a separate surface Still hidden for now. --- engines/gob/minigames/geisha/penetration.cpp | 236 +++++++++++++++++++++++++-- engines/gob/minigames/geisha/penetration.h | 15 ++ 2 files changed, 241 insertions(+), 10 deletions(-) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 8b5de27ad2..77edebce48 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -55,18 +55,137 @@ static const byte kPalette[48] = { 0x15, 0x3F, 0x15 }; +static const int kColorShield = 11; +static const int kColorHealth = 15; +static const int kColorBlack = 10; +static const int kColorFloor = 13; + +static const int kMapTileWidth = 24; +static const int kMapTileHeight = 24; + +static const int kPlayAreaX = 120; +static const int kPlayAreaY = 7; +static const int kPlayAreaWidth = 192; +static const int kPlayAreaHeight = 113; + +static const int kPlayAreaBorderWidth = kPlayAreaWidth / 2; +static const int kPlayAreaBorderHeight = kPlayAreaHeight / 2; + +const byte Penetration::kMaps[kModeCount][kFloorCount][kMapWidth * kMapHeight] = { + { + { // Real mode, floor 0 + 0, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 0, + 50, 50, 0, 0, 52, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, + 50, 0, 0, 0, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 0, 0, 50, + 50, 0, 0, 50, 0, 0, 52, 53, 0, 0, 0, 0, 0, 0, 50, 0, 50, + 50, 0, 50, 0, 0, 50, 50, 50, 50, 0, 54, 55, 0, 0, 50, 0, 50, + 50, 0, 50, 49, 0, 50, 0, 52, 53, 0, 50, 50, 50, 0, 0, 0, 50, + 50, 57, 0, 50, 0, 0, 0, 50, 50, 50, 0, 0, 56, 50, 54, 55, 50, + 50, 50, 0, 0, 50, 50, 50, 0, 0, 0, 0, 50, 0, 0, 50, 0, 50, + 50, 51, 50, 0, 54, 55, 0, 0, 50, 50, 50, 50, 52, 53, 50, 0, 50, + 50, 0, 50, 0, 0, 0, 0, 0, 54, 55, 0, 0, 0, 50, 0, 0, 50, + 50, 0, 0, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 0, 0, 0, 50, + 50, 50, 0, 52, 53, 0, 0, 0, 0, 0, 0, 52, 53, 0, 0, 50, 50, + 0, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 0 + }, + { // Real mode, floor 1 + 0, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 0, + 50, 0, 52, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, + 50, 0, 0, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 0, 0, 50, + 50, 0, 50, 51, 52, 53, 0, 0, 52, 53, 0, 0, 0, 0, 50, 0, 50, + 50, 0, 50, 0, 50, 50, 0, 50, 0, 50, 0, 50, 50, 0, 50, 0, 50, + 50, 0, 50, 0, 52, 53, 0, 0, 0, 0, 0, 52, 53, 0, 52, 53, 50, + 50, 57, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 0, 0, 50, + 50, 0, 50, 52, 53, 0, 0, 52, 53, 0, 0, 0, 0, 0, 54, 55, 50, + 50, 0, 50, 0, 50, 0, 50, 50, 0, 50, 50, 0, 50, 0, 50, 50, 50, + 50, 0, 50, 49, 0, 0, 52, 53, 0, 52, 53, 0, 0, 0, 50, 56, 50, + 50, 0, 0, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 0, 0, 50, + 50, 0, 0, 0, 0, 0, 0, 0, 54, 55, 0, 0, 0, 0, 0, 0, 50, + 0, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 0 + }, + { // Real mode, floor 2 + 0, 50, 50, 50, 50, 50, 50, 50, 0, 50, 50, 50, 50, 50, 50, 50, 0, + 50, 52, 53, 0, 0, 0, 0, 50, 50, 50, 0, 0, 0, 0, 52, 53, 50, + 50, 0, 50, 50, 50, 0, 0, 0, 50, 0, 0, 0, 50, 50, 50, 0, 50, + 50, 0, 50, 52, 53, 50, 50, 52, 53, 0, 50, 50, 54, 55, 50, 0, 50, + 50, 0, 50, 0, 0, 0, 0, 50, 0, 50, 0, 0, 0, 0, 50, 0, 50, + 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 52, 53, 50, + 0, 50, 0, 50, 50, 50, 0, 57, 50, 51, 0, 50, 50, 50, 0, 50, 0, + 50, 0, 0, 0, 50, 0, 0, 0, 50, 0, 52, 53, 50, 0, 0, 0, 50, + 50, 0, 50, 0, 0, 0, 0, 50, 56, 50, 0, 0, 0, 0, 50, 0, 50, + 50, 0, 50, 54, 55, 50, 50, 0, 0, 0, 50, 50, 54, 55, 50, 0, 50, + 50, 0, 50, 50, 50, 0, 0, 0, 50, 0, 0, 0, 50, 50, 50, 0, 50, + 50, 52, 53, 0, 0, 0, 0, 50, 50, 50, 0, 0, 0, 0, 52, 53, 50, + 0, 50, 50, 50, 50, 50, 50, 50, 0, 50, 50, 50, 50, 50, 50, 50, 0 + } + }, + { + { // Test mode, floor 0 + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 56, 0, 50, 0, 0, 52, 53, 0, 0, 0, 0, 52, 53, 0, 51, 50, + 50, 0, 0, 50, 0, 0, 0, 50, 0, 54, 55, 50, 0, 50, 50, 50, 50, + 50, 52, 53, 50, 50, 0, 0, 50, 50, 50, 50, 50, 0, 50, 0, 0, 50, + 50, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 50, 49, 50, 0, 0, 50, + 50, 0, 54, 55, 0, 50, 50, 54, 55, 0, 50, 50, 50, 0, 0, 0, 50, + 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 53, 0, 0, 54, 55, 50, + 50, 0, 50, 0, 50, 0, 0, 50, 0, 0, 0, 50, 0, 0, 0, 0, 50, + 50, 0, 50, 0, 50, 54, 55, 50, 0, 50, 50, 50, 0, 50, 0, 0, 50, + 50, 50, 50, 50, 50, 0, 0, 50, 0, 0, 0, 0, 0, 50, 54, 55, 50, + 50, 0, 0, 0, 0, 0, 0, 0, 50, 50, 50, 50, 50, 0, 0, 0, 50, + 50, 57, 0, 52, 53, 0, 0, 0, 0, 54, 55, 0, 0, 0, 0, 56, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50 + }, + { // Test mode, floor 1 + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 52, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, + 50, 0, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 54, 55, 0, 50, + 50, 0, 50, 52, 53, 0, 0, 50, 0, 0, 54, 55, 50, 0, 50, 0, 50, + 50, 0, 50, 0, 50, 0, 0, 52, 53, 0, 50, 0, 50, 0, 50, 0, 50, + 50, 0, 50, 0, 50, 50, 50, 50, 50, 49, 50, 0, 50, 0, 50, 0, 50, + 50, 0, 50, 0, 50, 0, 50, 0, 0, 50, 50, 0, 50, 0, 50, 0, 50, + 50, 0, 50, 0, 50, 0, 50, 51, 0, 0, 52, 53, 50, 0, 50, 0, 50, + 50, 57, 50, 0, 50, 0, 50, 50, 50, 50, 50, 50, 50, 0, 50, 0, 50, + 50, 50, 50, 0, 50, 56, 0, 0, 0, 54, 55, 0, 0, 0, 50, 0, 50, + 50, 56, 0, 0, 0, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 0, 50, + 50, 50, 50, 50, 0, 0, 0, 0, 52, 53, 0, 0, 0, 0, 0, 0, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50 + }, + { // Test mode, floor 2 + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 57, 50, 54, 55, 0, 50, 54, 55, 0, 50, 0, 52, 53, 50, 51, 50, + 50, 0, 50, 0, 50, 0, 50, 0, 0, 0, 50, 0, 50, 0, 50, 0, 50, + 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, + 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, + 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, + 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, + 50, 0, 50, 52, 53, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, + 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, + 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, 0, 50, + 50, 0, 0, 0, 50, 0, 50, 0, 50, 0, 0, 0, 50, 0, 50, 0, 50, + 50, 0, 0, 0, 50, 52, 53, 0, 50, 52, 53, 56, 50, 0, 54, 55, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50 + } + } +}; + + Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _objects(0), _shieldMeter(0), _healthMeter(0) { _background = new Surface(320, 200, 1); - _shieldMeter = new Meter(11, 119, 92, 3, 11, 10, 1020, Meter::kFillToRight); - _healthMeter = new Meter(11, 137, 92, 3, 15, 10, 1020, Meter::kFillToRight); + _shieldMeter = new Meter(11, 119, 92, 3, kColorShield, kColorBlack, 1020, Meter::kFillToRight); + _healthMeter = new Meter(11, 137, 92, 3, kColorHealth, kColorBlack, 1020, Meter::kFillToRight); + + _map = new Surface(kMapWidth * kMapTileWidth + kPlayAreaWidth , + kMapHeight * kMapTileHeight + kPlayAreaHeight, 1); } Penetration::~Penetration() { deinit(); + delete _map; + delete _shieldMeter; delete _healthMeter; @@ -115,14 +234,6 @@ void Penetration::init() { _sprites = new CMPFile(_vm, "tcifplai.cmp", 320, 200); _objects = new ANIFile(_vm, "tcite.ani", 320); - // Draw the shield meter - _sprites->draw(*_background, 0, 0, 95, 6, 9, 117, 0); // Meter frame - _sprites->draw(*_background, 271, 176, 282, 183, 9, 108, 0); // Shield - - // Draw the health meter - _sprites->draw(*_background, 0, 0, 95, 6, 9, 135, 0); // Meter frame - _sprites->draw(*_background, 283, 176, 292, 184, 9, 126, 0); // Heart - // The shield starts down _shieldMeter->setValue(0); @@ -131,6 +242,10 @@ void Penetration::init() { _healthMeter->setMaxValue(); else _healthMeter->setValue(_healthMeter->getMaxValue() / 3); + + _floor = 0; + + createMap(); } void Penetration::deinit() { @@ -143,6 +258,99 @@ void Penetration::deinit() { _sprites = 0; } +void Penetration::createMap() { + if (_floor >= kFloorCount) + error("Geisha: Invalid floor %d in minigame penetration", _floor); + + // Copy the correct map + memcpy(_mapTiles, kMaps[_testMode ? 1 : 0][_floor], kMapWidth * kMapHeight); + + _map->fill(kColorBlack); + + // Draw the map tiles + for (int y = 0; y < kMapHeight; y++) { + for (int x = 0; x < kMapWidth; x++) { + byte *mapTile = _mapTiles + (y * kMapWidth + x); + + const int posX = kPlayAreaBorderWidth + x * kMapTileWidth; + const int posY = kPlayAreaBorderHeight + y * kMapTileHeight; + + switch (*mapTile) { + case 0: // Floor + _sprites->draw(*_map, 30, posX, posY); + break; + + case 49: // Emergency exit (needs access pass) + + if (_hasAccessPass) { + // Draw an exit. Now works like a regular exit + _sprites->draw(*_map, 29, posX, posY); + *mapTile = 51; + } else + // Draw a wall + _sprites->draw(*_map, 31, posX, posY); + + break; + + case 50: // Wall + _sprites->draw(*_map, 31, posX, posY); + break; + + case 51: // Regular exit + + if (!_testMode) { + // When we're not in test mode, the last exit only works with an access pass + + if (_floor == 2) { + if (!_hasAccessPass) { + // It's now a wall + _sprites->draw(*_map, 31, posX, posY); + *mapTile = 50; + } else + _sprites->draw(*_map, 29, posX, posY); + + } else + _sprites->draw(*_map, 29, posX, posY); + + } else + // Always works in test mode + _sprites->draw(*_map, 29, posX, posY); + + break; + + case 52: // Left side of biting mouth + _sprites->draw(*_map, 32, posX, posY); + break; + + case 53: // Right side of biting mouth + *mapTile = 0; // Works like a floor + break; + + case 54: // Left side of kissing mouth + _sprites->draw(*_map, 33, posX, posY); + break; + + case 55: // Right side of kissing mouth + *mapTile = 0; // Works like a floor + break; + + case 56: // Shield lying on the floor + _sprites->draw(*_map, 30, posX , posY ); // Floor + _sprites->draw(*_map, 25, posX + 4, posY + 8); // Shield + + _map->fillRect(posX + 4, posY + 8, posX + 7, posY + 18, kColorFloor); // Area left to shield + _map->fillRect(posX + 17, posY + 8, posX + 20, posY + 18, kColorFloor); // Area right to shield + break; + + case 57: // Start position + _sprites->draw(*_map, 30, posX, posY); + *mapTile = 0; + break; + } + } + } +} + void Penetration::initScreen() { _vm->_util->setFrameRate(15); @@ -151,6 +359,14 @@ void Penetration::initScreen() { _vm->_video->setFullPalette(_vm->_global->_pPaletteDesc); + // Draw the shield meter + _sprites->draw(*_background, 0, 0, 95, 6, 9, 117, 0); // Meter frame + _sprites->draw(*_background, 271, 176, 282, 183, 9, 108, 0); // Shield + + // Draw the health meter + _sprites->draw(*_background, 0, 0, 95, 6, 9, 135, 0); // Meter frame + _sprites->draw(*_background, 283, 176, 292, 184, 9, 126, 0); // Heart + _vm->_draw->_backSurface->blit(*_background); _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, 0, 0, 319, 199); } diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 6c32d28942..897b10940c 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -46,6 +46,14 @@ public: bool play(bool hasAccessPass, bool hasMaxEnergy, bool testMode); private: + static const int kModeCount = 2; + static const int kFloorCount = 3; + + static const int kMapWidth = 17; + static const int kMapHeight = 13; + + static const byte kMaps[kModeCount][kFloorCount][kMapWidth * kMapHeight]; + GobEngine *_vm; bool _hasAccessPass; @@ -61,9 +69,16 @@ private: Meter *_shieldMeter; Meter *_healthMeter; + uint8 _floor; + + Surface *_map; + byte _mapTiles[kMapWidth * kMapHeight]; + void init(); void deinit(); + void createMap(); + void initScreen(); void updateAnims(); -- cgit v1.2.3 From 8dcb93f2ce04df49dea38f56bc97aef900a05122 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 3 Jun 2012 01:12:21 +0200 Subject: GOB: Draw the Penetration map and do basic movement --- engines/gob/minigames/geisha/penetration.cpp | 44 +++++++++++++++++++++++++++- engines/gob/minigames/geisha/penetration.h | 10 +++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 77edebce48..41346a896f 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -170,7 +170,8 @@ const byte Penetration::kMaps[kModeCount][kFloorCount][kMapWidth * kMapHeight] = Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _objects(0), - _shieldMeter(0), _healthMeter(0) { + _shieldMeter(0), _healthMeter(0), _floor(0), _mapUpdate(false), _mapX(0), _mapY(0), + _subTileX(0), _subTileY(0) { _background = new Surface(320, 200, 1); @@ -220,6 +221,9 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { // Aborting the game if (key == kKeyEscape) break; + + // Handle the sub movement + handleSub(key); } deinit(); @@ -345,10 +349,18 @@ void Penetration::createMap() { case 57: // Start position _sprites->draw(*_map, 30, posX, posY); *mapTile = 0; + + _subTileX = x; + _subTileY = y; + + _mapX = _subTileX * kMapTileWidth; + _mapY = _subTileY * kMapTileHeight; break; } } } + + _mapUpdate = true; } void Penetration::initScreen() { @@ -377,6 +389,27 @@ int16 Penetration::checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseB return _vm->_util->checkKey(); } +void Penetration::handleSub(int16 key) { + if (key == kKeyLeft) + moveSub(-5, 0); + else if (key == kKeyRight) + moveSub( 5, 0); + else if (key == kKeyUp) + moveSub( 0, -5); + else if (key == kKeyDown) + moveSub( 0, 5); +} + +void Penetration::moveSub(int x, int y) { + _mapX = CLIP(_mapX + x, 0, kMapWidth * kMapTileWidth); + _mapY = CLIP(_mapY + y, 0, kMapHeight * kMapTileHeight); + + _subTileX = _mapX / kMapTileWidth; + _subTileY = _mapY / kMapTileHeight; + + _mapUpdate = true; +} + void Penetration::updateAnims() { int16 left, top, right, bottom; @@ -388,6 +421,15 @@ void Penetration::updateAnims() { _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); } + if (_mapUpdate) { + _vm->_draw->_backSurface->blit(*_map, _mapX, _mapY, + _mapX + kPlayAreaWidth - 1, _mapY + kPlayAreaHeight - 1, kPlayAreaX, kPlayAreaY); + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, kPlayAreaX, kPlayAreaY, + kPlayAreaX + kPlayAreaWidth - 1, kPlayAreaY + kPlayAreaHeight - 1); + } + + _mapUpdate = false; + // Draw the current animation frames for (Common::List::iterator a = _anims.begin(); a != _anims.end(); ++a) { diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 897b10940c..72201d21d8 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -74,6 +74,13 @@ private: Surface *_map; byte _mapTiles[kMapWidth * kMapHeight]; + bool _mapUpdate; + uint16 _mapX; + uint16 _mapY; + + uint8 _subTileX; + uint8 _subTileY; + void init(); void deinit(); @@ -84,6 +91,9 @@ private: void updateAnims(); int16 checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons); + + void handleSub(int16 key); + void moveSub(int x, int y); }; } // End of namespace Geisha -- cgit v1.2.3 From 95e467d82cb36ee0d98624dd2cdd6d79b544c50c Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 3 Jun 2012 01:29:09 +0200 Subject: GOB: Display the Penetration submarine --- engines/gob/minigames/geisha/penetration.cpp | 49 ++++++++++++++++++++++++---- engines/gob/minigames/geisha/penetration.h | 4 ++- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 41346a896f..377835c45f 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -60,6 +60,30 @@ static const int kColorHealth = 15; static const int kColorBlack = 10; static const int kColorFloor = 13; +enum Animation { + kAnimationDriveS = 4, + kAnimationDriveE = 5, + kAnimationDriveN = 6, + kAnimationDriveW = 7, + kAnimationDriveSE = 8, + kAnimationDriveNE = 9, + kAnimationDriveSW = 10, + kAnimationDriveNW = 11, + kAnimationShootS = 12, + kAnimationShootN = 13, + kAnimationShootW = 14, + kAnimationShootE = 15, + kAnimationShootNE = 16, + kAnimationShootSE = 17, + kAnimationShootSW = 18, + kAnimationShootNW = 19, + kAnimationExplodeN = 28, + kAnimationExplodeS = 29, + kAnimationExplodeW = 30, + kAnimationExplodeE = 31, + kAnimationExit = 32 +}; + static const int kMapTileWidth = 24; static const int kMapTileHeight = 24; @@ -169,7 +193,7 @@ const byte Penetration::kMaps[kModeCount][kFloorCount][kMapWidth * kMapHeight] = }; -Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _objects(0), +Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _objects(0), _sub(0), _shieldMeter(0), _healthMeter(0), _floor(0), _mapUpdate(false), _mapX(0), _mapY(0), _subTileX(0), _subTileY(0) { @@ -250,11 +274,21 @@ void Penetration::init() { _floor = 0; createMap(); + + _sub = new ANIObject(*_objects); + + _sub->setAnimation(kAnimationDriveN); + _sub->setPosition(kPlayAreaX + kPlayAreaBorderWidth, kPlayAreaY + kPlayAreaBorderHeight); + _sub->setVisible(true); + + _anims.push_back(_sub); } void Penetration::deinit() { _anims.clear(); + delete _sub; + delete _objects; delete _sprites; @@ -391,16 +425,16 @@ int16 Penetration::checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseB void Penetration::handleSub(int16 key) { if (key == kKeyLeft) - moveSub(-5, 0); + moveSub(-5, 0, kAnimationDriveW); else if (key == kKeyRight) - moveSub( 5, 0); + moveSub( 5, 0, kAnimationDriveE); else if (key == kKeyUp) - moveSub( 0, -5); + moveSub( 0, -5, kAnimationDriveN); else if (key == kKeyDown) - moveSub( 0, 5); + moveSub( 0, 5, kAnimationDriveS); } -void Penetration::moveSub(int x, int y) { +void Penetration::moveSub(int x, int y, uint16 animation) { _mapX = CLIP(_mapX + x, 0, kMapWidth * kMapTileWidth); _mapY = CLIP(_mapY + y, 0, kMapHeight * kMapTileHeight); @@ -408,6 +442,9 @@ void Penetration::moveSub(int x, int y) { _subTileY = _mapY / kMapTileHeight; _mapUpdate = true; + + if (_sub->getAnimation() != animation) + _sub->setAnimation(animation); } void Penetration::updateAnims() { diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 72201d21d8..28a288928b 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -64,6 +64,8 @@ private: CMPFile *_sprites; ANIFile *_objects; + ANIObject *_sub; + Common::List _anims; Meter *_shieldMeter; @@ -93,7 +95,7 @@ private: int16 checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons); void handleSub(int16 key); - void moveSub(int x, int y); + void moveSub(int x, int y, uint16 animation); }; } // End of namespace Geisha -- cgit v1.2.3 From a401f0a19e09d7d00a3ee94d928db82e658b7b48 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 3 Jun 2012 02:02:57 +0200 Subject: ALL: Replace cursorTargetScale in OSystem API with a simple "do not scale" logic. All uses of the old target scale API actually wanted to disallow scaling of the mouse cursor. This commit adapts our API to this and thus simplifies backend implementations. Some backends, most notable the Wii and Android, did some implementation of the cursor target scale, which I didn't adapt yet. I added a TODO for the porters there. --- backends/graphics/graphics.h | 2 +- backends/graphics/null/null-graphics.h | 2 +- backends/graphics/opengl/opengl-graphics.cpp | 54 +- backends/graphics/opengl/opengl-graphics.h | 4 +- .../graphics/surfacesdl/surfacesdl-graphics.cpp | 94 +-- backends/graphics/surfacesdl/surfacesdl-graphics.h | 4 +- backends/graphics/wincesdl/wincesdl-graphics.cpp | 2 +- backends/graphics/wincesdl/wincesdl-graphics.h | 2 +- backends/modular-backend.cpp | 4 +- backends/modular-backend.h | 2 +- backends/platform/android/android.h | 2 +- backends/platform/android/gfx.cpp | 7 +- backends/platform/dc/dc.h | 2 +- backends/platform/dc/display.cpp | 2 +- backends/platform/ds/arm9/source/osystem_ds.cpp | 6 +- backends/platform/ds/arm9/source/osystem_ds.h | 2 +- backends/platform/iphone/osys_main.h | 2 +- backends/platform/iphone/osys_video.mm | 4 +- backends/platform/n64/osys_n64.h | 2 +- backends/platform/n64/osys_n64_base.cpp | 2 +- backends/platform/ps2/systemps2.cpp | 2 +- backends/platform/ps2/systemps2.h | 2 +- backends/platform/psp/osys_psp.cpp | 6 +- backends/platform/psp/osys_psp.h | 2 +- backends/platform/wii/osystem.h | 2 +- backends/platform/wii/osystem_gfx.cpp | 5 +- common/system.h | 5 +- engines/gob/draw_v1.cpp | 2 +- engines/gob/draw_v2.cpp | 2 +- engines/groovie/cursor.cpp | 2 +- engines/lastexpress/data/cursor.cpp | 2 +- engines/mohawk/cursors.cpp | 2 +- engines/scumm/cursor.cpp | 4 +- graphics/cursorman.cpp | 20 +- graphics/cursorman.h | 14 +- gui/ThemeEngine.cpp | 7 +- gui/ThemeEngine.h | 6 +- gui/ThemeParser.cpp | 7 +- gui/ThemeParser.h | 1 - gui/themes/default.inc | 784 ++++++++++----------- gui/themes/scummclassic.zip | Bin 93390 -> 93390 bytes gui/themes/scummclassic/THEMERC | 2 +- gui/themes/scummmodern.zip | Bin 1449894 -> 1449870 bytes gui/themes/scummmodern/THEMERC | 2 +- gui/themes/scummmodern/scummmodern_gfx.stx | 4 +- 45 files changed, 532 insertions(+), 554 deletions(-) diff --git a/backends/graphics/graphics.h b/backends/graphics/graphics.h index 3f282df587..0d6fa30418 100644 --- a/backends/graphics/graphics.h +++ b/backends/graphics/graphics.h @@ -80,7 +80,7 @@ public: virtual bool showMouse(bool visible) = 0; virtual void warpMouse(int x, int y) = 0; - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL) = 0; + virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) = 0; virtual void setCursorPalette(const byte *colors, uint start, uint num) = 0; virtual void displayMessageOnOSD(const char *msg) {} diff --git a/backends/graphics/null/null-graphics.h b/backends/graphics/null/null-graphics.h index 2e6b24d147..2f8baae3e8 100644 --- a/backends/graphics/null/null-graphics.h +++ b/backends/graphics/null/null-graphics.h @@ -78,7 +78,7 @@ public: bool showMouse(bool visible) { return !visible; } void warpMouse(int x, int y) {} - void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL) {} + void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) {} void setCursorPalette(const byte *colors, uint start, uint num) {} }; diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index cd820ae3b2..8449048997 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -49,7 +49,7 @@ OpenGLGraphicsManager::OpenGLGraphicsManager() _transactionMode(kTransactionNone), _cursorNeedsRedraw(false), _cursorPaletteDisabled(true), _cursorVisible(false), _cursorKeyColor(0), - _cursorTargetScale(1), + _cursorDontScale(false), _formatBGR(false), _displayX(0), _displayY(0), _displayWidth(0), _displayHeight(0) { @@ -591,7 +591,7 @@ void OpenGLGraphicsManager::warpMouse(int x, int y) { setInternalMousePosition(scaledX, scaledY); } -void OpenGLGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) { +void OpenGLGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { #ifdef USE_RGB_COLOR if (format) _cursorFormat = *format; @@ -616,7 +616,7 @@ void OpenGLGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int _cursorState.hotX = hotspotX; _cursorState.hotY = hotspotY; _cursorKeyColor = keycolor; - _cursorTargetScale = cursorTargetScale; + _cursorDontScale = dontScale; _cursorNeedsRedraw = true; refreshCursorScale(); @@ -829,28 +829,19 @@ void OpenGLGraphicsManager::refreshCursor() { } void OpenGLGraphicsManager::refreshCursorScale() { - // Calculate the scale factors of the screen. We limit ourselves to 3 at - // most here to avoid really big (and ugly) cursors for big resolutions. - // It might be noteworthy that 3 is the (current) target scale for the - // modern theme and thus assures the cursor is *never* scaled. + // Calculate the scale factors of the screen. // We also totally ignore the aspect of the overlay cursor, since aspect // ratio correction only applies to the game screen. - uint screenScaleFactorX = MIN(30000, _videoMode.hardwareWidth * 10000 / _videoMode.screenWidth); - uint screenScaleFactorY = MIN(30000, _videoMode.hardwareHeight * 10000 / _videoMode.screenHeight); - - // Apply the target scale factor to the cursor. - // It might be noteworthy we only apply any scaling to the cursor in case - // the current scale factor is bigger than the target scale to match - // SurfaceSdlGraphicsManager's behavior. Otherwise we would downscale the - // GUI cursor of the modern theme for example. - if (screenScaleFactorX > uint(_cursorTargetScale * 10000)) - screenScaleFactorX /= _cursorTargetScale; - else + // TODO: It might make sense to always ignore scaling of the mouse cursor + // when the overlay is visible. + uint screenScaleFactorX = _videoMode.hardwareWidth * 10000 / _videoMode.screenWidth; + uint screenScaleFactorY = _videoMode.hardwareHeight * 10000 / _videoMode.screenHeight; + + // Ignore scaling when the cursor should not be scaled. + if (_cursorDontScale) { screenScaleFactorX = 10000; - if (screenScaleFactorY > uint(_cursorTargetScale * 10000)) - screenScaleFactorY /= _cursorTargetScale; - else screenScaleFactorY = 10000; + } // Apply them (without any possible) aspect ratio correction to the // overlay. @@ -859,16 +850,19 @@ void OpenGLGraphicsManager::refreshCursorScale() { _cursorState.rHotX = (int16)(_cursorState.hotX * screenScaleFactorX / 10000); _cursorState.rHotY = (int16)(_cursorState.hotY * screenScaleFactorY / 10000); - // Make sure we properly scale the cursor according to the desired aspect. - // It might be noteworthy that, unlike with the overlay, we do not limit - // the scale factor here to avoid odd looks if the game uses items as - // mouse cursor, which would otherwise suddenly be smaller. - int width, height; - calculateDisplaySize(width, height); - screenScaleFactorX = (width * 10000 / _videoMode.screenWidth) / _cursorTargetScale; - screenScaleFactorY = (height * 10000 / _videoMode.screenHeight) / _cursorTargetScale; + // Only apply scaling when it's desired. + if (_cursorDontScale) { + screenScaleFactorX = 10000; + screenScaleFactorY = 10000; + } else { + // Make sure we properly scale the cursor according to the desired aspect. + int width, height; + calculateDisplaySize(width, height); + screenScaleFactorX = (width * 10000 / _videoMode.screenWidth); + screenScaleFactorY = (height * 10000 / _videoMode.screenHeight); + } - // Always scale the cursor for the game. + // Apply the scale cursor scaling for the game screen. _cursorState.vW = (int16)(_cursorState.w * screenScaleFactorX / 10000); _cursorState.vH = (int16)(_cursorState.h * screenScaleFactorY / 10000); _cursorState.vHotX = (int16)(_cursorState.hotX * screenScaleFactorX / 10000); diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h index ad8765bab1..956722c08f 100644 --- a/backends/graphics/opengl/opengl-graphics.h +++ b/backends/graphics/opengl/opengl-graphics.h @@ -104,7 +104,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL); + virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); virtual void setCursorPalette(const byte *colors, uint start, uint num); virtual void displayMessageOnOSD(const char *msg); @@ -283,7 +283,7 @@ protected: MousePos _cursorState; bool _cursorVisible; uint32 _cursorKeyColor; - int _cursorTargetScale; + bool _cursorDontScale; bool _cursorNeedsRedraw; /** diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index e841ecb834..652c08dc45 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -63,17 +63,12 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = { DECLARE_TRANSLATION_ADDITIONAL_CONTEXT("Normal (no scaling)", "lowres") -// Table of relative scalers magnitudes -// [definedScale - 1][scaleFactor - 1] -static ScalerProc *scalersMagn[3][3] = { +// Table of the cursor scalers [scaleFactor - 1] +static ScalerProc *scalersMagn[3] = { #ifdef USE_SCALERS - { Normal1x, AdvMame2x, AdvMame3x }, - { Normal1x, Normal1x, Normal1o5x }, - { Normal1x, Normal1x, Normal1x } + Normal1x, AdvMame2x, AdvMame3x #else // remove dependencies on other scalers - { Normal1x, Normal1x, Normal1x }, - { Normal1x, Normal1x, Normal1x }, - { Normal1x, Normal1x, Normal1x } + Normal1x, Normal1x, Normal1x #endif }; @@ -135,7 +130,7 @@ SurfaceSdlGraphicsManager::SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSou _overlayscreen(0), _tmpscreen2(0), _scalerProc(0), _screenChangeCount(0), _mouseVisible(false), _mouseNeedsRedraw(false), _mouseData(0), _mouseSurface(0), - _mouseOrigSurface(0), _cursorTargetScale(1), _cursorPaletteDisabled(true), + _mouseOrigSurface(0), _cursorDontScale(false), _cursorPaletteDisabled(true), _currentShakePos(0), _newShakePos(0), _paletteDirtyStart(0), _paletteDirtyEnd(0), _screenIsLocked(false), @@ -1718,7 +1713,7 @@ void SurfaceSdlGraphicsManager::warpMouse(int x, int y) { } } -void SurfaceSdlGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) { +void SurfaceSdlGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { #ifdef USE_RGB_COLOR if (!format) _cursorFormat = Graphics::PixelFormat::createFormatCLUT8(); @@ -1739,7 +1734,7 @@ void SurfaceSdlGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, _mouseKeyColor = keycolor; - _cursorTargetScale = cursorTargetScale; + _cursorDontScale = dontScale; if (_mouseCurState.w != (int)w || _mouseCurState.h != (int)h) { _mouseCurState.w = w; @@ -1847,51 +1842,34 @@ void SurfaceSdlGraphicsManager::blitCursor() { } int rW, rH; + int cursorScale; - if (_cursorTargetScale >= _videoMode.scaleFactor) { - // The cursor target scale is greater or equal to the scale at - // which the rest of the screen is drawn. We do not downscale - // the cursor image, we draw it at its original size. It will - // appear too large on screen. - - rW = w; - rH = h; - _mouseCurState.rHotX = _mouseCurState.hotX; - _mouseCurState.rHotY = _mouseCurState.hotY; - - // The virtual dimensions may be larger than the original. - - _mouseCurState.vW = w * _cursorTargetScale / _videoMode.scaleFactor; - _mouseCurState.vH = h * _cursorTargetScale / _videoMode.scaleFactor; - _mouseCurState.vHotX = _mouseCurState.hotX * _cursorTargetScale / - _videoMode.scaleFactor; - _mouseCurState.vHotY = _mouseCurState.hotY * _cursorTargetScale / - _videoMode.scaleFactor; + if (_cursorDontScale) { + // Don't scale the cursor at all if the user requests this behavior. + cursorScale = 1; } else { - // The cursor target scale is smaller than the scale at which - // the rest of the screen is drawn. We scale up the cursor - // image to make it appear correct. + // Scale the cursor with the game screen scale factor. + cursorScale = _videoMode.scaleFactor; + } - rW = w * _videoMode.scaleFactor / _cursorTargetScale; - rH = h * _videoMode.scaleFactor / _cursorTargetScale; - _mouseCurState.rHotX = _mouseCurState.hotX * _videoMode.scaleFactor / - _cursorTargetScale; - _mouseCurState.rHotY = _mouseCurState.hotY * _videoMode.scaleFactor / - _cursorTargetScale; + // Adapt the real hotspot according to the scale factor. + rW = w * cursorScale; + rH = h * cursorScale; + _mouseCurState.rHotX = _mouseCurState.hotX * cursorScale; + _mouseCurState.rHotY = _mouseCurState.hotY * cursorScale; - // The virtual dimensions will be the same as the original. + // The virtual dimensions will be the same as the original. - _mouseCurState.vW = w; - _mouseCurState.vH = h; - _mouseCurState.vHotX = _mouseCurState.hotX; - _mouseCurState.vHotY = _mouseCurState.hotY; - } + _mouseCurState.vW = w; + _mouseCurState.vH = h; + _mouseCurState.vHotX = _mouseCurState.hotX; + _mouseCurState.vHotY = _mouseCurState.hotY; #ifdef USE_SCALERS int rH1 = rH; // store original to pass to aspect-correction function later #endif - if (_videoMode.aspectRatioCorrection && _cursorTargetScale == 1) { + if (!_cursorDontScale && _videoMode.aspectRatioCorrection) { rH = real2Aspect(rH - 1) + 1; _mouseCurState.rHotY = real2Aspect(_mouseCurState.rHotY); } @@ -1922,21 +1900,25 @@ void SurfaceSdlGraphicsManager::blitCursor() { ScalerProc *scalerProc; - // If possible, use the same scaler for the cursor as for the rest of - // the game. This only works well with the non-blurring scalers so we - // actually only use the 1x, 1.5x, 2x and AdvMame scalers. - - if (_cursorTargetScale == 1 && (_videoMode.mode == GFX_DOUBLESIZE || _videoMode.mode == GFX_TRIPLESIZE)) - scalerProc = _scalerProc; - else - scalerProc = scalersMagn[_cursorTargetScale - 1][_videoMode.scaleFactor - 1]; + // Only apply scaling, when the user allows it. + if (!_cursorDontScale) { + // If possible, use the same scaler for the cursor as for the rest of + // the game. This only works well with the non-blurring scalers so we + // actually only use the 1x, 2x and AdvMame scalers. + if (_videoMode.mode == GFX_DOUBLESIZE || _videoMode.mode == GFX_TRIPLESIZE) + scalerProc = _scalerProc; + else + scalerProc = scalersMagn[_videoMode.scaleFactor - 1]; + } else { + scalerProc = Normal1x; + } scalerProc((byte *)_mouseOrigSurface->pixels + _mouseOrigSurface->pitch + 2, _mouseOrigSurface->pitch, (byte *)_mouseSurface->pixels, _mouseSurface->pitch, _mouseCurState.w, _mouseCurState.h); #ifdef USE_SCALERS - if (_videoMode.aspectRatioCorrection && _cursorTargetScale == 1) + if (!_cursorDontScale && _videoMode.aspectRatioCorrection) cursorStretch200To240((uint8 *)_mouseSurface->pixels, _mouseSurface->pitch, rW, rH1, 0, 0, 0); #endif diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h index f71096d43e..32fb219bcd 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.h +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h @@ -131,7 +131,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL); + virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); virtual void setCursorPalette(const byte *colors, uint start, uint num); #ifdef USE_OSD @@ -281,7 +281,7 @@ protected: #else byte _mouseKeyColor; #endif - int _cursorTargetScale; + bool _cursorDontScale; bool _cursorPaletteDisabled; SDL_Surface *_mouseOrigSurface; SDL_Surface *_mouseSurface; diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp index 58b735ef8b..bb79813f3b 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.cpp +++ b/backends/graphics/wincesdl/wincesdl-graphics.cpp @@ -1128,7 +1128,7 @@ void WINCESdlGraphicsManager::copyRectToScreen(const byte *src, int pitch, int x SDL_UnlockSurface(_screen); } -void WINCESdlGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) { +void WINCESdlGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { undrawMouse(); if (w == 0 || h == 0) diff --git a/backends/graphics/wincesdl/wincesdl-graphics.h b/backends/graphics/wincesdl/wincesdl-graphics.h index 2e8c3313b3..7cff8a16d9 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.h +++ b/backends/graphics/wincesdl/wincesdl-graphics.h @@ -73,7 +73,7 @@ public: void internDrawMouse(); void undrawMouse(); bool showMouse(bool visible); - void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format); // overloaded by CE backend + void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // overloaded by CE backend void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); void copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h); // overloaded by CE backend (FIXME) Graphics::Surface *lockScreen(); diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp index 525170d685..f133c65ed5 100644 --- a/backends/modular-backend.cpp +++ b/backends/modular-backend.cpp @@ -195,8 +195,8 @@ void ModularBackend::warpMouse(int x, int y) { _graphicsManager->warpMouse(x, y); } -void ModularBackend::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) { - _graphicsManager->setMouseCursor(buf, w, h, hotspotX, hotspotY, keycolor, cursorTargetScale, format); +void ModularBackend::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { + _graphicsManager->setMouseCursor(buf, w, h, hotspotX, hotspotY, keycolor, dontScale, format); } void ModularBackend::setCursorPalette(const byte *colors, uint start, uint num) { diff --git a/backends/modular-backend.h b/backends/modular-backend.h index 072ee805b6..150c12c3c8 100644 --- a/backends/modular-backend.h +++ b/backends/modular-backend.h @@ -100,7 +100,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL); + virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); virtual void setCursorPalette(const byte *colors, uint start, uint num); //@} diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h index 47a6515a2a..4dad1ee7ed 100644 --- a/backends/platform/android/android.h +++ b/backends/platform/android/android.h @@ -269,7 +269,7 @@ public: virtual void warpMouse(int x, int y); virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, - int cursorTargetScale, + bool dontScale, const Graphics::PixelFormat *format); virtual void setCursorPalette(const byte *colors, uint start, uint num); diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index 8bc914f567..304031b4ba 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -687,10 +687,10 @@ bool OSystem_Android::showMouse(bool visible) { void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, - uint32 keycolor, int cursorTargetScale, + uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { ENTER("%p, %u, %u, %d, %d, %u, %d, %p", buf, w, h, hotspotX, hotspotY, - keycolor, cursorTargetScale, format); + keycolor, dontScale, format); GLTHREADCHECK; @@ -766,7 +766,8 @@ void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h, } _mouse_hotspot = Common::Point(hotspotX, hotspotY); - _mouse_targetscale = cursorTargetScale; + // TODO: Adapt to the new "do not scale" cursor logic. + _mouse_targetscale = 1; } void OSystem_Android::setCursorPaletteInternal(const byte *colors, diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index 8ca48bf19e..ffe003ea1d 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -142,7 +142,7 @@ public: void warpMouse(int x, int y); // Set the bitmap that's used when drawing the cursor. - void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format); + void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // Replace the specified range of cursor the palette with new colors. void setCursorPalette(const byte *colors, uint start, uint num); diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp index e886b55869..e4e9a94ec8 100644 --- a/backends/platform/dc/display.cpp +++ b/backends/platform/dc/display.cpp @@ -293,7 +293,7 @@ void OSystem_Dreamcast::warpMouse(int x, int y) void OSystem_Dreamcast::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, - uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) + uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { _ms_cur_w = w; _ms_cur_h = h; diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index 73340ed18a..a6b85f207f 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -580,7 +580,7 @@ bool OSystem_DS::showMouse(bool visible) { void OSystem_DS::warpMouse(int x, int y) { } -void OSystem_DS::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, int targetCursorScale, const Graphics::PixelFormat *format) { +void OSystem_DS::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { if ((w > 0) && (w < 64) && (h > 0) && (h < 64)) { memcpy(_cursorImage, buf, w * h); _cursorW = w; @@ -588,7 +588,9 @@ void OSystem_DS::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, i _cursorHotX = hotspotX; _cursorHotY = hotspotY; _cursorKey = keycolor; - _cursorScale = targetCursorScale; + // TODO: The old target scales was saved, but never used. Should the + // new "do not scale" logic be implemented? + //_cursorScale = targetCursorScale; refreshCursor(); } } diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index 6aa3731916..11b0988666 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -114,7 +114,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, int targetCursorScale, const Graphics::PixelFormat *format); + virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format); virtual bool pollEvent(Common::Event &event); virtual uint32 getMillis(); diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h index b443e22f56..e06c7973ab 100644 --- a/backends/platform/iphone/osys_main.h +++ b/backends/platform/iphone/osys_main.h @@ -161,7 +161,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 255, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL); + virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 255, bool dontScale = false, const Graphics::PixelFormat *format = NULL); virtual void setCursorPalette(const byte *colors, uint start, uint num); virtual bool pollEvent(Common::Event &event); diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm index c6b6e6d757..ddfa8f5030 100644 --- a/backends/platform/iphone/osys_video.mm +++ b/backends/platform/iphone/osys_video.mm @@ -398,8 +398,8 @@ void OSystem_IPHONE::dirtyFullOverlayScreen() { } } -void OSystem_IPHONE::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) { - //printf("setMouseCursor(%p, %u, %u, %i, %i, %u, %d, %p)\n", (const void *)buf, w, h, hotspotX, hotspotY, keycolor, cursorTargetScale, (const void *)format); +void OSystem_IPHONE::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { + //printf("setMouseCursor(%p, %u, %u, %i, %i, %u, %d, %p)\n", (const void *)buf, w, h, hotspotX, hotspotY, keycolor, dontScale, (const void *)format); const Graphics::PixelFormat pixelFormat = format ? *format : Graphics::PixelFormat::createFormatCLUT8(); #if 0 diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h index 4788beb1ca..b8519eeea6 100644 --- a/backends/platform/n64/osys_n64.h +++ b/backends/platform/n64/osys_n64.h @@ -182,7 +182,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format); + virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); virtual void setCursorPalette(const byte *colors, uint start, uint num); virtual bool pollEvent(Common::Event &event); diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp index c3adb9691c..f36f7399e1 100644 --- a/backends/platform/n64/osys_n64_base.cpp +++ b/backends/platform/n64/osys_n64_base.cpp @@ -773,7 +773,7 @@ void OSystem_N64::warpMouse(int x, int y) { _dirtyOffscreen = true; } -void OSystem_N64::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) { +void OSystem_N64::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { if (!w || !h) return; _mouseHotspotX = hotspotX; diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp index d4e993da63..668ac93a07 100644 --- a/backends/platform/ps2/systemps2.cpp +++ b/backends/platform/ps2/systemps2.cpp @@ -618,7 +618,7 @@ void OSystem_PS2::warpMouse(int x, int y) { _screen->setMouseXy(x, y); } -void OSystem_PS2::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) { +void OSystem_PS2::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { _screen->setMouseOverlay(buf, w, h, hotspot_x, hotspot_y, keycolor); } diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h index 3a0e247737..7bbe061e42 100644 --- a/backends/platform/ps2/systemps2.h +++ b/backends/platform/ps2/systemps2.h @@ -80,7 +80,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = 0); + virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = 0); virtual uint32 getMillis(); virtual void delayMillis(uint msecs); diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 5fa5110684..958a3a22c6 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -303,7 +303,7 @@ void OSystem_PSP::warpMouse(int x, int y) { _cursor.setXY(x, y); } -void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) { +void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { DEBUG_ENTER_FUNC(); _displayManager.waitUntilRenderFinished(); _pendingUpdate = false; @@ -314,7 +314,9 @@ void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, } _cursor.setKeyColor(keycolor); - _cursor.setCursorTargetScale(cursorTargetScale); + // TODO: The old target scale was saved but never used. Should the new + // "do not scale" logic be implemented? + //_cursor.setCursorTargetScale(cursorTargetScale); _cursor.setSizeAndScummvmPixelFormat(w, h, format); _cursor.setHotspot(hotspotX, hotspotY); _cursor.clearKeyColor(); diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h index e6b445e232..c72053f52c 100644 --- a/backends/platform/psp/osys_psp.h +++ b/backends/platform/psp/osys_psp.h @@ -118,7 +118,7 @@ public: // Mouse related bool showMouse(bool visible); void warpMouse(int x, int y); - void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format); + void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // Events and input bool pollEvent(Common::Event &event); diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index 64197f913a..b6784d59e4 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -189,7 +189,7 @@ public: virtual void warpMouse(int x, int y); virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, - int cursorTargetScale, + bool dontScale, const Graphics::PixelFormat *format); virtual bool pollEvent(Common::Event &event); diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index 83607984cc..a00cea8252 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -644,7 +644,7 @@ void OSystem_Wii::warpMouse(int x, int y) { void OSystem_Wii::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, - int cursorTargetScale, + bool dontScale, const Graphics::PixelFormat *format) { gfx_tex_format_t tex_format = GFX_TF_PALETTE_RGB5A3; uint tw, th; @@ -742,7 +742,8 @@ void OSystem_Wii::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, _mouseHotspotX = hotspotX; _mouseHotspotY = hotspotY; - _cursorScale = cursorTargetScale; + // TODO: Adapt to new dontScale logic! + _cursorScale = 1; if ((_texMouse.palette) && (oldKeycolor != _mouseKeyColor)) _cursorPaletteDirty = true; diff --git a/common/system.h b/common/system.h index dc74533861..976a3d2c4a 100644 --- a/common/system.h +++ b/common/system.h @@ -883,10 +883,11 @@ public: * @param keycolor transparency color value. This should not exceed the maximum color value of the specified format. * In case it does the behavior is undefined. The backend might just error out or simply ignore the * value. (The SDL backend will just assert to prevent abuse of this). - * @param cursorTargetScale scale factor which cursor is designed for + * @param dontScale Whether the cursor should never be scaled. An exception are high ppi displays, where the cursor + * would be too small to notice otherwise, these are allowed to scale the cursor anyway. * @param format pointer to the pixel format which cursor graphic uses (0 means CLUT8) */ - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL) = 0; + virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) = 0; /** * Replace the specified range of cursor the palette with new colors. diff --git a/engines/gob/draw_v1.cpp b/engines/gob/draw_v1.cpp index fb15fdbc19..878c1dc265 100644 --- a/engines/gob/draw_v1.cpp +++ b/engines/gob/draw_v1.cpp @@ -123,7 +123,7 @@ void Draw_v1::animateCursor(int16 cursor) { (cursorIndex + 1) * _cursorWidth - 1, _cursorHeight - 1, 0, 0); CursorMan.replaceCursor(_scummvmCursor->getData(), - _cursorWidth, _cursorHeight, hotspotX, hotspotY, 0, 1, &_vm->getPixelFormat()); + _cursorWidth, _cursorHeight, hotspotX, hotspotY, 0, false, &_vm->getPixelFormat()); if (_frontSurface != _backSurface) { _showCursor = 3; diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index ab9a90de8f..d9b7a12639 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -161,7 +161,7 @@ void Draw_v2::animateCursor(int16 cursor) { keyColor = _cursorKeyColors[cursorIndex]; CursorMan.replaceCursor(_scummvmCursor->getData(), - _cursorWidth, _cursorHeight, hotspotX, hotspotY, keyColor, 1, &_vm->getPixelFormat()); + _cursorWidth, _cursorHeight, hotspotX, hotspotY, keyColor, false, &_vm->getPixelFormat()); if (_doCursorPalettes && _doCursorPalettes[cursorIndex]) { CursorMan.replaceCursorPalette(_cursorPalettes + (cursorIndex * 256 * 3), diff --git a/engines/groovie/cursor.cpp b/engines/groovie/cursor.cpp index abefac54bd..6422570220 100644 --- a/engines/groovie/cursor.cpp +++ b/engines/groovie/cursor.cpp @@ -387,7 +387,7 @@ void Cursor_v2::enable() { void Cursor_v2::showFrame(uint16 frame) { int offset = _width * _height * frame * 2; - CursorMan.replaceCursor((const byte *)(_img + offset), _width, _height, _width >> 1, _height >> 1, 0, 1, &_format); + CursorMan.replaceCursor((const byte *)(_img + offset), _width, _height, _width >> 1, _height >> 1, 0, false, &_format); } diff --git a/engines/lastexpress/data/cursor.cpp b/engines/lastexpress/data/cursor.cpp index 86a66b49d9..a3e7b773a7 100644 --- a/engines/lastexpress/data/cursor.cpp +++ b/engines/lastexpress/data/cursor.cpp @@ -93,7 +93,7 @@ void Cursor::setStyle(CursorStyle style) { Graphics::PixelFormat pf = g_system->getScreenFormat(); CursorMan.replaceCursor((const byte *)getCursorImage(style), 32, 32, _cursors[style].hotspotX, _cursors[style].hotspotY, - 0, 1, &pf); + 0, false, &pf); } const uint16 *Cursor::getCursorImage(CursorStyle style) const { diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp index 3cf5ac740e..47a7d0225b 100644 --- a/engines/mohawk/cursors.cpp +++ b/engines/mohawk/cursors.cpp @@ -125,7 +125,7 @@ void MystCursorManager::setCursor(uint16 id) { CursorMan.replaceCursorPalette(mhkSurface->getPalette(), 0, 256); } else { Graphics::PixelFormat pixelFormat = g_system->getScreenFormat(); - CursorMan.replaceCursor((byte *)surface->pixels, surface->w, surface->h, hotspotX, hotspotY, pixelFormat.RGBToColor(255, 255, 255), 1, &pixelFormat); + CursorMan.replaceCursor((byte *)surface->pixels, surface->w, surface->h, hotspotX, hotspotY, pixelFormat.RGBToColor(255, 255, 255), false, &pixelFormat); } _vm->_needsUpdate = true; diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 42f11498d9..88681898f5 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -121,13 +121,13 @@ void ScummEngine::updateCursor() { CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, _cursor.hotspotX, _cursor.hotspotY, (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), - (_game.heversion == 70 ? 2 : 1), + (_game.heversion == 70 ? true : false), &format); #else CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, _cursor.hotspotX, _cursor.hotspotY, (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), - (_game.heversion == 70 ? 2 : 1)); + (_game.heversion == 70 ? true : false)); #endif } diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp index 425714ea34..825b5c2e19 100644 --- a/graphics/cursorman.cpp +++ b/graphics/cursorman.cpp @@ -55,14 +55,14 @@ bool CursorManager::showMouse(bool visible) { return g_system->showMouse(visible); } -void CursorManager::pushCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int targetScale, const Graphics::PixelFormat *format) { - Cursor *cur = new Cursor(buf, w, h, hotspotX, hotspotY, keycolor, targetScale, format); +void CursorManager::pushCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { + Cursor *cur = new Cursor(buf, w, h, hotspotX, hotspotY, keycolor, dontScale, format); cur->_visible = isVisible(); _cursorStack.push(cur); if (buf) { - g_system->setMouseCursor(cur->_data, w, h, hotspotX, hotspotY, keycolor, targetScale, format); + g_system->setMouseCursor(cur->_data, w, h, hotspotX, hotspotY, keycolor, dontScale, format); } } @@ -75,7 +75,7 @@ void CursorManager::popCursor() { if (!_cursorStack.empty()) { cur = _cursorStack.top(); - g_system->setMouseCursor(cur->_data, cur->_width, cur->_height, cur->_hotspotX, cur->_hotspotY, cur->_keycolor, cur->_targetScale, &cur->_format); + g_system->setMouseCursor(cur->_data, cur->_width, cur->_height, cur->_hotspotX, cur->_hotspotY, cur->_keycolor, cur->_dontScale, &cur->_format); } g_system->showMouse(isVisible()); @@ -98,10 +98,10 @@ void CursorManager::popAllCursors() { g_system->showMouse(isVisible()); } -void CursorManager::replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int targetScale, const Graphics::PixelFormat *format) { +void CursorManager::replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { if (_cursorStack.empty()) { - pushCursor(buf, w, h, hotspotX, hotspotY, keycolor, targetScale, format); + pushCursor(buf, w, h, hotspotX, hotspotY, keycolor, dontScale, format); return; } @@ -131,7 +131,7 @@ void CursorManager::replaceCursor(const byte *buf, uint w, uint h, int hotspotX, cur->_hotspotX = hotspotX; cur->_hotspotY = hotspotY; cur->_keycolor = keycolor; - cur->_targetScale = targetScale; + cur->_dontScale = dontScale; #ifdef USE_RGB_COLOR if (format) cur->_format = *format; @@ -139,7 +139,7 @@ void CursorManager::replaceCursor(const byte *buf, uint w, uint h, int hotspotX, cur->_format = Graphics::PixelFormat::createFormatCLUT8(); #endif - g_system->setMouseCursor(cur->_data, w, h, hotspotX, hotspotY, keycolor, targetScale, format); + g_system->setMouseCursor(cur->_data, w, h, hotspotX, hotspotY, keycolor, dontScale, format); } bool CursorManager::supportsCursorPalettes() { @@ -225,7 +225,7 @@ void CursorManager::replaceCursorPalette(const byte *colors, uint start, uint nu } } -CursorManager::Cursor::Cursor(const byte *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int targetScale, const Graphics::PixelFormat *format) { +CursorManager::Cursor::Cursor(const byte *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { #ifdef USE_RGB_COLOR if (!format) _format = Graphics::PixelFormat::createFormatCLUT8(); @@ -245,7 +245,7 @@ CursorManager::Cursor::Cursor(const byte *data, uint w, uint h, int hotspotX, in _height = h; _hotspotX = hotspotX; _hotspotY = hotspotY; - _targetScale = targetScale; + _dontScale = dontScale; } CursorManager::Cursor::~Cursor() { diff --git a/graphics/cursorman.h b/graphics/cursorman.h index 543a5d0a5c..852109d7e6 100644 --- a/graphics/cursorman.h +++ b/graphics/cursorman.h @@ -63,14 +63,15 @@ public: * @param hotspotY the hotspot Y coordinate * @param keycolor the color value for the transparent color. This may not exceed * the maximum color value as defined by format. - * @param targetScale the scale for which the cursor is designed + * @param dontScale Whether the cursor should never be scaled. An exception are high ppi displays, where the cursor + * would be too small to notice otherwise, these are allowed to scale the cursor anyway. * @param format a pointer to the pixel format which the cursor graphic uses, * CLUT8 will be used if this is NULL or not specified. * @note It is ok for the buffer to be a NULL pointer. It is sometimes * useful to push a "dummy" cursor and modify it later. The * cursor will be added to the stack, but not to the backend. */ - void pushCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int targetScale = 1, const Graphics::PixelFormat *format = NULL); + void pushCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); /** * Pop a cursor from the stack, and restore the previous one to the @@ -90,11 +91,12 @@ public: * @param hotspotY the hotspot Y coordinate * @param keycolor the color value for the transparent color. This may not exceed * the maximum color value as defined by format. - * @param targetScale the scale for which the cursor is designed + * @param dontScale Whether the cursor should never be scaled. An exception are high ppi displays, where the cursor + * would be too small to notice otherwise, these are allowed to scale the cursor anyway. * @param format a pointer to the pixel format which the cursor graphic uses, * CLUT8 will be used if this is NULL or not specified. */ - void replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int targetScale = 1, const Graphics::PixelFormat *format = NULL); + void replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); /** * Pop all of the cursors and cursor palettes from their respective stacks. @@ -175,11 +177,11 @@ private: int _hotspotY; uint32 _keycolor; Graphics::PixelFormat _format; - int _targetScale; + bool _dontScale; uint _size; - Cursor(const byte *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int targetScale = 1, const Graphics::PixelFormat *format = NULL); + Cursor(const byte *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); ~Cursor(); }; diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index be0a5db601..1bf7ad3c85 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -454,7 +454,7 @@ void ThemeEngine::refresh() { if (_useCursor) { CursorMan.replaceCursorPalette(_cursorPal, 0, _cursorPalSize); - CursorMan.replaceCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale); + CursorMan.replaceCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, true); } } } @@ -465,7 +465,7 @@ void ThemeEngine::enable() { if (_useCursor) { CursorMan.pushCursorPalette(_cursorPal, 0, _cursorPalSize); - CursorMan.pushCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale); + CursorMan.pushCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, true); CursorMan.showMouse(true); } @@ -1287,7 +1287,7 @@ void ThemeEngine::openDialog(bool doBuffer, ShadingStyle style) { _vectorRenderer->setSurface(&_screen); } -bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int hotspotY, int scale) { +bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int hotspotY) { if (!_system->hasFeature(OSystem::kFeatureCursorPalette)) return true; @@ -1305,7 +1305,6 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int // Set up the cursor parameters _cursorHotspotX = hotspotX; _cursorHotspotY = hotspotY; - _cursorTargetScale = scale; _cursorWidth = cursor->w; _cursorHeight = cursor->h; diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index acded085f5..67221d98ce 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -35,7 +35,7 @@ #include "graphics/pixelformat.h" -#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.12" +#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.13" class OSystem; @@ -495,9 +495,8 @@ public: * @param filename File name of the bitmap to load. * @param hotspotX X Coordinate of the bitmap which does the cursor click. * @param hotspotY Y Coordinate of the bitmap which does the cursor click. - * @param scale Scale at which the bitmap is supposed to be used. */ - bool createCursor(const Common::String &filename, int hotspotX, int hotspotY, int scale); + bool createCursor(const Common::String &filename, int hotspotX, int hotspotY); /** * Wrapper for restoring data from the Back Buffer to the screen. @@ -669,7 +668,6 @@ protected: bool _useCursor; int _cursorHotspotX, _cursorHotspotY; - int _cursorTargetScale; enum { MAX_CURS_COLORS = 255 }; diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp index 9ccdedd564..9a85399ed1 100644 --- a/gui/ThemeParser.cpp +++ b/gui/ThemeParser.cpp @@ -218,15 +218,12 @@ bool ThemeParser::parserCallback_cursor(ParserNode *node) { return true; } - int spotx, spoty, scale; + int spotx, spoty; if (!parseIntegerKey(node->values["hotspot"], 2, &spotx, &spoty)) return parserError("Error parsing cursor Hot Spot coordinates."); - if (!parseIntegerKey(node->values["scale"], 1, &scale)) - return parserError("Error parsing cursor scale."); - - if (!_theme->createCursor(node->values["file"], spotx, spoty, scale)) + if (!_theme->createCursor(node->values["file"], spotx, spoty)) return parserError("Error creating Bitmap Cursor."); return true; diff --git a/gui/ThemeParser.h b/gui/ThemeParser.h index 4b7e88cbf3..82f774b803 100644 --- a/gui/ThemeParser.h +++ b/gui/ThemeParser.h @@ -85,7 +85,6 @@ protected: XML_KEY(cursor) XML_PROP(file, true) XML_PROP(hotspot, true) - XML_PROP(scale, true) XML_PROP(resolution, false) KEY_END() diff --git a/gui/themes/default.inc b/gui/themes/default.inc index 5ee9b9202a..86d0061e1b 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -610,50 +610,48 @@ "/> " " " " " -" " +" " " " -" " -" " -" " -" " +" " +" " +" " +" " " " " " " " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " " " " " -" " -" " -" " " " " " " " " " " " " " " " " " " " " " " " -" " +" " " " -" " +" " " " @@ -701,39 +699,38 @@ " " " " " " -" " +" " " " " " " " " " " " -" " -" " +" " " " " " " " " " " " " " " " -" " -" " +" " +" " " " @@ -741,7 +738,7 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -755,10 +752,10 @@ " " " " " " -" " +" " " " " " -" " +" " " " " " " " " " -" " +" " " " @@ -779,7 +776,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -797,7 +794,7 @@ " " " " " " -" " +" " " " @@ -805,7 +802,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -813,7 +810,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -821,7 +818,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -835,7 +832,7 @@ "type='Radiobutton' " "/> " " " -" " +" " " " @@ -849,9 +846,8 @@ " " " " " " -" " -" " -" " +" " +" " " " @@ -862,7 +858,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -873,7 +869,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -884,8 +880,8 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " @@ -894,7 +890,7 @@ " " " " " " -" " +" " " " @@ -902,7 +898,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -917,7 +913,7 @@ " " -" " +" " " " @@ -933,7 +929,7 @@ " " " " " " -" " +" " " " @@ -951,7 +947,7 @@ " " " " " " -" " +" " " " @@ -963,7 +959,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -975,7 +971,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -999,7 +995,7 @@ " " " " " " -" " +" " " " @@ -1007,25 +1003,31 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " " " " " -" " +" " " " " " " " -" " +" " " " " " " " " " -" " +" " " " " " -" " +" " " " " " " " " " -" " +" " " " @@ -1083,7 +1085,7 @@ " " " " " " -" " +" " " " @@ -1091,7 +1093,7 @@ " " " " " " -" " +" " " " @@ -1099,7 +1101,7 @@ " " " " " " -" " +" " " " @@ -1107,7 +1109,7 @@ " " " " " " -" " +" " " " @@ -1115,34 +1117,43 @@ " " " " " " -" " -" " +" " +" " " " " " " " -" " +" " " " " " " " -" " +" " +" " " " " " " " -" " +" " " " " " " " " " -" " -" " +" " +" " " " @@ -1164,7 +1175,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1176,7 +1187,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1187,7 +1198,7 @@ " " " " " " -" " +" " " " @@ -1212,57 +1223,55 @@ " " " " " " -" " +" " " " " " -" " -" " +" " " " " " -" " +" " " " " " " " +" " +" " -" " " " " " " " " " " " " " -" " -" " -" " +" " " " @@ -1273,7 +1282,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1284,7 +1293,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1295,33 +1304,34 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " " " -" " -" " -" " +" " " " +" " " " " " " " " " -" " +" " +" " +" " " " @@ -1332,8 +1342,8 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " @@ -1348,23 +1358,15 @@ " " " " " " -" " -" " -" " +" " +" " " " -" " -" " -" " +" " " " " " -" " +" " " " @@ -1374,16 +1376,16 @@ " " " " " " -" " -" " +" " +" " " " " " -" " +" " " " @@ -1400,7 +1402,7 @@ " " " " " " " " " " " " -" " +" " " " " " " " -" " +" " " " @@ -1442,20 +1444,20 @@ " " " " " " -" " +" " " " " " " " " " " " " " " " " " -" " +" " " " -" " +" " " " " " " " -" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " -" " +" " " " " " " " " " -" " -" " +" " +" " " " -" " " " " " " " " " " " " " -" " +" " " " -" " -" " -" " -" " +" " +" " +" " +" " " " " " " " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " -" " +" " +" " +" " +" " +" " +" " +" " +" " " " " " +" " +" " +" " " " " " " " " " " " " " " " " " " " " " " " -" " +" " " " -" " +" " " " @@ -1644,38 +1646,39 @@ " " " " " " -" " +" " " " " " " " " " " " -" " +" " +" " " " " " " " " " " " " " " " -" " -" " +" " +" " " " @@ -1683,7 +1686,7 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1697,10 +1700,10 @@ " " " " " " -" " +" " " " " " -" " +" " " " " " " " " " -" " +" " " " @@ -1721,7 +1724,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1739,7 +1742,7 @@ " " " " " " -" " +" " " " @@ -1747,7 +1750,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1755,7 +1758,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1763,7 +1766,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1777,7 +1780,7 @@ "type='Radiobutton' " "/> " " " -" " +" " " " @@ -1791,8 +1794,9 @@ " " " " " " -" " -" " +" " +" " +" " " " @@ -1803,7 +1807,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1814,7 +1818,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -1825,8 +1829,8 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " @@ -1835,7 +1839,7 @@ " " " " " " -" " +" " " " @@ -1843,7 +1847,7 @@ "type='PopUp' " "/> " " " -" " +" " " " @@ -1858,7 +1862,7 @@ " " -" " +" " " " @@ -1874,7 +1878,7 @@ " " " " " " -" " +" " " " @@ -1892,7 +1896,7 @@ " " " " " " -" " +" " " " @@ -1904,7 +1908,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1916,7 +1920,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -1940,7 +1944,7 @@ " " " " " " -" " +" " " " @@ -1948,31 +1952,25 @@ "height='Globals.Line.Height' " "/> " " " -" " +" " " " " " " " -" " +" " " " " " " " -" " +" " " " " " " " " " -" " +" " " " " " -" " +" " " " " " " " " " -" " +" " " " @@ -2030,7 +2028,7 @@ " " " " " " -" " +" " " " @@ -2038,7 +2036,7 @@ " " " " " " -" " +" " " " @@ -2046,7 +2044,7 @@ " " " " " " -" " +" " " " @@ -2054,7 +2052,7 @@ " " " " " " -" " +" " " " @@ -2062,43 +2060,34 @@ " " " " " " -" " -" " +" " +" " " " " " " " -" " +" " " " " " " " -" " -" " +" " " " " " " " -" " +" " " " " " " " " " -" " -" " +" " +" " " " @@ -2120,7 +2109,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -2132,7 +2121,7 @@ "width='Globals.Line.Height' " "/> " " " -" " +" " " " @@ -2143,7 +2132,7 @@ " " " " " " -" " +" " " " @@ -2168,55 +2157,57 @@ " " " " " " -" " +" " " " " " -" " +" " +" " " " " " -" " +" " " " " " " " -" " -" " +" " " " " " " " " " " " " " -" " +" " +" " +" " " " @@ -2227,7 +2218,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -2238,7 +2229,7 @@ "type='SmallLabel' " "/> " " " -" " +" " " " @@ -2249,34 +2240,33 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " " " -" " +" " +" " +" " " " -" " " " " " " " " " -" " -" " -" " +" " " " @@ -2287,8 +2277,8 @@ "type='SmallLabel' " "/> " " " -" " -" " +" " +" " " " @@ -2303,15 +2293,23 @@ " " " " " " -" " -" " +" " +" " +" " " " -" " +" " +" " +" " " " " " -" " +" " " " @@ -2321,16 +2319,16 @@ " " " " " " -" " -" " +" " +" " " " " " -" " +" " " " @@ -2347,7 +2345,7 @@ " " " " " " " " " " " " -" " +" " " " " " " " -" " +" " " " @@ -2389,20 +2387,20 @@ " " " " " " -" " +" " " " " " " " " " " " " " " " " " -" " +" " " " -" " +" " " " " " " " +" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " -" " +" " " " " " " " " " -" " -" " +" " +" " " " +" " " " " " " " " " diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip index ec1728b778..d126ed0774 100644 Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ diff --git a/gui/themes/scummclassic/THEMERC b/gui/themes/scummclassic/THEMERC index 7cbed97e40..d4bed29cf8 100644 --- a/gui/themes/scummclassic/THEMERC +++ b/gui/themes/scummclassic/THEMERC @@ -1 +1 @@ -[SCUMMVM_STX0.8.12:ScummVM Classic Theme:No Author] +[SCUMMVM_STX0.8.13:ScummVM Classic Theme:No Author] diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip index deae315e30..db116325e2 100644 Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC index 326993e98d..60744d386f 100644 --- a/gui/themes/scummmodern/THEMERC +++ b/gui/themes/scummmodern/THEMERC @@ -1 +1 @@ -[SCUMMVM_STX0.8.12:ScummVM Modern Theme:No Author] +[SCUMMVM_STX0.8.13:ScummVM Modern Theme:No Author] diff --git a/gui/themes/scummmodern/scummmodern_gfx.stx b/gui/themes/scummmodern/scummmodern_gfx.stx index 970d78a5ae..037c327235 100644 --- a/gui/themes/scummmodern/scummmodern_gfx.stx +++ b/gui/themes/scummmodern/scummmodern_gfx.stx @@ -187,8 +187,8 @@ - - + + -- cgit v1.2.3 From 627e870629cdab1009d3279453d082a3c44acd03 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 3 Jun 2012 03:29:35 +0200 Subject: GOB: Limit Penetration movement to walkable tiles --- engines/gob/minigames/geisha/penetration.cpp | 36 ++++++++++++++++++++++++---- engines/gob/minigames/geisha/penetration.h | 2 ++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 377835c45f..c8fbe31249 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -423,6 +423,15 @@ int16 Penetration::checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseB return _vm->_util->checkKey(); } +bool Penetration::isWalkable(byte tile) const { + // Only walls are nonwalkable + + if (tile == 50) + return false; + + return true; +} + void Penetration::handleSub(int16 key) { if (key == kKeyLeft) moveSub(-5, 0, kAnimationDriveW); @@ -435,11 +444,30 @@ void Penetration::handleSub(int16 key) { } void Penetration::moveSub(int x, int y, uint16 animation) { - _mapX = CLIP(_mapX + x, 0, kMapWidth * kMapTileWidth); - _mapY = CLIP(_mapY + y, 0, kMapHeight * kMapTileHeight); + // Limit the movement to walkable tiles + + int16 minX = 0; + if ((_subTileX > 0) && !isWalkable(_mapTiles[_subTileY * kMapWidth + (_subTileX - 1)])) + minX = _subTileX * kMapTileWidth; + + int16 maxX = kMapWidth * kMapTileWidth; + if ((_subTileX < (kMapWidth - 1)) && !isWalkable(_mapTiles[_subTileY * kMapWidth + (_subTileX + 1)])) + maxX = _subTileX * kMapTileWidth; + + int16 minY = 0; + if ((_subTileY > 0) && !isWalkable(_mapTiles[(_subTileY - 1) * kMapWidth + _subTileX])) + minY = _subTileY * kMapTileHeight; + + int16 maxY = kMapHeight * kMapTileHeight; + if ((_subTileY < (kMapHeight - 1)) && !isWalkable(_mapTiles[(_subTileY + 1) * kMapWidth + _subTileX])) + maxY = _subTileY * kMapTileHeight; + + _mapX = CLIP(_mapX + x, minX, maxX); + _mapY = CLIP(_mapY + y, minY, maxY); - _subTileX = _mapX / kMapTileWidth; - _subTileY = _mapY / kMapTileHeight; + // The tile the sub is on is where its mid-point is + _subTileX = (_mapX + (kMapTileWidth / 2)) / kMapTileWidth; + _subTileY = (_mapY + (kMapTileHeight / 2)) / kMapTileHeight; _mapUpdate = true; diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 28a288928b..9109cb5c68 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -96,6 +96,8 @@ private: void handleSub(int16 key); void moveSub(int x, int y, uint16 animation); + + bool isWalkable(byte tile) const; }; } // End of namespace Geisha -- cgit v1.2.3 From 5a245bd4f2cbac8aee4efe7220533f41d6418312 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 3 Jun 2012 03:40:04 +0200 Subject: GOB: Consume shields in Penetration --- engines/gob/minigames/geisha/penetration.cpp | 27 +++++++++++++++++++++++++++ engines/gob/minigames/geisha/penetration.h | 12 ++++++++++++ 2 files changed, 39 insertions(+) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index c8fbe31249..e4e7798216 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -193,6 +193,10 @@ const byte Penetration::kMaps[kModeCount][kFloorCount][kMapWidth * kMapHeight] = }; +Penetration::Position::Position(uint16 pX, uint16 pY) : x(pX), y(pY) { +} + + Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _objects(0), _sub(0), _shieldMeter(0), _healthMeter(0), _floor(0), _mapUpdate(false), _mapX(0), _mapY(0), _subTileX(0), _subTileY(0) { @@ -303,6 +307,8 @@ void Penetration::createMap() { // Copy the correct map memcpy(_mapTiles, kMaps[_testMode ? 1 : 0][_floor], kMapWidth * kMapHeight); + _shields.clear(); + _map->fill(kColorBlack); // Draw the map tiles @@ -378,6 +384,8 @@ void Penetration::createMap() { _map->fillRect(posX + 4, posY + 8, posX + 7, posY + 18, kColorFloor); // Area left to shield _map->fillRect(posX + 17, posY + 8, posX + 20, posY + 18, kColorFloor); // Area right to shield + + _shields.push_back(Position(x, y)); break; case 57: // Start position @@ -473,6 +481,25 @@ void Penetration::moveSub(int x, int y, uint16 animation) { if (_sub->getAnimation() != animation) _sub->setAnimation(animation); + + checkShields(); +} + +void Penetration::checkShields() { + for (Common::List::iterator pos = _shields.begin(); pos != _shields.end(); ++pos) { + if ((pos->x == _subTileX) && (pos->y == _subTileY)) { + // Charge shields + _shieldMeter->setMaxValue(); + + // Erase the shield from the map + const int mapX = kPlayAreaBorderWidth + pos->x * kMapTileWidth; + const int mapY = kPlayAreaBorderHeight + pos->y * kMapTileHeight; + _sprites->draw(*_map, 30, mapX, mapY); + + _shields.erase(pos); + break; + } + } } void Penetration::updateAnims() { diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 9109cb5c68..4d3455b638 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -54,6 +54,13 @@ private: static const byte kMaps[kModeCount][kFloorCount][kMapWidth * kMapHeight]; + struct Position { + uint16 x; + uint16 y; + + Position(uint16 pX, uint16 pY); + }; + GobEngine *_vm; bool _hasAccessPass; @@ -83,6 +90,9 @@ private: uint8 _subTileX; uint8 _subTileY; + Common::List _shields; + + void init(); void deinit(); @@ -98,6 +108,8 @@ private: void moveSub(int x, int y, uint16 animation); bool isWalkable(byte tile) const; + + void checkShields(); }; } // End of namespace Geisha -- cgit v1.2.3 From d124b87649c14e1851228821fcb6d3a523f1e0ae Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 3 Jun 2012 17:15:18 +0200 Subject: GOB: Remove unnecessary include A remnant of when we were still doing dithering color LUT creation at startup --- engines/gob/video.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index c865b2b40e..3b1c6423bb 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -25,7 +25,6 @@ #include "engines/util.h" #include "graphics/cursorman.h" -#include "graphics/fontman.h" #include "graphics/palette.h" #include "graphics/surface.h" -- cgit v1.2.3 From db99d23717ce4f39f9d9f55ce1abf0d8b73cc630 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 3 Jun 2012 18:58:03 +0200 Subject: GOB: Fix invalid reads in Geisha's minigames --- engines/gob/aniobject.cpp | 26 +++++++++++++++++--------- engines/gob/aniobject.h | 8 ++++---- engines/gob/minigames/geisha/diving.cpp | 8 ++++---- engines/gob/minigames/geisha/penetration.cpp | 12 +++++++----- 4 files changed, 32 insertions(+), 22 deletions(-) diff --git a/engines/gob/aniobject.cpp b/engines/gob/aniobject.cpp index 154f8e04ed..54534cd60b 100644 --- a/engines/gob/aniobject.cpp +++ b/engines/gob/aniobject.cpp @@ -167,19 +167,21 @@ bool ANIObject::isIn(const ANIObject &obj) const { obj.isIn(frameX + frameWidth - 1, frameY + frameHeight - 1); } -void ANIObject::draw(Surface &dest, int16 &left, int16 &top, +bool ANIObject::draw(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) { if (!_visible) - return; + return false; if (_cmp) - drawCMP(dest, left, top, right, bottom); + return drawCMP(dest, left, top, right, bottom); else if (_ani) - drawANI(dest, left, top, right, bottom); + return drawANI(dest, left, top, right, bottom); + + return false; } -void ANIObject::drawCMP(Surface &dest, int16 &left, int16 &top, +bool ANIObject::drawCMP(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) { if (!_background) { @@ -209,9 +211,11 @@ void ANIObject::drawCMP(Surface &dest, int16 &left, int16 &top, top = _backgroundTop; right = _backgroundRight; bottom = _backgroundBottom; + + return true; } -void ANIObject::drawANI(Surface &dest, int16 &left, int16 &top, +bool ANIObject::drawANI(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) { if (!_background) { @@ -224,7 +228,7 @@ void ANIObject::drawANI(Surface &dest, int16 &left, int16 &top, const ANIFile::Animation &animation = _ani->getAnimationInfo(_animation); if (_frame >= animation.frameCount) - return; + return false; const ANIFile::FrameArea &area = animation.frameAreas[_frame]; @@ -244,13 +248,15 @@ void ANIObject::drawANI(Surface &dest, int16 &left, int16 &top, top = _backgroundTop; right = _backgroundRight; bottom = _backgroundBottom; + + return true; } -void ANIObject::clear(Surface &dest, int16 &left, int16 &top, +bool ANIObject::clear(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) { if (!_drawn) - return; + return false; const int16 bgRight = _backgroundRight - _backgroundLeft; const int16 bgBottom = _backgroundBottom - _backgroundTop; @@ -263,6 +269,8 @@ void ANIObject::clear(Surface &dest, int16 &left, int16 &top, top = _backgroundTop; right = _backgroundRight; bottom = _backgroundBottom; + + return true; } void ANIObject::advance() { diff --git a/engines/gob/aniobject.h b/engines/gob/aniobject.h index c101d747b7..bd4cf791a8 100644 --- a/engines/gob/aniobject.h +++ b/engines/gob/aniobject.h @@ -93,9 +93,9 @@ public: bool lastFrame() const; /** Draw the current frame onto the surface and return the affected rectangle. */ - void draw(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); + bool draw(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); /** Draw the current frame from the surface and return the affected rectangle. */ - void clear(Surface &dest, int16 &left , int16 &top, int16 &right, int16 &bottom); + bool clear(Surface &dest, int16 &left , int16 &top, int16 &right, int16 &bottom); /** Advance the animation to the next frame. */ virtual void advance(); @@ -123,8 +123,8 @@ private: int16 _backgroundRight; ///< The right position of the saved background. int16 _backgroundBottom; ///< The bottom position of the saved background. - void drawCMP(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); - void drawANI(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); + bool drawCMP(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); + bool drawANI(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); }; } // End of namespace Gob diff --git a/engines/gob/minigames/geisha/diving.cpp b/engines/gob/minigames/geisha/diving.cpp index 6f4c6e168a..56c7b5213c 100644 --- a/engines/gob/minigames/geisha/diving.cpp +++ b/engines/gob/minigames/geisha/diving.cpp @@ -706,16 +706,16 @@ void Diving::updateAnims() { for (Common::List::iterator a = _anims.reverse_begin(); a != _anims.end(); --a) { - (*a)->clear(*_vm->_draw->_backSurface, left, top, right, bottom); - _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + if ((*a)->clear(*_vm->_draw->_backSurface, left, top, right, bottom)) + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); } // Draw the current animation frames for (Common::List::iterator a = _anims.begin(); a != _anims.end(); ++a) { - (*a)->draw(*_vm->_draw->_backSurface, left, top, right, bottom); - _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + if ((*a)->draw(*_vm->_draw->_backSurface, left, top, right, bottom)) + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); (*a)->advance(); } diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index e4e7798216..35802e6733 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -298,6 +298,8 @@ void Penetration::deinit() { _objects = 0; _sprites = 0; + + _sub = 0; } void Penetration::createMap() { @@ -503,14 +505,14 @@ void Penetration::checkShields() { } void Penetration::updateAnims() { - int16 left, top, right, bottom; + int16 left = 0, top = 0, right = 0, bottom = 0; // Clear the previous animation frames for (Common::List::iterator a = _anims.reverse_begin(); a != _anims.end(); --a) { - (*a)->clear(*_vm->_draw->_backSurface, left, top, right, bottom); - _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + if ((*a)->clear(*_vm->_draw->_backSurface, left, top, right, bottom)) + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); } if (_mapUpdate) { @@ -526,8 +528,8 @@ void Penetration::updateAnims() { for (Common::List::iterator a = _anims.begin(); a != _anims.end(); ++a) { - (*a)->draw(*_vm->_draw->_backSurface, left, top, right, bottom); - _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + if ((*a)->draw(*_vm->_draw->_backSurface, left, top, right, bottom)) + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); (*a)->advance(); } -- cgit v1.2.3 From 7d29e4017d37f7aee4035b3d7288c8c5478633be Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 5 Jun 2012 01:00:01 +0100 Subject: DREAMWEB: Modify Sound code to better match original behaviour. This fixes bug #3531635 - "DREAMWEB: doors don't play "open" sound when opening". In addition, the resultant code is simpler and should better match the original behaviour and a basic playtest has not shown any regressions. --- engines/dreamweb/sound.cpp | 42 +++++++++++------------------------------- engines/dreamweb/sound.h | 3 +-- 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index 76c734e932..570f76f2f9 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -35,14 +35,12 @@ DreamWebSound::DreamWebSound(DreamWebEngine *vm) : _vm(vm) { _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); - _channel0 = 0; - _channel1 = 0; - _currentSample = 0xff; - _channel0Playing = 0; + _channel0Playing = 255; _channel0Repeat = 0; _channel0NewSound = false; _channel1Playing = 255; + _channel1NewSound = false; _volume = 0; _volumeTo = 0; @@ -82,13 +80,9 @@ void DreamWebSound::volumeAdjust() { void DreamWebSound::playChannel0(uint8 index, uint8 repeat) { debug(1, "playChannel0(index:%d, repeat:%d)", index, repeat); - if (index == _channel0Playing) { - warning("playChannel0(index: %d) already playing! Forcing restart...", index); - _channel0NewSound = true; - } - _channel0Playing = index; _channel0Repeat = repeat; + _channel0NewSound = true; } void DreamWebSound::playChannel1(uint8 index) { @@ -97,6 +91,7 @@ void DreamWebSound::playChannel1(uint8 index) { return; _channel1Playing = index; + _channel1NewSound = true; } void DreamWebSound::cancelCh0() { @@ -186,10 +181,6 @@ void DreamWebSound::stopSound(uint8 channel) { debug(1, "stopSound(%u)", channel); assert(channel == 0 || channel == 1); _vm->_mixer->stopHandle(_channelHandle[channel]); - if (channel == 0) - _channel0 = 0; - else - _channel1 = 0; } bool DreamWebSound::loadSpeech(const Common::String &filename) { @@ -229,35 +220,24 @@ void DreamWebSound::soundHandler() { volume = (8 - volume) * Audio::Mixer::kMaxChannelVolume / 8; _vm->_mixer->setChannelVolume(_channelHandle[0], volume); - uint8 ch0 = _channel0Playing; - if (ch0 == 255) - ch0 = 0; - uint8 ch1 = _channel1Playing; - if (ch1 == 255) - ch1 = 0; - uint8 ch0loop = _channel0Repeat; - - if (_channel0 != ch0 || _channel0NewSound) { - _channel0 = ch0; + if (_channel0NewSound) { _channel0NewSound = false; - if (ch0) { - playSound(0, ch0, ch0loop); + if (_channel0Playing != 255) { + playSound(0, _channel0Playing, _channel0Repeat); } } - if (_channel1 != ch1) { - _channel1 = ch1; - if (ch1) { - playSound(1, ch1, 1); + if (_channel1NewSound) { + _channel1NewSound = false; + if (_channel1Playing != 255) { + playSound(1, _channel1Playing, 1); } } if (!_vm->_mixer->isSoundHandleActive(_channelHandle[0])) { _channel0Playing = 255; - _channel0 = 0; } if (!_vm->_mixer->isSoundHandleActive(_channelHandle[1])) { _channel1Playing = 255; - _channel1 = 0; } } diff --git a/engines/dreamweb/sound.h b/engines/dreamweb/sound.h index a38dbf3c1a..1ab06dc694 100644 --- a/engines/dreamweb/sound.h +++ b/engines/dreamweb/sound.h @@ -68,13 +68,12 @@ private: Audio::SoundHandle _channelHandle[2]; - uint8 _channel0, _channel1; - uint8 _currentSample; uint8 _channel0Playing; uint8 _channel0Repeat; bool _channel0NewSound; uint8 _channel1Playing; + bool _channel1NewSound; uint8 _volume; uint8 _volumeTo; -- cgit v1.2.3 From 25938316a881679a923bce1986f3a978432b0e76 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 5 Jun 2012 16:18:05 +0200 Subject: GOB: Animate mouths in Geisha's Penetration --- engines/gob/aniobject.h | 8 +- engines/gob/minigames/geisha/mouth.cpp | 170 +++++++++++++++++++++++++++ engines/gob/minigames/geisha/mouth.h | 75 ++++++++++++ engines/gob/minigames/geisha/penetration.cpp | 164 ++++++++++++++++++-------- engines/gob/minigames/geisha/penetration.h | 20 +++- engines/gob/module.mk | 1 + 6 files changed, 380 insertions(+), 58 deletions(-) create mode 100644 engines/gob/minigames/geisha/mouth.cpp create mode 100644 engines/gob/minigames/geisha/mouth.h diff --git a/engines/gob/aniobject.h b/engines/gob/aniobject.h index bd4cf791a8..5ea1f75401 100644 --- a/engines/gob/aniobject.h +++ b/engines/gob/aniobject.h @@ -61,9 +61,9 @@ public: void setMode(Mode mode); /** Set the current position to the animation's default. */ - void setPosition(); + virtual void setPosition(); /** Set the current position. */ - void setPosition(int16 x, int16 y); + virtual void setPosition(int16 x, int16 y); /** Return the current position. */ void getPosition(int16 &x, int16 &y) const; @@ -93,9 +93,9 @@ public: bool lastFrame() const; /** Draw the current frame onto the surface and return the affected rectangle. */ - bool draw(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); + virtual bool draw(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); /** Draw the current frame from the surface and return the affected rectangle. */ - bool clear(Surface &dest, int16 &left , int16 &top, int16 &right, int16 &bottom); + virtual bool clear(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); /** Advance the animation to the next frame. */ virtual void advance(); diff --git a/engines/gob/minigames/geisha/mouth.cpp b/engines/gob/minigames/geisha/mouth.cpp new file mode 100644 index 0000000000..605ffe420f --- /dev/null +++ b/engines/gob/minigames/geisha/mouth.cpp @@ -0,0 +1,170 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/util.h" +#include "common/textconsole.h" + +#include "gob/minigames/geisha/mouth.h" + +namespace Gob { + +namespace Geisha { + +Mouth::Mouth(const ANIFile &ani, const CMPFile &cmp, + uint16 mouthAnim, uint16 mouthSprite, uint16 floorSprite) : ANIObject(ani) { + + _sprite = new ANIObject(cmp); + _sprite->setAnimation(mouthSprite); + _sprite->setVisible(true); + + for (int i = 0; i < kFloorCount; i++) { + _floor[i] = new ANIObject(cmp); + _floor[i]->setAnimation(floorSprite); + _floor[i]->setVisible(true); + } + + _state = kStateDeactivated; + + setAnimation(mouthAnim); + setMode(kModeOnce); + setPause(true); + setVisible(true); +} + +Mouth::~Mouth() { + for (int i = 0; i < kFloorCount; i++) + delete _floor[i]; + + delete _sprite; +} + +void Mouth::advance() { + if (_state != kStateActivated) + return; + + // Animation finished, set state to dead + if (isPaused()) { + _state = kStateDead; + return; + } + + ANIObject::advance(); +} + +void Mouth::activate() { + if (_state != kStateDeactivated) + return; + + _state = kStateActivated; + + setPause(false); +} + +bool Mouth::isDeactivated() const { + return _state == kStateDeactivated; +} + +void Mouth::setPosition(int16 x, int16 y) { + ANIObject::setPosition(x, y); + + int16 floorWidth, floorHeight; + _floor[0]->getFrameSize(floorWidth, floorHeight); + + _sprite->setPosition(x, y); + + for (int i = 0; i < kFloorCount; i++) + _floor[i]->setPosition(x + (i * floorWidth), y); +} + +bool Mouth::draw(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) { + // If the mouth is deactivated, draw the default mouth sprite + if (_state == kStateDeactivated) + return _sprite->draw(dest, left, top, right, bottom); + + // If the mouth is activated, draw the current mouth animation sprite + if (_state == kStateActivated) + return ANIObject::draw(dest, left, top, right, bottom); + + // If the mouth is dead, draw the floor tiles + if (_state == kStateDead) { + int16 fLeft, fRight, fTop, fBottom; + bool drawn = false; + + left = 0x7FFF; + top = 0x7FFF; + right = 0; + bottom = 0; + + for (int i = 0; i < kFloorCount; i++) { + if (_floor[i]->draw(dest, fLeft, fTop, fRight, fBottom)) { + drawn = true; + left = MIN(left , fLeft); + top = MIN(top , fTop); + right = MAX(right , fRight); + bottom = MAX(bottom, fBottom); + } + } + + return drawn; + } + + return false; +} + +bool Mouth::clear(Surface &dest, int16 &left , int16 &top, int16 &right, int16 &bottom) { + // If the mouth is deactivated, clear the default mouth sprite + if (_state == kStateDeactivated) + return _sprite->clear(dest, left, top, right, bottom); + + // If the mouth is activated, clear the current mouth animation sprite + if (_state == kStateActivated) + return ANIObject::clear(dest, left, top, right, bottom); + + // If the mouth is clear, draw the floor tiles + if (_state == kStateDead) { + int16 fLeft, fRight, fTop, fBottom; + bool cleared = false; + + left = 0x7FFF; + top = 0x7FFF; + right = 0; + bottom = 0; + + for (int i = 0; i < kFloorCount; i++) { + if (_floor[i]->clear(dest, fLeft, fTop, fRight, fBottom)) { + cleared = true; + left = MIN(left , fLeft); + top = MIN(top , fTop); + right = MAX(right , fRight); + bottom = MAX(bottom, fBottom); + } + } + + return cleared; + } + + return false; +} + +} // End of namespace Geisha + +} // End of namespace Gob diff --git a/engines/gob/minigames/geisha/mouth.h b/engines/gob/minigames/geisha/mouth.h new file mode 100644 index 0000000000..2e0cfcd5d0 --- /dev/null +++ b/engines/gob/minigames/geisha/mouth.h @@ -0,0 +1,75 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_MINIGAMES_GEISHA_MOUTH_H +#define GOB_MINIGAMES_GEISHA_MOUTH_H + +#include "gob/aniobject.h" + +namespace Gob { + +namespace Geisha { + +/** A kissing/biting mouth in Geisha's "Penetration" minigame. */ +class Mouth : public ANIObject { +public: + Mouth(const ANIFile &ani, const CMPFile &cmp, + uint16 mouthAnim, uint16 mouthSprite, uint16 floorSprite); + ~Mouth(); + + /** Advance the animation to the next frame. */ + void advance(); + + /** Active the mouth's animation. */ + void activate(); + + /** Is the mouth deactivated? */ + bool isDeactivated() const; + + /** Set the current position. */ + void setPosition(int16 x, int16 y); + + /** Draw the current frame onto the surface and return the affected rectangle. */ + bool draw(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); + /** Draw the current frame from the surface and return the affected rectangle. */ + bool clear(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); + +private: + static const int kFloorCount = 2; + + enum State { + kStateDeactivated, + kStateActivated, + kStateDead + }; + + ANIObject *_sprite; + ANIObject *_floor[kFloorCount]; + + State _state; +}; + +} // End of namespace Geisha + +} // End of namespace Gob + +#endif // GOB_MINIGAMES_GEISHA_MOUTH_H diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 35802e6733..c8f96f825a 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -31,6 +31,7 @@ #include "gob/minigames/geisha/penetration.h" #include "gob/minigames/geisha/meter.h" +#include "gob/minigames/geisha/mouth.h" namespace Gob { @@ -60,28 +61,39 @@ static const int kColorHealth = 15; static const int kColorBlack = 10; static const int kColorFloor = 13; +enum Sprite { + kSpriteFloorShield = 25, + kSpriteExit = 29, + kSpriteFloor = 30, + kSpriteWall = 31, + kSpriteMouthBite = 32, + kSpriteMouthKiss = 33 +}; + enum Animation { - kAnimationDriveS = 4, - kAnimationDriveE = 5, - kAnimationDriveN = 6, - kAnimationDriveW = 7, - kAnimationDriveSE = 8, - kAnimationDriveNE = 9, - kAnimationDriveSW = 10, - kAnimationDriveNW = 11, - kAnimationShootS = 12, - kAnimationShootN = 13, - kAnimationShootW = 14, - kAnimationShootE = 15, - kAnimationShootNE = 16, - kAnimationShootSE = 17, - kAnimationShootSW = 18, - kAnimationShootNW = 19, - kAnimationExplodeN = 28, - kAnimationExplodeS = 29, - kAnimationExplodeW = 30, - kAnimationExplodeE = 31, - kAnimationExit = 32 + kAnimationDriveS = 4, + kAnimationDriveE = 5, + kAnimationDriveN = 6, + kAnimationDriveW = 7, + kAnimationDriveSE = 8, + kAnimationDriveNE = 9, + kAnimationDriveSW = 10, + kAnimationDriveNW = 11, + kAnimationShootS = 12, + kAnimationShootN = 13, + kAnimationShootW = 14, + kAnimationShootE = 15, + kAnimationShootNE = 16, + kAnimationShootSE = 17, + kAnimationShootSW = 18, + kAnimationShootNW = 19, + kAnimationExplodeN = 28, + kAnimationExplodeS = 29, + kAnimationExplodeW = 30, + kAnimationExplodeE = 31, + kAnimationExit = 32, + kAnimationMouthKiss = 33, + kAnimationMouthBite = 34 }; static const int kMapTileWidth = 24; @@ -197,8 +209,17 @@ Penetration::Position::Position(uint16 pX, uint16 pY) : x(pX), y(pY) { } +Penetration::ManagedMouth::ManagedMouth(uint16 pX, uint16 pY, MouthType t) : + Position(pX, pY), mouth(0), type(t) { +} + +Penetration::ManagedMouth::~ManagedMouth() { + delete mouth; +} + + Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _objects(0), _sub(0), - _shieldMeter(0), _healthMeter(0), _floor(0), _mapUpdate(false), _mapX(0), _mapY(0), + _shieldMeter(0), _healthMeter(0), _floor(0), _mapX(0), _mapY(0), _subTileX(0), _subTileY(0) { _background = new Surface(320, 200, 1); @@ -279,6 +300,9 @@ void Penetration::init() { createMap(); + for (Common::List::iterator m = _mouths.begin(); m != _mouths.end(); m++) + _mapAnims.push_back(m->mouth); + _sub = new ANIObject(*_objects); _sub->setAnimation(kAnimationDriveN); @@ -289,8 +313,13 @@ void Penetration::init() { } void Penetration::deinit() { + _mapAnims.clear(); _anims.clear(); + _shields.clear(); + + _mouths.clear(); + delete _sub; delete _objects; @@ -311,6 +340,8 @@ void Penetration::createMap() { _shields.clear(); + _mouths.clear(); + _map->fill(kColorBlack); // Draw the map tiles @@ -323,23 +354,21 @@ void Penetration::createMap() { switch (*mapTile) { case 0: // Floor - _sprites->draw(*_map, 30, posX, posY); + _sprites->draw(*_map, kSpriteFloor, posX, posY); break; case 49: // Emergency exit (needs access pass) if (_hasAccessPass) { - // Draw an exit. Now works like a regular exit - _sprites->draw(*_map, 29, posX, posY); - *mapTile = 51; + _sprites->draw(*_map, kSpriteExit, posX, posY); + *mapTile = 51; // Now works like a normal exit } else - // Draw a wall - _sprites->draw(*_map, 31, posX, posY); + _sprites->draw(*_map, kSpriteWall, posX, posY); break; case 50: // Wall - _sprites->draw(*_map, 31, posX, posY); + _sprites->draw(*_map, kSpriteWall, posX, posY); break; case 51: // Regular exit @@ -349,23 +378,27 @@ void Penetration::createMap() { if (_floor == 2) { if (!_hasAccessPass) { - // It's now a wall - _sprites->draw(*_map, 31, posX, posY); - *mapTile = 50; + _sprites->draw(*_map, kSpriteWall, posX, posY); + *mapTile = 50; // It's now a wall } else - _sprites->draw(*_map, 29, posX, posY); + _sprites->draw(*_map, kSpriteExit, posX, posY); } else - _sprites->draw(*_map, 29, posX, posY); + _sprites->draw(*_map, kSpriteExit, posX, posY); } else // Always works in test mode - _sprites->draw(*_map, 29, posX, posY); + _sprites->draw(*_map, kSpriteExit, posX, posY); break; case 52: // Left side of biting mouth - _sprites->draw(*_map, 32, posX, posY); + _mouths.push_back(ManagedMouth(x, y, kMouthTypeBite)); + + _mouths.back().mouth = + new Mouth(*_objects, *_sprites, kAnimationMouthBite, kSpriteMouthBite, kSpriteFloor); + + _mouths.back().mouth->setPosition(posX, posY); break; case 53: // Right side of biting mouth @@ -373,7 +406,12 @@ void Penetration::createMap() { break; case 54: // Left side of kissing mouth - _sprites->draw(*_map, 33, posX, posY); + _mouths.push_back(ManagedMouth(x, y, kMouthTypeKiss)); + + _mouths.back().mouth = + new Mouth(*_objects, *_sprites, kAnimationMouthKiss, kSpriteMouthKiss, kSpriteFloor); + + _mouths.back().mouth->setPosition(posX, posY); break; case 55: // Right side of kissing mouth @@ -381,8 +419,8 @@ void Penetration::createMap() { break; case 56: // Shield lying on the floor - _sprites->draw(*_map, 30, posX , posY ); // Floor - _sprites->draw(*_map, 25, posX + 4, posY + 8); // Shield + _sprites->draw(*_map, kSpriteFloor , posX , posY ); // Floor + _sprites->draw(*_map, kSpriteFloorShield, posX + 4, posY + 8); // Shield _map->fillRect(posX + 4, posY + 8, posX + 7, posY + 18, kColorFloor); // Area left to shield _map->fillRect(posX + 17, posY + 8, posX + 20, posY + 18, kColorFloor); // Area right to shield @@ -391,7 +429,7 @@ void Penetration::createMap() { break; case 57: // Start position - _sprites->draw(*_map, 30, posX, posY); + _sprites->draw(*_map, kSpriteFloor, posX, posY); *mapTile = 0; _subTileX = x; @@ -403,8 +441,6 @@ void Penetration::createMap() { } } } - - _mapUpdate = true; } void Penetration::initScreen() { @@ -479,12 +515,11 @@ void Penetration::moveSub(int x, int y, uint16 animation) { _subTileX = (_mapX + (kMapTileWidth / 2)) / kMapTileWidth; _subTileY = (_mapY + (kMapTileHeight / 2)) / kMapTileHeight; - _mapUpdate = true; - if (_sub->getAnimation() != animation) _sub->setAnimation(animation); checkShields(); + checkMouths(); } void Penetration::checkShields() { @@ -504,9 +539,37 @@ void Penetration::checkShields() { } } +void Penetration::checkMouths() { + for (Common::List::iterator m = _mouths.begin(); m != _mouths.end(); ++m) { + if (!m->mouth->isDeactivated()) + continue; + + if ((( m->x == _subTileX) && (m->y == _subTileY)) || + (((m->x + 1) == _subTileX) && (m->y == _subTileY))) { + + m->mouth->activate(); + } + } +} + void Penetration::updateAnims() { int16 left = 0, top = 0, right = 0, bottom = 0; + // Clear the previous map animation frames + for (Common::List::iterator a = _mapAnims.reverse_begin(); + a != _mapAnims.end(); --a) { + + (*a)->clear(*_map, left, top, right, bottom); + } + + // Draw the current map animation frames + for (Common::List::iterator a = _mapAnims.begin(); + a != _mapAnims.end(); ++a) { + + (*a)->draw(*_map, left, top, right, bottom); + (*a)->advance(); + } + // Clear the previous animation frames for (Common::List::iterator a = _anims.reverse_begin(); a != _anims.end(); --a) { @@ -515,14 +578,11 @@ void Penetration::updateAnims() { _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); } - if (_mapUpdate) { - _vm->_draw->_backSurface->blit(*_map, _mapX, _mapY, - _mapX + kPlayAreaWidth - 1, _mapY + kPlayAreaHeight - 1, kPlayAreaX, kPlayAreaY); - _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, kPlayAreaX, kPlayAreaY, - kPlayAreaX + kPlayAreaWidth - 1, kPlayAreaY + kPlayAreaHeight - 1); - } - - _mapUpdate = false; + // Draw the map + _vm->_draw->_backSurface->blit(*_map, _mapX, _mapY, + _mapX + kPlayAreaWidth - 1, _mapY + kPlayAreaHeight - 1, kPlayAreaX, kPlayAreaY); + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, kPlayAreaX, kPlayAreaY, + kPlayAreaX + kPlayAreaWidth - 1, kPlayAreaY + kPlayAreaHeight - 1); // Draw the current animation frames for (Common::List::iterator a = _anims.begin(); diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 4d3455b638..ef0e3b10f0 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -36,6 +36,7 @@ class ANIFile; namespace Geisha { class Meter; +class Mouth; /** Geisha's "Penetration" minigame. */ class Penetration { @@ -61,6 +62,19 @@ private: Position(uint16 pX, uint16 pY); }; + enum MouthType { + kMouthTypeBite, + kMouthTypeKiss + }; + + struct ManagedMouth : public Position { + Mouth *mouth; + MouthType type; + + ManagedMouth(uint16 pX, uint16 pY, MouthType t); + ~ManagedMouth(); + }; + GobEngine *_vm; bool _hasAccessPass; @@ -74,6 +88,7 @@ private: ANIObject *_sub; Common::List _anims; + Common::List _mapAnims; Meter *_shieldMeter; Meter *_healthMeter; @@ -83,14 +98,14 @@ private: Surface *_map; byte _mapTiles[kMapWidth * kMapHeight]; - bool _mapUpdate; uint16 _mapX; uint16 _mapY; uint8 _subTileX; uint8 _subTileY; - Common::List _shields; + Common::List _shields; + Common::List _mouths; void init(); @@ -110,6 +125,7 @@ private: bool isWalkable(byte tile) const; void checkShields(); + void checkMouths(); }; } // End of namespace Geisha diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 9da5a82de2..c5ae947a1c 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -80,6 +80,7 @@ MODULE_OBJS := \ minigames/geisha/oko.o \ minigames/geisha/meter.o \ minigames/geisha/diving.o \ + minigames/geisha/mouth.o \ minigames/geisha/penetration.o \ save/savefile.o \ save/savehandler.o \ -- cgit v1.2.3 From 73776406686709bc79ff9c6423937dce0e43c5d6 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 5 Jun 2012 16:21:36 +0200 Subject: GOB: Play sounds for mouths and shields in Penetration --- engines/gob/minigames/geisha/penetration.cpp | 20 ++++++++++++++++++++ engines/gob/minigames/geisha/penetration.h | 6 ++++++ 2 files changed, 26 insertions(+) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index c8f96f825a..1321842d07 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -29,6 +29,8 @@ #include "gob/anifile.h" #include "gob/aniobject.h" +#include "gob/sound/sound.h" + #include "gob/minigames/geisha/penetration.h" #include "gob/minigames/geisha/meter.h" #include "gob/minigames/geisha/mouth.h" @@ -280,6 +282,11 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { } void Penetration::init() { + // Load sounds + _vm->_sound->sampleLoad(&_soundShield, SOUND_SND, "boucl.snd"); + _vm->_sound->sampleLoad(&_soundBite , SOUND_SND, "pervet.snd"); + _vm->_sound->sampleLoad(&_soundKiss , SOUND_SND, "baise.snd"); + _background->clear(); _vm->_video->drawPackedSprite("hyprmef2.cmp", *_background); @@ -313,6 +320,10 @@ void Penetration::init() { } void Penetration::deinit() { + _soundShield.free(); + _soundBite.free(); + _soundKiss.free(); + _mapAnims.clear(); _anims.clear(); @@ -528,6 +539,9 @@ void Penetration::checkShields() { // Charge shields _shieldMeter->setMaxValue(); + // Play the shield sound + _vm->_sound->blasterPlay(&_soundShield, 1, 0); + // Erase the shield from the map const int mapX = kPlayAreaBorderWidth + pos->x * kMapTileWidth; const int mapY = kPlayAreaBorderHeight + pos->y * kMapTileHeight; @@ -548,6 +562,12 @@ void Penetration::checkMouths() { (((m->x + 1) == _subTileX) && (m->y == _subTileY))) { m->mouth->activate(); + + // Play the mouth sound + if (m->type == kMouthTypeBite) + _vm->_sound->blasterPlay(&_soundBite, 1, 0); + else if (m->type == kMouthTypeKiss) + _vm->_sound->blasterPlay(&_soundKiss, 1, 0); } } } diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index ef0e3b10f0..00ddb4bdba 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -26,6 +26,8 @@ #include "common/system.h" #include "common/list.h" +#include "gob/sound/sounddesc.h" + namespace Gob { class GobEngine; @@ -107,6 +109,10 @@ private: Common::List _shields; Common::List _mouths; + SoundDesc _soundShield; + SoundDesc _soundBite; + SoundDesc _soundKiss; + void init(); void deinit(); -- cgit v1.2.3 From 4392e4d7aab9114ff66a1fcda34d21f404b4ebcd Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 5 Jun 2012 17:01:40 +0200 Subject: GOB: Implement health gain/loss for mouths --- engines/gob/minigames/geisha/meter.cpp | 22 ++++++++++++++++++---- engines/gob/minigames/geisha/meter.h | 8 ++++---- engines/gob/minigames/geisha/penetration.cpp | 24 +++++++++++++++++++----- engines/gob/minigames/geisha/penetration.h | 3 +++ 4 files changed, 44 insertions(+), 13 deletions(-) diff --git a/engines/gob/minigames/geisha/meter.cpp b/engines/gob/minigames/geisha/meter.cpp index 9dcc717e48..719ecf3d18 100644 --- a/engines/gob/minigames/geisha/meter.cpp +++ b/engines/gob/minigames/geisha/meter.cpp @@ -63,22 +63,36 @@ void Meter::setMaxValue() { setValue(_maxValue); } -void Meter::increase(int32 n) { +int32 Meter::increase(int32 n) { + if (n < 0) + return decrease(-n); + + int32 overflow = MAX(0, (_value + n) - _maxValue); + int32 value = CLIP(_value + n, 0, _maxValue); if (_value == value) - return; + return overflow; _value = value; _needUpdate = true; + + return overflow; } -void Meter::decrease(int32 n) { +int32 Meter::decrease(int32 n) { + if (n < 0) + return increase(-n); + + int32 underflow = -MIN(0, _value - n); + int32 value = CLIP(_value - n, 0, _maxValue); if (_value == value) - return; + return underflow; _value = value; _needUpdate = true; + + return underflow; } void Meter::draw(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) { diff --git a/engines/gob/minigames/geisha/meter.h b/engines/gob/minigames/geisha/meter.h index d3e82cb32e..30dc826de0 100644 --- a/engines/gob/minigames/geisha/meter.h +++ b/engines/gob/minigames/geisha/meter.h @@ -55,10 +55,10 @@ public: /** Set the current value the meter is measuring to the max value. */ void setMaxValue(); - /** Increase the current value the meter is measuring. */ - void increase(int32 n = 1); - /** Decrease the current value the meter is measuring. */ - void decrease(int32 n = 1); + /** Increase the current value the meter is measuring, returning the overflow. */ + int32 increase(int32 n = 1); + /** Decrease the current value the meter is measuring, returning the underflow. */ + int32 decrease(int32 n = 1); /** Draw the meter onto the surface and return the affected rectangle. */ void draw(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 1321842d07..a188995372 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -226,8 +226,8 @@ Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _background = new Surface(320, 200, 1); - _shieldMeter = new Meter(11, 119, 92, 3, kColorShield, kColorBlack, 1020, Meter::kFillToRight); - _healthMeter = new Meter(11, 137, 92, 3, kColorHealth, kColorBlack, 1020, Meter::kFillToRight); + _shieldMeter = new Meter(11, 119, 92, 3, kColorShield, kColorBlack, 920, Meter::kFillToRight); + _healthMeter = new Meter(11, 137, 92, 3, kColorHealth, kColorBlack, 920, Meter::kFillToRight); _map = new Surface(kMapWidth * kMapTileWidth + kPlayAreaWidth , kMapHeight * kMapTileHeight + kPlayAreaHeight, 1); @@ -563,15 +563,29 @@ void Penetration::checkMouths() { m->mouth->activate(); - // Play the mouth sound - if (m->type == kMouthTypeBite) + // Play the mouth sound and do health gain/loss + if (m->type == kMouthTypeBite) { _vm->_sound->blasterPlay(&_soundBite, 1, 0); - else if (m->type == kMouthTypeKiss) + healthLose(230); + } else if (m->type == kMouthTypeKiss) { _vm->_sound->blasterPlay(&_soundKiss, 1, 0); + healthGain(120); + } } } } +void Penetration::healthGain(int amount) { + if (_shieldMeter->getValue() > 0) + _healthMeter->increase(_shieldMeter->increase(amount)); + else + _healthMeter->increase(amount); +} + +void Penetration::healthLose(int amount) { + _healthMeter->decrease(_shieldMeter->decrease(amount)); +} + void Penetration::updateAnims() { int16 left = 0, top = 0, right = 0, bottom = 0; diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 00ddb4bdba..488396ea32 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -132,6 +132,9 @@ private: void checkShields(); void checkMouths(); + + void healthGain(int amount); + void healthLose(int amount); }; } // End of namespace Geisha -- cgit v1.2.3 From 2aeb883123d01bd1dacc05627b610f0d2d9e7d08 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 5 Jun 2012 13:17:04 -0400 Subject: SCUMM: Show an error dialog when trying to run puttzoo ios lite The lite version contains the full game and we will not support it due to potential piracy. --- devtools/scumm-md5.txt | 1 + engines/scumm/detection.cpp | 8 ++++++++ engines/scumm/scumm-md5.h | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt index f08b7d29d2..5223d6785d 100644 --- a/devtools/scumm-md5.txt +++ b/devtools/scumm-md5.txt @@ -776,6 +776,7 @@ puttzoo Putt-Putt Saves the Zoo f3d55aea441e260e9e9c7d2a187097e0 14337 en Windows - Demo - khalek 65fa23d6884e8ca23d5d2406d70de7e8 -1 fr Windows - Demo - gist974 2a446817ffcabfef8716e0c456ecaf81 -1 de Windows - Demo - Joachim Eberhard + 4e859d3ef1e146b41e7d93c35cd6cc62 -1 en iOS HE 100 Lite - clone2727 PuttTime Putt-Putt Travels Through Time fcb78ebecab2757264c590890c319cc5 -1 nl All HE 85 - - adutchguy, daniel9 diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index cd878b49ae..95de1a8706 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -1079,6 +1079,14 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co debug(1, "Using MD5 '%s'", res.md5.c_str()); } + // We don't support the "Lite" version off puttzoo iOS because it contains + // the full game. + if (!strcmp(res.game.gameid, "puttzoo") && !strcmp(res.extra, "Lite")) { + GUIErrorMessage("The Lite version of Putt-Putt Saves the Zoo iOS is not supported to avoid piracy.\n" + "The full version is available for purchase from the iTunes Store."); + return Common::kUnsupportedGameidError; + } + // If the GUI options were updated, we catch this here and update them in the users config // file transparently. Common::updateGameGUIOptions(res.game.guioptions, getGameGUIOptionsDescriptionLanguage(res.language)); diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 946e954a46..9aac4a082f 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 May 29 00:49:03 2012 + This file was generated by the md5table tool on Tue Jun 5 16:56:40 2012 DO NOT EDIT MANUALLY! */ @@ -215,6 +215,7 @@ static const MD5Table md5table[] = { { "4dbff3787aedcd96b0b325f2d92d7ad9", "maze", "HE 100", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown }, { "4dc780f1bc587a193ce8a97652791438", "loom", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformAmiga }, { "4e5867848ee61bc30d157e2c94eee9b4", "PuttTime", "HE 90", "Demo", 18394, Common::EN_USA, Common::kPlatformUnknown }, + { "4e859d3ef1e146b41e7d93c35cd6cc62", "puttzoo", "HE 100", "Lite", -1, Common::EN_ANY, Common::kPlatformIOS }, { "4edbf9d03550f7ba01e7f34d69b678dd", "spyfox", "HE 98.5", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown }, { "4f04b321a95d4315ce6d65f8e1dd0368", "maze", "HE 80", "", -1, Common::EN_USA, Common::kPlatformUnknown }, { "4f138ac6f9b2ac5a41bc68b2c3296064", "freddi4", "HE 99", "", -1, Common::FR_FRA, Common::kPlatformWindows }, -- cgit v1.2.3 From d2c6525d881f5c391b0c94bcb2c10c328aa5492f Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Tue, 5 Jun 2012 22:26:51 +0100 Subject: SWORD1: Fix crash in demo when using French subtitles --- engines/sword1/text.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engines/sword1/text.cpp b/engines/sword1/text.cpp index 3bd2fdb2e6..f23ac5f182 100644 --- a/engines/sword1/text.cpp +++ b/engines/sword1/text.cpp @@ -156,6 +156,8 @@ uint16 Text::analyzeSentence(const uint8 *text, uint16 maxWidth, LineInfo *line) } uint16 Text::copyChar(uint8 ch, uint8 *sprPtr, uint16 sprWidth, uint8 pen) { + if (ch < SPACE) + ch = 64; FrameHeader *chFrame = _resMan->fetchFrame(_font, ch - SPACE); uint8 *chData = ((uint8 *)chFrame) + sizeof(FrameHeader); uint8 *dest = sprPtr; -- cgit v1.2.3 From ac76994781fedecbfa74cd43d0983dcd7b06f12c Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Tue, 5 Jun 2012 22:34:37 +0100 Subject: SWORD1: Use _missingSubTitleStr when asking for an out of bound textId It was using textId 0, which is not the subtitle we want anyway. So instead of using the wrong subtitle, it is probably better to not display a subtitle at all. A test case for this is with the demo when using non-english language as several subtitles are missing toward the end. --- engines/sword1/objectman.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sword1/objectman.cpp b/engines/sword1/objectman.cpp index ed994a97fa..d0803590a7 100644 --- a/engines/sword1/objectman.cpp +++ b/engines/sword1/objectman.cpp @@ -105,7 +105,7 @@ char *ObjectMan::lockText(uint32 textId) { addr += sizeof(Header); if ((textId & ITM_ID) >= _resMan->readUint32(addr)) { warning("ObjectMan::lockText(%d): only %d texts in file", textId & ITM_ID, _resMan->readUint32(addr)); - textId = 0; // get first line instead + return _missingSubTitleStr; } uint32 offset = _resMan->readUint32(addr + ((textId & ITM_ID) + 1) * 4); if (offset == 0) { -- cgit v1.2.3 From 93dda1b227fa11d1da2d923ca63a580343f6ba4e Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 6 Jun 2012 01:47:43 +0200 Subject: GOB: const correctness --- engines/gob/minigames/geisha/evilfish.cpp | 2 +- engines/gob/minigames/geisha/evilfish.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/gob/minigames/geisha/evilfish.cpp b/engines/gob/minigames/geisha/evilfish.cpp index c7ef9d5622..05ae9d0ad4 100644 --- a/engines/gob/minigames/geisha/evilfish.cpp +++ b/engines/gob/minigames/geisha/evilfish.cpp @@ -171,7 +171,7 @@ void EvilFish::mutate(uint16 animSwimLeft, uint16 animSwimRight, } } -bool EvilFish::isDead() { +bool EvilFish::isDead() const { return !isVisible() || (_state == kStateNone) || (_state == kStateDie); } diff --git a/engines/gob/minigames/geisha/evilfish.h b/engines/gob/minigames/geisha/evilfish.h index 81efb676e2..4c82629461 100644 --- a/engines/gob/minigames/geisha/evilfish.h +++ b/engines/gob/minigames/geisha/evilfish.h @@ -58,7 +58,7 @@ public: uint16 animTurnLeft, uint16 animTurnRight, uint16 animDie); /** Is the fish dead? */ - bool isDead(); + bool isDead() const; private: enum State { -- cgit v1.2.3 From b83ac21f6008287414d59ad7f9c88b63bd93bac5 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 6 Jun 2012 02:52:19 +0200 Subject: GOB: Implement Penetration submarine shooting and dying Shots don't result in bullets yet, though --- engines/gob/minigames/geisha/mouth.cpp | 1 - engines/gob/minigames/geisha/penetration.cpp | 149 +++++++++-------- engines/gob/minigames/geisha/penetration.h | 29 +++- engines/gob/minigames/geisha/submarine.cpp | 233 +++++++++++++++++++++++++++ engines/gob/minigames/geisha/submarine.h | 96 +++++++++++ engines/gob/module.mk | 1 + 6 files changed, 435 insertions(+), 74 deletions(-) create mode 100644 engines/gob/minigames/geisha/submarine.cpp create mode 100644 engines/gob/minigames/geisha/submarine.h diff --git a/engines/gob/minigames/geisha/mouth.cpp b/engines/gob/minigames/geisha/mouth.cpp index 605ffe420f..7ba9f86f8c 100644 --- a/engines/gob/minigames/geisha/mouth.cpp +++ b/engines/gob/minigames/geisha/mouth.cpp @@ -21,7 +21,6 @@ */ #include "common/util.h" -#include "common/textconsole.h" #include "gob/minigames/geisha/mouth.h" diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index a188995372..2c1a4918b9 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -73,27 +73,6 @@ enum Sprite { }; enum Animation { - kAnimationDriveS = 4, - kAnimationDriveE = 5, - kAnimationDriveN = 6, - kAnimationDriveW = 7, - kAnimationDriveSE = 8, - kAnimationDriveNE = 9, - kAnimationDriveSW = 10, - kAnimationDriveNW = 11, - kAnimationShootS = 12, - kAnimationShootN = 13, - kAnimationShootW = 14, - kAnimationShootE = 15, - kAnimationShootNE = 16, - kAnimationShootSE = 17, - kAnimationShootSW = 18, - kAnimationShootNW = 19, - kAnimationExplodeN = 28, - kAnimationExplodeS = 29, - kAnimationExplodeW = 30, - kAnimationExplodeE = 31, - kAnimationExit = 32, kAnimationMouthKiss = 33, kAnimationMouthBite = 34 }; @@ -220,9 +199,18 @@ Penetration::ManagedMouth::~ManagedMouth() { } +Penetration::ManagedSub::ManagedSub(uint16 pX, uint16 pY) : Position(pX, pY), sub(0) { + mapX = x * kMapTileWidth; + mapY = y * kMapTileHeight; +} + +Penetration::ManagedSub::~ManagedSub() { + delete sub; +} + + Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _objects(0), _sub(0), - _shieldMeter(0), _healthMeter(0), _floor(0), _mapX(0), _mapY(0), - _subTileX(0), _subTileY(0) { + _shieldMeter(0), _healthMeter(0), _floor(0) { _background = new Surface(320, 200, 1); @@ -255,7 +243,7 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { _vm->_draw->blitInvalidated(); _vm->_video->retrace(); - while (!_vm->shouldQuit()) { + while (!_vm->shouldQuit() && !isDead() && !hasWon()) { updateAnims(); // Draw and wait for the end of the frame @@ -278,7 +266,8 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { } deinit(); - return false; + + return hasWon(); } void Penetration::init() { @@ -286,6 +275,7 @@ void Penetration::init() { _vm->_sound->sampleLoad(&_soundShield, SOUND_SND, "boucl.snd"); _vm->_sound->sampleLoad(&_soundBite , SOUND_SND, "pervet.snd"); _vm->_sound->sampleLoad(&_soundKiss , SOUND_SND, "baise.snd"); + _vm->_sound->sampleLoad(&_soundShoot , SOUND_SND, "tirgim.snd"); _background->clear(); @@ -310,19 +300,14 @@ void Penetration::init() { for (Common::List::iterator m = _mouths.begin(); m != _mouths.end(); m++) _mapAnims.push_back(m->mouth); - _sub = new ANIObject(*_objects); - - _sub->setAnimation(kAnimationDriveN); - _sub->setPosition(kPlayAreaX + kPlayAreaBorderWidth, kPlayAreaY + kPlayAreaBorderHeight); - _sub->setVisible(true); - - _anims.push_back(_sub); + _anims.push_back(_sub->sub); } void Penetration::deinit() { _soundShield.free(); _soundBite.free(); _soundKiss.free(); + _soundShoot.free(); _mapAnims.clear(); _anims.clear(); @@ -349,8 +334,10 @@ void Penetration::createMap() { // Copy the correct map memcpy(_mapTiles, kMaps[_testMode ? 1 : 0][_floor], kMapWidth * kMapHeight); - _shields.clear(); + delete _sub; + _sub = 0; + _shields.clear(); _mouths.clear(); _map->fill(kColorBlack); @@ -441,17 +428,22 @@ void Penetration::createMap() { case 57: // Start position _sprites->draw(*_map, kSpriteFloor, posX, posY); + *mapTile = 0; - _subTileX = x; - _subTileY = y; + delete _sub; + + _sub = new ManagedSub(x, y); - _mapX = _subTileX * kMapTileWidth; - _mapY = _subTileY * kMapTileHeight; + _sub->sub = new Submarine(*_objects); + _sub->sub->setPosition(kPlayAreaX + kPlayAreaBorderWidth, kPlayAreaY + kPlayAreaBorderHeight); break; } } } + + if (!_sub) + error("Geisha: No starting position in floor %d (testmode: %d", _floor, _testMode); } void Penetration::initScreen() { @@ -491,51 +483,64 @@ bool Penetration::isWalkable(byte tile) const { void Penetration::handleSub(int16 key) { if (key == kKeyLeft) - moveSub(-5, 0, kAnimationDriveW); + subMove(-5, 0, Submarine::kDirectionW); else if (key == kKeyRight) - moveSub( 5, 0, kAnimationDriveE); + subMove( 5, 0, Submarine::kDirectionE); else if (key == kKeyUp) - moveSub( 0, -5, kAnimationDriveN); + subMove( 0, -5, Submarine::kDirectionN); else if (key == kKeyDown) - moveSub( 0, 5, kAnimationDriveS); + subMove( 0, 5, Submarine::kDirectionS); + else if (key == kKeySpace) + subShoot(); } -void Penetration::moveSub(int x, int y, uint16 animation) { +void Penetration::subMove(int x, int y, Submarine::Direction direction) { + if (!_sub->sub->canMove()) + return; + // Limit the movement to walkable tiles int16 minX = 0; - if ((_subTileX > 0) && !isWalkable(_mapTiles[_subTileY * kMapWidth + (_subTileX - 1)])) - minX = _subTileX * kMapTileWidth; + if ((_sub->x > 0) && !isWalkable(_mapTiles[_sub->y * kMapWidth + (_sub->x - 1)])) + minX = _sub->x * kMapTileWidth; int16 maxX = kMapWidth * kMapTileWidth; - if ((_subTileX < (kMapWidth - 1)) && !isWalkable(_mapTiles[_subTileY * kMapWidth + (_subTileX + 1)])) - maxX = _subTileX * kMapTileWidth; + if ((_sub->x < (kMapWidth - 1)) && !isWalkable(_mapTiles[_sub->y * kMapWidth + (_sub->x + 1)])) + maxX = _sub->x * kMapTileWidth; int16 minY = 0; - if ((_subTileY > 0) && !isWalkable(_mapTiles[(_subTileY - 1) * kMapWidth + _subTileX])) - minY = _subTileY * kMapTileHeight; + if ((_sub->y > 0) && !isWalkable(_mapTiles[(_sub->y - 1) * kMapWidth + _sub->x])) + minY = _sub->y * kMapTileHeight; int16 maxY = kMapHeight * kMapTileHeight; - if ((_subTileY < (kMapHeight - 1)) && !isWalkable(_mapTiles[(_subTileY + 1) * kMapWidth + _subTileX])) - maxY = _subTileY * kMapTileHeight; + if ((_sub->y < (kMapHeight - 1)) && !isWalkable(_mapTiles[(_sub->y + 1) * kMapWidth + _sub->x])) + maxY = _sub->y * kMapTileHeight; - _mapX = CLIP(_mapX + x, minX, maxX); - _mapY = CLIP(_mapY + y, minY, maxY); + _sub->mapX = CLIP(_sub->mapX + x, minX, maxX); + _sub->mapY = CLIP(_sub->mapY + y, minY, maxY); // The tile the sub is on is where its mid-point is - _subTileX = (_mapX + (kMapTileWidth / 2)) / kMapTileWidth; - _subTileY = (_mapY + (kMapTileHeight / 2)) / kMapTileHeight; + _sub->x = (_sub->mapX + (kMapTileWidth / 2)) / kMapTileWidth; + _sub->y = (_sub->mapY + (kMapTileHeight / 2)) / kMapTileHeight; - if (_sub->getAnimation() != animation) - _sub->setAnimation(animation); + _sub->sub->turn(direction); checkShields(); checkMouths(); } +void Penetration::subShoot() { + if (!_sub->sub->canMove()) + return; + + _sub->sub->shoot(); + + _vm->_sound->blasterPlay(&_soundShoot, 1, 0); +} + void Penetration::checkShields() { for (Common::List::iterator pos = _shields.begin(); pos != _shields.end(); ++pos) { - if ((pos->x == _subTileX) && (pos->y == _subTileY)) { + if ((pos->x == _sub->x) && (pos->y == _sub->y)) { // Charge shields _shieldMeter->setMaxValue(); @@ -558,13 +563,13 @@ void Penetration::checkMouths() { if (!m->mouth->isDeactivated()) continue; - if ((( m->x == _subTileX) && (m->y == _subTileY)) || - (((m->x + 1) == _subTileX) && (m->y == _subTileY))) { + if ((( m->x == _sub->x) && (m->y == _sub->y)) || + (((m->x + 1) == _sub->x) && (m->y == _sub->y))) { m->mouth->activate(); // Play the mouth sound and do health gain/loss - if (m->type == kMouthTypeBite) { + if (m->type == kMouthTypeBite) { _vm->_sound->blasterPlay(&_soundBite, 1, 0); healthLose(230); } else if (m->type == kMouthTypeKiss) { @@ -584,6 +589,17 @@ void Penetration::healthGain(int amount) { void Penetration::healthLose(int amount) { _healthMeter->decrease(_shieldMeter->decrease(amount)); + + if (_healthMeter->getValue() == 0) + _sub->sub->die(); +} + +bool Penetration::isDead() const { + return _sub && _sub->sub->isDead(); +} + +bool Penetration::hasWon() const { + return _floor > kFloorCount; } void Penetration::updateAnims() { @@ -612,11 +628,14 @@ void Penetration::updateAnims() { _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); } - // Draw the map - _vm->_draw->_backSurface->blit(*_map, _mapX, _mapY, - _mapX + kPlayAreaWidth - 1, _mapY + kPlayAreaHeight - 1, kPlayAreaX, kPlayAreaY); - _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, kPlayAreaX, kPlayAreaY, - kPlayAreaX + kPlayAreaWidth - 1, kPlayAreaY + kPlayAreaHeight - 1); + if (_sub) { + // Draw the map + + _vm->_draw->_backSurface->blit(*_map, _sub->mapX, _sub->mapY, + _sub->mapX + kPlayAreaWidth - 1, _sub->mapY + kPlayAreaHeight - 1, kPlayAreaX, kPlayAreaY); + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, kPlayAreaX, kPlayAreaY, + kPlayAreaX + kPlayAreaWidth - 1, kPlayAreaY + kPlayAreaHeight - 1); + } // Draw the current animation frames for (Common::List::iterator a = _anims.begin(); diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 488396ea32..0582b99e83 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -28,6 +28,8 @@ #include "gob/sound/sounddesc.h" +#include "gob/minigames/geisha/submarine.h" + namespace Gob { class GobEngine; @@ -77,6 +79,18 @@ private: ~ManagedMouth(); }; + struct ManagedSub : public Position { + Submarine *sub; + + uint16 mapX; + uint16 mapY; + + ManagedSub(uint16 pX, uint16 pY); + ~ManagedSub(); + + void setPosition(uint16 pX, uint16 pY); + }; + GobEngine *_vm; bool _hasAccessPass; @@ -87,8 +101,6 @@ private: CMPFile *_sprites; ANIFile *_objects; - ANIObject *_sub; - Common::List _anims; Common::List _mapAnims; @@ -100,11 +112,7 @@ private: Surface *_map; byte _mapTiles[kMapWidth * kMapHeight]; - uint16 _mapX; - uint16 _mapY; - - uint8 _subTileX; - uint8 _subTileY; + ManagedSub *_sub; Common::List _shields; Common::List _mouths; @@ -112,6 +120,7 @@ private: SoundDesc _soundShield; SoundDesc _soundBite; SoundDesc _soundKiss; + SoundDesc _soundShoot; void init(); @@ -126,7 +135,8 @@ private: int16 checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons); void handleSub(int16 key); - void moveSub(int x, int y, uint16 animation); + void subMove(int x, int y, Submarine::Direction direction); + void subShoot(); bool isWalkable(byte tile) const; @@ -135,6 +145,9 @@ private: void healthGain(int amount); void healthLose(int amount); + + bool isDead() const; + bool hasWon() const; }; } // End of namespace Geisha diff --git a/engines/gob/minigames/geisha/submarine.cpp b/engines/gob/minigames/geisha/submarine.cpp new file mode 100644 index 0000000000..4a18c6e043 --- /dev/null +++ b/engines/gob/minigames/geisha/submarine.cpp @@ -0,0 +1,233 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "gob/minigames/geisha/submarine.h" + +namespace Gob { + +namespace Geisha { + +enum Animation { + kAnimationDriveS = 4, + kAnimationDriveE = 5, + kAnimationDriveN = 6, + kAnimationDriveW = 7, + kAnimationDriveSE = 8, + kAnimationDriveNE = 9, + kAnimationDriveSW = 10, + kAnimationDriveNW = 11, + kAnimationShootS = 12, + kAnimationShootN = 13, + kAnimationShootW = 14, + kAnimationShootE = 15, + kAnimationShootNE = 16, + kAnimationShootSE = 17, + kAnimationShootSW = 18, + kAnimationShootNW = 19, + kAnimationExplodeN = 28, + kAnimationExplodeS = 29, + kAnimationExplodeW = 30, + kAnimationExplodeE = 31, + kAnimationExit = 32 +}; + + +Submarine::Submarine(const ANIFile &ani) : ANIObject(ani), _state(kStateNone) { + turn(kDirectionN); +} + +Submarine::~Submarine() { +} + +void Submarine::turn(Direction to) { + // Nothing to do + if ((_state == kStateMove) && (_direction == to)) + return; + + _state = kStateMove; + _direction = to; + + setAnimation(directionToMove(_direction)); + setMode(kModeContinuous); + setPause(false); + setVisible(true); +} + +void Submarine::shoot() { + _state = kStateShoot; + + setAnimation(directionToShoot(_direction)); + setMode(kModeOnce); + setPause(false); + setVisible(true); +} + +void Submarine::die() { + _state = kStateDie; + + setAnimation(directionToExplode(_direction)); + setMode(kModeOnce); + setPause(false); + setVisible(true); +} + +void Submarine::leave() { + _state = kStateExit; + + setAnimation(kAnimationExit); + setMode(kModeOnce); + setPause(false); + setVisible(true); +} + +void Submarine::advance() { + ANIObject::advance(); + + switch (_state) { + case kStateShoot: + if (isPaused()) + turn(_direction); + break; + + case kStateExit: + if (isPaused()) { + _state = kStateExited; + + setVisible(true); + } + + break; + + case kStateDie: + if (isPaused()) + _state = kStateDead; + break; + + default: + break; + } +} + +bool Submarine::canMove() const { + return (_state == kStateMove) || (_state == kStateShoot); +} + +bool Submarine::isDead() const { + return _state == kStateDead; +} + +uint16 Submarine::directionToMove(Direction direction) const { + switch (direction) { + case kDirectionN: + return kAnimationDriveN; + + case kDirectionNE: + return kAnimationDriveNE; + + case kDirectionE: + return kAnimationDriveE; + + case kDirectionSE: + return kAnimationDriveSE; + + case kDirectionS: + return kAnimationDriveS; + + case kDirectionSW: + return kAnimationDriveSW; + + case kDirectionW: + return kAnimationDriveW; + + case kDirectionNW: + return kAnimationDriveNW; + + default: + break; + } + + return 0; +} + +uint16 Submarine::directionToShoot(Direction direction) const { + switch (direction) { + case kDirectionN: + return kAnimationShootN; + + case kDirectionNE: + return kAnimationShootNE; + + case kDirectionE: + return kAnimationShootE; + + case kDirectionSE: + return kAnimationShootSE; + + case kDirectionS: + return kAnimationShootS; + + case kDirectionSW: + return kAnimationShootSW; + + case kDirectionW: + return kAnimationShootW; + + case kDirectionNW: + return kAnimationShootNW; + + default: + break; + } + + return 0; +} + +uint16 Submarine::directionToExplode(Direction direction) const { + // Only 4 exploding animations (spinning clockwise) + + switch (direction) { + case kDirectionNW: + case kDirectionN: + return kAnimationExplodeN; + + case kDirectionNE: + case kDirectionE: + return kAnimationExplodeE; + + case kDirectionSE: + case kDirectionS: + return kAnimationExplodeS; + + case kDirectionSW: + case kDirectionW: + return kAnimationExplodeW; + + default: + break; + } + + return 0; +} + +} // End of namespace Geisha + +} // End of namespace Gob diff --git a/engines/gob/minigames/geisha/submarine.h b/engines/gob/minigames/geisha/submarine.h new file mode 100644 index 0000000000..e8ae72d996 --- /dev/null +++ b/engines/gob/minigames/geisha/submarine.h @@ -0,0 +1,96 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_MINIGAMES_GEISHA_SUBMARINE_H +#define GOB_MINIGAMES_GEISHA_SUBMARINE_H + +#include "gob/aniobject.h" + +namespace Gob { + +namespace Geisha { + +/** The submarine Geisha's "Penetration" minigame. */ +class Submarine : public ANIObject { +public: + enum Direction { + kDirectionN, + kDirectionNE, + kDirectionE, + kDirectionSE, + kDirectionS, + kDirectionSW, + kDirectionW, + kDirectionNW + }; + + Submarine(const ANIFile &ani); + ~Submarine(); + + /** Turn to the specified direction. */ + void turn(Direction to); + + /** Play the shoot animation. */ + void shoot(); + + /** Play the exploding animation. */ + void die(); + + /** Play the exiting animation. */ + void leave(); + + /** Advance the animation to the next frame. */ + void advance(); + + /** Can the submarine move at the moment? */ + bool canMove() const; + + /** Is the submarine dead? */ + bool isDead() const; + +private: + enum State { + kStateNone = 0, + kStateMove, + kStateShoot, + kStateExit, + kStateExited, + kStateDie, + kStateDead + }; + + State _state; + Direction _direction; + + /** Map the directions to move animation indices. */ + uint16 directionToMove(Direction direction) const; + /** Map the directions to shoot animation indices. */ + uint16 directionToShoot(Direction direction) const; + /** Map the directions to explode animation indices. */ + uint16 directionToExplode(Direction direction) const; +}; + +} // End of namespace Geisha + +} // End of namespace Gob + +#endif // GOB_MINIGAMES_GEISHA_SUBMARINE_H diff --git a/engines/gob/module.mk b/engines/gob/module.mk index c5ae947a1c..b9680fad6b 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -81,6 +81,7 @@ MODULE_OBJS := \ minigames/geisha/meter.o \ minigames/geisha/diving.o \ minigames/geisha/mouth.o \ + minigames/geisha/submarine.o \ minigames/geisha/penetration.o \ save/savefile.o \ save/savehandler.o \ -- cgit v1.2.3 From 1782012f9f9ec368689fb2e232543a5aea3c1073 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 6 Jun 2012 03:12:12 +0200 Subject: GOB: Clean up the Penetration map handling a bit --- engines/gob/minigames/geisha/penetration.cpp | 92 ++++++++++++++-------------- engines/gob/minigames/geisha/penetration.h | 6 +- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 2c1a4918b9..22cb06fed8 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -309,84 +309,88 @@ void Penetration::deinit() { _soundKiss.free(); _soundShoot.free(); + clearMap(); + + delete _objects; + delete _sprites; + + _objects = 0; + _sprites = 0; +} + +void Penetration::clearMap() { _mapAnims.clear(); _anims.clear(); + _exits.clear(); _shields.clear(); - _mouths.clear(); delete _sub; - delete _objects; - delete _sprites; - - _objects = 0; - _sprites = 0; - _sub = 0; + + _map->fill(kColorBlack); } void Penetration::createMap() { if (_floor >= kFloorCount) error("Geisha: Invalid floor %d in minigame penetration", _floor); - // Copy the correct map - memcpy(_mapTiles, kMaps[_testMode ? 1 : 0][_floor], kMapWidth * kMapHeight); - - delete _sub; - _sub = 0; + clearMap(); - _shields.clear(); - _mouths.clear(); + const byte *mapTiles = kMaps[_testMode ? 1 : 0][_floor]; - _map->fill(kColorBlack); + bool exitWorks; // Draw the map tiles for (int y = 0; y < kMapHeight; y++) { for (int x = 0; x < kMapWidth; x++) { - byte *mapTile = _mapTiles + (y * kMapWidth + x); + const byte mapTile = mapTiles[y * kMapWidth + x]; + + bool *walkMap = _walkMap + (y * kMapWidth + x); const int posX = kPlayAreaBorderWidth + x * kMapTileWidth; const int posY = kPlayAreaBorderHeight + y * kMapTileHeight; - switch (*mapTile) { + *walkMap = true; + + switch (mapTile) { case 0: // Floor _sprites->draw(*_map, kSpriteFloor, posX, posY); break; case 49: // Emergency exit (needs access pass) - if (_hasAccessPass) { + exitWorks = _hasAccessPass; + if (exitWorks) { + _exits.push_back(Position(x, y)); _sprites->draw(*_map, kSpriteExit, posX, posY); - *mapTile = 51; // Now works like a normal exit - } else + } else { _sprites->draw(*_map, kSpriteWall, posX, posY); + *walkMap = false; + } break; case 50: // Wall _sprites->draw(*_map, kSpriteWall, posX, posY); + *walkMap = false; break; case 51: // Regular exit - if (!_testMode) { - // When we're not in test mode, the last exit only works with an access pass - - if (_floor == 2) { - if (!_hasAccessPass) { - _sprites->draw(*_map, kSpriteWall, posX, posY); - *mapTile = 50; // It's now a wall - } else - _sprites->draw(*_map, kSpriteExit, posX, posY); - - } else - _sprites->draw(*_map, kSpriteExit, posX, posY); + // A regular exit works always in test mode. + // But if we're in real mode, and on the last floor, it needs an access pass + exitWorks = _testMode || (_floor < 2) || _hasAccessPass; - } else - // Always works in test mode + if (exitWorks) { + _exits.push_back(Position(x, y)); _sprites->draw(*_map, kSpriteExit, posX, posY); + } else { + _sprites->draw(*_map, kSpriteWall, posX, posY); + *walkMap = false; + } break; @@ -400,7 +404,6 @@ void Penetration::createMap() { break; case 53: // Right side of biting mouth - *mapTile = 0; // Works like a floor break; case 54: // Left side of kissing mouth @@ -413,7 +416,6 @@ void Penetration::createMap() { break; case 55: // Right side of kissing mouth - *mapTile = 0; // Works like a floor break; case 56: // Shield lying on the floor @@ -429,8 +431,6 @@ void Penetration::createMap() { case 57: // Start position _sprites->draw(*_map, kSpriteFloor, posX, posY); - *mapTile = 0; - delete _sub; _sub = new ManagedSub(x, y); @@ -472,13 +472,11 @@ int16 Penetration::checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseB return _vm->_util->checkKey(); } -bool Penetration::isWalkable(byte tile) const { - // Only walls are nonwalkable - - if (tile == 50) +bool Penetration::isWalkable(int16 x, int16 y) const { + if ((x < 0) || (x >= kMapWidth) || (y < 0) || (y >= kMapHeight)) return false; - return true; + return _walkMap[y * kMapWidth + x]; } void Penetration::handleSub(int16 key) { @@ -501,19 +499,19 @@ void Penetration::subMove(int x, int y, Submarine::Direction direction) { // Limit the movement to walkable tiles int16 minX = 0; - if ((_sub->x > 0) && !isWalkable(_mapTiles[_sub->y * kMapWidth + (_sub->x - 1)])) + if (!isWalkable(_sub->x - 1, _sub->y)) minX = _sub->x * kMapTileWidth; int16 maxX = kMapWidth * kMapTileWidth; - if ((_sub->x < (kMapWidth - 1)) && !isWalkable(_mapTiles[_sub->y * kMapWidth + (_sub->x + 1)])) + if (!isWalkable(_sub->x + 1, _sub->y)) maxX = _sub->x * kMapTileWidth; int16 minY = 0; - if ((_sub->y > 0) && !isWalkable(_mapTiles[(_sub->y - 1) * kMapWidth + _sub->x])) + if (!isWalkable(_sub->x, _sub->y - 1)) minY = _sub->y * kMapTileHeight; int16 maxY = kMapHeight * kMapTileHeight; - if ((_sub->y < (kMapHeight - 1)) && !isWalkable(_mapTiles[(_sub->y + 1) * kMapWidth + _sub->x])) + if (!isWalkable(_sub->x, _sub->y + 1)) maxY = _sub->y * kMapTileHeight; _sub->mapX = CLIP(_sub->mapX + x, minX, maxX); diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 0582b99e83..a5740382c6 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -110,10 +110,11 @@ private: uint8 _floor; Surface *_map; - byte _mapTiles[kMapWidth * kMapHeight]; + bool _walkMap[kMapWidth * kMapHeight]; ManagedSub *_sub; + Common::List _exits; Common::List _shields; Common::List _mouths; @@ -126,6 +127,7 @@ private: void init(); void deinit(); + void clearMap(); void createMap(); void initScreen(); @@ -138,7 +140,7 @@ private: void subMove(int x, int y, Submarine::Direction direction); void subShoot(); - bool isWalkable(byte tile) const; + bool isWalkable(int16 x, int16 y) const; void checkShields(); void checkMouths(); -- cgit v1.2.3 From 04d0ec8d03d46f59f950929321fef43b52ea740a Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 6 Jun 2012 03:27:40 +0200 Subject: GOB: Implement exiting floors --- engines/gob/minigames/geisha/penetration.cpp | 47 +++++++++++++++++++++++----- engines/gob/minigames/geisha/penetration.h | 4 +++ engines/gob/minigames/geisha/submarine.cpp | 9 +++--- engines/gob/minigames/geisha/submarine.h | 3 ++ 4 files changed, 52 insertions(+), 11 deletions(-) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 22cb06fed8..856c063edf 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -263,6 +263,8 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { // Handle the sub movement handleSub(key); + + checkExited(); } deinit(); @@ -276,6 +278,7 @@ void Penetration::init() { _vm->_sound->sampleLoad(&_soundBite , SOUND_SND, "pervet.snd"); _vm->_sound->sampleLoad(&_soundKiss , SOUND_SND, "baise.snd"); _vm->_sound->sampleLoad(&_soundShoot , SOUND_SND, "tirgim.snd"); + _vm->_sound->sampleLoad(&_soundExit , SOUND_SND, "trouve.snd"); _background->clear(); @@ -296,11 +299,6 @@ void Penetration::init() { _floor = 0; createMap(); - - for (Common::List::iterator m = _mouths.begin(); m != _mouths.end(); m++) - _mapAnims.push_back(m->mouth); - - _anims.push_back(_sub->sub); } void Penetration::deinit() { @@ -308,6 +306,7 @@ void Penetration::deinit() { _soundBite.free(); _soundKiss.free(); _soundShoot.free(); + _soundExit.free(); clearMap(); @@ -443,7 +442,12 @@ void Penetration::createMap() { } if (!_sub) - error("Geisha: No starting position in floor %d (testmode: %d", _floor, _testMode); + error("Geisha: No starting position in floor %d (testmode: %d)", _floor, _testMode); + + for (Common::List::iterator m = _mouths.begin(); m != _mouths.end(); m++) + _mapAnims.push_back(m->mouth); + + _anims.push_back(_sub->sub); } void Penetration::initScreen() { @@ -525,6 +529,7 @@ void Penetration::subMove(int x, int y, Submarine::Direction direction) { checkShields(); checkMouths(); + checkExits(); } void Penetration::subShoot() { @@ -578,6 +583,23 @@ void Penetration::checkMouths() { } } +void Penetration::checkExits() { + if (!_sub->sub->canMove()) + return; + + for (Common::List::iterator e = _exits.begin(); e != _exits.end(); ++e) { + if ((e->x == _sub->x) && (e->y == _sub->y)) { + _sub->mapX = e->x * kMapTileWidth; + _sub->mapY = e->y * kMapTileHeight; + + _sub->sub->leave(); + + _vm->_sound->blasterPlay(&_soundExit, 1, 0); + break; + } + } +} + void Penetration::healthGain(int amount) { if (_shieldMeter->getValue() > 0) _healthMeter->increase(_shieldMeter->increase(amount)); @@ -592,12 +614,23 @@ void Penetration::healthLose(int amount) { _sub->sub->die(); } +void Penetration::checkExited() { + if (_sub->sub->hasExited()) { + _floor++; + + if (_floor >= kFloorCount) + return; + + createMap(); + } +} + bool Penetration::isDead() const { return _sub && _sub->sub->isDead(); } bool Penetration::hasWon() const { - return _floor > kFloorCount; + return _floor >= kFloorCount; } void Penetration::updateAnims() { diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index a5740382c6..f717e7219b 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -122,6 +122,7 @@ private: SoundDesc _soundBite; SoundDesc _soundKiss; SoundDesc _soundShoot; + SoundDesc _soundExit; void init(); @@ -142,12 +143,15 @@ private: bool isWalkable(int16 x, int16 y) const; + void checkExits(); void checkShields(); void checkMouths(); void healthGain(int amount); void healthLose(int amount); + void checkExited(); + bool isDead() const; bool hasWon() const; }; diff --git a/engines/gob/minigames/geisha/submarine.cpp b/engines/gob/minigames/geisha/submarine.cpp index 4a18c6e043..0f3f936ea6 100644 --- a/engines/gob/minigames/geisha/submarine.cpp +++ b/engines/gob/minigames/geisha/submarine.cpp @@ -109,12 +109,9 @@ void Submarine::advance() { break; case kStateExit: - if (isPaused()) { + if (isPaused()) _state = kStateExited; - setVisible(true); - } - break; case kStateDie: @@ -135,6 +132,10 @@ bool Submarine::isDead() const { return _state == kStateDead; } +bool Submarine::hasExited() const { + return _state == kStateExited; +} + uint16 Submarine::directionToMove(Direction direction) const { switch (direction) { case kDirectionN: diff --git a/engines/gob/minigames/geisha/submarine.h b/engines/gob/minigames/geisha/submarine.h index e8ae72d996..d14e4e953b 100644 --- a/engines/gob/minigames/geisha/submarine.h +++ b/engines/gob/minigames/geisha/submarine.h @@ -67,6 +67,9 @@ public: /** Is the submarine dead? */ bool isDead() const; + /** Has the submarine finished exiting the level? */ + bool hasExited() const; + private: enum State { kStateNone = 0, -- cgit v1.2.3 From 78c9c72691957ea8c6ed823b76b67a1c0e1d9a93 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 6 Jun 2012 16:50:22 +0200 Subject: GOB: Set Penetration floor palettes and fade in/out --- engines/gob/minigames/geisha/penetration.cpp | 106 +++++++++++++++++++++------ engines/gob/minigames/geisha/penetration.h | 8 ++ 2 files changed, 90 insertions(+), 24 deletions(-) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 856c063edf..6d18a230a8 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -22,6 +22,7 @@ #include "gob/global.h" #include "gob/util.h" +#include "gob/palanim.h" #include "gob/draw.h" #include "gob/video.h" #include "gob/decfile.h" @@ -39,25 +40,6 @@ namespace Gob { namespace Geisha { -static const byte kPalette[48] = { - 0x16, 0x16, 0x16, - 0x12, 0x14, 0x16, - 0x34, 0x00, 0x25, - 0x1D, 0x1F, 0x22, - 0x24, 0x27, 0x2A, - 0x2C, 0x0D, 0x22, - 0x2B, 0x2E, 0x32, - 0x12, 0x09, 0x20, - 0x3D, 0x3F, 0x00, - 0x3F, 0x3F, 0x3F, - 0x00, 0x00, 0x00, - 0x15, 0x15, 0x3F, - 0x25, 0x22, 0x2F, - 0x1A, 0x14, 0x28, - 0x3F, 0x00, 0x00, - 0x15, 0x3F, 0x15 -}; - static const int kColorShield = 11; static const int kColorHealth = 15; static const int kColorBlack = 10; @@ -88,6 +70,63 @@ static const int kPlayAreaHeight = 113; static const int kPlayAreaBorderWidth = kPlayAreaWidth / 2; static const int kPlayAreaBorderHeight = kPlayAreaHeight / 2; +const byte Penetration::kPalettes[kFloorCount][3 * kPaletteSize] = { + { + 0x16, 0x16, 0x16, + 0x12, 0x14, 0x16, + 0x34, 0x00, 0x25, + 0x1D, 0x1F, 0x22, + 0x24, 0x27, 0x2A, + 0x2C, 0x0D, 0x22, + 0x2B, 0x2E, 0x32, + 0x12, 0x09, 0x20, + 0x3D, 0x3F, 0x00, + 0x3F, 0x3F, 0x3F, + 0x00, 0x00, 0x00, + 0x15, 0x15, 0x3F, + 0x25, 0x22, 0x2F, + 0x1A, 0x14, 0x28, + 0x3F, 0x00, 0x00, + 0x15, 0x3F, 0x15 + }, + { + 0x16, 0x16, 0x16, + 0x12, 0x14, 0x16, + 0x37, 0x00, 0x24, + 0x1D, 0x1F, 0x22, + 0x24, 0x27, 0x2A, + 0x30, 0x0E, 0x16, + 0x2B, 0x2E, 0x32, + 0x22, 0x0E, 0x26, + 0x3D, 0x3F, 0x00, + 0x3F, 0x3F, 0x3F, + 0x00, 0x00, 0x00, + 0x15, 0x15, 0x3F, + 0x36, 0x28, 0x36, + 0x30, 0x1E, 0x2A, + 0x3F, 0x00, 0x00, + 0x15, 0x3F, 0x15 + }, + { + 0x16, 0x16, 0x16, + 0x12, 0x14, 0x16, + 0x3F, 0x14, 0x22, + 0x1D, 0x1F, 0x22, + 0x24, 0x27, 0x2A, + 0x30, 0x10, 0x10, + 0x2B, 0x2E, 0x32, + 0x2A, 0x12, 0x12, + 0x3D, 0x3F, 0x00, + 0x3F, 0x3F, 0x3F, + 0x00, 0x00, 0x00, + 0x15, 0x15, 0x3F, + 0x3F, 0x23, 0x31, + 0x39, 0x20, 0x2A, + 0x3F, 0x00, 0x00, + 0x15, 0x3F, 0x15 + } +}; + const byte Penetration::kMaps[kModeCount][kFloorCount][kMapWidth * kMapHeight] = { { { // Real mode, floor 0 @@ -246,8 +285,9 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { while (!_vm->shouldQuit() && !isDead() && !hasWon()) { updateAnims(); - // Draw and wait for the end of the frame + // Draw, fade in if necessary and wait for the end of the frame _vm->_draw->blitInvalidated(); + fadeIn(); _vm->_util->waitEndFrame(); // Handle input @@ -450,13 +490,30 @@ void Penetration::createMap() { _anims.push_back(_sub->sub); } +void Penetration::fadeIn() { + if (!_needFadeIn) + return; + + // Fade to palette + _vm->_palAnim->fade(_vm->_global->_pPaletteDesc, 0, 0); + _needFadeIn = false; +} + +void Penetration::setPalette() { + // Fade to black + _vm->_palAnim->fade(0, 0, 0); + + // Set palette + memcpy(_vm->_draw->_vgaPalette , kPalettes[_floor], 3 * kPaletteSize); + memcpy(_vm->_draw->_vgaSmallPalette, kPalettes[_floor], 3 * kPaletteSize); + + _needFadeIn = true; +} + void Penetration::initScreen() { _vm->_util->setFrameRate(15); - memcpy(_vm->_draw->_vgaPalette , kPalette, 48); - memcpy(_vm->_draw->_vgaSmallPalette, kPalette, 48); - - _vm->_video->setFullPalette(_vm->_global->_pPaletteDesc); + setPalette(); // Draw the shield meter _sprites->draw(*_background, 0, 0, 95, 6, 9, 117, 0); // Meter frame @@ -621,6 +678,7 @@ void Penetration::checkExited() { if (_floor >= kFloorCount) return; + setPalette(); createMap(); } } diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index f717e7219b..f19e186d82 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -57,6 +57,9 @@ private: static const int kMapWidth = 17; static const int kMapHeight = 13; + static const int kPaletteSize = 16; + + static const byte kPalettes[kFloorCount][3 * kPaletteSize]; static const byte kMaps[kModeCount][kFloorCount][kMapWidth * kMapHeight]; struct Position { @@ -97,6 +100,8 @@ private: bool _hasMaxEnergy; bool _testMode; + bool _needFadeIn; + Surface *_background; CMPFile *_sprites; ANIFile *_objects; @@ -133,6 +138,9 @@ private: void initScreen(); + void setPalette(); + void fadeIn(); + void updateAnims(); int16 checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons); -- cgit v1.2.3 From 5913b9b839edc2a2bb6caecaee3336bd4de5a673 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 6 Jun 2012 19:03:23 +0200 Subject: GOB: Draw info texts in Penetration The German strings have been changed from the original, to fix the horribly broken German. Someone should probably check the Italian and Spanish strings too. --- engines/gob/minigames/geisha/penetration.cpp | 219 ++++++++++++++++++++++++++- engines/gob/minigames/geisha/penetration.h | 5 + 2 files changed, 220 insertions(+), 4 deletions(-) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 6d18a230a8..8fe75b083e 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -40,10 +40,12 @@ namespace Gob { namespace Geisha { -static const int kColorShield = 11; -static const int kColorHealth = 15; -static const int kColorBlack = 10; -static const int kColorFloor = 13; +static const int kColorShield = 11; +static const int kColorHealth = 15; +static const int kColorBlack = 10; +static const int kColorFloor = 13; +static const int kColorFloorText = 14; +static const int kColorExitText = 15; enum Sprite { kSpriteFloorShield = 25, @@ -70,6 +72,13 @@ static const int kPlayAreaHeight = 113; static const int kPlayAreaBorderWidth = kPlayAreaWidth / 2; static const int kPlayAreaBorderHeight = kPlayAreaHeight / 2; +static const int kTextAreaLeft = 9; +static const int kTextAreaTop = 7; +static const int kTextAreaRight = 104; +static const int kTextAreaBottom = 107; + +static const int kTextAreaBigBottom = 142; + const byte Penetration::kPalettes[kFloorCount][3 * kPaletteSize] = { { 0x16, 0x16, 0x16, @@ -224,6 +233,122 @@ const byte Penetration::kMaps[kModeCount][kFloorCount][kMapWidth * kMapHeight] = } }; +static const int kLanguageCount = 5; +static const int kFallbackLanguage = 2; // English + +enum String { + kString3rdBasement = 0, + kString2ndBasement, + kString1stBasement, + kStringNoExit, + kStringYouHave, + kString2Exits, + kString1Exit, + kStringToReach, + kStringUpperLevel1, + kStringUpperLevel2, + kStringLevel0, + kStringPenetration, + kStringSuccessful, + kStringDanger, + kStringGynoides, + kStringActivated, + kStringCount +}; + +static const char *kStrings[kLanguageCount][kStringCount] = { + { // French + "3EME SOUS-SOL", + "2EME SOUS-SOL", + "1ER SOUS-SOL", + "SORTIE REFUSEE", + "Vous disposez", + "de deux sorties", + "d\'une sortie", + "pour l\'acc\212s au", + "niveau", + "sup\202rieur", + "- NIVEAU 0 -", + "PENETRATION", + "REUSSIE", + "DANGER", + "GYNOIDES", + "ACTIVEES" + }, + { // German + // NOTE: The original had very broken German there. We provide proper(ish) German instead. + "3. UNTERGESCHOSS", + "2. UNTERGESCHOSS", + "1. UNTERGESCHOSS", + "AUSGANG GESPERRT", + "Sie haben", + "zwei Ausg\204nge", + "einen Ausgang", + "um das obere", + "Stockwerk zu", + "erreichen", + "- STOCKWERK 0 -", + "PENETRATION", + "ERFOLGREICH", + "GEFAHR", + "GYNOIDE", + "AKTIVIERT", + }, + { // English + "3RD BASEMENT", + "2ND BASEMENT", + "1ST BASEMENT", + "NO EXIT", + "You have", + "2 exits", + "1 exit", + "to reach upper", + "level", + "", + "- 0 LEVEL -", + "PENETRATION", + "SUCCESSFUL", + "DANGER", + "GYNOIDES", + "ACTIVATED", + }, + { // Spanish + "3ER. SUBSUELO", + "2D. SUBSUELO", + "1ER. SUBSUELO", + "SALIDA RECHAZADA", + "Dispones", + "de dos salidas", + "de una salida", + "para acceso al", + "nivel", + "superior", + "- NIVEL 0 -", + "PENETRACION", + "CONSEGUIDA", + "PELIGRO", + "GYNOIDAS", + "ACTIVADAS", + }, + { // Italian + "SOTTOSUOLO 3", + "SOTTOSUOLO 2", + "SOTTOSUOLO 1", + "NON USCITA", + "avete", + "due uscite", + "un\' uscita", + "per accedere al", + "livello", + "superiore", + "- LIVELLO 0 -", + "PENETRAZIONE", + "RIUSCITA", + "PERICOLO", + "GYNOIDI", + "ATTIVATE", + } +}; Penetration::Position::Position(uint16 pX, uint16 pY) : x(pX), y(pY) { } @@ -279,6 +404,8 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { init(); initScreen(); + drawFloorText(); + _vm->_draw->blitInvalidated(); _vm->_video->retrace(); @@ -308,6 +435,7 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { } deinit(); + drawEndText(); return hasWon(); } @@ -490,6 +618,81 @@ void Penetration::createMap() { _anims.push_back(_sub->sub); } +void Penetration::drawFloorText() { + _vm->_draw->_backSurface->fillRect(kTextAreaLeft, kTextAreaTop, kTextAreaRight, kTextAreaBottom, kColorBlack); + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, kTextAreaLeft, kTextAreaTop, kTextAreaRight, kTextAreaBottom); + + const Font *font = _vm->_draw->_fonts[2]; + if (!font) + return; + + const char **strings = kStrings[getLanguage()]; + + const char *floorString = 0; + if (_floor == 0) + floorString = strings[kString3rdBasement]; + else if (_floor == 1) + floorString = strings[kString2ndBasement]; + else if (_floor == 2) + floorString = strings[kString1stBasement]; + + if (floorString) + _vm->_draw->drawString(floorString, 10, 15, kColorFloorText, kColorBlack, 1, + *_vm->_draw->_backSurface, *font); + + if (_exits.size() > 0) { + int exitCount = kString2Exits; + if (_exits.size() == 1) + exitCount = kString1Exit; + + _vm->_draw->drawString(strings[kStringYouHave] , 10, 38, kColorExitText, kColorBlack, 1, + *_vm->_draw->_backSurface, *font); + _vm->_draw->drawString(strings[exitCount] , 10, 53, kColorExitText, kColorBlack, 1, + *_vm->_draw->_backSurface, *font); + _vm->_draw->drawString(strings[kStringToReach] , 10, 68, kColorExitText, kColorBlack, 1, + *_vm->_draw->_backSurface, *font); + _vm->_draw->drawString(strings[kStringUpperLevel1], 10, 84, kColorExitText, kColorBlack, 1, + *_vm->_draw->_backSurface, *font); + _vm->_draw->drawString(strings[kStringUpperLevel2], 10, 98, kColorExitText, kColorBlack, 1, + *_vm->_draw->_backSurface, *font); + + } else + _vm->_draw->drawString(strings[kStringNoExit], 10, 53, kColorExitText, kColorBlack, 1, + *_vm->_draw->_backSurface, *font); +} + +void Penetration::drawEndText() { + // Only draw the end text when we've won and this isn't a test run + if (!hasWon() || _testMode) + return; + + _vm->_draw->_backSurface->fillRect(kTextAreaLeft, kTextAreaTop, kTextAreaRight, kTextAreaBigBottom, kColorBlack); + + const Font *font = _vm->_draw->_fonts[2]; + if (!font) + return; + + const char **strings = kStrings[getLanguage()]; + + _vm->_draw->drawString(strings[kStringLevel0] , 11, 21, kColorExitText, kColorBlack, 1, + *_vm->_draw->_backSurface, *font); + _vm->_draw->drawString(strings[kStringPenetration], 11, 42, kColorExitText, kColorBlack, 1, + *_vm->_draw->_backSurface, *font); + _vm->_draw->drawString(strings[kStringSuccessful] , 11, 58, kColorExitText, kColorBlack, 1, + *_vm->_draw->_backSurface, *font); + + _vm->_draw->drawString(strings[kStringDanger] , 11, 82, kColorFloorText, kColorBlack, 1, + *_vm->_draw->_backSurface, *font); + _vm->_draw->drawString(strings[kStringGynoides] , 11, 98, kColorFloorText, kColorBlack, 1, + *_vm->_draw->_backSurface, *font); + _vm->_draw->drawString(strings[kStringActivated], 11, 113, kColorFloorText, kColorBlack, 1, + *_vm->_draw->_backSurface, *font); + + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, kTextAreaLeft, kTextAreaTop, kTextAreaRight, kTextAreaBigBottom); + _vm->_draw->blitInvalidated(); + _vm->_video->retrace(); +} + void Penetration::fadeIn() { if (!_needFadeIn) return; @@ -680,6 +883,7 @@ void Penetration::checkExited() { setPalette(); createMap(); + drawFloorText(); } } @@ -691,6 +895,13 @@ bool Penetration::hasWon() const { return _floor >= kFloorCount; } +int Penetration::getLanguage() const { + if (_vm->_global->_language < kLanguageCount) + return _vm->_global->_language; + + return kFallbackLanguage; +} + void Penetration::updateAnims() { int16 left = 0, top = 0, right = 0, bottom = 0; diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index f19e186d82..3f03bfaf38 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -141,6 +141,9 @@ private: void setPalette(); void fadeIn(); + void drawFloorText(); + void drawEndText(); + void updateAnims(); int16 checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons); @@ -162,6 +165,8 @@ private: bool isDead() const; bool hasWon() const; + + int getLanguage() const; }; } // End of namespace Geisha -- cgit v1.2.3 From 4288edd5236cb0c232dea0bd818779539e9bc6f2 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 6 Jun 2012 19:21:21 +0200 Subject: GOB: Add the original broken German as comments --- engines/gob/minigames/geisha/penetration.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 8fe75b083e..1bcc42a329 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -277,19 +277,20 @@ static const char *kStrings[kLanguageCount][kStringCount] = { }, { // German // NOTE: The original had very broken German there. We provide proper(ish) German instead. - "3. UNTERGESCHOSS", - "2. UNTERGESCHOSS", - "1. UNTERGESCHOSS", + // B0rken text in the comments after each line + "3. UNTERGESCHOSS", // "3. U.-GESCHOSS"" + "2. UNTERGESCHOSS", // "2. U.-GESCHOSS" + "1. UNTERGESCHOSS", // "1. U.-GESCHOSS" "AUSGANG GESPERRT", "Sie haben", - "zwei Ausg\204nge", - "einen Ausgang", - "um das obere", - "Stockwerk zu", - "erreichen", - "- STOCKWERK 0 -", - "PENETRATION", - "ERFOLGREICH", + "zwei Ausg\204nge", // "zwei Ausgang" + "einen Ausgang", // "Fortsetztung" + "um das obere", // "" + "Stockwerk zu", // "" + "erreichen", // "" + "- STOCKWERK 0 -", // "0 - HOHE" + "PENETRATION", // "DURCHDRIGEN" + "ERFOLGREICH", // "ERFOLG" "GEFAHR", "GYNOIDE", "AKTIVIERT", -- cgit v1.2.3 From 8c3d2fc7410ab3f55735f6a78dadbeec23c59b6c Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 7 Jun 2012 00:21:54 +0200 Subject: GOB: Add a way to reopen currently opened IMD/VMD videos This is a workaround for how Lost in Time behaves in combination with changes I made to the DataIO code for running Urban Runner on low-memory devices. Urban Runner's intro are far to big to have them copied into memory for these devices, so I made the DataIO code return a SafeSeekableSubReadStream into the opened archive stream instead. Unfortunately, Lost in Time might not close a video file when it closes the data file which it was originally in, especially when loading a saved game. Since the video player needs to be able to gaplessly continue a video and there does not, by itself, close the video if not requested by the scripts, this leads to reading out of an already closed stream in certain cases. So, to worka round this issues, the video player tries to reopen each currently opened video after a data archive was closed, to make sure that that video is still available. If not, the video is closed. --- engines/gob/inter_v1.cpp | 9 ++++++-- engines/gob/inter_v2.cpp | 4 ++++ engines/gob/videoplayer.cpp | 50 +++++++++++++++++++++++++++++++++++++++++++++ engines/gob/videoplayer.h | 7 +++++++ video/coktel_decoder.cpp | 45 ++++++++++++++++++++++++++++++++++++++++ video/coktel_decoder.h | 9 ++++++++ 6 files changed, 122 insertions(+), 2 deletions(-) diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 9aa190a456..4aa54f720b 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -1744,10 +1744,15 @@ void Inter_v1::o1_writeData(OpFuncParams ¶ms) { void Inter_v1::o1_manageDataFile(OpFuncParams ¶ms) { Common::String file = _vm->_game->_script->evalString(); - if (!file.empty()) + if (!file.empty()) { _vm->_dataIO->openArchive(file, true); - else + } else { _vm->_dataIO->closeArchive(true); + + // NOTE: Lost in Time might close a data file without explicitely closing a video in it. + // So we make sure that all open videos are still available. + _vm->_vidPlayer->reopenAll(); + } } void Inter_v1::o1_setState(OpGobParams ¶ms) { diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 1e5b7bb24c..54f6a1acc1 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1002,6 +1002,10 @@ void Inter_v2::o2_openItk() { void Inter_v2::o2_closeItk() { _vm->_dataIO->closeArchive(false); + + // NOTE: Lost in Time might close a data file without explicitely closing a video in it. + // So we make sure that all open videos are still available. + _vm->_vidPlayer->reopenAll(); } void Inter_v2::o2_setImdFrontSurf() { diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index 221f5ab3c9..a478492ccc 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -234,6 +234,23 @@ void VideoPlayer::closeAll() { closeVideo(i); } +bool VideoPlayer::reopenVideo(int slot) { + Video *video = getVideoBySlot(slot); + if (!video) + return true; + + return reopenVideo(*video); +} + +bool VideoPlayer::reopenAll() { + bool all = true; + for (int i = 0; i < kVideoSlotCount; i++) + if (!reopenVideo(i)) + all = false; + + return all; +} + void VideoPlayer::pauseVideo(int slot, bool pause) { Video *video = getVideoBySlot(slot); if (!video || !video->decoder) @@ -850,6 +867,39 @@ Common::String VideoPlayer::findFile(const Common::String &file, Properties &pro return video; } +bool VideoPlayer::reopenVideo(Video &video) { + if (video.isEmpty()) + return true; + + if (video.fileName.empty()) { + video.close(); + return false; + } + + Properties properties; + + properties.type = video.properties.type; + + Common::String fileName = findFile(video.fileName, properties); + if (fileName.empty()) { + video.close(); + return false; + } + + Common::SeekableReadStream *stream = _vm->_dataIO->getFile(fileName); + if (!stream) { + video.close(); + return false; + } + + if (!video.decoder->reloadStream(stream)) { + delete stream; + return false; + } + + return true; +} + void VideoPlayer::copyPalette(const Video &video, int16 palStart, int16 palEnd) { if (!video.decoder->hasPalette() || !video.decoder->isPaletted()) return; diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h index bc7cb48768..129ccef67a 100644 --- a/engines/gob/videoplayer.h +++ b/engines/gob/videoplayer.h @@ -110,6 +110,9 @@ public: void closeLiveSound(); void closeAll(); + bool reopenVideo(int slot = 0); + bool reopenAll(); + void pauseVideo(int slot, bool pause); void pauseAll(bool pause); @@ -163,6 +166,8 @@ private: bool isEmpty() const; void close(); + + void reopen(); }; static const int kVideoSlotCount = 32; @@ -188,6 +193,8 @@ private: ::Video::CoktelDecoder *openVideo(const Common::String &file, Properties &properties); + bool reopenVideo(Video &video); + bool playFrame(int slot, Properties &properties); void checkAbort(Video &video, Properties &properties); diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp index be36874db4..0c7ade1b8a 100644 --- a/video/coktel_decoder.cpp +++ b/video/coktel_decoder.cpp @@ -646,6 +646,21 @@ PreIMDDecoder::~PreIMDDecoder() { close(); } +bool PreIMDDecoder::reloadStream(Common::SeekableReadStream *stream) { + if (!_stream) + return false; + + if (!stream->seek(_stream->pos())) { + close(); + return false; + } + + delete _stream; + _stream = stream; + + return true; +} + bool PreIMDDecoder::seek(int32 frame, int whence, bool restart) { if (!evaluateSeekFrame(frame, whence)) return false; @@ -840,6 +855,21 @@ IMDDecoder::~IMDDecoder() { close(); } +bool IMDDecoder::reloadStream(Common::SeekableReadStream *stream) { + if (!_stream) + return false; + + if (!stream->seek(_stream->pos())) { + close(); + return false; + } + + delete _stream; + _stream = stream; + + return true; +} + bool IMDDecoder::seek(int32 frame, int whence, bool restart) { if (!evaluateSeekFrame(frame, whence)) return false; @@ -1536,6 +1566,21 @@ VMDDecoder::~VMDDecoder() { close(); } +bool VMDDecoder::reloadStream(Common::SeekableReadStream *stream) { + if (!_stream) + return false; + + if (!stream->seek(_stream->pos())) { + close(); + return false; + } + + delete _stream; + _stream = stream; + + return true; +} + bool VMDDecoder::seek(int32 frame, int whence, bool restart) { if (!evaluateSeekFrame(frame, whence)) return false; diff --git a/video/coktel_decoder.h b/video/coktel_decoder.h index 68696d5ff3..c88d982191 100644 --- a/video/coktel_decoder.h +++ b/video/coktel_decoder.h @@ -79,6 +79,9 @@ public: Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); ~CoktelDecoder(); + /** Replace the current video stream with this identical one. */ + virtual bool reloadStream(Common::SeekableReadStream *stream) = 0; + virtual bool seek(int32 frame, int whence = SEEK_SET, bool restart = false) = 0; /** Draw directly onto the specified video memory. */ @@ -237,6 +240,8 @@ public: Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); ~PreIMDDecoder(); + bool reloadStream(Common::SeekableReadStream *stream); + bool seek(int32 frame, int whence = SEEK_SET, bool restart = false); @@ -268,6 +273,8 @@ public: IMDDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); ~IMDDecoder(); + bool reloadStream(Common::SeekableReadStream *stream); + bool seek(int32 frame, int whence = SEEK_SET, bool restart = false); void setXY(uint16 x, uint16 y); @@ -364,6 +371,8 @@ public: VMDDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); ~VMDDecoder(); + bool reloadStream(Common::SeekableReadStream *stream); + bool seek(int32 frame, int whence = SEEK_SET, bool restart = false); void setXY(uint16 x, uint16 y); -- cgit v1.2.3 From f3fba318466d8afdfe14d42e4ef9f1902375166d Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 6 Jun 2012 21:46:25 -0400 Subject: SCUMM: Implement football2002 u32 opcode 1028 Scoreboard transitions now play --- engines/scumm/he/logic/football.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/engines/scumm/he/logic/football.cpp b/engines/scumm/he/logic/football.cpp index f86f97eaf7..5a0d423508 100644 --- a/engines/scumm/he/logic/football.cpp +++ b/engines/scumm/he/logic/football.cpp @@ -45,6 +45,7 @@ private: int op_1022(int32 *args); int op_1023(int32 *args); int op_1024(int32 *args); + int op_1028(); }; int LogicHEfootball::versionID() { @@ -83,6 +84,11 @@ int32 LogicHEfootball::dispatch(int op, int numArgs, int32 *args) { res = op_1024(args); break; + case 1028: + // Backyard Football 2002 only + res = op_1028(); + break; + case 8221968: // Someone had a fun and used his birthday as opcode number res = getFromArray(args[0], args[1], args[2]); @@ -281,6 +287,12 @@ int LogicHEfootball::op_1024(int32 *args) { return 1; } +int LogicHEfootball::op_1028() { + // Backyard Football 2002 only + writeScummVar(108, 100000000); + return 1; +} + LogicHE *makeLogicHEfootball(ScummEngine_v90he *vm) { return new LogicHEfootball(vm); } -- cgit v1.2.3 From 95454ab52c3e8f251b08aa62b18f071374de85b9 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 7 Jun 2012 04:02:42 +0200 Subject: GOB: Better controls in Geisha's Penetration You can actually move diagonally now --- engines/gob/minigames/geisha/penetration.cpp | 103 ++++++++++++++++++++------- engines/gob/minigames/geisha/penetration.h | 18 ++++- engines/gob/minigames/geisha/submarine.cpp | 2 +- engines/gob/minigames/geisha/submarine.h | 1 + 4 files changed, 96 insertions(+), 28 deletions(-) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 1bcc42a329..72c53cb5c3 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -20,6 +20,8 @@ * */ +#include "common/events.h" + #include "gob/global.h" #include "gob/util.h" #include "gob/palanim.h" @@ -410,7 +412,7 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { _vm->_draw->blitInvalidated(); _vm->_video->retrace(); - while (!_vm->shouldQuit() && !isDead() && !hasWon()) { + while (!_vm->shouldQuit() && !_quit && !isDead() && !hasWon()) { updateAnims(); // Draw, fade in if necessary and wait for the end of the frame @@ -418,19 +420,11 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { fadeIn(); _vm->_util->waitEndFrame(); - // Handle input - _vm->_util->processInput(); - - int16 mouseX, mouseY; - MouseButtons mouseButtons; - - int16 key = checkInput(mouseX, mouseY, mouseButtons); - // Aborting the game - if (key == kKeyEscape) - break; + // Handle the input + checkInput(); // Handle the sub movement - handleSub(key); + handleSub(); checkExited(); } @@ -449,6 +443,10 @@ void Penetration::init() { _vm->_sound->sampleLoad(&_soundShoot , SOUND_SND, "tirgim.snd"); _vm->_sound->sampleLoad(&_soundExit , SOUND_SND, "trouve.snd"); + _quit = false; + for (int i = 0; i < kKeyCount; i++) + _keys[i] = false; + _background->clear(); _vm->_video->drawPackedSprite("hyprmef2.cmp", *_background); @@ -731,10 +729,44 @@ void Penetration::initScreen() { _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, 0, 0, 319, 199); } -int16 Penetration::checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons) { - _vm->_util->getMouseState(&mouseX, &mouseY, &mouseButtons); +void Penetration::checkInput() { + Common::Event event; + Common::EventManager *eventMan = g_system->getEventManager(); + + while (eventMan->pollEvent(event)) { + switch (event.type) { + case Common::EVENT_KEYDOWN: + if (event.kbd.keycode == Common::KEYCODE_ESCAPE) + _quit = true; + else if (event.kbd.keycode == Common::KEYCODE_UP) + _keys[kKeyUp ] = true; + else if (event.kbd.keycode == Common::KEYCODE_DOWN) + _keys[kKeyDown ] = true; + else if (event.kbd.keycode == Common::KEYCODE_LEFT) + _keys[kKeyLeft ] = true; + else if (event.kbd.keycode == Common::KEYCODE_RIGHT) + _keys[kKeyRight] = true; + else if (event.kbd.keycode == Common::KEYCODE_SPACE) + _keys[kKeySpace] = true; + break; + + case Common::EVENT_KEYUP: + if (event.kbd.keycode == Common::KEYCODE_UP) + _keys[kKeyUp ] = false; + else if (event.kbd.keycode == Common::KEYCODE_DOWN) + _keys[kKeyDown ] = false; + else if (event.kbd.keycode == Common::KEYCODE_LEFT) + _keys[kKeyLeft ] = false; + else if (event.kbd.keycode == Common::KEYCODE_RIGHT) + _keys[kKeyRight] = false; + else if (event.kbd.keycode == Common::KEYCODE_SPACE) + _keys[kKeySpace] = false; + break; - return _vm->_util->checkKey(); + default: + break; + } + } } bool Penetration::isWalkable(int16 x, int16 y) const { @@ -744,16 +776,13 @@ bool Penetration::isWalkable(int16 x, int16 y) const { return _walkMap[y * kMapWidth + x]; } -void Penetration::handleSub(int16 key) { - if (key == kKeyLeft) - subMove(-5, 0, Submarine::kDirectionW); - else if (key == kKeyRight) - subMove( 5, 0, Submarine::kDirectionE); - else if (key == kKeyUp) - subMove( 0, -5, Submarine::kDirectionN); - else if (key == kKeyDown) - subMove( 0, 5, Submarine::kDirectionS); - else if (key == kKeySpace) +void Penetration::handleSub() { + int x, y; + Submarine::Direction direction = getDirection(x, y); + + subMove(x, y, direction); + + if (_keys[kKeySpace]) subShoot(); } @@ -802,6 +831,30 @@ void Penetration::subShoot() { _vm->_sound->blasterPlay(&_soundShoot, 1, 0); } +Submarine::Direction Penetration::getDirection(int &x, int &y) const { + x = _keys[kKeyRight] ? 3 : (_keys[kKeyLeft] ? -3 : 0); + y = _keys[kKeyDown ] ? 3 : (_keys[kKeyUp ] ? -3 : 0); + + if ((x > 0) && (y > 0)) + return Submarine::kDirectionSE; + if ((x > 0) && (y < 0)) + return Submarine::kDirectionNE; + if ((x < 0) && (y > 0)) + return Submarine::kDirectionSW; + if ((x < 0) && (y < 0)) + return Submarine::kDirectionNW; + if (x > 0) + return Submarine::kDirectionE; + if (x < 0) + return Submarine::kDirectionW; + if (y > 0) + return Submarine::kDirectionS; + if (y < 0) + return Submarine::kDirectionN; + + return Submarine::kDirectionNone; +} + void Penetration::checkShields() { for (Common::List::iterator pos = _shields.begin(); pos != _shields.end(); ++pos) { if ((pos->x == _sub->x) && (pos->y == _sub->y)) { diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 3f03bfaf38..0f36453017 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -94,6 +94,15 @@ private: void setPosition(uint16 pX, uint16 pY); }; + enum Keys { + kKeyUp = 0, + kKeyDown, + kKeyLeft, + kKeyRight, + kKeySpace, + kKeyCount + }; + GobEngine *_vm; bool _hasAccessPass; @@ -102,6 +111,9 @@ private: bool _needFadeIn; + bool _quit; + bool _keys[kKeyCount]; + Surface *_background; CMPFile *_sprites; ANIFile *_objects; @@ -146,12 +158,14 @@ private: void updateAnims(); - int16 checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons); + void checkInput(); - void handleSub(int16 key); + void handleSub(); void subMove(int x, int y, Submarine::Direction direction); void subShoot(); + Submarine::Direction getDirection(int &x, int &y) const; + bool isWalkable(int16 x, int16 y) const; void checkExits(); diff --git a/engines/gob/minigames/geisha/submarine.cpp b/engines/gob/minigames/geisha/submarine.cpp index 0f3f936ea6..c61f49f22b 100644 --- a/engines/gob/minigames/geisha/submarine.cpp +++ b/engines/gob/minigames/geisha/submarine.cpp @@ -60,7 +60,7 @@ Submarine::~Submarine() { void Submarine::turn(Direction to) { // Nothing to do - if ((_state == kStateMove) && (_direction == to)) + if ((to == kDirectionNone) || ((_state == kStateMove) && (_direction == to))) return; _state = kStateMove; diff --git a/engines/gob/minigames/geisha/submarine.h b/engines/gob/minigames/geisha/submarine.h index d14e4e953b..2455ef95c1 100644 --- a/engines/gob/minigames/geisha/submarine.h +++ b/engines/gob/minigames/geisha/submarine.h @@ -33,6 +33,7 @@ namespace Geisha { class Submarine : public ANIObject { public: enum Direction { + kDirectionNone, kDirectionN, kDirectionNE, kDirectionE, -- cgit v1.2.3 From 3d537e763c85bb3f16825c8b47894335568278a0 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 7 Jun 2012 04:20:41 +0200 Subject: GOB: Handle Penetration shooting animations more cleverly Still no bullets, though :P --- engines/gob/aniobject.cpp | 4 ++++ engines/gob/aniobject.h | 3 +++ engines/gob/minigames/geisha/penetration.cpp | 2 +- engines/gob/minigames/geisha/submarine.cpp | 27 +++++++++++++++++++++------ engines/gob/minigames/geisha/submarine.h | 5 +++++ 5 files changed, 34 insertions(+), 7 deletions(-) diff --git a/engines/gob/aniobject.cpp b/engines/gob/aniobject.cpp index 54534cd60b..8d739fb3a4 100644 --- a/engines/gob/aniobject.cpp +++ b/engines/gob/aniobject.cpp @@ -76,6 +76,10 @@ void ANIObject::rewind() { _frame = 0; } +void ANIObject::setFrame(uint16 frame) { + _frame = frame % _ani->getAnimationInfo(_animation).frameCount; +} + void ANIObject::setPosition() { // CMP "animations" have no default position if (_cmp) diff --git a/engines/gob/aniobject.h b/engines/gob/aniobject.h index 5ea1f75401..00f42b43ce 100644 --- a/engines/gob/aniobject.h +++ b/engines/gob/aniobject.h @@ -84,6 +84,9 @@ public: /** Rewind the current animation to the first frame. */ void rewind(); + /** Set the animation to a specific frame. */ + void setFrame(uint16 frame); + /** Return the current animation number. */ uint16 getAnimation() const; /** Return the current frame number. */ diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 72c53cb5c3..e260d3cae2 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -823,7 +823,7 @@ void Penetration::subMove(int x, int y, Submarine::Direction direction) { } void Penetration::subShoot() { - if (!_sub->sub->canMove()) + if (!_sub->sub->canMove() || _sub->sub->isShooting()) return; _sub->sub->shoot(); diff --git a/engines/gob/minigames/geisha/submarine.cpp b/engines/gob/minigames/geisha/submarine.cpp index c61f49f22b..9c12a56a85 100644 --- a/engines/gob/minigames/geisha/submarine.cpp +++ b/engines/gob/minigames/geisha/submarine.cpp @@ -51,7 +51,7 @@ enum Animation { }; -Submarine::Submarine(const ANIFile &ani) : ANIObject(ani), _state(kStateNone) { +Submarine::Submarine(const ANIFile &ani) : ANIObject(ani), _state(kStateMove) { turn(kDirectionN); } @@ -63,13 +63,21 @@ void Submarine::turn(Direction to) { if ((to == kDirectionNone) || ((_state == kStateMove) && (_direction == to))) return; - _state = kStateMove; _direction = to; - setAnimation(directionToMove(_direction)); - setMode(kModeContinuous); + move(); +} + +void Submarine::move() { + uint16 frame = getFrame(); + uint16 anim = (_state == kStateShoot) ? directionToShoot(_direction) : directionToMove(_direction); + + setAnimation(anim); + setFrame(frame); setPause(false); setVisible(true); + + setMode((_state == kStateShoot) ? kModeOnce : kModeContinuous); } void Submarine::shoot() { @@ -104,8 +112,11 @@ void Submarine::advance() { switch (_state) { case kStateShoot: - if (isPaused()) - turn(_direction); + if (isPaused()) { + _state = kStateMove; + + move(); + } break; case kStateExit: @@ -132,6 +143,10 @@ bool Submarine::isDead() const { return _state == kStateDead; } +bool Submarine::isShooting() const { + return _state == kStateShoot; +} + bool Submarine::hasExited() const { return _state == kStateExited; } diff --git a/engines/gob/minigames/geisha/submarine.h b/engines/gob/minigames/geisha/submarine.h index 2455ef95c1..8a6d679bdd 100644 --- a/engines/gob/minigames/geisha/submarine.h +++ b/engines/gob/minigames/geisha/submarine.h @@ -68,6 +68,9 @@ public: /** Is the submarine dead? */ bool isDead() const; + /** Is the submarine shooting? */ + bool isShooting() const; + /** Has the submarine finished exiting the level? */ bool hasExited() const; @@ -91,6 +94,8 @@ private: uint16 directionToShoot(Direction direction) const; /** Map the directions to explode animation indices. */ uint16 directionToExplode(Direction direction) const; + + void move(); }; } // End of namespace Geisha -- cgit v1.2.3 From c37577a950f7337889d5c705c9bc67d434ed3670 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 7 Jun 2012 04:29:10 +0200 Subject: GOB: Hook up the Penetration minigame in the cheater --- engines/gob/cheater.h | 6 ++++-- engines/gob/cheater_geisha.cpp | 11 +++++++++-- engines/gob/inter_geisha.cpp | 2 +- engines/gob/minigames/geisha/penetration.cpp | 18 +++++++++++++++++- engines/gob/minigames/geisha/penetration.h | 5 +++++ 5 files changed, 36 insertions(+), 6 deletions(-) diff --git a/engines/gob/cheater.h b/engines/gob/cheater.h index 334a5e88eb..bf6c1372fb 100644 --- a/engines/gob/cheater.h +++ b/engines/gob/cheater.h @@ -31,6 +31,7 @@ namespace Gob { namespace Geisha { class Diving; + class Penetration; } class GobEngine; @@ -48,13 +49,14 @@ protected: class Cheater_Geisha : public Cheater { public: - Cheater_Geisha(GobEngine *vm, Geisha::Diving *diving); + Cheater_Geisha(GobEngine *vm, Geisha::Diving *diving, Geisha::Penetration *penetration); ~Cheater_Geisha(); bool cheat(GUI::Debugger &console); private: - Geisha::Diving *_diving; + Geisha::Diving *_diving; + Geisha::Penetration *_penetration; }; } // End of namespace Gob diff --git a/engines/gob/cheater_geisha.cpp b/engines/gob/cheater_geisha.cpp index 3d8c56707d..567333c12f 100644 --- a/engines/gob/cheater_geisha.cpp +++ b/engines/gob/cheater_geisha.cpp @@ -27,11 +27,12 @@ #include "gob/inter.h" #include "gob/minigames/geisha/diving.h" +#include "gob/minigames/geisha/penetration.h" namespace Gob { -Cheater_Geisha::Cheater_Geisha(GobEngine *vm, Geisha::Diving *diving) : - Cheater(vm), _diving(diving) { +Cheater_Geisha::Cheater_Geisha(GobEngine *vm, Geisha::Diving *diving, Geisha::Penetration *penetration) : + Cheater(vm), _diving(diving), _penetration(penetration) { } @@ -45,6 +46,12 @@ bool Cheater_Geisha::cheat(GUI::Debugger &console) { return false; } + // A cheat to get around the Penetration minigame + if (_penetration->isPlaying()) { + _penetration->cheatWin(); + return false; + } + // A cheat to get around the mastermind puzzle if (_vm->isCurrentTot("hard.tot") && _vm->_inter->_variables) { uint32 digit1 = READ_VARO_UINT32(0x768); diff --git a/engines/gob/inter_geisha.cpp b/engines/gob/inter_geisha.cpp index 99f834d4d7..75204a3f55 100644 --- a/engines/gob/inter_geisha.cpp +++ b/engines/gob/inter_geisha.cpp @@ -55,7 +55,7 @@ Inter_Geisha::Inter_Geisha(GobEngine *vm) : Inter_v1(vm), _diving = new Geisha::Diving(vm); _penetration = new Geisha::Penetration(vm); - _cheater = new Cheater_Geisha(vm, _diving); + _cheater = new Cheater_Geisha(vm, _diving, _penetration); _vm->_console->registerCheater(_cheater); } diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index e260d3cae2..9791757984 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -377,7 +377,7 @@ Penetration::ManagedSub::~ManagedSub() { Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _objects(0), _sub(0), - _shieldMeter(0), _healthMeter(0), _floor(0) { + _shieldMeter(0), _healthMeter(0), _floor(0), _isPlaying(false) { _background = new Surface(320, 200, 1); @@ -404,6 +404,8 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { _hasMaxEnergy = hasMaxEnergy; _testMode = testMode; + _isPlaying = true; + init(); initScreen(); @@ -432,9 +434,19 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { deinit(); drawEndText(); + _isPlaying = false; + return hasWon(); } +bool Penetration::isPlaying() const { + return _isPlaying; +} + +void Penetration::cheatWin() { + _floor = 3; +} + void Penetration::init() { // Load sounds _vm->_sound->sampleLoad(&_soundShield, SOUND_SND, "boucl.snd"); @@ -748,6 +760,10 @@ void Penetration::checkInput() { _keys[kKeyRight] = true; else if (event.kbd.keycode == Common::KEYCODE_SPACE) _keys[kKeySpace] = true; + else if (event.kbd.keycode == Common::KEYCODE_d) { + _vm->getDebugger()->attach(); + _vm->getDebugger()->onFrame(); + } break; case Common::EVENT_KEYUP: diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 0f36453017..0336ef8dcb 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -50,6 +50,9 @@ public: bool play(bool hasAccessPass, bool hasMaxEnergy, bool testMode); + bool isPlaying() const; + void cheatWin(); + private: static const int kModeCount = 2; static const int kFloorCount = 3; @@ -141,6 +144,8 @@ private: SoundDesc _soundShoot; SoundDesc _soundExit; + bool _isPlaying; + void init(); void deinit(); -- cgit v1.2.3 From e73f93e565fc0074da66429fd59db25114f84c12 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 7 Jun 2012 14:49:07 +1000 Subject: AGOS: Fix compiling AGOS game engine, when AGOS2 is disabled. --- engines/agos/charset-fontdata.cpp | 90 +++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/engines/agos/charset-fontdata.cpp b/engines/agos/charset-fontdata.cpp index 87f51cfad2..262ae44f01 100644 --- a/engines/agos/charset-fontdata.cpp +++ b/engines/agos/charset-fontdata.cpp @@ -681,6 +681,51 @@ static const byte feeble_windowFont[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +void AGOSEngine_Feeble::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) { + const byte *src; + byte color, *dst; + uint dstPitch, h, w, i; + + if (_noOracleScroll) + return; + + _videoLockOut |= 0x8000; + + dst = getBackGround(); + dstPitch = _backGroundBuf->pitch; + h = 13; + w = getFeebleFontSize(chr); + + if (_language == Common::PL_POL) { + if (!strcmp(getExtra(), "4CD")) + src = polish4CD_feeble_windowFont + (chr - 32) * 13; + else + src = polish2CD_feeble_windowFont + (chr - 32) * 13; + } else { + src = feeble_windowFont + (chr - 32) * 13; + } + dst += y * dstPitch + x + window->textColumnOffset; + + color = window->textColor; + + do { + int8 b = *src++; + i = 0; + do { + if (b < 0) { + if (dst[i] == 0) + dst[i] = color; + } + + b <<= 1; + } while (++i != w); + dst += dstPitch; + } while (--h); + + _videoLockOut &= ~0x8000; +} +#endif + static const byte english_simon1AGAFontData[] = { 0x00,0x00,0x00,0x20,0x00,0x00,0x20,0x50,0x20,0x10,0x40,0x88,0x30,0x40,0x00,0x88,0x20,0x00,0x00,0x50,0x20,0x00,0x00,0x50,0x00,0x00,0x00,0x20,0x00,0x00,0x20,0x50,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x05, 0x00,0x00,0x00,0x30,0x00,0x10,0x20,0x48,0x10,0x20,0x00,0x48,0x20,0x40,0x00,0x90,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05, @@ -1253,51 +1298,6 @@ void AGOSEngine::renderString(uint vgaSpriteId, uint color, uint width, uint hei } } -void AGOSEngine_Feeble::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) { - const byte *src; - byte color, *dst; - uint dstPitch, h, w, i; - - if (_noOracleScroll) - return; - - _videoLockOut |= 0x8000; - - dst = getBackGround(); - dstPitch = _backGroundBuf->pitch; - h = 13; - w = getFeebleFontSize(chr); - - if (_language == Common::PL_POL) { - if (!strcmp(getExtra(), "4CD")) - src = polish4CD_feeble_windowFont + (chr - 32) * 13; - else - src = polish2CD_feeble_windowFont + (chr - 32) * 13; - } else { - src = feeble_windowFont + (chr - 32) * 13; - } - dst += y * dstPitch + x + window->textColumnOffset; - - color = window->textColor; - - do { - int8 b = *src++; - i = 0; - do { - if (b < 0) { - if (dst[i] == 0) - dst[i] = color; - } - - b <<= 1; - } while (++i != w); - dst += dstPitch; - } while (--h); - - _videoLockOut &= ~0x8000; -} -#endif - static const byte czech_simonFont[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x70, 0x70, 0x20, 0x20, 0x00, 0x20, 0x00, -- cgit v1.2.3 From dd558510dc60b61d9f960c7f49e8bc0327d8115b Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Jun 2012 08:36:12 +0100 Subject: TOON: Move PathFindingHeap API to use int16 for x,y coordinates. The internal x,y point representation was already changed to int16 anyway, so this just harmonises this with the external API (and with Common::Point which uses int16). --- engines/toon/path.cpp | 12 +++++++----- engines/toon/path.h | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp index 2dd5fc45e2..540290d823 100644 --- a/engines/toon/path.cpp +++ b/engines/toon/path.cpp @@ -60,7 +60,7 @@ void PathFindingHeap::clear() { memset(_data, 0, sizeof(HeapDataGrid) * _size); } -void PathFindingHeap::push(int32 x, int32 y, int32 weight) { +void PathFindingHeap::push(int16 x, int16 y, int32 weight) { debugC(2, kDebugPath, "push(%d, %d, %d)", x, y, weight); if (_count == _size) { @@ -87,7 +87,7 @@ void PathFindingHeap::push(int32 x, int32 y, int32 weight) { int32 lMax = _count-1; int32 lT = 0; - while (1) { + while (true) { if (lMax <= 0) break; lT = (lMax-1) / 2; @@ -104,7 +104,7 @@ void PathFindingHeap::push(int32 x, int32 y, int32 weight) { } } -void PathFindingHeap::pop(int32 *x, int32 *y, int32 *weight) { +void PathFindingHeap::pop(int16 *x, int16 *y, int32 *weight) { debugC(2, kDebugPath, "pop(x, y, weight)"); if (!_count) { @@ -123,7 +123,7 @@ void PathFindingHeap::pop(int32 *x, int32 *y, int32 *weight) { int32 lMin = 0; int32 lT = 0; - while (1) { + while (true) { lT = (lMin << 1) + 1; if (lT < _count) { if (lT < _count-1) { @@ -315,7 +315,9 @@ int32 PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { while (_heap->getCount()) { wei = 0; - _heap->pop(&curX, &curY, &curWeight); + int16 tempCurX, tempCurY; + _heap->pop(&tempCurX, &tempCurY, &curWeight); + curX = tempCurX, curY = tempCurY; // FIXME - Bodge to match heap->pop types int curNode = curX + curY * _width; int32 endX = MIN(curX + 1, _width - 1); diff --git a/engines/toon/path.h b/engines/toon/path.h index 2de58064f0..df2b2e94be 100644 --- a/engines/toon/path.h +++ b/engines/toon/path.h @@ -38,8 +38,8 @@ public: PathFindingHeap(); ~PathFindingHeap(); - void push(int32 x, int32 y, int32 weight); - void pop(int32 *x, int32 *y, int32 *weight); + void push(int16 x, int16 y, int32 weight); + void pop(int16 *x, int16 *y, int32 *weight); void init(int32 size); void clear(); void unload(); -- cgit v1.2.3 From de3f6a19ed6ca98ad152f5038c1db1f70f2c72ed Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 7 Jun 2012 11:26:32 +0300 Subject: SCI: Initial implementation of kScrollWindow, used in some SCI21 games This is used in LSL6 hires and SQ6. This initial implementation is hackish and only works in SQ6 (nothing is shown in LSL6) --- engines/sci/engine/kernel_tables.h | 2 +- engines/sci/engine/kgraphics32.cpp | 128 +++++++++++++++++-------------------- engines/sci/graphics/frameout.cpp | 45 +++++++++++++ engines/sci/graphics/frameout.h | 25 ++++++++ engines/sci/graphics/text32.cpp | 39 +++++++++-- engines/sci/graphics/text32.h | 6 +- 6 files changed, 169 insertions(+), 76 deletions(-) diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 4ddf0534ea..254a479e65 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -564,7 +564,7 @@ static SciKernelMapEntry s_kernelMap[] = { { 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 }, + { MAP_CALL(ScrollWindow), SIG_EVERYWHERE, "io(.*)", NULL, NULL }, { MAP_CALL(SetFontRes), SIG_EVERYWHERE, "ii", NULL, NULL }, { MAP_CALL(Font), SIG_EVERYWHERE, "i(.*)", NULL, NULL }, { MAP_CALL(Bitmap), SIG_EVERYWHERE, "(.*)", NULL, NULL }, diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 2bb8288cb7..71c4949d65 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -308,103 +308,91 @@ reg_t kCelInfo(EngineState *s, int argc, reg_t *argv) { } reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv) { - // Used by Phantasmagoria 1 and SQ6. In SQ6, it is used for the messages - // shown in the scroll window at the bottom of the screen. - - // TODO: This is all a stub/skeleton, thus we're invoking kStub() for now - kStub(s, argc, argv); - - switch (argv[0].toUint16()) { + // Used by SQ6 and LSL6 hires for the text area in the bottom of the + // screen. The relevant scripts also exist in Phantasmagoria 1, but they're + // unused. This is always called by scripts 64906 (ScrollerWindow) and + // 64907 (ScrollableWindow). + + reg_t kWindow = argv[1]; + uint16 op = argv[0].toUint16(); + switch (op) { case 0: // Init - // 2 parameters - // argv[1] points to the scroll object (e.g. textScroller in SQ6) - // argv[2] is an integer (e.g. 0x32) - break; - case 1: // Show message + g_sci->_gfxFrameout->initScrollText(argv[2].toUint16()); // maxItems + g_sci->_gfxFrameout->clearScrollTexts(); + return argv[1]; // kWindow + case 1: // Show message, called by ScrollableWindow::addString + case 14: // Modify message, called by ScrollableWindow::modifyString // 5 or 6 parameters // Seems to be called with 5 parameters when the narrator speaks, and // with 6 when Roger speaks - // argv[1] unknown (usually 0) - // argv[2] the text to show - // argv[3] a small integer (e.g. 0x32) - // argv[4] a small integer (e.g. 0x54) - // argv[5] optional, unknown (usually 0) - warning("kScrollWindow: '%s'", s->_segMan->getString(argv[2]).c_str()); - break; - case 2: // Clear - // 2 parameters - // TODO - break; - case 3: // Page up - // 2 parameters - // TODO - break; - case 4: // Page down - // 2 parameters - // TODO + { + Common::String text = s->_segMan->getString(argv[2]); + uint16 x = 0;//argv[3].toUint16(); // TODO: can't be x (values are all wrong) + uint16 y = 0;//argv[4].toUint16(); // TODO: can't be y (values are all wrong) + // TODO: argv[5] is an optional unknown parameter (an integer set to 0) + g_sci->_gfxFrameout->addScrollTextEntry(text, kWindow, x, y, (op == 14)); + } break; - case 5: // Up arrow - // 2 parameters - // TODO + case 2: // Clear, called by ScrollableWindow::erase + g_sci->_gfxFrameout->clearScrollTexts(); break; - case 6: // Down arrow - // 2 parameters + case 3: // Page up, called by ScrollableWindow::scrollTo // TODO + kStub(s, argc, argv); break; - case 7: // Home - // 2 parameters + case 4: // Page down, called by ScrollableWindow::scrollTo // TODO + kStub(s, argc, argv); break; - case 8: // End - // 2 parameters - // TODO + case 5: // Up arrow, called by ScrollableWindow::scrollTo + g_sci->_gfxFrameout->prevScrollText(); break; - case 9: // Resize - // 3 parameters - // TODO + case 6: // Down arrow, called by ScrollableWindow::scrollTo + g_sci->_gfxFrameout->nextScrollText(); break; - case 10: // Where - // 3 parameters - // TODO + case 7: // Home, called by ScrollableWindow::scrollTo + g_sci->_gfxFrameout->firstScrollText(); break; - case 11: // Go - // 4 parameters - // TODO + case 8: // End, called by ScrollableWindow::scrollTo + g_sci->_gfxFrameout->lastScrollText(); break; - case 12: // Insert - // 7 parameters + case 9: // Resize, called by ScrollableWindow::resize and ScrollerWindow::resize // TODO + kStub(s, argc, argv); break; - case 13: // Delete - // 3 parameters + case 10: // Where, called by ScrollableWindow::where // TODO + // argv[2] is an unknown integer + kStub(s, argc, argv); break; - case 14: // Modify - // 7 or 8 parameters + case 11: // Go, called by ScrollableWindow::scrollTo + // 2 extra parameters here // TODO + kStub(s, argc, argv); break; - case 15: // Hide - // 2 parameters + case 12: // Insert, called by ScrollableWindow::insertString + // 3 extra parameters here // TODO + kStub(s, argc, argv); break; - case 16: // Show - // 2 parameters - // TODO + // case 13 (Delete) is handled below + // case 14 (Modify) is handled above + case 15: // Hide, called by ScrollableWindow::hide + g_sci->_gfxFrameout->toggleScrollText(false); break; - case 17: // Destroy - // 2 parameters - // TODO + case 16: // Show, called by ScrollableWindow::show + g_sci->_gfxFrameout->toggleScrollText(true); break; - case 18: // Text - // 2 parameters - // TODO + case 17: // Destroy, called by ScrollableWindow::dispose + g_sci->_gfxFrameout->clearScrollTexts(); break; - case 19: // Reconstruct - // 3 parameters - // TODO + case 13: // Delete, unused + case 18: // Text, unused + case 19: // Reconstruct, unused + error("kScrollWindow: Unused subop %d invoked", op); break; default: - error("kScrollWindow: unknown subop %d", argv[0].toUint16()); + error("kScrollWindow: unknown subop %d", op); break; } diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 709a708d8b..450581000b 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -59,6 +59,9 @@ GfxFrameout::GfxFrameout(SegManager *segMan, ResourceManager *resMan, GfxCoordAd _coordAdjuster = (GfxCoordAdjuster32 *)coordAdjuster; _scriptsRunningWidth = 320; _scriptsRunningHeight = 200; + _curScrollText = -1; + _showScrollText = false; + _maxScrollTexts = 0; } GfxFrameout::~GfxFrameout() { @@ -69,6 +72,46 @@ void GfxFrameout::clear() { deletePlaneItems(NULL_REG); _planes.clear(); deletePlanePictures(NULL_REG); + clearScrollTexts(); +} + +void GfxFrameout::clearScrollTexts() { + _scrollTexts.clear(); + _curScrollText = -1; +} + +void GfxFrameout::addScrollTextEntry(Common::String &text, reg_t kWindow, uint16 x, uint16 y, bool replace) { + //reg_t bitmapHandle = g_sci->_gfxText32->createScrollTextBitmap(text, kWindow); + // HACK: We set the container dimensions manually + reg_t bitmapHandle = g_sci->_gfxText32->createScrollTextBitmap(text, kWindow, 480, 70); + ScrollTextEntry textEntry; + textEntry.bitmapHandle = bitmapHandle; + textEntry.kWindow = kWindow; + textEntry.x = x; + textEntry.y = y; + if (!replace || _scrollTexts.size() == 0) { + if (_scrollTexts.size() > _maxScrollTexts) { + _scrollTexts.remove_at(0); + _curScrollText--; + } + _scrollTexts.push_back(textEntry); + _curScrollText++; + } else { + _scrollTexts.pop_back(); + _scrollTexts.push_back(textEntry); + } +} + +void GfxFrameout::showCurrentScrollText() { + if (!_showScrollText || _curScrollText < 0) + return; + + uint16 size = (uint16)_scrollTexts.size(); + if (size > 0) { + assert(_curScrollText < size); + ScrollTextEntry textEntry = _scrollTexts[_curScrollText]; + g_sci->_gfxText32->drawScrollTextBitmap(textEntry.kWindow, textEntry.bitmapHandle, textEntry.x, textEntry.y); + } } void GfxFrameout::kernelAddPlane(reg_t object) { @@ -673,6 +716,8 @@ void GfxFrameout::kernelFrameout() { } } + showCurrentScrollText(); + _screen->copyToScreen(); g_sci->getEngineState()->_throttleTrigger = true; diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index ec4de62c0a..2d2ca6546c 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -76,6 +76,15 @@ struct PlanePictureEntry { typedef Common::List PlanePictureList; +struct ScrollTextEntry { + reg_t bitmapHandle; + reg_t kWindow; + uint16 x; + uint16 y; +}; + +typedef Common::Array ScrollTextList; + class GfxCache; class GfxCoordAdjuster32; class GfxPaint32; @@ -104,6 +113,18 @@ public: void addPlanePicture(reg_t object, GuiResourceId pictureId, uint16 startX, uint16 startY = 0); void deletePlanePictures(reg_t object); void clear(); + + // Scroll text functions + void addScrollTextEntry(Common::String &text, reg_t kWindow, uint16 x, uint16 y, bool replace); + void showCurrentScrollText(); + void initScrollText(uint16 maxItems) { _maxScrollTexts = maxItems; } + void clearScrollTexts(); + void firstScrollText() { if (_scrollTexts.size() > 0) _curScrollText = 0; } + void lastScrollText() { if (_scrollTexts.size() > 0) _curScrollText = _scrollTexts.size() - 1; } + void prevScrollText() { if (_curScrollText > 0) _curScrollText--; } + void nextScrollText() { if (_curScrollText + 1 < (uint16)_scrollTexts.size()) _curScrollText++; } + void toggleScrollText(bool show) { _showScrollText = show; } + void printPlaneList(Console *con); void printPlaneItemList(Console *con, reg_t planeObject); @@ -127,6 +148,10 @@ private: FrameoutList _screenItems; PlaneList _planes; PlanePictureList _planePictures; + ScrollTextList _scrollTexts; + int16 _curScrollText; + bool _showScrollText; + uint16 _maxScrollTexts; void sortPlanes(); diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp index cd24ca5a99..8ac9582535 100644 --- a/engines/sci/graphics/text32.cpp +++ b/engines/sci/graphics/text32.cpp @@ -49,9 +49,12 @@ GfxText32::GfxText32(SegManager *segMan, GfxCache *fonts, GfxScreen *screen) GfxText32::~GfxText32() { } +reg_t GfxText32::createScrollTextBitmap(Common::String text, reg_t textObject, uint16 maxWidth, uint16 maxHeight, reg_t prevHunk) { + return createTextBitmapInternal(text, textObject, maxWidth, maxHeight, prevHunk); + +} reg_t GfxText32::createTextBitmap(reg_t textObject, uint16 maxWidth, uint16 maxHeight, reg_t prevHunk) { reg_t stringObject = readSelector(_segMan, textObject, SELECTOR(text)); - // The object in the text selector of the item can be either a raw string // or a Str object. In the latter case, we need to access the object's data // selector to get the raw string. @@ -59,6 +62,11 @@ reg_t GfxText32::createTextBitmap(reg_t textObject, uint16 maxWidth, uint16 maxH stringObject = readSelector(_segMan, stringObject, SELECTOR(data)); Common::String text = _segMan->getString(stringObject); + + return createTextBitmapInternal(text, textObject, maxWidth, maxHeight, prevHunk); +} + +reg_t GfxText32::createTextBitmapInternal(Common::String &text, reg_t textObject, uint16 maxWidth, uint16 maxHeight, reg_t prevHunk) { // HACK: The character offsets of the up and down arrow buttons are off by one // in GK1, for some unknown reason. Fix them here. if (text.size() == 1 && (text[0] == 29 || text[0] == 30)) { @@ -91,7 +99,11 @@ reg_t GfxText32::createTextBitmap(reg_t textObject, uint16 maxWidth, uint16 maxH reg_t memoryId = NULL_REG; if (prevHunk.isNull()) { memoryId = _segMan->allocateHunkEntry("TextBitmap()", entrySize); - writeSelector(_segMan, textObject, SELECTOR(bitmap), memoryId); + + // Scroll text objects have no bitmap selector! + ObjVarRef varp; + if (lookupSelector(_segMan, textObject, SELECTOR(bitmap), &varp, NULL) == kSelectorVariable) + writeSelector(_segMan, textObject, SELECTOR(bitmap), memoryId); } else { memoryId = prevHunk; } @@ -175,6 +187,24 @@ void GfxText32::disposeTextBitmap(reg_t hunkId) { void GfxText32::drawTextBitmap(int16 x, int16 y, Common::Rect planeRect, reg_t textObject) { reg_t hunkId = readSelector(_segMan, textObject, SELECTOR(bitmap)); + drawTextBitmapInternal(x, y, planeRect, textObject, hunkId); +} + +void GfxText32::drawScrollTextBitmap(reg_t textObject, reg_t hunkId, uint16 x, uint16 y) { + /*reg_t plane = readSelector(_segMan, textObject, SELECTOR(plane)); + Common::Rect planeRect; + planeRect.top = readSelectorValue(_segMan, plane, SELECTOR(top)); + planeRect.left = readSelectorValue(_segMan, plane, SELECTOR(left)); + planeRect.bottom = readSelectorValue(_segMan, plane, SELECTOR(bottom)); + planeRect.right = readSelectorValue(_segMan, plane, SELECTOR(right)); + + drawTextBitmapInternal(x, y, planeRect, textObject, hunkId);*/ + + // HACK: we pretty much ignore the plane rect and x, y... + drawTextBitmapInternal(0, 0, Common::Rect(20, 390, 600, 460), textObject, hunkId); +} + +void GfxText32::drawTextBitmapInternal(int16 x, int16 y, Common::Rect planeRect, reg_t textObject, reg_t hunkId) { uint16 backColor = readSelectorValue(_segMan, textObject, SELECTOR(back)); // Sanity check: Check if the hunk is set. If not, either the game scripts // didn't set it, or an old saved game has been loaded, where it wasn't set. @@ -188,8 +218,9 @@ void GfxText32::drawTextBitmap(int16 x, int16 y, Common::Rect planeRect, reg_t t byte *memoryPtr = _segMan->getHunkPointer(hunkId); if (!memoryPtr) { - // Happens when restoring in some SCI32 games - warning("Attempt to draw an invalid text bitmap"); + // Happens when restoring in some SCI32 games (e.g. SQ6). + // Commented out to reduce console spam + //warning("Attempt to draw an invalid text bitmap"); return; } diff --git a/engines/sci/graphics/text32.h b/engines/sci/graphics/text32.h index 3505de85eb..ce78003fdf 100644 --- a/engines/sci/graphics/text32.h +++ b/engines/sci/graphics/text32.h @@ -33,13 +33,17 @@ public: GfxText32(SegManager *segMan, GfxCache *fonts, GfxScreen *screen); ~GfxText32(); reg_t createTextBitmap(reg_t textObject, uint16 maxWidth = 0, uint16 maxHeight = 0, reg_t prevHunk = NULL_REG); - void disposeTextBitmap(reg_t hunkId); + reg_t createScrollTextBitmap(Common::String text, reg_t textObject, uint16 maxWidth = 0, uint16 maxHeight = 0, reg_t prevHunk = NULL_REG); void drawTextBitmap(int16 x, int16 y, Common::Rect planeRect, reg_t textObject); + void drawScrollTextBitmap(reg_t textObject, reg_t hunkId, uint16 x, uint16 y); + void disposeTextBitmap(reg_t hunkId); int16 GetLongest(const char *text, int16 maxWidth, GfxFont *font); void kernelTextSize(const char *text, int16 font, int16 maxWidth, int16 *textWidth, int16 *textHeight); private: + reg_t createTextBitmapInternal(Common::String &text, reg_t textObject, uint16 maxWidth, uint16 maxHeight, reg_t hunkId); + void drawTextBitmapInternal(int16 x, int16 y, Common::Rect planeRect, reg_t textObject, reg_t hunkId); int16 Size(Common::Rect &rect, const char *text, GuiResourceId fontId, int16 maxWidth); void Width(const char *text, int16 from, int16 len, GuiResourceId orgFontId, int16 &textWidth, int16 &textHeight, bool restoreFont); void StringWidth(const char *str, GuiResourceId orgFontId, int16 &textWidth, int16 &textHeight); -- cgit v1.2.3 From 8deb8b3d42927d1d6e73350f96353eda1b10a1fc Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Jun 2012 12:33:13 +0100 Subject: TOON: Minor cleanup and formatting fixes to Pathfinding class. --- engines/toon/path.cpp | 51 +++++++++++++++++++++++---------------------------- engines/toon/path.h | 7 ++++--- 2 files changed, 27 insertions(+), 31 deletions(-) diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp index 540290d823..101778d4b4 100644 --- a/engines/toon/path.cpp +++ b/engines/toon/path.cpp @@ -161,6 +161,18 @@ PathFinding::~PathFinding(void) { delete[] _gridTemp; } +void PathFinding::init(Picture *mask) { + debugC(1, kDebugPath, "init(mask)"); + + _width = mask->getWidth(); + _height = mask->getHeight(); + _currentMask = mask; + _heap->unload(); + _heap->init(500); + delete[] _gridTemp; + _gridTemp = new int32[_width * _height]; +} + bool PathFinding::isLikelyWalkable(int32 x, int32 y) { for (int32 i = 0; i < _numBlockingRects; i++) { if (_blockingRects[i][4] == 0) { @@ -180,12 +192,10 @@ bool PathFinding::isLikelyWalkable(int32 x, int32 y) { bool PathFinding::isWalkable(int32 x, int32 y) { debugC(2, kDebugPath, "isWalkable(%d, %d)", x, y); - bool maskWalk = (_currentMask->getData(x, y) & 0x1f) > 0; - - return maskWalk; + return (_currentMask->getData(x, y) & 0x1f) > 0; } -int32 PathFinding::findClosestWalkingPoint(int32 xx, int32 yy, int32 *fxx, int32 *fyy, int origX, int origY) { +bool PathFinding::findClosestWalkingPoint(int32 xx, int32 yy, int32 *fxx, int32 *fyy, int origX, int origY) { debugC(1, kDebugPath, "findClosestWalkingPoint(%d, %d, fxx, fyy, %d, %d)", xx, yy, origX, origY); int32 currentFound = -1; @@ -214,11 +224,11 @@ int32 PathFinding::findClosestWalkingPoint(int32 xx, int32 yy, int32 *fxx, int32 if (currentFound != -1) { *fxx = currentFound % _width; *fyy = currentFound / _width; - return 1; + return true; } else { *fxx = 0; *fyy = 0; - return 0; + return false; } } @@ -238,15 +248,13 @@ bool PathFinding::walkLine(int32 x, int32 y, int32 x2, int32 y2) { int32 cdx = (dx << 16) / t; int32 cdy = (dy << 16) / t; - int32 i = t; _gridPathCount = 0; - while (i) { + for (int32 i = t; i > 0; i--) { _tempPathX[i] = bx >> 16; _tempPathY[i] = by >> 16; _gridPathCount++; bx += cdx; by += cdy; - i--; } _tempPathX[0] = x2; @@ -271,17 +279,16 @@ bool PathFinding::lineIsWalkable(int32 x, int32 y, int32 x2, int32 y2) { int32 cdx = (dx << 16) / t; int32 cdy = (dy << 16) / t; - int32 i = t; - while (i) { + for (int32 i = t; i > 0; i--) { if (!isWalkable(bx >> 16, by >> 16)) return false; bx += cdx; by += cdy; - i--; } return true; } -int32 PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { + +bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { debugC(1, kDebugPath, "findPath(%d, %d, %d, %d)", x, y, destx, desty); if (x == destx && y == desty) { @@ -373,7 +380,7 @@ int32 PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { numpath++; int32 bestscore = sq[destx + desty * _width]; - while (1) { + while (true) { int32 bestX = -1; int32 bestY = -1; @@ -403,7 +410,7 @@ int32 PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { free(retPathX); free(retPathY); - return 0; + return false; } retPathX[numpath] = bestX; @@ -432,18 +439,6 @@ int32 PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { return false; } -void PathFinding::init(Picture *mask) { - debugC(1, kDebugPath, "init(mask)"); - - _width = mask->getWidth(); - _height = mask->getHeight(); - _currentMask = mask; - _heap->unload(); - _heap->init(500); - delete[] _gridTemp; - _gridTemp = new int32[_width*_height]; -} - void PathFinding::resetBlockingRects() { _numBlockingRects = 0; } @@ -460,7 +455,7 @@ void PathFinding::addBlockingRect(int32 x1, int32 y1, int32 x2, int32 y2) { } void PathFinding::addBlockingEllipse(int32 x1, int32 y1, int32 w, int32 h) { - debugC(1, kDebugPath, "addBlockingRect(%d, %d, %d, %d)", x1, y1, w, h); + debugC(1, kDebugPath, "addBlockingEllipse(%d, %d, %d, %d)", x1, y1, w, h); _blockingRects[_numBlockingRects][0] = x1; _blockingRects[_numBlockingRects][1] = y1; diff --git a/engines/toon/path.h b/engines/toon/path.h index df2b2e94be..7709dfe2a0 100644 --- a/engines/toon/path.h +++ b/engines/toon/path.h @@ -57,13 +57,14 @@ public: PathFinding(ToonEngine *vm); ~PathFinding(); - int32 findPath(int32 x, int32 y, int32 destX, int32 destY); - int32 findClosestWalkingPoint(int32 xx, int32 yy, int32 *fxx, int32 *fyy, int origX = -1, int origY = -1); + void init(Picture *mask); + + bool findPath(int32 x, int32 y, int32 destX, int32 destY); + bool findClosestWalkingPoint(int32 xx, int32 yy, int32 *fxx, int32 *fyy, int origX = -1, int origY = -1); bool isWalkable(int32 x, int32 y); bool isLikelyWalkable(int32 x, int32 y); bool lineIsWalkable(int32 x, int32 y, int32 x2, int32 y2); bool walkLine(int32 x, int32 y, int32 x2, int32 y2); - void init(Picture *mask); void resetBlockingRects(); void addBlockingRect(int32 x1, int32 y1, int32 x2, int32 y2); -- cgit v1.2.3 From 6cda28adc9e1adb5b05bdb58baf449f2e24b9945 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Jun 2012 13:20:53 +0100 Subject: TOON: Remove unecessary usages of g_system. --- engines/toon/toon.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 657e18635f..9e7aa65265 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -168,7 +168,7 @@ void ToonEngine::waitForScriptStep() { // Wait after a specified number of script steps when executing a script // to lower CPU usage if (++_scriptStep >= 40) { - g_system->delayMillis(1); + _system->delayMillis(1); _scriptStep = 0; } } @@ -2979,8 +2979,7 @@ bool ToonEngine::saveGame(int32 slot, const Common::String &saveGameDesc) { return false; // dialog aborted Common::String savegameFile = getSavegameName(savegameId); - Common::SaveFileManager *saveMan = g_system->getSavefileManager(); - Common::OutSaveFile *saveFile = saveMan->openForSaving(savegameFile); + Common::OutSaveFile *saveFile = _saveFileMan->openForSaving(savegameFile); if (!saveFile) return false; @@ -3068,8 +3067,7 @@ bool ToonEngine::loadGame(int32 slot) { return false; // dialog aborted Common::String savegameFile = getSavegameName(savegameId); - Common::SaveFileManager *saveMan = g_system->getSavefileManager(); - Common::InSaveFile *loadFile = saveMan->openForLoading(savegameFile); + Common::InSaveFile *loadFile = _saveFileMan->openForLoading(savegameFile); if (!loadFile) return false; -- cgit v1.2.3 From 70f09e4ee36525025421db28a5a50b8b5dc0a963 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Jun 2012 13:24:54 +0100 Subject: TOON: Reduce unecessary linkages in Pathfinding class. --- engines/toon/path.cpp | 2 +- engines/toon/path.h | 17 ++++++++--------- engines/toon/toon.cpp | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp index 101778d4b4..527be13c24 100644 --- a/engines/toon/path.cpp +++ b/engines/toon/path.cpp @@ -146,7 +146,7 @@ void PathFindingHeap::pop(int16 *x, int16 *y, int32 *weight) { } } -PathFinding::PathFinding(ToonEngine *vm) : _vm(vm) { +PathFinding::PathFinding() { _width = 0; _height = 0; _heap = new PathFindingHeap(); diff --git a/engines/toon/path.h b/engines/toon/path.h index 7709dfe2a0..30a7a53e9d 100644 --- a/engines/toon/path.h +++ b/engines/toon/path.h @@ -28,11 +28,6 @@ namespace Toon { // binary heap system for fast A* -struct HeapDataGrid { - int16 _x, _y; - int16 _weight; -}; - class PathFindingHeap { public: PathFindingHeap(); @@ -46,6 +41,11 @@ public: int32 getCount() { return _count; } private: + struct HeapDataGrid { + int16 _x, _y; + int16 _weight; + }; + HeapDataGrid *_data; int32 _size; @@ -54,7 +54,7 @@ private: class PathFinding { public: - PathFinding(ToonEngine *vm); + PathFinding(); ~PathFinding(); void init(Picture *mask); @@ -73,7 +73,8 @@ public: int32 getPathNodeCount() const; int32 getPathNodeX(int32 nodeId) const; int32 getPathNodeY(int32 nodeId) const; -protected: + +private: Picture *_currentMask; PathFindingHeap *_heap; @@ -88,8 +89,6 @@ protected: int32 _numBlockingRects; int32 _allocatedGridPathCount; int32 _gridPathCount; - - ToonEngine *_vm; }; } // End of namespace Toon diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 9e7aa65265..0b39432b53 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -100,7 +100,7 @@ void ToonEngine::init() { syncSoundSettings(); - _pathFinding = new PathFinding(this); + _pathFinding = new PathFinding(); resources()->openPackage("LOCAL.PAK"); resources()->openPackage("ONETIME.PAK"); -- cgit v1.2.3 From 380d3f000a12c4b923d7330cc88551f73abd7265 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Jun 2012 14:41:04 +0100 Subject: TOON: Further cleanup to Pathfinding Class. Removal of some unused variables, logical reordering of functions and minor changes to reduce minor duplication. No functional changes. --- engines/toon/path.cpp | 55 ++++++++++++++++++++------------------------------- engines/toon/path.h | 16 ++++++++------- 2 files changed, 30 insertions(+), 41 deletions(-) diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp index 527be13c24..b3f9b306be 100644 --- a/engines/toon/path.cpp +++ b/engines/toon/path.cpp @@ -174,7 +174,7 @@ void PathFinding::init(Picture *mask) { } bool PathFinding::isLikelyWalkable(int32 x, int32 y) { - for (int32 i = 0; i < _numBlockingRects; i++) { + for (uint8 i = 0; i < _numBlockingRects; i++) { if (_blockingRects[i][4] == 0) { if (x >= _blockingRects[i][0] && x <= _blockingRects[i][2] && y >= _blockingRects[i][1] && y < _blockingRects[i][3]) return false; @@ -364,11 +364,11 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { curX = destx; curY = desty; - int32 *retPathX = (int32 *)malloc(4096 * sizeof(int32)); - int32 *retPathY = (int32 *)malloc(4096 * sizeof(int32)); + int32 *retPathX = new int32[4096]; + int32 *retPathY = new int32[4096]; if (!retPathX || !retPathY) { - free(retPathX); - free(retPathY); + delete retPathX; + delete retPathY; error("[PathFinding::findPath] Cannot allocate pathfinding buffers"); } @@ -380,6 +380,7 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { numpath++; int32 bestscore = sq[destx + desty * _width]; + bool retVal = false; while (true) { int32 bestX = -1; int32 bestY = -1; @@ -406,12 +407,8 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { } } - if (bestX < 0 || bestY < 0) { - free(retPathX); - free(retPathY); - - return false; - } + if (bestX < 0 || bestY < 0) + break; retPathX[numpath] = bestX; retPathY[numpath] = bestY; @@ -423,28 +420,26 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { memcpy(_tempPathX, retPathX, sizeof(int32) * numpath); memcpy(_tempPathY, retPathY, sizeof(int32) * numpath); - free(retPathX); - free(retPathY); - - return true; + retVal = true; + break; } curX = bestX; curY = bestY; } - free(retPathX); - free(retPathY); + delete retPathX; + delete retPathY; - return false; -} - -void PathFinding::resetBlockingRects() { - _numBlockingRects = 0; + return retVal; } void PathFinding::addBlockingRect(int32 x1, int32 y1, int32 x2, int32 y2) { debugC(1, kDebugPath, "addBlockingRect(%d, %d, %d, %d)", x1, y1, x2, y2); + if (_numBlockingRects >= kMaxBlockingRects) { + warning("Maximum number of %d Blocking Rects reached!", kMaxBlockingRects); + return; + } _blockingRects[_numBlockingRects][0] = x1; _blockingRects[_numBlockingRects][1] = y1; @@ -456,6 +451,10 @@ void PathFinding::addBlockingRect(int32 x1, int32 y1, int32 x2, int32 y2) { void PathFinding::addBlockingEllipse(int32 x1, int32 y1, int32 w, int32 h) { debugC(1, kDebugPath, "addBlockingEllipse(%d, %d, %d, %d)", x1, y1, w, h); + if (_numBlockingRects >= kMaxBlockingRects) { + warning("Maximum number of %d Blocking Rects reached!", kMaxBlockingRects); + return; + } _blockingRects[_numBlockingRects][0] = x1; _blockingRects[_numBlockingRects][1] = y1; @@ -465,16 +464,4 @@ void PathFinding::addBlockingEllipse(int32 x1, int32 y1, int32 w, int32 h) { _numBlockingRects++; } -int32 PathFinding::getPathNodeCount() const { - return _gridPathCount; -} - -int32 PathFinding::getPathNodeX(int32 nodeId) const { - return _tempPathX[ _gridPathCount - nodeId - 1]; -} - -int32 PathFinding::getPathNodeY(int32 nodeId) const { - return _tempPathY[ _gridPathCount - nodeId - 1]; -} - } // End of namespace Toon diff --git a/engines/toon/path.h b/engines/toon/path.h index 30a7a53e9d..26abb411cc 100644 --- a/engines/toon/path.h +++ b/engines/toon/path.h @@ -66,15 +66,17 @@ public: bool lineIsWalkable(int32 x, int32 y, int32 x2, int32 y2); bool walkLine(int32 x, int32 y, int32 x2, int32 y2); - void resetBlockingRects(); + void resetBlockingRects() { _numBlockingRects = 0; } void addBlockingRect(int32 x1, int32 y1, int32 x2, int32 y2); void addBlockingEllipse(int32 x1, int32 y1, int32 w, int32 h); - int32 getPathNodeCount() const; - int32 getPathNodeX(int32 nodeId) const; - int32 getPathNodeY(int32 nodeId) const; + int32 getPathNodeCount() const { return _gridPathCount; } + int32 getPathNodeX(int32 nodeId) const { return _tempPathX[ _gridPathCount - nodeId - 1]; } + int32 getPathNodeY(int32 nodeId) const { return _tempPathY[ _gridPathCount - nodeId - 1]; } private: + static const uint8 kMaxBlockingRects = 16; + Picture *_currentMask; PathFindingHeap *_heap; @@ -85,10 +87,10 @@ private: int32 _tempPathX[4096]; int32 _tempPathY[4096]; - int32 _blockingRects[16][5]; - int32 _numBlockingRects; - int32 _allocatedGridPathCount; int32 _gridPathCount; + + int32 _blockingRects[kMaxBlockingRects][5]; + uint8 _numBlockingRects; }; } // End of namespace Toon -- cgit v1.2.3 From b17b38cc364d13992b3be360a460d5b075e5848e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 7 Jun 2012 17:50:20 +0200 Subject: COMMON: Move coroutine documentation to the header file. --- common/coroutines.cpp | 139 ------------------------------------------- common/coroutines.h | 161 ++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 143 insertions(+), 157 deletions(-) diff --git a/common/coroutines.cpp b/common/coroutines.cpp index 6159bdc0f3..102db8d26d 100644 --- a/common/coroutines.cpp +++ b/common/coroutines.cpp @@ -72,9 +72,6 @@ static void displayCoroStats() { } #endif -/** - * Creates a coroutine context - */ CoroBaseContext::CoroBaseContext(const char *func) : _line(0), _sleep(0), _subctx(0) { #ifdef COROUTINE_DEBUG @@ -84,9 +81,6 @@ CoroBaseContext::CoroBaseContext(const char *func) #endif } -/** - * Destructor for coroutine context - */ CoroBaseContext::~CoroBaseContext() { #ifdef COROUTINE_DEBUG s_coroCount--; @@ -100,9 +94,6 @@ CoroBaseContext::~CoroBaseContext() { //--------------------- Scheduler Class ------------------------ -/** - * Constructor - */ CoroutineScheduler::CoroutineScheduler() { processList = NULL; pFreeProcesses = NULL; @@ -124,9 +115,6 @@ CoroutineScheduler::CoroutineScheduler() { reset(); } -/** - * Destructor - */ CoroutineScheduler::~CoroutineScheduler() { // Kill all running processes (i.e. free memory allocated for their state). PROCESS *pProc = active->pNext; @@ -148,9 +136,6 @@ CoroutineScheduler::~CoroutineScheduler() { delete (*i); } -/** - * Kills all processes and places them on the free list. - */ void CoroutineScheduler::reset() { #ifdef DEBUG @@ -195,19 +180,12 @@ void CoroutineScheduler::reset() { #ifdef DEBUG -/** - * Shows the maximum number of process used at once. - */ void CoroutineScheduler::printStats() { debug("%i process of %i used", maxProcs, CORO_NUM_PROCESS); } #endif #ifdef DEBUG -/** - * Checks both the active and free process list to insure all the links are valid, - * and that no processes have been lost - */ void CoroutineScheduler::CheckStack() { Common::List pList; @@ -242,9 +220,6 @@ void CoroutineScheduler::CheckStack() { } #endif -/** - * Give all active processes a chance to run - */ void CoroutineScheduler::schedule() { // start dispatching active process list PROCESS *pNext; @@ -274,9 +249,6 @@ void CoroutineScheduler::schedule() { } } -/** - * Reschedules all the processes to run again this query - */ void CoroutineScheduler::rescheduleAll() { assert(pCurrent); @@ -292,10 +264,6 @@ void CoroutineScheduler::rescheduleAll() { pCurrent->pPrevious = active; } -/** - * If the specified process has already run on this tick, make it run - * again on the current tick. - */ void CoroutineScheduler::reschedule(PPROCESS pReSchedProc) { // If not currently processing the schedule list, then no action is needed if (!pCurrent) @@ -333,11 +301,6 @@ void CoroutineScheduler::reschedule(PPROCESS pReSchedProc) { pReSchedProc->pNext = NULL; } -/** - * Moves the specified process to the end of the dispatch queue - * allowing it to run again within the current game cycle. - * @param pGiveProc Which process - */ void CoroutineScheduler::giveWay(PPROCESS pReSchedProc) { // If not currently processing the schedule list, then no action is needed if (!pCurrent) @@ -371,13 +334,6 @@ void CoroutineScheduler::giveWay(PPROCESS pReSchedProc) { pReSchedProc->pNext = NULL; } -/** - * Continously makes a given process wait for another process to finish or event to signal. - * - * @param pid Process/Event identifier - * @param duration Duration in milliseconds - * @param expired If specified, set to true if delay period expired - */ void CoroutineScheduler::waitForSingleObject(CORO_PARAM, int pid, uint32 duration, bool *expired) { if (!pCurrent) error("Called CoroutineScheduler::waitForSingleObject from the main process"); @@ -434,15 +390,6 @@ void CoroutineScheduler::waitForSingleObject(CORO_PARAM, int pid, uint32 duratio CORO_END_CODE; } -/** - * Continously makes a given process wait for given prcesses to finished or events to be set - * - * @param nCount Number of Id's being passed - * @param evtList List of pids to wait for - * @param bWaitAll Specifies whether all or any of the processes/events - * @param duration Duration in milliseconds - * @param expired Set to true if delay period expired - */ void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 *pidList, bool bWaitAll, uint32 duration, bool *expired) { if (!pCurrent) @@ -510,12 +457,6 @@ void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 * CORO_END_CODE; } -/** - * Make the active process sleep for the given duration in milliseconds - * @param duration Duration in milliseconds - * @remarks This duration won't be precise, since it relies on the frequency the - * scheduler is called. - */ void CoroutineScheduler::sleep(CORO_PARAM, uint32 duration) { if (!pCurrent) error("Called CoroutineScheduler::sleep from the main process"); @@ -539,14 +480,6 @@ void CoroutineScheduler::sleep(CORO_PARAM, uint32 duration) { CORO_END_CODE; } -/** - * Creates a new process. - * - * @param pid process identifier - * @param coroAddr Coroutine start address - * @param pParam Process specific info - * @param sizeParam Size of process specific info - */ PROCESS *CoroutineScheduler::createProcess(uint32 pid, CORO_ADDR coroAddr, const void *pParam, int sizeParam) { PROCESS *pProc; @@ -611,35 +544,15 @@ PROCESS *CoroutineScheduler::createProcess(uint32 pid, CORO_ADDR coroAddr, const return pProc; } -/** - * Creates a new process with an auto-incrementing Process Id. - * - * @param coroAddr Coroutine start address - * @param pParam Process specific info - * @param sizeParam Size of process specific info - */ uint32 CoroutineScheduler::createProcess(CORO_ADDR coroAddr, const void *pParam, int sizeParam) { PROCESS *pProc = createProcess(++pidCounter, coroAddr, pParam, sizeParam); return pProc->pid; } -/** - * Creates a new process with an auto-incrementing Process Id, and a single pointer parameter. - * - * @param coroAddr Coroutine start address - * @param pParam Process specific info - * @param sizeParam Size of process specific info - */ uint32 CoroutineScheduler::createProcess(CORO_ADDR coroAddr, const void *pParam) { return createProcess(coroAddr, &pParam, sizeof(void *)); } - -/** - * Kills the specified process. - * - * @param pKillProc Which process to kill - */ void CoroutineScheduler::killProcess(PROCESS *pKillProc) { // make sure a valid process pointer assert(pKillProc >= processList && pKillProc <= processList + CORO_NUM_PROCESS - 1); @@ -675,20 +588,10 @@ void CoroutineScheduler::killProcess(PROCESS *pKillProc) { pFreeProcesses = pKillProc; } - - -/** - * Returns a pointer to the currently running process. - */ PROCESS *CoroutineScheduler::getCurrentProcess() { return pCurrent; } -/** - * Returns the process identifier of the specified process. - * - * @param pProc Which process - */ int CoroutineScheduler::getCurrentPID() const { PROCESS *pProc = pCurrent; @@ -699,14 +602,6 @@ int CoroutineScheduler::getCurrentPID() const { return pProc->pid; } -/** - * Kills any process matching the specified PID. The current - * process cannot be killed. - * - * @param pidKill Process identifier of process to kill - * @param pidMask Mask to apply to process identifiers before comparison - * @return The number of processes killed is returned. - */ int CoroutineScheduler::killMatchingProcess(uint32 pidKill, int pidMask) { int numKilled = 0; PROCESS *pProc, *pPrev; // process list pointers @@ -756,15 +651,6 @@ int CoroutineScheduler::killMatchingProcess(uint32 pidKill, int pidMask) { return numKilled; } -/** - * Set pointer to a function to be called by killProcess(). - * - * May be called by a resource allocator, the function supplied is - * called by killProcess() to allow the resource allocator to free - * resources allocated to the dying process. - * - * @param pFunc Function to be called by killProcess() - */ void CoroutineScheduler::setResourceCallback(VFPTRPP pFunc) { pRCfunction = pFunc; } @@ -789,12 +675,6 @@ EVENT *CoroutineScheduler::getEvent(uint32 pid) { } -/** - * Creates a new event object - * @param bManualReset Events needs to be manually reset. Otherwise, events - * will be automatically reset after a process waits on the event finishes - * @param bInitialState Specifies whether the event is signalled or not initially - */ uint32 CoroutineScheduler::createEvent(bool bManualReset, bool bInitialState) { EVENT *evt = new EVENT(); evt->pid = ++pidCounter; @@ -805,10 +685,6 @@ uint32 CoroutineScheduler::createEvent(bool bManualReset, bool bInitialState) { return evt->pid; } -/** - * Destroys the given event - * @param pidEvent Event Process Id - */ void CoroutineScheduler::closeEvent(uint32 pidEvent) { EVENT *evt = getEvent(pidEvent); if (evt) { @@ -817,33 +693,18 @@ void CoroutineScheduler::closeEvent(uint32 pidEvent) { } } -/** - * Sets the event - * @param pidEvent Event Process Id - */ void CoroutineScheduler::setEvent(uint32 pidEvent) { EVENT *evt = getEvent(pidEvent); if (evt) evt->signalled = true; } -/** - * Resets the event - * @param pidEvent Event Process Id - */ void CoroutineScheduler::resetEvent(uint32 pidEvent) { EVENT *evt = getEvent(pidEvent); if (evt) evt->signalled = false; } -/** - * Temporarily sets a given event to true, and then runs all waiting processes, allowing any - * processes waiting on the event to be fired. It then immediately resets the event again. - * @param pidEvent Event Process Id - * - * @remarks Should not be run inside of another process - */ void CoroutineScheduler::pulseEvent(uint32 pidEvent) { EVENT *evt = getEvent(pidEvent); if (!evt) diff --git a/common/coroutines.h b/common/coroutines.h index abc114e0cf..f5519902dd 100644 --- a/common/coroutines.h +++ b/common/coroutines.h @@ -56,7 +56,14 @@ struct CoroBaseContext { #ifdef COROUTINE_DEBUG const char *_funcName; #endif + /** + * Creates a coroutine context + */ CoroBaseContext(const char *func); + + /** + * Destructor for coroutine context + */ virtual ~CoroBaseContext(); }; @@ -344,6 +351,10 @@ private: int numProcs; int maxProcs; + /** + * Checks both the active and free process list to insure all the links are valid, + * and that no processes have been lost + */ void CheckStack(); #endif @@ -356,71 +367,185 @@ private: PROCESS *getProcess(uint32 pid); EVENT *getEvent(uint32 pid); public: + /** + * Constructor + */ CoroutineScheduler(); + + /** + * Destructor + */ ~CoroutineScheduler(); + /** + * Kills all processes and places them on the free list. + */ void reset(); #ifdef DEBUG + /** + * Shows the maximum number of process used at once. + */ void printStats(); #endif - /** Give all active processes a chance to run */ + /** + * Give all active processes a chance to run + */ void schedule(); - /** Reschedules all the processes to run again this tick */ + /** + * Reschedules all the processes to run again this tick + */ void rescheduleAll(); - /** If the specified process has already run on this tick, make it run again on the current tick. */ + /** + * If the specified process has already run on this tick, make it run + * again on the current tick. + */ void reschedule(PPROCESS pReSchedProc = NULL); - /** Moves the specified process to the end of the dispatch queue, so it can again in the current tick */ + /** + * Moves the specified process to the end of the dispatch queue + * allowing it to run again within the current game cycle. + * @param pGiveProc Which process + */ void giveWay(PPROCESS pReSchedProc = NULL); - /** Continously makes a given process wait for another process to finish or event to signal. */ + /** + * Continously makes a given process wait for another process to finish or event to signal. + * + * @param pid Process/Event identifier + * @param duration Duration in milliseconds + * @param expired If specified, set to true if delay period expired + */ void waitForSingleObject(CORO_PARAM, int pid, uint32 duration, bool *expired = NULL); - /** Continously makes a given process wait for given prcesses to finished or events to be set */ + /** + * Continously makes a given process wait for given prcesses to finished or events to be set + * + * @param nCount Number of Id's being passed + * @param evtList List of pids to wait for + * @param bWaitAll Specifies whether all or any of the processes/events + * @param duration Duration in milliseconds + * @param expired Set to true if delay period expired + */ void waitForMultipleObjects(CORO_PARAM, int nCount, uint32 *pidList, bool bWaitAll, uint32 duration, bool *expired = NULL); - /** Make the active process sleep for the given duration in milliseconds */ + /** + * Make the active process sleep for the given duration in milliseconds + * + * @param duration Duration in milliseconds + * @remarks This duration won't be precise, since it relies on the frequency the + * scheduler is called. + */ void sleep(CORO_PARAM, uint32 duration); - /** Creates a new process. */ + /** + * Creates a new process. + * + * @param pid process identifier + * @param coroAddr Coroutine start address + * @param pParam Process specific info + * @param sizeParam Size of process specific info + */ PROCESS *createProcess(uint32 pid, CORO_ADDR coroAddr, const void *pParam, int sizeParam); + + /** + * Creates a new process with an auto-incrementing Process Id. + * + * @param coroAddr Coroutine start address + * @param pParam Process specific info + * @param sizeParam Size of process specific info + */ uint32 createProcess(CORO_ADDR coroAddr, const void *pParam, int sizeParam); + + /** + * Creates a new process with an auto-incrementing Process Id, and a single pointer parameter. + * + * @param coroAddr Coroutine start address + * @param pParam Process specific info + */ uint32 createProcess(CORO_ADDR coroAddr, const void *pParam); - /** Kills the specified process. */ + /** + * Kills the specified process. + * + * @param pKillProc Which process to kill + */ void killProcess(PROCESS *pKillProc); - /** Returns a pointer to the currently running process. */ + /** + * Returns a pointer to the currently running process. + */ PROCESS *getCurrentProcess(); - /** Returns the process identifier of the specified process. */ + /** + * Returns the process identifier of the currently running process. + */ int getCurrentPID() const; - /** Kills any process matching the specified PID. The current process cannot be killed. */ + /** + * Kills any process matching the specified PID. The current + * process cannot be killed. + * + * @param pidKill Process identifier of process to kill + * @param pidMask Mask to apply to process identifiers before comparison + * @return The number of processes killed is returned. + */ int killMatchingProcess(uint32 pidKill, int pidMask = -1); - /** Set pointer to a function to be called by killProcess() */ + /** + * Set pointer to a function to be called by killProcess(). + * + * May be called by a resource allocator, the function supplied is + * called by killProcess() to allow the resource allocator to free + * resources allocated to the dying process. + * + * @param pFunc Function to be called by killProcess() + */ void setResourceCallback(VFPTRPP pFunc); /* Event methods */ - /** Creates a new event (semaphore) object */ + /** + * Creates a new event (semaphore) object + * + * @param bManualReset Events needs to be manually reset. Otherwise, + * events will be automatically reset after a + * process waits on the event finishes + * @param bInitialState Specifies whether the event is signalled or not + * initially + */ uint32 createEvent(bool bManualReset, bool bInitialState); - /** Destroys the given event */ + /** + * Destroys the given event + * @param pidEvent Event Process Id + */ void closeEvent(uint32 pidEvent); - /** Sets the event */ + /** + * Sets the event + * @param pidEvent Event Process Id + */ void setEvent(uint32 pidEvent); - /** Resets the event */ + /** + * Resets the event + * @param pidEvent Event Process Id + */ void resetEvent(uint32 pidEvent); - /** Temporarily sets a given event to true, allowing other waiting processes to fire */ + /** + * Temporarily sets a given event to true, and then runs all waiting + * processes,allowing any processes waiting on the event to be fired. It + * then immediately resets the event again. + * + * @param pidEvent Event Process Id + * + * @remarks Should not be run inside of another process + */ void pulseEvent(uint32 pidEvent); }; -- cgit v1.2.3 From 27aa0974499c6012da894872913f4f44cf6b6a5c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 7 Jun 2012 17:51:58 +0200 Subject: COMMON: Slightly adapt coroutine code to better match our guidelines. I used astyle here, which automatically removes the use of tabs in comments. --- common/coroutines.cpp | 34 ++++----- common/coroutines.h | 203 +++++++++++++++++++++++++------------------------- 2 files changed, 118 insertions(+), 119 deletions(-) diff --git a/common/coroutines.cpp b/common/coroutines.cpp index 102db8d26d..241d31e0d7 100644 --- a/common/coroutines.cpp +++ b/common/coroutines.cpp @@ -34,7 +34,6 @@ CoroContext nullContext = NULL; DECLARE_SINGLETON(CoroutineScheduler); - #ifdef COROUTINE_DEBUG namespace { /** Count of active coroutines */ @@ -63,13 +62,13 @@ static void displayCoroStats() { if (!s_coroFuncs) return; for (CoroHashMap::const_iterator it = s_coroFuncs->begin(); - it != s_coroFuncs->end(); ++it) { + it != s_coroFuncs->end(); ++it) { if (it->_value != 0) debug(" %3d x %s", it->_value, it->_key.c_str()); } } -} +} // End of anonymous namespace #endif CoroBaseContext::CoroBaseContext(const char *func) @@ -86,7 +85,7 @@ CoroBaseContext::~CoroBaseContext() { s_coroCount--; changeCoroStats(_funcName, -1); debug("Deleting coro in %s at %p (subctx %p)", - _funcName, (void *)this, (void *)_subctx); + _funcName, (void *)this, (void *)_subctx); displayCoroStats(); #endif delete _subctx; @@ -133,11 +132,10 @@ CoroutineScheduler::~CoroutineScheduler() { // Clear the event list Common::List::iterator i; for (i = _events.begin(); i != _events.end(); ++i) - delete (*i); + delete *i; } void CoroutineScheduler::reset() { - #ifdef DEBUG // clear number of process in use numProcs = 0; @@ -179,14 +177,14 @@ void CoroutineScheduler::reset() { } -#ifdef DEBUG +#ifdef DEBUG void CoroutineScheduler::printStats() { debug("%i process of %i used", maxProcs, CORO_NUM_PROCESS); } #endif #ifdef DEBUG -void CoroutineScheduler::CheckStack() { +void CoroutineScheduler::checkStack() { Common::List pList; // Check both the active and free process lists @@ -354,7 +352,7 @@ void CoroutineScheduler::waitForSingleObject(CORO_PARAM, int pid, uint32 duratio // Presume it will expire *expired = true; - // Outer loop for doing checks until expiry + // Outer loop for doing checks until expiry while (g_system->getMillis() <= _ctx->endTime) { // Check to see if a process or event with the given Id exists _ctx->pProcess = getProcess(pid); @@ -368,7 +366,7 @@ void CoroutineScheduler::waitForSingleObject(CORO_PARAM, int pid, uint32 duratio break; } - // If a process was found, don't go into the if statement, and keep waiting. + // If a process was found, don't go into the if statement, and keep waiting. // Likewise if it's an event that's not yet signalled if ((_ctx->pEvent != NULL) && _ctx->pEvent->signalled) { // Unless the event is flagged for manual reset, reset it now @@ -390,8 +388,8 @@ void CoroutineScheduler::waitForSingleObject(CORO_PARAM, int pid, uint32 duratio CORO_END_CODE; } -void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 *pidList, bool bWaitAll, - uint32 duration, bool *expired) { +void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 *pidList, bool bWaitAll, + uint32 duration, bool *expired) { if (!pCurrent) error("Called CoroutineScheduler::waitForMultipleObjects from the main process"); @@ -415,7 +413,7 @@ void CoroutineScheduler::waitForMultipleObjects(CORO_PARAM, int nCount, uint32 * // Presume that delay will expire *expired = true; - // Outer loop for doing checks until expiry + // Outer loop for doing checks until expiry while (g_system->getMillis() <= _ctx->endTime) { _ctx->signalled = bWaitAll; @@ -471,7 +469,7 @@ void CoroutineScheduler::sleep(CORO_PARAM, uint32 duration) { _ctx->endTime = g_system->getMillis() + duration; - // Outer loop for doing checks until expiry + // Outer loop for doing checks until expiry while (g_system->getMillis() < _ctx->endTime) { // Sleep until the next cycle CORO_SLEEP(1); @@ -510,7 +508,7 @@ PROCESS *CoroutineScheduler::createProcess(uint32 pid, CORO_ADDR coroAddr, const pCurrent->pNext = pProc; pProc->pPrevious = pCurrent; - } else { // no active processes, place process at head of list + } else { // no active processes, place process at head of list pProc->pNext = active->pNext; pProc->pPrevious = active; @@ -604,7 +602,7 @@ int CoroutineScheduler::getCurrentPID() const { int CoroutineScheduler::killMatchingProcess(uint32 pidKill, int pidMask) { int numKilled = 0; - PROCESS *pProc, *pPrev; // process list pointers + PROCESS *pProc, *pPrev; // process list pointers for (pProc = active->pNext, pPrev = active; pProc != NULL; pPrev = pProc, pProc = pProc->pNext) { if ((pProc->pid & (uint32)pidMask) == pidKill) { @@ -709,10 +707,10 @@ void CoroutineScheduler::pulseEvent(uint32 pidEvent) { EVENT *evt = getEvent(pidEvent); if (!evt) return; - + // Set the event as true evt->signalled = true; - + // start dispatching active process list for any processes that are currently waiting PROCESS *pOriginal = pCurrent; PROCESS *pNext; diff --git a/common/coroutines.h b/common/coroutines.h index f5519902dd..3b8b1a77f9 100644 --- a/common/coroutines.h +++ b/common/coroutines.h @@ -23,7 +23,7 @@ #define COMMON_COROUTINES_H #include "common/scummsys.h" -#include "common/util.h" // for SCUMMVM_CURRENT_FUNCTION +#include "common/util.h" // for SCUMMVM_CURRENT_FUNCTION #include "common/list.h" #include "common/singleton.h" @@ -133,42 +133,43 @@ public: /** * End the declaration of a coroutine context. - * @param x name of the coroutine context + * @param x name of the coroutine context * @see CORO_BEGIN_CONTEXT */ #define CORO_END_CONTEXT(x) } *x = (CoroContextTag *)coroParam /** * Begin the code section of a coroutine. - * @param x name of the coroutine context + * @param x name of the coroutine context * @see CORO_BEGIN_CODE */ #define CORO_BEGIN_CODE(x) \ - if (&coroParam == &Common::nullContext) assert(!Common::nullContext);\ - if (!x) {coroParam = x = new CoroContextTag();}\ - Common::CoroContextHolder tmpHolder(coroParam);\ - switch (coroParam->_line) { case 0:; + if (&coroParam == &Common::nullContext) assert(!Common::nullContext); \ + if (!x) { coroParam = x = new CoroContextTag(); } \ + Common::CoroContextHolder tmpHolder(coroParam); \ + switch (coroParam->_line) { case 0:; /** * End the code section of a coroutine. * @see CORO_END_CODE */ #define CORO_END_CODE \ - if (&coroParam == &Common::nullContext) { \ - delete Common::nullContext; \ - Common::nullContext = NULL; \ - } \ - } + if (&coroParam == &Common::nullContext) { \ + delete Common::nullContext; \ + Common::nullContext = NULL; \ + } \ + } /** * Sleep for the specified number of scheduler cycles. */ -#define CORO_SLEEP(delay) do {\ - coroParam->_line = __LINE__;\ - coroParam->_sleep = delay;\ - assert(&coroParam != &Common::nullContext);\ - return; case __LINE__:;\ - } while (0) +#define CORO_SLEEP(delay) \ + do { \ + coroParam->_line = __LINE__; \ + coroParam->_sleep = delay; \ + assert(&coroParam != &Common::nullContext); \ + return; case __LINE__:; \ + } while (0) #define CORO_GIVE_WAY do { CoroScheduler.giveWay(); CORO_SLEEP(1); } while (0) #define CORO_RESCHEDULE do { CoroScheduler.reschedule(); CORO_SLEEP(1); } while (0) @@ -182,7 +183,7 @@ public: * then delete the entire coroutine's state, including all subcontexts). */ #define CORO_KILL_SELF() \ - do { if (&coroParam != &Common::nullContext) { coroParam->_sleep = -1; } return; } while (0) + do { if (&coroParam != &Common::nullContext) { coroParam->_sleep = -1; } return; } while (0) /** @@ -201,8 +202,8 @@ public: * If the subcontext is null, the coroutine ended normally, and we can * simply break out of the loop and continue execution. * - * @param subCoro name of the coroutine-enabled function to invoke - * @param ARGS list of arguments to pass to subCoro + * @param subCoro name of the coroutine-enabled function to invoke + * @param ARGS list of arguments to pass to subCoro * * @note ARGS must be surrounded by parentheses, and the first argument * in this list must always be CORO_SUBCTX. For example, the @@ -211,18 +212,18 @@ public: * becomes the following: * CORO_INVOKE_ARGS(myFunc, (CORO_SUBCTX, a, b)); */ -#define CORO_INVOKE_ARGS(subCoro, ARGS) \ - do {\ - coroParam->_line = __LINE__;\ - coroParam->_subctx = 0;\ - do {\ - subCoro ARGS;\ - if (!coroParam->_subctx) break;\ - coroParam->_sleep = coroParam->_subctx->_sleep;\ - assert(&coroParam != &Common::nullContext);\ - return; case __LINE__:;\ - } while (1);\ - } while (0) +#define CORO_INVOKE_ARGS(subCoro, ARGS) \ + do { \ + coroParam->_line = __LINE__; \ + coroParam->_subctx = 0; \ + do { \ + subCoro ARGS; \ + if (!coroParam->_subctx) break; \ + coroParam->_sleep = coroParam->_subctx->_sleep; \ + assert(&coroParam != &Common::nullContext); \ + return; case __LINE__:; \ + } while (1); \ + } while (0) /** * Invoke another coroutine. Similar to CORO_INVOKE_ARGS, @@ -230,62 +231,62 @@ public: * if invoked coroutine yields (thus causing the current * coroutine to yield, too). */ -#define CORO_INVOKE_ARGS_V(subCoro, RESULT, ARGS) \ - do {\ - coroParam->_line = __LINE__;\ - coroParam->_subctx = 0;\ - do {\ - subCoro ARGS;\ - if (!coroParam->_subctx) break;\ - coroParam->_sleep = coroParam->_subctx->_sleep;\ - assert(&coroParam != &Common::nullContext);\ - return RESULT; case __LINE__:;\ - } while (1);\ - } while (0) +#define CORO_INVOKE_ARGS_V(subCoro, RESULT, ARGS) \ + do { \ + coroParam->_line = __LINE__; \ + coroParam->_subctx = 0; \ + do { \ + subCoro ARGS; \ + if (!coroParam->_subctx) break; \ + coroParam->_sleep = coroParam->_subctx->_sleep; \ + assert(&coroParam != &Common::nullContext); \ + return RESULT; case __LINE__:; \ + } while (1); \ + } while (0) /** * Convenience wrapper for CORO_INVOKE_ARGS for invoking a coroutine * with no parameters. */ #define CORO_INVOKE_0(subCoroutine) \ - CORO_INVOKE_ARGS(subCoroutine,(CORO_SUBCTX)) + CORO_INVOKE_ARGS(subCoroutine, (CORO_SUBCTX)) /** * Convenience wrapper for CORO_INVOKE_ARGS for invoking a coroutine * with one parameter. */ #define CORO_INVOKE_1(subCoroutine, a0) \ - CORO_INVOKE_ARGS(subCoroutine,(CORO_SUBCTX,a0)) + CORO_INVOKE_ARGS(subCoroutine, (CORO_SUBCTX, a0)) /** * Convenience wrapper for CORO_INVOKE_ARGS for invoking a coroutine * with two parameters. */ #define CORO_INVOKE_2(subCoroutine, a0,a1) \ - CORO_INVOKE_ARGS(subCoroutine,(CORO_SUBCTX,a0,a1)) + CORO_INVOKE_ARGS(subCoroutine, (CORO_SUBCTX, a0, a1)) /** * Convenience wrapper for CORO_INVOKE_ARGS for invoking a coroutine * with three parameters. */ #define CORO_INVOKE_3(subCoroutine, a0,a1,a2) \ - CORO_INVOKE_ARGS(subCoroutine,(CORO_SUBCTX,a0,a1,a2)) + CORO_INVOKE_ARGS(subCoroutine, (CORO_SUBCTX, a0, a1, a2)) /** * Convenience wrapper for CORO_INVOKE_ARGS for invoking a coroutine * with four parameters. */ #define CORO_INVOKE_4(subCoroutine, a0,a1,a2,a3) \ - CORO_INVOKE_ARGS(subCoroutine,(CORO_SUBCTX,a0,a1,a2,a3)) + CORO_INVOKE_ARGS(subCoroutine, (CORO_SUBCTX, a0, a1, a2, a3)) // the size of process specific info -#define CORO_PARAM_SIZE 32 +#define CORO_PARAM_SIZE 32 // the maximum number of processes -#define CORO_NUM_PROCESS 100 -#define CORO_MAX_PROCESSES 100 +#define CORO_NUM_PROCESS 100 +#define CORO_MAX_PROCESSES 100 #define CORO_MAX_PID_WAITING 5 #define CORO_INFINITE 0xffffffff @@ -296,16 +297,16 @@ typedef void (*CORO_ADDR)(CoroContext &, const void *); /** process structure */ struct PROCESS { - PROCESS *pNext; ///< pointer to next process in active or free list - PROCESS *pPrevious; ///< pointer to previous process in active or free list + PROCESS *pNext; ///< pointer to next process in active or free list + PROCESS *pPrevious; ///< pointer to previous process in active or free list - CoroContext state; ///< the state of the coroutine - CORO_ADDR coroAddr; ///< the entry point of the coroutine + CoroContext state; ///< the state of the coroutine + CORO_ADDR coroAddr; ///< the entry point of the coroutine - int sleepTime; ///< number of scheduler cycles to sleep - uint32 pid; ///< process ID - uint32 pidWaiting[CORO_MAX_PID_WAITING]; ///< Process ID(s) process is currently waiting on - char param[CORO_PARAM_SIZE]; ///< process specific info + int sleepTime; ///< number of scheduler cycles to sleep + uint32 pid; ///< process ID + uint32 pidWaiting[CORO_MAX_PID_WAITING]; ///< Process ID(s) process is currently waiting on + char param[CORO_PARAM_SIZE]; ///< process specific info }; typedef PROCESS *PPROCESS; @@ -321,7 +322,7 @@ struct EVENT { /** * Creates and manages "processes" (really coroutines). */ -class CoroutineScheduler: public Singleton { +class CoroutineScheduler : public Singleton { public: /** Pointer to a function of the form "void function(PPROCESS)" */ typedef void (*VFPTRPP)(PROCESS *); @@ -355,7 +356,7 @@ private: * Checks both the active and free process list to insure all the links are valid, * and that no processes have been lost */ - void CheckStack(); + void checkStack(); #endif /** @@ -382,12 +383,12 @@ public: */ void reset(); - #ifdef DEBUG +#ifdef DEBUG /** * Shows the maximum number of process used at once. */ void printStats(); - #endif +#endif /** * Give all active processes a chance to run @@ -408,71 +409,71 @@ public: /** * Moves the specified process to the end of the dispatch queue * allowing it to run again within the current game cycle. - * @param pGiveProc Which process + * @param pGiveProc Which process */ void giveWay(PPROCESS pReSchedProc = NULL); /** * Continously makes a given process wait for another process to finish or event to signal. * - * @param pid Process/Event identifier - * @param duration Duration in milliseconds - * @param expired If specified, set to true if delay period expired + * @param pid Process/Event identifier + * @param duration Duration in milliseconds + * @param expired If specified, set to true if delay period expired */ void waitForSingleObject(CORO_PARAM, int pid, uint32 duration, bool *expired = NULL); /** * Continously makes a given process wait for given prcesses to finished or events to be set * - * @param nCount Number of Id's being passed - * @param evtList List of pids to wait for - * @param bWaitAll Specifies whether all or any of the processes/events - * @param duration Duration in milliseconds - * @param expired Set to true if delay period expired + * @param nCount Number of Id's being passed + * @param evtList List of pids to wait for + * @param bWaitAll Specifies whether all or any of the processes/events + * @param duration Duration in milliseconds + * @param expired Set to true if delay period expired */ - void waitForMultipleObjects(CORO_PARAM, int nCount, uint32 *pidList, bool bWaitAll, - uint32 duration, bool *expired = NULL); + void waitForMultipleObjects(CORO_PARAM, int nCount, uint32 *pidList, bool bWaitAll, + uint32 duration, bool *expired = NULL); /** * Make the active process sleep for the given duration in milliseconds * - * @param duration Duration in milliseconds - * @remarks This duration won't be precise, since it relies on the frequency the + * @param duration Duration in milliseconds + * @remarks This duration won't be precise, since it relies on the frequency the * scheduler is called. */ void sleep(CORO_PARAM, uint32 duration); - + /** * Creates a new process. * - * @param pid process identifier - * @param coroAddr Coroutine start address - * @param pParam Process specific info - * @param sizeParam Size of process specific info + * @param pid process identifier + * @param coroAddr Coroutine start address + * @param pParam Process specific info + * @param sizeParam Size of process specific info */ PROCESS *createProcess(uint32 pid, CORO_ADDR coroAddr, const void *pParam, int sizeParam); /** * Creates a new process with an auto-incrementing Process Id. * - * @param coroAddr Coroutine start address - * @param pParam Process specific info - * @param sizeParam Size of process specific info + * @param coroAddr Coroutine start address + * @param pParam Process specific info + * @param sizeParam Size of process specific info */ uint32 createProcess(CORO_ADDR coroAddr, const void *pParam, int sizeParam); /** * Creates a new process with an auto-incrementing Process Id, and a single pointer parameter. * - * @param coroAddr Coroutine start address - * @param pParam Process specific info + * @param coroAddr Coroutine start address + * @param pParam Process specific info */ uint32 createProcess(CORO_ADDR coroAddr, const void *pParam); /** * Kills the specified process. * - * @param pKillProc Which process to kill + * @param pKillProc Which process to kill */ void killProcess(PROCESS *pKillProc); @@ -490,9 +491,9 @@ public: * Kills any process matching the specified PID. The current * process cannot be killed. * - * @param pidKill Process identifier of process to kill - * @param pidMask Mask to apply to process identifiers before comparison - * @return The number of processes killed is returned. + * @param pidKill Process identifier of process to kill + * @param pidMask Mask to apply to process identifiers before comparison + * @return The number of processes killed is returned. */ int killMatchingProcess(uint32 pidKill, int pidMask = -1); @@ -503,7 +504,7 @@ public: * called by killProcess() to allow the resource allocator to free * resources allocated to the dying process. * - * @param pFunc Function to be called by killProcess() + * @param pFunc Function to be called by killProcess() */ void setResourceCallback(VFPTRPP pFunc); @@ -511,29 +512,29 @@ public: /** * Creates a new event (semaphore) object * - * @param bManualReset Events needs to be manually reset. Otherwise, + * @param bManualReset Events needs to be manually reset. Otherwise, * events will be automatically reset after a * process waits on the event finishes - * @param bInitialState Specifies whether the event is signalled or not + * @param bInitialState Specifies whether the event is signalled or not * initially */ uint32 createEvent(bool bManualReset, bool bInitialState); /** * Destroys the given event - * @param pidEvent Event Process Id + * @param pidEvent Event Process Id */ void closeEvent(uint32 pidEvent); /** * Sets the event - * @param pidEvent Event Process Id + * @param pidEvent Event Process Id */ void setEvent(uint32 pidEvent); /** * Resets the event - * @param pidEvent Event Process Id + * @param pidEvent Event Process Id */ void resetEvent(uint32 pidEvent); @@ -542,9 +543,9 @@ public: * processes,allowing any processes waiting on the event to be fired. It * then immediately resets the event again. * - * @param pidEvent Event Process Id + * @param pidEvent Event Process Id * - * @remarks Should not be run inside of another process + * @remarks Should not be run inside of another process */ void pulseEvent(uint32 pidEvent); }; @@ -553,4 +554,4 @@ public: } // end of namespace Common -#endif // COMMON_COROUTINES_H +#endif // COMMON_COROUTINES_H -- cgit v1.2.3 From 8e7f874db35395d100ca73d9433b25f2f7eae19d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 7 Jun 2012 18:11:38 +0200 Subject: COMMON: Make CoroutineScheduler's constructor and destructor private. CoroutineSchedule is a singleton, thus it should not be possible to create a custom instance of it. --- common/coroutines.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/common/coroutines.h b/common/coroutines.h index 3b8b1a77f9..64eabbf8f4 100644 --- a/common/coroutines.h +++ b/common/coroutines.h @@ -328,6 +328,18 @@ public: typedef void (*VFPTRPP)(PROCESS *); private: + friend class Singleton; + + /** + * Constructor + */ + CoroutineScheduler(); + + /** + * Destructor + */ + ~CoroutineScheduler(); + /** list of all processes */ PROCESS *processList; @@ -368,16 +380,6 @@ private: PROCESS *getProcess(uint32 pid); EVENT *getEvent(uint32 pid); public: - /** - * Constructor - */ - CoroutineScheduler(); - - /** - * Destructor - */ - ~CoroutineScheduler(); - /** * Kills all processes and places them on the free list. */ -- cgit v1.2.3 From e1d45a7b89368ddb5c2d6a1d5b225611d1cfb9a4 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 7 Jun 2012 18:19:10 +0200 Subject: TINSEL: Remove unused member _scheduler in TinselEngine. This is a leftover from before the move of the coroutine code. --- engines/tinsel/tinsel.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h index 59344c44f4..bac7ef6efb 100644 --- a/engines/tinsel/tinsel.h +++ b/engines/tinsel/tinsel.h @@ -53,7 +53,6 @@ class Config; class MidiDriver; class MidiMusicPlayer; class PCMMusicPlayer; -class Scheduler; class SoundManager; typedef Common::List RectList; @@ -154,7 +153,6 @@ class TinselEngine : public Engine { Common::Point _mousePos; uint8 _dosPlayerDir; Console *_console; - Scheduler *_scheduler; static const char *const _sampleIndices[][3]; static const char *const _sampleFiles[][3]; -- cgit v1.2.3 From 421b93ce0574b76eeae0ffe0598f1f6858ddf1f1 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 8 Jun 2012 03:11:44 +0200 Subject: GOB: Rewrite "pathfinding" and implement moving enemies Since shooting does not yet work, we're just getting mauled by them... --- engines/gob/minigames/geisha/penetration.cpp | 362 ++++++++++++++++++++++----- engines/gob/minigames/geisha/penetration.h | 77 ++++-- engines/gob/minigames/geisha/submarine.cpp | 3 + 3 files changed, 358 insertions(+), 84 deletions(-) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 9791757984..656e90a45b 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -59,8 +59,12 @@ enum Sprite { }; enum Animation { - kAnimationMouthKiss = 33, - kAnimationMouthBite = 34 + kAnimationEnemyRound = 0, + kAnimationEnemyRoundExplode = 1, + kAnimationEnemySquare = 2, + kAnimationEnemySquareExplode = 3, + kAnimationMouthKiss = 33, + kAnimationMouthBite = 34 }; static const int kMapTileWidth = 24; @@ -353,12 +357,55 @@ static const char *kStrings[kLanguageCount][kStringCount] = { } }; -Penetration::Position::Position(uint16 pX, uint16 pY) : x(pX), y(pY) { + +Penetration::MapObject::MapObject(uint16 tX, uint16 tY, uint16 mX, uint16 mY, uint16 w, uint16 h) : + tileX(tX), tileY(tY), mapX(mX), mapY(mY), width(w), height(h) { + + isBlocking = true; +} + +Penetration::MapObject::MapObject(uint16 tX, uint16 tY, uint16 w, uint16 h) : + tileX(tX), tileY(tY), width(w), height(h) { + + isBlocking = true; + + setMapFromTilePosition(); } +void Penetration::MapObject::setTileFromMapPosition() { + tileX = (mapX + (width / 2)) / kMapTileWidth; + tileY = (mapY + (height / 2)) / kMapTileHeight; +} + +void Penetration::MapObject::setMapFromTilePosition() { + mapX = tileX * kMapTileWidth; + mapY = tileY * kMapTileHeight; +} + +bool Penetration::MapObject::isIn(uint16 mX, uint16 mY) const { + if ((mX < mapX) || (mY < mapY)) + return false; + if ((mX > (mapX + width - 1)) || (mY > (mapY + height - 1))) + return false; + + return true; +} + +bool Penetration::MapObject::isIn(uint16 mX, uint16 mY, uint16 w, uint16 h) const { + return isIn(mX , mY ) || + isIn(mX + w - 1, mY ) || + isIn(mX , mY + h - 1) || + isIn(mX + w - 1, mY + h - 1); +} + +bool Penetration::MapObject::isIn(const MapObject &obj) const { + return isIn(obj.mapX, obj.mapY, obj.width, obj.height); +} + + +Penetration::ManagedMouth::ManagedMouth(uint16 tX, uint16 tY, MouthType t) : + MapObject(tX, tY, 0, 0), mouth(0), type(t) { -Penetration::ManagedMouth::ManagedMouth(uint16 pX, uint16 pY, MouthType t) : - Position(pX, pY), mouth(0), type(t) { } Penetration::ManagedMouth::~ManagedMouth() { @@ -366,9 +413,9 @@ Penetration::ManagedMouth::~ManagedMouth() { } -Penetration::ManagedSub::ManagedSub(uint16 pX, uint16 pY) : Position(pX, pY), sub(0) { - mapX = x * kMapTileWidth; - mapY = y * kMapTileHeight; +Penetration::ManagedSub::ManagedSub(uint16 tX, uint16 tY) : + MapObject(tX, tY, kMapTileWidth, kMapTileHeight), sub(0) { + } Penetration::ManagedSub::~ManagedSub() { @@ -376,6 +423,20 @@ Penetration::ManagedSub::~ManagedSub() { } +Penetration::ManagedEnemy::ManagedEnemy() : MapObject(0, 0, 0, 0), enemy(0), dead(false) { +} + +Penetration::ManagedEnemy::~ManagedEnemy() { + delete enemy; +} + +void Penetration::ManagedEnemy::clear() { + delete enemy; + + enemy = 0; +} + + Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _objects(0), _sub(0), _shieldMeter(0), _healthMeter(0), _floor(0), _isPlaying(false) { @@ -415,6 +476,7 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { _vm->_video->retrace(); while (!_vm->shouldQuit() && !_quit && !isDead() && !hasWon()) { + enemiesCreate(); updateAnims(); // Draw, fade in if necessary and wait for the end of the frame @@ -428,6 +490,9 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { // Handle the sub movement handleSub(); + // Handle the enemies movement + enemiesMove(); + checkExited(); } @@ -449,11 +514,12 @@ void Penetration::cheatWin() { void Penetration::init() { // Load sounds - _vm->_sound->sampleLoad(&_soundShield, SOUND_SND, "boucl.snd"); - _vm->_sound->sampleLoad(&_soundBite , SOUND_SND, "pervet.snd"); - _vm->_sound->sampleLoad(&_soundKiss , SOUND_SND, "baise.snd"); - _vm->_sound->sampleLoad(&_soundShoot , SOUND_SND, "tirgim.snd"); - _vm->_sound->sampleLoad(&_soundExit , SOUND_SND, "trouve.snd"); + _vm->_sound->sampleLoad(&_soundShield , SOUND_SND, "boucl.snd"); + _vm->_sound->sampleLoad(&_soundBite , SOUND_SND, "pervet.snd"); + _vm->_sound->sampleLoad(&_soundKiss , SOUND_SND, "baise.snd"); + _vm->_sound->sampleLoad(&_soundShoot , SOUND_SND, "tirgim.snd"); + _vm->_sound->sampleLoad(&_soundExit , SOUND_SND, "trouve.snd"); + _vm->_sound->sampleLoad(&_soundExplode, SOUND_SND, "virmor.snd"); _quit = false; for (int i = 0; i < kKeyCount; i++) @@ -486,6 +552,7 @@ void Penetration::deinit() { _soundKiss.free(); _soundShoot.free(); _soundExit.free(); + _soundExplode.free(); clearMap(); @@ -500,10 +567,16 @@ void Penetration::clearMap() { _mapAnims.clear(); _anims.clear(); + _blockingObjects.clear(); + + _walls.clear(); _exits.clear(); _shields.clear(); _mouths.clear(); + for (int i = 0; i < kEnemyCount; i++) + _enemies[i].clear(); + delete _sub; _sub = 0; @@ -526,13 +599,9 @@ void Penetration::createMap() { for (int x = 0; x < kMapWidth; x++) { const byte mapTile = mapTiles[y * kMapWidth + x]; - bool *walkMap = _walkMap + (y * kMapWidth + x); - const int posX = kPlayAreaBorderWidth + x * kMapTileWidth; const int posY = kPlayAreaBorderHeight + y * kMapTileHeight; - *walkMap = true; - switch (mapTile) { case 0: // Floor _sprites->draw(*_map, kSpriteFloor, posX, posY); @@ -542,18 +611,18 @@ void Penetration::createMap() { exitWorks = _hasAccessPass; if (exitWorks) { - _exits.push_back(Position(x, y)); _sprites->draw(*_map, kSpriteExit, posX, posY); + _exits.push_back(MapObject(x, y, 0, 0)); } else { _sprites->draw(*_map, kSpriteWall, posX, posY); - *walkMap = false; + _walls.push_back(MapObject(x, y, kMapTileWidth, kMapTileHeight)); } break; case 50: // Wall _sprites->draw(*_map, kSpriteWall, posX, posY); - *walkMap = false; + _walls.push_back(MapObject(x, y, kMapTileWidth, kMapTileHeight)); break; case 51: // Regular exit @@ -563,11 +632,11 @@ void Penetration::createMap() { exitWorks = _testMode || (_floor < 2) || _hasAccessPass; if (exitWorks) { - _exits.push_back(Position(x, y)); _sprites->draw(*_map, kSpriteExit, posX, posY); + _exits.push_back(MapObject(x, y, 0, 0)); } else { _sprites->draw(*_map, kSpriteWall, posX, posY); - *walkMap = false; + _walls.push_back(MapObject(x, y, kMapTileWidth, kMapTileHeight)); } break; @@ -603,7 +672,7 @@ void Penetration::createMap() { _map->fillRect(posX + 4, posY + 8, posX + 7, posY + 18, kColorFloor); // Area left to shield _map->fillRect(posX + 17, posY + 8, posX + 20, posY + 18, kColorFloor); // Area right to shield - _shields.push_back(Position(x, y)); + _shields.push_back(MapObject(x, y, 0, 0)); break; case 57: // Start position @@ -623,10 +692,30 @@ void Penetration::createMap() { if (!_sub) error("Geisha: No starting position in floor %d (testmode: %d)", _floor, _testMode); - for (Common::List::iterator m = _mouths.begin(); m != _mouths.end(); m++) + // Walls + for (Common::List::iterator w = _walls.begin(); w != _walls.end(); ++w) + _blockingObjects.push_back(&*w); + + // Mouths + for (Common::List::iterator m = _mouths.begin(); m != _mouths.end(); ++m) _mapAnims.push_back(m->mouth); + // Sub + _blockingObjects.push_back(_sub); _anims.push_back(_sub->sub); + + // Moving enemies + for (int i = 0; i < kEnemyCount; i++) { + _enemies[i].enemy = new ANIObject(*_objects); + + _enemies[i].enemy->setPause(true); + _enemies[i].enemy->setVisible(false); + + _enemies[i].isBlocking = false; + + _blockingObjects.push_back(&_enemies[i]); + _mapAnims.push_back(_enemies[i].enemy); + } } void Penetration::drawFloorText() { @@ -741,6 +830,104 @@ void Penetration::initScreen() { _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, 0, 0, 319, 199); } +void Penetration::enemiesCreate() { + for (int i = 0; i < kEnemyCount; i++) { + ManagedEnemy &enemy = _enemies[i]; + + if (enemy.enemy->isVisible()) + continue; + + enemy.enemy->setAnimation((i & 1) ? kAnimationEnemySquare : kAnimationEnemyRound); + enemy.enemy->setMode(ANIObject::kModeContinuous); + enemy.enemy->setPause(false); + enemy.enemy->setVisible(true); + + int16 width, height; + enemy.enemy->getFrameSize(width, height); + + enemy.width = width; + enemy.height = height; + + do { + enemy.mapX = _vm->_util->getRandom(kMapWidth) * kMapTileWidth + 2; + enemy.mapY = _vm->_util->getRandom(kMapHeight) * kMapTileHeight + 4; + enemy.setTileFromMapPosition(); + } while (isBlocked(enemy, enemy.mapX, enemy.mapY)); + + const int posX = kPlayAreaBorderWidth + enemy.mapX; + const int posY = kPlayAreaBorderHeight + enemy.mapY; + + enemy.enemy->setPosition(posX, posY); + + enemy.isBlocking = true; + enemy.dead = false; + } +} + +void Penetration::enemyMove(ManagedEnemy &enemy, int x, int y) { + if ((x == 0) && (y == 0)) + return; + + bool touchedSub; + findPath(enemy, x, y, _sub, &touchedSub); + + enemy.setTileFromMapPosition(); + + const int posX = kPlayAreaBorderWidth + enemy.mapX; + const int posY = kPlayAreaBorderHeight + enemy.mapY; + + enemy.enemy->setPosition(posX, posY); + + if (touchedSub) + enemyAttack(enemy); +} + +void Penetration::enemiesMove() { + for (int i = 0; i < kEnemyCount; i++) { + ManagedEnemy &enemy = _enemies[i]; + + if (!enemy.enemy->isVisible() || enemy.dead) + continue; + + int x = 0, y = 0; + + if (enemy.mapX > _sub->mapX) + x = -8; + else if (enemy.mapX < _sub->mapX) + x = 8; + + if (enemy.mapY > _sub->mapY) + y = -8; + else if (enemy.mapY < _sub->mapY) + y = 8; + + enemyMove(enemy, x, y); + } +} + +void Penetration::enemyAttack(ManagedEnemy &enemy) { + // If we have shields, the enemy explodes at them, taking a huge chunk of energy with it. + // Otherwise, the enemy nibbles a small amount of health away. + + if (_shieldMeter->getValue() > 0) { + enemyExplode(enemy); + + healthLose(80); + } else + healthLose(5); +} + +void Penetration::enemyExplode(ManagedEnemy &enemy) { + enemy.dead = true; + + bool isSquare = enemy.enemy->getAnimation() == kAnimationEnemySquare; + + enemy.enemy->setAnimation(isSquare ? kAnimationEnemySquareExplode : kAnimationEnemyRoundExplode); + enemy.enemy->setMode(ANIObject::kModeOnce); + + _vm->_sound->blasterPlay(&_soundExplode, 1, 0); +} + void Penetration::checkInput() { Common::Event event; Common::EventManager *eventMan = g_system->getEventManager(); @@ -785,13 +972,6 @@ void Penetration::checkInput() { } } -bool Penetration::isWalkable(int16 x, int16 y) const { - if ((x < 0) || (x >= kMapWidth) || (y < 0) || (y >= kMapHeight)) - return false; - - return _walkMap[y * kMapWidth + x]; -} - void Penetration::handleSub() { int x, y; Submarine::Direction direction = getDirection(x, y); @@ -802,34 +982,90 @@ void Penetration::handleSub() { subShoot(); } -void Penetration::subMove(int x, int y, Submarine::Direction direction) { - if (!_sub->sub->canMove()) - return; +bool Penetration::isBlocked(const MapObject &self, int16 x, int16 y, + const MapObject *checkBlockedBy, bool *blockedBy) const { - // Limit the movement to walkable tiles + if ((x < 0) || (y < 0)) + return true; + if (((x + self.width - 1) >= (kMapWidth * kMapTileWidth)) || + ((y + self.height - 1) >= (kMapHeight * kMapTileHeight))) + return true; - int16 minX = 0; - if (!isWalkable(_sub->x - 1, _sub->y)) - minX = _sub->x * kMapTileWidth; + MapObject checkSelf(0, 0, self.width, self.height); - int16 maxX = kMapWidth * kMapTileWidth; - if (!isWalkable(_sub->x + 1, _sub->y)) - maxX = _sub->x * kMapTileWidth; + checkSelf.mapX = x; + checkSelf.mapY = y; - int16 minY = 0; - if (!isWalkable(_sub->x, _sub->y - 1)) - minY = _sub->y * kMapTileHeight; + bool blocked = false; + for (Common::List::const_iterator o = _blockingObjects.begin(); o != _blockingObjects.end(); ++o) { + const MapObject &obj = **o; - int16 maxY = kMapHeight * kMapTileHeight; - if (!isWalkable(_sub->x, _sub->y + 1)) - maxY = _sub->y * kMapTileHeight; + if (&obj == &self) + continue; - _sub->mapX = CLIP(_sub->mapX + x, minX, maxX); - _sub->mapY = CLIP(_sub->mapY + y, minY, maxY); + if (!obj.isBlocking) + continue; + + if (obj.isIn(checkSelf) || checkSelf.isIn(obj)) { + blocked = true; + + if (checkBlockedBy && blockedBy && (&obj == checkBlockedBy)) + *blockedBy = true; + } + } + + return blocked; +} + +void Penetration::findPath(MapObject &obj, int x, int y, + const MapObject *checkBlockedBy, bool *blockedBy) const { + + if (blockedBy) + *blockedBy = false; + + while ((x != 0) || (y != 0)) { + uint16 oldX = obj.mapX; + uint16 oldY = obj.mapY; + + uint16 newX = obj.mapX; + if (x > 0) { + newX++; + x--; + } else if (x < 0) { + newX--; + x++; + } + + if (!isBlocked(obj, newX, obj.mapY, checkBlockedBy, blockedBy)) + obj.mapX = newX; + + uint16 newY = obj.mapY; + if (y > 0) { + newY++; + y--; + } else if (y < 0) { + newY--; + y++; + } + + if (!isBlocked(obj, obj.mapX, newY, checkBlockedBy, blockedBy)) + obj.mapY = newY; + + if ((obj.mapX == oldX) && (obj.mapY == oldY)) + break; + } +} + +void Penetration::subMove(int x, int y, Submarine::Direction direction) { + if (!_sub->sub->canMove()) + return; - // The tile the sub is on is where its mid-point is - _sub->x = (_sub->mapX + (kMapTileWidth / 2)) / kMapTileWidth; - _sub->y = (_sub->mapY + (kMapTileHeight / 2)) / kMapTileHeight; + if ((x == 0) && (y == 0)) + return; + + findPath(*_sub, x, y); + + _sub->setTileFromMapPosition(); _sub->sub->turn(direction); @@ -872,8 +1108,8 @@ Submarine::Direction Penetration::getDirection(int &x, int &y) const { } void Penetration::checkShields() { - for (Common::List::iterator pos = _shields.begin(); pos != _shields.end(); ++pos) { - if ((pos->x == _sub->x) && (pos->y == _sub->y)) { + for (Common::List::iterator s = _shields.begin(); s != _shields.end(); ++s) { + if ((s->tileX == _sub->tileX) && (s->tileY == _sub->tileY)) { // Charge shields _shieldMeter->setMaxValue(); @@ -881,11 +1117,8 @@ void Penetration::checkShields() { _vm->_sound->blasterPlay(&_soundShield, 1, 0); // Erase the shield from the map - const int mapX = kPlayAreaBorderWidth + pos->x * kMapTileWidth; - const int mapY = kPlayAreaBorderHeight + pos->y * kMapTileHeight; - _sprites->draw(*_map, 30, mapX, mapY); - - _shields.erase(pos); + _sprites->draw(*_map, 30, s->mapX + kPlayAreaBorderWidth, s->mapY + kPlayAreaBorderHeight); + _shields.erase(s); break; } } @@ -896,8 +1129,8 @@ void Penetration::checkMouths() { if (!m->mouth->isDeactivated()) continue; - if ((( m->x == _sub->x) && (m->y == _sub->y)) || - (((m->x + 1) == _sub->x) && (m->y == _sub->y))) { + if ((( m->tileX == _sub->tileX) && (m->tileY == _sub->tileY)) || + (((m->tileX + 1) == _sub->tileX) && (m->tileY == _sub->tileY))) { m->mouth->activate(); @@ -917,10 +1150,9 @@ void Penetration::checkExits() { if (!_sub->sub->canMove()) return; - for (Common::List::iterator e = _exits.begin(); e != _exits.end(); ++e) { - if ((e->x == _sub->x) && (e->y == _sub->y)) { - _sub->mapX = e->x * kMapTileWidth; - _sub->mapY = e->y * kMapTileHeight; + for (Common::List::iterator e = _exits.begin(); e != _exits.end(); ++e) { + if ((e->tileX == _sub->tileX) && (e->tileY == _sub->tileY)) { + _sub->setMapFromTilePosition(); _sub->sub->leave(); diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 0336ef8dcb..9abae258b2 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -65,11 +65,29 @@ private: static const byte kPalettes[kFloorCount][3 * kPaletteSize]; static const byte kMaps[kModeCount][kFloorCount][kMapWidth * kMapHeight]; - struct Position { - uint16 x; - uint16 y; + static const int kEnemyCount = 9; - Position(uint16 pX, uint16 pY); + struct MapObject { + uint16 tileX; + uint16 tileY; + + uint16 mapX; + uint16 mapY; + + uint16 width; + uint16 height; + + bool isBlocking; + + MapObject(uint16 tX, uint16 tY, uint16 mX, uint16 mY, uint16 w, uint16 h); + MapObject(uint16 tX, uint16 tY, uint16 w, uint16 h); + + void setTileFromMapPosition(); + void setMapFromTilePosition(); + + bool isIn(uint16 mX, uint16 mY) const; + bool isIn(uint16 mX, uint16 mY, uint16 w, uint16 h) const; + bool isIn(const MapObject &obj) const; }; enum MouthType { @@ -77,24 +95,31 @@ private: kMouthTypeKiss }; - struct ManagedMouth : public Position { + struct ManagedMouth : public MapObject { Mouth *mouth; + MouthType type; - ManagedMouth(uint16 pX, uint16 pY, MouthType t); + ManagedMouth(uint16 tX, uint16 tY, MouthType t); ~ManagedMouth(); }; - struct ManagedSub : public Position { + struct ManagedSub : public MapObject { Submarine *sub; - uint16 mapX; - uint16 mapY; - - ManagedSub(uint16 pX, uint16 pY); + ManagedSub(uint16 tX, uint16 tY); ~ManagedSub(); + }; - void setPosition(uint16 pX, uint16 pY); + struct ManagedEnemy : public MapObject { + ANIObject *enemy; + + bool dead; + + ManagedEnemy(); + ~ManagedEnemy(); + + void clear(); }; enum Keys { @@ -130,19 +155,24 @@ private: uint8 _floor; Surface *_map; - bool _walkMap[kMapWidth * kMapHeight]; ManagedSub *_sub; - Common::List _exits; - Common::List _shields; + Common::List _walls; + Common::List _exits; + Common::List _shields; Common::List _mouths; + ManagedEnemy _enemies[kEnemyCount]; + + Common::List _blockingObjects; + SoundDesc _soundShield; SoundDesc _soundBite; SoundDesc _soundKiss; SoundDesc _soundShoot; SoundDesc _soundExit; + SoundDesc _soundExplode; bool _isPlaying; @@ -161,18 +191,21 @@ private: void drawFloorText(); void drawEndText(); + bool isBlocked(const MapObject &self, int16 x, int16 y, + const MapObject *checkBlockedBy = 0, bool *blockedBy = 0) const; + void findPath(MapObject &obj, int x, int y, + const MapObject *checkBlockedBy = 0, bool *blockedBy = 0) const; + void updateAnims(); void checkInput(); + Submarine::Direction getDirection(int &x, int &y) const; + void handleSub(); void subMove(int x, int y, Submarine::Direction direction); void subShoot(); - Submarine::Direction getDirection(int &x, int &y) const; - - bool isWalkable(int16 x, int16 y) const; - void checkExits(); void checkShields(); void checkMouths(); @@ -182,6 +215,12 @@ private: void checkExited(); + void enemiesCreate(); + void enemiesMove(); + void enemyMove(ManagedEnemy &enemy, int x, int y); + void enemyAttack(ManagedEnemy &enemy); + void enemyExplode(ManagedEnemy &enemy); + bool isDead() const; bool hasWon() const; diff --git a/engines/gob/minigames/geisha/submarine.cpp b/engines/gob/minigames/geisha/submarine.cpp index 9c12a56a85..cbe5f21eff 100644 --- a/engines/gob/minigames/geisha/submarine.cpp +++ b/engines/gob/minigames/geisha/submarine.cpp @@ -90,6 +90,9 @@ void Submarine::shoot() { } void Submarine::die() { + if (!canMove()) + return; + _state = kStateDie; setAnimation(directionToExplode(_direction)); -- cgit v1.2.3 From c414baa35d4cc4b11929d9c4995a1027d16f59e6 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 8 Jun 2012 05:16:01 +0200 Subject: GOB: Implement shooting in Penetration Geisha's Penetration minigame should be complete now. This also means that Geisha is now basically complete. The only thing missing is the MDYPlayer, but since the music is only played once during the title screen, and it has a PCM-based fallback (which is currently played), this is low priority. --- engines/gob/minigames/geisha/penetration.cpp | 257 ++++++++++++++++++++++++--- engines/gob/minigames/geisha/penetration.h | 34 +++- engines/gob/minigames/geisha/submarine.cpp | 4 + engines/gob/minigames/geisha/submarine.h | 2 + 4 files changed, 270 insertions(+), 27 deletions(-) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 656e90a45b..3be9f1f651 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -55,7 +55,15 @@ enum Sprite { kSpriteFloor = 30, kSpriteWall = 31, kSpriteMouthBite = 32, - kSpriteMouthKiss = 33 + kSpriteMouthKiss = 33, + kSpriteBulletN = 65, + kSpriteBulletS = 66, + kSpriteBulletW = 67, + kSpriteBulletE = 68, + kSpriteBulletSW = 85, + kSpriteBulletSE = 86, + kSpriteBulletNW = 87, + kSpriteBulletNE = 88 }; enum Animation { @@ -437,6 +445,20 @@ void Penetration::ManagedEnemy::clear() { } +Penetration::ManagedBullet::ManagedBullet() : MapObject(0, 0, 0, 0), bullet(0) { +} + +Penetration::ManagedBullet::~ManagedBullet() { + delete bullet; +} + +void Penetration::ManagedBullet::clear() { + delete bullet; + + bullet = 0; +} + + Penetration::Penetration(GobEngine *vm) : _vm(vm), _background(0), _sprites(0), _objects(0), _sub(0), _shieldMeter(0), _healthMeter(0), _floor(0), _isPlaying(false) { @@ -477,6 +499,7 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { while (!_vm->shouldQuit() && !_quit && !isDead() && !hasWon()) { enemiesCreate(); + bulletsMove(); updateAnims(); // Draw, fade in if necessary and wait for the end of the frame @@ -494,6 +517,9 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { enemiesMove(); checkExited(); + + if (_shotCoolDown > 0) + _shotCoolDown--; } deinit(); @@ -543,6 +569,8 @@ void Penetration::init() { _floor = 0; + _shotCoolDown = 0; + createMap(); } @@ -576,6 +604,8 @@ void Penetration::clearMap() { for (int i = 0; i < kEnemyCount; i++) _enemies[i].clear(); + for (int i = 0; i < kMaxBulletCount; i++) + _bullets[i].clear(); delete _sub; @@ -716,6 +746,18 @@ void Penetration::createMap() { _blockingObjects.push_back(&_enemies[i]); _mapAnims.push_back(_enemies[i].enemy); } + + // Bullets + for (int i = 0; i < kMaxBulletCount; i++) { + _bullets[i].bullet = new ANIObject(*_sprites); + + _bullets[i].bullet->setPause(true); + _bullets[i].bullet->setVisible(false); + + _bullets[i].isBlocking = false; + + _mapAnims.push_back(_bullets[i].bullet); + } } void Penetration::drawFloorText() { @@ -868,8 +910,8 @@ void Penetration::enemyMove(ManagedEnemy &enemy, int x, int y) { if ((x == 0) && (y == 0)) return; - bool touchedSub; - findPath(enemy, x, y, _sub, &touchedSub); + MapObject *blockedBy; + findPath(enemy, x, y, &blockedBy); enemy.setTileFromMapPosition(); @@ -878,7 +920,7 @@ void Penetration::enemyMove(ManagedEnemy &enemy, int x, int y) { enemy.enemy->setPosition(posX, posY); - if (touchedSub) + if (blockedBy == _sub) enemyAttack(enemy); } @@ -918,7 +960,8 @@ void Penetration::enemyAttack(ManagedEnemy &enemy) { } void Penetration::enemyExplode(ManagedEnemy &enemy) { - enemy.dead = true; + enemy.dead = true; + enemy.isBlocking = false; bool isSquare = enemy.enemy->getAnimation() == kAnimationEnemySquare; @@ -982,8 +1025,7 @@ void Penetration::handleSub() { subShoot(); } -bool Penetration::isBlocked(const MapObject &self, int16 x, int16 y, - const MapObject *checkBlockedBy, bool *blockedBy) const { +bool Penetration::isBlocked(const MapObject &self, int16 x, int16 y, MapObject **blockedBy) { if ((x < 0) || (y < 0)) return true; @@ -996,9 +1038,8 @@ bool Penetration::isBlocked(const MapObject &self, int16 x, int16 y, checkSelf.mapX = x; checkSelf.mapY = y; - bool blocked = false; - for (Common::List::const_iterator o = _blockingObjects.begin(); o != _blockingObjects.end(); ++o) { - const MapObject &obj = **o; + for (Common::List::iterator o = _blockingObjects.begin(); o != _blockingObjects.end(); ++o) { + MapObject &obj = **o; if (&obj == &self) continue; @@ -1007,21 +1048,19 @@ bool Penetration::isBlocked(const MapObject &self, int16 x, int16 y, continue; if (obj.isIn(checkSelf) || checkSelf.isIn(obj)) { - blocked = true; + if (blockedBy && !*blockedBy) + *blockedBy = &obj; - if (checkBlockedBy && blockedBy && (&obj == checkBlockedBy)) - *blockedBy = true; + return true; } } - return blocked; + return false; } -void Penetration::findPath(MapObject &obj, int x, int y, - const MapObject *checkBlockedBy, bool *blockedBy) const { - +void Penetration::findPath(MapObject &obj, int x, int y, MapObject **blockedBy) { if (blockedBy) - *blockedBy = false; + *blockedBy = 0; while ((x != 0) || (y != 0)) { uint16 oldX = obj.mapX; @@ -1036,7 +1075,7 @@ void Penetration::findPath(MapObject &obj, int x, int y, x++; } - if (!isBlocked(obj, newX, obj.mapY, checkBlockedBy, blockedBy)) + if (!isBlocked(obj, newX, obj.mapY, blockedBy)) obj.mapX = newX; uint16 newY = obj.mapY; @@ -1048,7 +1087,7 @@ void Penetration::findPath(MapObject &obj, int x, int y, y++; } - if (!isBlocked(obj, obj.mapX, newY, checkBlockedBy, blockedBy)) + if (!isBlocked(obj, obj.mapX, newY, blockedBy)) obj.mapY = newY; if ((obj.mapX == oldX) && (obj.mapY == oldY)) @@ -1078,9 +1117,185 @@ void Penetration::subShoot() { if (!_sub->sub->canMove() || _sub->sub->isShooting()) return; - _sub->sub->shoot(); + if (_shotCoolDown > 0) + return; + + // Creating a bullet + int slot = findEmptyBulletSlot(); + if (slot < 0) + return; + + ManagedBullet &bullet = _bullets[slot]; + bullet.bullet->setAnimation(directionToBullet(_sub->sub->getDirection())); + + setBulletPosition(*_sub, bullet); + + const int posX = kPlayAreaBorderWidth + bullet.mapX; + const int posY = kPlayAreaBorderHeight + bullet.mapY; + + bullet.bullet->setPosition(posX, posY); + bullet.bullet->setVisible(true); + + // Shooting + _sub->sub->shoot(); _vm->_sound->blasterPlay(&_soundShoot, 1, 0); + + _shotCoolDown = 3; +} + +void Penetration::setBulletPosition(const ManagedSub &sub, ManagedBullet &bullet) const { + bullet.mapX = sub.mapX; + bullet.mapY= sub.mapY; + + int16 sWidth, sHeight; + sub.sub->getFrameSize(sWidth, sHeight); + + int16 bWidth, bHeight; + bullet.bullet->getFrameSize(bWidth, bHeight); + + switch (sub.sub->getDirection()) { + case Submarine::kDirectionN: + bullet.mapX += sWidth / 2; + bullet.mapY -= bHeight; + + bullet.deltaX = 0; + bullet.deltaY = -8; + break; + + case Submarine::kDirectionNE: + bullet.mapX += sWidth; + bullet.mapY -= bHeight * 2; + + bullet.deltaX = 8; + bullet.deltaY = -8; + break; + + case Submarine::kDirectionE: + bullet.mapX += sWidth; + bullet.mapY += sHeight / 2 - bHeight; + + bullet.deltaX = 8; + bullet.deltaY = 0; + break; + + case Submarine::kDirectionSE: + bullet.mapX += sWidth; + bullet.mapY += sHeight; + + bullet.deltaX = 8; + bullet.deltaY = 8; + break; + + case Submarine::kDirectionS: + bullet.mapX += sWidth / 2; + bullet.mapY += sHeight; + + bullet.deltaX = 0; + bullet.deltaY = 8; + break; + + case Submarine::kDirectionSW: + bullet.mapX -= bWidth; + bullet.mapY += sHeight; + + bullet.deltaX = -8; + bullet.deltaY = 8; + break; + + case Submarine::kDirectionW: + bullet.mapX -= bWidth; + bullet.mapY += sHeight / 2 - bHeight; + + bullet.deltaX = -8; + bullet.deltaY = 0; + break; + + case Submarine::kDirectionNW: + bullet.mapX -= bWidth; + bullet.mapY -= bHeight; + + bullet.deltaX = -8; + bullet.deltaY = -8; + break; + + default: + break; + } +} + +uint16 Penetration::directionToBullet(Submarine::Direction direction) const { + switch (direction) { + case Submarine::kDirectionN: + return kSpriteBulletN; + + case Submarine::kDirectionNE: + return kSpriteBulletNE; + + case Submarine::kDirectionE: + return kSpriteBulletE; + + case Submarine::kDirectionSE: + return kSpriteBulletSE; + + case Submarine::kDirectionS: + return kSpriteBulletS; + + case Submarine::kDirectionSW: + return kSpriteBulletSW; + + case Submarine::kDirectionW: + return kSpriteBulletW; + + case Submarine::kDirectionNW: + return kSpriteBulletNW; + + default: + break; + } + + return 0; +} + +int Penetration::findEmptyBulletSlot() const { + for (int i = 0; i < kMaxBulletCount; i++) + if (!_bullets[i].bullet->isVisible()) + return i; + + return -1; +} + +void Penetration::bulletsMove() { + for (int i = 0; i < kMaxBulletCount; i++) + if (_bullets[i].bullet->isVisible()) + bulletMove(_bullets[i]); +} + +void Penetration::bulletMove(ManagedBullet &bullet) { + MapObject *blockedBy; + findPath(bullet, bullet.deltaX, bullet.deltaY, &blockedBy); + + if (blockedBy) { + checkShotEnemy(*blockedBy); + bullet.bullet->setVisible(false); + return; + } + + const int posX = kPlayAreaBorderWidth + bullet.mapX; + const int posY = kPlayAreaBorderHeight + bullet.mapY; + + bullet.bullet->setPosition(posX, posY); +} + +void Penetration::checkShotEnemy(MapObject &shotObject) { + for (int i = 0; i < kEnemyCount; i++) { + ManagedEnemy &enemy = _enemies[i]; + + if ((&enemy == &shotObject) && !enemy.dead && enemy.enemy->isVisible()) { + enemyExplode(enemy); + return; + } + } } Submarine::Direction Penetration::getDirection(int &x, int &y) const { diff --git a/engines/gob/minigames/geisha/penetration.h b/engines/gob/minigames/geisha/penetration.h index 9abae258b2..50004eba8e 100644 --- a/engines/gob/minigames/geisha/penetration.h +++ b/engines/gob/minigames/geisha/penetration.h @@ -65,7 +65,8 @@ private: static const byte kPalettes[kFloorCount][3 * kPaletteSize]; static const byte kMaps[kModeCount][kFloorCount][kMapWidth * kMapHeight]; - static const int kEnemyCount = 9; + static const int kEnemyCount = 9; + static const int kMaxBulletCount = 10; struct MapObject { uint16 tileX; @@ -122,6 +123,18 @@ private: void clear(); }; + struct ManagedBullet : public MapObject { + ANIObject *bullet; + + int16 deltaX; + int16 deltaY; + + ManagedBullet(); + ~ManagedBullet(); + + void clear(); + }; + enum Keys { kKeyUp = 0, kKeyDown, @@ -163,10 +176,13 @@ private: Common::List _shields; Common::List _mouths; - ManagedEnemy _enemies[kEnemyCount]; + ManagedEnemy _enemies[kEnemyCount]; + ManagedBullet _bullets[kMaxBulletCount]; Common::List _blockingObjects; + uint8 _shotCoolDown; + SoundDesc _soundShield; SoundDesc _soundBite; SoundDesc _soundKiss; @@ -191,10 +207,8 @@ private: void drawFloorText(); void drawEndText(); - bool isBlocked(const MapObject &self, int16 x, int16 y, - const MapObject *checkBlockedBy = 0, bool *blockedBy = 0) const; - void findPath(MapObject &obj, int x, int y, - const MapObject *checkBlockedBy = 0, bool *blockedBy = 0) const; + bool isBlocked(const MapObject &self, int16 x, int16 y, MapObject **blockedBy = 0); + void findPath(MapObject &obj, int x, int y, MapObject **blockedBy = 0); void updateAnims(); @@ -206,6 +220,14 @@ private: void subMove(int x, int y, Submarine::Direction direction); void subShoot(); + int findEmptyBulletSlot() const; + uint16 directionToBullet(Submarine::Direction direction) const; + void setBulletPosition(const ManagedSub &sub, ManagedBullet &bullet) const; + + void bulletsMove(); + void bulletMove(ManagedBullet &bullet); + void checkShotEnemy(MapObject &shotObject); + void checkExits(); void checkShields(); void checkMouths(); diff --git a/engines/gob/minigames/geisha/submarine.cpp b/engines/gob/minigames/geisha/submarine.cpp index cbe5f21eff..d16761cb7c 100644 --- a/engines/gob/minigames/geisha/submarine.cpp +++ b/engines/gob/minigames/geisha/submarine.cpp @@ -58,6 +58,10 @@ Submarine::Submarine(const ANIFile &ani) : ANIObject(ani), _state(kStateMove) { Submarine::~Submarine() { } +Submarine::Direction Submarine::getDirection() const { + return _direction; +} + void Submarine::turn(Direction to) { // Nothing to do if ((to == kDirectionNone) || ((_state == kStateMove) && (_direction == to))) diff --git a/engines/gob/minigames/geisha/submarine.h b/engines/gob/minigames/geisha/submarine.h index 8a6d679bdd..a6eae57095 100644 --- a/engines/gob/minigames/geisha/submarine.h +++ b/engines/gob/minigames/geisha/submarine.h @@ -47,6 +47,8 @@ public: Submarine(const ANIFile &ani); ~Submarine(); + Direction getDirection() const; + /** Turn to the specified direction. */ void turn(Direction to); -- cgit v1.2.3 From 18dd5e5128dcff623830ed43916828bc5cde1969 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 8 Jun 2012 08:30:32 +0200 Subject: SCI: Fix mouse up events Regression from 906f0248317e1a4167190a666fe308a09334bfac. Fixes bug #3533069. --- engines/sci/event.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp index 378e88b7df..14443db1e2 100644 --- a/engines/sci/event.cpp +++ b/engines/sci/event.cpp @@ -102,8 +102,8 @@ const MouseEventConversion mouseEventMappings[] = { { Common::EVENT_RBUTTONDOWN, SCI_EVENT_MOUSE_PRESS, 2 }, { Common::EVENT_MBUTTONDOWN, SCI_EVENT_MOUSE_PRESS, 3 }, { Common::EVENT_LBUTTONUP, SCI_EVENT_MOUSE_RELEASE, 1 }, - { Common::EVENT_LBUTTONUP, SCI_EVENT_MOUSE_RELEASE, 2 }, - { Common::EVENT_LBUTTONUP, SCI_EVENT_MOUSE_RELEASE, 3 } + { Common::EVENT_RBUTTONUP, SCI_EVENT_MOUSE_RELEASE, 2 }, + { Common::EVENT_MBUTTONUP, SCI_EVENT_MOUSE_RELEASE, 3 } }; EventManager::EventManager(bool fontIsExtended) : _fontIsExtended(fontIsExtended) { -- cgit v1.2.3 From a643981a385b20ef71a4d1987965f5d1b73fdadc Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 8 Jun 2012 11:57:43 +0300 Subject: SCI: Handle resource ID -1 when setting the palVary resource Fixes several wrong colors in SQ6 --- engines/sci/graphics/palette.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index 47d1647c6c..ea154c5037 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -698,7 +698,7 @@ void GfxPalette::palVaryInit() { } bool GfxPalette::palVaryLoadTargetPalette(GuiResourceId resourceId) { - _palVaryResourceId = resourceId; + _palVaryResourceId = (resourceId != 65535) ? resourceId : -1; Resource *palResource = _resMan->findResource(ResourceId(kResourceTypePalette, resourceId), false); if (palResource) { // Load and initialize destination palette -- cgit v1.2.3 From c735b2acda10dcf2225a38cb50a69c840b6662bc Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 8 Jun 2012 14:32:13 -0400 Subject: SCUMM: Give football u32 opcodes proper names --- engines/scumm/he/logic/football.cpp | 57 +++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/engines/scumm/he/logic/football.cpp b/engines/scumm/he/logic/football.cpp index 5a0d423508..87efd7cfb2 100644 --- a/engines/scumm/he/logic/football.cpp +++ b/engines/scumm/he/logic/football.cpp @@ -38,14 +38,14 @@ public: int32 dispatch(int op, int numArgs, int32 *args); private: - int op_1004(int32 *args); - int op_1006(int32 *args); - int op_1007(int32 *args); - int op_1010(int32 *args); - int op_1022(int32 *args); - int op_1023(int32 *args); - int op_1024(int32 *args); - int op_1028(); + int lineEquation3D(int32 *args); + int translateWorldToScreen(int32 *args); + int fieldGoalScreenTranslation(int32 *args); + int translateScreenToWorld(int32 *args); + int nextPoint(int32 *args); + int computePlayerBallIntercepts(int32 *args); + int computeTwoCircleIntercepts(int32 *args); + int largestFreeBlock(); }; int LogicHEfootball::versionID() { @@ -57,36 +57,36 @@ int32 LogicHEfootball::dispatch(int op, int numArgs, int32 *args) { switch (op) { case 1004: - res = op_1004(args); + res = lineEquation3D(args); break; case 1006: - res = op_1006(args); + res = translateWorldToScreen(args); break; case 1007: - res = op_1007(args); + res = fieldGoalScreenTranslation(args); break; case 1010: - res = op_1010(args); + res = translateScreenToWorld(args); break; case 1022: - res = op_1022(args); + res = nextPoint(args); break; case 1023: - res = op_1023(args); + res = computePlayerBallIntercepts(args); break; case 1024: - res = op_1024(args); + res = computeTwoCircleIntercepts(args); break; case 1028: // Backyard Football 2002 only - res = op_1028(); + res = largestFreeBlock(); break; case 8221968: @@ -129,8 +129,8 @@ int32 LogicHEfootball::dispatch(int op, int numArgs, int32 *args) { return res; } -int LogicHEfootball::op_1004(int32 *args) { - // Identical to LogicHEsoccer::op_1004 +int LogicHEfootball::lineEquation3D(int32 *args) { + // Identical to soccer's 1004 opcode double res, a2, a4, a5; a5 = ((double)args[4] - (double)args[1]) / ((double)args[5] - (double)args[2]); @@ -147,8 +147,8 @@ int LogicHEfootball::op_1004(int32 *args) { return 1; } -int LogicHEfootball::op_1006(int32 *args) { - // This seems to be more or less the inverse of op_1010 +int LogicHEfootball::translateWorldToScreen(int32 *args) { + // This is more or less the inverse of translateScreenToWorld const double a1 = args[1]; double res; @@ -173,7 +173,7 @@ int LogicHEfootball::op_1006(int32 *args) { return 1; } -int LogicHEfootball::op_1007(int32 *args) { +int LogicHEfootball::fieldGoalScreenTranslation(int32 *args) { double res, temp; temp = (double)args[1] * 0.32; @@ -194,8 +194,8 @@ int LogicHEfootball::op_1007(int32 *args) { return 1; } -int LogicHEfootball::op_1010(int32 *args) { - // This seems to be more or less the inverse of op_1006 +int LogicHEfootball::translateScreenToWorld(int32 *args) { + // This is more or less the inverse of translateWorldToScreen double a1 = (640.0 - (double)args[1] - 26.0) / 1.1588235e-1; // 2.9411764e-4 = 1/3400 @@ -211,7 +211,7 @@ int LogicHEfootball::op_1010(int32 *args) { return 1; } -int LogicHEfootball::op_1022(int32 *args) { +int LogicHEfootball::nextPoint(int32 *args) { double res; double var10 = args[4] - args[1]; double var8 = args[5] - args[2]; @@ -232,7 +232,7 @@ int LogicHEfootball::op_1022(int32 *args) { return 1; } -int LogicHEfootball::op_1023(int32 *args) { +int LogicHEfootball::computePlayerBallIntercepts(int32 *args) { double var10, var18, var20, var28, var30, var30_; double argf[7]; @@ -278,7 +278,8 @@ int LogicHEfootball::op_1023(int32 *args) { return 1; } -int LogicHEfootball::op_1024(int32 *args) { +int LogicHEfootball::computeTwoCircleIntercepts(int32 *args) { + // Looks like this was just dummied out writeScummVar(108, 0); writeScummVar(109, 0); writeScummVar(110, 0); @@ -287,8 +288,10 @@ int LogicHEfootball::op_1024(int32 *args) { return 1; } -int LogicHEfootball::op_1028() { +int LogicHEfootball::largestFreeBlock() { // Backyard Football 2002 only + // The Windows version always sets the variable to this + // The Mac version actually checks for the largest free block writeScummVar(108, 100000000); return 1; } -- cgit v1.2.3 From f22661e4b931609609fb785b503c1e534bfe14d7 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 8 Jun 2012 19:45:31 -0400 Subject: SCUMM: Stub off other football2002 u32 opcodes --- engines/scumm/detection_tables.h | 2 +- engines/scumm/he/logic/football.cpp | 100 +++++++++++++++++++++++++++++++----- engines/scumm/he/logic_he.cpp | 3 ++ engines/scumm/he/logic_he.h | 1 + engines/scumm/scumm.h | 1 + 5 files changed, 94 insertions(+), 13 deletions(-) diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 452a6f0960..c84681e266 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -384,7 +384,7 @@ static const GameSettings gameVariantsTable[] = { // Added the use of bink videos {"Baseball2003", 0, 0, GID_BASEBALL2003, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, {"basketball", 0, 0, GID_BASKETBALL, 6, 100, MDT_NONE, GF_USE_KEY| GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, - {"football2002", 0, 0, GID_FOOTBALL, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, + {"football2002", 0, 0, GID_FOOTBALL2002, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, {"Soccer2004", 0, 0, GID_SOCCER2004, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, // U32 code required, for testing only diff --git a/engines/scumm/he/logic/football.cpp b/engines/scumm/he/logic/football.cpp index 87efd7cfb2..73f9161d95 100644 --- a/engines/scumm/he/logic/football.cpp +++ b/engines/scumm/he/logic/football.cpp @@ -35,17 +35,16 @@ public: LogicHEfootball(ScummEngine_v90he *vm) : LogicHE(vm) {} int versionID(); - int32 dispatch(int op, int numArgs, int32 *args); + virtual int32 dispatch(int op, int numArgs, int32 *args); -private: +protected: int lineEquation3D(int32 *args); - int translateWorldToScreen(int32 *args); + virtual int translateWorldToScreen(int32 *args); int fieldGoalScreenTranslation(int32 *args); - int translateScreenToWorld(int32 *args); + virtual int translateScreenToWorld(int32 *args); int nextPoint(int32 *args); int computePlayerBallIntercepts(int32 *args); int computeTwoCircleIntercepts(int32 *args); - int largestFreeBlock(); }; int LogicHEfootball::versionID() { @@ -84,11 +83,6 @@ int32 LogicHEfootball::dispatch(int op, int numArgs, int32 *args) { res = computeTwoCircleIntercepts(args); break; - case 1028: - // Backyard Football 2002 only - res = largestFreeBlock(); - break; - case 8221968: // Someone had a fun and used his birthday as opcode number res = getFromArray(args[0], args[1], args[2]); @@ -288,8 +282,86 @@ int LogicHEfootball::computeTwoCircleIntercepts(int32 *args) { return 1; } -int LogicHEfootball::largestFreeBlock() { - // Backyard Football 2002 only +class LogicHEfootball2002 : public LogicHEfootball { +public: + LogicHEfootball2002(ScummEngine_v90he *vm) : LogicHEfootball(vm) {} + + int32 dispatch(int op, int numArgs, int32 *args); + +private: + int translateWorldToScreen(int32 *args); + int translateScreenToWorld(int32 *args); + int getDayOfWeek(); + int initScreenTranslations(); + int getPlaybookFiles(int32 *args); + int largestFreeBlock(); +}; + +int32 LogicHEfootball2002::dispatch(int op, int numArgs, int32 *args) { + int32 res = 0; + + switch (op) { + case 1025: + res = getDayOfWeek(); + break; + + case 1026: + res = initScreenTranslations(); + break; + + case 1027: + res = getPlaybookFiles(args); + break; + + case 1028: + res = largestFreeBlock(); + break; + + case 1029: + // Clean-up off heap + // Dummied in the Windows U32 + res = 1; + break; + + case 1516: + // Start auto LAN game + break; + + default: + res = LogicHEfootball::dispatch(op, numArgs, args); + break; + } + + return res; +} + +int LogicHEfootball2002::translateWorldToScreen(int32 *args) { + // TODO: Implement modified 2002 version + return LogicHEfootball::translateWorldToScreen(args); +} + +int LogicHEfootball2002::translateScreenToWorld(int32 *args) { + // TODO: Implement modified 2002 version + return LogicHEfootball::translateScreenToWorld(args); +} + +int LogicHEfootball2002::getDayOfWeek() { + // TODO: Get day of week, store in var 108 + return 1; +} + +int LogicHEfootball2002::initScreenTranslations() { + // TODO: Set values used by translateWorldToScreen/translateScreenToWorld + return 1; +} + +int LogicHEfootball2002::getPlaybookFiles(int32 *args) { + // TODO: Get list of playbook files + error("STUB: LogicHEfootball2002::getPlaybookFiles()"); + return 1; +} + +int LogicHEfootball2002::largestFreeBlock() { // The Windows version always sets the variable to this // The Mac version actually checks for the largest free block writeScummVar(108, 100000000); @@ -300,4 +372,8 @@ LogicHE *makeLogicHEfootball(ScummEngine_v90he *vm) { return new LogicHEfootball(vm); } +LogicHE *makeLogicHEfootball2002(ScummEngine_v90he *vm) { + return new LogicHEfootball2002(vm); +} + } // End of namespace Scumm diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp index a76c393e13..0f9454ba28 100644 --- a/engines/scumm/he/logic_he.cpp +++ b/engines/scumm/he/logic_he.cpp @@ -87,6 +87,9 @@ LogicHE *LogicHE::makeLogicHE(ScummEngine_v90he *vm) { case GID_FOOTBALL: return makeLogicHEfootball(vm); + case GID_FOOTBALL2002: + return makeLogicHEfootball2002(vm); + case GID_SOCCER: case GID_SOCCERMLS: case GID_SOCCER2004: diff --git a/engines/scumm/he/logic_he.h b/engines/scumm/he/logic_he.h index 893dc81b87..93c0569a4f 100644 --- a/engines/scumm/he/logic_he.h +++ b/engines/scumm/he/logic_he.h @@ -61,6 +61,7 @@ protected: LogicHE *makeLogicHErace(ScummEngine_v90he *vm); LogicHE *makeLogicHEfunshop(ScummEngine_v90he *vm); LogicHE *makeLogicHEfootball(ScummEngine_v90he *vm); +LogicHE *makeLogicHEfootball2002(ScummEngine_v90he *vm); LogicHE *makeLogicHEsoccer(ScummEngine_v90he *vm); LogicHE *makeLogicHEbaseball2001(ScummEngine_v90he *vm); LogicHE *makeLogicHEbasketball(ScummEngine_v90he *vm); diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index 8c0070b5f5..c8cf096a19 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -241,6 +241,7 @@ enum ScummGameId { GID_PUTTRACE, GID_FUNSHOP, // Used for all three funshops GID_FOOTBALL, + GID_FOOTBALL2002, GID_SOCCER, GID_SOCCERMLS, GID_SOCCER2004, -- cgit v1.2.3 From e8ab1f5088fad1de4e8fa5d56bb1c518ee1008a8 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 8 Jun 2012 22:22:38 -0400 Subject: SCUMM: Implement listing playbook files in football2002 --- engines/scumm/he/intern_he.h | 8 +++++--- engines/scumm/he/logic/football.cpp | 28 ++++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h index cdc5faa084..fc5e4bcdf0 100644 --- a/engines/scumm/he/intern_he.h +++ b/engines/scumm/he/intern_he.h @@ -187,6 +187,8 @@ public: Wiz *_wiz; + virtual int setupStringArray(int size); + protected: virtual void setupOpcodes(); @@ -201,7 +203,6 @@ protected: virtual void clearDrawQueues(); int getStringCharWidth(byte chr); - virtual int setupStringArray(int size); void appendSubstring(int dst, int src, int len2, int len); void adjustRect(Common::Rect &rect); @@ -258,6 +259,9 @@ public: virtual void resetScumm(); + virtual byte *getStringAddress(ResId idx); + virtual int setupStringArray(int size); + protected: virtual void setupOpcodes(); @@ -265,7 +269,6 @@ protected: virtual void resetScummVars(); virtual void readArrayFromIndexFile(); - virtual byte *getStringAddress(ResId idx); virtual void readMAXS(int blockSize); virtual void redrawBGAreas(); @@ -280,7 +283,6 @@ protected: void copyArray(int array1, int a1_dim2start, int a1_dim2end, int a1_dim1start, int a1_dim1end, int array2, int a2_dim2start, int a2_dim2end, int a2_dim1start, int a2_dim1end); void copyArrayHelper(ArrayHeader *ah, int idx2, int idx1, int len1, byte **data, int *size, int *num); - virtual int setupStringArray(int size); int readFileToArray(int slot, int32 size); void writeFileFromArray(int slot, int32 resID); diff --git a/engines/scumm/he/logic/football.cpp b/engines/scumm/he/logic/football.cpp index 73f9161d95..f67e07c475 100644 --- a/engines/scumm/he/logic/football.cpp +++ b/engines/scumm/he/logic/football.cpp @@ -20,6 +20,8 @@ * */ +#include "common/savefile.h" + #include "scumm/he/intern_he.h" #include "scumm/he/logic_he.h" @@ -356,8 +358,30 @@ int LogicHEfootball2002::initScreenTranslations() { } int LogicHEfootball2002::getPlaybookFiles(int32 *args) { - // TODO: Get list of playbook files - error("STUB: LogicHEfootball2002::getPlaybookFiles()"); + // Get the pattern and then skip over the directory prefix ("*\" or "*:") + Common::String pattern = (const char *)_vm->getStringAddress(args[0] & ~0x33539000) + 2; + + // Prepare a buffer to hold the file names + char buffer[1000]; + buffer[0] = 0; + + // Get the list of file names that match the pattern and iterate over it + Common::StringArray fileList = _vm->getSaveFileManager()->listSavefiles(pattern); + + for (uint32 i = 0; i < fileList.size() && strlen(buffer) < 970; i++) { + // Isolate the base part of the filename and concatenate it to our buffer + Common::String fileName = Common::String(fileList[i].c_str(), fileList[i].size() - (pattern.size() - 1)); + strcat(buffer, fileName.c_str()); + strcat(buffer, ">"); // names separated by '>' + } + + // Now store the result in an array + int array = _vm->setupStringArray(strlen(buffer)); + strcpy((char *)_vm->getStringAddress(array), buffer); + + // And store the array index in variable 108 + writeScummVar(108, array); + return 1; } -- cgit v1.2.3 From 6559a74dac3a267198e41b187401fa03859782ee Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 9 Jun 2012 04:55:11 +0200 Subject: NEWS: Add Geisha to the supported games --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index ed98cdc83f..916262f5d6 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ For a more comprehensive changelog of the latest experimental code, see: - Added support for Blue Force. - Added support for Darby the Dragon. - Added support for Dreamweb. + - Added support for Geisha. - Added support for Gregory and the Hot Air Balloon. - Added support for Magic Tales: Baba Yaga and the Magic Geese. - Added support for Magic Tales: Imo and the King. -- cgit v1.2.3 From 8675f510012d0ebbd02e7f90adf6c7195a7f9e4b Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 8 Jun 2012 23:06:58 -0400 Subject: NEWS: Fix a typo --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 916262f5d6..7ce4f255dd 100644 --- a/NEWS +++ b/NEWS @@ -29,7 +29,7 @@ For a more comprehensive changelog of the latest experimental code, see: Engine tab when adding or editing a configuration for a game. In most cases, you will have to run each game once or readd them all in ScummVM's launcher in order to get the custom options tab. - - Improved predicitve dialog look. + - Improved predictive dialog look. - Various GUI improvements. SDL ports: -- cgit v1.2.3 From 3968f3194893d88d1a8d73eef535b801e5415765 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 9 Jun 2012 15:36:47 +1000 Subject: SCUMM: Add HE101 version, for debugInput opcode difference in some HE100 games. --- engines/scumm/detection_tables.h | 9 ++++++--- engines/scumm/he/script_v100he.cpp | 5 +++-- engines/scumm/he/sound_he.cpp | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index c84681e266..be1b90e356 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -382,14 +382,16 @@ static const GameSettings gameVariantsTable[] = { {"pjgames", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, // Added the use of bink videos - {"Baseball2003", 0, 0, GID_BASEBALL2003, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, - {"basketball", 0, 0, GID_BASKETBALL, 6, 100, MDT_NONE, GF_USE_KEY| GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, - {"football2002", 0, 0, GID_FOOTBALL2002, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, {"Soccer2004", 0, 0, GID_SOCCER2004, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, // U32 code required, for testing only {"moonbase", 0, 0, GID_MOONBASE, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, {"moonbase", "Demo", 0, GID_MOONBASE, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR | GF_DEMO, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, + + // HE100 games, which use older o72_debugInput code + {"Baseball2003", 0, 0, GID_BASEBALL2003, 6, 101, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, + {"basketball", 0, 0, GID_BASKETBALL, 6, 101, MDT_NONE, GF_USE_KEY| GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, + {"football2002", 0, 0, GID_FOOTBALL2002, 6, 101, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, #endif // The following are meant to be generic HE game variants and as such do @@ -407,6 +409,7 @@ static const GameSettings gameVariantsTable[] = { {"", "HE 98.5", 0, GID_HEGAME, 6, 98, MDT_NONE, GF_USE_KEY | GF_HE_985, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, {"", "HE 99", 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, {"", "HE 100", 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, + {"", "HE 101", 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY, UNK, GUIO3(GUIO_NOLAUNCHLOAD, GUIO_NOMIDI, GUIO_NOASPECT)}, #endif {NULL, NULL, 0, 0, 0, MDT_NONE, 0, 0, UNK, 0} }; diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index d2e01a6564..3e2053790e 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -2339,8 +2339,9 @@ void ScummEngine_v100he::o100_writeFile() { } void ScummEngine_v100he::o100_debugInput() { - // Backyard Basketball uses older code for this opcode - if (_game.id == GID_BASKETBALL) { + // Backyard Baseball 2003 / Basketball / Football 2002 + // use older o72_debugInput code + if (_game.heversion == 101) { ScummEngine_v72he::o72_debugInput(); return; } diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index 1007d2a7b0..f94b74ac45 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -65,7 +65,7 @@ void SoundHE::addSoundToQueue(int sound, int heOffset, int heChannel, int heFlag if (_vm->VAR_LAST_SOUND != 0xFF) _vm->VAR(_vm->VAR_LAST_SOUND) = sound; - if ((_vm->_game.heversion <= 99 && (heFlags & 16)) || (_vm->_game.heversion == 100 && (heFlags & 8))) { + if ((_vm->_game.heversion <= 99 && (heFlags & 16)) || (_vm->_game.heversion >= 100 && (heFlags & 8))) { playHESound(sound, heOffset, heChannel, heFlags); return; } else { -- cgit v1.2.3 From 66af2cf1d729e5944641ab203f3d36761fdff132 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 9 Jun 2012 12:12:44 +0300 Subject: SCI: Handle translucent text planes Fixes the incorrect flood fill in the Rada Drums screen in GK1 --- engines/sci/graphics/frameout.cpp | 23 ++++++++++++++--------- engines/sci/graphics/text32.cpp | 9 ++++++--- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 450581000b..a5bd8ba48e 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -53,6 +53,11 @@ namespace Sci { // TODO/FIXME: This is all guesswork +enum SciSpeciaPlanelPictureCodes { + kPlaneTranslucent = 0xfffe, // -2 + kPlanePlainColored = 0xffff // -1 +}; + GfxFrameout::GfxFrameout(SegManager *segMan, ResourceManager *resMan, GfxCoordAdjuster *coordAdjuster, GfxCache *cache, GfxScreen *screen, GfxPalette *palette, GfxPaint32 *paint32) : _segMan(segMan), _resMan(resMan), _cache(cache), _screen(screen), _palette(palette), _paint32(paint32) { @@ -137,7 +142,7 @@ void GfxFrameout::kernelAddPlane(reg_t object) { newPlane.lastPriority = 0xFFFF; // hidden newPlane.planeOffsetX = 0; newPlane.planeOffsetY = 0; - newPlane.pictureId = 0xFFFF; + newPlane.pictureId = kPlanePlainColored; newPlane.planePictureMirrored = false; newPlane.planeBack = 0; _planes.push_back(newPlane); @@ -155,7 +160,8 @@ void GfxFrameout::kernelUpdatePlane(reg_t object) { if (lastPictureId != it->pictureId) { // picture got changed, load new picture deletePlanePictures(object); - if ((it->pictureId != 0xFFFF) && (it->pictureId != 0xFFFE)) { + // Draw the plane's picture if it's not a translucent/plane colored frame + if ((it->pictureId != kPlanePlainColored) && (it->pictureId != kPlaneTranslucent)) { // SQ6 gives us a bad picture number for the control menu if (_resMan->testResource(ResourceId(kResourceTypePic, it->pictureId))) addPlanePicture(object, it->pictureId, 0); @@ -248,6 +254,9 @@ void GfxFrameout::kernelDeletePlane(reg_t object) { } void GfxFrameout::addPlanePicture(reg_t object, GuiResourceId pictureId, uint16 startX, uint16 startY) { + if (pictureId == kPlanePlainColored || pictureId == kPlaneTranslucent) // sanity check + return; + PlanePictureEntry newPicture; newPicture.object = object; newPicture.pictureId = pictureId; @@ -574,21 +583,17 @@ void GfxFrameout::kernelFrameout() { // There is a race condition lurking in SQ6, which causes the game to hang in the intro, when teleporting to Polysorbate LX. // Since I first wrote the patch, the race has stopped occurring for me though. // I'll leave this for investigation later, when someone can reproduce. - //if (it->pictureId == 0xffff) // FIXME: This is what SSCI does, and fixes the intro of LSL7, but breaks the dialogs in GK1 (adds black boxes) - if (it->planeBack) + //if (it->pictureId == kPlanePlainColored) // FIXME: This is what SSCI does, and fixes the intro of LSL7, but breaks the dialogs in GK1 (adds black boxes) + if (it->pictureId == kPlanePlainColored && it->planeBack) _paint32->fillRect(it->planeRect, it->planeBack); - GuiResourceId planeMainPictureId = it->pictureId; - _coordAdjuster->pictureSetDisplayArea(it->planeRect); - _palette->drewPicture(planeMainPictureId); + _palette->drewPicture(it->pictureId); FrameoutList itemList; createPlaneItemList(planeObject, itemList); -// warning("Plane %s", _segMan->getObjectName(planeObject)); - for (FrameoutList::iterator listIterator = itemList.begin(); listIterator != itemList.end(); listIterator++) { FrameoutEntry *itemEntry = *listIterator; diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp index 8ac9582535..7907809c91 100644 --- a/engines/sci/graphics/text32.cpp +++ b/engines/sci/graphics/text32.cpp @@ -205,7 +205,7 @@ void GfxText32::drawScrollTextBitmap(reg_t textObject, reg_t hunkId, uint16 x, u } void GfxText32::drawTextBitmapInternal(int16 x, int16 y, Common::Rect planeRect, reg_t textObject, reg_t hunkId) { - uint16 backColor = readSelectorValue(_segMan, textObject, SELECTOR(back)); + int16 backColor = (int16)readSelectorValue(_segMan, textObject, SELECTOR(back)); // Sanity check: Check if the hunk is set. If not, either the game scripts // didn't set it, or an old saved game has been loaded, where it wasn't set. if (hunkId.isNull()) @@ -227,7 +227,7 @@ void GfxText32::drawTextBitmapInternal(int16 x, int16 y, Common::Rect planeRect, byte *surface = memoryPtr + BITMAP_HEADER_SIZE; int curByte = 0; - uint16 skipColor = readSelectorValue(_segMan, textObject, SELECTOR(skip)); + int16 skipColor = (int16)readSelectorValue(_segMan, textObject, SELECTOR(skip)); uint16 textX = planeRect.left + x; uint16 textY = planeRect.top + y; // Get totalWidth, totalHeight @@ -240,10 +240,13 @@ void GfxText32::drawTextBitmapInternal(int16 x, int16 y, Common::Rect planeRect, textY = textY * _screen->getDisplayHeight() / _screen->getHeight(); } + bool translucent = (skipColor == -1 && backColor == -1); + for (int curY = 0; curY < height; curY++) { for (int curX = 0; curX < width; curX++) { byte pixel = surface[curByte++]; - if (pixel != skipColor && pixel != backColor) + if ((!translucent && pixel != skipColor && pixel != backColor) || + (translucent && pixel != 0xFF)) _screen->putFontPixel(textY, curX + textX, curY, pixel); } } -- cgit v1.2.3 From a693603e1ee1a58f2d4c72f726a9f92a3ddf1627 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 9 Jun 2012 11:58:26 +0100 Subject: TOON: Replace Pathfinding _tempPath static buffers with Common::Array. --- engines/toon/path.cpp | 31 ++++++++++++++++++------------- engines/toon/path.h | 16 ++++++++++------ 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp index b3f9b306be..b4fe412144 100644 --- a/engines/toon/path.cpp +++ b/engines/toon/path.cpp @@ -248,17 +248,19 @@ bool PathFinding::walkLine(int32 x, int32 y, int32 x2, int32 y2) { int32 cdx = (dx << 16) / t; int32 cdy = (dy << 16) / t; - _gridPathCount = 0; + _tempPath.clear(); + i32Point p; for (int32 i = t; i > 0; i--) { - _tempPathX[i] = bx >> 16; - _tempPathY[i] = by >> 16; - _gridPathCount++; + p.x = bx >> 16; + p.y = by >> 16; + _tempPath.insert_at(0, p); bx += cdx; by += cdy; } - _tempPathX[0] = x2; - _tempPathY[0] = y2; + p.x = x2; + p.y = y2; + _tempPath.insert_at(0, p); return true; } @@ -292,13 +294,13 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { debugC(1, kDebugPath, "findPath(%d, %d, %d, %d)", x, y, destx, desty); if (x == destx && y == desty) { - _gridPathCount = 0; + _tempPath.clear(); return true; } // ignore path finding if the character is outside the screen if (x < 0 || x > 1280 || y < 0 || y > 400 || destx < 0 || destx > 1280 || desty < 0 || desty > 400) { - _gridPathCount = 0; + _tempPath.clear(); return true; } @@ -357,7 +359,7 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { // let's see if we found a result ! if (!_gridTemp[destx + desty * _width]) { // didn't find anything - _gridPathCount = 0; + _tempPath.clear(); return false; } @@ -415,10 +417,13 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { numpath++; if ((bestX == x && bestY == y)) { - _gridPathCount = numpath; - - memcpy(_tempPathX, retPathX, sizeof(int32) * numpath); - memcpy(_tempPathY, retPathY, sizeof(int32) * numpath); + _tempPath.clear(); + i32Point p; + for (int32 i = 0; i < numpath; i++) { + p.x = retPathX[i]; + p.y = retPathY[i]; + _tempPath.push_back(p); + } retVal = true; break; diff --git a/engines/toon/path.h b/engines/toon/path.h index 26abb411cc..6a22096054 100644 --- a/engines/toon/path.h +++ b/engines/toon/path.h @@ -23,6 +23,8 @@ #ifndef TOON_PATH_H #define TOON_PATH_H +#include "common/array.h" + #include "toon/toon.h" namespace Toon { @@ -70,9 +72,9 @@ public: void addBlockingRect(int32 x1, int32 y1, int32 x2, int32 y2); void addBlockingEllipse(int32 x1, int32 y1, int32 w, int32 h); - int32 getPathNodeCount() const { return _gridPathCount; } - int32 getPathNodeX(int32 nodeId) const { return _tempPathX[ _gridPathCount - nodeId - 1]; } - int32 getPathNodeY(int32 nodeId) const { return _tempPathY[ _gridPathCount - nodeId - 1]; } + int32 getPathNodeCount() const { return _tempPath.size(); } + int32 getPathNodeX(int32 nodeId) const { return _tempPath[ _tempPath.size() - nodeId - 1].x; } + int32 getPathNodeY(int32 nodeId) const { return _tempPath[ _tempPath.size() - nodeId - 1].y; } private: static const uint8 kMaxBlockingRects = 16; @@ -85,9 +87,11 @@ private: int32 _width; int32 _height; - int32 _tempPathX[4096]; - int32 _tempPathY[4096]; - int32 _gridPathCount; + struct i32Point { + int32 x, y; + }; + + Common::Array _tempPath; int32 _blockingRects[kMaxBlockingRects][5]; uint8 _numBlockingRects; -- cgit v1.2.3 From fae9f4d5baf258ecb4f9e25fe1364e42442385e2 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 9 Jun 2012 12:33:30 +0100 Subject: TOON: Replace Pathfinding retPath static buffers with Common::Array. --- engines/toon/path.cpp | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp index b4fe412144..2b41995a98 100644 --- a/engines/toon/path.cpp +++ b/engines/toon/path.cpp @@ -366,20 +366,13 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { curX = destx; curY = desty; - int32 *retPathX = new int32[4096]; - int32 *retPathY = new int32[4096]; - if (!retPathX || !retPathY) { - delete retPathX; - delete retPathY; + Common::Array retPath; - error("[PathFinding::findPath] Cannot allocate pathfinding buffers"); - } - - int32 numpath = 0; + i32Point p; + p.x = curX; + p.y = curY; + retPath.push_back(p); - retPathX[numpath] = curX; - retPathY[numpath] = curY; - numpath++; int32 bestscore = sq[destx + desty * _width]; bool retVal = false; @@ -412,18 +405,15 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { if (bestX < 0 || bestY < 0) break; - retPathX[numpath] = bestX; - retPathY[numpath] = bestY; - numpath++; + i32Point pp; + pp.x = bestX; + pp.y = bestY; + retPath.push_back(pp); if ((bestX == x && bestY == y)) { _tempPath.clear(); - i32Point p; - for (int32 i = 0; i < numpath; i++) { - p.x = retPathX[i]; - p.y = retPathY[i]; - _tempPath.push_back(p); - } + for (uint32 i = 0; i < retPath.size(); i++) + _tempPath.push_back(retPath[i]); retVal = true; break; @@ -433,9 +423,6 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { curY = bestY; } - delete retPathX; - delete retPathY; - return retVal; } -- cgit v1.2.3 From dc11d223cdb156dd71300a8535cb5ab0940180c1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 9 Jun 2012 15:36:36 +0300 Subject: SCI: Initial implementation of AddLine, UpdateLine, DeleteLine --- engines/sci/engine/kernel.h | 3 ++ engines/sci/engine/kernel_tables.h | 6 ++-- engines/sci/engine/kgraphics32.cpp | 32 +++++++++++++++++++ engines/sci/graphics/frameout.cpp | 63 ++++++++++++++++++++++++++++++++++++++ engines/sci/graphics/frameout.h | 15 +++++++++ 5 files changed, 116 insertions(+), 3 deletions(-) diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 664c97f7b5..d9fdbefbc2 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -482,6 +482,9 @@ reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv); reg_t kSetFontRes(EngineState *s, int argc, reg_t *argv); reg_t kFont(EngineState *s, int argc, reg_t *argv); reg_t kBitmap(EngineState *s, int argc, reg_t *argv); +reg_t kAddLine(EngineState *s, int argc, reg_t *argv); +reg_t kUpdateLine(EngineState *s, int argc, reg_t *argv); +reg_t kDeleteLine(EngineState *s, int argc, reg_t *argv); // SCI3 Kernel functions reg_t kPlayDuck(EngineState *s, int argc, reg_t *argv); diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 254a479e65..9b765283ec 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -568,6 +568,9 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(SetFontRes), SIG_EVERYWHERE, "ii", NULL, NULL }, { MAP_CALL(Font), SIG_EVERYWHERE, "i(.*)", NULL, NULL }, { MAP_CALL(Bitmap), SIG_EVERYWHERE, "(.*)", NULL, NULL }, + { MAP_CALL(AddLine), SIG_EVERYWHERE, "oiiiiiiiii", NULL, NULL }, + { MAP_CALL(UpdateLine), SIG_EVERYWHERE, "roiiiiiiiii", NULL, NULL }, + { MAP_CALL(DeleteLine), SIG_EVERYWHERE, "ro", NULL, NULL }, // SCI2.1 Empty Functions @@ -613,9 +616,6 @@ static SciKernelMapEntry s_kernelMap[] = { // SCI2.1 unmapped functions - TODO! // MovePlaneItems - used by SQ6 to scroll through the inventory via the up/down buttons - // AddLine - used by Torin's Passage to highlight the chapter buttons - // DeleteLine - used by Torin's Passage to delete the highlight from the chapter buttons - // UpdateLine - used by LSL6 // SetPalStyleRange - 2 integer parameters, start and end. All styles from start-end // (inclusive) are set to 0 // MorphOn - used by SQ6, script 900, the datacorder reprogramming puzzle (from room 270) diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 71c4949d65..53cf8ada75 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -605,6 +605,38 @@ reg_t kEditText(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } +reg_t kAddLine(EngineState *s, int argc, reg_t *argv) { + reg_t plane = argv[0]; + Common::Point startPoint(argv[1].toUint16(), argv[2].toUint16()); + Common::Point endPoint(argv[3].toUint16(), argv[4].toUint16()); + // argv[5] is unknown (a number, usually 200) + byte color = (byte)argv[6].toUint16(); + byte priority = (byte)argv[7].toUint16(); + byte control = (byte)argv[8].toUint16(); + // argv[9] is unknown (usually a small number, 1 or 2). Thickness, perhaps? + return g_sci->_gfxFrameout->addPlaneLine(plane, startPoint, endPoint, color, priority, control); +} + +reg_t kUpdateLine(EngineState *s, int argc, reg_t *argv) { + reg_t hunkId = argv[0]; + reg_t plane = argv[1]; + Common::Point startPoint(argv[2].toUint16(), argv[3].toUint16()); + Common::Point endPoint(argv[4].toUint16(), argv[5].toUint16()); + // argv[6] is unknown (a number, usually 200) + byte color = (byte)argv[7].toUint16(); + byte priority = (byte)argv[8].toUint16(); + byte control = (byte)argv[9].toUint16(); + // argv[10] is unknown (usually a small number, 1 or 2). Thickness, perhaps? + g_sci->_gfxFrameout->updatePlaneLine(plane, hunkId, startPoint, endPoint, color, priority, control); + return s->r_acc; +} +reg_t kDeleteLine(EngineState *s, int argc, reg_t *argv) { + reg_t hunkId = argv[0]; + reg_t plane = argv[1]; + g_sci->_gfxFrameout->deletePlaneLine(plane, hunkId); + return s->r_acc; +} + #endif } // End of namespace Sci diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index a5bd8ba48e..db49497b6b 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -281,6 +281,56 @@ void GfxFrameout::deletePlanePictures(reg_t object) { } } +// Provides the same functionality as kGraph(DrawLine) +reg_t GfxFrameout::addPlaneLine(reg_t object, Common::Point startPoint, Common::Point endPoint, byte color, byte priority, byte control) { + for (PlaneList::iterator it = _planes.begin(); it != _planes.end(); ++it) { + if (it->object == object) { + PlaneLineEntry line; + line.hunkId = _segMan->allocateHunkEntry("PlaneLine()", 1); // we basically use this for a unique ID + line.startPoint = startPoint; + line.endPoint = endPoint; + line.color = color; + line.priority = priority; + line.control = control; + it->lines.push_back(line); + return line.hunkId; + } + } + + return NULL_REG; +} + +void GfxFrameout::updatePlaneLine(reg_t object, reg_t hunkId, Common::Point startPoint, Common::Point endPoint, byte color, byte priority, byte control) { + for (PlaneList::iterator it = _planes.begin(); it != _planes.end(); ++it) { + if (it->object == object) { + for (PlaneLineList::iterator it2 = it->lines.begin(); it2 != it->lines.end(); ++it2) { + if (it2->hunkId == hunkId) { + it2->startPoint = startPoint; + it2->endPoint = endPoint; + it2->color = color; + it2->priority = priority; + it2->control = control; + return; + } + } + } + } +} + +void GfxFrameout::deletePlaneLine(reg_t object, reg_t hunkId) { + for (PlaneList::iterator it = _planes.begin(); it != _planes.end(); ++it) { + if (it->object == object) { + for (PlaneLineList::iterator it2 = it->lines.begin(); it2 != it->lines.end(); ++it2) { + if (it2->hunkId == hunkId) { + _segMan->freeHunkEntry(hunkId); + it2 = it->lines.erase(it2); + return; + } + } + } + } +} + void GfxFrameout::kernelAddScreenItem(reg_t object) { // Ignore invalid items if (!_segMan->isObject(object)) @@ -567,6 +617,19 @@ void GfxFrameout::kernelFrameout() { for (PlaneList::iterator it = _planes.begin(); it != _planes.end(); it++) { reg_t planeObject = it->object; + + // Draw any plane lines, if they exist + // These are drawn on invisible planes as well. (e.g. "invisiblePlane" in LSL6 hires) + // FIXME: Lines aren't always drawn (e.g. when the narrator speaks in LSL6 hires). + // Perhaps something is painted over them? + for (PlaneLineList::iterator it2 = it->lines.begin(); it2 != it->lines.end(); ++it2) { + Common::Point startPoint = it2->startPoint; + Common::Point endPoint = it2->endPoint; + _coordAdjuster->kernelLocalToGlobal(startPoint.x, startPoint.y, it->object); + _coordAdjuster->kernelLocalToGlobal(endPoint.x, endPoint.y, it->object); + _screen->drawLine(startPoint, endPoint, it2->color, it2->priority, it2->control); + } + uint16 planeLastPriority = it->lastPriority; // Update priority here, sq6 sets it w/o UpdatePlane diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index 2d2ca6546c..0d80a68f1d 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -27,6 +27,17 @@ namespace Sci { class GfxPicture; +struct PlaneLineEntry { + reg_t hunkId; + Common::Point startPoint; + Common::Point endPoint; + byte color; + byte priority; + byte control; +}; + +typedef Common::List PlaneLineList; + struct PlaneEntry { reg_t object; uint16 priority; @@ -40,6 +51,7 @@ struct PlaneEntry { Common::Rect upscaledPlaneClipRect; bool planePictureMirrored; byte planeBack; + PlaneLineList lines; }; typedef Common::List PlaneList; @@ -112,6 +124,9 @@ public: void addPlanePicture(reg_t object, GuiResourceId pictureId, uint16 startX, uint16 startY = 0); void deletePlanePictures(reg_t object); + reg_t addPlaneLine(reg_t object, Common::Point startPoint, Common::Point endPoint, byte color, byte priority, byte control); + void updatePlaneLine(reg_t object, reg_t hunkId, Common::Point startPoint, Common::Point endPoint, byte color, byte priority, byte control); + void deletePlaneLine(reg_t object, reg_t hunkId); void clear(); // Scroll text functions -- cgit v1.2.3 From 2d0cedab1ff3984d1d269c0fb735f9179ca8e7d9 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 9 Jun 2012 13:43:42 +0100 Subject: TOON: Minor cleanups in Pathfinding class. No functional change. --- engines/toon/path.cpp | 41 ++++++++++++++++++++--------------------- engines/toon/path.h | 2 +- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp index 2b41995a98..dfdf095af9 100644 --- a/engines/toon/path.cpp +++ b/engines/toon/path.cpp @@ -150,7 +150,7 @@ PathFinding::PathFinding() { _width = 0; _height = 0; _heap = new PathFindingHeap(); - _gridTemp = NULL; + _sq = NULL; _numBlockingRects = 0; } @@ -158,7 +158,7 @@ PathFinding::~PathFinding(void) { if (_heap) _heap->unload(); delete _heap; - delete[] _gridTemp; + delete[] _sq; } void PathFinding::init(Picture *mask) { @@ -169,8 +169,8 @@ void PathFinding::init(Picture *mask) { _currentMask = mask; _heap->unload(); _heap->init(500); - delete[] _gridTemp; - _gridTemp = new int32[_width * _height]; + delete[] _sq; + _sq = new int32[_width * _height]; } bool PathFinding::isLikelyWalkable(int32 x, int32 y) { @@ -311,23 +311,22 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { } // no direct line, we use the standard A* algorithm - memset(_gridTemp , 0, _width * _height * sizeof(int32)); + memset(_sq , 0, _width * _height * sizeof(int32)); _heap->clear(); int32 curX = x; int32 curY = y; int32 curWeight = 0; - int32 *sq = _gridTemp; - sq[curX + curY *_width] = 1; + _sq[curX + curY *_width] = 1; _heap->push(curX, curY, abs(destx - x) + abs(desty - y)); - int wei = 0; + int32 wei = 0; while (_heap->getCount()) { wei = 0; int16 tempCurX, tempCurY; _heap->pop(&tempCurX, &tempCurY, &curWeight); curX = tempCurX, curY = tempCurY; // FIXME - Bodge to match heap->pop types - int curNode = curX + curY * _width; + int32 curNode = curX + curY * _width; int32 endX = MIN(curX + 1, _width - 1); int32 endY = MIN(curY + 1, _height - 1); @@ -336,17 +335,17 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { bool next = false; for (int32 px = startX; px <= endX && !next; px++) { - for (int py = startY; py <= endY && !next; py++) { + for (int32 py = startY; py <= endY && !next; py++) { if (px != curX || py != curY) { wei = ((abs(px - curX) + abs(py - curY))); int32 curPNode = px + py * _width; if (isWalkable(px, py)) { // walkable ? - int sum = sq[curNode] + wei * (1 + (isLikelyWalkable(px, py) ? 5 : 0)); - if (sq[curPNode] > sum || !sq[curPNode]) { - int newWeight = abs(destx - px) + abs(desty - py); - sq[curPNode] = sum; - _heap->push(px, py, sq[curPNode] + newWeight); + int32 sum = _sq[curNode] + wei * (1 + (isLikelyWalkable(px, py) ? 5 : 0)); + if (_sq[curPNode] > sum || !_sq[curPNode]) { + int32 newWeight = abs(destx - px) + abs(desty - py); + _sq[curPNode] = sum; + _heap->push(px, py, _sq[curPNode] + newWeight); if (!newWeight) next = true; // we found it ! } @@ -357,7 +356,7 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { } // let's see if we found a result ! - if (!_gridTemp[destx + desty * _width]) { + if (!_sq[destx + desty * _width]) { // didn't find anything _tempPath.clear(); return false; @@ -373,7 +372,7 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { p.y = curY; retPath.push_back(p); - int32 bestscore = sq[destx + desty * _width]; + int32 bestscore = _sq[destx + desty * _width]; bool retVal = false; while (true) { @@ -390,10 +389,10 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { if (px != curX || py != curY) { wei = abs(px - curX) + abs(py - curY); - int PNode = px + py * _width; - if (sq[PNode] && (isWalkable(px, py))) { - if (sq[PNode] < bestscore) { - bestscore = sq[PNode]; + int32 PNode = px + py * _width; + if (_sq[PNode] && (isWalkable(px, py))) { + if (_sq[PNode] < bestscore) { + bestscore = _sq[PNode]; bestX = px; bestY = py; } diff --git a/engines/toon/path.h b/engines/toon/path.h index 6a22096054..8e2c61d482 100644 --- a/engines/toon/path.h +++ b/engines/toon/path.h @@ -83,7 +83,7 @@ private: PathFindingHeap *_heap; - int32 *_gridTemp; + int32 *_sq; int32 _width; int32 _height; -- cgit v1.2.3 From ca3ea849d808b7f184cb05c42c317ed19edb73fc Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 9 Jun 2012 16:29:14 +0300 Subject: SCI: Update information on kGetSierraProfileInt Thanks to LePhilousophe for his feedback and observations on this --- engines/sci/engine/kmisc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index 9a113bc5f9..f243cf2ffe 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -391,6 +391,8 @@ reg_t kGetConfig(EngineState *s, int argc, reg_t *argv) { return argv[1]; } +// Likely modelled after the Windows 3.1 function GetPrivateProfileInt: +// http://msdn.microsoft.com/en-us/library/windows/desktop/ms724345%28v=vs.85%29.aspx reg_t kGetSierraProfileInt(EngineState *s, int argc, reg_t *argv) { Common::String category = s->_segMan->getString(argv[0]); // always "config" category.toLowercase(); @@ -402,8 +404,7 @@ reg_t kGetSierraProfileInt(EngineState *s, int argc, reg_t *argv) { 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... + // The third parameter is 425 (the default if the configuration key is missing) // We return the same fake value for videospeed as with kGetConfig return make_reg(0, 500); -- cgit v1.2.3 From 0e5ae35e345d6e7f38177e158dcc871cf7a034d3 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 9 Jun 2012 20:00:45 -0400 Subject: SCUMM: Create proper engine for heversion 101 Regression from 3968f3194893d88d1a8d73eef535b801e5415765 --- engines/scumm/detection.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 95de1a8706..ebf1a2675c 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -1135,6 +1135,7 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co case 200: *engine = new ScummEngine_vCUPhe(syst, res); break; + case 101: case 100: *engine = new ScummEngine_v100he(syst, res); break; -- cgit v1.2.3 From b2f5721e58e94b918c5b7032e315396f4fb6c51d Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 9 Jun 2012 20:20:19 -0400 Subject: COMMON: Add tm_wday to our TimeDate struct Did not adapt bada or ps2 backends as I'm not sure how they should be handled --- backends/platform/android/android.cpp | 1 + backends/platform/bada/system.cpp | 1 + backends/platform/dc/dcmain.cpp | 1 + backends/platform/ds/arm9/source/osystem_ds.cpp | 1 + backends/platform/iphone/osys_main.cpp | 1 + backends/platform/n64/osys_n64_base.cpp | 1 + backends/platform/ps2/ps2time.cpp | 1 + backends/platform/psp/osys_psp.cpp | 1 + backends/platform/sdl/sdl.cpp | 1 + backends/platform/wii/osystem.cpp | 1 + backends/platform/wince/wince-sdl.cpp | 1 + common/system.h | 1 + 12 files changed, 12 insertions(+) diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index 902599d50f..0b31ee717c 100644 --- a/backends/platform/android/android.cpp +++ b/backends/platform/android/android.cpp @@ -554,6 +554,7 @@ void OSystem_Android::getTimeAndDate(TimeDate &td) const { td.tm_mday = tm.tm_mday; td.tm_mon = tm.tm_mon; td.tm_year = tm.tm_year; + td.tm_wday = tm.tm_wday; } void OSystem_Android::addSysArchivesToSearchSet(Common::SearchSet &s, diff --git a/backends/platform/bada/system.cpp b/backends/platform/bada/system.cpp index d284688068..29ce954eba 100644 --- a/backends/platform/bada/system.cpp +++ b/backends/platform/bada/system.cpp @@ -399,6 +399,7 @@ void BadaSystem::getTimeAndDate(TimeDate &td) const { td.tm_mday = currentTime.GetDay(); td.tm_mon = currentTime.GetMonth(); td.tm_year = currentTime.GetYear(); + td.tm_wday = 0; // FIXME } } diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp index 3e3279f9c3..bec1fdae3a 100644 --- a/backends/platform/dc/dcmain.cpp +++ b/backends/platform/dc/dcmain.cpp @@ -213,6 +213,7 @@ void OSystem_Dreamcast::getTimeAndDate(TimeDate &td) const { td.tm_mday = t.tm_mday; td.tm_mon = t.tm_mon; td.tm_year = t.tm_year; + td.tm_wday = t.tm_wday; } Common::SeekableReadStream *OSystem_Dreamcast::createConfigReadStream() { diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index a6b85f207f..b72d959606 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -690,6 +690,7 @@ void OSystem_DS::getTimeAndDate(TimeDate &td) const { td.tm_mday = t.tm_mday; td.tm_mon = t.tm_mon; td.tm_year = t.tm_year; + td.tm_wday = t.tm_wday; } FilesystemFactory *OSystem_DS::getFilesystemFactory() { diff --git a/backends/platform/iphone/osys_main.cpp b/backends/platform/iphone/osys_main.cpp index 6935399c95..f9b2a81ce6 100644 --- a/backends/platform/iphone/osys_main.cpp +++ b/backends/platform/iphone/osys_main.cpp @@ -235,6 +235,7 @@ void OSystem_IPHONE::getTimeAndDate(TimeDate &td) const { td.tm_mday = t.tm_mday; td.tm_mon = t.tm_mon; td.tm_year = t.tm_year; + td.tm_wday = t.tm_wday; } Audio::Mixer *OSystem_IPHONE::getMixer() { diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp index f36f7399e1..d10682f22e 100644 --- a/backends/platform/n64/osys_n64_base.cpp +++ b/backends/platform/n64/osys_n64_base.cpp @@ -866,6 +866,7 @@ void OSystem_N64::getTimeAndDate(TimeDate &t) const { t.tm_mday = 1; t.tm_mon = 0; t.tm_year = 110; + t.tm_wday = 0; return; } diff --git a/backends/platform/ps2/ps2time.cpp b/backends/platform/ps2/ps2time.cpp index 2c3275b2b2..c8da0f4915 100644 --- a/backends/platform/ps2/ps2time.cpp +++ b/backends/platform/ps2/ps2time.cpp @@ -120,4 +120,5 @@ void OSystem_PS2::getTimeAndDate(TimeDate &t) const { t.tm_year = g_year + 100; t.tm_mday = g_day; t.tm_mon = g_month - 1; + t.tm_wday = 0; // FIXME } diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 958a3a22c6..510b4ea112 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -446,6 +446,7 @@ void OSystem_PSP::getTimeAndDate(TimeDate &td) const { td.tm_mday = t.tm_mday; td.tm_mon = t.tm_mon; td.tm_year = t.tm_year; + td.tm_wday = t.tm_wday; } Common::String OSystem_PSP::getDefaultConfigFileName() { diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 8dff5cec05..d54854352d 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -486,6 +486,7 @@ void OSystem_SDL::getTimeAndDate(TimeDate &td) const { td.tm_mday = t.tm_mday; td.tm_mon = t.tm_mon; td.tm_year = t.tm_year; + td.tm_wday = t.tm_wday; } Audio::Mixer *OSystem_SDL::getMixer() { diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp index 258a782cc4..681675529a 100644 --- a/backends/platform/wii/osystem.cpp +++ b/backends/platform/wii/osystem.cpp @@ -269,6 +269,7 @@ void OSystem_Wii::getTimeAndDate(TimeDate &td) const { td.tm_mday = t.tm_mday; td.tm_mon = t.tm_mon; td.tm_year = t.tm_year; + td.tm_wday = t.tm_wday; } void OSystem_Wii::showOptionsDialog() { diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index a57fcb9628..3897731db4 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -622,6 +622,7 @@ void OSystem_WINCE3::getTimeAndDate(TimeDate &t) const { t.tm_hour = systime.wHour; t.tm_min = systime.wMinute; t.tm_sec = systime.wSecond; + t.tm_wday = systime.wDayOfWeek; } Common::String OSystem_WINCE3::getSystemLanguage() const { diff --git a/common/system.h b/common/system.h index 976a3d2c4a..b57d2002f5 100644 --- a/common/system.h +++ b/common/system.h @@ -78,6 +78,7 @@ struct TimeDate { int tm_mday; ///< day of month (1 - 31) int tm_mon; ///< month of year (0 - 11) int tm_year; ///< year - 1900 + int tm_wday; ///< days since Sunday (0 - 6) }; namespace LogMessageType { -- cgit v1.2.3 From 6d4f2753cfa0da81a7ca17054d193fc8c10cb401 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 9 Jun 2012 20:22:14 -0400 Subject: SCUMM: Implement football2002's getDayOfWeek() u32 function --- engines/scumm/he/logic/football.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engines/scumm/he/logic/football.cpp b/engines/scumm/he/logic/football.cpp index f67e07c475..b405d634a4 100644 --- a/engines/scumm/he/logic/football.cpp +++ b/engines/scumm/he/logic/football.cpp @@ -348,7 +348,12 @@ int LogicHEfootball2002::translateScreenToWorld(int32 *args) { } int LogicHEfootball2002::getDayOfWeek() { - // TODO: Get day of week, store in var 108 + // Get day of week, store in var 108 + + TimeDate time; + _vm->_system->getTimeAndDate(time); + writeScummVar(108, time.tm_wday); + return 1; } -- cgit v1.2.3 From 15046a7529e3c755de1f00b4a2666786eb2bd4f8 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 Jun 2012 04:14:17 +0200 Subject: GUI: Get rid of SaveLoadChooser::setSaveMode. We already pass the title and process button name to the constructor of SaveLoadChooser and then do not offer any way of changing it, thus changing the edit mode of the chooser is kind of pointless and was never actually used. Instead we pass the mode on SaveLoadChooser construction now. --- engines/agi/saveload.cpp | 6 ++---- engines/cge/events.cpp | 6 ++---- engines/cruise/menu.cpp | 5 ++--- engines/dialogs.cpp | 6 ++---- engines/dreamweb/saveload.cpp | 6 ++---- engines/hugo/file.cpp | 6 ++---- engines/mohawk/myst.cpp | 3 +-- engines/mohawk/riven.cpp | 3 +-- engines/parallaction/saveload.cpp | 3 +-- engines/sci/engine/kfile.cpp | 6 ++---- engines/toon/toon.cpp | 6 ++---- engines/tsage/scenes.cpp | 6 ++---- gui/launcher.cpp | 2 +- gui/saveload.cpp | 8 ++------ gui/saveload.h | 3 +-- 15 files changed, 25 insertions(+), 50 deletions(-) diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index d58e55a6b9..cb7792af8e 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -802,8 +802,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) { int slot; if (isSave) { - dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save")); - dialog->setSaveMode(true); + dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true); slot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); desc = dialog->getResultString(); @@ -824,8 +823,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) { if (desc.size() > 28) desc = Common::String(desc.c_str(), 28); } else { - dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore")); - dialog->setSaveMode(false); + dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false); slot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); } diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp index 3c561c5659..e903584100 100644 --- a/engines/cge/events.cpp +++ b/engines/cge/events.cpp @@ -73,8 +73,7 @@ bool Keyboard::getKey(Common::Event &event) { const EnginePlugin *plugin = NULL; EngineMan.findGame(_vm->_gameDescription->gameid, &plugin); - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save"); - dialog->setSaveMode(true); + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save", true); int16 savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); Common::String savegameDescription = dialog->getResultString(); delete dialog; @@ -88,8 +87,7 @@ bool Keyboard::getKey(Common::Event &event) { const EnginePlugin *plugin = NULL; EngineMan.findGame(_vm->_gameDescription->gameid, &plugin); - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore"); - dialog->setSaveMode(false); + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore", false); int16 savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); delete dialog; diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp index e763e2b8a1..988355e777 100644 --- a/engines/cruise/menu.cpp +++ b/engines/cruise/menu.cpp @@ -211,11 +211,10 @@ static void handleSaveLoad(bool saveFlag) { EngineMan.findGame(_vm->getGameId(), &plugin); GUI::SaveLoadChooser *dialog; if (saveFlag) - dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save")); + dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true); else - dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load")); + dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false); - dialog->setSaveMode(saveFlag); int slot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); if (slot >= 0) { diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp index 1b54c7e26a..3fa01ddcbf 100644 --- a/engines/dialogs.cpp +++ b/engines/dialogs.cpp @@ -111,10 +111,8 @@ MainMenuDialog::MainMenuDialog(Engine *engine) _aboutDialog = new GUI::AboutDialog(); _optionsDialog = new ConfigDialog(_engine->hasFeature(Engine::kSupportsSubtitleOptions)); - _loadDialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load")); - _loadDialog->setSaveMode(false); - _saveDialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save")); - _saveDialog->setSaveMode(true); + _loadDialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false); + _saveDialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true); } MainMenuDialog::~MainMenuDialog() { diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp index c8fb537fec..e659c03e13 100644 --- a/engines/dreamweb/saveload.cpp +++ b/engines/dreamweb/saveload.cpp @@ -161,8 +161,7 @@ void DreamWebEngine::doLoad(int savegameId) { const EnginePlugin *plugin = NULL; Common::String gameId = ConfMan.get("gameid"); EngineMan.findGame(gameId, &plugin); - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore")); - dialog->setSaveMode(false); + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false); savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); delete dialog; } @@ -248,8 +247,7 @@ void DreamWebEngine::saveGame() { const EnginePlugin *plugin = NULL; Common::String gameId = ConfMan.get("gameid"); EngineMan.findGame(gameId, &plugin); - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save")); - dialog->setSaveMode(true); + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true); int savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); Common::String game_description = dialog->getResultString(); if (game_description.empty()) diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp index 2217cef92a..3c94b2ee3d 100644 --- a/engines/hugo/file.cpp +++ b/engines/hugo/file.cpp @@ -336,8 +336,7 @@ bool FileManager::saveGame(const int16 slot, const Common::String &descrip) { EngineMan.findGame(_vm->getGameId(), &plugin); if (slot == -1) { - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save"); - dialog->setSaveMode(true); + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save", true); savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); savegameDescription = dialog->getResultString(); delete dialog; @@ -441,8 +440,7 @@ bool FileManager::restoreGame(const int16 slot) { EngineMan.findGame(_vm->getGameId(), &plugin); if (slot == -1) { - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore"); - dialog->setSaveMode(false); + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore", false); savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); delete dialog; } else { diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp index c22b30ad4d..0efd412bd0 100644 --- a/engines/mohawk/myst.cpp +++ b/engines/mohawk/myst.cpp @@ -252,8 +252,7 @@ Common::Error MohawkEngine_Myst::run() { _gfx = new MystGraphics(this); _console = new MystConsole(this); _gameState = new MystGameState(this, _saveFileMan); - _loadDialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load")); - _loadDialog->setSaveMode(false); + _loadDialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false); _optionsDialog = new MystOptionsDialog(this); _cursor = new MystCursorManager(this); _rnd = new Common::RandomSource("myst"); diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp index 07b1b59929..b7866a3cb7 100644 --- a/engines/mohawk/riven.cpp +++ b/engines/mohawk/riven.cpp @@ -713,8 +713,7 @@ void MohawkEngine_Riven::delayAndUpdate(uint32 ms) { } void MohawkEngine_Riven::runLoadDialog() { - GUI::SaveLoadChooser slc(_("Load game:"), _("Load")); - slc.setSaveMode(false); + GUI::SaveLoadChooser slc(_("Load game:"), _("Load"), false); Common::String gameId = ConfMan.get("gameid"); diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp index 3ab25f203f..3bd736b915 100644 --- a/engines/parallaction/saveload.cpp +++ b/engines/parallaction/saveload.cpp @@ -180,8 +180,7 @@ void SaveLoad_ns::doSaveGame(uint16 slot, const char* name) { } int SaveLoad::selectSaveFile(Common::String &selectedName, bool saveMode, const Common::String &caption, const Common::String &button) { - GUI::SaveLoadChooser slc(caption, button); - slc.setSaveMode(saveMode); + GUI::SaveLoadChooser slc(caption, button, saveMode); selectedName.clear(); diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 8d1b078697..6c40be87e2 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -564,8 +564,7 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) { g_sci->_soundCmd->pauseAll(true); // pause music const EnginePlugin *plugin = NULL; EngineMan.findGame(g_sci->getGameIdStr(), &plugin); - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save")); - dialog->setSaveMode(true); + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true); savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); game_description = dialog->getResultString(); if (game_description.empty()) { @@ -671,8 +670,7 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) { g_sci->_soundCmd->pauseAll(true); // pause music const EnginePlugin *plugin = NULL; EngineMan.findGame(g_sci->getGameIdStr(), &plugin); - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore")); - dialog->setSaveMode(false); + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false); savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); delete dialog; if (savegameId < 0) { diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 657e18635f..9da06ce5be 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -2961,8 +2961,7 @@ bool ToonEngine::saveGame(int32 slot, const Common::String &saveGameDesc) { EngineMan.findGame(_gameDescription->gameid, &plugin); if (slot == -1) { - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save"); - dialog->setSaveMode(true); + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save", true); savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); savegameDescription = dialog->getResultString(); delete dialog; @@ -3057,8 +3056,7 @@ bool ToonEngine::loadGame(int32 slot) { EngineMan.findGame(_gameDescription->gameid, &plugin); if (slot == -1) { - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore"); - dialog->setSaveMode(false); + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore", false); savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); delete dialog; } else { diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp index 0756d71d4c..8fe7b8c458 100644 --- a/engines/tsage/scenes.cpp +++ b/engines/tsage/scenes.cpp @@ -573,11 +573,9 @@ void Game::handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName EngineMan.findGame(g_vm->getGameId(), &plugin); GUI::SaveLoadChooser *dialog; if (saveFlag) - dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save")); + dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), saveFlag); else - dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load")); - - dialog->setSaveMode(saveFlag); + dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), saveFlag); saveSlot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); saveName = dialog->getResultString(); diff --git a/gui/launcher.cpp b/gui/launcher.cpp index c8ed3126c4..26fafa5279 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -677,7 +677,7 @@ LauncherDialog::LauncherDialog() _browser = new BrowserDialog(_("Select directory with game data"), true); // Create Load dialog - _loadDialog = new SaveLoadChooser(_("Load game:"), _("Load")); + _loadDialog = new SaveLoadChooser(_("Load game:"), _("Load"), false); } void LauncherDialog::selectTarget(const String &target) { diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 3dc9961906..c7da94357f 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -40,7 +40,7 @@ enum { }; -SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel) +SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode) : Dialog("SaveLoadChooser"), _delSupport(0), _list(0), _chooseButton(0), _deleteButton(0), _gfxWidget(0) { _delSupport = _metaInfoSupport = _thumbnailSupport = _saveDateSupport = _playTimeSupport = false; @@ -51,7 +51,7 @@ SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel) // Add choice list _list = new GUI::ListWidget(this, "SaveLoadChooser.List"); _list->setNumberingMode(GUI::kListNumberingZero); - setSaveMode(false); + _list->setEditable(saveMode); _gfxWidget = new GUI::GraphicsWidget(this, 0, 0, 10, 10); @@ -117,10 +117,6 @@ const Common::String &SaveLoadChooser::getResultString() const { return (selItem >= 0) ? _list->getSelectedString() : _resultString; } -void SaveLoadChooser::setSaveMode(bool saveMode) { - _list->setEditable(saveMode); -} - void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { int selItem = _list->getSelected(); diff --git a/gui/saveload.h b/gui/saveload.h index adaf311fd2..e6fea0fb52 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -62,7 +62,7 @@ protected: void updateSaveList(); void updateSelection(bool redraw); public: - SaveLoadChooser(const String &title, const String &buttonLabel); + SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode); ~SaveLoadChooser(); virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); @@ -71,7 +71,6 @@ public: void open(); const Common::String &getResultString() const; - void setSaveMode(bool saveMode); virtual void reflowLayout(); -- cgit v1.2.3 From 5c8b7af4958edb4d53d2ac5ea575124a318b5cca Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 Jun 2012 04:16:52 +0200 Subject: MOHAWK: Do not call close on SaveLoadChooser. This is actually always called when a dialog closes, thus manual closing is not required. It furthermore is actually *bad* to call this from outside the dialog's code, since it will remove the top dialog from the dialog stack and thus mess up the GUI in case multiple dialogs are opened. --- engines/mohawk/riven.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp index b7866a3cb7..d66e46f4a8 100644 --- a/engines/mohawk/riven.cpp +++ b/engines/mohawk/riven.cpp @@ -723,8 +723,6 @@ void MohawkEngine_Riven::runLoadDialog() { int slot = slc.runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); if (slot >= 0) loadGameState(slot); - - slc.close(); } Common::Error MohawkEngine_Riven::loadGameState(int slot) { -- cgit v1.2.3 From 9b05f4e1039ade7f2d0b774c18a6767113f2c848 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 Jun 2012 04:17:46 +0200 Subject: PARALLACTION: Do not call close on a SaveLoadChooser. --- engines/parallaction/saveload.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp index 3bd736b915..85923363c7 100644 --- a/engines/parallaction/saveload.cpp +++ b/engines/parallaction/saveload.cpp @@ -192,7 +192,6 @@ int SaveLoad::selectSaveFile(Common::String &selectedName, bool saveMode, const int idx = slc.runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); if (idx >= 0) { selectedName = slc.getResultString(); - slc.close(); } return idx; -- cgit v1.2.3 From 7c5cf1b400808865a5f601f70d624ad6704a0c8c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 Jun 2012 04:49:42 +0200 Subject: GUI: Add helper to SaveLoadChooser, which uses the currently active target. This reduces the code duplication in all client code, which formerly duplicated the querying of the plugin, game id etc. and now simply calls the newly added method runModalWithCurrentTarget() on a SaveLoadChooser object. --- engines/agi/saveload.cpp | 6 ++---- engines/cge/events.cpp | 10 ++-------- engines/cruise/menu.cpp | 4 +--- engines/dialogs.cpp | 14 ++------------ engines/dreamweb/saveload.cpp | 10 ++-------- engines/hugo/file.cpp | 8 ++------ engines/mohawk/riven.cpp | 7 +------ engines/parallaction/saveload.cpp | 7 +------ engines/sci/engine/kfile.cpp | 8 ++------ engines/toon/toon.cpp | 8 ++------ engines/tsage/scenes.cpp | 4 +--- gui/saveload.cpp | 9 +++++++++ gui/saveload.h | 7 +++++++ 13 files changed, 34 insertions(+), 68 deletions(-) diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index cb7792af8e..25fa7829ef 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -795,8 +795,6 @@ int AgiEngine::selectSlot() { } int AgiEngine::scummVMSaveLoadDialog(bool isSave) { - const EnginePlugin *plugin = NULL; - EngineMan.findGame(ConfMan.get("gameid"), &plugin); GUI::SaveLoadChooser *dialog; Common::String desc; int slot; @@ -804,7 +802,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) { if (isSave) { dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true); - slot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + slot = dialog->runModalWithCurrentTarget(); desc = dialog->getResultString(); if (desc.empty()) { @@ -824,7 +822,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) { desc = Common::String(desc.c_str(), 28); } else { dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false); - slot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + slot = dialog->runModalWithCurrentTarget(); } delete dialog; diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp index e903584100..095aac2412 100644 --- a/engines/cge/events.cpp +++ b/engines/cge/events.cpp @@ -70,11 +70,8 @@ bool Keyboard::getKey(Common::Event &event) { return false; case Common::KEYCODE_F5: if (_vm->canSaveGameStateCurrently()) { - const EnginePlugin *plugin = NULL; - EngineMan.findGame(_vm->_gameDescription->gameid, &plugin); - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save", true); - int16 savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + int16 savegameId = dialog->runModalWithCurrentTarget(); Common::String savegameDescription = dialog->getResultString(); delete dialog; @@ -84,11 +81,8 @@ bool Keyboard::getKey(Common::Event &event) { return false; case Common::KEYCODE_F7: if (_vm->canLoadGameStateCurrently()) { - const EnginePlugin *plugin = NULL; - EngineMan.findGame(_vm->_gameDescription->gameid, &plugin); - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore", false); - int16 savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + int16 savegameId = dialog->runModalWithCurrentTarget(); delete dialog; if (savegameId != -1) diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp index 988355e777..512259f7d7 100644 --- a/engines/cruise/menu.cpp +++ b/engines/cruise/menu.cpp @@ -207,15 +207,13 @@ int processMenu(menuStruct *pMenu) { } static void handleSaveLoad(bool saveFlag) { - const EnginePlugin *plugin = 0; - EngineMan.findGame(_vm->getGameId(), &plugin); GUI::SaveLoadChooser *dialog; if (saveFlag) dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true); else dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false); - int slot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + int slot = dialog->runModalWithCurrentTarget(); if (slot >= 0) { if (!saveFlag) diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp index 3fa01ddcbf..9245d9fe62 100644 --- a/engines/dialogs.cpp +++ b/engines/dialogs.cpp @@ -214,12 +214,7 @@ void MainMenuDialog::reflowLayout() { } void MainMenuDialog::save() { - const Common::String gameId = ConfMan.get("gameid"); - - const EnginePlugin *plugin = 0; - EngineMan.findGame(gameId, &plugin); - - int slot = _saveDialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + int slot = _saveDialog->runModalWithCurrentTarget(); if (slot >= 0) { Common::String result(_saveDialog->getResultString()); @@ -250,12 +245,7 @@ void MainMenuDialog::save() { } void MainMenuDialog::load() { - const Common::String gameId = ConfMan.get("gameid"); - - const EnginePlugin *plugin = 0; - EngineMan.findGame(gameId, &plugin); - - int slot = _loadDialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + int slot = _loadDialog->runModalWithCurrentTarget(); _engine->setGameToLoadSlot(slot); diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp index e659c03e13..ea9cdc0249 100644 --- a/engines/dreamweb/saveload.cpp +++ b/engines/dreamweb/saveload.cpp @@ -158,11 +158,8 @@ void DreamWebEngine::doLoad(int savegameId) { if (savegameId == -1) { // Open dialog to get savegameId - const EnginePlugin *plugin = NULL; - Common::String gameId = ConfMan.get("gameid"); - EngineMan.findGame(gameId, &plugin); GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false); - savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + savegameId = dialog->runModalWithCurrentTarget(); delete dialog; } @@ -244,11 +241,8 @@ void DreamWebEngine::saveGame() { } return; } else { - const EnginePlugin *plugin = NULL; - Common::String gameId = ConfMan.get("gameid"); - EngineMan.findGame(gameId, &plugin); GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true); - int savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + int savegameId = dialog->runModalWithCurrentTarget(); Common::String game_description = dialog->getResultString(); if (game_description.empty()) game_description = "Untitled"; diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp index 3c94b2ee3d..f94f3b0443 100644 --- a/engines/hugo/file.cpp +++ b/engines/hugo/file.cpp @@ -330,14 +330,12 @@ sound_pt FileManager::getSound(const int16 sound, uint16 *size) { bool FileManager::saveGame(const int16 slot, const Common::String &descrip) { debugC(1, kDebugFile, "saveGame(%d, %s)", slot, descrip.c_str()); - const EnginePlugin *plugin = NULL; int16 savegameId; Common::String savegameDescription; - EngineMan.findGame(_vm->getGameId(), &plugin); if (slot == -1) { GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save", true); - savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + savegameId = dialog->runModalWithCurrentTarget(); savegameDescription = dialog->getResultString(); delete dialog; } else { @@ -435,13 +433,11 @@ bool FileManager::saveGame(const int16 slot, const Common::String &descrip) { bool FileManager::restoreGame(const int16 slot) { debugC(1, kDebugFile, "restoreGame(%d)", slot); - const EnginePlugin *plugin = NULL; int16 savegameId; - EngineMan.findGame(_vm->getGameId(), &plugin); if (slot == -1) { GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore", false); - savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + savegameId = dialog->runModalWithCurrentTarget(); delete dialog; } else { savegameId = slot; diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp index d66e46f4a8..e54d6fefa2 100644 --- a/engines/mohawk/riven.cpp +++ b/engines/mohawk/riven.cpp @@ -715,12 +715,7 @@ void MohawkEngine_Riven::delayAndUpdate(uint32 ms) { void MohawkEngine_Riven::runLoadDialog() { GUI::SaveLoadChooser slc(_("Load game:"), _("Load"), false); - Common::String gameId = ConfMan.get("gameid"); - - const EnginePlugin *plugin = 0; - EngineMan.findGame(gameId, &plugin); - - int slot = slc.runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + int slot = slc.runModalWithCurrentTarget(); if (slot >= 0) loadGameState(slot); } diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp index 85923363c7..8de2d89b18 100644 --- a/engines/parallaction/saveload.cpp +++ b/engines/parallaction/saveload.cpp @@ -184,12 +184,7 @@ int SaveLoad::selectSaveFile(Common::String &selectedName, bool saveMode, const selectedName.clear(); - Common::String gameId = ConfMan.get("gameid"); - - const EnginePlugin *plugin = 0; - EngineMan.findGame(gameId, &plugin); - - int idx = slc.runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + int idx = slc.runModalWithCurrentTarget(); if (idx >= 0) { selectedName = slc.getResultString(); } diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 6c40be87e2..4af71f41af 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -562,10 +562,8 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) { // we are supposed to show a dialog for the user and let him choose where to save g_sci->_soundCmd->pauseAll(true); // pause music - const EnginePlugin *plugin = NULL; - EngineMan.findGame(g_sci->getGameIdStr(), &plugin); GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true); - savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + savegameId = dialog->runModalWithCurrentTarget(); game_description = dialog->getResultString(); if (game_description.empty()) { // create our own description for the saved game, the user didnt enter it @@ -668,10 +666,8 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) { if (savegameId == -1) { // we are supposed to show a dialog for the user and let him choose a saved game g_sci->_soundCmd->pauseAll(true); // pause music - const EnginePlugin *plugin = NULL; - EngineMan.findGame(g_sci->getGameIdStr(), &plugin); GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false); - savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + savegameId = dialog->runModalWithCurrentTarget(); delete dialog; if (savegameId < 0) { g_sci->_soundCmd->pauseAll(false); // unpause music diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 9da06ce5be..be298e1236 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -2955,14 +2955,12 @@ Common::String ToonEngine::getSavegameName(int nr) { } bool ToonEngine::saveGame(int32 slot, const Common::String &saveGameDesc) { - const EnginePlugin *plugin = NULL; int16 savegameId; Common::String savegameDescription; - EngineMan.findGame(_gameDescription->gameid, &plugin); if (slot == -1) { GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Save game:", "Save", true); - savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + savegameId = dialog->runModalWithCurrentTarget(); savegameDescription = dialog->getResultString(); delete dialog; } else { @@ -3051,13 +3049,11 @@ bool ToonEngine::saveGame(int32 slot, const Common::String &saveGameDesc) { } bool ToonEngine::loadGame(int32 slot) { - const EnginePlugin *plugin = NULL; int16 savegameId; - EngineMan.findGame(_gameDescription->gameid, &plugin); if (slot == -1) { GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser("Restore game:", "Restore", false); - savegameId = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + savegameId = dialog->runModalWithCurrentTarget(); delete dialog; } else { savegameId = slot; diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp index 8fe7b8c458..774a5277dc 100644 --- a/engines/tsage/scenes.cpp +++ b/engines/tsage/scenes.cpp @@ -569,15 +569,13 @@ void Game::quitGame() { } void Game::handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName) { - const EnginePlugin *plugin = 0; - EngineMan.findGame(g_vm->getGameId(), &plugin); GUI::SaveLoadChooser *dialog; if (saveFlag) dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), saveFlag); else dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), saveFlag); - saveSlot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); + saveSlot = dialog->runModalWithCurrentTarget(); saveName = dialog->getResultString(); delete dialog; diff --git a/gui/saveload.cpp b/gui/saveload.cpp index c7da94357f..366efa7a90 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -76,6 +76,15 @@ SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, SaveLoadChooser::~SaveLoadChooser() { } +int SaveLoadChooser::runModalWithCurrentTarget() { + const Common::String gameId = ConfMan.get("gameid"); + + const EnginePlugin *plugin = 0; + EngineMan.findGame(gameId, &plugin); + + return runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); +} + int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target) { if (_gfxWidget) _gfxWidget->setGfx(0); diff --git a/gui/saveload.h b/gui/saveload.h index e6fea0fb52..dc0f0429c7 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -67,6 +67,13 @@ public: virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); void setList(const StringArray& list); + /** + * Runs the save/load chooser with the currently active config manager + * domain as target. + * + * @return The selcted save slot. -1 in case none is selected. + */ + int runModalWithCurrentTarget(); int runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target); void open(); -- cgit v1.2.3 From 49fafb48a7f089c97ed3baa9aefe65ec56dce682 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 Jun 2012 05:04:59 +0200 Subject: GUI: Refactor default savegame description creation. Formerly the GMM, AGI and SCI duplicated the logic for USE_SAVEGAME_TIMESTAMP. Now I added a method to SaveLoadChooser instead, which takes care of this. This might not be the best placement of such a functionality, thus I added a TODO which talks about moving it to a better place. --- engines/agi/saveload.cpp | 10 +--------- engines/dialogs.cpp | 10 +--------- engines/sci/engine/kfile.cpp | 10 +--------- gui/saveload.cpp | 13 +++++++++++++ gui/saveload.h | 15 +++++++++++++++ 5 files changed, 31 insertions(+), 27 deletions(-) diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index 25fa7829ef..3e63da756d 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -807,15 +807,7 @@ int AgiEngine::scummVMSaveLoadDialog(bool isSave) { if (desc.empty()) { // create our own description for the saved game, the user didnt enter it -#if defined(USE_SAVEGAME_TIMESTAMP) - TimeDate curTime; - g_system->getTimeAndDate(curTime); - curTime.tm_year += 1900; // fixup year - curTime.tm_mon++; // fixup month - desc = Common::String::format("%04d.%02d.%02d / %02d:%02d:%02d", curTime.tm_year, curTime.tm_mon, curTime.tm_mday, curTime.tm_hour, curTime.tm_min, curTime.tm_sec); -#else - desc = Common::String::format("Save %d", slot + 1); -#endif + desc = dialog->createDefaultSaveDescription(slot); } if (desc.size() > 28) diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp index 9245d9fe62..cf3dfaa44b 100644 --- a/engines/dialogs.cpp +++ b/engines/dialogs.cpp @@ -220,15 +220,7 @@ void MainMenuDialog::save() { Common::String result(_saveDialog->getResultString()); if (result.empty()) { // If the user was lazy and entered no save name, come up with a default name. - #if defined(USE_SAVEGAME_TIMESTAMP) - TimeDate curTime; - g_system->getTimeAndDate(curTime); - curTime.tm_year += 1900; // fixup year - curTime.tm_mon++; // fixup month - result = Common::String::format("%04d.%02d.%02d / %02d:%02d:%02d", curTime.tm_year, curTime.tm_mon, curTime.tm_mday, curTime.tm_hour, curTime.tm_min, curTime.tm_sec); - #else - result = Common::String::format("Save %d", slot + 1); - #endif + result = _saveDialog->createDefaultSaveDescription(slot); } Common::Error status = _engine->saveGameState(slot, result); diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 4af71f41af..42f8b8832c 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -567,15 +567,7 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) { game_description = dialog->getResultString(); if (game_description.empty()) { // create our own description for the saved game, the user didnt enter it - #if defined(USE_SAVEGAME_TIMESTAMP) - TimeDate curTime; - g_system->getTimeAndDate(curTime); - curTime.tm_year += 1900; // fixup year - curTime.tm_mon++; // fixup month - game_description = Common::String::format("%04d.%02d.%02d / %02d:%02d:%02d", curTime.tm_year, curTime.tm_mon, curTime.tm_mday, curTime.tm_hour, curTime.tm_min, curTime.tm_sec); - #else - game_description = Common::String::format("Save %d", savegameId + 1); - #endif + game_description = dialog->createDefaultSaveDescription(savegameId); } delete dialog; g_sci->_soundCmd->pauseAll(false); // unpause music ( we can't have it paused during save) diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 366efa7a90..67d871e133 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -21,6 +21,7 @@ #include "common/config-manager.h" #include "common/translation.h" +#include "common/system.h" #include "gui/widgets/list.h" #include "gui/message.h" @@ -126,6 +127,18 @@ const Common::String &SaveLoadChooser::getResultString() const { return (selItem >= 0) ? _list->getSelectedString() : _resultString; } +Common::String SaveLoadChooser::createDefaultSaveDescription(const int slot) const { +#if defined(USE_SAVEGAME_TIMESTAMP) + TimeDate curTime; + g_system->getTimeAndDate(curTime); + curTime.tm_year += 1900; // fixup year + curTime.tm_mon++; // fixup month + return Common::String::format("%04d.%02d.%02d / %02d:%02d:%02d", curTime.tm_year, curTime.tm_mon, curTime.tm_mday, curTime.tm_hour, curTime.tm_min, curTime.tm_sec); +#else + return Common::String::format("Save %d", slot + 1); +#endif +} + void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { int selItem = _list->getSelected(); diff --git a/gui/saveload.h b/gui/saveload.h index dc0f0429c7..e81b10d214 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -79,6 +79,21 @@ public: const Common::String &getResultString() const; + /** + * Creates a default save description for the specified slot. Depending + * on the ScummVM configuration this might be a simple "Slot #" description + * or the current date and time. + * + * TODO: This might not be the best place to put this, since engines not + * using this class might want to mimic the same behavior. Check whether + * moving this to a better place makes sense and find what this place would + * be. + * + * @param slot The slot number (must be >= 0). + * @return The slot description. + */ + Common::String createDefaultSaveDescription(const int slot) const; + virtual void reflowLayout(); virtual void close(); -- cgit v1.2.3 From 5458127d9706d2c124d907edc5be06e58384d562 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 10 Jun 2012 16:00:26 +0100 Subject: TOON: Migrate Pathfinding API x,y coordinates to int16. This harmonises the usage with Common::Point. --- engines/toon/character.cpp | 4 ++- engines/toon/path.cpp | 66 ++++++++++++++++++++++------------------------ engines/toon/path.h | 26 +++++++++--------- engines/toon/toon.cpp | 2 +- 4 files changed, 49 insertions(+), 49 deletions(-) diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp index 0e5189957b..3ac454983d 100644 --- a/engines/toon/character.cpp +++ b/engines/toon/character.cpp @@ -173,7 +173,9 @@ bool Character::walkTo(int32 newPosX, int32 newPosY) { _vm->getPathFinding()->addBlockingEllipse(_vm->getDrew()->getFinalX(), _vm->getDrew()->getFinalY(), sizeX, sizeY); } - _vm->getPathFinding()->findClosestWalkingPoint(newPosX, newPosY, &_finalX, &_finalY, _x, _y); + int16 tempFinalX, tempFinalY; + _vm->getPathFinding()->findClosestWalkingPoint(newPosX, newPosY, &tempFinalX, &tempFinalY, _x, _y); + _finalX = tempFinalX, _finalY = tempFinalY; // FIXME - Bodge to match types... if (_x == _finalX && _y == _finalY) return true; diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp index dfdf095af9..5aae523455 100644 --- a/engines/toon/path.cpp +++ b/engines/toon/path.cpp @@ -60,7 +60,7 @@ void PathFindingHeap::clear() { memset(_data, 0, sizeof(HeapDataGrid) * _size); } -void PathFindingHeap::push(int16 x, int16 y, int32 weight) { +void PathFindingHeap::push(int16 x, int16 y, int16 weight) { debugC(2, kDebugPath, "push(%d, %d, %d)", x, y, weight); if (_count == _size) { @@ -104,7 +104,7 @@ void PathFindingHeap::push(int16 x, int16 y, int32 weight) { } } -void PathFindingHeap::pop(int16 *x, int16 *y, int32 *weight) { +void PathFindingHeap::pop(int16 *x, int16 *y, int16 *weight) { debugC(2, kDebugPath, "pop(x, y, weight)"); if (!_count) { @@ -173,14 +173,14 @@ void PathFinding::init(Picture *mask) { _sq = new int32[_width * _height]; } -bool PathFinding::isLikelyWalkable(int32 x, int32 y) { +bool PathFinding::isLikelyWalkable(int16 x, int16 y) { for (uint8 i = 0; i < _numBlockingRects; i++) { if (_blockingRects[i][4] == 0) { if (x >= _blockingRects[i][0] && x <= _blockingRects[i][2] && y >= _blockingRects[i][1] && y < _blockingRects[i][3]) return false; } else { - int32 dx = abs(_blockingRects[i][0] - x); - int32 dy = abs(_blockingRects[i][1] - y); + int16 dx = abs(_blockingRects[i][0] - x); + int16 dy = abs(_blockingRects[i][1] - y); if ((dx << 8) / _blockingRects[i][2] < (1 << 8) && (dy << 8) / _blockingRects[i][3] < (1 << 8)) { return false; } @@ -189,13 +189,13 @@ bool PathFinding::isLikelyWalkable(int32 x, int32 y) { return true; } -bool PathFinding::isWalkable(int32 x, int32 y) { +bool PathFinding::isWalkable(int16 x, int16 y) { debugC(2, kDebugPath, "isWalkable(%d, %d)", x, y); return (_currentMask->getData(x, y) & 0x1f) > 0; } -bool PathFinding::findClosestWalkingPoint(int32 xx, int32 yy, int32 *fxx, int32 *fyy, int origX, int origY) { +bool PathFinding::findClosestWalkingPoint(int16 xx, int16 yy, int16 *fxx, int16 *fyy, int16 origX, int16 origY) { debugC(1, kDebugPath, "findClosestWalkingPoint(%d, %d, fxx, fyy, %d, %d)", xx, yy, origX, origY); int32 currentFound = -1; @@ -207,8 +207,8 @@ bool PathFinding::findClosestWalkingPoint(int32 xx, int32 yy, int32 *fxx, int32 if (origY == -1) origY = yy; - for (int y = 0; y < _height; y++) { - for (int x = 0; x < _width; x++) { + for (int16 y = 0; y < _height; y++) { + for (int16 x = 0; x < _width; x++) { if (isWalkable(x, y) && isLikelyWalkable(x, y)) { int32 ndist = (x - xx) * (x - xx) + (y - yy) * (y - yy); int32 ndist2 = (x - origX) * (x - origX) + (y - origY) * (y - origY); @@ -232,7 +232,7 @@ bool PathFinding::findClosestWalkingPoint(int32 xx, int32 yy, int32 *fxx, int32 } } -bool PathFinding::walkLine(int32 x, int32 y, int32 x2, int32 y2) { +bool PathFinding::walkLine(int16 x, int16 y, int16 x2, int16 y2) { uint32 bx = x << 16; int32 dx = x2 - x; uint32 by = y << 16; @@ -265,7 +265,7 @@ bool PathFinding::walkLine(int32 x, int32 y, int32 x2, int32 y2) { return true; } -bool PathFinding::lineIsWalkable(int32 x, int32 y, int32 x2, int32 y2) { +bool PathFinding::lineIsWalkable(int16 x, int16 y, int16 x2, int16 y2) { uint32 bx = x << 16; int32 dx = x2 - x; uint32 by = y << 16; @@ -290,7 +290,7 @@ bool PathFinding::lineIsWalkable(int32 x, int32 y, int32 x2, int32 y2) { return true; } -bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { +bool PathFinding::findPath(int16 x, int16 y, int16 destx, int16 desty) { debugC(1, kDebugPath, "findPath(%d, %d, %d, %d)", x, y, destx, desty); if (x == destx && y == desty) { @@ -313,9 +313,9 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { // no direct line, we use the standard A* algorithm memset(_sq , 0, _width * _height * sizeof(int32)); _heap->clear(); - int32 curX = x; - int32 curY = y; - int32 curWeight = 0; + int16 curX = x; + int16 curY = y; + int16 curWeight = 0; _sq[curX + curY *_width] = 1; _heap->push(curX, curY, abs(destx - x) + abs(desty - y)); @@ -323,19 +323,17 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { while (_heap->getCount()) { wei = 0; - int16 tempCurX, tempCurY; - _heap->pop(&tempCurX, &tempCurY, &curWeight); - curX = tempCurX, curY = tempCurY; // FIXME - Bodge to match heap->pop types + _heap->pop(&curX, &curY, &curWeight); int32 curNode = curX + curY * _width; - int32 endX = MIN(curX + 1, _width - 1); - int32 endY = MIN(curY + 1, _height - 1); - int32 startX = MAX(curX - 1, 0); - int32 startY = MAX(curY - 1, 0); + int16 endX = MIN(curX + 1, _width - 1); + int16 endY = MIN(curY + 1, _height - 1); + int16 startX = MAX(curX - 1, 0); + int16 startY = MAX(curY - 1, 0); bool next = false; - for (int32 px = startX; px <= endX && !next; px++) { - for (int32 py = startY; py <= endY && !next; py++) { + for (int16 px = startX; px <= endX && !next; px++) { + for (int16 py = startY; py <= endY && !next; py++) { if (px != curX || py != curY) { wei = ((abs(px - curX) + abs(py - curY))); @@ -376,16 +374,16 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { bool retVal = false; while (true) { - int32 bestX = -1; - int32 bestY = -1; + int16 bestX = -1; + int16 bestY = -1; - int32 endX = MIN(curX + 1, _width - 1); - int32 endY = MIN(curY + 1, _height - 1); - int32 startX = MAX(curX - 1, 0); - int32 startY = MAX(curY - 1, 0); + int16 endX = MIN(curX + 1, _width - 1); + int16 endY = MIN(curY + 1, _height - 1); + int16 startX = MAX(curX - 1, 0); + int16 startY = MAX(curY - 1, 0); - for (int32 px = startX; px <= endX; px++) { - for (int32 py = startY; py <= endY; py++) { + for (int16 px = startX; px <= endX; px++) { + for (int16 py = startY; py <= endY; py++) { if (px != curX || py != curY) { wei = abs(px - curX) + abs(py - curY); @@ -425,7 +423,7 @@ bool PathFinding::findPath(int32 x, int32 y, int32 destx, int32 desty) { return retVal; } -void PathFinding::addBlockingRect(int32 x1, int32 y1, int32 x2, int32 y2) { +void PathFinding::addBlockingRect(int16 x1, int16 y1, int16 x2, int16 y2) { debugC(1, kDebugPath, "addBlockingRect(%d, %d, %d, %d)", x1, y1, x2, y2); if (_numBlockingRects >= kMaxBlockingRects) { warning("Maximum number of %d Blocking Rects reached!", kMaxBlockingRects); @@ -440,7 +438,7 @@ void PathFinding::addBlockingRect(int32 x1, int32 y1, int32 x2, int32 y2) { _numBlockingRects++; } -void PathFinding::addBlockingEllipse(int32 x1, int32 y1, int32 w, int32 h) { +void PathFinding::addBlockingEllipse(int16 x1, int16 y1, int16 w, int16 h) { debugC(1, kDebugPath, "addBlockingEllipse(%d, %d, %d, %d)", x1, y1, w, h); if (_numBlockingRects >= kMaxBlockingRects) { warning("Maximum number of %d Blocking Rects reached!", kMaxBlockingRects); diff --git a/engines/toon/path.h b/engines/toon/path.h index 8e2c61d482..f73415adc5 100644 --- a/engines/toon/path.h +++ b/engines/toon/path.h @@ -35,8 +35,8 @@ public: PathFindingHeap(); ~PathFindingHeap(); - void push(int16 x, int16 y, int32 weight); - void pop(int16 *x, int16 *y, int32 *weight); + void push(int16 x, int16 y, int16 weight); + void pop(int16 *x, int16 *y, int16 *weight); void init(int32 size); void clear(); void unload(); @@ -61,16 +61,16 @@ public: void init(Picture *mask); - bool findPath(int32 x, int32 y, int32 destX, int32 destY); - bool findClosestWalkingPoint(int32 xx, int32 yy, int32 *fxx, int32 *fyy, int origX = -1, int origY = -1); - bool isWalkable(int32 x, int32 y); - bool isLikelyWalkable(int32 x, int32 y); - bool lineIsWalkable(int32 x, int32 y, int32 x2, int32 y2); - bool walkLine(int32 x, int32 y, int32 x2, int32 y2); + bool findPath(int16 x, int16 y, int16 destX, int16 destY); + bool findClosestWalkingPoint(int16 xx, int16 yy, int16 *fxx, int16 *fyy, int16 origX = -1, int16 origY = -1); + bool isWalkable(int16 x, int16 y); + bool isLikelyWalkable(int16 x, int16 y); + bool lineIsWalkable(int16 x, int16 y, int16 x2, int16 y2); + bool walkLine(int16 x, int16 y, int16 x2, int16 y2); void resetBlockingRects() { _numBlockingRects = 0; } - void addBlockingRect(int32 x1, int32 y1, int32 x2, int32 y2); - void addBlockingEllipse(int32 x1, int32 y1, int32 w, int32 h); + void addBlockingRect(int16 x1, int16 y1, int16 x2, int16 y2); + void addBlockingEllipse(int16 x1, int16 y1, int16 w, int16 h); int32 getPathNodeCount() const { return _tempPath.size(); } int32 getPathNodeX(int32 nodeId) const { return _tempPath[ _tempPath.size() - nodeId - 1].x; } @@ -84,8 +84,8 @@ private: PathFindingHeap *_heap; int32 *_sq; - int32 _width; - int32 _height; + int16 _width; + int16 _height; struct i32Point { int32 x, y; @@ -93,7 +93,7 @@ private: Common::Array _tempPath; - int32 _blockingRects[kMaxBlockingRects][5]; + int16 _blockingRects[kMaxBlockingRects][5]; uint8 _numBlockingRects; }; diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 0b39432b53..dd3c32b5bf 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -1488,7 +1488,7 @@ void ToonEngine::clickEvent() { } if (!currentHot) { - int32 xx, yy; + int16 xx, yy; if (_gameState->_inCutaway || _gameState->_inInventory || _gameState->_inCloseUp) return; -- cgit v1.2.3 From 249d48f77b395d82b8f2bb67360c5539212f5bc4 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 10 Jun 2012 14:53:26 -0400 Subject: BACKENDS: Add #error for platforms not setting tm_wday in release builds --- backends/platform/bada/system.cpp | 4 ++++ backends/platform/ps2/ps2time.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/backends/platform/bada/system.cpp b/backends/platform/bada/system.cpp index 29ce954eba..816a6755fc 100644 --- a/backends/platform/bada/system.cpp +++ b/backends/platform/bada/system.cpp @@ -399,7 +399,11 @@ void BadaSystem::getTimeAndDate(TimeDate &td) const { td.tm_mday = currentTime.GetDay(); td.tm_mon = currentTime.GetMonth(); td.tm_year = currentTime.GetYear(); +#ifdef RELEASE_BUILD + #error getTimeAndDate() is not setting the day of the week +#else td.tm_wday = 0; // FIXME +#endif } } diff --git a/backends/platform/ps2/ps2time.cpp b/backends/platform/ps2/ps2time.cpp index c8da0f4915..decfc552ec 100644 --- a/backends/platform/ps2/ps2time.cpp +++ b/backends/platform/ps2/ps2time.cpp @@ -120,5 +120,9 @@ void OSystem_PS2::getTimeAndDate(TimeDate &t) const { t.tm_year = g_year + 100; t.tm_mday = g_day; t.tm_mon = g_month - 1; +#ifdef RELEASE_BUILD + #error getTimeAndDate() is not setting the day of the week +#else t.tm_wday = 0; // FIXME +#endif } -- cgit v1.2.3 From 13832580002a0a902a23fa893784aa61f7b3faaa Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 10 Jun 2012 20:45:37 +0100 Subject: TOON: Migrate Pathfinding Path Buffers to Common::Point. This removes the need for i32Point, which used int32, instead of the int16 of Common::Point. Since the co-ordinates passed in are in int16, this is safe. Tested with no regressions. Also, removed return value from walkLine function as it always returned true. --- engines/toon/path.cpp | 26 ++++++-------------------- engines/toon/path.h | 9 +++------ 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp index 5aae523455..63dbf1a442 100644 --- a/engines/toon/path.cpp +++ b/engines/toon/path.cpp @@ -232,7 +232,7 @@ bool PathFinding::findClosestWalkingPoint(int16 xx, int16 yy, int16 *fxx, int16 } } -bool PathFinding::walkLine(int16 x, int16 y, int16 x2, int16 y2) { +void PathFinding::walkLine(int16 x, int16 y, int16 x2, int16 y2) { uint32 bx = x << 16; int32 dx = x2 - x; uint32 by = y << 16; @@ -249,20 +249,13 @@ bool PathFinding::walkLine(int16 x, int16 y, int16 x2, int16 y2) { int32 cdy = (dy << 16) / t; _tempPath.clear(); - i32Point p; for (int32 i = t; i > 0; i--) { - p.x = bx >> 16; - p.y = by >> 16; - _tempPath.insert_at(0, p); + _tempPath.insert_at(0, Common::Point(bx >> 16, by >> 16)); bx += cdx; by += cdy; } - p.x = x2; - p.y = y2; - _tempPath.insert_at(0, p); - - return true; + _tempPath.insert_at(0, Common::Point(x2, y2)); } bool PathFinding::lineIsWalkable(int16 x, int16 y, int16 x2, int16 y2) { @@ -363,12 +356,8 @@ bool PathFinding::findPath(int16 x, int16 y, int16 destx, int16 desty) { curX = destx; curY = desty; - Common::Array retPath; - - i32Point p; - p.x = curX; - p.y = curY; - retPath.push_back(p); + Common::Array retPath; + retPath.push_back(Common::Point(curX, curY)); int32 bestscore = _sq[destx + desty * _width]; @@ -402,10 +391,7 @@ bool PathFinding::findPath(int16 x, int16 y, int16 destx, int16 desty) { if (bestX < 0 || bestY < 0) break; - i32Point pp; - pp.x = bestX; - pp.y = bestY; - retPath.push_back(pp); + retPath.push_back(Common::Point(bestX, bestY)); if ((bestX == x && bestY == y)) { _tempPath.clear(); diff --git a/engines/toon/path.h b/engines/toon/path.h index f73415adc5..2a583e5bff 100644 --- a/engines/toon/path.h +++ b/engines/toon/path.h @@ -24,6 +24,7 @@ #define TOON_PATH_H #include "common/array.h" +#include "common/rect.h" #include "toon/toon.h" @@ -66,7 +67,7 @@ public: bool isWalkable(int16 x, int16 y); bool isLikelyWalkable(int16 x, int16 y); bool lineIsWalkable(int16 x, int16 y, int16 x2, int16 y2); - bool walkLine(int16 x, int16 y, int16 x2, int16 y2); + void walkLine(int16 x, int16 y, int16 x2, int16 y2); void resetBlockingRects() { _numBlockingRects = 0; } void addBlockingRect(int16 x1, int16 y1, int16 x2, int16 y2); @@ -87,11 +88,7 @@ private: int16 _width; int16 _height; - struct i32Point { - int32 x, y; - }; - - Common::Array _tempPath; + Common::Array _tempPath; int16 _blockingRects[kMaxBlockingRects][5]; uint8 _numBlockingRects; -- cgit v1.2.3 From fcfff28c5f3cabf193d83846cfe9d90f0153d187 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 10 Jun 2012 21:12:01 +0100 Subject: TOON: Minor type fixes and cleanups in Pathfinding class. --- engines/toon/character.cpp | 2 +- engines/toon/path.cpp | 20 ++++++++++---------- engines/toon/path.h | 12 ++++++------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp index 3ac454983d..260296cc9f 100644 --- a/engines/toon/character.cpp +++ b/engines/toon/character.cpp @@ -186,7 +186,7 @@ bool Character::walkTo(int32 newPosX, int32 newPosY) { int32 smoothDx = 0; int32 smoothDy = 0; - for (int32 a = 0; a < _vm->getPathFinding()->getPathNodeCount(); a++) { + for (uint32 a = 0; a < _vm->getPathFinding()->getPathNodeCount(); a++) { _currentPathX[a] = _vm->getPathFinding()->getPathNodeX(a); _currentPathY[a] = _vm->getPathFinding()->getPathNodeY(a); } diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp index 63dbf1a442..735801eebc 100644 --- a/engines/toon/path.cpp +++ b/engines/toon/path.cpp @@ -65,7 +65,7 @@ void PathFindingHeap::push(int16 x, int16 y, int16 weight) { if (_count == _size) { // Increase size by 50% - int newSize = _size + (_size >> 1) + 1; + uint32 newSize = _size + (_size / 2) + 1; HeapDataGrid *newData; newData = (HeapDataGrid *)realloc(_data, sizeof(HeapDataGrid) * newSize); @@ -84,13 +84,13 @@ void PathFindingHeap::push(int16 x, int16 y, int16 weight) { _data[_count]._weight = weight; _count++; - int32 lMax = _count-1; - int32 lT = 0; + uint32 lMax = _count - 1; + uint32 lT = 0; while (true) { if (lMax <= 0) break; - lT = (lMax-1) / 2; + lT = (lMax - 1) / 2; if (_data[lT]._weight > _data[lMax]._weight) { HeapDataGrid temp; @@ -120,13 +120,13 @@ void PathFindingHeap::pop(int16 *x, int16 *y, int16 *weight) { if (!_count) return; - int32 lMin = 0; - int32 lT = 0; + uint32 lMin = 0; + uint32 lT = 0; while (true) { - lT = (lMin << 1) + 1; + lT = (lMin * 2) + 1; if (lT < _count) { - if (lT < _count-1) { + if (lT < _count - 1) { if (_data[lT + 1]._weight < _data[lT]._weight) lT++; } @@ -312,8 +312,8 @@ bool PathFinding::findPath(int16 x, int16 y, int16 destx, int16 desty) { _sq[curX + curY *_width] = 1; _heap->push(curX, curY, abs(destx - x) + abs(desty - y)); - int32 wei = 0; + int16 wei; while (_heap->getCount()) { wei = 0; _heap->pop(&curX, &curY, &curWeight); @@ -328,7 +328,7 @@ bool PathFinding::findPath(int16 x, int16 y, int16 destx, int16 desty) { for (int16 px = startX; px <= endX && !next; px++) { for (int16 py = startY; py <= endY && !next; py++) { if (px != curX || py != curY) { - wei = ((abs(px - curX) + abs(py - curY))); + wei = abs(px - curX) + abs(py - curY); int32 curPNode = px + py * _width; if (isWalkable(px, py)) { // walkable ? diff --git a/engines/toon/path.h b/engines/toon/path.h index 2a583e5bff..2476dc3b8a 100644 --- a/engines/toon/path.h +++ b/engines/toon/path.h @@ -41,7 +41,7 @@ public: void init(int32 size); void clear(); void unload(); - int32 getCount() { return _count; } + uint32 getCount() { return _count; } private: struct HeapDataGrid { @@ -51,8 +51,8 @@ private: HeapDataGrid *_data; - int32 _size; - int32 _count; + uint32 _size; + uint32 _count; }; class PathFinding { @@ -73,9 +73,9 @@ public: void addBlockingRect(int16 x1, int16 y1, int16 x2, int16 y2); void addBlockingEllipse(int16 x1, int16 y1, int16 w, int16 h); - int32 getPathNodeCount() const { return _tempPath.size(); } - int32 getPathNodeX(int32 nodeId) const { return _tempPath[ _tempPath.size() - nodeId - 1].x; } - int32 getPathNodeY(int32 nodeId) const { return _tempPath[ _tempPath.size() - nodeId - 1].y; } + uint32 getPathNodeCount() const { return _tempPath.size(); } + int16 getPathNodeX(uint32 nodeId) const { return _tempPath[(_tempPath.size() - 1) - nodeId].x; } + int16 getPathNodeY(uint32 nodeId) const { return _tempPath[(_tempPath.size() - 1) - nodeId].y; } private: static const uint8 kMaxBlockingRects = 16; -- cgit v1.2.3 From 03ef6689c015742c192d5d92d936e60d638caa1c Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 9 Jun 2012 10:38:55 +0200 Subject: GOB: Rewrite the AdLib players This is a complete rewrite of the AdLib players for ADL and MDY/TBR files in the Gob engine. Major changes 1) The AdLib base class is now completely separated from all file format code and can theoretically be used by any OPL2-based format (within reason) 2) The new code is far better documented and more readable 3) The MDY player now actually works. The MDY/TBR format is in reality the MUS/SND format created by AdLib as a simpler alternative to the ROL format 4) Since the MAME emulator is quite buggy and leads to noticable wrong percussion in the Gobliins 2 title music, the new AdLib player will try to create a DOSBox OPL. If it's not compiled in, or if the user configured opl_driver to "mame", it will print out appropriate warnings. --- engines/gob/module.mk | 2 + engines/gob/sound/adlib.cpp | 1038 +++++++++++++++++---------------------- engines/gob/sound/adlib.h | 317 ++++++++---- engines/gob/sound/adlplayer.cpp | 257 ++++++++++ engines/gob/sound/adlplayer.h | 85 ++++ engines/gob/sound/musplayer.cpp | 391 +++++++++++++++ engines/gob/sound/musplayer.h | 109 ++++ engines/gob/sound/sound.cpp | 41 +- engines/gob/sound/sound.h | 17 +- 9 files changed, 1545 insertions(+), 712 deletions(-) create mode 100644 engines/gob/sound/adlplayer.cpp create mode 100644 engines/gob/sound/adlplayer.h create mode 100644 engines/gob/sound/musplayer.cpp create mode 100644 engines/gob/sound/musplayer.h diff --git a/engines/gob/module.mk b/engines/gob/module.mk index b9680fad6b..7c5d7de158 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -103,6 +103,8 @@ MODULE_OBJS := \ sound/sounddesc.o \ sound/pcspeaker.o \ sound/adlib.o \ + sound/musplayer.o \ + sound/adlplayer.o \ sound/infogrames.o \ sound/protracker.o \ sound/soundmixer.o \ diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp index f1ab2a2d79..3f46f6cf4b 100644 --- a/engines/gob/sound/adlib.cpp +++ b/engines/gob/sound/adlib.cpp @@ -20,771 +20,615 @@ * */ -#include "common/debug.h" -#include "common/file.h" -#include "common/endian.h" +#include "common/util.h" #include "common/textconsole.h" +#include "common/debug.h" +#include "common/config-manager.h" + +#include "audio/fmopl.h" #include "gob/gob.h" #include "gob/sound/adlib.h" namespace Gob { -const unsigned char AdLib::_operators[] = {0, 1, 2, 8, 9, 10, 16, 17, 18}; -const unsigned char AdLib::_volRegNums[] = { - 3, 4, 5, - 11, 12, 13, - 19, 20, 21 +static const int kPitchTom = 24; +static const int kPitchTomToSnare = 7; +static const int kPitchSnareDrum = kPitchTom + kPitchTomToSnare; + + +// Is the operator a modulator (0) or a carrier (1)? +const uint8 AdLib::kOperatorType[kOperatorCount] = { + 0, 0, 0, 1, 1, 1, + 0, 0, 0, 1, 1, 1, + 0, 0, 0, 1, 1, 1 +}; + +// Operator number to register offset on the OPL +const uint8 AdLib::kOperatorOffset[kOperatorCount] = { + 0, 1, 2, 3, 4, 5, + 8, 9, 10, 11, 12, 13, + 16, 17, 18, 19, 20, 21 +}; + +// For each operator, the voice it belongs to +const uint8 AdLib::kOperatorVoice[kOperatorCount] = { + 0, 1, 2, + 0, 1, 2, + 3, 4, 5, + 3, 4, 5, + 6, 7, 8, + 6, 7, 8, +}; + +// Voice to operator set, for the 9 melodyvoices (only 6 useable in percussion mode) +const uint8 AdLib::kVoiceMelodyOperator[kOperatorsPerVoice][kMelodyVoiceCount] = { + {0, 1, 2, 6, 7, 8, 12, 13, 14}, + {3, 4, 5, 9, 10, 11, 15, 16, 17} }; -AdLib::AdLib(Audio::Mixer &mixer) : _mixer(&mixer) { - init(); +// Voice to operator set, for the 5 percussion voices (only useable in percussion mode) +const uint8 AdLib::kVoicePercussionOperator[kOperatorsPerVoice][kPercussionVoiceCount] = { + {12, 16, 14, 17, 13}, + {15, 0, 0, 0, 0} +}; + +// Mask bits to set each percussion instrument on/off +const byte AdLib::kPercussionMasks[kPercussionVoiceCount] = {0x10, 0x08, 0x04, 0x02, 0x01}; + +// Default instrument presets +const uint16 AdLib::kPianoParams [kOperatorsPerVoice][kParamCount] = { + { 1, 1, 3, 15, 5, 0, 1, 3, 15, 0, 0, 0, 1, 0}, + { 0, 1, 1, 15, 7, 0, 2, 4, 0, 0, 0, 1, 0, 0} }; +const uint16 AdLib::kBaseDrumParams[kOperatorsPerVoice][kParamCount] = { + { 0, 0, 0, 10, 4, 0, 8, 12, 11, 0, 0, 0, 1, 0 }, + { 0, 0, 0, 13, 4, 0, 6, 15, 0, 0, 0, 0, 1, 0 } }; +const uint16 AdLib::kSnareDrumParams[kParamCount] = { + 0, 12, 0, 15, 11, 0, 8, 5, 0, 0, 0, 0, 0, 0 }; +const uint16 AdLib::kTomParams [kParamCount] = { + 0, 4, 0, 15, 11, 0, 7, 5, 0, 0, 0, 0, 0, 0 }; +const uint16 AdLib::kCymbalParams [kParamCount] = { + 0, 1, 0, 15, 11, 0, 5, 5, 0, 0, 0, 0, 0, 0 }; +const uint16 AdLib::kHihatParams [kParamCount] = { + 0, 1, 0, 15, 11, 0, 7, 5, 0, 0, 0, 0, 0, 0 }; + + +AdLib::AdLib(Audio::Mixer &mixer) : _mixer(&mixer), _opl(0), + _toPoll(0), _repCount(0), _first(true), _playing(false), _ended(true) { + + _rate = _mixer->getOutputRate(); + + createOPL(); + initOPL(); + + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_handle, + this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); } AdLib::~AdLib() { - Common::StackLock slock(_mutex); - _mixer->stopHandle(_handle); - OPLDestroy(_opl); - if (_data && _freeData) - delete[] _data; + + delete _opl; } -void AdLib::init() { - _index = -1; - _data = 0; - _playPos = 0; - _dataSize = 0; +// Creates the OPL. Try to use the DOSBox emulator, unless that one is not compiled in, +// or the user explicitly wants the MAME emulator. The MAME one is slightly buggy, leading +// to some wrong sounds, especially noticeable in the title music of Gobliins 2, so we +// really don't want to use it, if we can help it. +void AdLib::createOPL() { + Common::String oplDriver = ConfMan.get("opl_driver"); - _rate = _mixer->getOutputRate(); + if (oplDriver.empty() || (oplDriver == "auto") || (OPL::Config::parse(oplDriver) == -1)) { + // User has selected OPL driver auto detection or an invalid OPL driver. + // Set it to our preferred driver (DOSBox), if we can. - _opl = makeAdLibOPL(_rate); + if (OPL::Config::parse("db") <= 0) { + warning("The DOSBox AdLib emulator is not compiled in. Please keep in mind that the MAME one is buggy"); + } else + oplDriver = "db"; - _first = true; - _ended = false; - _playing = false; + } else if (oplDriver == "mame") { + // User has selected the MAME OPL driver. It is buggy, so warn the user about that. - _freeData = false; - - _repCount = -1; - _samplesTillPoll = 0; + warning("You have selected the MAME AdLib emulator. It is buggy; AdLib music might be slightly glitchy now"); + } - for (int i = 0; i < 16; i ++) - _pollNotes[i] = 0; - setFreqs(); + _opl = OPL::Config::create(OPL::Config::parse(oplDriver), OPL::Config::kOpl2); + if (!_opl || !_opl->init(_rate)) { + delete _opl; - _mixer->playStream(Audio::Mixer::kMusicSoundType, &_handle, - this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true); + error("Could not create an AdLib emulator"); + } } int AdLib::readBuffer(int16 *buffer, const int numSamples) { Common::StackLock slock(_mutex); - int samples; - int render; - if (!_playing || (numSamples < 0)) { - memset(buffer, 0, numSamples * sizeof(int16)); - return numSamples; - } - if (_first) { + // Nothing to do, fill with silence + if (!_playing) { memset(buffer, 0, numSamples * sizeof(int16)); - pollMusic(); return numSamples; } - samples = numSamples; + // Read samples from the OPL, polling in more music when necessary + uint32 samples = numSamples; while (samples && _playing) { - if (_samplesTillPoll) { - render = (samples > _samplesTillPoll) ? (_samplesTillPoll) : (samples); + if (_toPoll) { + const uint32 render = MIN(samples, _toPoll); + + _opl->readBuffer(buffer, render); + + buffer += render; samples -= render; - _samplesTillPoll -= render; - YM3812UpdateOne(_opl, buffer, render); - buffer += render; + _toPoll -= render; + } else { - pollMusic(); + // Song ended, fill the rest with silence if (_ended) { memset(buffer, 0, samples * sizeof(int16)); samples = 0; + break; } + + // Poll more music + _toPoll = pollMusic(_first); + _first = false; } } + // Song ended, loop if requested if (_ended) { - _first = true; - _ended = false; + _toPoll = 0; - rewind(); + // _repCount == 0: No looping (anymore); _repCount < 0: Infinite looping + if (_repCount != 0) { + if (_repCount > 0) + _repCount--; + + _first = true; + _ended = false; - _samplesTillPoll = 0; - if (_repCount == -1) { - reset(); - setVoices(); - } else if (_repCount > 0) { - _repCount--; reset(); - setVoices(); - } - else + rewind(); + } else _playing = false; } - return numSamples; -} - -void AdLib::writeOPL(byte reg, byte val) { - debugC(6, kDebugSound, "AdLib::writeOPL (%02X, %02X)", reg, val); - OPLWriteReg(_opl, reg, val); -} -void AdLib::setFreqs() { - byte lin; - byte col; - long val = 0; - - // Run through the 11 channels - for (lin = 0; lin < 11; lin ++) { - _notes[lin] = 0; - _notCol[lin] = 0; - _notLin[lin] = 0; - _notOn[lin] = false; - } - - // Run through the 25 lines - for (lin = 0; lin < 25; lin ++) { - // Run through the 12 columns - for (col = 0; col < 12; col ++) { - if (!col) - val = (((0x2710L + lin * 0x18) * 0xCB78 / 0x3D090) << 0xE) * - 9 / 0x1B503; - _freqs[lin][col] = (short)((val + 4) >> 3); - val = val * 0x6A / 0x64; - } - } + return numSamples; } -void AdLib::reset() { - _first = true; - OPLResetChip(_opl); - _samplesTillPoll = 0; - - setFreqs(); - // Set frequencies and octave to 0; notes off - for (int i = 0; i < 9; i++) { - writeOPL(0xA0 | i, 0); - writeOPL(0xB0 | i, 0); - writeOPL(0xE0 | _operators[i] , 0); - writeOPL(0xE0 |(_operators[i] + 3), 0); - } - - // Authorize the control of the waveformes - writeOPL(0x01, 0x20); -} - -void AdLib::setKey(byte voice, byte note, bool on, bool spec) { - short freq = 0; - short octa = 0; - - // Instruction AX - if (spec) { - // 0x7F donne 0x16B; - // 7F - // << 7 = 3F80 - // + E000 = 11F80 - // & FFFF = 1F80 - // * 19 = 31380 - // / 2000 = 18 => Ligne 18h, colonne 0 => freq 16B - - // 0x3A donne 0x2AF; - // 3A - // << 7 = 1D00 - // + E000 = FD00 negatif - // * 19 = xB500 - // / 2000 = -2 => Ligne 17h, colonne -1 - - // 2E - // << 7 = 1700 - // + E000 = F700 negatif - // * 19 = x1F00 - // / 2000 = - short a; - short lin; - short col; - - a = (note << 7) + 0xE000; // Volontairement tronque - a = (short)((long)a * 25 / 0x2000); - if (a < 0) { - col = - ((24 - a) / 25); - lin = (-a % 25); - if (lin) - lin = 25 - lin; - } - else { - col = a / 25; - lin = a % 25; - } - - _notCol[voice] = col; - _notLin[voice] = lin; - note = _notes[voice]; - } - // Instructions 0X 9X 8X - else { - note -= 12; - _notOn[voice] = on; - } - - _notes[voice] = note; - note += _notCol[voice]; - note = MIN((byte) 0x5F, note); - octa = note / 12; - freq = _freqs[_notLin[voice]][note - octa * 12]; - - writeOPL(0xA0 + voice, freq & 0xFF); - writeOPL(0xB0 + voice, (freq >> 8) | (octa << 2) | (0x20 * (on ? 1 : 0))); - - if (!freq) - warning("AdLib::setKey Voice %d, note %02X unknown", voice, note); +bool AdLib::isStereo() const { + return _opl->isStereo(); } -void AdLib::setVolume(byte voice, byte volume) { - debugC(6, kDebugSound, "AdLib::setVolume(%d, %d)", voice, volume); - //assert(voice >= 0 && voice <= 9); - volume = 0x3F - ((volume * 0x7E) + 0x7F) / 0xFE; - writeOPL(0x40 + _volRegNums[voice], volume); +bool AdLib::endOfData() const { + return !_playing; } -void AdLib::pollMusic() { - if ((_playPos > (_data + _dataSize)) && (_dataSize != 0xFFFFFFFF)) { - _ended = true; - return; - } - - interpret(); +bool AdLib::endOfStream() const { + return false; } -void AdLib::unload() { - _playing = false; - _index = -1; - - if (_data && _freeData) - delete[] _data; - - _freeData = false; +int AdLib::getRate() const { + return _rate; } bool AdLib::isPlaying() const { return _playing; } -bool AdLib::getRepeating() const { - return _repCount != 0; +int32 AdLib::getRepeating() const { + Common::StackLock slock(_mutex); + + return _repCount; } void AdLib::setRepeating(int32 repCount) { + Common::StackLock slock(_mutex); + _repCount = repCount; } -int AdLib::getIndex() const { - return _index; +uint32 AdLib::getSamplesPerSecond() const { + return _rate * (isStereo() ? 2 : 1); } void AdLib::startPlay() { - if (_data) _playing = true; + Common::StackLock slock(_mutex); + + _playing = true; + _ended = false; + _first = true; + + reset(); + rewind(); } void AdLib::stopPlay() { Common::StackLock slock(_mutex); + + end(true); + _playing = false; } -ADLPlayer::ADLPlayer(Audio::Mixer &mixer) : AdLib(mixer) { -} +void AdLib::writeOPL(byte reg, byte val) { + debugC(6, kDebugSound, "AdLib::writeOPL (%02X, %02X)", reg, val); -ADLPlayer::~ADLPlayer() { + _opl->writeReg(reg, val); } -bool ADLPlayer::load(const char *fileName) { - Common::File song; +void AdLib::reset() { + allOff(); + initOPL(); +} - unload(); - song.open(fileName); - if (!song.isOpen()) - return false; +void AdLib::allOff() { + // NOTE: Explicit casts are necessary, because of 5.16 paragraph 4 of the C++ standard + int numVoices = isPercussionMode() ? (int)kMaxVoiceCount : (int)kMelodyVoiceCount; - _freeData = true; - _dataSize = song.size(); - _data = new byte[_dataSize]; - song.read(_data, _dataSize); - song.close(); + for (int i = 0; i < numVoices; i++) + noteOff(i); +} +void AdLib::end(bool killRepeat) { reset(); - setVoices(); - _playPos = _data + 3 + (_data[1] + 1) * 0x38; - return true; + _ended = true; + + if (killRepeat) + _repCount = 0; } -bool ADLPlayer::load(byte *data, uint32 size, int index) { - unload(); - _repCount = 0; +void AdLib::initOPL() { + _tremoloDepth = false; + _vibratoDepth = false; + _keySplit = false; - _dataSize = size; - _data = data; - _index = index; + _enableWaveSelect = true; - reset(); - setVoices(); - _playPos = _data + 3 + (_data[1] + 1) * 0x38; + for (int i = 0; i < kMaxVoiceCount; i++) { + _voiceNote[i] = 0; + _voiceOn [i] = 0; + } + + _opl->reset(); + + initOperatorVolumes(); + initFreqs(); + + setPercussionMode(false); + + setTremoloDepth(false); + setVibratoDepth(false); + setKeySplit(false); - return true; + for(int i = 0; i < kMelodyVoiceCount; i++) + voiceOff(i); + + setPitchRange(1); + + enableWaveSelect(true); } -void ADLPlayer::unload() { - AdLib::unload(); +bool AdLib::isPercussionMode() const { + return _percussionMode; } -void ADLPlayer::interpret() { - unsigned char instr; - byte channel; - byte note; - byte volume; - uint16 tempo; +void AdLib::setPercussionMode(bool percussion) { + if (percussion) { + voiceOff(kVoiceBaseDrum); + voiceOff(kVoiceSnareDrum); + voiceOff(kVoiceTom); - // First tempo, we'll ignore it... - if (_first) { - tempo = *(_playPos++); - // Tempo on 2 bytes - if (tempo & 0x80) - tempo = ((tempo & 3) << 8) | *(_playPos++); - } - _first = false; - - // Instruction - instr = *(_playPos++); - channel = instr & 0x0F; - - switch (instr & 0xF0) { - // Note on + Volume - case 0x00: - note = *(_playPos++); - _pollNotes[channel] = note; - setVolume(channel, *(_playPos++)); - setKey(channel, note, true, false); - break; - // Note on - case 0x90: - note = *(_playPos++); - _pollNotes[channel] = note; - setKey(channel, note, true, false); - break; - // Last note off - case 0x80: - note = _pollNotes[channel]; - setKey(channel, note, false, false); - break; - // Frequency on/off - case 0xA0: - note = *(_playPos++); - setKey(channel, note, _notOn[channel], true); - break; - // Volume - case 0xB0: - volume = *(_playPos++); - setVolume(channel, volume); - break; - // Program change - case 0xC0: - setVoice(channel, *(_playPos++), false); - break; - // Special - case 0xF0: - switch (instr & 0x0F) { - case 0xF: // End instruction - _ended = true; - _samplesTillPoll = 0; - return; - default: - warning("ADLPlayer: Unknown special command %X, stopping playback", - instr & 0x0F); - _repCount = 0; - _ended = true; - break; - } - break; - default: - warning("ADLPlayer: Unknown command %X, stopping playback", - instr & 0xF0); - _repCount = 0; - _ended = true; - break; + /* set the frequency for the last 4 percussion voices: */ + setFreq(kVoiceTom, kPitchTom, 0); + setFreq(kVoiceSnareDrum, kPitchSnareDrum, 0); } - // Temporization - tempo = *(_playPos++); - // End tempo - if (tempo == 0xFF) { - _ended = true; - return; - } - // Tempo on 2 bytes - if (tempo & 0x80) - tempo = ((tempo & 3) << 8) | *(_playPos++); - if (!tempo) - tempo ++; + _percussionMode = percussion; + _percussionBits = 0; - _samplesTillPoll = tempo * (_rate / 1000); + initOperatorParams(); + writeTremoloVibratoDepthPercMode(); } -void ADLPlayer::reset() { - AdLib::reset(); +void AdLib::enableWaveSelect(bool enable) { + _enableWaveSelect = enable; + + for (int i = 0; i < kOperatorCount; i++) + writeOPL(0xE0 + kOperatorOffset[i], 0); + + writeOPL(0x011, _enableWaveSelect ? 0x20 : 0); } -void ADLPlayer::rewind() { - _playPos = _data + 3 + (_data[1] + 1) * 0x38; +void AdLib::setPitchRange(uint8 range) { + _pitchRange = CLIP(range, 0, 12); + _pitchRangeStep = _pitchRange * kPitchStepCount; } -void ADLPlayer::setVoices() { - // Definitions of the 9 instruments - for (int i = 0; i < 9; i++) - setVoice(i, i, true); +void AdLib::setTremoloDepth(bool tremoloDepth) { + _tremoloDepth = tremoloDepth; + + writeTremoloVibratoDepthPercMode(); } -void ADLPlayer::setVoice(byte voice, byte instr, bool set) { - uint16 strct[27]; - byte channel; - byte *dataPtr; +void AdLib::setVibratoDepth(bool vibratoDepth) { + _vibratoDepth = vibratoDepth; - // i = 0 : 0 1 2 3 4 5 6 7 8 9 10 11 12 26 - // i = 1 : 13 14 15 16 17 18 19 20 21 22 23 24 25 27 - for (int i = 0; i < 2; i++) { - dataPtr = _data + 3 + instr * 0x38 + i * 0x1A; - for (int j = 0; j < 27; j++) { - strct[j] = READ_LE_UINT16(dataPtr); - dataPtr += 2; - } - channel = _operators[voice] + i * 3; - writeOPL(0xBD, 0x00); - writeOPL(0x08, 0x00); - writeOPL(0x40 | channel, ((strct[0] & 3) << 6) | (strct[8] & 0x3F)); - if (!i) - writeOPL(0xC0 | voice, - ((strct[2] & 7) << 1) | (1 - (strct[12] & 1))); - writeOPL(0x60 | channel, ((strct[3] & 0xF) << 4) | (strct[6] & 0xF)); - writeOPL(0x80 | channel, ((strct[4] & 0xF) << 4) | (strct[7] & 0xF)); - writeOPL(0x20 | channel, ((strct[9] & 1) << 7) | - ((strct[10] & 1) << 6) | ((strct[5] & 1) << 5) | - ((strct[11] & 1) << 4) | (strct[1] & 0xF)); - if (!i) - writeOPL(0xE0 | channel, (strct[26] & 3)); - else - writeOPL(0xE0 | channel, (strct[14] & 3)); - if (i && set) - writeOPL(0x40 | channel, 0); + writeTremoloVibratoDepthPercMode(); +} + +void AdLib::setKeySplit(bool keySplit) { + _keySplit = keySplit; + + writeKeySplit(); +} + +void AdLib::setVoiceTimbre(uint8 voice, const uint16 *params) { + const uint16 *params0 = params; + const uint16 *params1 = params + kParamCount - 1; + const uint16 *waves = params + 2 * (kParamCount - 1); + + const int voicePerc = voice - kVoiceBaseDrum; + + if (!isPercussionMode() || (voice < kVoiceBaseDrum)) { + setOperatorParams(kVoiceMelodyOperator[0][voice], params0, waves[0]); + setOperatorParams(kVoiceMelodyOperator[1][voice], params1, waves[1]); + } else if (voice == kVoiceBaseDrum) { + setOperatorParams(kVoicePercussionOperator[0][voicePerc], params0, waves[0]); + setOperatorParams(kVoicePercussionOperator[1][voicePerc], params1, waves[1]); + } else { + setOperatorParams(kVoicePercussionOperator[0][voicePerc], params0, waves[0]); } } +void AdLib::setVoiceVolume(uint8 voice, uint8 volume) { + int oper; + + const int voicePerc = voice - kVoiceBaseDrum; + + if (!isPercussionMode() || (voice < kVoiceBaseDrum)) + oper = kVoiceMelodyOperator[1][ voice]; + else + oper = kVoicePercussionOperator[voice == kVoiceBaseDrum ? 1 : 0][voicePerc]; -MDYPlayer::MDYPlayer(Audio::Mixer &mixer) : AdLib(mixer) { - init(); + _operatorVolume[oper] = MIN(volume, kMaxVolume); + writeKeyScaleLevelVolume(oper); } -MDYPlayer::~MDYPlayer() { +void AdLib::bendVoicePitch(uint8 voice, uint16 pitchBend) { + if (isPercussionMode() && (voice > kVoiceBaseDrum)) + return; + + changePitch(voice, MIN(pitchBend, kMaxPitch)); + setFreq(voice, _voiceNote[voice], _voiceOn[voice]); } -void MDYPlayer::init() { - _soundMode = 0; +void AdLib::noteOn(uint8 voice, uint8 note) { + note = MAX(0, note - (kStandardMidC - kOPLMidC)); + + if (isPercussionMode() && (voice >= kVoiceBaseDrum)) { + + if (voice == kVoiceBaseDrum) { + setFreq(kVoiceBaseDrum , note , false); + } else if (voice == kVoiceTom) { + setFreq(kVoiceTom , note , false); + setFreq(kVoiceSnareDrum, note + kPitchTomToSnare, false); + } + + _percussionBits |= kPercussionMasks[voice - kVoiceBaseDrum]; + writeTremoloVibratoDepthPercMode(); - _timbres = 0; - _tbrCount = 0; - _tbrStart = 0; - _timbresSize = 0; + } else + setFreq(voice, note, true); } -bool MDYPlayer::loadMDY(Common::SeekableReadStream &stream) { - unloadMDY(); +void AdLib::noteOff(uint8 voice) { + if (isPercussionMode() && (voice >= kVoiceBaseDrum)) { + _percussionBits &= ~kPercussionMasks[voice - kVoiceBaseDrum]; + writeTremoloVibratoDepthPercMode(); + } else + setFreq(voice, _voiceNote[voice], false); +} - _freeData = true; +void AdLib::writeKeyScaleLevelVolume(uint8 oper) { + uint16 volume = 0; - byte mdyHeader[70]; - stream.read(mdyHeader, 70); + volume = (63 - (_operatorParams[oper][kParamLevel] & 0x3F)) * _operatorVolume[oper]; + volume = 63 - ((2 * volume + kMaxVolume) / (2 * kMaxVolume)); - _tickBeat = mdyHeader[36]; - _beatMeasure = mdyHeader[37]; - _totalTick = mdyHeader[38] + (mdyHeader[39] << 8) + (mdyHeader[40] << 16) + (mdyHeader[41] << 24); - _dataSize = mdyHeader[42] + (mdyHeader[43] << 8) + (mdyHeader[44] << 16) + (mdyHeader[45] << 24); - _nrCommand = mdyHeader[46] + (mdyHeader[47] << 8) + (mdyHeader[48] << 16) + (mdyHeader[49] << 24); -// _soundMode is either 0 (melodic) or 1 (percussive) - _soundMode = mdyHeader[58]; - assert((_soundMode == 0) || (_soundMode == 1)); + uint8 keyScale = _operatorParams[oper][kParamKeyScaleLevel] << 6; - _pitchBendRangeStep = 25*mdyHeader[59]; - _basicTempo = mdyHeader[60] + (mdyHeader[61] << 8); + writeOPL(0x40 + kOperatorOffset[oper], volume | keyScale); +} - if (_pitchBendRangeStep < 25) - _pitchBendRangeStep = 25; - else if (_pitchBendRangeStep > 300) - _pitchBendRangeStep = 300; +void AdLib::writeKeySplit() { + writeOPL(0x08, _keySplit ? 0x40 : 0); +} - _data = new byte[_dataSize]; - stream.read(_data, _dataSize); +void AdLib::writeFeedbackFM(uint8 oper) { + if (kOperatorType[oper] == 1) + return; - reset(); - _playPos = _data; + uint8 value = 0; + + value |= _operatorParams[oper][kParamFeedback] << 1; + value |= _operatorParams[oper][kParamFM] ? 0 : 1; - return true; + writeOPL(0xC0 + kOperatorVoice[oper], value); } -bool MDYPlayer::loadMDY(const char *fileName) { - Common::File song; +void AdLib::writeAttackDecay(uint8 oper) { + uint8 value = 0; - song.open(fileName); - if (!song.isOpen()) - return false; + value |= _operatorParams[oper][kParamAttack] << 4; + value |= _operatorParams[oper][kParamDecay] & 0x0F; - bool loaded = loadMDY(song); + writeOPL(0x60 + kOperatorOffset[oper], value); +} - song.close(); +void AdLib::writeSustainRelease(uint8 oper) { + uint8 value = 0; - return loaded; + value |= _operatorParams[oper][kParamSustain] << 4; + value |= _operatorParams[oper][kParamRelease] & 0x0F; + + writeOPL(0x80 + kOperatorOffset[oper], value); } -bool MDYPlayer::loadTBR(Common::SeekableReadStream &stream) { - unloadTBR(); +void AdLib::writeTremoloVibratoSustainingKeyScaleRateFreqMulti(uint8 oper) { + uint8 value = 0; + + value |= _operatorParams[oper][kParamAM] ? 0x80 : 0; + value |= _operatorParams[oper][kParamVib] ? 0x40 : 0; + value |= _operatorParams[oper][kParamSustaining] ? 0x20 : 0; + value |= _operatorParams[oper][kParamKeyScaleRate] ? 0x10 : 0; + value |= _operatorParams[oper][kParamFreqMulti] & 0x0F; - _timbresSize = stream.size(); + writeOPL(0x20 + kOperatorOffset[oper], value); +} - _timbres = new byte[_timbresSize]; - stream.read(_timbres, _timbresSize); +void AdLib::writeTremoloVibratoDepthPercMode() { + uint8 value = 0; - reset(); - setVoices(); + value |= _tremoloDepth ? 0x80 : 0; + value |= _vibratoDepth ? 0x40 : 0; + value |= isPercussionMode() ? 0x20 : 0; + value |= _percussionBits; - return true; + writeOPL(0xBD, value); } -bool MDYPlayer::loadTBR(const char *fileName) { - Common::File timbres; +void AdLib::writeWaveSelect(uint8 oper) { + uint8 wave = 0; + if (_enableWaveSelect) + wave = _operatorParams[oper][kParamWaveSelect] & 0x03; - timbres.open(fileName); - if (!timbres.isOpen()) - return false; + writeOPL(0xE0 + kOperatorOffset[ oper], wave); +} + +void AdLib::writeAllParams(uint8 oper) { + writeTremoloVibratoDepthPercMode(); + writeKeySplit(); + writeKeyScaleLevelVolume(oper); + writeFeedbackFM(oper); + writeAttackDecay(oper); + writeSustainRelease(oper); + writeTremoloVibratoSustainingKeyScaleRateFreqMulti(oper); + writeWaveSelect(oper); +} - bool loaded = loadTBR(timbres); +void AdLib::initOperatorParams() { + for (int i = 0; i < kOperatorCount; i++) + setOperatorParams(i, kPianoParams[kOperatorType[i]], kPianoParams[kOperatorType[i]][kParamCount - 1]); - timbres.close(); + if (isPercussionMode()) { + setOperatorParams(12, kBaseDrumParams [0], kBaseDrumParams [0][kParamCount - 1]); + setOperatorParams(15, kBaseDrumParams [1], kBaseDrumParams [1][kParamCount - 1]); + setOperatorParams(16, kSnareDrumParams , kSnareDrumParams [kParamCount - 1]); + setOperatorParams(14, kTomParams , kTomParams [kParamCount - 1]); + setOperatorParams(17, kCymbalParams , kCymbalParams [kParamCount - 1]); + setOperatorParams(13, kHihatParams , kHihatParams [kParamCount - 1]); + } +} - return loaded; +void AdLib::initOperatorVolumes() { + for(int i = 0; i < kOperatorCount; i++) + _operatorVolume[i] = kMaxVolume; } -void MDYPlayer::unload() { - unloadTBR(); - unloadMDY(); +void AdLib::setOperatorParams(uint8 oper, const uint16 *params, uint8 wave) { + byte *operParams = _operatorParams[oper]; + + for (int i = 0; i < (kParamCount - 1); i++) + operParams[i] = params[i]; + + operParams[kParamCount - 1] = wave & 0x03; + + writeAllParams(oper); } -void MDYPlayer::unloadMDY() { - AdLib::unload(); +void AdLib::voiceOff(uint8 voice) { + writeOPL(0xA0 + voice, 0); + writeOPL(0xB0 + voice, 0); } -void MDYPlayer::unloadTBR() { - delete[] _timbres; +int32 AdLib::calcFreq(int32 deltaDemiToneNum, int32 deltaDemiToneDenom) { + int32 freq = 0; - _timbres = 0; - _timbresSize = 0; + freq = ((deltaDemiToneDenom * 100) + 6 * deltaDemiToneNum) * 52088; + freq /= deltaDemiToneDenom * 2500; + + return (freq * 147456) / 111875; } -void MDYPlayer::interpret() { - unsigned char instr; - byte channel; - byte note; - byte volume; - uint8 tempoMult, tempoFrac; - uint8 ctrlByte1, ctrlByte2; - uint8 timbre; +void AdLib::setFreqs(uint16 *freqs, int32 num, int32 denom) { + int32 val = calcFreq(num, denom); -// TODO : Verify the loop for percussive mode (11 ?) - if (_first) { - for (int i = 0; i < 9; i ++) - setVolume(i, 0); + *freqs++ = (4 + val) >> 3; -// TODO : Set pitch range + for (int i = 1; i < kHalfToneCount; i++) { + val = (val * 106) / 100; - _tempo = _basicTempo; - _wait = *(_playPos++); - _first = false; + *freqs++ = (4 + val) >> 3; } - do { - instr = *_playPos; - debugC(6, kDebugSound, "MDYPlayer::interpret instr 0x%X", instr); - switch (instr) { - case 0xF8: - _wait = *(_playPos++); - break; - case 0xFC: - _ended = true; - _samplesTillPoll = 0; - return; - case 0xF0: - _playPos++; - ctrlByte1 = *(_playPos++); - ctrlByte2 = *(_playPos++); - debugC(6, kDebugSound, "MDYPlayer::interpret ctrlBytes 0x%X 0x%X", ctrlByte1, ctrlByte2); - if (ctrlByte1 != 0x7F || ctrlByte2 != 0) { - _playPos -= 2; - while (*(_playPos++) != 0xF7) - ; - } else { - tempoMult = *(_playPos++); - tempoFrac = *(_playPos++); - _tempo = _basicTempo * tempoMult + (unsigned)(((long)_basicTempo * tempoFrac) >> 7); - _playPos++; - } - _wait = *(_playPos++); - break; - default: - if (instr >= 0x80) { - _playPos++; - } - channel = (int)(instr & 0x0f); - - switch (instr & 0xf0) { - case 0x90: - note = *(_playPos++); - volume = *(_playPos++); - _pollNotes[channel] = note; - setVolume(channel, volume); - setKey(channel, note, true, false); - break; - case 0x80: - _playPos += 2; - note = _pollNotes[channel]; - setKey(channel, note, false, false); - break; - case 0xA0: - setVolume(channel, *(_playPos++)); - break; - case 0xC0: - timbre = *(_playPos++); - setVoice(channel, timbre, false); - break; - case 0xE0: - warning("MDYPlayer: Pitch bend not yet implemented"); +} - note = *(_playPos)++; - note += (unsigned)(*(_playPos++)) << 7; +void AdLib::initFreqs() { + const int numStep = 100 / kPitchStepCount; - setKey(channel, note, _notOn[channel], true); + for (int i = 0; i < kPitchStepCount; i++) + setFreqs(_freqs[i], i * numStep, 100); - break; - case 0xB0: - _playPos += 2; - break; - case 0xD0: - _playPos++; - break; - default: - warning("MDYPlayer: Bad MIDI instr byte: 0%X", instr); - while ((*_playPos) < 0x80) - _playPos++; - if (*_playPos != 0xF8) - _playPos--; - break; - } //switch instr & 0xF0 - _wait = *(_playPos++); - break; - } //switch instr - } while (_wait == 0); - - if (_wait == 0xF8) { - _wait = 0xF0; - if (*_playPos != 0xF8) - _wait += *(_playPos++) & 0x0F; + for (int i = 0; i < kMaxVoiceCount; i++) { + _freqPtr [i] = _freqs[0]; + _halfToneOffset[i] = 0; } -// _playPos++; - _samplesTillPoll = _wait * (_rate / 1000); } -void MDYPlayer::reset() { - AdLib::reset(); +void AdLib::changePitch(uint8 voice, uint16 pitchBend) { + + int full = 0; + int frac = 0; + int amount = ((pitchBend - kMidPitch) * _pitchRangeStep) / kMidPitch; + + if (amount >= 0) { + // Bend up + + full = amount / kPitchStepCount; + frac = amount % kPitchStepCount; -// _soundMode 1 : Percussive mode. - if (_soundMode == 1) { - writeOPL(0xA6, 0); - writeOPL(0xB6, 0); - writeOPL(0xA7, 0); - writeOPL(0xB7, 0); - writeOPL(0xA8, 0); - writeOPL(0xB8, 0); + } else { + // Bend down + + amount = kPitchStepCount - 1 - amount; + + full = -(amount / kPitchStepCount); + frac = (amount - kPitchStepCount + 1) % kPitchStepCount; + if (frac) + frac = kPitchStepCount - frac; -// TODO set the correct frequency for the last 4 percussive voices } + + _halfToneOffset[voice] = full; + _freqPtr [voice] = _freqs[frac]; } -void MDYPlayer::rewind() { - _playPos = _data; -} - -void MDYPlayer::setVoices() { - byte *timbrePtr; - - timbrePtr = _timbres; - debugC(6, kDebugSound, "MDYPlayer::setVoices TBR version: %X.%X", timbrePtr[0], timbrePtr[1]); - timbrePtr += 2; - - _tbrCount = READ_LE_UINT16(timbrePtr); - debugC(6, kDebugSound, "MDYPlayer::setVoices Timbres counter: %d", _tbrCount); - timbrePtr += 2; - _tbrStart = READ_LE_UINT16(timbrePtr); - - timbrePtr += 2; - for (int i = 0; i < _tbrCount; i++) - setVoice(i, i, true); -} - -void MDYPlayer::setVoice(byte voice, byte instr, bool set) { -// uint16 strct[27]; - uint8 strct[27]; - byte channel; - byte *timbrePtr; - char timbreName[10]; - - timbreName[9] = '\0'; - for (int j = 0; j < 9; j++) - timbreName[j] = _timbres[6 + j + (instr * 9)]; - debugC(6, kDebugSound, "MDYPlayer::setVoice Loading timbre %s", timbreName); - - // i = 0 : 0 1 2 3 4 5 6 7 8 9 10 11 12 26 - // i = 1 : 13 14 15 16 17 18 19 20 21 22 23 24 25 27 - for (int i = 0; i < 2; i++) { - timbrePtr = _timbres + _tbrStart + instr * 0x38 + i * 0x1A; - for (int j = 0; j < 27; j++) { - if (timbrePtr >= (_timbres + _timbresSize)) { - warning("MDYPlayer: Instrument %d out of range (%d, %d)", instr, - (uint32) (timbrePtr - _timbres), _timbresSize); - strct[j] = 0; - } else - //strct[j] = READ_LE_UINT16(timbrePtr); - strct[j] = timbrePtr[0]; - //timbrePtr += 2; - timbrePtr++; - } - channel = _operators[voice] + i * 3; - writeOPL(0xBD, 0x00); - writeOPL(0x08, 0x00); - writeOPL(0x40 | channel, ((strct[0] & 3) << 6) | (strct[8] & 0x3F)); - if (!i) - writeOPL(0xC0 | voice, - ((strct[2] & 7) << 1) | (1 - (strct[12] & 1))); - writeOPL(0x60 | channel, ((strct[3] & 0xF) << 4) | (strct[6] & 0xF)); - writeOPL(0x80 | channel, ((strct[4] & 0xF) << 4) | (strct[7] & 0xF)); - writeOPL(0x20 | channel, ((strct[9] & 1) << 7) | - ((strct[10] & 1) << 6) | ((strct[5] & 1) << 5) | - ((strct[11] & 1) << 4) | (strct[1] & 0xF)); - if (!i) - writeOPL(0xE0 | channel, (strct[26] & 3)); - else { - writeOPL(0xE0 | channel, (strct[14] & 3)); - writeOPL(0x40 | channel, 0); - } - } +void AdLib::setFreq(uint8 voice, uint16 note, bool on) { + _voiceOn [voice] = on; + _voiceNote[voice] = note; + + note = CLIP(note + _halfToneOffset[voice], 0, kNoteCount - 1); + + uint16 freq = _freqPtr[voice][note % kHalfToneCount]; + + uint8 value = 0; + value |= on ? 0x20 : 0; + value |= ((note / kHalfToneCount) << 2) | ((freq >> 8) & 0x03); + + writeOPL(0xA0 + voice, freq); + writeOPL(0xB0 + voice, value); } } // End of namespace Gob diff --git a/engines/gob/sound/adlib.h b/engines/gob/sound/adlib.h index 934e9966eb..df1b77fd4d 100644 --- a/engines/gob/sound/adlib.h +++ b/engines/gob/sound/adlib.h @@ -20,154 +20,287 @@ * */ -#ifndef GOB_SOUND_ADLIB_H -#define GOB_SOUND_ADLIB_H +#ifndef GOB_SOUND_NEWADLIB_H +#define GOB_SOUND_NEWADLIB_H #include "common/mutex.h" + #include "audio/audiostream.h" #include "audio/mixer.h" -#include "audio/fmopl.h" -namespace Gob { +namespace OPL { + class OPL; +} -class GobEngine; +namespace Gob { +/** Base class for a player of an AdLib music format. */ class AdLib : public Audio::AudioStream { public: AdLib(Audio::Mixer &mixer); virtual ~AdLib(); - bool isPlaying() const; - int getIndex() const; - bool getRepeating() const; + bool isPlaying() const; ///< Are we currently playing? + int32 getRepeating() const; ///< Return number of times left to loop. + /** Set the loop counter. + * + * @param repCount Number of times to loop (i.e. number of additional + * paythroughs to the first one, not overall). + * A negative value means infinite looping. + */ void setRepeating(int32 repCount); void startPlay(); void stopPlay(); - virtual void unload(); - // AudioStream API int readBuffer(int16 *buffer, const int numSamples); - bool isStereo() const { return false; } - bool endOfData() const { return !_playing; } - bool endOfStream() const { return false; } - int getRate() const { return _rate; } + bool isStereo() const; + bool endOfData() const; + bool endOfStream() const; + int getRate() const; protected: - static const unsigned char _operators[]; - static const unsigned char _volRegNums []; + enum kVoice { + kVoiceMelody0 = 0, + kVoiceMelody1 = 1, + kVoiceMelody2 = 2, + kVoiceMelody3 = 3, + kVoiceMelody4 = 4, + kVoiceMelody5 = 5, + kVoiceMelody6 = 6, // Only available in melody mode. + kVoiceMelody7 = 7, // Only available in melody mode. + kVoiceMelody8 = 8, // Only available in melody mode. + kVoiceBaseDrum = 6, // Only available in percussion mode. + kVoiceSnareDrum = 7, // Only available in percussion mode. + kVoiceTom = 8, // Only available in percussion mode. + kVoiceCymbal = 9, // Only available in percussion mode. + kVoiceHihat = 10 // Only available in percussion mode. + }; + + /** Operator parameters. */ + enum kParam { + kParamKeyScaleLevel = 0, + kParamFreqMulti = 1, + kParamFeedback = 2, + kParamAttack = 3, + kParamSustain = 4, + kParamSustaining = 5, + kParamDecay = 6, + kParamRelease = 7, + kParamLevel = 8, + kParamAM = 9, + kParamVib = 10, + kParamKeyScaleRate = 11, + kParamFM = 12, + kParamWaveSelect = 13 + }; + + static const int kOperatorCount = 18; ///< Number of operators. + static const int kParamCount = 14; ///< Number of operator parameters. + static const int kPitchStepCount = 25; ///< Number of pitch bend steps in a half tone. + static const int kOctaveCount = 8; ///< Number of octaves we can play. + static const int kHalfToneCount = 12; ///< Number of half tones in an octave. + + static const int kOperatorsPerVoice = 2; ///< Number of operators per voice. + + static const int kMelodyVoiceCount = 9; ///< Number of melody voices. + static const int kPercussionVoiceCount = 5; ///< Number of percussion voices. + static const int kMaxVoiceCount = 11; ///< Max number of voices. + + /** Number of notes we can play. */ + static const int kNoteCount = kHalfToneCount * kOctaveCount; + + static const int kMaxVolume = 0x007F; + static const int kMaxPitch = 0x3FFF; + static const int kMidPitch = 0x2000; + + static const int kStandardMidC = 60; ///< A mid C in standard MIDI. + static const int kOPLMidC = 48; ///< A mid C for the OPL. + + + /** Return the number of samples per second. */ + uint32 getSamplesPerSecond() const; + + /** Write a value into an OPL register. */ + void writeOPL(byte reg, byte val); + + /** Signal that the playback ended. + * + * @param killRepeat Explicitly request that the song is not to be looped. + */ + void end(bool killRepeat = false); + + /** The callback function that's called for polling more AdLib commands. + * + * @param first Is this the first poll since the start of the song? + * @return The number of samples until the next poll. + */ + virtual uint32 pollMusic(bool first) = 0; + + /** Rewind the song. */ + virtual void rewind() = 0; + + /** Return whether we're in percussion mode. */ + bool isPercussionMode() const; + + /** Set percussion or melody mode. */ + void setPercussionMode(bool percussion); + + /** Enable/Disable the wave select operator parameters. + * + * When disabled, all operators use the sine wave, regardless of the parameter. + */ + void enableWaveSelect(bool enable); + + /** Change the pitch bend range. + * + * @param range The range in half tones from 1 to 12 inclusive. + * See bendVoicePitch() for how this works in practice. + */ + void setPitchRange(uint8 range); + + /** Set the tremolo (amplitude vibrato) depth. + * + * @param tremoloDepth false: 1.0dB, true: 4.8dB. + */ + void setTremoloDepth(bool tremoloDepth); + + /** Set the frequency vibrato depth. + * + * @param vibratoDepth false: 7 cent, true: 14 cent. 1 cent = 1/100 half tone. + */ + void setVibratoDepth(bool vibratoDepth); + + /** Set the keyboard split point. */ + void setKeySplit(bool keySplit); + + /** Set the timbre of a voice. + * + * Layout of the operator parameters is as follows: + * - First 13 parameter for the first operator + * - First 13 parameter for the second operator + * - 14th parameter (wave select) for the first operator + * - 14th parameter (wave select) for the second operator + */ + void setVoiceTimbre(uint8 voice, const uint16 *params); + + /** Set a voice's volume. */ + void setVoiceVolume(uint8 voice, uint8 volume); + + /** Bend a voice's pitch. + * + * The pitchBend parameter is a value between 0 (full down) and kMaxPitch (full up). + * The actual frequency depends on the pitch range set previously by setPitchRange(), + * with full down being -range half tones and full up range half tones. + */ + void bendVoicePitch(uint8 voice, uint16 pitchBend); + + /** Switch a voice on. + * + * Plays one of the kNoteCount notes. However, the valid range of a note is between + * 0 and 127, of which only 12 to 107 are audible. + */ + void noteOn(uint8 voice, uint8 note); + + /** Switch a voice off. */ + void noteOff(uint8 voice); + +private: + static const uint8 kOperatorType [kOperatorCount]; + static const uint8 kOperatorOffset[kOperatorCount]; + static const uint8 kOperatorVoice [kOperatorCount]; + + static const uint8 kVoiceMelodyOperator [kOperatorsPerVoice][kMelodyVoiceCount]; + static const uint8 kVoicePercussionOperator[kOperatorsPerVoice][kPercussionVoiceCount]; + + static const byte kPercussionMasks[kPercussionVoiceCount]; + + static const uint16 kPianoParams [kOperatorsPerVoice][kParamCount]; + static const uint16 kBaseDrumParams [kOperatorsPerVoice][kParamCount]; + + static const uint16 kSnareDrumParams[kParamCount]; + static const uint16 kTomParams [kParamCount]; + static const uint16 kCymbalParams [kParamCount]; + static const uint16 kHihatParams [kParamCount]; + Audio::Mixer *_mixer; Audio::SoundHandle _handle; - FM_OPL *_opl; + OPL::OPL *_opl; Common::Mutex _mutex; uint32 _rate; - byte *_data; - byte *_playPos; - uint32 _dataSize; - - short _freqs[25][12]; - byte _notes[11]; - byte _notCol[11]; - byte _notLin[11]; - bool _notOn[11]; - byte _pollNotes[16]; + uint32 _toPoll; - int _samplesTillPoll; int32 _repCount; - bool _playing; bool _first; + bool _playing; bool _ended; - bool _freeData; + bool _tremoloDepth; + bool _vibratoDepth; + bool _keySplit; - int _index; + bool _enableWaveSelect; - unsigned char _wait; - uint8 _tickBeat; - uint8 _beatMeasure; - uint32 _totalTick; - uint32 _nrCommand; - uint16 _pitchBendRangeStep; - uint16 _basicTempo, _tempo; + bool _percussionMode; + byte _percussionBits; - void writeOPL(byte reg, byte val); - void setFreqs(); - void setKey(byte voice, byte note, bool on, bool spec); - void setVolume(byte voice, byte volume); - void pollMusic(); + uint8 _pitchRange; + uint16 _pitchRangeStep; - virtual void interpret() = 0; + uint8 _voiceNote[kMaxVoiceCount]; // Last note of each voice + uint8 _voiceOn [kMaxVoiceCount]; // Whether each voice is currently on - virtual void reset(); - virtual void rewind() = 0; - virtual void setVoices() = 0; + uint8 _operatorVolume[kOperatorCount]; // Volume of each operator -private: - void init(); -}; + byte _operatorParams[kOperatorCount][kParamCount]; // All operator parameters -class ADLPlayer : public AdLib { -public: - ADLPlayer(Audio::Mixer &mixer); - ~ADLPlayer(); + uint16 _freqs[kPitchStepCount][kHalfToneCount]; + uint16 *_freqPtr[kMaxVoiceCount]; - bool load(const char *fileName); - bool load(byte *data, uint32 size, int index = -1); + int _halfToneOffset[kMaxVoiceCount]; - void unload(); -protected: - void interpret(); + void createOPL(); + void initOPL(); void reset(); - void rewind(); + void allOff(); - void setVoices(); - void setVoice(byte voice, byte instr, bool set); -}; + // Write global parameters into the OPL + void writeTremoloVibratoDepthPercMode(); + void writeKeySplit(); -class MDYPlayer : public AdLib { -public: - MDYPlayer(Audio::Mixer &mixer); - ~MDYPlayer(); - - bool loadMDY(const char *fileName); - bool loadMDY(Common::SeekableReadStream &stream); - bool loadTBR(const char *fileName); - bool loadTBR(Common::SeekableReadStream &stream); - - void unload(); - -protected: - byte _soundMode; - - byte *_timbres; - uint16 _tbrCount; - uint16 _tbrStart; - uint32 _timbresSize; + // Write operator parameters into the OPL + void writeWaveSelect(uint8 oper); + void writeTremoloVibratoSustainingKeyScaleRateFreqMulti(uint8 oper); + void writeSustainRelease(uint8 oper); + void writeAttackDecay(uint8 oper); + void writeFeedbackFM(uint8 oper); + void writeKeyScaleLevelVolume(uint8 oper); + void writeAllParams(uint8 oper); - void interpret(); + void initOperatorParams(); + void initOperatorVolumes(); + void setOperatorParams(uint8 oper, const uint16 *params, uint8 wave); - void reset(); - void rewind(); + void voiceOff(uint8 voice); - void setVoices(); - void setVoice(byte voice, byte instr, bool set); + void initFreqs(); + void setFreqs(uint16 *freqs, int32 num, int32 denom); + int32 calcFreq(int32 deltaDemiToneNum, int32 deltaDemiToneDenom); - void unloadTBR(); - void unloadMDY(); + void changePitch(uint8 voice, uint16 pitchBend); -private: - void init(); + void setFreq(uint8 voice, uint16 note, bool on); }; } // End of namespace Gob -#endif // GOB_SOUND_ADLIB_H +#endif // GOB_SOUND_NEWADLIB_H diff --git a/engines/gob/sound/adlplayer.cpp b/engines/gob/sound/adlplayer.cpp new file mode 100644 index 0000000000..ee23191c0d --- /dev/null +++ b/engines/gob/sound/adlplayer.cpp @@ -0,0 +1,257 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/stream.h" +#include "common/memstream.h" +#include "common/textconsole.h" + +#include "gob/sound/adlplayer.h" + +namespace Gob { + +ADLPlayer::ADLPlayer(Audio::Mixer &mixer) : AdLib(mixer), + _songData(0), _songDataSize(0), _playPos(0) { + +} + +ADLPlayer::~ADLPlayer() { + unload(); +} + +void ADLPlayer::unload() { + stopPlay(); + + _timbres.clear(); + + delete[] _songData; + + _songData = 0; + _songDataSize = 0; + + _playPos = 0; +} + +uint32 ADLPlayer::pollMusic(bool first) { + if (_timbres.empty() || !_songData || !_playPos || (_playPos >= (_songData + _songDataSize))) { + end(); + return 0; + } + + // We'll ignore the first delay + if (first) + _playPos += (*_playPos & 0x80) ? 2 : 1; + + byte cmd = *_playPos++; + + // Song end marker + if (cmd == 0xFF) { + end(); + return 0; + } + + // Set the instrument that should be modified + if (cmd == 0xFE) + _modifyInstrument = *_playPos++; + + if (cmd >= 0xD0) { + // Modify an instrument + + if (_modifyInstrument == 0xFF) + warning("ADLPlayer: No instrument to modify"); + else if (_modifyInstrument >= _timbres.size()) + warning("ADLPlayer: Can't modify invalid instrument %d (%d)", _modifyInstrument, _timbres.size()); + else + _timbres[_modifyInstrument].params[_playPos[0]] = _playPos[1]; + + _playPos += 2; + + // If we currently have that instrument loaded, reload it + for (int i = 0; i < kMaxVoiceCount; i++) + if (_currentInstruments[i] == _modifyInstrument) + setInstrument(i, _modifyInstrument); + } else { + // Voice command + + uint8 voice = cmd & 0x0F; + uint8 note, volume; + + switch (cmd & 0xF0) { + case 0x00: // Note on with volume + note = *_playPos++; + volume = *_playPos++; + + setVoiceVolume(voice, volume); + noteOn(voice, note); + break; + + case 0xA0: // Pitch bend + bendVoicePitch(voice, ((uint16)*_playPos++) << 7); + break; + + case 0xB0: // Set volume + setVoiceVolume(voice, *_playPos++); + break; + + case 0xC0: // Set instrument + setInstrument(voice, *_playPos++); + break; + + case 0x90: // Note on + noteOn(voice, *_playPos++); + break; + + case 0x80: // Note off + noteOff(voice); + break; + + default: + warning("ADLPlayer: Unsupported command: 0x%02X. Stopping playback.", cmd); + end(true); + return 0; + } + } + + uint16 delay = *_playPos++; + + if (delay & 0x80) + delay = ((delay & 3) << 8) | *_playPos++; + + return getSampleDelay(delay); +} + +uint32 ADLPlayer::getSampleDelay(uint16 delay) const { + if (delay == 0) + return 0; + + return ((uint32)delay * getSamplesPerSecond()) / 1000; +} + +void ADLPlayer::rewind() { + // Reset song data + _playPos = _songData; + + // Set melody/percussion mode + setPercussionMode(_soundMode != 0); + + // Reset instruments + for (Common::Array::iterator t = _timbres.begin(); t != _timbres.end(); ++t) + memcpy(t->params, t->startParams, kOperatorsPerVoice * kParamCount * sizeof(uint16)); + + for (int i = 0; i < kMaxVoiceCount; i++) + _currentInstruments[i] = 0; + + // Reset voices + int numVoice = MIN(_timbres.size(), _soundMode ? (int)kMaxVoiceCount : (int)kMelodyVoiceCount); + for (int i = 0; i < numVoice; i++) { + setInstrument(i, _currentInstruments[i]); + setVoiceVolume(i, kMaxVolume); + } + + _modifyInstrument = 0xFF; +} + +bool ADLPlayer::load(Common::SeekableReadStream &adl) { + unload(); + + int timbreCount; + if (!readHeader(adl, timbreCount)) { + unload(); + return false; + } + + if (!readTimbres(adl, timbreCount) || !readSongData(adl) || adl.err()) { + unload(); + return false; + } + + rewind(); + + return true; +} + +bool ADLPlayer::readHeader(Common::SeekableReadStream &adl, int &timbreCount) { + // Sanity check + if (adl.size() < 60) { + warning("ADLPlayer::readHeader(): File too small (%d)", adl.size()); + return false; + } + + _soundMode = adl.readByte(); + timbreCount = adl.readByte() + 1; + + adl.skip(1); + + return true; +} + +bool ADLPlayer::readTimbres(Common::SeekableReadStream &adl, int timbreCount) { + _timbres.resize(timbreCount); + for (Common::Array::iterator t = _timbres.begin(); t != _timbres.end(); ++t) { + for (int i = 0; i < (kOperatorsPerVoice * kParamCount); i++) + t->startParams[i] = adl.readUint16LE(); + } + + if (adl.err()) { + warning("ADLPlayer::readTimbres(): Read failed"); + return false; + } + + return true; +} + +bool ADLPlayer::readSongData(Common::SeekableReadStream &adl) { + _songDataSize = adl.size() - adl.pos(); + _songData = new byte[_songDataSize]; + + if (adl.read(_songData, _songDataSize) != _songDataSize) { + warning("ADLPlayer::readSongData(): Read failed"); + return false; + } + + return true; +} + +bool ADLPlayer::load(const byte *data, uint32 dataSize, int index) { + unload(); + + Common::MemoryReadStream stream(data, dataSize); + if (!load(stream)) + return false; + + _index = index; + return true; +} + +void ADLPlayer::setInstrument(int voice, int instrument) { + if ((voice >= kMaxVoiceCount) || ((uint)instrument >= _timbres.size())) + return; + + _currentInstruments[voice] = instrument; + + setVoiceTimbre(voice, _timbres[instrument].params); +} + +int ADLPlayer::getIndex() const { + return _index; +} + +} // End of namespace Gob diff --git a/engines/gob/sound/adlplayer.h b/engines/gob/sound/adlplayer.h new file mode 100644 index 0000000000..9596447bbc --- /dev/null +++ b/engines/gob/sound/adlplayer.h @@ -0,0 +1,85 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_SOUND_ADLPLAYER_H +#define GOB_SOUND_ADLPLAYER_H + +#include "common/array.h" + +#include "gob/sound/adlib.h" + +namespace Common { + class SeekableReadStream; +} + +namespace Gob { + +/** A player for Coktel Vision's ADL music format. */ +class ADLPlayer : public AdLib { +public: + ADLPlayer(Audio::Mixer &mixer); + ~ADLPlayer(); + + bool load(Common::SeekableReadStream &adl); + bool load(const byte *data, uint32 dataSize, int index = -1); + void unload(); + + int getIndex() const; + +protected: + // AdLib interface + uint32 pollMusic(bool first); + void rewind(); + +private: + struct Timbre { + uint16 startParams[kOperatorsPerVoice * kParamCount]; + uint16 params[kOperatorsPerVoice * kParamCount]; + }; + + uint8 _soundMode; + + Common::Array _timbres; + + byte *_songData; + uint32 _songDataSize; + + const byte *_playPos; + + int _index; + + uint8 _modifyInstrument; + uint16 _currentInstruments[kMaxVoiceCount]; + + + void setInstrument(int voice, int instrument); + + bool readHeader (Common::SeekableReadStream &adl, int &timbreCount); + bool readTimbres (Common::SeekableReadStream &adl, int timbreCount); + bool readSongData(Common::SeekableReadStream &adl); + + uint32 getSampleDelay(uint16 delay) const; +}; + +} // End of namespace Gob + +#endif // GOB_SOUND_ADLPLAYER_H diff --git a/engines/gob/sound/musplayer.cpp b/engines/gob/sound/musplayer.cpp new file mode 100644 index 0000000000..3e41dc6ed1 --- /dev/null +++ b/engines/gob/sound/musplayer.cpp @@ -0,0 +1,391 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/stream.h" +#include "common/textconsole.h" + +#include "gob/sound/musplayer.h" + +namespace Gob { + +MUSPlayer::MUSPlayer(Audio::Mixer &mixer) : AdLib(mixer), + _songData(0), _songDataSize(0), _playPos(0), _songID(0) { + +} + +MUSPlayer::~MUSPlayer() { + unload(); +} + +void MUSPlayer::unload() { + stopPlay(); + + unloadSND(); + unloadMUS(); +} + +uint32 MUSPlayer::getSampleDelay(uint16 delay) const { + if (delay == 0) + return 0; + + uint32 freq = (_ticksPerBeat * _tempo) / 60; + + return ((uint32)delay * getSamplesPerSecond()) / freq; +} + +void MUSPlayer::skipToTiming() { + while (*_playPos < 0x80) + _playPos++; + + if (*_playPos != 0xF8) + _playPos--; +} + +uint32 MUSPlayer::pollMusic(bool first) { + if (_timbres.empty() || !_songData || !_playPos || (_playPos >= (_songData + _songDataSize))) { + end(); + return 0; + } + + if (first) + return getSampleDelay(*_playPos++); + + uint16 delay = 0; + while (delay == 0) { + byte cmd = *_playPos; + + // Delay overflow + if (cmd == 0xF8) { + _playPos++; + delay = 0xF8; + break; + } + + // Song end marker + if (cmd == 0xFC) { + end(); + return 0; + } + + // Global command + if (cmd == 0xF0) { + _playPos++; + + byte type1 = *_playPos++; + byte type2 = *_playPos++; + + if ((type1 == 0x7F) && (type2 == 0)) { + // Tempo change, as a fraction of the base tempo + + uint32 num = *_playPos++; + uint32 denom = *_playPos++; + + _tempo = _baseTempo * num + ((_baseTempo * denom) >> 7); + + _playPos++; + } else { + + // Unsupported global command, skip it + _playPos -= 2; + while(*_playPos++ != 0xF7) + ; + } + + delay = *_playPos++; + break; + } + + // Voice command + + if (cmd >= 0x80) { + _playPos++; + + _lastCommand = cmd; + } else + cmd = _lastCommand; + + uint8 voice = cmd & 0x0F; + uint8 note, volume; + uint16 pitch; + + switch (cmd & 0xF0) { + case 0x80: // Note off + _playPos += 2; + noteOff(voice); + break; + + case 0x90: // Note on + note = *_playPos++; + volume = *_playPos++; + + if (volume) { + setVoiceVolume(voice, volume); + noteOn(voice, note); + } else + noteOff(voice); + break; + + case 0xA0: // Set volume + setVoiceVolume(voice, *_playPos++); + break; + + case 0xB0: + _playPos += 2; + break; + + case 0xC0: // Set instrument + setInstrument(voice, *_playPos++); + break; + + case 0xD0: + _playPos++; + break; + + case 0xE0: // Pitch bend + pitch = *_playPos++; + pitch += *_playPos++ << 7; + bendVoicePitch(voice, pitch); + break; + + default: + warning("MUSPlayer: Unsupported command: 0x%02X", cmd); + skipToTiming(); + break; + } + + delay = *_playPos++; + } + + if (delay == 0xF8) { + delay = 240; + + if (*_playPos != 0xF8) + delay += *_playPos++; + } + + return getSampleDelay(delay); +} + +void MUSPlayer::rewind() { + _playPos = _songData; + _tempo = _baseTempo; + + _lastCommand = 0; + + setPercussionMode(_soundMode != 0); + setPitchRange(_pitchBendRange); +} + +bool MUSPlayer::loadSND(Common::SeekableReadStream &snd) { + unloadSND(); + + int timbreCount, timbrePos; + if (!readSNDHeader(snd, timbreCount, timbrePos)) + return false; + + if (!readSNDTimbres(snd, timbreCount, timbrePos) || snd.err()) { + unloadSND(); + return false; + } + + return true; +} + +bool MUSPlayer::readString(Common::SeekableReadStream &stream, Common::String &string, byte *buffer, uint size) { + if (stream.read(buffer, size) != size) + return false; + + buffer[size] = '\0'; + + string = (char *) buffer; + + return true; +} + +bool MUSPlayer::readSNDHeader(Common::SeekableReadStream &snd, int &timbreCount, int &timbrePos) { + // Sanity check + if (snd.size() <= 6) { + warning("MUSPlayer::readSNDHeader(): File too small (%d)", snd.size()); + return false; + } + + // Version + const uint8 versionMajor = snd.readByte(); + const uint8 versionMinor = snd.readByte(); + + if ((versionMajor != 1) && (versionMinor != 0)) { + warning("MUSPlayer::readSNDHeader(): Unsupported version %d.%d", versionMajor, versionMinor); + return false; + } + + // Number of timbres and where they start + timbreCount = snd.readUint16LE(); + timbrePos = snd.readUint16LE(); + + const uint16 minTimbrePos = 6 + timbreCount * 9; + + // Sanity check + if (timbrePos < minTimbrePos) { + warning("MUSPlayer::readSNDHeader(): Timbre offset too small: %d < %d", timbrePos, minTimbrePos); + return false; + } + + const uint32 timbreParametersSize = snd.size() - timbrePos; + const uint32 paramSize = kOperatorsPerVoice * kParamCount * sizeof(uint16); + + // Sanity check + if (timbreParametersSize != (timbreCount * paramSize)) { + warning("MUSPlayer::loadSND(): Timbre parameters size mismatch: %d != %d", + timbreParametersSize, timbreCount * paramSize); + return false; + } + + return true; +} + +bool MUSPlayer::readSNDTimbres(Common::SeekableReadStream &snd, int timbreCount, int timbrePos) { + _timbres.resize(timbreCount); + + // Read names + byte nameBuffer[10]; + for (Common::Array::iterator t = _timbres.begin(); t != _timbres.end(); ++t) { + if (!readString(snd, t->name, nameBuffer, 9)) { + warning("MUSPlayer::readMUSTimbres(): Failed to read timbre name"); + return false; + } + } + + if (!snd.seek(timbrePos)) { + warning("MUSPlayer::readMUSTimbres(): Failed to seek to timbres"); + return false; + } + + // Read parameters + for (Common::Array::iterator t = _timbres.begin(); t != _timbres.end(); ++t) { + for (int i = 0; i < (kOperatorsPerVoice * kParamCount); i++) + t->params[i] = snd.readUint16LE(); + } + + return true; +} + +bool MUSPlayer::loadMUS(Common::SeekableReadStream &mus) { + unloadMUS(); + + if (!readMUSHeader(mus) || !readMUSSong(mus) || mus.err()) { + unloadMUS(); + return false; + } + + rewind(); + + return true; +} + +bool MUSPlayer::readMUSHeader(Common::SeekableReadStream &mus) { + // Sanity check + if (mus.size() <= 6) + return false; + + // Version + const uint8 versionMajor = mus.readByte(); + const uint8 versionMinor = mus.readByte(); + + if ((versionMajor != 1) && (versionMinor != 0)) { + warning("MUSPlayer::readMUSHeader(): Unsupported version %d.%d", versionMajor, versionMinor); + return false; + } + + _songID = mus.readUint32LE(); + + byte nameBuffer[31]; + if (!readString(mus, _songName, nameBuffer, 30)) { + warning("MUSPlayer::readMUSHeader(): Failed to read the song name"); + return false; + } + + _ticksPerBeat = mus.readByte(); + _beatsPerMeasure = mus.readByte(); + + mus.skip(4); // Length of song in ticks + + _songDataSize = mus.readUint32LE(); + + mus.skip(4); // Number of commands + mus.skip(8); // Unused + + _soundMode = mus.readByte(); + _pitchBendRange = mus.readByte(); + _baseTempo = mus.readUint16LE(); + + mus.skip(8); // Unused + + return true; +} + +bool MUSPlayer::readMUSSong(Common::SeekableReadStream &mus) { + const uint32 realSongDataSize = mus.size() - mus.pos(); + + if (realSongDataSize < _songDataSize) { + warning("MUSPlayer::readMUSSong(): File too small for the song data: %d < %d", realSongDataSize, _songDataSize); + return false; + } + + _songData = new byte[_songDataSize]; + + if (mus.read(_songData, _songDataSize) != _songDataSize) { + warning("MUSPlayer::readMUSSong(): Read failed"); + return false; + } + + return true; +} + +void MUSPlayer::unloadSND() { + _timbres.clear(); +} + +void MUSPlayer::unloadMUS() { + delete[] _songData; + + _songData = 0; + _songDataSize = 0; + + _playPos = 0; +} + +uint32 MUSPlayer::getSongID() const { + return _songID; +} + +const Common::String &MUSPlayer::getSongName() const { + return _songName; +} + +void MUSPlayer::setInstrument(uint8 voice, uint8 instrument) { + if (instrument >= _timbres.size()) + return; + + setVoiceTimbre(voice, _timbres[instrument].params); +} + +} // End of namespace Gob diff --git a/engines/gob/sound/musplayer.h b/engines/gob/sound/musplayer.h new file mode 100644 index 0000000000..6cc2a2d2ca --- /dev/null +++ b/engines/gob/sound/musplayer.h @@ -0,0 +1,109 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_SOUND_MUSPLAYER_H +#define GOB_SOUND_MUSPLAYER_H + +#include "common/str.h" +#include "common/array.h" + +#include "gob/sound/adlib.h" + +namespace Common { + class SeekableReadStream; +} + +namespace Gob { + +/** A player for the AdLib MUS format, with the instrument information in SND files. + * + * In the Gob engine, those files are usually named .MDY and .TBR instead. + */ +class MUSPlayer : public AdLib { +public: + MUSPlayer(Audio::Mixer &mixer); + ~MUSPlayer(); + + /** Load the instruments (.SND or .TBR) */ + bool loadSND(Common::SeekableReadStream &snd); + /** Load the melody (.MUS or .MDY) */ + bool loadMUS(Common::SeekableReadStream &mus); + + void unload(); + + uint32 getSongID() const; + const Common::String &getSongName() const; + +protected: + // AdLib interface + uint32 pollMusic(bool first); + void rewind(); + +private: + struct Timbre { + Common::String name; + + uint16 params[kOperatorsPerVoice * kParamCount]; + }; + + Common::Array _timbres; + + byte *_songData; + uint32 _songDataSize; + + const byte *_playPos; + + uint32 _songID; + Common::String _songName; + + uint8 _ticksPerBeat; + uint8 _beatsPerMeasure; + + uint8 _soundMode; + uint8 _pitchBendRange; + + uint16 _baseTempo; + + uint16 _tempo; + + byte _lastCommand; + + + void unloadSND(); + void unloadMUS(); + + bool readSNDHeader (Common::SeekableReadStream &snd, int &timbreCount, int &timbrePos); + bool readSNDTimbres(Common::SeekableReadStream &snd, int timbreCount, int timbrePos); + + bool readMUSHeader(Common::SeekableReadStream &mus); + bool readMUSSong (Common::SeekableReadStream &mus); + + uint32 getSampleDelay(uint16 delay) const; + void setInstrument(uint8 voice, uint8 instrument); + void skipToTiming(); + + static bool readString(Common::SeekableReadStream &stream, Common::String &string, byte *buffer, uint size); +}; + +} // End of namespace Gob + +#endif // GOB_SOUND_MUSPLAYER_H diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index bfe0394390..f14e9b150a 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -30,7 +30,8 @@ #include "gob/sound/pcspeaker.h" #include "gob/sound/soundblaster.h" -#include "gob/sound/adlib.h" +#include "gob/sound/adlplayer.h" +#include "gob/sound/musplayer.h" #include "gob/sound/infogrames.h" #include "gob/sound/protracker.h" #include "gob/sound/cdrom.h" @@ -131,10 +132,7 @@ void Sound::sampleFree(SoundDesc *sndDesc, bool noteAdLib, int index) { if (noteAdLib) { if (_adlPlayer) if ((index == -1) || (_adlPlayer->getIndex() == index)) - _adlPlayer->stopPlay(); - if (_mdyPlayer) - if ((index == -1) || (_mdyPlayer->getIndex() == index)) - _mdyPlayer->stopPlay(); + _adlPlayer->unload(); } } else { @@ -235,7 +233,17 @@ bool Sound::adlibLoadADL(const char *fileName) { debugC(1, kDebugSound, "AdLib: Loading ADL data (\"%s\")", fileName); - return _adlPlayer->load(fileName); + Common::SeekableReadStream *stream = _vm->_dataIO->getFile(fileName); + if (!stream) { + warning("Can't open ADL file \"%s\"", fileName); + return false; + } + + bool loaded = _adlPlayer->load(*stream); + + delete stream; + + return loaded; } bool Sound::adlibLoadADL(byte *data, uint32 size, int index) { @@ -267,7 +275,7 @@ bool Sound::adlibLoadMDY(const char *fileName) { return false; if (!_mdyPlayer) - _mdyPlayer = new MDYPlayer(*_vm->_mixer); + _mdyPlayer = new MUSPlayer(*_vm->_mixer); debugC(1, kDebugSound, "AdLib: Loading MDY data (\"%s\")", fileName); @@ -277,7 +285,7 @@ bool Sound::adlibLoadMDY(const char *fileName) { return false; } - bool loaded = _mdyPlayer->loadMDY(*stream); + bool loaded = _mdyPlayer->loadMUS(*stream); delete stream; @@ -289,7 +297,7 @@ bool Sound::adlibLoadTBR(const char *fileName) { return false; if (!_mdyPlayer) - _mdyPlayer = new MDYPlayer(*_vm->_mixer); + _mdyPlayer = new MUSPlayer(*_vm->_mixer); Common::SeekableReadStream *stream = _vm->_dataIO->getFile(fileName); if (!stream) { @@ -299,7 +307,7 @@ bool Sound::adlibLoadTBR(const char *fileName) { debugC(1, kDebugSound, "AdLib: Loading MDY instruments (\"%s\")", fileName); - bool loaded = _mdyPlayer->loadTBR(*stream); + bool loaded = _mdyPlayer->loadSND(*stream); delete stream; @@ -316,11 +324,8 @@ void Sound::adlibPlayTrack(const char *trackname) { if (_adlPlayer->isPlaying()) return; - debugC(1, kDebugSound, "AdLib: Playing ADL track \"%s\"", trackname); - - _adlPlayer->unload(); - _adlPlayer->load(trackname); - _adlPlayer->startPlay(); + if (adlibLoadADL(trackname)) + adlibPlay(); } void Sound::adlibPlayBgMusic() { @@ -331,7 +336,7 @@ void Sound::adlibPlayBgMusic() { _adlPlayer = new ADLPlayer(*_vm->_mixer); static const char *const tracksMac[] = { -// "musmac1.adl", // TODO: This track isn't played correctly at all yet +// "musmac1.adl", // This track seems to be missing instruments... "musmac2.adl", "musmac3.adl", "musmac4.adl", @@ -398,13 +403,11 @@ int Sound::adlibGetIndex() const { if (_adlPlayer) return _adlPlayer->getIndex(); - if (_mdyPlayer) - return _mdyPlayer->getIndex(); return -1; } -bool Sound::adlibGetRepeating() const { +int32 Sound::adlibGetRepeating() const { if (!_hasAdLib) return false; diff --git a/engines/gob/sound/sound.h b/engines/gob/sound/sound.h index 585cf36703..ea7d639ffe 100644 --- a/engines/gob/sound/sound.h +++ b/engines/gob/sound/sound.h @@ -32,7 +32,7 @@ class GobEngine; class PCSpeaker; class SoundBlaster; class ADLPlayer; -class MDYPlayer; +class MUSPlayer; class Infogrames; class Protracker; class CDROM; @@ -92,7 +92,7 @@ public: bool adlibIsPlaying() const; int adlibGetIndex() const; - bool adlibGetRepeating() const; + int32 adlibGetRepeating() const; void adlibSetRepeating(int32 repCount); @@ -145,14 +145,23 @@ private: SoundDesc _sounds[kSoundsCount]; + // Speaker PCSpeaker *_pcspeaker; + + // PCM based SoundBlaster *_blaster; + BackgroundAtmosphere *_bgatmos; + + // AdLib + MUSPlayer *_mdyPlayer; ADLPlayer *_adlPlayer; - MDYPlayer *_mdyPlayer; + + // Amiga Paula Infogrames *_infogrames; Protracker *_protracker; + + // Audio CD CDROM *_cdrom; - BackgroundAtmosphere *_bgatmos; }; } // End of namespace Gob -- cgit v1.2.3 From 8548dea13d56e1d69b2f4743361932cf14dd6eee Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 11 Jun 2012 05:09:58 +0200 Subject: GOB: Hook up the MDY player in Fascination --- engines/gob/init_fascin.cpp | 6 +++--- engines/gob/inter_fascin.cpp | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/engines/gob/init_fascin.cpp b/engines/gob/init_fascin.cpp index b87d816406..e6d82faa68 100644 --- a/engines/gob/init_fascin.cpp +++ b/engines/gob/init_fascin.cpp @@ -44,10 +44,10 @@ void Init_Fascination::updateConfig() { } void Init_Fascination::initGame() { -// HACK - Suppress ADLIB_FLAG as the MDY/TBR player is not working. suppress -// the PC Speaker too, as the script checks in the intro for it's presence +// HACK - Suppress +// the PC Speaker, as the script checks in the intro for it's presence // to play or not some noices. - _vm->_global->_soundFlags = MIDI_FLAG | BLASTER_FLAG; + _vm->_global->_soundFlags = MIDI_FLAG | BLASTER_FLAG | ADLIB_FLAG; Init::initGame(); } diff --git a/engines/gob/inter_fascin.cpp b/engines/gob/inter_fascin.cpp index 081b48fbad..001ec06635 100644 --- a/engines/gob/inter_fascin.cpp +++ b/engines/gob/inter_fascin.cpp @@ -248,12 +248,11 @@ void Inter_Fascination::oFascin_playTira(OpGobParams ¶ms) { void Inter_Fascination::oFascin_loadExtasy(OpGobParams ¶ms) { _vm->_sound->adlibLoadTBR("extasy.tbr"); _vm->_sound->adlibLoadMDY("extasy.mdy"); + _vm->_sound->adlibSetRepeating(-1); } void Inter_Fascination::oFascin_adlibPlay(OpGobParams ¶ms) { -#ifdef ENABLE_FASCIN_ADLIB _vm->_sound->adlibPlay(); -#endif } void Inter_Fascination::oFascin_adlibStop(OpGobParams ¶ms) { -- cgit v1.2.3 From a64e8a6d30fbef1de52684b75bb6f4536b28d988 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 11 Jun 2012 05:10:24 +0200 Subject: GOB: Hook up the MDY player in Geisha --- engines/gob/init.h | 1 - engines/gob/init_geisha.cpp | 7 ------- engines/gob/inter_geisha.cpp | 5 ++--- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/engines/gob/init.h b/engines/gob/init.h index 946a3fa4f1..ac460fd654 100644 --- a/engines/gob/init.h +++ b/engines/gob/init.h @@ -62,7 +62,6 @@ public: ~Init_Geisha(); void initVideo(); - void initGame(); }; class Init_v2 : public Init_v1 { diff --git a/engines/gob/init_geisha.cpp b/engines/gob/init_geisha.cpp index b5bbcff400..01081a5af6 100644 --- a/engines/gob/init_geisha.cpp +++ b/engines/gob/init_geisha.cpp @@ -44,11 +44,4 @@ void Init_Geisha::initVideo() { _vm->_draw->_transparentCursor = 1; } -void Init_Geisha::initGame() { - // HACK - Since the MDY/TBR player is not working, claim we have no AdLib - _vm->_global->_soundFlags = 0; - - Init::initGame(); -} - } // End of namespace Gob diff --git a/engines/gob/inter_geisha.cpp b/engines/gob/inter_geisha.cpp index 75204a3f55..8a4d4246b6 100644 --- a/engines/gob/inter_geisha.cpp +++ b/engines/gob/inter_geisha.cpp @@ -298,9 +298,8 @@ void Inter_Geisha::oGeisha_loadTitleMusic(OpGobParams ¶ms) { } void Inter_Geisha::oGeisha_playMusic(OpGobParams ¶ms) { - // TODO: The MDYPlayer is still broken! - warning("Geisha Stub: oGeisha_playMusic"); - // _vm->_sound->adlibPlay(); + _vm->_sound->adlibSetRepeating(-1); + _vm->_sound->adlibPlay(); } void Inter_Geisha::oGeisha_stopMusic(OpGobParams ¶ms) { -- cgit v1.2.3 From 385bd7c6a045b1a4c7b64ebef4471805020bdadd Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 11 Jun 2012 05:24:30 +0200 Subject: NEWS: Mention Gob news for 1.5.0 --- NEWS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NEWS b/NEWS index 7ce4f255dd..acff8b8473 100644 --- a/NEWS +++ b/NEWS @@ -45,6 +45,11 @@ For a more comprehensive changelog of the latest experimental code, see: Cine: - Implemented Roland MT-32 output driver. + Gob: + - Fixed a crash in Lost in Time + - Rewrote the AdLib player. Enabled the now working MDY player in + Fascination and Geisha. + SCUMM: - Added support for the Macintosh version of SPY Fox in Hold the Mustard. - Added a difficulty selection dialog for Loom FM-TOWNS. -- cgit v1.2.3 From fe44939eba096bad083254b1c5152ef070ac4dc8 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 11 Jun 2012 06:11:53 +0200 Subject: GOB: Play the music on the title screen of Gob1 EGA The EGA version of Gobliiins comes with an MDY track. While the original doesn't play it, we thought it might be a nice idea to play it nevertheless. --- engines/gob/detection_tables.h | 4 ++-- engines/gob/inter_v1.cpp | 34 +++++++++++++++++++++++++-- engines/gob/sound/adlib.h | 6 ++--- engines/gob/sound/sound.cpp | 53 ++++++++++++++++++++++++++++++------------ engines/gob/sound/sound.h | 4 ++++ 5 files changed, 79 insertions(+), 22 deletions(-) diff --git a/engines/gob/detection_tables.h b/engines/gob/detection_tables.h index 7aa58b9b97..77b54a19cd 100644 --- a/engines/gob/detection_tables.h +++ b/engines/gob/detection_tables.h @@ -34,7 +34,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, kGameTypeGob1, - kFeaturesEGA, + kFeaturesEGA | kFeaturesAdLib, 0, 0, 0 }, { @@ -48,7 +48,7 @@ static const GOBGameDescription gameDescriptions[] = { GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, kGameTypeGob1, - kFeaturesEGA, + kFeaturesEGA | kFeaturesAdLib, 0, 0, 0 }, { // Supplied by Theruler76 in bug report #1201233 diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 4aa54f720b..6fc472a0ac 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -286,10 +286,40 @@ void Inter_v1::o1_loadMult() { } void Inter_v1::o1_playMult() { - int16 checkEscape; + // NOTE: The EGA version of Gobliiins has an MDY tune. + // While the original doesn't play it, we do. + bool isGob1EGAIntro = _vm->getGameType() == kGameTypeGob1 && + _vm->isEGA() && + _vm->_game->_script->pos() == 1010 && + _vm->isCurrentTot("intro.tot") && + VAR(57) != 0xFFFFFFFF && + _vm->_dataIO->hasFile("goblins.mdy") && + _vm->_dataIO->hasFile("goblins.tbr"); + + int16 checkEscape = _vm->_game->_script->readInt16(); + + if (isGob1EGAIntro) { + _vm->_sound->adlibLoadTBR("goblins.tbr"); + _vm->_sound->adlibLoadMDY("goblins.mdy"); + _vm->_sound->adlibSetRepeating(-1); + + _vm->_sound->adlibPlay(); + } - checkEscape = _vm->_game->_script->readInt16(); _vm->_mult->playMult(VAR(57), -1, checkEscape, 0); + + if (isGob1EGAIntro) { + + // User didn't escape the intro mult, wait for an escape here + if (VAR(57) != 0xFFFFFFFF) { + while (_vm->_util->getKey() != kKeyEscape) { + _vm->_util->processInput(); + _vm->_util->longDelay(1); + } + } + + _vm->_sound->adlibUnload(); + } } void Inter_v1::o1_freeMultKeys() { diff --git a/engines/gob/sound/adlib.h b/engines/gob/sound/adlib.h index df1b77fd4d..17ab950752 100644 --- a/engines/gob/sound/adlib.h +++ b/engines/gob/sound/adlib.h @@ -20,8 +20,8 @@ * */ -#ifndef GOB_SOUND_NEWADLIB_H -#define GOB_SOUND_NEWADLIB_H +#ifndef GOB_SOUND_ADLIB_H +#define GOB_SOUND_ADLIB_H #include "common/mutex.h" @@ -303,4 +303,4 @@ private: } // End of namespace Gob -#endif // GOB_SOUND_NEWADLIB_H +#endif // GOB_SOUND_ADLIB_H diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index f14e9b150a..9f72d1a98f 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -51,6 +51,8 @@ Sound::Sound(GobEngine *vm) : _vm(vm) { _hasAdLib = (!_vm->_noMusic && _vm->hasAdLib()); + _hasAdLibBg = _hasAdLib; + if (!_vm->_noMusic && (_vm->getPlatform() == Common::kPlatformAmiga)) { _infogrames = new Infogrames(*_vm->_mixer); _protracker = new Protracker(*_vm->_mixer); @@ -274,8 +276,7 @@ bool Sound::adlibLoadMDY(const char *fileName) { if (!_hasAdLib) return false; - if (!_mdyPlayer) - _mdyPlayer = new MUSPlayer(*_vm->_mixer); + createMDYPlayer(); debugC(1, kDebugSound, "AdLib: Loading MDY data (\"%s\")", fileName); @@ -296,8 +297,7 @@ bool Sound::adlibLoadTBR(const char *fileName) { if (!_hasAdLib) return false; - if (!_mdyPlayer) - _mdyPlayer = new MUSPlayer(*_vm->_mixer); + createMDYPlayer(); Common::SeekableReadStream *stream = _vm->_dataIO->getFile(fileName); if (!stream) { @@ -318,8 +318,7 @@ void Sound::adlibPlayTrack(const char *trackname) { if (!_hasAdLib) return; - if (!_adlPlayer) - _adlPlayer = new ADLPlayer(*_vm->_mixer); + createADLPlayer(); if (_adlPlayer->isPlaying()) return; @@ -329,11 +328,10 @@ void Sound::adlibPlayTrack(const char *trackname) { } void Sound::adlibPlayBgMusic() { - if (!_hasAdLib) + if (!_hasAdLib || _hasAdLibBg) return; - if (!_adlPlayer) - _adlPlayer = new ADLPlayer(*_vm->_mixer); + createADLPlayer(); static const char *const tracksMac[] = { // "musmac1.adl", // This track seems to be missing instruments... @@ -352,13 +350,18 @@ void Sound::adlibPlayBgMusic() { "musmac5.mid" }; - if (_vm->getPlatform() == Common::kPlatformWindows) { - int track = _vm->_util->getRandom(ARRAYSIZE(tracksWin)); - adlibPlayTrack(tracksWin[track]); - } else { - int track = _vm->_util->getRandom(ARRAYSIZE(tracksMac)); - adlibPlayTrack(tracksMac[track]); + const char *track = 0; + if (_vm->getPlatform() == Common::kPlatformWindows) + track = tracksWin[ARRAYSIZE(tracksWin)]; + else + track = tracksMac[_vm->_util->getRandom(ARRAYSIZE(tracksMac))]; + + if (!track || !_vm->_dataIO->hasFile(track)) { + _hasAdLibBg = false; + return; } + + adlibPlayTrack(track); } void Sound::adlibPlay() { @@ -722,4 +725,24 @@ void Sound::bgUnshade() { _bgatmos->unshade(); } +void Sound::createMDYPlayer() { + if (_mdyPlayer) + return; + + delete _adlPlayer; + _adlPlayer = 0; + + _mdyPlayer = new MUSPlayer(*_vm->_mixer); +} + +void Sound::createADLPlayer() { + if (_adlPlayer) + return; + + delete _mdyPlayer; + _mdyPlayer= 0; + + _adlPlayer = new ADLPlayer(*_vm->_mixer); +} + } // End of namespace Gob diff --git a/engines/gob/sound/sound.h b/engines/gob/sound/sound.h index ea7d639ffe..064a249253 100644 --- a/engines/gob/sound/sound.h +++ b/engines/gob/sound/sound.h @@ -142,6 +142,7 @@ private: GobEngine *_vm; bool _hasAdLib; + bool _hasAdLibBg; SoundDesc _sounds[kSoundsCount]; @@ -162,6 +163,9 @@ private: // Audio CD CDROM *_cdrom; + + void createMDYPlayer(); + void createADLPlayer(); }; } // End of namespace Gob -- cgit v1.2.3 From 0ccfd614aa935ed38a4fce7888c91ff1429691f1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 11 Jun 2012 11:48:49 +0300 Subject: SCI: Add more verbose debug output for DoAudio in SCI2.1 --- engines/sci/engine/ksound.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp index c469f775f9..b378b4d58b 100644 --- a/engines/sci/engine/ksound.cpp +++ b/engines/sci/engine/ksound.cpp @@ -140,8 +140,12 @@ reg_t kDoAudio(EngineState *s, int argc, reg_t *argv) { ((argv[3].toUint16() & 0xff) << 16) | ((argv[4].toUint16() & 0xff) << 8) | (argv[5].toUint16() & 0xff); - if (argc == 8) - warning("kDoAudio: Play called with SQ6 extra parameters"); + if (argc == 8) { + // argv[6] is always 1 + // argv[7] is the contents of global 229 (0xE5) + warning("kDoAudio: Play called with SCI2.1 extra parameters: %04x:%04x and %04x:%04x", + PRINT_REG(argv[6]), PRINT_REG(argv[7])); + } } else { warning("kDoAudio: Play called with an unknown number of parameters (%d)", argc); return NULL_REG; -- cgit v1.2.3 From b812ed50c8f6d9a24b607831a88a398730458d9a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 11 Jun 2012 11:51:54 +0300 Subject: SCI: Bugfix for negative numbers in kString(at) Fixes one of the bugs in the savegame selection screen in Phantasmagoria --- engines/sci/engine/kstring.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index fe8d631497..0877e37a65 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -653,10 +653,18 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) { case 1: // Size return make_reg(0, s->_segMan->getString(argv[1]).size()); case 2: { // At (return value at an index) - if (argv[1].segment == s->_segMan->getStringSegmentId()) - return make_reg(0, s->_segMan->lookupString(argv[1])->getRawData()[argv[2].toUint16()]); - - return make_reg(0, s->_segMan->getString(argv[1])[argv[2].toUint16()]); + // Note that values need to be truncated to bytes, otherwise + // 0xff (negative char -1) will incorrectly be changed to + // 0xffff (negative int16 -1) + if (argv[1].segment == s->_segMan->getStringSegmentId()) { + SciString *string = s->_segMan->lookupString(argv[1]); + byte val = string->getRawData()[argv[2].toUint16()]; + return make_reg(0, val); + } else { + Common::String string = s->_segMan->getString(argv[1]); + byte val = string[argv[2].toUint16()]; + return make_reg(0, val); + } } case 3: { // Atput (put value at an index) SciString *string = s->_segMan->lookupString(argv[1]); -- cgit v1.2.3 From f538b7658684aad26a38b2e3685a322ecc14a720 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 11 Jun 2012 14:59:12 +0200 Subject: GOB: Don't recalculate the AdLib frequencies table on every player reset --- engines/gob/sound/adlib.cpp | 8 +++++++- engines/gob/sound/adlib.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp index 3f46f6cf4b..d9fc362547 100644 --- a/engines/gob/sound/adlib.cpp +++ b/engines/gob/sound/adlib.cpp @@ -98,6 +98,8 @@ AdLib::AdLib(Audio::Mixer &mixer) : _mixer(&mixer), _opl(0), _rate = _mixer->getOutputRate(); + initFreqs(); + createOPL(); initOPL(); @@ -295,7 +297,7 @@ void AdLib::initOPL() { _opl->reset(); initOperatorVolumes(); - initFreqs(); + resetFreqs(); setPercussionMode(false); @@ -581,6 +583,10 @@ void AdLib::initFreqs() { for (int i = 0; i < kPitchStepCount; i++) setFreqs(_freqs[i], i * numStep, 100); + resetFreqs(); +} + +void AdLib::resetFreqs() { for (int i = 0; i < kMaxVoiceCount; i++) { _freqPtr [i] = _freqs[0]; _halfToneOffset[i] = 0; diff --git a/engines/gob/sound/adlib.h b/engines/gob/sound/adlib.h index 17ab950752..bd1778d2ed 100644 --- a/engines/gob/sound/adlib.h +++ b/engines/gob/sound/adlib.h @@ -295,6 +295,7 @@ private: void initFreqs(); void setFreqs(uint16 *freqs, int32 num, int32 denom); int32 calcFreq(int32 deltaDemiToneNum, int32 deltaDemiToneDenom); + void resetFreqs(); void changePitch(uint8 voice, uint16 pitchBend); -- cgit v1.2.3 From c3f89b78c9462b406821a7b80ebf99d8a5245132 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 11 Jun 2012 15:04:46 +0200 Subject: README: Update Gob game list --- README | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README b/README index 81b28830c2..1024c6764b 100644 --- a/README +++ b/README @@ -235,13 +235,17 @@ AGOS Games by Adventuresoft/Horrorsoft: The Feeble Files [feeble] GOB Games by Coktel Vision: + Bambou le sauveur de la jungle [bambou] Bargon Attack [bargon] + Fascination [fascination] + Geisha [geisha] Gobliiins [gob1] Gobliins 2 [gob2] Goblins 3 [gob3] Lost in Time [lostintime] The Bizarre Adventures of Woodruff and the Schnibble [woodruff] + Urban Runner [urban] Ween: The Prophecy [ween] MADE Games by Activision: -- cgit v1.2.3 From a3db17033f9b251760e76d4ba7c7e66003cc228d Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 11 Jun 2012 15:07:01 +0200 Subject: GOB: Update list of games in the comment --- engines/gob/gob.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engines/gob/gob.h b/engines/gob/gob.h index ea2323807a..6277585015 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -50,6 +50,10 @@ class StaticTextWidget; * - Bargon Attack * - Lost in Time * - The Bizarre Adventures of Woodruff and the Schnibble + * - Fascination + * - Urban Runner + * - Bambou le sauveur de la jungle + * - Geisha */ namespace Gob { -- cgit v1.2.3 From f87e8b53f333c6799302d620a2c36668b92c77f0 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 11 Jun 2012 15:09:48 +0200 Subject: GOB: Fix an AmigaOS compile error Should close bug #3534287. --- engines/gob/minigames/geisha/meter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/gob/minigames/geisha/meter.cpp b/engines/gob/minigames/geisha/meter.cpp index 719ecf3d18..7ec3119866 100644 --- a/engines/gob/minigames/geisha/meter.cpp +++ b/engines/gob/minigames/geisha/meter.cpp @@ -67,7 +67,7 @@ int32 Meter::increase(int32 n) { if (n < 0) return decrease(-n); - int32 overflow = MAX(0, (_value + n) - _maxValue); + int32 overflow = MAX(0, (_value + n) - _maxValue); int32 value = CLIP(_value + n, 0, _maxValue); if (_value == value) @@ -83,7 +83,7 @@ int32 Meter::decrease(int32 n) { if (n < 0) return increase(-n); - int32 underflow = -MIN(0, _value - n); + int32 underflow = -MIN(0, _value - n); int32 value = CLIP(_value - n, 0, _maxValue); if (_value == value) -- cgit v1.2.3 From 734a361f2e49c15b4ac1029c39b478ff2843c924 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 11 Jun 2012 10:16:07 -0400 Subject: SCUMM: Fix basketball ini name --- engines/scumm/he/script_v60he.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp index dbeee567bf..5e359385b6 100644 --- a/engines/scumm/he/script_v60he.cpp +++ b/engines/scumm/he/script_v60he.cpp @@ -124,8 +124,6 @@ int ScummEngine_v60he::convertFilePath(byte *dst, int dstSize) { } else if (dst[0] == '.' && dst[1] == '/') { // Game Data Path // The default game data path is set to './' by ScummVM r = 2; - } else if (dst[2] == 'b' && dst[5] == 'k') { // Backyard Basketball INI - r = 13; } else if (dst[0] == '*' && dst[1] == '/') { // Save Game Path (Windows HE72 - HE100) // The default save game path is set to '*/' by ScummVM r = 2; -- cgit v1.2.3 From 52b14de72a113a4f88b9da6b4f6b1965466bac8a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 11 Jun 2012 18:34:36 +0200 Subject: KYRA: Mark Kyra 1 russian floppy version as fan translation. --- engines/kyra/detection_tables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h index 884fca659b..79ef11e7a9 100644 --- a/engines/kyra/detection_tables.h +++ b/engines/kyra/detection_tables.h @@ -159,7 +159,7 @@ const KYRAGameDescription adGameDescs[] = { }, KYRA1_FLOPPY_FLAGS }, - { + { // russian fan translation { "kyra1", "Extracted", -- cgit v1.2.3 From 3fde390e006963f354c0678640c70f49753907ef Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 11 Jun 2012 20:21:47 +0300 Subject: SCI: Added another French version of Torin's Passage Thanks to LePhilousophe for providing the file details. Also fixed all of the detection entries for Torin's Passage --- engines/sci/detection_tables.h | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 506f79b4d8..6e66c48ff1 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -3744,53 +3744,61 @@ static const struct ADGameDescription SciGameDescriptions[] = { #ifdef ENABLE_SCI32 // Torin's Passage - English Windows Interactive Demo - // SCI interpreter version 2.100.002 (just a guess) + // SCI interpreter version 2.100.002 {"torin", "Demo", { {"resmap.000", 0, "9a3e172cde9963d0a969f26469318cec", 3403}, {"ressci.000", 0, "db3e290481c35c3224e9602e71e4a1f1", 5073868}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - // Torin's Passage - English Windows - // SCI interpreter version 2.100.002 (just a guess) + // Torin's Passage (Multilingual) - English Windows CD + // SCI interpreter version 2.100.002 {"torin", "", { {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - // Torin's Passage - Spanish Windows (from jvprat) + // Torin's Passage (Multilingual) - Spanish Windows CD (from jvprat) // Executable scanning reports "2.100.002", VERSION file reports "1.0" {"torin", "", { {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, // TODO: depend on one of the patches? AD_LISTEND}, - Common::ES_ESP, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + Common::ES_ESP, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - // Torin's Passage - French Windows - // SCI interpreter version 2.100.002 (just a guess) + // Torin's Passage (Multilingual) - French Windows CD + // SCI interpreter version 2.100.002 {"torin", "", { {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, AD_LISTEND}, - Common::FR_FRA, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + Common::FR_FRA, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - // Torin's Passage - German Windows - // SCI interpreter version 2.100.002 (just a guess) + // Torin's Passage (Multilingual) - German Windows CD + // SCI interpreter version 2.100.002 {"torin", "", { {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, AD_LISTEND}, - Common::DE_DEU, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO5(GUIO_NOSPEECH, GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + Common::DE_DEU, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - // Torin's Passage - Italian Windows CD (from glorifindel) - // SCI interpreter version 2.100.002 (just a guess) + // Torin's Passage (Multilingual) - Italian Windows CD (from glorifindel) + // SCI interpreter version 2.100.002 {"torin", "", { {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, AD_LISTEND}, Common::IT_ITA, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + + // Torin's Passage - French Windows (from LePhilousophe) + // SCI interpreter version 2.100.002 + {"torin", "", { + {"resmap.000", 0, "66ed46e3e56f487e688d52f05b33d0ba", 9787}, + {"ressci.000", 0, "118f9bec04bfe17c4f87bbb5ddb43c18", 56126981}, + AD_LISTEND}, + Common::FR_FRA, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, #endif // ENABLE_SCI32 // SCI Fanmade Games -- cgit v1.2.3 From 15306bc554b926e7d50f6a443766065e684557f3 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 11 Jun 2012 20:28:28 +0300 Subject: SCI: Return the default value for unknown configuration settings Based on a patch by LePhilousophe --- engines/sci/engine/kmisc.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index f243cf2ffe..1cbaf0708d 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -396,18 +396,17 @@ reg_t kGetConfig(EngineState *s, int argc, reg_t *argv) { reg_t kGetSierraProfileInt(EngineState *s, int argc, reg_t *argv) { Common::String category = s->_segMan->getString(argv[0]); // always "config" category.toLowercase(); - if (category != "config") - error("GetSierraProfileInt: category isn't 'config', it's '%s'", category.c_str()); - Common::String setting = s->_segMan->getString(argv[1]); setting.toLowercase(); - if (setting != "videospeed") - error("GetSierraProfileInt: setting isn't 'videospeed', it's '%s'", setting.c_str()); + // The third parameter is the default value returned if the configuration key is missing - // The third parameter is 425 (the default if the configuration key is missing) + if (category == "config" && setting == "videospeed") { + // We return the same fake value for videospeed as with kGetConfig + return make_reg(0, 500); + } - // We return the same fake value for videospeed as with kGetConfig - return make_reg(0, 500); + warning("kGetSierraProfileInt: Returning default value %d for unknown setting %s.%s", argv[2].toSint16(), category.c_str(), setting.c_str()); + return argv[2]; } #endif -- cgit v1.2.3 From ea06210b92a45f8fca6b9be19057bcd607988ee7 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 11 Jun 2012 21:14:08 +0300 Subject: SCI: Add support for variable selectors in kListFirstTrue / kListAllTrue This is used by Torin's Passage (e.g. when trying to open the menu). Based on a slightly modified patch by LePhilousophe --- engines/sci/engine/klists.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp index 2a33df26bc..5a608af034 100644 --- a/engines/sci/engine/klists.cpp +++ b/engines/sci/engine/klists.cpp @@ -575,8 +575,11 @@ reg_t kListFirstTrue(EngineState *s, int argc, reg_t *argv) { // First, check if the target selector is a variable if (lookupSelector(s->_segMan, curObject, slc, &address, NULL) == kSelectorVariable) { - // Can this happen with variable selectors? - error("kListFirstTrue: Attempted to access a variable selector"); + // If it's a variable selector, check its value. + // Example: script 64893 in Torin, MenuHandler::isHilited checks + // all children for variable selector 0x03ba (bHilited). + if (!readSelector(s->_segMan, curObject, slc).isNull()) + return curObject; } else { invokeSelector(s, curObject, slc, argc, argv, argc - 2, argv + 2); @@ -609,16 +612,16 @@ reg_t kListAllTrue(EngineState *s, int argc, reg_t *argv) { // First, check if the target selector is a variable if (lookupSelector(s->_segMan, curObject, slc, &address, NULL) == kSelectorVariable) { - // Can this happen with variable selectors? - error("kListAllTrue: Attempted to access a variable selector"); + // If it's a variable selector, check its value + s->r_acc = readSelector(s->_segMan, curObject, slc); } else { invokeSelector(s, curObject, slc, argc, argv, argc - 2, argv + 2); - - // Check if the result isn't true - if (s->r_acc.isNull()) - break; } + // Check if the result isn't true + if (s->r_acc.isNull()) + break; + curNode = s->_segMan->lookupNode(nextNode); } -- cgit v1.2.3 From 9c14f4419b4b9f573d4a955be136108e575266fe Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 11 Jun 2012 20:34:42 +0200 Subject: AUDIO: Make VOC decoder a bit more failsafe by still playing parts of invalid VOC files. Formerly when an unsupported block was found the opening would fail. Instead now all the valid blocks till that occasion will be played. This fixes an missing sound in Full Throttle (thanks to clone2727 for reporting), which is using a VOC file which fails to specify the proper block length for its sound block. --- audio/decoders/voc.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/audio/decoders/voc.cpp b/audio/decoders/voc.cpp index f0b5b2777d..fa330c6f2c 100644 --- a/audio/decoders/voc.cpp +++ b/audio/decoders/voc.cpp @@ -321,9 +321,14 @@ void VocStream::preProcess() { // In case we hit a "Terminator" block we also break here. if (_stream->eos() || block.code == 0) break; - // We also allow 128 as terminator, since Simon 1 Amiga CD32 uses it. - if (block.code == 128) { - debug(3, "VocStream::preProcess: Caught 128 as terminator"); + // We will allow invalid block numbers as terminators. This is needed, + // since some games ship broken VOC files. The following occasions are + // known: + // - 128 is used as terminator in Simon 1 Amiga CD32 + // - Full Throttle contains a VOC file with an incorrect block length + // resulting in a sample (127) to be read as block code. + if (block.code > 9) { + warning("VocStream::preProcess: Caught %d as terminator", block.code); break; } @@ -482,7 +487,8 @@ void VocStream::preProcess() { default: warning("Unhandled code %d in VOC file (len %d)", block.code, block.length); - return; + // Skip the whole block and try to use the next one. + skip = block.length; } // Premature end of stream => error! -- cgit v1.2.3 From ef8239df4877772762876ca1a98ad48676af8d5c Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 11 Jun 2012 20:10:49 -0400 Subject: SCI: Fix comment in kString(at) --- engines/sci/engine/kstring.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 0877e37a65..33b8c15e9f 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -653,9 +653,7 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) { case 1: // Size return make_reg(0, s->_segMan->getString(argv[1]).size()); case 2: { // At (return value at an index) - // Note that values need to be truncated to bytes, otherwise - // 0xff (negative char -1) will incorrectly be changed to - // 0xffff (negative int16 -1) + // Note that values are put in bytes to avoid sign extension if (argv[1].segment == s->_segMan->getStringSegmentId()) { SciString *string = s->_segMan->lookupString(argv[1]); byte val = string->getRawData()[argv[2].toUint16()]; -- cgit v1.2.3 From 0075fa2f98eb3deb4674a4f1af95a84669098d7c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 12 Jun 2012 04:13:00 +0200 Subject: GRAPHICS: Replace OverlayColor with uint16 in scaler code. Scalers are actually fixed at 2Bpp right now and not at the depth of OverlayColor. --- graphics/scaler.cpp | 9 ++++----- graphics/scaler/aspect.cpp | 10 +++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp index 9ade0e6c57..b81e8937a8 100644 --- a/graphics/scaler.cpp +++ b/graphics/scaler.cpp @@ -167,12 +167,12 @@ void DestroyScalers(){ void Normal1x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { // Spot the case when it can all be done in 1 hit - if ((srcPitch == sizeof(OverlayColor) * (uint)width) && (dstPitch == sizeof(OverlayColor) * (uint)width)) { - memcpy(dstPtr, srcPtr, sizeof(OverlayColor) * width * height); + if ((srcPitch == sizeof(uint16) * (uint)width) && (dstPitch == sizeof(uint16) * (uint)width)) { + memcpy(dstPtr, srcPtr, sizeof(uint16) * width * height); return; } while (height--) { - memcpy(dstPtr, srcPtr, sizeof(OverlayColor) * width); + memcpy(dstPtr, srcPtr, sizeof(uint16) * width); srcPtr += srcPitch; dstPtr += dstPitch; } @@ -207,11 +207,10 @@ void Normal2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPit uint8 *r; assert(IS_ALIGNED(dstPtr, 4)); - assert(sizeof(OverlayColor) == 2); while (height--) { r = dstPtr; for (int i = 0; i < width; ++i, r += 4) { - uint32 color = *(((const OverlayColor *)srcPtr) + i); + uint32 color = *(((const uint16 *)srcPtr) + i); color |= color << 16; diff --git a/graphics/scaler/aspect.cpp b/graphics/scaler/aspect.cpp index 7ad37b1ba8..f0ae732a40 100644 --- a/graphics/scaler/aspect.cpp +++ b/graphics/scaler/aspect.cpp @@ -160,14 +160,14 @@ int stretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, i #if ASPECT_MODE == kSuperFastAndUglyAspectMode if (srcPtr == dstPtr) break; - memcpy(dstPtr, srcPtr, sizeof(OverlayColor) * width); + memcpy(dstPtr, srcPtr, sizeof(uint16) * width); #else // Bilinear filter switch (y % 6) { case 0: case 5: if (srcPtr != dstPtr) - memcpy(dstPtr, srcPtr, sizeof(OverlayColor) * width); + memcpy(dstPtr, srcPtr, sizeof(uint16) * width); break; case 1: interpolate5Line((uint16 *)dstPtr, (const uint16 *)(srcPtr - pitch), (const uint16 *)srcPtr, width); @@ -206,13 +206,13 @@ void Normal1xAspectTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, #if ASPECT_MODE == kSuperFastAndUglyAspectMode if ((y % 6) == 5) srcPtr -= srcPitch; - memcpy(dstPtr, srcPtr, sizeof(OverlayColor) * width); + memcpy(dstPtr, srcPtr, sizeof(uint16) * width); #else // Bilinear filter five input lines onto six output lines switch (y % 6) { case 0: // First output line is copied from first input line - memcpy(dstPtr, srcPtr, sizeof(OverlayColor) * width); + memcpy(dstPtr, srcPtr, sizeof(uint16) * width); break; case 1: // Second output line is mixed from first and second input line @@ -233,7 +233,7 @@ void Normal1xAspectTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, case 5: // Sixth (and last) output line is copied from fifth (and last) input line srcPtr -= srcPitch; - memcpy(dstPtr, srcPtr, sizeof(OverlayColor) * width); + memcpy(dstPtr, srcPtr, sizeof(uint16) * width); break; } #endif -- cgit v1.2.3 From 13f93494578818b5a1272d793f7412b6810f3321 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 12 Jun 2012 04:16:51 +0200 Subject: GUI: Take advantage of Surface::fillRect in GraphicsWidget::setGfx. --- gui/widget.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/gui/widget.cpp b/gui/widget.cpp index fc6510b976..657245c815 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -643,14 +643,7 @@ void GraphicsWidget::setGfx(int w, int h, int r, int g, int b) { _gfx.free(); _gfx.create(w, h, overlayFormat); - - OverlayColor *dst = (OverlayColor *)_gfx.pixels; - OverlayColor fillCol = overlayFormat.RGBToColor(r, g, b); - while (h--) { - for (int i = 0; i < w; ++i) { - *dst++ = fillCol; - } - } + _gfx.fillRect(Common::Rect(0, 0, w, h), _gfx.format.RGBToColor(r, g, b)); } void GraphicsWidget::drawWidget() { -- cgit v1.2.3 From 3324aef8d0972d713f4fcfe09b2ada65dca365a8 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 11 Jun 2012 23:06:28 -0400 Subject: MOHAWK: Make sure we convert video surfaces if they're not in the screen format --- engines/mohawk/video.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index c10b986c60..15103b2021 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -227,17 +227,19 @@ bool VideoManager::updateMovies() { Graphics::Surface *convertedFrame = 0; if (frame && _videoStreams[i].enabled) { - // Convert from 8bpp to the current screen format if necessary Graphics::PixelFormat pixelFormat = _vm->_system->getScreenFormat(); - if (frame->format.bytesPerPixel == 1) { - if (pixelFormat.bytesPerPixel == 1) { - if (_videoStreams[i]->hasDirtyPalette()) - _videoStreams[i]->setSystemPalette(); - } else { - convertedFrame = frame->convertTo(pixelFormat, _videoStreams[i]->getPalette()); - frame = convertedFrame; - } + if (frame->format != pixelFormat) { + // We don't support downconverting to 8bpp + if (pixelFormat.bytesPerPixel == 1) + error("Cannot convert high color video frame to 8bpp"); + + // Convert to the current screen format + convertedFrame = frame->convertTo(pixelFormat, _videoStreams[i]->getPalette()); + frame = convertedFrame; + } else if (pixelFormat.bytesPerPixel == 1 && _videoStreams[i]->hasDirtyPalette()) { + // Set the palette when running in 8bpp mode only + _videoStreams[i]->setSystemPalette(); } // Clip the width/height to make sure we stay on the screen (Myst does this a few times) -- cgit v1.2.3 From e16ad39e533608d5bfac9bfba167e7e2dfb606cb Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 11 Jun 2012 23:07:37 -0400 Subject: VIDEO: Cleanup QTRLE In particular, the colors are not converted to the screen format upon decoding. The code should also now work with 32bpp screen formats. --- video/codecs/qtrle.cpp | 135 ++++++++++++++++++++++++++----------------------- video/codecs/qtrle.h | 3 +- 2 files changed, 74 insertions(+), 64 deletions(-) diff --git a/video/codecs/qtrle.cpp b/video/codecs/qtrle.cpp index f01720ec86..d2cdea27de 100644 --- a/video/codecs/qtrle.cpp +++ b/video/codecs/qtrle.cpp @@ -37,28 +37,25 @@ namespace Video { QTRLEDecoder::QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) : Codec() { _bitsPerPixel = bitsPerPixel; - _pixelFormat = g_system->getScreenFormat(); - // We need to increase the surface size to a multiple of 4 + // We need to ensure the width is a multiple of 4 uint16 wMod = width % 4; - if(wMod != 0) + if (wMod != 0) width += 4 - wMod; - debug(2, "QTRLE corrected width: %d", width); - _surface = new Graphics::Surface(); - _surface->create(width, height, _bitsPerPixel <= 8 ? Graphics::PixelFormat::createFormatCLUT8() : _pixelFormat); + _surface->create(width, height, getPixelFormat()); } #define CHECK_STREAM_PTR(n) \ if ((stream->pos() + n) > stream->size()) { \ - warning ("Problem: stream out of bounds (%d >= %d)", stream->pos() + n, stream->size()); \ + warning("QTRLE Problem: stream out of bounds (%d > %d)", stream->pos() + n, stream->size()); \ return; \ } #define CHECK_PIXEL_PTR(n) \ if ((int32)pixelPtr + n > _surface->w * _surface->h) { \ - warning ("Problem: pixel ptr = %d, pixel limit = %d", pixelPtr + n, _surface->w * _surface->h); \ + warning("QTRLE Problem: pixel ptr = %d, pixel limit = %d", pixelPtr + n, _surface->w * _surface->h); \ return; \ } \ @@ -132,8 +129,6 @@ void QTRLEDecoder::decode2_4(Common::SeekableReadStream *stream, uint32 rowPtr, for (int8 i = numPixels - 1; i >= 0; i--) { pi[numPixels - 1 - i] = (stream->readByte() >> ((i * bpp) & 0x07)) & ((1 << bpp) - 1); - // FIXME: Is this right? - //stream_ptr += ((i & ((num_pixels>>2)-1)) == 0); if ((i & ((numPixels >> 2) - 1)) == 0) stream->readByte(); } @@ -215,7 +210,7 @@ void QTRLEDecoder::decode8(Common::SeekableReadStream *stream, uint32 rowPtr, ui void QTRLEDecoder::decode16(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange) { uint32 pixelPtr = 0; - OverlayColor *rgb = (OverlayColor *)_surface->pixels; + uint16 *rgb = (uint16 *)_surface->pixels; while (linesToChange--) { CHECK_STREAM_PTR(2); @@ -235,25 +230,15 @@ void QTRLEDecoder::decode16(Common::SeekableReadStream *stream, uint32 rowPtr, u CHECK_PIXEL_PTR(rleCode); - while (rleCode--) { - // Convert from RGB555 to the format specified by the Overlay - byte r = 0, g = 0, b = 0; - Graphics::colorToRGB >(rgb16, r, g, b); - rgb[pixelPtr++] = _pixelFormat.RGBToColor(r, g, b); - } + while (rleCode--) + rgb[pixelPtr++] = rgb16; } else { CHECK_STREAM_PTR(rleCode * 2); CHECK_PIXEL_PTR(rleCode); // copy pixels directly to output - while (rleCode--) { - uint16 rgb16 = stream->readUint16BE(); - - // Convert from RGB555 to the format specified by the Overlay - byte r = 0, g = 0, b = 0; - Graphics::colorToRGB >(rgb16, r, g, b); - rgb[pixelPtr++] = _pixelFormat.RGBToColor(r, g, b); - } + while (rleCode--) + rgb[pixelPtr++] = stream->readUint16BE(); } } @@ -263,7 +248,7 @@ void QTRLEDecoder::decode16(Common::SeekableReadStream *stream, uint32 rowPtr, u void QTRLEDecoder::decode24(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange) { uint32 pixelPtr = 0; - OverlayColor *rgb = (OverlayColor *)_surface->pixels; + uint32 *rgb = (uint32 *)_surface->pixels; while (linesToChange--) { CHECK_STREAM_PTR(2); @@ -283,11 +268,12 @@ void QTRLEDecoder::decode24(Common::SeekableReadStream *stream, uint32 rowPtr, u byte r = stream->readByte(); byte g = stream->readByte(); byte b = stream->readByte(); + uint32 color = _surface->format.RGBToColor(r, g, b); CHECK_PIXEL_PTR(rleCode); while (rleCode--) - rgb[pixelPtr++] = _pixelFormat.RGBToColor(r, g, b); + rgb[pixelPtr++] = color; } else { CHECK_STREAM_PTR(rleCode * 3); CHECK_PIXEL_PTR(rleCode); @@ -297,7 +283,7 @@ void QTRLEDecoder::decode24(Common::SeekableReadStream *stream, uint32 rowPtr, u byte r = stream->readByte(); byte g = stream->readByte(); byte b = stream->readByte(); - rgb[pixelPtr++] = _pixelFormat.RGBToColor(r, g, b); + rgb[pixelPtr++] = _surface->format.RGBToColor(r, g, b); } } } @@ -308,7 +294,7 @@ void QTRLEDecoder::decode24(Common::SeekableReadStream *stream, uint32 rowPtr, u void QTRLEDecoder::decode32(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange) { uint32 pixelPtr = 0; - OverlayColor *rgb = (OverlayColor *)_surface->pixels; + uint32 *rgb = (uint32 *)_surface->pixels; while (linesToChange--) { CHECK_STREAM_PTR(2); @@ -329,11 +315,12 @@ void QTRLEDecoder::decode32(Common::SeekableReadStream *stream, uint32 rowPtr, u byte r = stream->readByte(); byte g = stream->readByte(); byte b = stream->readByte(); + uint32 color = _surface->format.ARGBToColor(a, r, g, b); CHECK_PIXEL_PTR(rleCode); while (rleCode--) - rgb[pixelPtr++] = _pixelFormat.ARGBToColor(a, r, g, b); + rgb[pixelPtr++] = color; } else { CHECK_STREAM_PTR(rleCode * 4); CHECK_PIXEL_PTR(rleCode); @@ -344,7 +331,7 @@ void QTRLEDecoder::decode32(Common::SeekableReadStream *stream, uint32 rowPtr, u byte r = stream->readByte(); byte g = stream->readByte(); byte b = stream->readByte(); - rgb[pixelPtr++] = _pixelFormat.ARGBToColor(a, r, g, b); + rgb[pixelPtr++] = _surface->format.ARGBToColor(a, r, g, b); } } } @@ -354,7 +341,7 @@ void QTRLEDecoder::decode32(Common::SeekableReadStream *stream, uint32 rowPtr, u } const Graphics::Surface *QTRLEDecoder::decodeImage(Common::SeekableReadStream *stream) { - uint16 start_line = 0; + uint16 startLine = 0; uint16 height = _surface->h; // check if this frame is even supposed to change @@ -369,44 +356,45 @@ const Graphics::Surface *QTRLEDecoder::decodeImage(Common::SeekableReadStream *s // if a header is present, fetch additional decoding parameters if (header & 8) { - if(stream->size() < 14) + if (stream->size() < 14) return _surface; - start_line = stream->readUint16BE(); + + startLine = stream->readUint16BE(); stream->readUint16BE(); // Unknown height = stream->readUint16BE(); stream->readUint16BE(); // Unknown } - uint32 row_ptr = _surface->w * start_line; + uint32 rowPtr = _surface->w * startLine; switch (_bitsPerPixel) { - case 1: - case 33: - decode1(stream, row_ptr, height); - break; - case 2: - case 34: - decode2_4(stream, row_ptr, height, 2); - break; - case 4: - case 36: - decode2_4(stream, row_ptr, height, 4); - break; - case 8: - case 40: - decode8(stream, row_ptr, height); - break; - case 16: - decode16(stream, row_ptr, height); - break; - case 24: - decode24(stream, row_ptr, height); - break; - case 32: - decode32(stream, row_ptr, height); - break; - default: - error ("Unsupported bits per pixel %d", _bitsPerPixel); + case 1: + case 33: + decode1(stream, rowPtr, height); + break; + case 2: + case 34: + decode2_4(stream, rowPtr, height, 2); + break; + case 4: + case 36: + decode2_4(stream, rowPtr, height, 4); + break; + case 8: + case 40: + decode8(stream, rowPtr, height); + break; + case 16: + decode16(stream, rowPtr, height); + break; + case 24: + decode24(stream, rowPtr, height); + break; + case 32: + decode32(stream, rowPtr, height); + break; + default: + error("Unsupported QTRLE bits per pixel %d", _bitsPerPixel); } return _surface; @@ -417,4 +405,27 @@ QTRLEDecoder::~QTRLEDecoder() { delete _surface; } +Graphics::PixelFormat QTRLEDecoder::getPixelFormat() const { + switch (_bitsPerPixel) { + case 1: + case 33: + case 2: + case 34: + case 4: + case 36: + case 8: + case 40: + return Graphics::PixelFormat::createFormatCLUT8(); + case 16: + return Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); + case 24: + case 32: + return Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24); + default: + error("Unsupported QTRLE bits per pixel %d", _bitsPerPixel); + } + + return Graphics::PixelFormat(); +} + } // End of namespace Video diff --git a/video/codecs/qtrle.h b/video/codecs/qtrle.h index 6f8e113ca5..d9db58ab23 100644 --- a/video/codecs/qtrle.h +++ b/video/codecs/qtrle.h @@ -34,13 +34,12 @@ public: ~QTRLEDecoder(); const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream); - Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; } + Graphics::PixelFormat getPixelFormat() const; private: byte _bitsPerPixel; Graphics::Surface *_surface; - Graphics::PixelFormat _pixelFormat; void decode1(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange); void decode2_4(Common::SeekableReadStream *stream, uint32 rowPtr, uint32 linesToChange, byte bpp); -- cgit v1.2.3 From 2a1193a6b1d19664b876fb98568fa677463781a6 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 12 Jun 2012 09:33:21 -0400 Subject: VIDEO: Make rpza decode to its own pixel format --- video/codecs/rpza.cpp | 22 +++++----------------- video/codecs/rpza.h | 3 +-- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/video/codecs/rpza.cpp b/video/codecs/rpza.cpp index df5738202e..acc1b7f358 100644 --- a/video/codecs/rpza.cpp +++ b/video/codecs/rpza.cpp @@ -28,22 +28,17 @@ #include "common/system.h" #include "common/stream.h" #include "common/textconsole.h" -#include "graphics/colormasks.h" namespace Video { RPZADecoder::RPZADecoder(uint16 width, uint16 height) : Codec() { - _pixelFormat = g_system->getScreenFormat(); - // We need to increase the surface size to a multiple of 4 uint16 wMod = width % 4; - if(wMod != 0) + if (wMod != 0) width += 4 - wMod; - debug(2, "RPZA corrected width: %d", width); - _surface = new Graphics::Surface(); - _surface->create(width, height, _pixelFormat); + _surface->create(width, height, getPixelFormat()); } RPZADecoder::~RPZADecoder() { @@ -59,18 +54,11 @@ RPZADecoder::~RPZADecoder() { } \ totalBlocks--; \ if (totalBlocks < 0) \ - error("block counter just went negative (this should not happen)") \ + error("rpza block counter just went negative (this should not happen)") \ -// Convert from RGB555 to the format specified by the screen #define PUT_PIXEL(color) \ - if ((int32)blockPtr < _surface->w * _surface->h) { \ - byte r = 0, g = 0, b = 0; \ - Graphics::colorToRGB >(color, r, g, b); \ - if (_pixelFormat.bytesPerPixel == 2) \ - *((uint16 *)_surface->pixels + blockPtr) = _pixelFormat.RGBToColor(r, g, b); \ - else \ - *((uint32 *)_surface->pixels + blockPtr) = _pixelFormat.RGBToColor(r, g, b); \ - } \ + if ((int32)blockPtr < _surface->w * _surface->h) \ + WRITE_UINT16((uint16 *)_surface->pixels + blockPtr, color); \ blockPtr++ const Graphics::Surface *RPZADecoder::decodeImage(Common::SeekableReadStream *stream) { diff --git a/video/codecs/rpza.h b/video/codecs/rpza.h index 809a69f444..f082d25549 100644 --- a/video/codecs/rpza.h +++ b/video/codecs/rpza.h @@ -34,11 +34,10 @@ public: ~RPZADecoder(); const Graphics::Surface *decodeImage(Common::SeekableReadStream *stream); - Graphics::PixelFormat getPixelFormat() const { return _pixelFormat; } + Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); } private: Graphics::Surface *_surface; - Graphics::PixelFormat _pixelFormat; }; } // End of namespace Video -- cgit v1.2.3 From 34c57519489186ae62a28072199b247211c05161 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 13 Jun 2012 04:13:16 +0200 Subject: KYRA: Reduce amount of updateScreen calls. This fixes some slowdowns in Kyra2 with the OpenGL backend for me. Most of the updateScreen calls saved were introduced by us implementing the original behavior of hiding the mouse before drawing onto the screen and showing it again afterwards, since the mouse cursor is not drawn on the game screen in our implementation (and unlike in the original) this is not necessary. --- engines/kyra/animator_hof.cpp | 2 -- engines/kyra/animator_mr.cpp | 4 ---- engines/kyra/gui_hof.cpp | 35 ----------------------------------- engines/kyra/gui_lok.cpp | 6 ------ engines/kyra/gui_mr.cpp | 25 ------------------------- engines/kyra/gui_v1.cpp | 9 --------- engines/kyra/gui_v2.cpp | 10 ---------- engines/kyra/items_hof.cpp | 5 ----- engines/kyra/items_lok.cpp | 16 ---------------- engines/kyra/items_mr.cpp | 10 ---------- engines/kyra/items_v2.cpp | 7 ------- engines/kyra/kyra_hof.cpp | 10 ---------- engines/kyra/kyra_lok.cpp | 8 -------- engines/kyra/kyra_mr.cpp | 2 -- engines/kyra/kyra_v2.cpp | 3 --- engines/kyra/screen.cpp | 4 ---- engines/kyra/screen_lok.cpp | 2 -- engines/kyra/script_hof.cpp | 4 ---- engines/kyra/script_lok.cpp | 4 ---- engines/kyra/script_mr.cpp | 4 ---- engines/kyra/sequences_lok.cpp | 2 -- engines/kyra/text_hof.cpp | 9 --------- engines/kyra/text_lok.cpp | 6 ------ engines/kyra/text_mr.cpp | 6 ------ 24 files changed, 193 deletions(-) diff --git a/engines/kyra/animator_hof.cpp b/engines/kyra/animator_hof.cpp index 5a2378f4d0..59112504d6 100644 --- a/engines/kyra/animator_hof.cpp +++ b/engines/kyra/animator_hof.cpp @@ -104,9 +104,7 @@ void KyraEngine_HoF::refreshAnimObjects(int force) { if (height + y > 143) height -= height + y - 144; - _screen->hideMouse(); _screen->copyRegion(x, y, x, y, width, height, 2, 0, Screen::CR_NO_P_CHECK); - _screen->showMouse(); curObject->needRefresh = false; } diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp index 29fa3aba80..83e774e2fc 100644 --- a/engines/kyra/animator_mr.cpp +++ b/engines/kyra/animator_mr.cpp @@ -175,9 +175,7 @@ void KyraEngine_MR::refreshAnimObjects(int force) { height -= height + y - (maxY + 1); if (height > 0) { - _screen->hideMouse(); _screen->copyRegion(x, y, x, y, width, height, 2, 0, Screen::CR_NO_P_CHECK); - _screen->showMouse(); } curObject->needRefresh = false; @@ -209,9 +207,7 @@ void KyraEngine_MR::updateItemAnimations() { nextFrame = true; _screen->drawShape(2, getShapePtr(422 + i), 9, 0, 0, 0); _screen->drawShape(2, getShapePtr(shpIdx), 9, 0, 0, 0); - _screen->hideMouse(); _screen->copyRegion(9, 0, _inventoryX[i], _inventoryY[i], 24, 20, 2, 0, Screen::CR_NO_P_CHECK); - _screen->showMouse(); } } } diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp index c1bfee066f..36fbb0b40a 100644 --- a/engines/kyra/gui_hof.cpp +++ b/engines/kyra/gui_hof.cpp @@ -121,14 +121,12 @@ int KyraEngine_HoF::buttonInventory(Button *button) { if (_itemInHand == kItemNone) { if (item == kItemNone) return 0; - _screen->hideMouse(); clearInventorySlot(inventorySlot, 0); snd_playSoundEffect(0x0B); setMouseCursor(item); int string = (_lang == 1) ? getItemCommandStringPickUp(item) : 7; updateCommandLineEx(item+54, string, 0xD6); _itemInHand = (int16)item; - _screen->showMouse(); _mainCharacter.inventory[inventorySlot] = kItemNone; } else { if (_mainCharacter.inventory[inventorySlot] != kItemNone) { @@ -137,23 +135,19 @@ int KyraEngine_HoF::buttonInventory(Button *button) { item = _mainCharacter.inventory[inventorySlot]; snd_playSoundEffect(0x0B); - _screen->hideMouse(); clearInventorySlot(inventorySlot, 0); drawInventoryShape(0, _itemInHand, inventorySlot); setMouseCursor(item); int string = (_lang == 1) ? getItemCommandStringPickUp(item) : 7; updateCommandLineEx(item+54, string, 0xD6); - _screen->showMouse(); _mainCharacter.inventory[inventorySlot] = _itemInHand; setHandItem(item); } else { snd_playSoundEffect(0x0C); - _screen->hideMouse(); drawInventoryShape(0, _itemInHand, inventorySlot); _screen->setMouseCursor(0, 0, getShapePtr(0)); int string = (_lang == 1) ? getItemCommandStringInv(_itemInHand) : 8; updateCommandLineEx(_itemInHand+54, string, 0xD6); - _screen->showMouse(); _mainCharacter.inventory[inventorySlot] = _itemInHand; _itemInHand = kItemNone; } @@ -172,9 +166,7 @@ int KyraEngine_HoF::scrollInventory(Button *button) { memcpy(src+5, dst, sizeof(Item)*5); memcpy(dst, dst+5, sizeof(Item)*5); memcpy(dst+5, temp, sizeof(Item)*5); - _screen->hideMouse(); _screen->copyRegion(0x46, 0x90, 0x46, 0x90, 0x71, 0x2E, 0, 2); - _screen->showMouse(); redrawInventory(2); scrollInventoryWheel(); return 0; @@ -199,9 +191,7 @@ int KyraEngine_HoF::findFreeVisibleInventorySlot() { void KyraEngine_HoF::removeSlotFromInventory(int slot) { _mainCharacter.inventory[slot] = kItemNone; if (slot < 10) { - _screen->hideMouse(); clearInventorySlot(slot, 0); - _screen->showMouse(); } } @@ -223,15 +213,12 @@ bool KyraEngine_HoF::checkInventoryItemExchange(Item handItem, int slot) { snd_playSoundEffect(0x68); _mainCharacter.inventory[slot] = newItem; - _screen->hideMouse(); clearInventorySlot(slot, 0); drawInventoryShape(0, newItem, slot); if (removeItem) removeHandItem(); - _screen->showMouse(); - if (_lang != 1) updateCommandLineEx(newItem+54, 0x2E, 0xD6); @@ -243,12 +230,10 @@ bool KyraEngine_HoF::checkInventoryItemExchange(Item handItem, int slot) { void KyraEngine_HoF::drawInventoryShape(int page, Item item, int slot) { _screen->drawShape(page, getShapePtr(item+64), _inventoryX[slot], _inventoryY[slot], 0, 0); - _screen->updateScreen(); } void KyraEngine_HoF::clearInventorySlot(int slot, int page) { _screen->drawShape(page, getShapePtr(240+slot), _inventoryX[slot], _inventoryY[slot], 0, 0); - _screen->updateScreen(); } void KyraEngine_HoF::redrawInventory(int page) { @@ -256,7 +241,6 @@ void KyraEngine_HoF::redrawInventory(int page) { _screen->_curPage = page; const Item *inventory = _mainCharacter.inventory; - _screen->hideMouse(); for (int i = 0; i < 10; ++i) { clearInventorySlot(i, page); if (inventory[i] != kItemNone) { @@ -264,7 +248,6 @@ void KyraEngine_HoF::redrawInventory(int page) { drawInventoryShape(page, inventory[i], i); } } - _screen->showMouse(); _screen->updateScreen(); _screen->_curPage = pageBackUp; @@ -277,17 +260,13 @@ void KyraEngine_HoF::scrollInventoryWheel() { memcpy(_screenBuffer, _screen->getCPagePtr(2), 64000); uint8 overlay[0x100]; _screen->generateOverlay(_screen->getPalette(0), overlay, 0, 50); - _screen->hideMouse(); _screen->copyRegion(0x46, 0x90, 0x46, 0x79, 0x71, 0x17, 0, 2, Screen::CR_NO_P_CHECK); - _screen->showMouse(); snd_playSoundEffect(0x25); bool breakFlag = false; for (int i = 0; i <= 6 && !breakFlag; ++i) { if (movie.opened()) { - _screen->hideMouse(); movie.displayFrame(i % frames, 0, 0, 0, 0, 0, 0); - _screen->showMouse(); _screen->updateScreen(); } @@ -355,9 +334,7 @@ int KyraEngine_HoF::bookButton(Button *button) { _bookNewPage = _bookCurPage; if (_screenBuffer) { - _screen->hideMouse(); memcpy(_screenBuffer, _screen->getCPagePtr(0), 64000); - _screen->showMouse(); } _screen->copyPalette(2, 0); @@ -382,9 +359,7 @@ int KyraEngine_HoF::bookButton(Button *button) { restorePage3(); if (_screenBuffer) { - _screen->hideMouse(); _screen->copyBlockToPage(0, 0, 0, 320, 200, _screenBuffer); - _screen->showMouse(); } setHandItem(_itemInHand); @@ -471,7 +446,6 @@ void KyraEngine_HoF::showBookPage() { int rightPageY = _bookPageYOffset[_bookCurPage+1]; - _screen->hideMouse(); if (leftPage) { bookDecodeText(leftPage); bookPrintText(2, leftPage, 20, leftPageY+20, 0x31); @@ -483,7 +457,6 @@ void KyraEngine_HoF::showBookPage() { bookPrintText(2, rightPage, 176, rightPageY+20, 0x31); delete[] rightPage; } - _screen->showMouse(); } void KyraEngine_HoF::bookLoop() { @@ -517,10 +490,8 @@ void KyraEngine_HoF::bookLoop() { loadBookBkgd(); showBookPage(); snd_playSoundEffect(0x64); - _screen->hideMouse(); _screen->copyRegion(0, 0, 0, 0, 0x140, 0xC8, 2, 0, Screen::CR_NO_P_CHECK); _screen->updateScreen(); - _screen->showMouse(); } _system->delayMillis(10); } @@ -550,9 +521,7 @@ void KyraEngine_HoF::bookPrintText(int dstPage, const uint8 *str, int x, int y, Screen::FontId oldFont = _screen->setFont(_flags.lang == Common::JA_JPN ? Screen::FID_SJIS_FNT : Screen::FID_BOOKFONT_FNT); _screen->_charWidth = -2; - _screen->hideMouse(); _screen->printText((const char *)str, x, y, color, (_flags.lang == Common::JA_JPN) ? 0xf6 : 0); - _screen->showMouse(); _screen->_charWidth = 0; _screen->setFont(oldFont); @@ -679,9 +648,7 @@ int GUI_HoF::optionsButton(Button *button) { _restartGame = false; _reloadTemporarySave = false; - _screen->hideMouse(); updateButton(&_vm->_inventoryButtons[0]); - _screen->showMouse(); if (!_screen->isMouseVisible() && button) return 0; @@ -690,9 +657,7 @@ int GUI_HoF::optionsButton(Button *button) { if (_vm->_mouseState < -1) { _vm->_mouseState = -1; - _screen->hideMouse(); _screen->setMouseCursor(1, 1, _vm->getShapePtr(0)); - _screen->showMouse(); return 0; } diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp index b4e5148b64..8e18ff910d 100644 --- a/engines/kyra/gui_lok.cpp +++ b/engines/kyra/gui_lok.cpp @@ -48,19 +48,16 @@ int KyraEngine_LoK::buttonInventoryCallback(Button *caller) { snd_playSoundEffect(0x36); return 0; } else { - _screen->hideMouse(); _screen->fillRect(_itemPosX[itemOffset], _itemPosY[itemOffset], _itemPosX[itemOffset] + 15, _itemPosY[itemOffset] + 15, _flags.platform == Common::kPlatformAmiga ? 19 : 12); snd_playSoundEffect(0x35); setMouseItem(inventoryItem); updateSentenceCommand(_itemList[getItemListIndex(inventoryItem)], _takenList[0], 179); _itemInHand = inventoryItem; - _screen->showMouse(); _currentCharacter->inventoryItems[itemOffset] = kItemNone; } } else { if (inventoryItem != kItemNone) { snd_playSoundEffect(0x35); - _screen->hideMouse(); _screen->fillRect(_itemPosX[itemOffset], _itemPosY[itemOffset], _itemPosX[itemOffset] + 15, _itemPosY[itemOffset] + 15, _flags.platform == Common::kPlatformAmiga ? 19 : 12); _screen->drawShape(0, _shapes[216 + _itemInHand], _itemPosX[itemOffset], _itemPosY[itemOffset], 0, 0); setMouseItem(inventoryItem); @@ -69,16 +66,13 @@ int KyraEngine_LoK::buttonInventoryCallback(Button *caller) { updateSentenceCommand(_itemList[getItemListIndex(inventoryItem)], _takenList[0], 179); else updateSentenceCommand(_itemList[getItemListIndex(inventoryItem)], _takenList[1], 179); - _screen->showMouse(); _currentCharacter->inventoryItems[itemOffset] = _itemInHand; _itemInHand = inventoryItem; } else { snd_playSoundEffect(0x32); - _screen->hideMouse(); _screen->drawShape(0, _shapes[216 + _itemInHand], _itemPosX[itemOffset], _itemPosY[itemOffset], 0, 0); _screen->setMouseCursor(1, 1, _shapes[0]); updateSentenceCommand(_itemList[getItemListIndex(_itemInHand)], _placedList[0], 179); - _screen->showMouse(); _currentCharacter->inventoryItems[itemOffset] = _itemInHand; _itemInHand = kItemNone; } diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp index e88b7fdffb..37526f9a5f 100644 --- a/engines/kyra/gui_mr.cpp +++ b/engines/kyra/gui_mr.cpp @@ -104,7 +104,6 @@ int KyraEngine_MR::callbackButton3(Button *button) { void KyraEngine_MR::showMessage(const char *string, uint8 c0, uint8 c1) { _shownMessage = string; - _screen->hideMouse(); restoreCommandLine(); _restoreCommandLine = false; @@ -118,8 +117,6 @@ void KyraEngine_MR::showMessage(const char *string, uint8 c0, uint8 c1) { _screen->updateScreen(); setCommandLineRestoreTimer(7); } - - _screen->showMouse(); } void KyraEngine_MR::showMessageFromCCode(int string, uint8 c0, int) { @@ -330,10 +327,8 @@ void KyraEngine_MR::drawMalcolmsMoodText() { _screen->_curPage = 2; } - _screen->hideMouse(); _screen->drawShape(_screen->_curPage, getShapePtr(432), 244, 189, 0, 0); _text->printText(string, x, y+1, 0xFF, 0xF0, 0x00); - _screen->showMouse(); _screen->_curPage = pageBackUp; } @@ -441,7 +436,6 @@ void KyraEngine_MR::redrawInventory(int page) { int pageBackUp = _screen->_curPage; _screen->_curPage = page; - _screen->hideMouse(); for (int i = 0; i < 10; ++i) { clearInventorySlot(i, page); @@ -451,7 +445,6 @@ void KyraEngine_MR::redrawInventory(int page) { } } - _screen->showMouse(); _screen->_curPage = pageBackUp; if (page == 0 || page == 1) @@ -489,14 +482,12 @@ int KyraEngine_MR::buttonInventory(Button *button) { if (slotItem == kItemNone) return 0; - _screen->hideMouse(); clearInventorySlot(slot, 0); snd_playSoundEffect(0x0B, 0xC8); setMouseCursor(slotItem); updateItemCommand(slotItem, (_lang == 1) ? getItemCommandStringPickUp(slotItem) : 0, 0xFF); _itemInHand = slotItem; _mainCharacter.inventory[slot] = kItemNone; - _screen->showMouse(); } else if (_itemInHand == 27) { if (_chatText) return 0; @@ -508,21 +499,17 @@ int KyraEngine_MR::buttonInventory(Button *button) { snd_playSoundEffect(0x0B, 0xC8); - _screen->hideMouse(); clearInventorySlot(slot, 0); drawInventorySlot(0, _itemInHand, slot); setMouseCursor(slotItem); updateItemCommand(slotItem, (_lang == 1) ? getItemCommandStringPickUp(slotItem) : 0, 0xFF); _mainCharacter.inventory[slot] = _itemInHand; _itemInHand = slotItem; - _screen->showMouse(); } else { snd_playSoundEffect(0x0C, 0xC8); - _screen->hideMouse(); drawInventorySlot(0, _itemInHand, slot); _screen->setMouseCursor(0, 0, getShapePtr(0)); updateItemCommand(_itemInHand, (_lang == 1) ? getItemCommandStringInv(_itemInHand) : 2, 0xFF); - _screen->showMouse(); _mainCharacter.inventory[slot] = _itemInHand; _itemInHand = kItemNone; } @@ -624,22 +611,18 @@ int KyraEngine_MR::buttonShowScore(Button *button) { int KyraEngine_MR::buttonJesterStaff(Button *button) { makeCharFacingMouse(); if (_itemInHand == 27) { - _screen->hideMouse(); removeHandItem(); snd_playSoundEffect(0x0C, 0xC8); drawJestersStaff(1, 0); updateItemCommand(27, 2, 0xFF); setGameFlag(0x97); - _screen->showMouse(); } else if (_itemInHand == kItemNone) { if (queryGameFlag(0x97)) { - _screen->hideMouse(); snd_playSoundEffect(0x0B, 0xC8); setHandItem(27); drawJestersStaff(0, 0); updateItemCommand(27, 0, 0xFF); resetGameFlag(0x97); - _screen->showMouse(); } else { if (queryGameFlag(0x2F)) objectChat((const char *)getTableEntry(_cCodeFile, 20), 0, 204, 20); @@ -1108,9 +1091,7 @@ int GUI_MR::redrawButtonCallback(Button *button) { if (!_displayMenu) return 0; - _screen->hideMouse(); _screen->drawBox(button->x + 1, button->y + 1, button->x + button->width - 1, button->y + button->height - 1, 0xD0); - _screen->showMouse(); return 0; } @@ -1119,9 +1100,7 @@ int GUI_MR::redrawShadedButtonCallback(Button *button) { if (!_displayMenu) return 0; - _screen->hideMouse(); _screen->drawShadedBox(button->x, button->y, button->x + button->width, button->y + button->height, 0xD1, 0xCF); - _screen->showMouse(); return 0; } @@ -1162,9 +1141,7 @@ int GUI_MR::quitGame(Button *caller) { int GUI_MR::optionsButton(Button *button) { PauseTimer pause(*_vm->_timer); - _screen->hideMouse(); updateButton(&_vm->_mainButtonData[0]); - _screen->showMouse(); if (!_vm->_inventoryState && button && !_vm->_menuDirectlyToLoad) return 0; @@ -1179,9 +1156,7 @@ int GUI_MR::optionsButton(Button *button) { if (_vm->_mouseState < -1) { _vm->_mouseState = -1; - _screen->hideMouse(); _screen->setMouseCursor(1, 1, _vm->getShapePtr(0)); - _screen->showMouse(); return 0; } diff --git a/engines/kyra/gui_v1.cpp b/engines/kyra/gui_v1.cpp index f3459ddfe3..cec6562dd9 100644 --- a/engines/kyra/gui_v1.cpp +++ b/engines/kyra/gui_v1.cpp @@ -70,8 +70,6 @@ void GUI_v1::initMenuLayout(Menu &menu) { void GUI_v1::initMenu(Menu &menu) { _menuButtonList = 0; - _screen->hideMouse(); - int textX; int textY; @@ -192,7 +190,6 @@ void GUI_v1::initMenu(Menu &menu) { updateMenuButton(scrollDownButton); } - _screen->showMouse(); _screen->updateScreen(); } @@ -309,10 +306,8 @@ void GUI_v1::updateMenuButton(Button *button) { if (!_displayMenu) return; - _screen->hideMouse(); updateButton(button); _screen->updateScreen(); - _screen->showMouse(); } void GUI_v1::updateButton(Button *button) { @@ -340,12 +335,10 @@ int GUI_v1::redrawButtonCallback(Button *button) { if (!_displayMenu) return 0; - _screen->hideMouse(); if (_vm->gameFlags().platform == Common::kPlatformAmiga) _screen->drawBox(button->x + 1, button->y + 1, button->x + button->width - 1, button->y + button->height - 1, 17); else _screen->drawBox(button->x + 1, button->y + 1, button->x + button->width - 1, button->y + button->height - 1, 0xF8); - _screen->showMouse(); return 0; } @@ -354,12 +347,10 @@ int GUI_v1::redrawShadedButtonCallback(Button *button) { if (!_displayMenu) return 0; - _screen->hideMouse(); if (_vm->gameFlags().platform == Common::kPlatformAmiga) _screen->drawShadedBox(button->x, button->y, button->x + button->width, button->y + button->height, 31, 18); else _screen->drawShadedBox(button->x, button->y, button->x + button->width, button->y + button->height, 0xF9, 0xFA); - _screen->showMouse(); return 0; } diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp index 65f8bd45e5..1df4149d2e 100644 --- a/engines/kyra/gui_v2.cpp +++ b/engines/kyra/gui_v2.cpp @@ -105,15 +105,11 @@ void GUI_v2::processButton(Button *button) { switch (val1 - 1) { case 0: - _screen->hideMouse(); _screen->drawShape(_screen->_curPage, dataPtr, x, y, button->dimTableIndex, 0x10); - _screen->showMouse(); break; case 1: - _screen->hideMouse(); _screen->printText((const char *)dataPtr, x, y, val2, val3); - _screen->showMouse(); break; case 3: @@ -122,22 +118,16 @@ void GUI_v2::processButton(Button *button) { break; case 4: - _screen->hideMouse(); _screen->drawBox(x, y, x2, y2, val2); - _screen->showMouse(); break; case 5: - _screen->hideMouse(); _screen->fillRect(x, y, x2, y2, val2, -1, true); - _screen->showMouse(); break; default: break; } - - _screen->updateScreen(); } int GUI_v2::processButtonList(Button *buttonList, uint16 inputFlag, int8 mouseWheel) { diff --git a/engines/kyra/items_hof.cpp b/engines/kyra/items_hof.cpp index 711e1b8f7c..ef2c50c0c5 100644 --- a/engines/kyra/items_hof.cpp +++ b/engines/kyra/items_hof.cpp @@ -300,8 +300,6 @@ void KyraEngine_HoF::itemDropDown(int startX, int startY, int dstX, int dstY, in } void KyraEngine_HoF::exchangeMouseItem(int itemPos) { - _screen->hideMouse(); - deleteItemAnimEntry(itemPos); int itemId = _itemList[itemPos].id; @@ -317,7 +315,6 @@ void KyraEngine_HoF::exchangeMouseItem(int itemPos) { str2 = getItemCommandStringPickUp(itemId); updateCommandLineEx(itemId + 54, str2, 0xD6); - _screen->showMouse(); runSceneScript6(); } @@ -331,7 +328,6 @@ bool KyraEngine_HoF::pickUpItem(int x, int y) { if (_itemInHand >= 0) { exchangeMouseItem(itemPos); } else { - _screen->hideMouse(); deleteItemAnimEntry(itemPos); int itemId = _itemList[itemPos].id; _itemList[itemPos].id = kItemNone; @@ -344,7 +340,6 @@ bool KyraEngine_HoF::pickUpItem(int x, int y) { updateCommandLineEx(itemId + 54, str2, 0xD6); _itemInHand = itemId; - _screen->showMouse(); runSceneScript6(); } diff --git a/engines/kyra/items_lok.cpp b/engines/kyra/items_lok.cpp index 2937038463..b92cd616c1 100644 --- a/engines/kyra/items_lok.cpp +++ b/engines/kyra/items_lok.cpp @@ -163,17 +163,13 @@ void KyraEngine_LoK::placeItemInGenericMapScene(int item, int index) { } void KyraEngine_LoK::setHandItem(Item item) { - _screen->hideMouse(); setMouseItem(item); _itemInHand = item; - _screen->showMouse(); } void KyraEngine_LoK::removeHandItem() { - _screen->hideMouse(); _screen->setMouseCursor(1, 1, _shapes[0]); _itemInHand = kItemNone; - _screen->showMouse(); } void KyraEngine_LoK::setMouseItem(Item item) { @@ -415,7 +411,6 @@ int KyraEngine_LoK::processItemDrop(uint16 sceneId, uint8 item, int x, int y, in } void KyraEngine_LoK::exchangeItemWithMouseItem(uint16 sceneId, int itemIndex) { - _screen->hideMouse(); _animator->animRemoveGameItem(itemIndex); assert(sceneId < _roomTableSize); Room *currentRoom = &_roomTable[sceneId]; @@ -432,7 +427,6 @@ void KyraEngine_LoK::exchangeItemWithMouseItem(uint16 sceneId, int itemIndex) { updateSentenceCommand(_itemList[getItemListIndex(_itemInHand)], _takenList[0], 179); else updateSentenceCommand(_itemList[getItemListIndex(_itemInHand)], _takenList[1], 179); - _screen->showMouse(); clickEventHandler2(); } @@ -720,9 +714,7 @@ void KyraEngine_LoK::magicOutMouseItem(int animIndex, int itemPos) { _itemInHand = kItemNone; } else { _characterList[0].inventoryItems[itemPos] = kItemNone; - _screen->hideMouse(); _screen->fillRect(_itemPosX[itemPos], _itemPosY[itemPos], _itemPosX[itemPos] + 15, _itemPosY[itemPos] + 15, _flags.platform == Common::kPlatformAmiga ? 19 : 12, 0); - _screen->showMouse(); } _screen->showMouse(); @@ -793,9 +785,7 @@ void KyraEngine_LoK::magicInMouseItem(int animIndex, int item, int itemPos) { _itemInHand = item; } else { _characterList[0].inventoryItems[itemPos] = item; - _screen->hideMouse(); _screen->drawShape(0, _shapes[216 + item], _itemPosX[itemPos], _itemPosY[itemPos], 0, 0); - _screen->showMouse(); } _screen->showMouse(); _screen->_curPage = videoPageBackUp; @@ -846,9 +836,7 @@ void KyraEngine_LoK::updatePlayerItemsForScene() { ++_itemInHand; if (_itemInHand > 33) _itemInHand = 33; - _screen->hideMouse(); _screen->setMouseCursor(8, 15, _shapes[216 + _itemInHand]); - _screen->showMouse(); } bool redraw = false; @@ -864,9 +852,7 @@ void KyraEngine_LoK::updatePlayerItemsForScene() { } if (redraw) { - _screen->hideMouse(); redrawInventory(0); - _screen->showMouse(); } if (_itemInHand == 33) @@ -884,7 +870,6 @@ void KyraEngine_LoK::updatePlayerItemsForScene() { void KyraEngine_LoK::redrawInventory(int page) { int videoPageBackUp = _screen->_curPage; _screen->_curPage = page; - _screen->hideMouse(); for (int i = 0; i < 10; ++i) { _screen->fillRect(_itemPosX[i], _itemPosY[i], _itemPosX[i] + 15, _itemPosY[i] + 15, _flags.platform == Common::kPlatformAmiga ? 19 : 12, page); @@ -893,7 +878,6 @@ void KyraEngine_LoK::redrawInventory(int page) { _screen->drawShape(page, _shapes[216 + item], _itemPosX[i], _itemPosY[i], 0, 0); } } - _screen->showMouse(); _screen->_curPage = videoPageBackUp; _screen->updateScreen(); } diff --git a/engines/kyra/items_mr.cpp b/engines/kyra/items_mr.cpp index c731627026..029f676538 100644 --- a/engines/kyra/items_mr.cpp +++ b/engines/kyra/items_mr.cpp @@ -319,7 +319,6 @@ void KyraEngine_MR::exchangeMouseItem(int itemPos, int runScript) { return; } - _screen->hideMouse(); deleteItemAnimEntry(itemPos); Item itemId = _itemList[itemPos].id; @@ -335,7 +334,6 @@ void KyraEngine_MR::exchangeMouseItem(int itemPos, int runScript) { str2 = getItemCommandStringPickUp(itemId); updateItemCommand(itemId, str2, 0xFF); - _screen->showMouse(); if (runScript) runSceneScript6(); @@ -350,7 +348,6 @@ bool KyraEngine_MR::pickUpItem(int x, int y, int runScript) { if (_itemInHand >= 0) { exchangeMouseItem(itemPos, runScript); } else { - _screen->hideMouse(); deleteItemAnimEntry(itemPos); Item itemId = _itemList[itemPos].id; _itemList[itemPos].id = kItemNone; @@ -363,7 +360,6 @@ bool KyraEngine_MR::pickUpItem(int x, int y, int runScript) { updateItemCommand(itemId, itemString, 0xFF); _itemInHand = itemId; - _screen->showMouse(); if (runScript) runSceneScript6(); @@ -401,7 +397,6 @@ bool KyraEngine_MR::itemListMagic(Item handItem, int itemSlot) { assert(animObjIndex != -1); - _screen->hideMouse(); snd_playSoundEffect(0x93, 0xC8); for (int i = 109; i <= 141; ++i) { _animObjects[animObjIndex].shapeIndex1 = i+248; @@ -411,7 +406,6 @@ bool KyraEngine_MR::itemListMagic(Item handItem, int itemSlot) { deleteItemAnimEntry(itemSlot); _itemList[itemSlot].id = kItemNone; - _screen->showMouse(); return true; } @@ -440,7 +434,6 @@ bool KyraEngine_MR::itemListMagic(Item handItem, int itemSlot) { _itemList[itemSlot].id = (int8)resItem; - _screen->hideMouse(); deleteItemAnimEntry(itemSlot); addItemToAnimList(itemSlot); @@ -448,7 +441,6 @@ bool KyraEngine_MR::itemListMagic(Item handItem, int itemSlot) { removeHandItem(); else if (newItem != 0xFF) setHandItem(newItem); - _screen->showMouse(); if (_lang != 1) updateItemCommand(resItem, 3, 0xFF); @@ -500,7 +492,6 @@ bool KyraEngine_MR::itemInventoryMagic(Item handItem, int invSlot) { _mainCharacter.inventory[invSlot] = (int8)resItem; - _screen->hideMouse(); clearInventorySlot(invSlot, 0); drawInventorySlot(0, resItem, invSlot); @@ -508,7 +499,6 @@ bool KyraEngine_MR::itemInventoryMagic(Item handItem, int invSlot) { removeHandItem(); else if (newItem != 0xFF) setHandItem(newItem); - _screen->showMouse(); if (_lang != 1) updateItemCommand(resItem, 3, 0xFF); diff --git a/engines/kyra/items_v2.cpp b/engines/kyra/items_v2.cpp index c191c2e62b..2145a2c2f0 100644 --- a/engines/kyra/items_v2.cpp +++ b/engines/kyra/items_v2.cpp @@ -82,26 +82,19 @@ void KyraEngine_v2::resetItem(int index) { } void KyraEngine_v2::setHandItem(Item item) { - Screen *scr = screen(); - scr->hideMouse(); - if (item == kItemNone) { removeHandItem(); } else { setMouseCursor(item); _itemInHand = item; } - - scr->showMouse(); } void KyraEngine_v2::removeHandItem() { Screen *scr = screen(); - scr->hideMouse(); scr->setMouseCursor(0, 0, getShapePtr(0)); _itemInHand = kItemNone; _mouseState = kItemNone; - scr->showMouse(); } } // end of namesapce Kyra diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 0ba173d9d0..7fbecb7f53 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -419,8 +419,6 @@ void KyraEngine_HoF::startup() { _screen->loadPalette("PALETTE.COL", _screen->getPalette(0)); _screen->loadBitmap("_PLAYFLD.CPS", 3, 3, 0); _screen->copyPage(3, 0); - _screen->showMouse(); - _screen->hideMouse(); clearAnimObjects(); @@ -784,20 +782,16 @@ void KyraEngine_HoF::updateMouse() { if (type != 0 && _mouseState != type && _screen->isMouseVisible()) { _mouseState = type; - _screen->hideMouse(); _screen->setMouseCursor(xOffset, yOffset, getShapePtr(shapeIndex)); - _screen->showMouse(); } if (type == 0 && _mouseState != _itemInHand && _screen->isMouseVisible()) { if ((mouse.y > 145) || (mouse.x > 6 && mouse.x < 312 && mouse.y > 6 && mouse.y < 135)) { _mouseState = _itemInHand; - _screen->hideMouse(); if (_itemInHand == kItemNone) _screen->setMouseCursor(0, 0, getShapePtr(0)); else _screen->setMouseCursor(8, 15, getShapePtr(_itemInHand+64)); - _screen->showMouse(); } } } @@ -914,7 +908,6 @@ void KyraEngine_HoF::showMessageFromCCode(int id, int16 palIndex, int) { void KyraEngine_HoF::showMessage(const char *string, int16 palIndex) { _shownMessage = string; - _screen->hideMouse(); _screen->fillRect(0, 190, 319, 199, 0xCF); if (string) { @@ -932,7 +925,6 @@ void KyraEngine_HoF::showMessage(const char *string, int16 palIndex) { } _fadeMessagePalette = false; - _screen->showMouse(); } void KyraEngine_HoF::showChapterMessage(int id, int16 palIndex) { @@ -1116,9 +1108,7 @@ int KyraEngine_HoF::getDrawLayer(int x, int y) { void KyraEngine_HoF::backUpPage0() { if (_screenBuffer) { - _screen->hideMouse(); memcpy(_screenBuffer, _screen->getCPagePtr(0), 64000); - _screen->showMouse(); } } diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp index ece4a0daba..27bc2ad22a 100644 --- a/engines/kyra/kyra_lok.cpp +++ b/engines/kyra/kyra_lok.cpp @@ -454,10 +454,8 @@ void KyraEngine_LoK::mainLoop() { if (_deathHandler != -1) { snd_playWanderScoreViaMap(0, 1); snd_playSoundEffect(49); - _screen->hideMouse(); _screen->setMouseCursor(1, 1, _shapes[0]); removeHandItem(); - _screen->showMouse(); _gui->buttonMenuCallback(0); _deathHandler = -1; } @@ -706,7 +704,6 @@ int KyraEngine_LoK::processInputHelper(int xpos, int ypos) { uint8 item = findItemAtPos(xpos, ypos); if (item != 0xFF) { if (_itemInHand == kItemNone) { - _screen->hideMouse(); _animator->animRemoveGameItem(item); snd_playSoundEffect(53); assert(_currentCharacter->sceneId < _roomTableSize); @@ -717,7 +714,6 @@ int KyraEngine_LoK::processInputHelper(int xpos, int ypos) { assert(_itemList && _takenList); updateSentenceCommand(_itemList[getItemListIndex(item2)], _takenList[0], 179); _itemInHand = item2; - _screen->showMouse(); clickEventHandler2(); return 1; } else { @@ -834,21 +830,17 @@ void KyraEngine_LoK::updateMousePointer(bool forceUpdate) { if ((newMouseState && _mouseState != newMouseState) || (newMouseState && forceUpdate)) { _mouseState = newMouseState; - _screen->hideMouse(); _screen->setMouseCursor(newX, newY, _shapes[shape]); - _screen->showMouse(); } if (!newMouseState) { if (_mouseState != _itemInHand || forceUpdate) { if (mouse.y > 158 || (mouse.x >= 12 && mouse.x < 308 && mouse.y < 136 && mouse.y >= 12) || forceUpdate) { _mouseState = _itemInHand; - _screen->hideMouse(); if (_itemInHand == kItemNone) _screen->setMouseCursor(1, 1, _shapes[0]); else _screen->setMouseCursor(8, 15, _shapes[216 + _itemInHand]); - _screen->showMouse(); } } } diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 39ed0d038a..448e4ef70d 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -1298,7 +1298,6 @@ bool KyraEngine_MR::updateScore(int scoreId, int strId) { setNextIdleAnimTimer(); _scoreFlagTable[scoreIndex] |= (1 << scoreBit); - _screen->hideMouse(); strcpy(_stringBuffer, (const char *)getTableEntry(_scoreFile, strId)); strcat(_stringBuffer, ": "); @@ -1308,7 +1307,6 @@ bool KyraEngine_MR::updateScore(int scoreId, int strId) { if (count > 0) scoreIncrease(count, _stringBuffer); - _screen->showMouse(); setNextIdleAnimTimer(); return true; } diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index 75b568a00a..848fb18b6a 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -198,8 +198,6 @@ void KyraEngine_v2::moveCharacter(int facing, int x, int y) { y &= ~1; _mainCharacter.facing = facing; - Screen *scr = screen(); - scr->hideMouse(); switch (facing) { case 0: while (_mainCharacter.y1 > y) @@ -224,7 +222,6 @@ void KyraEngine_v2::moveCharacter(int facing, int x, int y) { default: break; } - scr->showMouse(); } void KyraEngine_v2::updateCharPosWithUpdate() { diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 711fe15348..4fd5985a09 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -1128,8 +1128,6 @@ void Screen::drawBox(int x1, int y1, int x2, int y2, int color) { void Screen::drawShadedBox(int x1, int y1, int x2, int y2, int color1, int color2) { assert(x1 >= 0 && y1 >= 0); - hideMouse(); - fillRect(x1, y1, x2, y1 + 1, color1); fillRect(x2 - 1, y1, x2, y2, color1); @@ -1137,8 +1135,6 @@ void Screen::drawShadedBox(int x1, int y1, int x2, int y2, int color1, int color drawClippedLine(x1 + 1, y1 + 1, x1 + 1, y2 - 1, color2); drawClippedLine(x1, y2 - 1, x2 - 1, y2 - 1, color2); drawClippedLine(x1, y2, x2, y2, color2); - - showMouse(); } void Screen::drawClippedLine(int x1, int y1, int x2, int y2, int color) { diff --git a/engines/kyra/screen_lok.cpp b/engines/kyra/screen_lok.cpp index f32a898dd9..f028f93294 100644 --- a/engines/kyra/screen_lok.cpp +++ b/engines/kyra/screen_lok.cpp @@ -190,7 +190,6 @@ void Screen_LoK::copyBackgroundBlock(int x, int page, int flag) { _curPage = page; int curX = x; - hideMouse(); copyRegionToBuffer(_curPage, 8, 8, 8, height, ptr2); for (int i = 0; i < 19; ++i) { int tempX = curX + 1; @@ -208,7 +207,6 @@ void Screen_LoK::copyBackgroundBlock(int x, int page, int flag) { curX = curX % 38; } } - showMouse(); _curPage = oldVideoPage; } diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index b80b8105a1..fca83ae632 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -325,7 +325,6 @@ int KyraEngine_HoF::o2_drawShape(EMCState *script) { if (modeFlag) { _screen->drawShape(2, shp, x, y, 2, dsFlag ? 1 : 0); } else { - _screen->hideMouse(); restorePage3(); _screen->drawShape(2, shp, x, y, 2, dsFlag ? 1 : 0); memcpy(_gamePlayBuffer, _screen->getCPagePtr(3), 46080); @@ -334,7 +333,6 @@ int KyraEngine_HoF::o2_drawShape(EMCState *script) { flagAnimObjsForRefresh(); flagAnimObjsSpecialRefresh(); refreshAnimObjectsIfNeed(); - _screen->showMouse(); } return 0; @@ -492,7 +490,6 @@ int KyraEngine_HoF::o2_drawSceneShape(EMCState *script) { int y = stackPos(2); int flag = (stackPos(3) != 0) ? 1 : 0; - _screen->hideMouse(); restorePage3(); _screen->drawShape(2, _sceneShapeTable[shape], x, y, 2, flag); @@ -504,7 +501,6 @@ int KyraEngine_HoF::o2_drawSceneShape(EMCState *script) { flagAnimObjsSpecialRefresh(); flagAnimObjsForRefresh(); refreshAnimObjectsIfNeed(); - _screen->showMouse(); return 0; } diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp index 8342bccab6..db9e01cabb 100644 --- a/engines/kyra/script_lok.cpp +++ b/engines/kyra/script_lok.cpp @@ -157,7 +157,6 @@ int KyraEngine_LoK::o1_dropItemInScene(EMCState *script) { int KyraEngine_LoK::o1_drawAnimShapeIntoScene(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_drawAnimShapeIntoScene(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - _screen->hideMouse(); _animator->restoreAllObjectBackgrounds(); int shape = stackPos(0); int xpos = stackPos(1); @@ -169,7 +168,6 @@ int KyraEngine_LoK::o1_drawAnimShapeIntoScene(EMCState *script) { _animator->preserveAnyChangedBackgrounds(); _animator->flagAllObjectsForRefresh(); _animator->updateAllObjectShapes(); - _screen->showMouse(); return 0; } @@ -1298,7 +1296,6 @@ int KyraEngine_LoK::o1_drawItemShapeIntoScene(EMCState *script) { if (onlyHidPage) { _screen->drawShape(2, _shapes[216 + item], x, y, 0, flags); } else { - _screen->hideMouse(); _animator->restoreAllObjectBackgrounds(); _screen->drawShape(2, _shapes[216 + item], x, y, 0, flags); _screen->drawShape(0, _shapes[216 + item], x, y, 0, flags); @@ -1306,7 +1303,6 @@ int KyraEngine_LoK::o1_drawItemShapeIntoScene(EMCState *script) { _animator->preserveAnyChangedBackgrounds(); _animator->flagAllObjectsForRefresh(); _animator->updateAllObjectShapes(); - _screen->showMouse(); } return 0; } diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp index afe11aba02..22d0bc4e95 100644 --- a/engines/kyra/script_mr.cpp +++ b/engines/kyra/script_mr.cpp @@ -150,9 +150,7 @@ int KyraEngine_MR::o3_addItemToInventory(EMCState *script) { if (slot >= 0) { _mainCharacter.inventory[slot] = stackPos(0); if (_inventoryState) { - _screen->hideMouse(); redrawInventory(0); - _screen->showMouse(); } } return slot; @@ -330,7 +328,6 @@ int KyraEngine_MR::o3_drawSceneShape(EMCState *script) { int shape = stackPos(0); int flag = (stackPos(1) != 0) ? 1 : 0; - _screen->hideMouse(); restorePage3(); const int x = _sceneShapeDescs[shape].drawX; @@ -344,7 +341,6 @@ int KyraEngine_MR::o3_drawSceneShape(EMCState *script) { flagAnimObjsForRefresh(); refreshAnimObjectsIfNeed(); - _screen->showMouse(); return 0; } diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp index dd49d6faaa..e63d0a7d8f 100644 --- a/engines/kyra/sequences_lok.cpp +++ b/engines/kyra/sequences_lok.cpp @@ -838,9 +838,7 @@ void KyraEngine_LoK::seq_fillFlaskWithWater(int item, int type) { if (newItem == -1) return; - _screen->hideMouse(); setMouseItem(newItem); - _screen->showMouse(); _itemInHand = newItem; assert(_fullFlask); diff --git a/engines/kyra/text_hof.cpp b/engines/kyra/text_hof.cpp index 4a52d7d740..06067d6693 100644 --- a/engines/kyra/text_hof.cpp +++ b/engines/kyra/text_hof.cpp @@ -42,9 +42,7 @@ void TextDisplayer_HoF::restoreTalkTextMessageBkgd(int srcPage, int dstPage) { void TextDisplayer_HoF::restoreScreen() { _vm->restorePage3(); _vm->drawAnimObjects(); - _screen->hideMouse(); _screen->copyRegion(_talkCoords.x, _talkMessageY, _talkCoords.x, _talkMessageY, _talkCoords.w, _talkMessageH, 2, 0, Screen::CR_NO_P_CHECK); - _screen->showMouse(); _vm->flagAnimObjsForRefresh(); _vm->refreshAnimObjects(0); } @@ -58,8 +56,6 @@ void TextDisplayer_HoF::printCustomCharacterText(const char *text, int x, int y, int x1 = 0, x2 = 0; calcWidestLineBounds(x1, x2, w, x); - _screen->hideMouse(); - _talkCoords.x = x1; _talkCoords.w = w+2; _talkCoords.y = y; @@ -78,7 +74,6 @@ void TextDisplayer_HoF::printCustomCharacterText(const char *text, int x, int y, } _screen->_curPage = curPageBackUp; - _screen->showMouse(); } char *TextDisplayer_HoF::preprocessString(const char *str) { @@ -248,8 +243,6 @@ void KyraEngine_HoF::objectChatInit(const char *str, int object, int vocHigh, in restorePage3(); _text->backupTalkTextMessageBkgd(2, 2); - _screen->hideMouse(); - _chatTextEnabled = textEnabled(); if (_chatTextEnabled) { objectChatPrintText(str, object); @@ -264,8 +257,6 @@ void KyraEngine_HoF::objectChatInit(const char *str, int object, int vocHigh, in } else { _chatVocHigh = _chatVocLow = -1; } - - _screen->showMouse(); } void KyraEngine_HoF::objectChatPrintText(const char *str, int object) { diff --git a/engines/kyra/text_lok.cpp b/engines/kyra/text_lok.cpp index 62bdf18816..a557940868 100644 --- a/engines/kyra/text_lok.cpp +++ b/engines/kyra/text_lok.cpp @@ -296,10 +296,8 @@ void KyraEngine_LoK::characterSays(int vocFile, const char *chatStr, int8 charNu _animator->restoreAllObjectBackgrounds(); _screen->copyRegion(12, _text->_talkMessageY, 12, 136, 296, _text->_talkMessageH, 2, 2); - _screen->hideMouse(); _text->printCharacterText(processedString, charNum, _characterList[charNum].x1); - _screen->showMouse(); } if (chatDuration == -2) @@ -317,10 +315,8 @@ void KyraEngine_LoK::characterSays(int vocFile, const char *chatStr, int8 charNu _screen->copyRegion(12, 136, 12, _text->_talkMessageY, 296, _text->_talkMessageH, 2, 2); _animator->preserveAllBackgrounds(); _animator->prepDrawAllObjects(); - _screen->hideMouse(); _screen->copyRegion(12, _text->_talkMessageY, 12, _text->_talkMessageY, 296, _text->_talkMessageH, 2, 0); - _screen->showMouse(); _animator->flagAllObjectsForRefresh(); _animator->copyChangedObjectsForward(0); } @@ -332,7 +328,6 @@ void KyraEngine_LoK::characterSays(int vocFile, const char *chatStr, int8 charNu } void KyraEngine_LoK::drawSentenceCommand(const char *sentence, int color) { - _screen->hideMouse(); _screen->fillRect(8, 143, 311, 152, _flags.platform == Common::kPlatformAmiga ? 19 : 12); if (_flags.platform == Common::kPlatformAmiga) { @@ -354,7 +349,6 @@ void KyraEngine_LoK::drawSentenceCommand(const char *sentence, int color) { } _text->printText(sentence, 8, 143, 0xFF, _flags.platform == Common::kPlatformAmiga ? 19 : 12, 0); - _screen->showMouse(); setTextFadeTimerCountdown(15); _fadeText = false; } diff --git a/engines/kyra/text_mr.cpp b/engines/kyra/text_mr.cpp index b680e9c6f9..10b0880f29 100644 --- a/engines/kyra/text_mr.cpp +++ b/engines/kyra/text_mr.cpp @@ -145,9 +145,7 @@ void TextDisplayer_MR::printText(const char *str, int x, int y, uint8 c0, uint8 void TextDisplayer_MR::restoreScreen() { _vm->restorePage3(); _vm->drawAnimObjects(); - _screen->hideMouse(); _screen->copyRegion(_talkCoords.x, _talkMessageY, _talkCoords.x, _talkMessageY, _talkCoords.w, _talkMessageH, 2, 0, Screen::CR_NO_P_CHECK); - _screen->showMouse(); _vm->flagAnimObjsForRefresh(); _vm->refreshAnimObjects(0); } @@ -261,8 +259,6 @@ void KyraEngine_MR::objectChatInit(const char *str, int object, int vocHigh, int restorePage3(); - _screen->hideMouse(); - _chatTextEnabled = textEnabled(); if (_chatTextEnabled) { objectChatPrintText(str, object); @@ -277,8 +273,6 @@ void KyraEngine_MR::objectChatInit(const char *str, int object, int vocHigh, int } else { _chatVocHigh = _chatVocLow = -1; } - - _screen->showMouse(); } void KyraEngine_MR::objectChatPrintText(const char *str, int object) { -- cgit v1.2.3 From d5eb3e3c06a1f396f578b21c4a3aaff3519513a5 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 13 Jun 2012 04:32:11 +0200 Subject: GUI: Allow querying of the pixel format used by ThemeEngine. --- gui/ThemeEngine.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index 67221d98ce..21711e2955 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -275,6 +275,11 @@ public: void enable(); void disable(); + /** + * Query the set up pixel format. + */ + const Graphics::PixelFormat getPixelFormat() const { return _overlayFormat; } + /** * Implementation of the GUI::Theme API. Called when a * new dialog is opened. Note that the boolean parameter -- cgit v1.2.3 From cebbc11dac77d30fac3be4cc0ebdc6bc059636ef Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 13 Jun 2012 04:44:39 +0200 Subject: GUI: Allow Surfaces with abitrary RGB pixel formats to be used in PicButtonWidget and GraphicsWidget. Only 1Bpp aka paletted surfaces are not supported. --- gui/widget.cpp | 79 ++++++++++++++++++++++++++++++++++++++++------------------ gui/widget.h | 4 +-- 2 files changed, 57 insertions(+), 26 deletions(-) diff --git a/gui/widget.cpp b/gui/widget.cpp index 657245c815..1b68e36ea8 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -376,7 +376,7 @@ void ButtonWidget::wantTickle(bool tickled) { PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip, uint32 cmd, uint8 hotkey) : ButtonWidget(boss, x, y, w, h, "", tooltip, cmd, hotkey), - _gfx(), _alpha(256), _transparency(false) { + _gfx(new Graphics::Surface()), _alpha(256), _transparency(false) { setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG); _type = kButtonWidget; @@ -384,38 +384,54 @@ PicButtonWidget::PicButtonWidget(GuiObject *boss, int x, int y, int w, int h, co PicButtonWidget::PicButtonWidget(GuiObject *boss, const Common::String &name, const char *tooltip, uint32 cmd, uint8 hotkey) : ButtonWidget(boss, name, "", tooltip, cmd, hotkey), - _alpha(256), _transparency(false) { + _gfx(new Graphics::Surface()), _alpha(256), _transparency(false) { setFlags(WIDGET_ENABLED/* | WIDGET_BORDER*/ | WIDGET_CLEARBG); _type = kButtonWidget; } PicButtonWidget::~PicButtonWidget() { - _gfx.free(); + _gfx->free(); + delete _gfx; } void PicButtonWidget::setGfx(const Graphics::Surface *gfx) { - _gfx.free(); + _gfx->free(); if (!gfx || !gfx->pixels) return; + if (gfx->format.bytesPerPixel == 1) { + warning("PicButtonWidget::setGfx got paletted surface passed"); + return; + } + + if (gfx->w > _w || gfx->h > _h) { warning("PicButtonWidget has size %dx%d, but a surface with %dx%d is to be set", _w, _h, gfx->w, gfx->h); return; } - // TODO: add conversion to OverlayColor - _gfx.copyFrom(*gfx); + _gfx->copyFrom(*gfx); } void PicButtonWidget::drawWidget() { g_gui.theme()->drawButton(Common::Rect(_x, _y, _x+_w, _y+_h), "", _state, getFlags()); - if (sizeof(OverlayColor) == _gfx.format.bytesPerPixel && _gfx.pixels) { - const int x = _x + (_w - _gfx.w) / 2; - const int y = _y + (_h - _gfx.h) / 2; + if (_gfx->pixels) { + // Check whether the set up surface needs to be converted to the GUI + // color format. + const Graphics::PixelFormat &requiredFormat = g_gui.theme()->getPixelFormat(); + if (_gfx->format != requiredFormat) { + Graphics::Surface *converted = _gfx->convertTo(requiredFormat); + _gfx->free(); + delete _gfx; + _gfx = converted; + } + + const int x = _x + (_w - _gfx->w) / 2; + const int y = _y + (_h - _gfx->h) / 2; - g_gui.theme()->drawSurface(Common::Rect(x, y, x + _gfx.w, y + _gfx.h), _gfx, _state, _alpha, _transparency); + g_gui.theme()->drawSurface(Common::Rect(x, y, x + _gfx->w, y + _gfx->h), *_gfx, _state, _alpha, _transparency); } } @@ -603,34 +619,39 @@ int SliderWidget::posToValue(int pos) { #pragma mark - GraphicsWidget::GraphicsWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip) - : Widget(boss, x, y, w, h, tooltip), _gfx(), _alpha(256), _transparency(false) { + : Widget(boss, x, y, w, h, tooltip), _gfx(new Graphics::Surface()), _alpha(256), _transparency(false) { setFlags(WIDGET_ENABLED | WIDGET_CLEARBG); _type = kGraphicsWidget; } GraphicsWidget::GraphicsWidget(GuiObject *boss, const Common::String &name, const char *tooltip) - : Widget(boss, name, tooltip), _gfx(), _alpha(256), _transparency(false) { + : Widget(boss, name, tooltip), _gfx(new Graphics::Surface()), _alpha(256), _transparency(false) { setFlags(WIDGET_ENABLED | WIDGET_CLEARBG); _type = kGraphicsWidget; } GraphicsWidget::~GraphicsWidget() { - _gfx.free(); + _gfx->free(); + delete _gfx; } void GraphicsWidget::setGfx(const Graphics::Surface *gfx) { - _gfx.free(); + _gfx->free(); if (!gfx || !gfx->pixels) return; + if (gfx->format.bytesPerPixel == 1) { + warning("GraphicsWidget::setGfx got paletted surface passed"); + return; + } + if (gfx->w > _w || gfx->h > _h) { warning("GraphicsWidget has size %dx%d, but a surface with %dx%d is to be set", _w, _h, gfx->w, gfx->h); return; } - // TODO: add conversion to OverlayColor - _gfx.copyFrom(*gfx); + _gfx->copyFrom(*gfx); } void GraphicsWidget::setGfx(int w, int h, int r, int g, int b) { @@ -639,19 +660,29 @@ void GraphicsWidget::setGfx(int w, int h, int r, int g, int b) { if (h == -1) h = _h; - Graphics::PixelFormat overlayFormat = g_system->getOverlayFormat(); + const Graphics::PixelFormat &requiredFormat = g_gui.theme()->getPixelFormat(); - _gfx.free(); - _gfx.create(w, h, overlayFormat); - _gfx.fillRect(Common::Rect(0, 0, w, h), _gfx.format.RGBToColor(r, g, b)); + _gfx->free(); + _gfx->create(w, h, requiredFormat); + _gfx->fillRect(Common::Rect(0, 0, w, h), _gfx->format.RGBToColor(r, g, b)); } void GraphicsWidget::drawWidget() { - if (sizeof(OverlayColor) == _gfx.format.bytesPerPixel && _gfx.pixels) { - const int x = _x + (_w - _gfx.w) / 2; - const int y = _y + (_h - _gfx.h) / 2; + if (_gfx->pixels) { + // Check whether the set up surface needs to be converted to the GUI + // color format. + const Graphics::PixelFormat &requiredFormat = g_gui.theme()->getPixelFormat(); + if (_gfx->format != requiredFormat) { + Graphics::Surface *converted = _gfx->convertTo(requiredFormat); + _gfx->free(); + delete _gfx; + _gfx = converted; + } + + const int x = _x + (_w - _gfx->w) / 2; + const int y = _y + (_h - _gfx->h) / 2; - g_gui.theme()->drawSurface(Common::Rect(x, y, x + _gfx.w, y + _gfx.h), _gfx, _state, _alpha, _transparency); + g_gui.theme()->drawSurface(Common::Rect(x, y, x + _gfx->w, y + _gfx->h), *_gfx, _state, _alpha, _transparency); } } diff --git a/gui/widget.h b/gui/widget.h index 6a6c67ced9..6de56862c3 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -227,7 +227,7 @@ public: protected: void drawWidget(); - Graphics::Surface _gfx; + Graphics::Surface *_gfx; int _alpha; bool _transparency; }; @@ -355,7 +355,7 @@ public: protected: void drawWidget(); - Graphics::Surface _gfx; + Graphics::Surface *_gfx; int _alpha; bool _transparency; }; -- cgit v1.2.3 From d99eb1e6141ba6dc33ca9f600267d4787a67db48 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 13 Jun 2012 04:57:55 +0200 Subject: COMMON: Remove last traces of 8bpp overlay support from OSystem docs. --- common/system.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/common/system.h b/common/system.h index 976a3d2c4a..60c0e0f8ef 100644 --- a/common/system.h +++ b/common/system.h @@ -389,10 +389,7 @@ public: * graphics have a resolution of 320x200; then the overlay shall * have a resolution of 640x400, but it still has the same * physical size as the game graphics. - * The overlay usually uses 16bpp, but on some ports, only 8bpp - * are availble, so that is supported, too, via a compile time - * switch (see also the OverlayColor typedef in scummsys.h). - * + * The overlay is forced to a 16bpp mode right now. * * Finally, there is the mouse layer. This layer doesn't have to * actually exist within the backend -- it all depends on how a @@ -758,13 +755,11 @@ public: * In order to be able to display dialogs atop the game graphics, backends * must provide an overlay mode. * - * The overlay can be 8 or 16 bpp. Depending on which it is, OverlayColor - * is 8 or 16 bit. + * The overlay is currently forced at 16 bpp. * * For 'coolness' we usually want to have an overlay which is blended over * the game graphics. On backends which support alpha blending, this is - * no issue; but on other systems (in particular those which only support - * 8bpp), this needs some trickery. + * no issue; but on other systems this needs some trickery. * * Essentially, we fake (alpha) blending on these systems by copying the * current game graphics into the overlay buffer when activating the overlay, -- cgit v1.2.3 From 09ea48978a80e5148be74a7a5ffb2ff099e74ad7 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 13 Jun 2012 05:06:58 +0200 Subject: COMMON: Remove traces of overlay scale from the OSystem documentation. --- common/system.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common/system.h b/common/system.h index 60c0e0f8ef..97205846cb 100644 --- a/common/system.h +++ b/common/system.h @@ -380,15 +380,15 @@ public: * * * The next layer is the overlay. It is composed over the game - * graphics. By default, it has exactly the same size and - * resolution as the game graphics. However, client code can - * specify an overlay scale (as an additional parameter to - * initSize()). This is meant to increase the resolution of the - * overlay while keeping its size the same as that of the game - * graphics. For example, if the overlay scale is 2, and the game - * graphics have a resolution of 320x200; then the overlay shall - * have a resolution of 640x400, but it still has the same - * physical size as the game graphics. + * graphics. Historically the overlay size had always been a + * multiple of the game resolution, for example when the game + * resolution was 320x200 and the user selected a 2x scaler and did + * not enable aspect ratio correction it had a size of 640x400. + * An exception was the aspect ratio correction, which did allow + * for non multiples of the vertical resolution of the game screen. + * Nowadays the overlay size does not need to have any relation to + * the game resolution though, for example the overlay resolution + * might be the same as the physical screen resolution. * The overlay is forced to a 16bpp mode right now. * * Finally, there is the mouse layer. This layer doesn't have to -- cgit v1.2.3 From 51466ecfbb8158792931c27ff00c3bf937adfd40 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 13 Jun 2012 05:09:02 +0200 Subject: COMMON: Remove traces of mouse cursor target scale from OSystem docs. --- common/system.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/common/system.h b/common/system.h index 97205846cb..94bf7f01eb 100644 --- a/common/system.h +++ b/common/system.h @@ -396,14 +396,6 @@ public: * backend chooses to implement mouse cursors, but in the default * SDL backend, it really is a separate layer. The mouse can * have a palette of its own, if the backend supports it. - * The scale of the mouse cursor is called 'cursorTargetScale'. - * This is meant as a hint to the backend. For example, let us - * assume the overlay is not visible, and the game graphics are - * displayed using a 2x scaler. If a mouse cursor with a - * cursorTargetScale of 1 is set, then it should be scaled by - * factor 2x, too, just like the game graphics. But if it has a - * cursorTargetScale of 2, then it shouldn't be scaled again by - * the game graphics scaler. * * On a note for OSystem users here. We do not require our graphics * to be thread safe and in fact most/all backends using OpenGL are -- cgit v1.2.3 From 04b6af91765ddf9d1c5c5ec6f9722795bf2e4f27 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 13 Jun 2012 09:40:11 +0200 Subject: SWORD25: Janitorial: Apply coding conventions --- engines/sword25/gfx/image/art.cpp | 28 ++++++++++------------------ engines/sword25/gfx/image/art.h | 2 +- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/engines/sword25/gfx/image/art.cpp b/engines/sword25/gfx/image/art.cpp index 3944a207c8..9c4b9fe8bd 100644 --- a/engines/sword25/gfx/image/art.cpp +++ b/engines/sword25/gfx/image/art.cpp @@ -2367,38 +2367,30 @@ ArtSVPRenderAAIter *art_svp_render_aa_iter(const ArtSVP *svp, return iter; } -#define ADD_STEP(xpos, xdelta) \ +#define ADD_STEP(xpos, xdelta) \ /* stereotype code fragment for adding a step */ \ - if (n_steps == 0 || steps[n_steps - 1].x < xpos) \ - { \ + if (n_steps == 0 || steps[n_steps - 1].x < xpos) { \ sx = n_steps; \ steps[sx].x = xpos; \ steps[sx].delta = xdelta; \ n_steps++; \ - } \ - else \ - { \ - for (sx = n_steps; sx > 0; sx--) \ - { \ - if (steps[sx - 1].x == xpos) \ - { \ + } else { \ + for (sx = n_steps; sx > 0; sx--) { \ + if (steps[sx - 1].x == xpos) { \ steps[sx - 1].delta += xdelta; \ sx = n_steps; \ break; \ - } \ - else if (steps[sx - 1].x < xpos) \ - { \ + } else if (steps[sx - 1].x < xpos) { \ break; \ - } \ - } \ - if (sx < n_steps) \ - { \ + } \ + } \ + if (sx < n_steps) { \ memmove (&steps[sx + 1], &steps[sx], \ (n_steps - sx) * sizeof(steps[0])); \ steps[sx].x = xpos; \ steps[sx].delta = xdelta; \ n_steps++; \ - } \ + } \ } void art_svp_render_aa_iter_step(ArtSVPRenderAAIter *iter, int *p_start, diff --git a/engines/sword25/gfx/image/art.h b/engines/sword25/gfx/image/art.h index 8c9c97bc57..40bcb55aa7 100644 --- a/engines/sword25/gfx/image/art.h +++ b/engines/sword25/gfx/image/art.h @@ -50,7 +50,7 @@ namespace Sword25 { be variables. They can also be pstruct->el lvalues. */ #define art_expand(p, type, max) \ do { \ - if(max) {\ + if (max) {\ type *tmp = art_renew(p, type, max <<= 1); \ if (!tmp) error("Cannot reallocate memory for art data"); \ p = tmp; \ -- cgit v1.2.3 From f76c71d9682e193af3c852e27c3923950137445d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 13 Jun 2012 03:48:39 +0300 Subject: SCI: Add debug code to automatically skip robot videos --- engines/sci/engine/kvideo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index c9cf652013..f176a13721 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -259,6 +259,7 @@ reg_t kRobot(EngineState *s, int argc, reg_t *argv) { warning("kRobot(%d)", subop); break; case 8: // sync + //if (false) { // debug: automatically skip all robot videos if ((uint32)g_sci->_robotDecoder->getCurFrame() != g_sci->_robotDecoder->getFrameCount() - 1) { writeSelector(s->_segMan, argv[1], SELECTOR(signal), NULL_REG); } else { -- cgit v1.2.3 From aeac51d7263bf5233f3fb1f24d8a0789a9f8ca18 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 13 Jun 2012 11:00:58 +0300 Subject: SCI: Implement the file operations needed for the save dialog in Phantasmagoria Phantasmagoria's scripts keep polling for the existence of the savegame index file and request to read and write it using the same parameters when opening it. The index file is closed and reopened for every save slot, which is slow and can be much slower on non-desktop devices. Also, the game scripts request seeking in writable streams and request to expand the existing index file. To provide this functionality and to reduce constant slow file opening and closing, this virtual class has been introduced --- engines/sci/engine/file.cpp | 139 ++++++++++++++++++++++++++++++++++++++ engines/sci/engine/file.h | 75 +++++++++++++++++++++ engines/sci/engine/kfile.cpp | 156 +++++++++++++++++++++++++++++++++---------- engines/sci/engine/state.cpp | 12 +++- engines/sci/engine/state.h | 5 ++ engines/sci/module.mk | 1 + 6 files changed, 351 insertions(+), 37 deletions(-) create mode 100644 engines/sci/engine/file.cpp create mode 100644 engines/sci/engine/file.h diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp new file mode 100644 index 0000000000..8876f3c46c --- /dev/null +++ b/engines/sci/engine/file.cpp @@ -0,0 +1,139 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/savefile.h" +#include "common/stream.h" + +#include "sci/sci.h" +#include "sci/engine/file.h" + +namespace Sci { + +#ifdef ENABLE_SCI32 + +VirtualIndexFile::VirtualIndexFile(Common::String fileName) : _fileName(fileName), _changed(false) { + Common::SeekableReadStream *inFile = g_sci->getSaveFileManager()->openForLoading(fileName); + + _bufferSize = inFile->size(); + _buffer = new char[_bufferSize]; + inFile->read(_buffer, _bufferSize); + _ptr = _buffer; + delete inFile; +} + +VirtualIndexFile::~VirtualIndexFile() { + close(); + + _bufferSize = 0; + delete[] _buffer; + _buffer = 0; +} + +uint32 VirtualIndexFile::read(char *buffer, uint32 size) { + uint32 curPos = _ptr - _buffer; + uint32 finalSize = MIN(size, _bufferSize - curPos); + char *localPtr = buffer; + + for (uint32 i = 0; i < finalSize; i++) + *localPtr++ = *_ptr++; + + return finalSize; +} + +uint32 VirtualIndexFile::write(const char *buffer, uint32 size) { + _changed = true; + uint32 curPos = _ptr - _buffer; + + // Check if the buffer needs to be resized + if (curPos + size >= _bufferSize) { + _bufferSize = curPos + size + 1; + char *tmp = _buffer; + _buffer = new char[_bufferSize]; + _ptr = _buffer + curPos; + memcpy(_buffer, tmp, _bufferSize); + delete[] tmp; + } + + for (uint32 i = 0; i < size; i++) + *_ptr++ = *buffer++; + + return size; +} + +uint32 VirtualIndexFile::readLine(char *buffer, uint32 size) { + uint32 startPos = _ptr - _buffer; + uint32 bytesRead = 0; + char *localPtr = buffer; + + // This is not a full-blown implementation of readLine, but it + // suffices for Phantasmagoria + while (startPos + bytesRead < size) { + bytesRead++; + + if (*_ptr == 0 || *_ptr == 0x0A) { + _ptr++; + *localPtr = 0; + return bytesRead; + } else { + *localPtr++ = *_ptr++; + } + } + + return bytesRead; +} + +bool VirtualIndexFile::seek(int32 offset, int whence) { + uint32 startPos = _ptr - _buffer; + assert(offset >= 0); + + switch (whence) { + case SEEK_CUR: + assert(startPos + offset < _bufferSize); + _ptr += offset; + break; + case SEEK_SET: + assert(offset < _bufferSize); + _ptr = _buffer + offset; + break; + case SEEK_END: + assert(_bufferSize - offset >= 0); + _ptr = _buffer + (_bufferSize - offset); + break; + } + + return true; +} + +void VirtualIndexFile::close() { + if (_changed) { + Common::WriteStream *outFile = g_sci->getSaveFileManager()->openForSaving(_fileName); + outFile->write(_buffer, _bufferSize); + delete outFile; + } + + // Maintain the buffer, and seek to the beginning of it + _ptr = _buffer; +} + +#endif + +} // End of namespace Sci diff --git a/engines/sci/engine/file.h b/engines/sci/engine/file.h new file mode 100644 index 0000000000..e7b1090c91 --- /dev/null +++ b/engines/sci/engine/file.h @@ -0,0 +1,75 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef SCI_ENGINE_FILE_H +#define SCI_ENGINE_FILE_H + +#include "common/scummsys.h" + +namespace Sci { + +#ifdef ENABLE_SCI32 + +/** + * An implementation of a virtual file that supports basic read and write + * operations simultaneously. + * + * This class has been initially implemented for Phantasmagoria, which has its + * own custom save/load code. The load code keeps checking for the existence + * of the save index file and keeps closing and reopening it for each save + * slot. This is notoriously slow and clumsy, and introduces noticeable delays, + * especially for non-desktop systems. Also, its game scripts request to open + * the index file for reading and writing with the same parameters + * (SaveManager::setCurrentSave and SaveManager::getCurrentSave). Moreover, + * the game scripts reopen the index file for writing in order to update it + * and seek within it. We do not support seeking in writeable streams, and the + * fact that our saved games are ZIP files makes this operation even more + * expensive. Finally, the savegame index file is supposed to be expanded when + * a new save slot is added. + * For the aforementioned reasons, this class has been implemented, which offers + * the basic functionality needed by the game scripts in Phantasmagoria. + */ +class VirtualIndexFile { +public: + VirtualIndexFile(Common::String fileName); + ~VirtualIndexFile(); + + uint32 read(char *buffer, uint32 size); + uint32 readLine(char *buffer, uint32 size); + uint32 write(const char *buffer, uint32 size); + bool seek(int32 offset, int whence); + void close(); + +private: + char *_buffer; + uint32 _bufferSize; + char *_ptr; + + Common::String _fileName; + bool _changed; +}; + +#endif + +} // End of namespace Sci + +#endif // SCI_ENGINE_FILE_H diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 42f8b8832c..0dd2296f41 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -33,6 +33,7 @@ #include "gui/saveload.h" #include "sci/sci.h" +#include "sci/engine/file.h" #include "sci/engine/state.h" #include "sci/engine/kernel.h" #include "sci/engine/savegame.h" @@ -72,8 +73,6 @@ struct SavegameDesc { * for reading only. */ - - FileHandle::FileHandle() : _in(0), _out(0) { } @@ -93,15 +92,14 @@ bool FileHandle::isOpen() const { return _in || _out; } - - enum { _K_FILE_MODE_OPEN_OR_CREATE = 0, _K_FILE_MODE_OPEN_OR_FAIL = 1, _K_FILE_MODE_CREATE = 2 }; - +#define VIRTUALFILE_HANDLE 200 +#define PHANTASMAGORIA_SAVEGAME_INDEX "phantsg.dir" reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool unwrapFilename) { Common::String englishName = g_sci->getSciLanguageString(filename, K_LANG_ENGLISH); @@ -130,6 +128,7 @@ reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool u outFile = saveFileMan->openForSaving(wrappedName); if (!outFile) debugC(kDebugLevelFile, " -> file_open(_K_FILE_MODE_CREATE): failed to create file '%s'", englishName.c_str()); + // QfG1 opens the character export file with _K_FILE_MODE_CREATE first, // closes it immediately and opens it again with this here. Perhaps // other games use this for read access as well. I guess changing this @@ -171,8 +170,8 @@ reg_t kFOpen(EngineState *s, int argc, reg_t *argv) { } static FileHandle *getFileFromHandle(EngineState *s, uint handle) { - if (handle == 0) { - error("Attempt to use file handle 0"); + if (handle == 0 || handle == VIRTUALFILE_HANDLE) { + error("Attempt to use invalid file handle (%d)", handle); return 0; } @@ -738,6 +737,21 @@ reg_t kFileIO(EngineState *s, int argc, reg_t *argv) { reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) { Common::String name = s->_segMan->getString(argv[0]); +#ifdef ENABLE_SCI32 + if (name == PHANTASMAGORIA_SAVEGAME_INDEX) { + if (s->_virtualIndexFile) { + return make_reg(0, VIRTUALFILE_HANDLE); + } else { + Common::String englishName = g_sci->getSciLanguageString(name, K_LANG_ENGLISH); + Common::String wrappedName = g_sci->wrapFilename(englishName); + if (!g_sci->getSaveFileManager()->listSavefiles(wrappedName).empty()) { + s->_virtualIndexFile = new VirtualIndexFile(wrappedName); + return make_reg(0, VIRTUALFILE_HANDLE); + } + } + } +#endif + // SCI32 can call K_FILEIO_OPEN with only one argument. It seems to // just be checking if it exists. int mode = (argc < 2) ? (int)_K_FILE_MODE_OPEN_OR_FAIL : argv[1].toUint16(); @@ -780,7 +794,16 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) { reg_t kFileIOClose(EngineState *s, int argc, reg_t *argv) { debugC(kDebugLevelFile, "kFileIO(close): %d", argv[0].toUint16()); - FileHandle *f = getFileFromHandle(s, argv[0].toUint16()); + uint16 handle = argv[0].toUint16(); + +#ifdef ENABLE_SCI32 + if (handle == VIRTUALFILE_HANDLE) { + s->_virtualIndexFile->close(); + return SIGNAL_REG; + } +#endif + + FileHandle *f = getFileFromHandle(s, handle); if (f) { f->close(); return SIGNAL_REG; @@ -789,39 +812,56 @@ reg_t kFileIOClose(EngineState *s, int argc, reg_t *argv) { } reg_t kFileIOReadRaw(EngineState *s, int argc, reg_t *argv) { - int handle = argv[0].toUint16(); - int size = argv[2].toUint16(); + uint16 handle = argv[0].toUint16(); + uint16 size = argv[2].toUint16(); int bytesRead = 0; char *buf = new char[size]; debugC(kDebugLevelFile, "kFileIO(readRaw): %d, %d", handle, size); - FileHandle *f = getFileFromHandle(s, handle); - if (f) { - bytesRead = f->_in->read(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); +#ifdef ENABLE_SCI32 + if (handle == VIRTUALFILE_HANDLE) { + bytesRead = s->_virtualIndexFile->read(buf, size); + } else { +#endif + FileHandle *f = getFileFromHandle(s, handle); + if (f) + bytesRead = f->_in->read(buf, size); +#ifdef ENABLE_SCI32 } +#endif + + // 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; return make_reg(0, bytesRead); } reg_t kFileIOWriteRaw(EngineState *s, int argc, reg_t *argv) { - int handle = argv[0].toUint16(); - int size = argv[2].toUint16(); + uint16 handle = argv[0].toUint16(); + uint16 size = argv[2].toUint16(); char *buf = new char[size]; bool success = false; s->_segMan->memcpy((byte *)buf, argv[1], size); debugC(kDebugLevelFile, "kFileIO(writeRaw): %d, %d", handle, size); - FileHandle *f = getFileFromHandle(s, handle); - if (f) { - f->_out->write(buf, size); +#ifdef ENABLE_SCI32 + if (handle == VIRTUALFILE_HANDLE) { + s->_virtualIndexFile->write(buf, size); success = true; + } else { +#endif + FileHandle *f = getFileFromHandle(s, handle); + if (f) { + f->_out->write(buf, size); + success = true; + } +#ifdef ENABLE_SCI32 } +#endif delete[] buf; if (success) @@ -854,9 +894,19 @@ reg_t kFileIOUnlink(EngineState *s, int argc, reg_t *argv) { name = g_sci->getSavegameName(savedir_nr); result = saveFileMan->removeSavefile(name); } else if (getSciVersion() >= SCI_VERSION_2) { - // We don't need to wrap the filename in SCI32 games, as it's already - // constructed here + // The file name may be already wrapped, so check both cases result = saveFileMan->removeSavefile(name); + if (!result) { + const Common::String wrappedName = g_sci->wrapFilename(name); + result = saveFileMan->removeSavefile(wrappedName); + } + +#ifdef ENABLE_SCI32 + if (name == PHANTASMAGORIA_SAVEGAME_INDEX) { + delete s->_virtualIndexFile; + s->_virtualIndexFile = 0; + } +#endif } else { const Common::String wrappedName = g_sci->wrapFilename(name); result = saveFileMan->removeSavefile(wrappedName); @@ -869,15 +919,22 @@ reg_t kFileIOUnlink(EngineState *s, int argc, reg_t *argv) { } reg_t kFileIOReadString(EngineState *s, int argc, reg_t *argv) { - int size = argv[1].toUint16(); + uint16 size = argv[1].toUint16(); char *buf = new char[size]; - int handle = argv[2].toUint16(); + uint16 handle = argv[2].toUint16(); debugC(kDebugLevelFile, "kFileIO(readString): %d, %d", handle, size); + uint32 bytesRead; + +#ifdef ENABLE_SCI32 + if (handle == VIRTUALFILE_HANDLE) + bytesRead = s->_virtualIndexFile->readLine(buf, size); + else +#endif + bytesRead = fgets_wrapper(s, buf, size, handle); - int readBytes = fgets_wrapper(s, buf, size, handle); s->_segMan->memcpy(argv[0], (const byte*)buf, size); delete[] buf; - return readBytes ? argv[0] : NULL_REG; + return bytesRead ? argv[0] : NULL_REG; } reg_t kFileIOWriteString(EngineState *s, int argc, reg_t *argv) { @@ -885,6 +942,13 @@ reg_t kFileIOWriteString(EngineState *s, int argc, reg_t *argv) { Common::String str = s->_segMan->getString(argv[1]); debugC(kDebugLevelFile, "kFileIO(writeString): %d", handle); +#ifdef ENABLE_SCI32 + if (handle == VIRTUALFILE_HANDLE) { + s->_virtualIndexFile->write(str.c_str(), str.size()); + return NULL_REG; + } +#endif + FileHandle *f = getFileFromHandle(s, handle); if (f) { @@ -896,15 +960,31 @@ reg_t kFileIOWriteString(EngineState *s, int argc, reg_t *argv) { } reg_t kFileIOSeek(EngineState *s, int argc, reg_t *argv) { - int handle = argv[0].toUint16(); - int offset = argv[1].toUint16(); - int whence = argv[2].toUint16(); + uint16 handle = argv[0].toUint16(); + uint16 offset = ABS(argv[1].toSint16()); // can be negative + uint16 whence = argv[2].toUint16(); debugC(kDebugLevelFile, "kFileIO(seek): %d, %d, %d", handle, offset, whence); +#ifdef ENABLE_SCI32 + if (handle == VIRTUALFILE_HANDLE) + return make_reg(0, s->_virtualIndexFile->seek(offset, whence)); +#endif + FileHandle *f = getFileFromHandle(s, handle); - if (f) - s->r_acc = make_reg(0, f->_in->seek(offset, whence)); + if (f && f->_in) { + // Backward seeking isn't supported in zip file streams, thus adapt the + // parameters accordingly if games ask for such a seek mode. A known + // case where this is requested is the save file manager in Phantasmagoria + if (whence == SEEK_END) { + whence = SEEK_SET; + offset = f->_in->size() - offset; + } + + return make_reg(0, f->_in->seek(offset, whence)); + } else if (f && f->_out) { + error("kFileIOSeek: Unsupported seek operation on a writeable stream (offset: %d, whence: %d)", offset, whence); + } return SIGNAL_REG; } @@ -1027,6 +1107,14 @@ reg_t kFileIOFindNext(EngineState *s, int argc, reg_t *argv) { reg_t kFileIOExists(EngineState *s, int argc, reg_t *argv) { Common::String name = s->_segMan->getString(argv[0]); +#ifdef ENABLE_SCI32 + // Cache the file existence result for the Phantasmagoria + // save index file, as the game scripts keep checking for + // its existence. + if (name == PHANTASMAGORIA_SAVEGAME_INDEX && s->_virtualIndexFile) + return TRUE_REG; +#endif + bool exists = false; // Check for regular file diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp index 28818cddef..237c6b54a6 100644 --- a/engines/sci/engine/state.cpp +++ b/engines/sci/engine/state.cpp @@ -26,6 +26,7 @@ #include "sci/debug.h" // for g_debug_sleeptime_factor #include "sci/event.h" +#include "sci/engine/file.h" #include "sci/engine/kernel.h" #include "sci/engine/state.h" #include "sci/engine/selector.h" @@ -68,21 +69,26 @@ static const uint16 s_halfWidthSJISMap[256] = { }; EngineState::EngineState(SegManager *segMan) -: _segMan(segMan), _dirseeker() { +: _segMan(segMan), +#ifdef ENABLE_SCI32 + _virtualIndexFile(0), +#endif + _dirseeker() { reset(false); } EngineState::~EngineState() { delete _msgState; +#ifdef ENABLE_SCI32 + delete _virtualIndexFile; +#endif } void EngineState::reset(bool isRestoring) { if (!isRestoring) { _memorySegmentSize = 0; - _fileHandles.resize(5); - abortScriptProcessing = kAbortNone; } diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index dcffe6dbb3..6f1f6a6bda 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -45,6 +45,7 @@ namespace Sci { class EventManager; class MessageState; class SoundCommandParser; +class VirtualIndexFile; enum AbortGameState { kAbortNone = 0, @@ -163,6 +164,10 @@ public: int16 _lastSaveVirtualId; // last virtual id fed to kSaveGame, if no kGetSaveFiles was called inbetween int16 _lastSaveNewId; // last newly created filename-id by kSaveGame +#ifdef ENABLE_SCI32 + VirtualIndexFile *_virtualIndexFile; +#endif + uint _chosenQfGImportItem; // Remembers the item selected in QfG import rooms bool _cursorWorkaroundActive; // ffs. GfxCursor::setPosition() diff --git a/engines/sci/module.mk b/engines/sci/module.mk index b6d5837b31..6b6058c819 100644 --- a/engines/sci/module.mk +++ b/engines/sci/module.mk @@ -10,6 +10,7 @@ MODULE_OBJS := \ sci.o \ util.o \ engine/features.o \ + engine/file.o \ engine/gc.o \ engine/kernel.o \ engine/kevent.o \ -- cgit v1.2.3 From a209359a678ea19935c875da96fbdb1015bcee74 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 13 Jun 2012 11:02:00 +0300 Subject: SCI: Reorder the file kernel functions a bit --- engines/sci/engine/kfile.cpp | 82 ++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 0dd2296f41..dddbc2710e 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -869,6 +869,47 @@ reg_t kFileIOWriteRaw(EngineState *s, int argc, reg_t *argv) { return make_reg(0, 6); // DOS - invalid handle } +reg_t kFileIOReadString(EngineState *s, int argc, reg_t *argv) { + uint16 size = argv[1].toUint16(); + char *buf = new char[size]; + uint16 handle = argv[2].toUint16(); + debugC(kDebugLevelFile, "kFileIO(readString): %d, %d", handle, size); + uint32 bytesRead; + +#ifdef ENABLE_SCI32 + if (handle == VIRTUALFILE_HANDLE) + bytesRead = s->_virtualIndexFile->readLine(buf, size); + else +#endif + bytesRead = fgets_wrapper(s, buf, size, handle); + + s->_segMan->memcpy(argv[0], (const byte*)buf, size); + delete[] buf; + return bytesRead ? argv[0] : NULL_REG; +} + +reg_t kFileIOWriteString(EngineState *s, int argc, reg_t *argv) { + int handle = argv[0].toUint16(); + Common::String str = s->_segMan->getString(argv[1]); + debugC(kDebugLevelFile, "kFileIO(writeString): %d", handle); + +#ifdef ENABLE_SCI32 + if (handle == VIRTUALFILE_HANDLE) { + s->_virtualIndexFile->write(str.c_str(), str.size()); + return NULL_REG; + } +#endif + + FileHandle *f = getFileFromHandle(s, handle); + + if (f) { + f->_out->write(str.c_str(), str.size()); + return NULL_REG; + } + + return make_reg(0, 6); // DOS - invalid handle +} + reg_t kFileIOUnlink(EngineState *s, int argc, reg_t *argv) { Common::String name = s->_segMan->getString(argv[0]); Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); @@ -918,47 +959,6 @@ reg_t kFileIOUnlink(EngineState *s, int argc, reg_t *argv) { return make_reg(0, 2); // DOS - file not found error code } -reg_t kFileIOReadString(EngineState *s, int argc, reg_t *argv) { - uint16 size = argv[1].toUint16(); - char *buf = new char[size]; - uint16 handle = argv[2].toUint16(); - debugC(kDebugLevelFile, "kFileIO(readString): %d, %d", handle, size); - uint32 bytesRead; - -#ifdef ENABLE_SCI32 - if (handle == VIRTUALFILE_HANDLE) - bytesRead = s->_virtualIndexFile->readLine(buf, size); - else -#endif - bytesRead = fgets_wrapper(s, buf, size, handle); - - s->_segMan->memcpy(argv[0], (const byte*)buf, size); - delete[] buf; - return bytesRead ? argv[0] : NULL_REG; -} - -reg_t kFileIOWriteString(EngineState *s, int argc, reg_t *argv) { - int handle = argv[0].toUint16(); - Common::String str = s->_segMan->getString(argv[1]); - debugC(kDebugLevelFile, "kFileIO(writeString): %d", handle); - -#ifdef ENABLE_SCI32 - if (handle == VIRTUALFILE_HANDLE) { - s->_virtualIndexFile->write(str.c_str(), str.size()); - return NULL_REG; - } -#endif - - FileHandle *f = getFileFromHandle(s, handle); - - if (f) { - f->_out->write(str.c_str(), str.size()); - return NULL_REG; - } - - return make_reg(0, 6); // DOS - invalid handle -} - reg_t kFileIOSeek(EngineState *s, int argc, reg_t *argv) { uint16 handle = argv[0].toUint16(); uint16 offset = ABS(argv[1].toSint16()); // can be negative -- cgit v1.2.3 From 5a17ea058583fb0a3d00392b8e07b2a1f414fded Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 13 Jun 2012 11:29:14 +0300 Subject: SCI: Move all file-related functions in file.* This way, there is a clear separation of the actual SCI kernel file functions and the file classes and wrappers of ScummVM --- engines/sci/console.cpp | 21 +++ engines/sci/engine/file.cpp | 308 +++++++++++++++++++++++++++++++++++++- engines/sci/engine/file.h | 66 ++++++++- engines/sci/engine/kernel.h | 3 - engines/sci/engine/kfile.cpp | 343 +------------------------------------------ engines/sci/engine/state.h | 43 +----- 6 files changed, 401 insertions(+), 383 deletions(-) diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 5b5301b468..6a44972a4b 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -1216,6 +1216,27 @@ bool Console::cmdRestartGame(int argc, const char **argv) { return Cmd_Exit(0, 0); } +// The scripts get IDs ranging from 100->199, because the scripts require us to assign unique ids THAT EVEN STAY BETWEEN +// SAVES and the scripts also use "saves-count + 1" to create a new savedgame slot. +// SCI1.1 actually recycles ids, in that case we will currently get "0". +// This behavior is required especially for LSL6. In this game, it's possible to quick save. The scripts will use +// the last-used id for that feature. If we don't assign sticky ids, the feature will overwrite different saves all the +// time. And sadly we can't just use the actual filename ids directly, because of the creation method for new slots. + +extern void listSavegames(Common::Array &saves); + +bool Console::cmdListSaves(int argc, const char **argv) { + Common::Array saves; + listSavegames(saves); + + for (uint i = 0; i < saves.size(); i++) { + Common::String filename = g_sci->getSavegameName(saves[i].id); + DebugPrintf("%s: '%s'\n", filename.c_str(), saves[i].name); + } + + return true; +} + bool Console::cmdClassTable(int argc, const char **argv) { DebugPrintf("Available classes (parse a parameter to filter the table by a specific class):\n"); diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp index 8876f3c46c..66f54d67df 100644 --- a/engines/sci/engine/file.cpp +++ b/engines/sci/engine/file.cpp @@ -25,9 +25,315 @@ #include "sci/sci.h" #include "sci/engine/file.h" +#include "sci/engine/kernel.h" +#include "sci/engine/savegame.h" +#include "sci/engine/selector.h" +#include "sci/engine/state.h" namespace Sci { +/* + * Note on how file I/O is implemented: In ScummVM, one can not create/write + * arbitrary data files, simply because many of our target platforms do not + * support this. The only files one can create are savestates. But SCI has an + * opcode to create and write to seemingly 'arbitrary' files. This is mainly + * used in LSL3 for LARRY3.DRV (which is a game data file, not a driver, used + * for persisting the results of the "age quiz" across restarts) and in LSL5 + * for MEMORY.DRV (which is again a game data file and contains the game's + * password, XOR encrypted). + * To implement that opcode, we combine the SaveFileManager with regular file + * code, similarly to how the SCUMM HE engine does it. + * + * To handle opening a file called "foobar", what we do is this: First, we + * create an 'augmented file name', by prepending the game target and a dash, + * so if we running game target sq1sci, the name becomes "sq1sci-foobar". + * Next, we check if such a file is known to the SaveFileManager. If so, we + * we use that for reading/writing, delete it, whatever. + * + * If no such file is present but we were only asked to *read* the file, + * we fallback to looking for a regular file called "foobar", and open that + * for reading only. + */ + +reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool unwrapFilename) { + Common::String englishName = g_sci->getSciLanguageString(filename, K_LANG_ENGLISH); + Common::String wrappedName = unwrapFilename ? g_sci->wrapFilename(englishName) : englishName; + Common::SeekableReadStream *inFile = 0; + Common::WriteStream *outFile = 0; + Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); + + if (mode == _K_FILE_MODE_OPEN_OR_FAIL) { + // Try to open file, abort if not possible + inFile = saveFileMan->openForLoading(wrappedName); + // If no matching savestate exists: fall back to reading from a regular + // file + if (!inFile) + inFile = SearchMan.createReadStreamForMember(englishName); + + if (!inFile) + debugC(kDebugLevelFile, " -> file_open(_K_FILE_MODE_OPEN_OR_FAIL): failed to open file '%s'", englishName.c_str()); + } else if (mode == _K_FILE_MODE_CREATE) { + // Create the file, destroying any content it might have had + outFile = saveFileMan->openForSaving(wrappedName); + if (!outFile) + debugC(kDebugLevelFile, " -> file_open(_K_FILE_MODE_CREATE): failed to create file '%s'", englishName.c_str()); + } else if (mode == _K_FILE_MODE_OPEN_OR_CREATE) { + // Try to open file, create it if it doesn't exist + outFile = saveFileMan->openForSaving(wrappedName); + if (!outFile) + debugC(kDebugLevelFile, " -> file_open(_K_FILE_MODE_CREATE): failed to create file '%s'", englishName.c_str()); + + // QfG1 opens the character export file with _K_FILE_MODE_CREATE first, + // closes it immediately and opens it again with this here. Perhaps + // other games use this for read access as well. I guess changing this + // whole code into using virtual files and writing them after close + // would be more appropriate. + } else { + error("file_open: unsupported mode %d (filename '%s')", mode, englishName.c_str()); + } + + if (!inFile && !outFile) { // Failed + debugC(kDebugLevelFile, " -> file_open() failed"); + return SIGNAL_REG; + } + + // Find a free file handle + uint handle = 1; // Ignore _fileHandles[0] + while ((handle < s->_fileHandles.size()) && s->_fileHandles[handle].isOpen()) + handle++; + + if (handle == s->_fileHandles.size()) { + // Hit size limit => Allocate more space + s->_fileHandles.resize(s->_fileHandles.size() + 1); + } + + s->_fileHandles[handle]._in = inFile; + s->_fileHandles[handle]._out = outFile; + s->_fileHandles[handle]._name = englishName; + + debugC(kDebugLevelFile, " -> opened file '%s' with handle %d", englishName.c_str(), handle); + return make_reg(0, handle); +} + +FileHandle *getFileFromHandle(EngineState *s, uint handle) { + if (handle == 0 || handle == VIRTUALFILE_HANDLE) { + error("Attempt to use invalid file handle (%d)", handle); + return 0; + } + + if ((handle >= s->_fileHandles.size()) || !s->_fileHandles[handle].isOpen()) { + warning("Attempt to use invalid/unused file handle %d", handle); + return 0; + } + + return &s->_fileHandles[handle]; +} + +int fgets_wrapper(EngineState *s, char *dest, int maxsize, int handle) { + FileHandle *f = getFileFromHandle(s, handle); + if (!f) + return 0; + + if (!f->_in) { + error("fgets_wrapper: Trying to read from file '%s' opened for writing", f->_name.c_str()); + return 0; + } + int readBytes = 0; + if (maxsize > 1) { + memset(dest, 0, maxsize); + f->_in->readLine(dest, maxsize); + readBytes = strlen(dest); // FIXME: sierra sci returned byte count and didn't react on NUL characters + // The returned string must not have an ending LF + if (readBytes > 0) { + if (dest[readBytes - 1] == 0x0A) + dest[readBytes - 1] = 0; + } + } else { + *dest = 0; + } + + debugC(kDebugLevelFile, " -> FGets'ed \"%s\"", dest); + return readBytes; +} + +static bool _savegame_sort_byDate(const SavegameDesc &l, const SavegameDesc &r) { + if (l.date != r.date) + return (l.date > r.date); + return (l.time > r.time); +} + +// Create a sorted array containing all found savedgames +void listSavegames(Common::Array &saves) { + Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); + + // Load all saves + Common::StringArray saveNames = saveFileMan->listSavefiles(g_sci->getSavegamePattern()); + + for (Common::StringArray::const_iterator iter = saveNames.begin(); iter != saveNames.end(); ++iter) { + Common::String filename = *iter; + Common::SeekableReadStream *in; + if ((in = saveFileMan->openForLoading(filename))) { + SavegameMetadata meta; + if (!get_savegame_metadata(in, &meta) || meta.name.empty()) { + // invalid + delete in; + continue; + } + delete in; + + SavegameDesc desc; + desc.id = strtol(filename.end() - 3, NULL, 10); + desc.date = meta.saveDate; + // We need to fix date in here, because we save DDMMYYYY instead of + // YYYYMMDD, so sorting wouldn't work + desc.date = ((desc.date & 0xFFFF) << 16) | ((desc.date & 0xFF0000) >> 8) | ((desc.date & 0xFF000000) >> 24); + desc.time = meta.saveTime; + desc.version = meta.version; + + if (meta.name.lastChar() == '\n') + meta.name.deleteLastChar(); + + Common::strlcpy(desc.name, meta.name.c_str(), SCI_MAX_SAVENAME_LENGTH); + + debug(3, "Savegame in file %s ok, id %d", filename.c_str(), desc.id); + + saves.push_back(desc); + } + } + + // Sort the list by creation date of the saves + Common::sort(saves.begin(), saves.end(), _savegame_sort_byDate); +} + +// Find a savedgame according to virtualId and return the position within our array +int findSavegame(Common::Array &saves, int16 savegameId) { + for (uint saveNr = 0; saveNr < saves.size(); saveNr++) { + if (saves[saveNr].id == savegameId) + return saveNr; + } + return -1; +} + + +FileHandle::FileHandle() : _in(0), _out(0) { +} + +FileHandle::~FileHandle() { + close(); +} + +void FileHandle::close() { + delete _in; + delete _out; + _in = 0; + _out = 0; + _name.clear(); +} + +bool FileHandle::isOpen() const { + return _in || _out; +} + + +void DirSeeker::addAsVirtualFiles(Common::String title, Common::String fileMask) { + Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); + Common::StringArray foundFiles = saveFileMan->listSavefiles(fileMask); + if (!foundFiles.empty()) { + _files.push_back(title); + _virtualFiles.push_back(""); + Common::StringArray::iterator it; + Common::StringArray::iterator it_end = foundFiles.end(); + + for (it = foundFiles.begin(); it != it_end; it++) { + Common::String regularFilename = *it; + Common::String wrappedFilename = Common::String(regularFilename.c_str() + fileMask.size() - 1); + + Common::SeekableReadStream *testfile = saveFileMan->openForLoading(regularFilename); + int32 testfileSize = testfile->size(); + delete testfile; + if (testfileSize > 1024) // check, if larger than 1k. in that case its a saved game. + continue; // and we dont want to have those in the list + // We need to remove the prefix for display purposes + _files.push_back(wrappedFilename); + // but remember the actual name as well + _virtualFiles.push_back(regularFilename); + } + } +} + +Common::String DirSeeker::getVirtualFilename(uint fileNumber) { + if (fileNumber >= _virtualFiles.size()) + error("invalid virtual filename access"); + return _virtualFiles[fileNumber]; +} + +reg_t DirSeeker::firstFile(const Common::String &mask, reg_t buffer, SegManager *segMan) { + // Verify that we are given a valid buffer + if (!buffer.segment) { + error("DirSeeker::firstFile('%s') invoked with invalid buffer", mask.c_str()); + return NULL_REG; + } + _outbuffer = buffer; + _files.clear(); + _virtualFiles.clear(); + + int QfGImport = g_sci->inQfGImportRoom(); + if (QfGImport) { + _files.clear(); + addAsVirtualFiles("-QfG1-", "qfg1-*"); + addAsVirtualFiles("-QfG1VGA-", "qfg1vga-*"); + if (QfGImport > 2) + addAsVirtualFiles("-QfG2-", "qfg2-*"); + if (QfGImport > 3) + addAsVirtualFiles("-QfG3-", "qfg3-*"); + + if (QfGImport == 3) { + // QfG3 sorts the filelisting itself, we can't let that happen otherwise our + // virtual list would go out-of-sync + reg_t savedHeros = segMan->findObjectByName("savedHeros"); + if (!savedHeros.isNull()) + writeSelectorValue(segMan, savedHeros, SELECTOR(sort), 0); + } + + } else { + // Prefix the mask + const Common::String wrappedMask = g_sci->wrapFilename(mask); + + // Obtain a list of all files matching the given mask + Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); + _files = saveFileMan->listSavefiles(wrappedMask); + } + + // Reset the list iterator and write the first match to the output buffer, + // if any. + _iter = _files.begin(); + return nextFile(segMan); +} + +reg_t DirSeeker::nextFile(SegManager *segMan) { + if (_iter == _files.end()) { + return NULL_REG; + } + + Common::String string; + + if (_virtualFiles.empty()) { + // Strip the prefix, if we don't got a virtual filelisting + const Common::String wrappedString = *_iter; + string = g_sci->unwrapFilename(wrappedString); + } else { + string = *_iter; + } + if (string.size() > 12) + string = Common::String(string.c_str(), 12); + segMan->strcpy(_outbuffer, string.c_str()); + + // Return the result and advance the list iterator :) + ++_iter; + return _outbuffer; +} + + #ifdef ENABLE_SCI32 VirtualIndexFile::VirtualIndexFile(Common::String fileName) : _fileName(fileName), _changed(false) { @@ -111,7 +417,7 @@ bool VirtualIndexFile::seek(int32 offset, int whence) { _ptr += offset; break; case SEEK_SET: - assert(offset < _bufferSize); + assert(offset < (int32)_bufferSize); _ptr = _buffer + offset; break; case SEEK_END: diff --git a/engines/sci/engine/file.h b/engines/sci/engine/file.h index e7b1090c91..896dcd2a42 100644 --- a/engines/sci/engine/file.h +++ b/engines/sci/engine/file.h @@ -23,10 +23,74 @@ #ifndef SCI_ENGINE_FILE_H #define SCI_ENGINE_FILE_H -#include "common/scummsys.h" +#include "common/str-array.h" +#include "common/stream.h" namespace Sci { +enum { + _K_FILE_MODE_OPEN_OR_CREATE = 0, + _K_FILE_MODE_OPEN_OR_FAIL = 1, + _K_FILE_MODE_CREATE = 2 +}; + +/* Maximum length of a savegame name (including terminator character). */ +#define SCI_MAX_SAVENAME_LENGTH 0x24 + +enum { + MAX_SAVEGAME_NR = 20 /**< Maximum number of savegames */ +}; + +#define VIRTUALFILE_HANDLE 200 +#define PHANTASMAGORIA_SAVEGAME_INDEX "phantsg.dir" + +struct SavegameDesc { + int16 id; + int virtualId; // straight numbered, according to id but w/o gaps + int date; + int time; + int version; + char name[SCI_MAX_SAVENAME_LENGTH]; +}; + +class FileHandle { +public: + Common::String _name; + Common::SeekableReadStream *_in; + Common::WriteStream *_out; + +public: + FileHandle(); + ~FileHandle(); + + void close(); + bool isOpen() const; +}; + + +class DirSeeker { +protected: + reg_t _outbuffer; + Common::StringArray _files; + Common::StringArray _virtualFiles; + Common::StringArray::const_iterator _iter; + +public: + DirSeeker() { + _outbuffer = NULL_REG; + _iter = _files.begin(); + } + + reg_t firstFile(const Common::String &mask, reg_t buffer, SegManager *segMan); + reg_t nextFile(SegManager *segMan); + + Common::String getVirtualFilename(uint fileNumber); + +private: + void addAsVirtualFiles(Common::String title, Common::String fileMask); +}; + + #ifdef ENABLE_SCI32 /** diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index d9fdbefbc2..25ca082a9a 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -276,9 +276,6 @@ private: const Common::String _invalid; }; -/* Maximum length of a savegame name (including terminator character). */ -#define SCI_MAX_SAVENAME_LENGTH 0x24 - /******************** Kernel functions ********************/ reg_t kStrLen(EngineState *s, int argc, reg_t *argv); diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index dddbc2710e..36e5273b06 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -41,125 +41,11 @@ namespace Sci { -struct SavegameDesc { - int16 id; - int virtualId; // straight numbered, according to id but w/o gaps - int date; - int time; - int version; - char name[SCI_MAX_SAVENAME_LENGTH]; -}; - -/* - * Note on how file I/O is implemented: In ScummVM, one can not create/write - * arbitrary data files, simply because many of our target platforms do not - * support this. The only files one can create are savestates. But SCI has an - * opcode to create and write to seemingly 'arbitrary' files. This is mainly - * used in LSL3 for LARRY3.DRV (which is a game data file, not a driver, used - * for persisting the results of the "age quiz" across restarts) and in LSL5 - * for MEMORY.DRV (which is again a game data file and contains the game's - * password, XOR encrypted). - * To implement that opcode, we combine the SaveFileManager with regular file - * code, similarly to how the SCUMM HE engine does it. - * - * To handle opening a file called "foobar", what we do is this: First, we - * create an 'augmented file name', by prepending the game target and a dash, - * so if we running game target sq1sci, the name becomes "sq1sci-foobar". - * Next, we check if such a file is known to the SaveFileManager. If so, we - * we use that for reading/writing, delete it, whatever. - * - * If no such file is present but we were only asked to *read* the file, - * we fallback to looking for a regular file called "foobar", and open that - * for reading only. - */ - -FileHandle::FileHandle() : _in(0), _out(0) { -} - -FileHandle::~FileHandle() { - close(); -} - -void FileHandle::close() { - delete _in; - delete _out; - _in = 0; - _out = 0; - _name.clear(); -} - -bool FileHandle::isOpen() const { - return _in || _out; -} - -enum { - _K_FILE_MODE_OPEN_OR_CREATE = 0, - _K_FILE_MODE_OPEN_OR_FAIL = 1, - _K_FILE_MODE_CREATE = 2 -}; - -#define VIRTUALFILE_HANDLE 200 -#define PHANTASMAGORIA_SAVEGAME_INDEX "phantsg.dir" - -reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool unwrapFilename) { - Common::String englishName = g_sci->getSciLanguageString(filename, K_LANG_ENGLISH); - Common::String wrappedName = unwrapFilename ? g_sci->wrapFilename(englishName) : englishName; - Common::SeekableReadStream *inFile = 0; - Common::WriteStream *outFile = 0; - Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); - - if (mode == _K_FILE_MODE_OPEN_OR_FAIL) { - // Try to open file, abort if not possible - inFile = saveFileMan->openForLoading(wrappedName); - // If no matching savestate exists: fall back to reading from a regular - // file - if (!inFile) - inFile = SearchMan.createReadStreamForMember(englishName); - - if (!inFile) - debugC(kDebugLevelFile, " -> file_open(_K_FILE_MODE_OPEN_OR_FAIL): failed to open file '%s'", englishName.c_str()); - } else if (mode == _K_FILE_MODE_CREATE) { - // Create the file, destroying any content it might have had - outFile = saveFileMan->openForSaving(wrappedName); - if (!outFile) - debugC(kDebugLevelFile, " -> file_open(_K_FILE_MODE_CREATE): failed to create file '%s'", englishName.c_str()); - } else if (mode == _K_FILE_MODE_OPEN_OR_CREATE) { - // Try to open file, create it if it doesn't exist - outFile = saveFileMan->openForSaving(wrappedName); - if (!outFile) - debugC(kDebugLevelFile, " -> file_open(_K_FILE_MODE_CREATE): failed to create file '%s'", englishName.c_str()); - - // QfG1 opens the character export file with _K_FILE_MODE_CREATE first, - // closes it immediately and opens it again with this here. Perhaps - // other games use this for read access as well. I guess changing this - // whole code into using virtual files and writing them after close - // would be more appropriate. - } else { - error("file_open: unsupported mode %d (filename '%s')", mode, englishName.c_str()); - } - - if (!inFile && !outFile) { // Failed - debugC(kDebugLevelFile, " -> file_open() failed"); - return SIGNAL_REG; - } - - // Find a free file handle - uint handle = 1; // Ignore _fileHandles[0] - while ((handle < s->_fileHandles.size()) && s->_fileHandles[handle].isOpen()) - handle++; - - if (handle == s->_fileHandles.size()) { - // Hit size limit => Allocate more space - s->_fileHandles.resize(s->_fileHandles.size() + 1); - } - - s->_fileHandles[handle]._in = inFile; - s->_fileHandles[handle]._out = outFile; - s->_fileHandles[handle]._name = englishName; - - debugC(kDebugLevelFile, " -> opened file '%s' with handle %d", englishName.c_str(), handle); - return make_reg(0, handle); -} +extern reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool unwrapFilename); +extern FileHandle *getFileFromHandle(EngineState *s, uint handle); +extern int fgets_wrapper(EngineState *s, char *dest, int maxsize, int handle); +extern void listSavegames(Common::Array &saves); +extern int findSavegame(Common::Array &saves, int16 savegameId); reg_t kFOpen(EngineState *s, int argc, reg_t *argv) { Common::String name = s->_segMan->getString(argv[0]); @@ -169,20 +55,6 @@ reg_t kFOpen(EngineState *s, int argc, reg_t *argv) { return file_open(s, name, mode, true); } -static FileHandle *getFileFromHandle(EngineState *s, uint handle) { - if (handle == 0 || handle == VIRTUALFILE_HANDLE) { - error("Attempt to use invalid file handle (%d)", handle); - return 0; - } - - if ((handle >= s->_fileHandles.size()) || !s->_fileHandles[handle].isOpen()) { - warning("Attempt to use invalid/unused file handle %d", handle); - return 0; - } - - return &s->_fileHandles[handle]; -} - reg_t kFClose(EngineState *s, int argc, reg_t *argv) { debugC(kDebugLevelFile, "kFClose(%d)", argv[0].toUint16()); if (argv[0] != SIGNAL_REG) { @@ -204,33 +76,6 @@ reg_t kFPuts(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } -static int fgets_wrapper(EngineState *s, char *dest, int maxsize, int handle) { - FileHandle *f = getFileFromHandle(s, handle); - if (!f) - return 0; - - if (!f->_in) { - error("fgets_wrapper: Trying to read from file '%s' opened for writing", f->_name.c_str()); - return 0; - } - int readBytes = 0; - if (maxsize > 1) { - memset(dest, 0, maxsize); - f->_in->readLine(dest, maxsize); - readBytes = strlen(dest); // FIXME: sierra sci returned byte count and didn't react on NUL characters - // The returned string must not have an ending LF - if (readBytes > 0) { - if (dest[readBytes - 1] == 0x0A) - dest[readBytes - 1] = 0; - } - } else { - *dest = 0; - } - - debugC(kDebugLevelFile, " -> FGets'ed \"%s\"", dest); - return readBytes; -} - reg_t kFGets(EngineState *s, int argc, reg_t *argv) { int maxsize = argv[1].toUint16(); char *buf = new char[maxsize]; @@ -257,9 +102,6 @@ reg_t kGetCWD(EngineState *s, int argc, reg_t *argv) { return argv[0]; } -static void listSavegames(Common::Array &saves); -static int findSavegame(Common::Array &saves, int16 saveId); - enum { K_DEVICE_INFO_GET_DEVICE = 0, K_DEVICE_INFO_GET_CURRENT_DEVICE = 1, @@ -393,83 +235,6 @@ reg_t kCheckFreeSpace(EngineState *s, int argc, reg_t *argv) { return make_reg(0, 1); } -static bool _savegame_sort_byDate(const SavegameDesc &l, const SavegameDesc &r) { - if (l.date != r.date) - return (l.date > r.date); - return (l.time > r.time); -} - -// Create a sorted array containing all found savedgames -static void listSavegames(Common::Array &saves) { - Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); - - // Load all saves - Common::StringArray saveNames = saveFileMan->listSavefiles(g_sci->getSavegamePattern()); - - for (Common::StringArray::const_iterator iter = saveNames.begin(); iter != saveNames.end(); ++iter) { - Common::String filename = *iter; - Common::SeekableReadStream *in; - if ((in = saveFileMan->openForLoading(filename))) { - SavegameMetadata meta; - if (!get_savegame_metadata(in, &meta) || meta.name.empty()) { - // invalid - delete in; - continue; - } - delete in; - - SavegameDesc desc; - desc.id = strtol(filename.end() - 3, NULL, 10); - desc.date = meta.saveDate; - // We need to fix date in here, because we save DDMMYYYY instead of - // YYYYMMDD, so sorting wouldn't work - desc.date = ((desc.date & 0xFFFF) << 16) | ((desc.date & 0xFF0000) >> 8) | ((desc.date & 0xFF000000) >> 24); - desc.time = meta.saveTime; - desc.version = meta.version; - - if (meta.name.lastChar() == '\n') - meta.name.deleteLastChar(); - - Common::strlcpy(desc.name, meta.name.c_str(), SCI_MAX_SAVENAME_LENGTH); - - debug(3, "Savegame in file %s ok, id %d", filename.c_str(), desc.id); - - saves.push_back(desc); - } - } - - // Sort the list by creation date of the saves - Common::sort(saves.begin(), saves.end(), _savegame_sort_byDate); -} - -// Find a savedgame according to virtualId and return the position within our array -static int findSavegame(Common::Array &saves, int16 savegameId) { - for (uint saveNr = 0; saveNr < saves.size(); saveNr++) { - if (saves[saveNr].id == savegameId) - return saveNr; - } - return -1; -} - -// The scripts get IDs ranging from 100->199, because the scripts require us to assign unique ids THAT EVEN STAY BETWEEN -// SAVES and the scripts also use "saves-count + 1" to create a new savedgame slot. -// SCI1.1 actually recycles ids, in that case we will currently get "0". -// This behavior is required especially for LSL6. In this game, it's possible to quick save. The scripts will use -// the last-used id for that feature. If we don't assign sticky ids, the feature will overwrite different saves all the -// time. And sadly we can't just use the actual filename ids directly, because of the creation method for new slots. - -bool Console::cmdListSaves(int argc, const char **argv) { - Common::Array saves; - listSavegames(saves); - - for (uint i = 0; i < saves.size(); i++) { - Common::String filename = g_sci->getSavegameName(saves[i].id); - DebugPrintf("%s: '%s'\n", filename.c_str(), saves[i].name); - } - - return true; -} - reg_t kCheckSaveGame(EngineState *s, int argc, reg_t *argv) { Common::String game_id = s->_segMan->getString(argv[0]); uint16 virtualId = argv[1].toUint16(); @@ -989,104 +754,6 @@ reg_t kFileIOSeek(EngineState *s, int argc, reg_t *argv) { return SIGNAL_REG; } -void DirSeeker::addAsVirtualFiles(Common::String title, Common::String fileMask) { - Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); - Common::StringArray foundFiles = saveFileMan->listSavefiles(fileMask); - if (!foundFiles.empty()) { - _files.push_back(title); - _virtualFiles.push_back(""); - Common::StringArray::iterator it; - Common::StringArray::iterator it_end = foundFiles.end(); - - for (it = foundFiles.begin(); it != it_end; it++) { - Common::String regularFilename = *it; - Common::String wrappedFilename = Common::String(regularFilename.c_str() + fileMask.size() - 1); - - Common::SeekableReadStream *testfile = saveFileMan->openForLoading(regularFilename); - int32 testfileSize = testfile->size(); - delete testfile; - if (testfileSize > 1024) // check, if larger than 1k. in that case its a saved game. - continue; // and we dont want to have those in the list - // We need to remove the prefix for display purposes - _files.push_back(wrappedFilename); - // but remember the actual name as well - _virtualFiles.push_back(regularFilename); - } - } -} - -Common::String DirSeeker::getVirtualFilename(uint fileNumber) { - if (fileNumber >= _virtualFiles.size()) - error("invalid virtual filename access"); - return _virtualFiles[fileNumber]; -} - -reg_t DirSeeker::firstFile(const Common::String &mask, reg_t buffer, SegManager *segMan) { - // Verify that we are given a valid buffer - if (!buffer.segment) { - error("DirSeeker::firstFile('%s') invoked with invalid buffer", mask.c_str()); - return NULL_REG; - } - _outbuffer = buffer; - _files.clear(); - _virtualFiles.clear(); - - int QfGImport = g_sci->inQfGImportRoom(); - if (QfGImport) { - _files.clear(); - addAsVirtualFiles("-QfG1-", "qfg1-*"); - addAsVirtualFiles("-QfG1VGA-", "qfg1vga-*"); - if (QfGImport > 2) - addAsVirtualFiles("-QfG2-", "qfg2-*"); - if (QfGImport > 3) - addAsVirtualFiles("-QfG3-", "qfg3-*"); - - if (QfGImport == 3) { - // QfG3 sorts the filelisting itself, we can't let that happen otherwise our - // virtual list would go out-of-sync - reg_t savedHeros = segMan->findObjectByName("savedHeros"); - if (!savedHeros.isNull()) - writeSelectorValue(segMan, savedHeros, SELECTOR(sort), 0); - } - - } else { - // Prefix the mask - const Common::String wrappedMask = g_sci->wrapFilename(mask); - - // Obtain a list of all files matching the given mask - Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); - _files = saveFileMan->listSavefiles(wrappedMask); - } - - // Reset the list iterator and write the first match to the output buffer, - // if any. - _iter = _files.begin(); - return nextFile(segMan); -} - -reg_t DirSeeker::nextFile(SegManager *segMan) { - if (_iter == _files.end()) { - return NULL_REG; - } - - Common::String string; - - if (_virtualFiles.empty()) { - // Strip the prefix, if we don't got a virtual filelisting - const Common::String wrappedString = *_iter; - string = g_sci->unwrapFilename(wrappedString); - } else { - string = *_iter; - } - if (string.size() > 12) - string = Common::String(string.c_str(), 12); - segMan->strcpy(_outbuffer, string.c_str()); - - // Return the result and advance the list iterator :) - ++_iter; - return _outbuffer; -} - reg_t kFileIOFindFirst(EngineState *s, int argc, reg_t *argv) { Common::String mask = s->_segMan->getString(argv[0]); reg_t buf = argv[1]; diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index 6f1f6a6bda..78a8a5b0a2 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -34,6 +34,7 @@ class WriteStream; } #include "sci/sci.h" +#include "sci/engine/file.h" #include "sci/engine/seg_manager.h" #include "sci/parser/vocabulary.h" @@ -42,6 +43,8 @@ class WriteStream; namespace Sci { +class FileHandle; +class DirSeeker; class EventManager; class MessageState; class SoundCommandParser; @@ -54,32 +57,6 @@ enum AbortGameState { kAbortQuitGame = 3 }; -class DirSeeker { -protected: - reg_t _outbuffer; - Common::StringArray _files; - Common::StringArray _virtualFiles; - Common::StringArray::const_iterator _iter; - -public: - DirSeeker() { - _outbuffer = NULL_REG; - _iter = _files.begin(); - } - - reg_t firstFile(const Common::String &mask, reg_t buffer, SegManager *segMan); - reg_t nextFile(SegManager *segMan); - - Common::String getVirtualFilename(uint fileNumber); - -private: - void addAsVirtualFiles(Common::String title, Common::String fileMask); -}; - -enum { - MAX_SAVEGAME_NR = 20 /**< Maximum number of savegames */ -}; - // We assume that scripts give us savegameId 0->99 for creating a new save slot // and savegameId 100->199 for existing save slots ffs. kfile.cpp enum { @@ -93,20 +70,6 @@ enum { GAMEISRESTARTING_RESTORE = 2 }; -class FileHandle { -public: - Common::String _name; - Common::SeekableReadStream *_in; - Common::WriteStream *_out; - -public: - FileHandle(); - ~FileHandle(); - - void close(); - bool isOpen() const; -}; - enum VideoFlags { kNone = 0, kDoubled = 1 << 0, -- cgit v1.2.3 From 944a774e6a7fd604b0754569007e5e34d1be915f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 13 Jun 2012 11:56:13 +0300 Subject: SCI: Change kSave() to be a kernel function with subops --- engines/sci/engine/kernel.h | 1 + engines/sci/engine/kernel_tables.h | 14 ++++++++++++- engines/sci/engine/kfile.cpp | 42 +++++++++++++------------------------- 3 files changed, 28 insertions(+), 29 deletions(-) diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 25ca082a9a..d64bc42841 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -461,6 +461,7 @@ reg_t kMakeSaveFileName(EngineState *s, int argc, reg_t *argv); // SCI2.1 Kernel Functions reg_t kText(EngineState *s, int argc, reg_t *argv); reg_t kSave(EngineState *s, int argc, reg_t *argv); +reg_t kAutoSave(EngineState *s, int argc, reg_t *argv); reg_t kList(EngineState *s, int argc, reg_t *argv); reg_t kRobot(EngineState *s, int argc, reg_t *argv); reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv); diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 9b765283ec..cdc810eef0 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -245,6 +245,18 @@ static const SciKernelMapSubEntry kFileIO_subops[] = { SCI_SUBOPENTRY_TERMINATOR }; +static const SciKernelMapSubEntry kSave_subops[] = { + { SIG_SCI32, 0, MAP_CALL(SaveGame), "[r0]i[r0](r)", NULL }, + { SIG_SCI32, 1, MAP_CALL(RestoreGame), "[r0]i[r0]", NULL }, + { SIG_SCI32, 2, MAP_CALL(GetSaveDir), "(r*)", NULL }, + { SIG_SCI32, 3, MAP_CALL(CheckSaveGame), ".*", NULL }, + // Subop 4 hasn't been encountered yet + { SIG_SCI32, 5, MAP_CALL(GetSaveFiles), "rrr", NULL }, + { SIG_SCI32, 6, MAP_CALL(MakeSaveCatName), "rr", NULL }, + { SIG_SCI32, 7, MAP_CALL(MakeSaveFileName), "rri", NULL }, + { SIG_SCI32, 8, MAP_CALL(AutoSave), "[o0]", NULL }, +}; + #ifdef ENABLE_SCI32 // version, subId, function-mapping, signature, workarounds static const SciKernelMapSubEntry kList_subops[] = { @@ -555,7 +567,7 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(MulDiv), SIG_EVERYWHERE, "iii", NULL, NULL }, { MAP_CALL(PlayVMD), SIG_EVERYWHERE, "(.*)", NULL, NULL }, { MAP_CALL(Robot), SIG_EVERYWHERE, "(.*)", NULL, NULL }, - { MAP_CALL(Save), SIG_EVERYWHERE, "(.*)", NULL, NULL }, + { MAP_CALL(Save), SIG_EVERYWHERE, "i(.*)", kSave_subops, NULL }, { MAP_CALL(Text), SIG_EVERYWHERE, "(.*)", NULL, NULL }, { MAP_CALL(AddPicAt), SIG_EVERYWHERE, "oiii", NULL, NULL }, { MAP_CALL(GetWindowsOption), SIG_EVERYWHERE, "i", NULL, NULL }, diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 36e5273b06..fe54987e47 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -946,35 +946,21 @@ reg_t kMakeSaveFileName(EngineState *s, int argc, reg_t *argv) { return argv[0]; } +reg_t kAutoSave(EngineState *s, int argc, reg_t *argv) { + // TODO + // This is a timer callback, with 1 parameter: the timer object + // (e.g. "timers"). + // It's used for auto-saving (i.e. save every X minutes, by checking + // the elapsed time from the timer object) + + // This function has to return something other than 0 to proceed + return s->r_acc; +} + reg_t kSave(EngineState *s, int argc, reg_t *argv) { - switch (argv[0].toUint16()) { - case 0: - return kSaveGame(s, argc - 1,argv + 1); - case 1: - return kRestoreGame(s, argc - 1,argv + 1); - case 2: - return kGetSaveDir(s, argc - 1, argv + 1); - case 3: - return kCheckSaveGame(s, argc - 1, argv + 1); - case 5: - return kGetSaveFiles(s, argc - 1, argv + 1); - case 6: - return kMakeSaveCatName(s, argc - 1, argv + 1); - case 7: - return kMakeSaveFileName(s, argc - 1, argv + 1); - case 8: - // TODO - // This is a timer callback, with 1 parameter: the timer object - // (e.g. "timers"). - // It's used for auto-saving (i.e. save every X minutes, by checking - // the elapsed time from the timer object) - - // This function has to return something other than 0 to proceed - return s->r_acc; - default: - kStub(s, argc, argv); - return NULL_REG; - } + if (!s) + return make_reg(0, getSciVersion()); + error("not supposed to call this"); } #endif -- cgit v1.2.3 From 098f162ecc4951873909e9815506d4053178b6f9 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 13 Jun 2012 12:19:18 +0300 Subject: SCI: Use the later SCI file functions for the SCI0 ones They are essentially the same (with the exception of the return values), so unifying them reduces code duplication --- engines/sci/engine/kernel.h | 4 --- engines/sci/engine/kernel_tables.h | 8 ++--- engines/sci/engine/kfile.cpp | 65 +++++++++++--------------------------- 3 files changed, 22 insertions(+), 55 deletions(-) diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index d64bc42841..677b790f93 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -323,10 +323,6 @@ reg_t kTimesCot(EngineState *s, int argc, reg_t *argv); reg_t kCosDiv(EngineState *s, int argc, reg_t *argv); reg_t kSinDiv(EngineState *s, int argc, reg_t *argv); reg_t kValidPath(EngineState *s, int argc, reg_t *argv); -reg_t kFOpen(EngineState *s, int argc, reg_t *argv); -reg_t kFPuts(EngineState *s, int argc, reg_t *argv); -reg_t kFGets(EngineState *s, int argc, reg_t *argv); -reg_t kFClose(EngineState *s, int argc, reg_t *argv); reg_t kMapKeyToDir(EngineState *s, int argc, reg_t *argv); reg_t kGlobalToLocal(EngineState *s, int argc, reg_t *argv); reg_t kLocalToGlobal(EngineState *s, int argc, reg_t *argv); diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index cdc810eef0..d093310139 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -350,10 +350,10 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(EditControl), SIG_EVERYWHERE, "[o0][o0]", NULL, NULL }, { MAP_CALL(Empty), SIG_EVERYWHERE, "(.*)", NULL, NULL }, { MAP_CALL(EmptyList), SIG_EVERYWHERE, "l", NULL, NULL }, - { MAP_CALL(FClose), SIG_EVERYWHERE, "i", NULL, NULL }, - { MAP_CALL(FGets), SIG_EVERYWHERE, "rii", NULL, NULL }, - { MAP_CALL(FOpen), SIG_EVERYWHERE, "ri", NULL, NULL }, - { MAP_CALL(FPuts), SIG_EVERYWHERE, "ir", NULL, NULL }, + { "FClose", kFileIOClose, SIG_EVERYWHERE, "i", NULL, NULL }, + { "FGets", kFileIOReadString, SIG_EVERYWHERE, "rii", NULL, NULL }, + { "FOpen", kFileIOOpen, SIG_EVERYWHERE, "ri", NULL, NULL }, + { "FPuts", kFileIOWriteString, SIG_EVERYWHERE, "ir", NULL, NULL }, { MAP_CALL(FileIO), SIG_EVERYWHERE, "i(.*)", kFileIO_subops, NULL }, { MAP_CALL(FindKey), SIG_EVERYWHERE, "l.", NULL, kFindKey_workarounds }, { MAP_CALL(FirstNode), SIG_EVERYWHERE, "[l0]", NULL, NULL }, diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index fe54987e47..052332957b 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -47,47 +47,6 @@ extern int fgets_wrapper(EngineState *s, char *dest, int maxsize, int handle); extern void listSavegames(Common::Array &saves); extern int findSavegame(Common::Array &saves, int16 savegameId); -reg_t kFOpen(EngineState *s, int argc, reg_t *argv) { - Common::String name = s->_segMan->getString(argv[0]); - int mode = argv[1].toUint16(); - - debugC(kDebugLevelFile, "kFOpen(%s,0x%x)", name.c_str(), mode); - return file_open(s, name, mode, true); -} - -reg_t kFClose(EngineState *s, int argc, reg_t *argv) { - debugC(kDebugLevelFile, "kFClose(%d)", argv[0].toUint16()); - if (argv[0] != SIGNAL_REG) { - FileHandle *f = getFileFromHandle(s, argv[0].toUint16()); - if (f) - f->close(); - } - return s->r_acc; -} - -reg_t kFPuts(EngineState *s, int argc, reg_t *argv) { - int handle = argv[0].toUint16(); - Common::String data = s->_segMan->getString(argv[1]); - - FileHandle *f = getFileFromHandle(s, handle); - if (f) - f->_out->write(data.c_str(), data.size()); - - return s->r_acc; -} - -reg_t kFGets(EngineState *s, int argc, reg_t *argv) { - int maxsize = argv[1].toUint16(); - char *buf = new char[maxsize]; - int handle = argv[2].toUint16(); - - debugC(kDebugLevelFile, "kFGets(%d, %d)", handle, maxsize); - int readBytes = fgets_wrapper(s, buf, maxsize, handle); - s->_segMan->memcpy(argv[0], (const byte*)buf, maxsize); - delete[] buf; - return readBytes ? argv[0] : NULL_REG; -} - /** * Writes the cwd to the supplied address and returns the address in acc. */ @@ -559,6 +518,9 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) { reg_t kFileIOClose(EngineState *s, int argc, reg_t *argv) { debugC(kDebugLevelFile, "kFileIO(close): %d", argv[0].toUint16()); + if (argv[0] == SIGNAL_REG) + return s->r_acc; + uint16 handle = argv[0].toUint16(); #ifdef ENABLE_SCI32 @@ -571,8 +533,13 @@ reg_t kFileIOClose(EngineState *s, int argc, reg_t *argv) { FileHandle *f = getFileFromHandle(s, handle); if (f) { f->close(); + if (getSciVersion() <= SCI_VERSION_0_LATE) + return s->r_acc; // SCI0 semantics: no value returned return SIGNAL_REG; } + + if (getSciVersion() <= SCI_VERSION_0_LATE) + return s->r_acc; // SCI0 semantics: no value returned return NULL_REG; } @@ -635,20 +602,20 @@ reg_t kFileIOWriteRaw(EngineState *s, int argc, reg_t *argv) { } reg_t kFileIOReadString(EngineState *s, int argc, reg_t *argv) { - uint16 size = argv[1].toUint16(); - char *buf = new char[size]; + uint16 maxsize = argv[1].toUint16(); + char *buf = new char[maxsize]; uint16 handle = argv[2].toUint16(); - debugC(kDebugLevelFile, "kFileIO(readString): %d, %d", handle, size); + debugC(kDebugLevelFile, "kFileIO(readString): %d, %d", handle, maxsize); uint32 bytesRead; #ifdef ENABLE_SCI32 if (handle == VIRTUALFILE_HANDLE) - bytesRead = s->_virtualIndexFile->readLine(buf, size); + bytesRead = s->_virtualIndexFile->readLine(buf, maxsize); else #endif - bytesRead = fgets_wrapper(s, buf, size, handle); + bytesRead = fgets_wrapper(s, buf, maxsize, handle); - s->_segMan->memcpy(argv[0], (const byte*)buf, size); + s->_segMan->memcpy(argv[0], (const byte*)buf, maxsize); delete[] buf; return bytesRead ? argv[0] : NULL_REG; } @@ -669,9 +636,13 @@ reg_t kFileIOWriteString(EngineState *s, int argc, reg_t *argv) { if (f) { f->_out->write(str.c_str(), str.size()); + if (getSciVersion() <= SCI_VERSION_0_LATE) + return s->r_acc; // SCI0 semantics: no value returned return NULL_REG; } + if (getSciVersion() <= SCI_VERSION_0_LATE) + return s->r_acc; // SCI0 semantics: no value returned return make_reg(0, 6); // DOS - invalid handle } -- cgit v1.2.3 From 694f0f534a548061c3fecec3c8b0be0e0e5310dd Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 13 Jun 2012 12:22:51 +0300 Subject: SCI: Only include kSave_subops if ENABLE_SCI32 is defined --- engines/sci/engine/kernel_tables.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index d093310139..6965a5da45 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -245,6 +245,8 @@ static const SciKernelMapSubEntry kFileIO_subops[] = { SCI_SUBOPENTRY_TERMINATOR }; +#ifdef ENABLE_SCI32 + static const SciKernelMapSubEntry kSave_subops[] = { { SIG_SCI32, 0, MAP_CALL(SaveGame), "[r0]i[r0](r)", NULL }, { SIG_SCI32, 1, MAP_CALL(RestoreGame), "[r0]i[r0]", NULL }, @@ -255,9 +257,9 @@ static const SciKernelMapSubEntry kSave_subops[] = { { SIG_SCI32, 6, MAP_CALL(MakeSaveCatName), "rr", NULL }, { SIG_SCI32, 7, MAP_CALL(MakeSaveFileName), "rri", NULL }, { SIG_SCI32, 8, MAP_CALL(AutoSave), "[o0]", NULL }, + SCI_SUBOPENTRY_TERMINATOR }; -#ifdef ENABLE_SCI32 // version, subId, function-mapping, signature, workarounds static const SciKernelMapSubEntry kList_subops[] = { { SIG_SCI21, 0, MAP_CALL(NewList), "", NULL }, -- cgit v1.2.3 From e2613d22423fe2108e13909279b2f336a8a3209d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 13 Jun 2012 12:23:43 +0300 Subject: SCI: Add a workaround for the French version of Torin's Passage Thanks to LePhilousophe for playing and providing the workaround --- engines/sci/engine/workarounds.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index c1d4a3d9f9..ecb1e4c2d5 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -167,6 +167,7 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = { { GID_SQ6, -1, 0, 0, "SQ6", "init", -1, 2, { WORKAROUND_FAKE, 0 } }, // Demo and full version: called when the game starts (demo: room 0, full: room 100) { GID_SQ6, 100, 64950, 0, "View", "handleEvent", -1, 0, { WORKAROUND_FAKE, 0 } }, // called when pressing "Start game" in the main menu { GID_SQ6, -1, 64964, 0, "DPath", "init", -1, 1, { WORKAROUND_FAKE, 0 } }, // during the game + { GID_TORIN, -1, 64017, 0, "oFlags", "clear", -1, 0, { WORKAROUND_FAKE, 0 } }, // entering Torin's home in the French version SCI_WORKAROUNDENTRY_TERMINATOR }; -- cgit v1.2.3 From 93024c073be6d93c9369a83e4b4468bb0aaeeadd Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 13 Jun 2012 12:26:13 +0300 Subject: SCI: Handle the torindebug config setting for Torin's Passage French Thanks to LePhilousophe for testing and providing a patch --- engines/sci/engine/kmisc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index 1cbaf0708d..47c891eefd 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -384,6 +384,10 @@ reg_t kGetConfig(EngineState *s, int argc, reg_t *argv) { } else if (setting == "language") { Common::String languageId = Common::String::format("%d", g_sci->getSciLanguage()); s->_segMan->strcpy(data, languageId.c_str()); + } else if (setting == "torindebug") { + // Used to enable the debug mode in Torin's Passage (French). + // If true, the debug mode is enabled. + s->_segMan->strcpy(data, ""); } else { error("GetConfig: Unknown configuration setting %s", setting.c_str()); } -- cgit v1.2.3 From 2e7b16a8bdb6ad1cf51046d57eb0f5406ee2cc13 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 13 Jun 2012 11:28:25 +0200 Subject: HUGO: Apply coding convention (in progress) --- engines/hugo/console.cpp | 10 +- engines/hugo/dialogs.cpp | 82 +++++----- engines/hugo/dialogs.h | 4 +- engines/hugo/display.cpp | 36 ++--- engines/hugo/file.cpp | 168 +++++++++---------- engines/hugo/game.h | 100 ++++++------ engines/hugo/hugo.cpp | 82 +++++----- engines/hugo/hugo.h | 26 +-- engines/hugo/intro.cpp | 32 ++-- engines/hugo/inventory.cpp | 2 +- engines/hugo/mouse.cpp | 28 ++-- engines/hugo/object.cpp | 386 ++++++++++++++++++++++---------------------- engines/hugo/object.h | 10 +- engines/hugo/object_v1d.cpp | 254 ++++++++++++++--------------- engines/hugo/object_v1w.cpp | 244 ++++++++++++++-------------- engines/hugo/object_v2d.cpp | 248 ++++++++++++++-------------- engines/hugo/object_v3d.cpp | 164 +++++++++---------- engines/hugo/parser.cpp | 74 ++++----- engines/hugo/parser.h | 28 ++-- engines/hugo/parser_v1d.cpp | 130 +++++++-------- engines/hugo/parser_v1w.cpp | 32 ++-- engines/hugo/parser_v2d.cpp | 18 +-- engines/hugo/parser_v3d.cpp | 166 +++++++++---------- engines/hugo/route.cpp | 106 ++++++------ engines/hugo/schedule.cpp | 124 +++++++------- engines/hugo/sound.cpp | 4 +- 26 files changed, 1279 insertions(+), 1279 deletions(-) diff --git a/engines/hugo/console.cpp b/engines/hugo/console.cpp index 19fd91e3fa..414c86e1d4 100644 --- a/engines/hugo/console.cpp +++ b/engines/hugo/console.cpp @@ -96,8 +96,8 @@ bool HugoConsole::Cmd_listObjects(int argc, const char **argv) { DebugPrintf("Available objects for this game are:\n"); for (int i = 0; i < _vm->_object->_numObj; i++) { - if (_vm->_object->_objects[i].genericCmd & TAKE) - DebugPrintf("%2d - %s\n", i, _vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 2)); + if (_vm->_object->_objects[i]._genericCmd & TAKE) + DebugPrintf("%2d - %s\n", i, _vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 2)); } return true; } @@ -111,7 +111,7 @@ bool HugoConsole::Cmd_getObject(int argc, const char **argv) { return true; } - if (_vm->_object->_objects[strToInt(argv[1])].genericCmd & TAKE) + if (_vm->_object->_objects[strToInt(argv[1])]._genericCmd & TAKE) _vm->_parser->takeObject(&_vm->_object->_objects[strToInt(argv[1])]); else DebugPrintf("Object not available\n"); @@ -129,7 +129,7 @@ bool HugoConsole::Cmd_getAllObjects(int argc, const char **argv) { } for (int i = 0; i < _vm->_object->_numObj; i++) { - if (_vm->_object->_objects[i].genericCmd & TAKE) + if (_vm->_object->_objects[i]._genericCmd & TAKE) _vm->_parser->takeObject(&_vm->_object->_objects[i]); } @@ -145,7 +145,7 @@ bool HugoConsole::Cmd_boundaries(int argc, const char **argv) { return true; } - _vm->getGameStatus().showBoundariesFl = !_vm->getGameStatus().showBoundariesFl; + _vm->getGameStatus()._showBoundariesFl = !_vm->getGameStatus()._showBoundariesFl; return false; } diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp index e0b0198470..0efd47a3bd 100644 --- a/engines/hugo/dialogs.cpp +++ b/engines/hugo/dialogs.cpp @@ -34,19 +34,19 @@ namespace Hugo { -TopMenu::TopMenu(HugoEngine *vm) : Dialog(0, 0, kMenuWidth, kMenuHeight), arrayBmp(0), arraySize(0), +TopMenu::TopMenu(HugoEngine *vm) : Dialog(0, 0, kMenuWidth, kMenuHeight), _arrayBmp(0), _arraySize(0), _vm(vm) { init(); } TopMenu::~TopMenu() { - for (int i = 0; i < arraySize; i++) { - arrayBmp[i * 2]->free(); - delete arrayBmp[i * 2]; - arrayBmp[i * 2 + 1]->free(); - delete arrayBmp[i * 2 + 1]; + for (int i = 0; i < _arraySize; i++) { + _arrayBmp[i * 2]->free(); + delete _arrayBmp[i * 2]; + _arrayBmp[i * 2 + 1]->free(); + delete _arrayBmp[i * 2 + 1]; } - delete[] arrayBmp; + delete[] _arrayBmp; } void TopMenu::init() { @@ -108,23 +108,23 @@ void TopMenu::reflowLayout() { x += kButtonWidth + kButtonPad; // Set the graphics to the 'on' buttons, except for the variable ones - _whatButton->setGfx(arrayBmp[4 * kMenuWhat + scale - 1]); - _musicButton->setGfx(arrayBmp[4 * kMenuMusic + scale - 1 + ((_vm->_config.musicFl) ? 0 : 2)]); - _soundFXButton->setGfx(arrayBmp[4 * kMenuSoundFX + scale - 1 + ((_vm->_config.soundFl) ? 0 : 2)]); - _saveButton->setGfx(arrayBmp[4 * kMenuSave + scale - 1]); - _loadButton->setGfx(arrayBmp[4 * kMenuLoad + scale - 1]); - _recallButton->setGfx(arrayBmp[4 * kMenuRecall + scale - 1]); - _turboButton->setGfx(arrayBmp[4 * kMenuTurbo + scale - 1 + ((_vm->_config.turboFl) ? 0 : 2)]); - _lookButton->setGfx(arrayBmp[4 * kMenuLook + scale - 1]); - _inventButton->setGfx(arrayBmp[4 * kMenuInventory + scale - 1]); + _whatButton->setGfx(_arrayBmp[4 * kMenuWhat + scale - 1]); + _musicButton->setGfx(_arrayBmp[4 * kMenuMusic + scale - 1 + ((_vm->_config.musicFl) ? 0 : 2)]); + _soundFXButton->setGfx(_arrayBmp[4 * kMenuSoundFX + scale - 1 + ((_vm->_config.soundFl) ? 0 : 2)]); + _saveButton->setGfx(_arrayBmp[4 * kMenuSave + scale - 1]); + _loadButton->setGfx(_arrayBmp[4 * kMenuLoad + scale - 1]); + _recallButton->setGfx(_arrayBmp[4 * kMenuRecall + scale - 1]); + _turboButton->setGfx(_arrayBmp[4 * kMenuTurbo + scale - 1 + ((_vm->_config.turboFl) ? 0 : 2)]); + _lookButton->setGfx(_arrayBmp[4 * kMenuLook + scale - 1]); + _inventButton->setGfx(_arrayBmp[4 * kMenuInventory + scale - 1]); } void TopMenu::loadBmpArr(Common::SeekableReadStream &in) { - arraySize = in.readUint16BE(); + _arraySize = in.readUint16BE(); - delete arrayBmp; - arrayBmp = new Graphics::Surface *[arraySize * 2]; - for (int i = 0; i < arraySize; i++) { + delete _arrayBmp; + _arrayBmp = new Graphics::Surface *[_arraySize * 2]; + for (int i = 0; i < _arraySize; i++) { uint16 bmpSize = in.readUint16BE(); uint32 filPos = in.pos(); Common::SeekableSubReadStream stream(&in, filPos, filPos + bmpSize); @@ -137,28 +137,28 @@ void TopMenu::loadBmpArr(Common::SeekableReadStream &in) { if (bitmapSrc->format.bytesPerPixel == 1) error("TopMenu::loadBmpArr(): Unhandled paletted image"); - arrayBmp[i * 2] = bitmapSrc->convertTo(g_system->getOverlayFormat()); - arrayBmp[i * 2 + 1] = new Graphics::Surface(); - arrayBmp[i * 2 + 1]->create(arrayBmp[i * 2]->w * 2, arrayBmp[i * 2]->h * 2, g_system->getOverlayFormat()); - byte *src = (byte *)arrayBmp[i * 2]->pixels; - byte *dst = (byte *)arrayBmp[i * 2 + 1]->pixels; - - for (int j = 0; j < arrayBmp[i * 2]->h; j++) { - src = (byte *)arrayBmp[i * 2]->getBasePtr(0, j); - dst = (byte *)arrayBmp[i * 2 + 1]->getBasePtr(0, j * 2); - for (int k = arrayBmp[i * 2]->w; k > 0; k--) { - for (int m = arrayBmp[i * 2]->format.bytesPerPixel; m > 0; m--) { + _arrayBmp[i * 2] = bitmapSrc->convertTo(g_system->getOverlayFormat()); + _arrayBmp[i * 2 + 1] = new Graphics::Surface(); + _arrayBmp[i * 2 + 1]->create(_arrayBmp[i * 2]->w * 2, _arrayBmp[i * 2]->h * 2, g_system->getOverlayFormat()); + byte *src = (byte *)_arrayBmp[i * 2]->pixels; + byte *dst = (byte *)_arrayBmp[i * 2 + 1]->pixels; + + for (int j = 0; j < _arrayBmp[i * 2]->h; j++) { + src = (byte *)_arrayBmp[i * 2]->getBasePtr(0, j); + dst = (byte *)_arrayBmp[i * 2 + 1]->getBasePtr(0, j * 2); + for (int k = _arrayBmp[i * 2]->w; k > 0; k--) { + for (int m = _arrayBmp[i * 2]->format.bytesPerPixel; m > 0; m--) { *dst++ = *src++; } - src -= arrayBmp[i * 2]->format.bytesPerPixel; + src -= _arrayBmp[i * 2]->format.bytesPerPixel; - for (int m = arrayBmp[i * 2]->format.bytesPerPixel; m > 0; m--) { + for (int m = _arrayBmp[i * 2]->format.bytesPerPixel; m > 0; m--) { *dst++ = *src++; } } - src = (byte *)arrayBmp[i * 2 + 1]->getBasePtr(0, j * 2); - dst = (byte *)arrayBmp[i * 2 + 1]->getBasePtr(0, j * 2 + 1); - for (int k = arrayBmp[i * 2 + 1]->pitch; k > 0; k--) { + src = (byte *)_arrayBmp[i * 2 + 1]->getBasePtr(0, j * 2); + dst = (byte *)_arrayBmp[i * 2 + 1]->getBasePtr(0, j * 2 + 1); + for (int k = _arrayBmp[i * 2 + 1]->pitch; k > 0; k--) { *dst++ = *src++; } } @@ -171,12 +171,12 @@ void TopMenu::handleCommand(GUI::CommandSender *sender, uint32 command, uint32 d switch (command) { case kCmdWhat: close(); - _vm->getGameStatus().helpFl = true; + _vm->getGameStatus()._helpFl = true; break; case kCmdMusic: _vm->_sound->toggleMusic(); - _musicButton->setGfx(arrayBmp[4 * kMenuMusic + (g_system->getOverlayWidth() > 320 ? 2 : 1) - 1 + ((_vm->_config.musicFl) ? 0 : 2)]); + _musicButton->setGfx(_arrayBmp[4 * kMenuMusic + (g_system->getOverlayWidth() > 320 ? 2 : 1) - 1 + ((_vm->_config.musicFl) ? 0 : 2)]); _musicButton->draw(); g_gui.theme()->updateScreen(); g_system->updateScreen(); @@ -194,8 +194,8 @@ void TopMenu::handleCommand(GUI::CommandSender *sender, uint32 command, uint32 d break; case kCmdSave: close(); - if (_vm->getGameStatus().viewState == kViewPlay) { - if (_vm->getGameStatus().gameOverFl) + if (_vm->getGameStatus()._viewState == kViewPlay) { + if (_vm->getGameStatus()._gameOverFl) _vm->gameOverMsg(); else _vm->_file->saveGame(-1, Common::String()); @@ -207,7 +207,7 @@ void TopMenu::handleCommand(GUI::CommandSender *sender, uint32 command, uint32 d break; case kCmdRecall: close(); - _vm->getGameStatus().recallFl = true; + _vm->getGameStatus()._recallFl = true; break; case kCmdTurbo: _vm->_parser->switchTurbo(); diff --git a/engines/hugo/dialogs.h b/engines/hugo/dialogs.h index 4e710ff2f8..114bcf56a9 100644 --- a/engines/hugo/dialogs.h +++ b/engines/hugo/dialogs.h @@ -94,8 +94,8 @@ protected: GUI::PicButtonWidget *_lookButton; GUI::PicButtonWidget *_inventButton; - Graphics::Surface **arrayBmp; - uint16 arraySize; + Graphics::Surface **_arrayBmp; + uint16 _arraySize; }; class EntryDialog : public GUI::Dialog { diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index fa18d6b791..7028195dd4 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -239,13 +239,13 @@ void Screen::setBackgroundColor(const uint16 color) { void Screen::displayFrame(const int sx, const int sy, seq_t *seq, const bool foreFl) { debugC(3, kDebugDisplay, "displayFrame(%d, %d, seq, %d)", sx, sy, (foreFl) ? 1 : 0); - image_pt image = seq->imagePtr; // Ptr to object image data + image_pt image = seq->_imagePtr; // Ptr to object image data image_pt subFrontBuffer = &_frontBuffer[sy * kXPix + sx]; // Ptr to offset in _frontBuffer - int16 frontBufferwrap = kXPix - seq->x2 - 1; // Wraps dest_p after each line - int16 imageWrap = seq->bytesPerLine8 - seq->x2 - 1; + int16 frontBufferwrap = kXPix - seq->_x2 - 1; // Wraps dest_p after each line + int16 imageWrap = seq->_bytesPerLine8 - seq->_x2 - 1; overlayState_t overlayState = (foreFl) ? kOvlForeground : kOvlUndef; // Overlay state of object - for (uint16 y = 0; y < seq->lines; y++) { // Each line in object - for (uint16 x = 0; x <= seq->x2; x++) { + for (uint16 y = 0; y < seq->_lines; y++) { // Each line in object + for (uint16 x = 0; x <= seq->_x2; x++) { if (*image) { // Non-transparent byte ovlBound = _vm->_object->getFirstOverlay((uint16)(subFrontBuffer - _frontBuffer) >> 3); // Ptr into overlay bits if (ovlBound & (0x80 >> ((uint16)(subFrontBuffer - _frontBuffer) & 7))) { // Overlay bit is set @@ -265,7 +265,7 @@ void Screen::displayFrame(const int sx, const int sy, seq_t *seq, const bool for } // Add this rectangle to the display list - displayList(kDisplayAdd, sx, sy, seq->x2 + 1, seq->lines); + displayList(kDisplayAdd, sx, sy, seq->_x2 + 1, seq->_lines); } /** @@ -359,8 +359,8 @@ void Screen::displayList(dupdate_t update, ...) { // Don't blit if newscreen just loaded because _frontBuffer will // get blitted via InvalidateRect() at end of this cycle // and blitting here causes objects to appear too soon. - if (_vm->getGameStatus().newScreenFl) { - _vm->getGameStatus().newScreenFl = false; + if (_vm->getGameStatus()._newScreenFl) { + _vm->getGameStatus()._newScreenFl = false; break; } @@ -563,7 +563,7 @@ void Screen::initNewScreenDisplay() { displayBackground(); // Stop premature object display in Display_list(D_DISPLAY) - _vm->getGameStatus().newScreenFl = true; + _vm->getGameStatus()._newScreenFl = true; } /** @@ -650,19 +650,19 @@ bool Screen::isOverlapping(const rect_t *rectA, const rect_t *rectB) const { * White = Fix objects, parts of background */ void Screen::drawBoundaries() { - if (!_vm->getGameStatus().showBoundariesFl) + if (!_vm->getGameStatus()._showBoundariesFl) return; _vm->_mouse->drawHotspots(); for (int i = 0; i < _vm->_object->_numObj; i++) { object_t *obj = &_vm->_object->_objects[i]; // Get pointer to object - if (obj->screenIndex == *_vm->_screen_p) { - if ((obj->currImagePtr != 0) && (obj->cycling != kCycleInvisible)) - drawRectangle(false, obj->x + obj->currImagePtr->x1, obj->y + obj->currImagePtr->y1, - obj->x + obj->currImagePtr->x2, obj->y + obj->currImagePtr->y2, _TLIGHTGREEN); - else if ((obj->currImagePtr == 0) && (obj->vxPath != 0) && !obj->carriedFl) - drawRectangle(false, obj->oldx, obj->oldy, obj->oldx + obj->vxPath, obj->oldy + obj->vyPath, _TBRIGHTWHITE); + if (obj->_screenIndex == *_vm->_screen_p) { + if ((obj->_currImagePtr != 0) && (obj->_cycling != kCycleInvisible)) + drawRectangle(false, obj->_x + obj->_currImagePtr->_x1, obj->_y + obj->_currImagePtr->_y1, + obj->_x + obj->_currImagePtr->_x2, obj->_y + obj->_currImagePtr->_y2, _TLIGHTGREEN); + else if ((obj->_currImagePtr == 0) && (obj->_vxPath != 0) && !obj->_carriedFl) + drawRectangle(false, obj->_oldx, obj->_oldy, obj->_oldx + obj->_vxPath, obj->_oldy + obj->_vyPath, _TBRIGHTWHITE); } } g_system->copyRectToScreen(_frontBuffer, 320, 0, 0, 320, 200); @@ -735,7 +735,7 @@ overlayState_t Screen_v1d::findOvl(seq_t *seq_p, image_pt dst_p, uint16 y) { uint16 index = (uint16)(dst_p - _frontBuffer) >> 3; - for (int i = 0; i < seq_p->lines-y; i++) { // Each line in object + for (int i = 0; i < seq_p->_lines-y; i++) { // Each line in object if (_vm->_object->getBaseBoundary(index)) // If any overlay base byte is non-zero then the object is foreground, else back. return kOvlForeground; index += kCompLineSize; @@ -802,7 +802,7 @@ void Screen_v1w::loadFontArr(Common::ReadStream &in) { overlayState_t Screen_v1w::findOvl(seq_t *seq_p, image_pt dst_p, uint16 y) { debugC(4, kDebugDisplay, "findOvl()"); - for (; y < seq_p->lines; y++) { // Each line in object + for (; y < seq_p->_lines; y++) { // Each line in object byte ovb = _vm->_object->getBaseBoundary((uint16)(dst_p - _frontBuffer) >> 3); // Ptr into overlay bits if (ovb & (0x80 >> ((uint16)(dst_p - _frontBuffer) & 7))) // Overlay bit is set return kOvlForeground; // Found a bit - must be foreground diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp index f94f3b0443..8b03a9a430 100644 --- a/engines/hugo/file.cpp +++ b/engines/hugo/file.cpp @@ -143,11 +143,11 @@ seq_t *FileManager::readPCX(Common::ReadStream &f, seq_t *seqPtr, byte *imagePtr // Find size of image data in 8-bit DIB format // Note save of x2 - marks end of valid data before garbage uint16 bytesPerLine4 = PCC_header.bytesPerLine * 4; // 4-bit bpl - seqPtr->bytesPerLine8 = bytesPerLine4 * 2; // 8-bit bpl - seqPtr->lines = PCC_header.y2 - PCC_header.y1 + 1; - seqPtr->x2 = PCC_header.x2 - PCC_header.x1 + 1; + seqPtr->_bytesPerLine8 = bytesPerLine4 * 2; // 8-bit bpl + seqPtr->_lines = PCC_header.y2 - PCC_header.y1 + 1; + seqPtr->_x2 = PCC_header.x2 - PCC_header.x1 + 1; // Size of the image - uint16 size = seqPtr->lines * seqPtr->bytesPerLine8; + uint16 size = seqPtr->_lines * seqPtr->_bytesPerLine8; // Allocate memory for image data if NULL if (imagePtr == 0) @@ -155,13 +155,13 @@ seq_t *FileManager::readPCX(Common::ReadStream &f, seq_t *seqPtr, byte *imagePtr assert(imagePtr); - seqPtr->imagePtr = imagePtr; + seqPtr->_imagePtr = imagePtr; // Process the image data, converting to 8-bit DIB format uint16 y = 0; // Current line index byte pline[kXPix]; // Hold 4 planes of data byte *p = pline; // Ptr to above - while (y < seqPtr->lines) { + while (y < seqPtr->_lines) { byte c = f.readByte(); if ((c & kRepeatMask) == kRepeatMask) { byte d = f.readByte(); // Read data byte @@ -193,7 +193,7 @@ void FileManager::readImage(const int objNum, object_t *objPtr) { uint32 objLength; }; - if (!objPtr->seqNumb) // This object has no images + if (!objPtr->_seqNumb) // This object has no images return; if (_vm->isPacked()) { @@ -206,9 +206,9 @@ void FileManager::readImage(const int objNum, object_t *objPtr) { _objectsArchive.seek(objBlock.objOffset, SEEK_SET); } else { Common::String buf; - buf = _vm->_picDir + Common::String(_vm->_text->getNoun(objPtr->nounIndex, 0)) + ".PIX"; + buf = _vm->_picDir + Common::String(_vm->_text->getNoun(objPtr->_nounIndex, 0)) + ".PIX"; if (!_objectsArchive.open(buf)) { - buf = Common::String(_vm->_text->getNoun(objPtr->nounIndex, 0)) + ".PIX"; + buf = Common::String(_vm->_text->getNoun(objPtr->_nounIndex, 0)) + ".PIX"; if (!_objectsArchive.open(buf)) error("File not found: %s", buf.c_str()); } @@ -218,60 +218,60 @@ void FileManager::readImage(const int objNum, object_t *objPtr) { seq_t *seqPtr = 0; // Ptr to sequence structure // Now read the images into an images list - for (int j = 0; j < objPtr->seqNumb; j++) { // for each sequence - for (int k = 0; k < objPtr->seqList[j].imageNbr; k++) { // each image + for (int j = 0; j < objPtr->_seqNumb; j++) { // for each sequence + for (int k = 0; k < objPtr->_seqList[j]._imageNbr; k++) { // each image if (k == 0) { // First image // Read this image - allocate both seq and image memory - seqPtr = readPCX(_objectsArchive, 0, 0, firstImgFl, _vm->_text->getNoun(objPtr->nounIndex, 0)); - objPtr->seqList[j].seqPtr = seqPtr; + seqPtr = readPCX(_objectsArchive, 0, 0, firstImgFl, _vm->_text->getNoun(objPtr->_nounIndex, 0)); + objPtr->_seqList[j]._seqPtr = seqPtr; firstImgFl = false; } else { // Subsequent image // Read this image - allocate both seq and image memory - seqPtr->nextSeqPtr = readPCX(_objectsArchive, 0, 0, firstImgFl, _vm->_text->getNoun(objPtr->nounIndex, 0)); - seqPtr = seqPtr->nextSeqPtr; + seqPtr->_nextSeqPtr = readPCX(_objectsArchive, 0, 0, firstImgFl, _vm->_text->getNoun(objPtr->_nounIndex, 0)); + seqPtr = seqPtr->_nextSeqPtr; } // Compute the bounding box - x1, x2, y1, y2 // Note use of x2 - marks end of valid data in row - uint16 x2 = seqPtr->x2; - seqPtr->x1 = seqPtr->x2; - seqPtr->x2 = 0; - seqPtr->y1 = seqPtr->lines; - seqPtr->y2 = 0; - - image_pt dibPtr = seqPtr->imagePtr; - for (int y = 0; y < seqPtr->lines; y++, dibPtr += seqPtr->bytesPerLine8 - x2) { + uint16 x2 = seqPtr->_x2; + seqPtr->_x1 = seqPtr->_x2; + seqPtr->_x2 = 0; + seqPtr->_y1 = seqPtr->_lines; + seqPtr->_y2 = 0; + + image_pt dibPtr = seqPtr->_imagePtr; + for (int y = 0; y < seqPtr->_lines; y++, dibPtr += seqPtr->_bytesPerLine8 - x2) { for (int x = 0; x < x2; x++) { if (*dibPtr++) { // Some data found - if (x < seqPtr->x1) - seqPtr->x1 = x; - if (x > seqPtr->x2) - seqPtr->x2 = x; - if (y < seqPtr->y1) - seqPtr->y1 = y; - if (y > seqPtr->y2) - seqPtr->y2 = y; + if (x < seqPtr->_x1) + seqPtr->_x1 = x; + if (x > seqPtr->_x2) + seqPtr->_x2 = x; + if (y < seqPtr->_y1) + seqPtr->_y1 = y; + if (y > seqPtr->_y2) + seqPtr->_y2 = y; } } } } assert(seqPtr); - seqPtr->nextSeqPtr = objPtr->seqList[j].seqPtr; // loop linked list to head + seqPtr->_nextSeqPtr = objPtr->_seqList[j]._seqPtr; // loop linked list to head } // Set the current image sequence to first or last - switch (objPtr->cycling) { + switch (objPtr->_cycling) { case kCycleInvisible: // (May become visible later) case kCycleAlmostInvisible: case kCycleNotCycling: case kCycleForward: - objPtr->currImagePtr = objPtr->seqList[0].seqPtr; + objPtr->_currImagePtr = objPtr->_seqList[0]._seqPtr; break; case kCycleBackward: - objPtr->currImagePtr = seqPtr; + objPtr->_currImagePtr = seqPtr; break; default: - warning("Unexpected cycling: %d", objPtr->cycling); + warning("Unexpected cycling: %d", objPtr->_cycling); } if (!_vm->isPacked()) @@ -298,25 +298,25 @@ sound_pt FileManager::getSound(const int16 sound, uint16 *size) { if (!has_read_header) { for (int i = 0; i < kMaxSounds; i++) { - s_hdr[i].size = fp.readUint16LE(); - s_hdr[i].offset = fp.readUint32LE(); + s_hdr[i]._size = fp.readUint16LE(); + s_hdr[i]._offset = fp.readUint32LE(); } if (fp.err()) error("Wrong sound file format"); has_read_header = true; } - *size = s_hdr[sound].size; + *size = s_hdr[sound]._size; if (*size == 0) error("Wrong sound file format or missing sound %d", sound); // Allocate memory for sound or music, if possible - sound_pt soundPtr = (byte *)malloc(s_hdr[sound].size); // Ptr to sound data + sound_pt soundPtr = (byte *)malloc(s_hdr[sound]._size); // Ptr to sound data assert(soundPtr); // Seek to data and read it - fp.seek(s_hdr[sound].offset, SEEK_SET); - if (fp.read(soundPtr, s_hdr[sound].size) != s_hdr[sound].size) + fp.seek(s_hdr[sound]._offset, SEEK_SET); + if (fp.read(soundPtr, s_hdr[sound]._size) != s_hdr[sound]._size) error("Wrong sound file format"); fp.close(); @@ -391,13 +391,13 @@ bool FileManager::saveGame(const int16 slot, const Common::String &descrip) { out->writeSint16BE(_vm->getScore()); // Save story mode - out->writeByte((gameStatus.storyModeFl) ? 1 : 0); + out->writeByte((gameStatus._storyModeFl) ? 1 : 0); // Save jumpexit mode out->writeByte((_vm->_mouse->getJumpExitFl()) ? 1 : 0); // Save gameover status - out->writeByte((gameStatus.gameOverFl) ? 1 : 0); + out->writeByte((gameStatus._gameOverFl) ? 1 : 0); // Save screen states for (int i = 0; i < _vm->_numStates; i++) @@ -408,17 +408,17 @@ bool FileManager::saveGame(const int16 slot, const Common::String &descrip) { _vm->_screen->savePal(out); // Save maze status - out->writeByte((_vm->_maze.enabledFl) ? 1 : 0); - out->writeByte(_vm->_maze.size); - out->writeSint16BE(_vm->_maze.x1); - out->writeSint16BE(_vm->_maze.y1); - out->writeSint16BE(_vm->_maze.x2); - out->writeSint16BE(_vm->_maze.y2); - out->writeSint16BE(_vm->_maze.x3); - out->writeSint16BE(_vm->_maze.x4); - out->writeByte(_vm->_maze.firstScreenIndex); - - out->writeByte((byte)_vm->getGameStatus().viewState); + out->writeByte((_vm->_maze._enabledFl) ? 1 : 0); + out->writeByte(_vm->_maze._size); + out->writeSint16BE(_vm->_maze._x1); + out->writeSint16BE(_vm->_maze._y1); + out->writeSint16BE(_vm->_maze._x2); + out->writeSint16BE(_vm->_maze._y2); + out->writeSint16BE(_vm->_maze._x3); + out->writeSint16BE(_vm->_maze._x4); + out->writeByte(_vm->_maze._firstScreenIndex); + + out->writeByte((byte)_vm->getGameStatus()._viewState); out->finalize(); @@ -491,9 +491,9 @@ bool FileManager::restoreGame(const int16 slot) { int score = in->readSint16BE(); _vm->setScore(score); - gameStatus.storyModeFl = (in->readByte() == 1); + gameStatus._storyModeFl = (in->readByte() == 1); _vm->_mouse->setJumpExitFl(in->readByte() == 1); - gameStatus.gameOverFl = (in->readByte() == 1); + gameStatus._gameOverFl = (in->readByte() == 1); for (int i = 0; i < _vm->_numStates; i++) _vm->_screenStates[i] = in->readByte(); @@ -503,18 +503,18 @@ bool FileManager::restoreGame(const int16 slot) { _vm->_screen->restorePal(in); // Restore maze status - _vm->_maze.enabledFl = (in->readByte() == 1); - _vm->_maze.size = in->readByte(); - _vm->_maze.x1 = in->readSint16BE(); - _vm->_maze.y1 = in->readSint16BE(); - _vm->_maze.x2 = in->readSint16BE(); - _vm->_maze.y2 = in->readSint16BE(); - _vm->_maze.x3 = in->readSint16BE(); - _vm->_maze.x4 = in->readSint16BE(); - _vm->_maze.firstScreenIndex = in->readByte(); + _vm->_maze._enabledFl = (in->readByte() == 1); + _vm->_maze._size = in->readByte(); + _vm->_maze._x1 = in->readSint16BE(); + _vm->_maze._y1 = in->readSint16BE(); + _vm->_maze._x2 = in->readSint16BE(); + _vm->_maze._y2 = in->readSint16BE(); + _vm->_maze._x3 = in->readSint16BE(); + _vm->_maze._x4 = in->readSint16BE(); + _vm->_maze._firstScreenIndex = in->readByte(); _vm->_scheduler->restoreScreen(*_vm->_screen_p); - if ((_vm->getGameStatus().viewState = (vstate_t) in->readByte()) != kViewPlay) + if ((_vm->getGameStatus()._viewState = (vstate_t) in->readByte()) != kViewPlay) _vm->_screen->hideCursor(); @@ -536,25 +536,25 @@ void FileManager::printBootText() { return; } else { Utils::notifyBox(Common::String::format("Missing startup file '%s'", getBootFilename())); - _vm->getGameStatus().doQuitFl = true; + _vm->getGameStatus()._doQuitFl = true; return; } } // Allocate space for the text and print it - char *buf = (char *)malloc(_vm->_boot.exit_len + 1); + char *buf = (char *)malloc(_vm->_boot._exitLen + 1); if (buf) { // Skip over the boot structure (already read) and read exit text ofp.seek((long)sizeof(_vm->_boot), SEEK_SET); - if (ofp.read(buf, _vm->_boot.exit_len) != (size_t)_vm->_boot.exit_len) { + if (ofp.read(buf, _vm->_boot._exitLen) != (size_t)_vm->_boot._exitLen) { Utils::notifyBox(Common::String::format("Error while reading startup file '%s'", getBootFilename())); - _vm->getGameStatus().doQuitFl = true; + _vm->getGameStatus()._doQuitFl = true; return; } // Decrypt the exit text, using CRYPT substring int i; - for (i = 0; i < _vm->_boot.exit_len; i++) + for (i = 0; i < _vm->_boot._exitLen; i++) buf[i] ^= s_bootCypher[i % s_bootCypherLen]; buf[i] = '\0'; @@ -577,32 +577,32 @@ void FileManager::readBootFile() { if (_vm->_gameVariant == kGameVariantH1Dos) { //TODO initialize properly _boot structure warning("readBootFile - Skipping as H1 Dos may be a freeware"); - memset(_vm->_boot.distrib, '\0', sizeof(_vm->_boot.distrib)); - _vm->_boot.registered = kRegFreeware; + memset(_vm->_boot._distrib, '\0', sizeof(_vm->_boot._distrib)); + _vm->_boot._registered = kRegFreeware; return; } else if (_vm->getPlatform() == Common::kPlatformPC) { warning("readBootFile - Skipping as H2 and H3 Dos may be shareware"); - memset(_vm->_boot.distrib, '\0', sizeof(_vm->_boot.distrib)); - _vm->_boot.registered = kRegShareware; + memset(_vm->_boot._distrib, '\0', sizeof(_vm->_boot._distrib)); + _vm->_boot._registered = kRegShareware; return; } else { Utils::notifyBox(Common::String::format("Missing startup file '%s'", getBootFilename())); - _vm->getGameStatus().doQuitFl = true; + _vm->getGameStatus()._doQuitFl = true; return; } } if (ofp.size() < (int32)sizeof(_vm->_boot)) { Utils::notifyBox(Common::String::format("Corrupted startup file '%s'", getBootFilename())); - _vm->getGameStatus().doQuitFl = true; + _vm->getGameStatus()._doQuitFl = true; return; } - _vm->_boot.checksum = ofp.readByte(); - _vm->_boot.registered = ofp.readByte(); - ofp.read(_vm->_boot.pbswitch, sizeof(_vm->_boot.pbswitch)); - ofp.read(_vm->_boot.distrib, sizeof(_vm->_boot.distrib)); - _vm->_boot.exit_len = ofp.readUint16LE(); + _vm->_boot._checksum = ofp.readByte(); + _vm->_boot._registered = ofp.readByte(); + ofp.read(_vm->_boot._pbswitch, sizeof(_vm->_boot._pbswitch)); + ofp.read(_vm->_boot._distrib, sizeof(_vm->_boot._distrib)); + _vm->_boot._exitLen = ofp.readUint16LE(); byte *p = (byte *)&_vm->_boot; @@ -615,7 +615,7 @@ void FileManager::readBootFile() { if (checksum) { Utils::notifyBox(Common::String::format("Corrupted startup file '%s'", getBootFilename())); - _vm->getGameStatus().doQuitFl = true; + _vm->getGameStatus()._doQuitFl = true; } } diff --git a/engines/hugo/game.h b/engines/hugo/game.h index b1c5f407b3..ab5e2dff56 100644 --- a/engines/hugo/game.h +++ b/engines/hugo/game.h @@ -84,11 +84,11 @@ enum path_t { }; struct hugo_boot_t { // Common HUGO boot file - char checksum; // Checksum for boot structure (not exit text) - char registered; // TRUE if registered version, else FALSE - char pbswitch[8]; // Playback switch string - char distrib[32]; // Distributor branding string - uint16 exit_len; // Length of exit text (next in file) + char _checksum; // Checksum for boot structure (not exit text) + char _registered; // TRUE if registered version, else FALSE + char _pbswitch[8]; // Playback switch string + char _distrib[32]; // Distributor branding string + uint16 _exitLen; // Length of exit text (next in file) } PACKED_STRUCT; /** @@ -101,11 +101,11 @@ typedef byte *sound_pt; // ptr to sound (or music) d * Structure for initializing maze processing */ struct maze_t { - bool enabledFl; // TRUE when maze processing enabled - byte size; // Size of (square) maze matrix - int x1, y1, x2, y2; // maze hotspot bounding box - int x3, x4; // north, south x entry coordinates - byte firstScreenIndex; // index of first screen in maze + bool _enabledFl; // TRUE when maze processing enabled + byte _size; // Size of (square) maze matrix + int _x1, _y1, _x2, _y2; // maze hotspot bounding box + int _x3, _x4; // north, south x entry coordinates + byte _firstScreenIndex; // index of first screen in maze }; /** @@ -113,25 +113,25 @@ struct maze_t { * The image data is in 8-bit DIB format, i.e. 1 byte = 1 pixel */ struct seq_t { // Linked list of images - byte *imagePtr; // ptr to image - uint16 bytesPerLine8; // bytes per line (8bits) - uint16 lines; // lines - uint16 x1, x2, y1, y2; // Offsets from x,y: data bounding box - seq_t *nextSeqPtr; // ptr to next record + byte *_imagePtr; // ptr to image + uint16 _bytesPerLine8; // bytes per line (8bits) + uint16 _lines; // lines + uint16 _x1, _x2, _y1, _y2; // Offsets from x,y: data bounding box + seq_t *_nextSeqPtr; // ptr to next record }; /** * The following is an array of structures of above sequences */ struct seqList_t { - uint16 imageNbr; // Number of images in sequence - seq_t *seqPtr; // Ptr to sequence structure + uint16 _imageNbr; // Number of images in sequence + seq_t *_seqPtr; // Ptr to sequence structure }; #include "common/pack-start.h" // START STRUCT PACKING struct sound_hdr_t { // Sound file lookup entry - uint16 size; // Size of sound data in bytes - uint32 offset; // Offset of sound data in file + uint16 _size; // Size of sound data in bytes + uint32 _offset; // Offset of sound data in file } PACKED_STRUCT; #include "common/pack-end.h" // END STRUCT PACKING @@ -141,37 +141,37 @@ static const int kMaxSeqNumb = 4; // Number of sequences of im * Following is definition of object attributes */ struct object_t { - uint16 nounIndex; // String identifying object - uint16 dataIndex; // String describing the object - uint16 *stateDataIndex; // Added by Strangerke to handle the LOOK_S state-dependant descriptions - path_t pathType; // Describe path object follows - int vxPath, vyPath; // Delta velocities (e.g. for CHASE) - uint16 actIndex; // Action list to do on collision with hero - byte seqNumb; // Number of sequences in list - seq_t *currImagePtr; // Sequence image currently in use - seqList_t seqList[kMaxSeqNumb]; // Array of sequence structure ptrs and lengths - cycle_t cycling; // Whether cycling, forward or backward - byte cycleNumb; // No. of times to cycle - byte frameInterval; // Interval (in ticks) between frames - byte frameTimer; // Decrementing timer for above - int8 radius; // Defines sphere of influence by hero - byte screenIndex; // Screen in which object resides - int x, y; // Current coordinates of object - int oldx, oldy; // Previous coordinates of object - int8 vx, vy; // Velocity - byte objValue; // Value of object - int genericCmd; // Bit mask of 'generic' commands for object - uint16 cmdIndex; // ptr to list of cmd structures for verbs - bool carriedFl; // TRUE if object being carried - byte state; // state referenced in cmd list - bool verbOnlyFl; // TRUE if verb-only cmds allowed e.g. sit,look - byte priority; // Whether object fore, background or floating - int16 viewx, viewy; // Position to view object from (or 0 or -1) - int16 direction; // Direction to view object from - byte curSeqNum; // Save which seq number currently in use - byte curImageNum; // Save which image of sequence currently in use - int8 oldvx; // Previous vx (used in wandering) - int8 oldvy; // Previous vy + uint16 _nounIndex; // String identifying object + uint16 _dataIndex; // String describing the object + uint16 *_stateDataIndex; // Added by Strangerke to handle the LOOK_S state-dependant descriptions + path_t _pathType; // Describe path object follows + int _vxPath, _vyPath; // Delta velocities (e.g. for CHASE) + uint16 _actIndex; // Action list to do on collision with hero + byte _seqNumb; // Number of sequences in list + seq_t *_currImagePtr; // Sequence image currently in use + seqList_t _seqList[kMaxSeqNumb]; // Array of sequence structure ptrs and lengths + cycle_t _cycling; // Whether cycling, forward or backward + byte _cycleNumb; // No. of times to cycle + byte _frameInterval; // Interval (in ticks) between frames + byte _frameTimer; // Decrementing timer for above + int8 _radius; // Defines sphere of influence by hero + byte _screenIndex; // Screen in which object resides + int _x, _y; // Current coordinates of object + int _oldx, _oldy; // Previous coordinates of object + int8 _vx, _vy; // Velocity + byte _objValue; // Value of object + int _genericCmd; // Bit mask of 'generic' commands for object + uint16 _cmdIndex; // ptr to list of cmd structures for verbs + bool _carriedFl; // TRUE if object being carried + byte _state; // state referenced in cmd list + bool _verbOnlyFl; // TRUE if verb-only cmds allowed e.g. sit,look + byte _priority; // Whether object fore, background or floating + int16 _viewx, _viewy; // Position to view object from (or 0 or -1) + int16 _direction; // Direction to view object from + byte _curSeqNum; // Save which seq number currently in use + byte _curImageNum; // Save which image of sequence currently in use + int8 _oldvx; // Previous vx (used in wandering) + int8 _oldvy; // Previous vy }; } // End of namespace Hugo diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index df8abf32eb..450f4ff837 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -249,24 +249,24 @@ Common::Error HugoEngine::run() { initStatus(); // Initialize game status initConfig(); // Initialize user's config - if (!_status.doQuitFl) { + if (!_status._doQuitFl) { initialize(); resetConfig(); // Reset user's config initMachine(); // Start the state machine - _status.viewState = kViewIntroInit; + _status._viewState = kViewIntroInit; int16 loadSlot = Common::ConfigManager::instance().getInt("save_slot"); if (loadSlot >= 0) { - _status.skipIntroFl = true; + _status._skipIntroFl = true; _file->restoreGame(loadSlot); } else { _file->saveGame(0, "New Game"); } } - while (!_status.doQuitFl) { + while (!_status._doQuitFl) { _screen->drawBoundaries(); g_system->updateScreen(); runMachine(); @@ -289,20 +289,20 @@ Common::Error HugoEngine::run() { _mouse->setRightButton(); break; case Common::EVENT_QUIT: - _status.doQuitFl = true; + _status._doQuitFl = true; break; default: break; } } - if (_status.helpFl) { - _status.helpFl = false; + if (_status._helpFl) { + _status._helpFl = false; _file->instructions(); } _mouse->mouseHandler(); // Mouse activity - adds to display list _screen->displayList(kDisplayDisplay); // Blit the display list to screen - _status.doQuitFl |= shouldQuit(); // update game quit flag + _status._doQuitFl |= shouldQuit(); // update game quit flag } return Common::kNoError; } @@ -326,7 +326,7 @@ void HugoEngine::runMachine() { status_t &gameStatus = getGameStatus(); // Don't process if gameover - if (gameStatus.gameOverFl) + if (gameStatus._gameOverFl) return; _curTime = g_system->getMillis(); @@ -338,19 +338,19 @@ void HugoEngine::runMachine() { _lastTime = _curTime; - switch (gameStatus.viewState) { + switch (gameStatus._viewState) { case kViewIdle: // Not processing state machine _screen->hideCursor(); _intro->preNewGame(); // Any processing before New Game selected break; case kViewIntroInit: // Initialization before intro begins _intro->introInit(); - gameStatus.viewState = kViewIntro; + gameStatus._viewState = kViewIntro; break; case kViewIntro: // Do any game-dependant preamble if (_intro->introPlay()) { // Process intro screen _scheduler->newScreen(0); // Initialize first screen - gameStatus.viewState = kViewPlay; + gameStatus._viewState = kViewPlay; } break; case kViewPlay: // Playing game @@ -368,8 +368,8 @@ void HugoEngine::runMachine() { _inventory->runInventory(); // Process Inventory state machine break; case kViewExit: // Game over or user exited - gameStatus.viewState = kViewIdle; - _status.doQuitFl = true; + gameStatus._viewState = kViewIdle; + _status._doQuitFl = true; break; } } @@ -427,7 +427,7 @@ bool HugoEngine::loadHugoDat() { _scheduler->loadActListArr(in); _scheduler->loadAlNewscrIndex(in); _hero = &_object->_objects[kHeroIndex]; // This always points to hero - _screen_p = &(_object->_objects[kHeroIndex].screenIndex); // Current screen is hero's + _screen_p = &(_object->_objects[kHeroIndex]._screenIndex); // Current screen is hero's _heroImage = kHeroIndex; // Current in use hero image for (int varnt = 0; varnt < _numVariant; varnt++) { @@ -527,33 +527,33 @@ void HugoEngine::initPlaylist(bool playlist[kMaxTunes]) { */ void HugoEngine::initStatus() { debugC(1, kDebugEngine, "initStatus"); - _status.storyModeFl = false; // Not in story mode - _status.gameOverFl = false; // Hero not knobbled yet - _status.lookFl = false; // Toolbar "look" button - _status.recallFl = false; // Toolbar "recall" button - _status.newScreenFl = false; // Screen not just loaded - _status.godModeFl = false; // No special cheats allowed - _status.showBoundariesFl = false; // Boundaries hidden by default - _status.doQuitFl = false; - _status.skipIntroFl = false; - _status.helpFl = false; + _status._storyModeFl = false; // Not in story mode + _status._gameOverFl = false; // Hero not knobbled yet + _status._lookFl = false; // Toolbar "look" button + _status._recallFl = false; // Toolbar "recall" button + _status._newScreenFl = false; // Screen not just loaded + _status._godModeFl = false; // No special cheats allowed + _status._showBoundariesFl = false; // Boundaries hidden by default + _status._doQuitFl = false; + _status._skipIntroFl = false; + _status._helpFl = false; // Initialize every start of new game - _status.tick = 0; // Tick count - _status.viewState = kViewIdle; // View state + _status._tick = 0; // Tick count + _status._viewState = kViewIdle; // View state // Strangerke - Suppress as related to playback -// _status.recordFl = false; // Not record mode -// _status.playbackFl = false; // Not playback mode +// _status._recordFl = false; // Not record mode +// _status._playbackFl = false; // Not playback mode // Strangerke - Not used ? -// _status.mmtime = false; // Multimedia timer support -// _status.helpFl = false; // Not calling WinHelp() -// _status.demoFl = false; // Not demo mode -// _status.path[0] = 0; // Path to write files -// _status.screenWidth = 0; // Desktop screen width -// _status.saveTick = 0; // Time of last save -// _status.saveSlot = 0; // Slot to save/restore game -// _status.textBoxFl = false; // Not processing a text box +// _status._mmtime = false; // Multimedia timer support +// _status._helpFl = false; // Not calling WinHelp() +// _status._demoFl = false; // Not demo mode +// _status._path[0] = 0; // Path to write files +// _status._screenWidth = 0; // Desktop screen width +// _status._saveTick = 0; // Time of last save +// _status._saveSlot = 0; // Slot to save/restore game +// _status._textBoxFl = false; // Not processing a text box } /** @@ -587,7 +587,7 @@ void HugoEngine::resetConfig() { void HugoEngine::initialize() { debugC(1, kDebugEngine, "initialize"); - _maze.enabledFl = false; + _maze._enabledFl = false; _line[0] = '\0'; _sound->initSound(); @@ -679,10 +679,10 @@ void HugoEngine::calcMaxScore() { void HugoEngine::endGame() { debugC(1, kDebugEngine, "endGame"); - if (_boot.registered != kRegRegistered) + if (_boot._registered != kRegRegistered) Utils::notifyBox(_text->getTextEngine(kEsAdvertise)); Utils::notifyBox(Common::String::format("%s\n%s", _episode, getCopyrightString())); - _status.viewState = kViewExit; + _status._viewState = kViewExit; } bool HugoEngine::canLoadGameStateCurrently() { @@ -690,7 +690,7 @@ bool HugoEngine::canLoadGameStateCurrently() { } bool HugoEngine::canSaveGameStateCurrently() { - return (_status.viewState == kViewPlay); + return (_status._viewState == kViewPlay); } int8 HugoEngine::getTPS() const { diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h index 125819a39b..3ad6fced24 100644 --- a/engines/hugo/hugo.h +++ b/engines/hugo/hugo.h @@ -171,20 +171,20 @@ enum seqTextEngine { struct HugoGameDescription; struct status_t { // Game status (not saved) - bool storyModeFl; // Game is telling story - no commands - bool gameOverFl; // Game is over - hero knobbled - bool lookFl; // Toolbar "look" button pressed - bool recallFl; // Toolbar "recall" button pressed - bool newScreenFl; // New screen just loaded in dib_a - bool godModeFl; // Allow DEBUG features in live version - bool showBoundariesFl; // Flag used to show and hide boundaries, + bool _storyModeFl; // Game is telling story - no commands + bool _gameOverFl; // Game is over - hero knobbled + bool _lookFl; // Toolbar "look" button pressed + bool _recallFl; // Toolbar "recall" button pressed + bool _newScreenFl; // New screen just loaded in dib_a + bool _godModeFl; // Allow DEBUG features in live version + bool _showBoundariesFl; // Flag used to show and hide boundaries, // used by the console - bool doQuitFl; - bool skipIntroFl; - bool helpFl; - uint32 tick; // Current time in ticks - vstate_t viewState; // View state machine - int16 song; // Current song + bool _doQuitFl; + bool _skipIntroFl; + bool _helpFl; + uint32 _tick; // Current time in ticks + vstate_t _viewState; // View state machine + int16 _song; // Current song // Strangerke - Suppress as related to playback // bool playbackFl; // Game is in playback mode diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp index 72f718fe8e..599d8f21d3 100644 --- a/engines/hugo/intro.cpp +++ b/engines/hugo/intro.cpp @@ -98,7 +98,7 @@ void intro_v1d::introInit() { bool intro_v1d::introPlay() { byte introSize = getIntroSize(); - if (_vm->getGameStatus().skipIntroFl) + if (_vm->getGameStatus()._skipIntroFl) return true; if (introTicks < introSize) { @@ -117,20 +117,20 @@ bool intro_v1d::introPlay() { error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 8"); char buffer[80]; - if (_vm->_boot.registered == kRegRegistered) + if (_vm->_boot._registered == kRegRegistered) strcpy(buffer, "Registered Version"); - else if (_vm->_boot.registered == kRegShareware) + else if (_vm->_boot._registered == kRegShareware) strcpy(buffer, "Shareware Version"); - else if (_vm->_boot.registered == kRegFreeware) + else if (_vm->_boot._registered == kRegFreeware) strcpy(buffer, "Freeware Version"); else - error("Unknown registration flag in hugo.bsf: %d", _vm->_boot.registered); + error("Unknown registration flag in hugo.bsf: %d", _vm->_boot._registered); font.drawString(&surf, buffer, 0, 163, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); font.drawString(&surf, _vm->getCopyrightString(), 0, 176, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); - if ((*_vm->_boot.distrib != '\0') && (scumm_stricmp(_vm->_boot.distrib, "David P. Gray"))) { - sprintf(buffer, "Distributed by %s.", _vm->_boot.distrib); + if ((*_vm->_boot._distrib != '\0') && (scumm_stricmp(_vm->_boot._distrib, "David P. Gray"))) { + sprintf(buffer, "Distributed by %s.", _vm->_boot._distrib); font.drawString(&surf, buffer, 0, 75, 320, _TMAGENTA, Graphics::kTextAlignCenter); } @@ -253,16 +253,16 @@ void intro_v2d::introInit() { if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 8))) error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 8"); - if (_vm->_boot.registered) + if (_vm->_boot._registered) sprintf(buffer, "%s Registered Version", _vm->getCopyrightString()); else sprintf(buffer, "%s Shareware Version", _vm->getCopyrightString()); font.drawString(&surf, buffer, 0, 186, 320, _TLIGHTRED, Graphics::kTextAlignCenter); - if ((*_vm->_boot.distrib != '\0') && (scumm_stricmp(_vm->_boot.distrib, "David P. Gray"))) { + if ((*_vm->_boot._distrib != '\0') && (scumm_stricmp(_vm->_boot._distrib, "David P. Gray"))) { // TROMAN, size 10-5 - sprintf(buffer, "Distributed by %s.", _vm->_boot.distrib); + sprintf(buffer, "Distributed by %s.", _vm->_boot._distrib); font.drawString(&surf, buffer, 0, 1, 320, _TLIGHTRED, Graphics::kTextAlignCenter); } @@ -294,7 +294,7 @@ void intro_v3d::introInit() { surf.format = Graphics::PixelFormat::createFormatCLUT8(); char buffer[128]; - if (_vm->_boot.registered) + if (_vm->_boot._registered) sprintf(buffer, "%s Registered Version", _vm->getCopyrightString()); else sprintf(buffer,"%s Shareware Version", _vm->getCopyrightString()); @@ -305,8 +305,8 @@ void intro_v3d::introInit() { font.drawString(&surf, buffer, 0, 190, 320, _TBROWN, Graphics::kTextAlignCenter); - if ((*_vm->_boot.distrib != '\0') && (scumm_stricmp(_vm->_boot.distrib, "David P. Gray"))) { - sprintf(buffer, "Distributed by %s.", _vm->_boot.distrib); + if ((*_vm->_boot._distrib != '\0') && (scumm_stricmp(_vm->_boot._distrib, "David P. Gray"))) { + sprintf(buffer, "Distributed by %s.", _vm->_boot._distrib); font.drawString(&surf, buffer, 0, 0, 320, _TBROWN, Graphics::kTextAlignCenter); } @@ -325,7 +325,7 @@ void intro_v3d::introInit() { * Called every tick. Returns TRUE when complete */ bool intro_v3d::introPlay() { - if (_vm->getGameStatus().skipIntroFl) + if (_vm->getGameStatus()._skipIntroFl) return true; if (introTicks < getIntroSize()) { @@ -356,7 +356,7 @@ intro_v1w::~intro_v1w() { } void intro_v1w::preNewGame() { - _vm->getGameStatus().viewState = kViewIntroInit; + _vm->getGameStatus()._viewState = kViewIntroInit; } void intro_v1w::introInit() { @@ -416,7 +416,7 @@ void intro_v3w::introInit() { * Called every tick. Returns TRUE when complete */ bool intro_v3w::introPlay() { - if (_vm->getGameStatus().skipIntroFl) + if (_vm->getGameStatus()._skipIntroFl) return true; if (introTicks < getIntroSize()) { diff --git a/engines/hugo/inventory.cpp b/engines/hugo/inventory.cpp index 410c4e715c..151fe0ee13 100644 --- a/engines/hugo/inventory.cpp +++ b/engines/hugo/inventory.cpp @@ -231,7 +231,7 @@ void InventoryHandler::runInventory() { _vm->_screen->moveImage(_vm->_screen->getBackBuffer(), 0, 0, kXPix, kYPix, kXPix, _vm->_screen->getFrontBuffer(), 0, 0, kXPix); _vm->_object->updateImages(); // Add objects back into display list for restore _inventoryState = kInventoryOff; - gameStatus.viewState = kViewPlay; + gameStatus._viewState = kViewPlay; } break; case kInventoryDown: // Icon bar moving down diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp index d2d5b59dae..323f362b10 100644 --- a/engines/hugo/mouse.cpp +++ b/engines/hugo/mouse.cpp @@ -154,7 +154,7 @@ void MouseHandler::processRightClick(const int16 objId, const int16 cx, const in status_t &gameStatus = _vm->getGameStatus(); - if (gameStatus.storyModeFl || _vm->_hero->pathType == kPathQuiet) // Make sure user has control + if (gameStatus._storyModeFl || _vm->_hero->_pathType == kPathQuiet) // Make sure user has control return; int16 inventObjId = _vm->_inventory->getInventoryObjId(); @@ -170,7 +170,7 @@ void MouseHandler::processRightClick(const int16 objId, const int16 cx, const in } else { // Clicked over viewport object object_t *obj = &_vm->_object->_objects[objId]; int16 x, y; - switch (obj->viewx) { // Where to walk to + switch (obj->_viewx) { // Where to walk to case -1: // Walk to object position if (_vm->_object->findObjectSpace(obj, &x, &y)) foundFl = _vm->_route->startRoute(kRouteGet, objId, x, y); @@ -181,8 +181,8 @@ void MouseHandler::processRightClick(const int16 objId, const int16 cx, const in _vm->_object->useObject(objId); // Pick up or use object break; default: // Walk to view point if possible - if (!_vm->_route->startRoute(kRouteGet, objId, obj->viewx, obj->viewy)) { - if (_vm->_hero->cycling == kCycleInvisible) // If invisible do + if (!_vm->_route->startRoute(kRouteGet, objId, obj->_viewx, obj->_viewy)) { + if (_vm->_hero->_cycling == kCycleInvisible) // If invisible do _vm->_object->useObject(objId); // immediate use else Utils::notifyBox(_vm->_text->getTextMouse(kMsNoWayText)); // Can't get there @@ -207,7 +207,7 @@ void MouseHandler::processLeftClick(const int16 objId, const int16 cx, const int status_t &gameStatus = _vm->getGameStatus(); - if (gameStatus.storyModeFl || _vm->_hero->pathType == kPathQuiet) // Make sure user has control + if (gameStatus._storyModeFl || _vm->_hero->_pathType == kPathQuiet) // Make sure user has control return; switch (objId) { @@ -254,7 +254,7 @@ void MouseHandler::processLeftClick(const int16 objId, const int16 cx, const int _vm->_object->lookObject(obj); } else { bool foundFl = false; // TRUE if route found to object - switch (obj->viewx) { // Clicked over viewport object + switch (obj->_viewx) { // Clicked over viewport object case -1: // Walk to object position if (_vm->_object->findObjectSpace(obj, &x, &y)) foundFl = _vm->_route->startRoute(kRouteLook, objId, x, y); @@ -265,8 +265,8 @@ void MouseHandler::processLeftClick(const int16 objId, const int16 cx, const int _vm->_object->lookObject(obj); break; default: // Walk to view point if possible - if (!_vm->_route->startRoute(kRouteLook, objId, obj->viewx, obj->viewy)) { - if (_vm->_hero->cycling == kCycleInvisible) // If invisible do + if (!_vm->_route->startRoute(kRouteLook, objId, obj->_viewx, obj->_viewy)) { + if (_vm->_hero->_cycling == kCycleInvisible) // If invisible do _vm->_object->lookObject(obj); // immediate decription else Utils::notifyBox(_vm->_text->getTextMouse(kMsNoWayText)); // Can't get there @@ -286,14 +286,14 @@ void MouseHandler::mouseHandler() { status_t &gameStatus = _vm->getGameStatus(); istate_t inventState = _vm->_inventory->getInventoryState(); - if ((gameStatus.viewState != kViewPlay) && (inventState != kInventoryActive)) + if ((gameStatus._viewState != kViewPlay) && (inventState != kInventoryActive)) return; int16 cx = getMouseX(); int16 cy = getMouseY(); -// gameStatus.cx = cx; // Save cursor coords -// gameStatus.cy = cy; +// gameStatus._cx = cx; // Save cursor coords +// gameStatus._cy = cy; // Don't process if outside client area if ((cx < 0) || (cx > kXPix) || (cy < kDibOffY) || (cy > kViewSizeY + kDibOffY)) @@ -309,14 +309,14 @@ void MouseHandler::mouseHandler() { } } - if (!gameStatus.gameOverFl) { + if (!gameStatus._gameOverFl) { if (objId == -1) // No match, check rest of view objId = _vm->_object->findObject(cx, cy); if (objId >= 0) { // Got a match // Display object name next to cursor (unless CURSOR_NOCHAR) // Note test for swapped hero name - const char *name = _vm->_text->getNoun(_vm->_object->_objects[(objId == kHeroIndex) ? _vm->_heroImage : objId].nounIndex, kCursorNameIndex); + const char *name = _vm->_text->getNoun(_vm->_object->_objects[(objId == kHeroIndex) ? _vm->_heroImage : objId]._nounIndex, kCursorNameIndex); if (name[0] != kCursorNochar) cursorText(name, cx, cy, U_FONT8, _TBRIGHTWHITE); @@ -378,7 +378,7 @@ void MouseHandler::loadHotspots(Common::ReadStream &in) { void MouseHandler::drawHotspots() const { for (int i = 0; _hotspots[i].screenIndex >= 0; i++) { hotspot_t *hotspot = &_hotspots[i]; - if (hotspot->screenIndex == _vm->_hero->screenIndex) + if (hotspot->screenIndex == _vm->_hero->_screenIndex) _vm->_screen->drawRectangle(false, hotspot->x1, hotspot->y1, hotspot->x2, hotspot->y2, _TLIGHTRED); } } diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp index bc99abf410..92a04227d6 100644 --- a/engines/hugo/object.cpp +++ b/engines/hugo/object.cpp @@ -74,22 +74,22 @@ byte ObjectHandler::getFirstOverlay(uint16 index) const { } bool ObjectHandler::isCarried(int objIndex) const { - return _objects[objIndex].carriedFl; + return _objects[objIndex]._carriedFl; } void ObjectHandler::setCarry(int objIndex, bool val) { - _objects[objIndex].carriedFl = val; + _objects[objIndex]._carriedFl = val; } void ObjectHandler::setVelocity(int objIndex, int8 vx, int8 vy) { - _objects[objIndex].vx = vx; - _objects[objIndex].vy = vy; + _objects[objIndex]._vx = vx; + _objects[objIndex]._vy = vy; } void ObjectHandler::setPath(int objIndex, path_t pathType, int16 vxPath, int16 vyPath) { - _objects[objIndex].pathType = pathType; - _objects[objIndex].vxPath = vxPath; - _objects[objIndex].vyPath = vyPath; + _objects[objIndex]._pathType = pathType; + _objects[objIndex]._vxPath = vxPath; + _objects[objIndex]._vyPath = vyPath; } /** @@ -99,15 +99,15 @@ void ObjectHandler::saveSeq(object_t *obj) { debugC(1, kDebugObject, "saveSeq"); bool found = false; - for (int i = 0; !found && (i < obj->seqNumb); i++) { - seq_t *q = obj->seqList[i].seqPtr; - for (int j = 0; !found && (j < obj->seqList[i].imageNbr); j++) { - if (obj->currImagePtr == q) { + for (int i = 0; !found && (i < obj->_seqNumb); i++) { + seq_t *q = obj->_seqList[i]._seqPtr; + for (int j = 0; !found && (j < obj->_seqList[i]._imageNbr); j++) { + if (obj->_currImagePtr == q) { found = true; - obj->curSeqNum = i; - obj->curImageNum = j; + obj->_curSeqNum = i; + obj->_curImageNum = j; } else { - q = q->nextSeqPtr; + q = q->_nextSeqPtr; } } } @@ -119,10 +119,10 @@ void ObjectHandler::saveSeq(object_t *obj) { void ObjectHandler::restoreSeq(object_t *obj) { debugC(1, kDebugObject, "restoreSeq"); - seq_t *q = obj->seqList[obj->curSeqNum].seqPtr; - for (int j = 0; j < obj->curImageNum; j++) - q = q->nextSeqPtr; - obj->currImagePtr = q; + seq_t *q = obj->_seqList[obj->_curSeqNum]._seqPtr; + for (int j = 0; j < obj->_curImageNum; j++) + q = q->_nextSeqPtr; + obj->_currImagePtr = q; } /** @@ -137,33 +137,33 @@ void ObjectHandler::useObject(int16 objId) { object_t *obj = &_objects[objId]; // Ptr to object if (inventObjId == -1) { // Get or use objid directly - if ((obj->genericCmd & TAKE) || obj->objValue) // Get collectible item - sprintf(_vm->_line, "%s %s", _vm->_text->getVerb(_vm->_take, 0), _vm->_text->getNoun(obj->nounIndex, 0)); - else if (obj->cmdIndex != 0) // Use non-collectible item if able - sprintf(_vm->_line, "%s %s", _vm->_text->getVerb(_vm->_parser->getCmdDefaultVerbIdx(obj->cmdIndex), 0), _vm->_text->getNoun(obj->nounIndex, 0)); - else if ((verb = _vm->_parser->useBG(_vm->_text->getNoun(obj->nounIndex, 0))) != 0) - sprintf(_vm->_line, "%s %s", verb, _vm->_text->getNoun(obj->nounIndex, 0)); + if ((obj->_genericCmd & TAKE) || obj->_objValue) // Get collectible item + sprintf(_vm->_line, "%s %s", _vm->_text->getVerb(_vm->_take, 0), _vm->_text->getNoun(obj->_nounIndex, 0)); + else if (obj->_cmdIndex != 0) // Use non-collectible item if able + sprintf(_vm->_line, "%s %s", _vm->_text->getVerb(_vm->_parser->getCmdDefaultVerbIdx(obj->_cmdIndex), 0), _vm->_text->getNoun(obj->_nounIndex, 0)); + else if ((verb = _vm->_parser->useBG(_vm->_text->getNoun(obj->_nounIndex, 0))) != 0) + sprintf(_vm->_line, "%s %s", verb, _vm->_text->getNoun(obj->_nounIndex, 0)); else return; // Can't use object directly } else { // Use status.objid on objid // Default to first cmd verb - sprintf(_vm->_line, "%s %s %s", _vm->_text->getVerb(_vm->_parser->getCmdDefaultVerbIdx(_objects[inventObjId].cmdIndex), 0), - _vm->_text->getNoun(_objects[inventObjId].nounIndex, 0), - _vm->_text->getNoun(obj->nounIndex, 0)); + sprintf(_vm->_line, "%s %s %s", _vm->_text->getVerb(_vm->_parser->getCmdDefaultVerbIdx(_objects[inventObjId]._cmdIndex), 0), + _vm->_text->getNoun(_objects[inventObjId]._nounIndex, 0), + _vm->_text->getNoun(obj->_nounIndex, 0)); // Check valid use of objects and override verb if necessary - for (uses_t *use = _uses; use->objId != _numObj; use++) { - if (inventObjId == use->objId) { + for (uses_t *use = _uses; use->_objId != _numObj; use++) { + if (inventObjId == use->_objId) { // Look for secondary object, if found use matching verb bool foundFl = false; - for (target_t *target = use->targets; target->nounIndex != 0; target++) - if (target->nounIndex == obj->nounIndex) { + for (target_t *target = use->_targets; target->_nounIndex != 0; target++) + if (target->_nounIndex == obj->_nounIndex) { foundFl = true; - sprintf(_vm->_line, "%s %s %s", _vm->_text->getVerb(target->verbIndex, 0), - _vm->_text->getNoun(_objects[inventObjId].nounIndex, 0), - _vm->_text->getNoun(obj->nounIndex, 0)); + sprintf(_vm->_line, "%s %s %s", _vm->_text->getVerb(target->_verbIndex, 0), + _vm->_text->getNoun(_objects[inventObjId]._nounIndex, 0), + _vm->_text->getNoun(obj->_nounIndex, 0)); } // No valid use of objects found, print failure string @@ -171,7 +171,7 @@ void ObjectHandler::useObject(int16 objId) { // Deselect dragged icon if inventory not active if (_vm->_inventory->getInventoryState() != kInventoryActive) _vm->_screen->resetInventoryObjId(); - Utils::notifyBox(_vm->_text->getTextData(use->dataIndex)); + Utils::notifyBox(_vm->_text->getTextData(use->_dataIndex)); return; } } @@ -199,26 +199,26 @@ int16 ObjectHandler::findObject(uint16 x, uint16 y) { // Check objects on screen for (int i = 0; i < _numObj; i++, obj++) { // Object must be in current screen and "useful" - if (obj->screenIndex == *_vm->_screen_p && (obj->genericCmd || obj->objValue || obj->cmdIndex)) { - seq_t *curImage = obj->currImagePtr; + if (obj->_screenIndex == *_vm->_screen_p && (obj->_genericCmd || obj->_objValue || obj->_cmdIndex)) { + seq_t *curImage = obj->_currImagePtr; // Object must have a visible image... - if (curImage != 0 && obj->cycling != kCycleInvisible) { + if (curImage != 0 && obj->_cycling != kCycleInvisible) { // If cursor inside object - if (x >= (uint16)obj->x && x <= obj->x + curImage->x2 && y >= (uint16)obj->y && y <= obj->y + curImage->y2) { + if (x >= (uint16)obj->_x && x <= obj->_x + curImage->_x2 && y >= (uint16)obj->_y && y <= obj->_y + curImage->_y2) { // If object is closest so far - if (obj->y + curImage->y2 > y2Max) { - y2Max = obj->y + curImage->y2; + if (obj->_y + curImage->_y2 > y2Max) { + y2Max = obj->_y + curImage->_y2; objIndex = i; // Found an object! } } } else { // ...or a dummy object that has a hotspot rectangle - if (curImage == 0 && obj->vxPath != 0 && !obj->carriedFl) { + if (curImage == 0 && obj->_vxPath != 0 && !obj->_carriedFl) { // If cursor inside special rectangle - if ((int16)x >= obj->oldx && (int16)x < obj->oldx + obj->vxPath && (int16)y >= obj->oldy && (int16)y < obj->oldy + obj->vyPath) { + if ((int16)x >= obj->_oldx && (int16)x < obj->_oldx + obj->_vxPath && (int16)y >= obj->_oldy && (int16)y < obj->_oldy + obj->_vyPath) { // If object is closest so far - if (obj->oldy + obj->vyPath - 1 > (int16)y2Max) { - y2Max = obj->oldy + obj->vyPath - 1; + if (obj->_oldy + obj->_vyPath - 1 > (int16)y2Max) { + y2Max = obj->_oldy + obj->_vyPath - 1; objIndex = i; // Found an object! } } @@ -240,7 +240,7 @@ void ObjectHandler::lookObject(object_t *obj) { // Hero swapped - look at other obj = &_objects[_vm->_heroImage]; - _vm->_parser->command("%s %s", _vm->_text->getVerb(_vm->_look, 0), _vm->_text->getNoun(obj->nounIndex, 0)); + _vm->_parser->command("%s %s", _vm->_text->getVerb(_vm->_look, 0), _vm->_text->getNoun(obj->_nounIndex, 0)); } /** @@ -249,26 +249,26 @@ void ObjectHandler::lookObject(object_t *obj) { void ObjectHandler::freeObjects() { debugC(1, kDebugObject, "freeObjects"); - if (_vm->_hero != 0 && _vm->_hero->seqList[0].seqPtr != 0) { + if (_vm->_hero != 0 && _vm->_hero->_seqList[0]._seqPtr != 0) { // Free all sequence lists and image data for (int16 i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; - for (int16 j = 0; j < obj->seqNumb; j++) { - seq_t *seq = obj->seqList[j].seqPtr; + for (int16 j = 0; j < obj->_seqNumb; j++) { + seq_t *seq = obj->_seqList[j]._seqPtr; seq_t *next; if (seq == 0) // Failure during database load break; - if (seq->imagePtr != 0) { - free(seq->imagePtr); - seq->imagePtr = 0; + if (seq->_imagePtr != 0) { + free(seq->_imagePtr); + seq->_imagePtr = 0; } - seq = seq->nextSeqPtr; - while (seq != obj->seqList[j].seqPtr) { - if (seq->imagePtr != 0) { - free(seq->imagePtr); - seq->imagePtr = 0; + seq = seq->_nextSeqPtr; + while (seq != obj->_seqList[j]._seqPtr) { + if (seq->_imagePtr != 0) { + free(seq->_imagePtr); + seq->_imagePtr = 0; } - next = seq->nextSeqPtr; + next = seq->_nextSeqPtr; free(seq); seq = next; } @@ -279,13 +279,13 @@ void ObjectHandler::freeObjects() { if (_uses) { for (int16 i = 0; i < _usesSize; i++) - free(_uses[i].targets); + free(_uses[i]._targets); free(_uses); } for (int16 i = 0; i < _objCount; i++) { - free(_objects[i].stateDataIndex); - _objects[i].stateDataIndex = 0; + free(_objects[i]._stateDataIndex); + _objects[i]._stateDataIndex = 0; } free(_objects); @@ -307,20 +307,20 @@ int ObjectHandler::y2comp(const void *a, const void *b) { // Why does qsort try the same indexes? return 0; - if (p1->priority == kPriorityBackground) + if (p1->_priority == kPriorityBackground) return -1; - if (p2->priority == kPriorityBackground) + if (p2->_priority == kPriorityBackground) return 1; - if (p1->priority == kPriorityForeground) + if (p1->_priority == kPriorityForeground) return 1; - if (p2->priority == kPriorityForeground) + if (p2->_priority == kPriorityForeground) return -1; - int ay2 = p1->y + p1->currImagePtr->y2; - int by2 = p2->y + p2->currImagePtr->y2; + int ay2 = p1->_y + p1->_currImagePtr->_y2; + int by2 = p2->_y + p2->_currImagePtr->_y2; return ay2 - by2; } @@ -332,7 +332,7 @@ bool ObjectHandler::isCarrying(uint16 wordIndex) { debugC(1, kDebugObject, "isCarrying(%d)", wordIndex); for (int i = 0; i < _numObj; i++) { - if ((wordIndex == _objects[i].nounIndex) && _objects[i].carriedFl) + if ((wordIndex == _objects[i]._nounIndex) && _objects[i]._carriedFl) return true; } return false; @@ -346,10 +346,10 @@ void ObjectHandler::showTakeables() { for (int j = 0; j < _numObj; j++) { object_t *obj = &_objects[j]; - if ((obj->cycling != kCycleInvisible) && - (obj->screenIndex == *_vm->_screen_p) && - (((TAKE & obj->genericCmd) == TAKE) || obj->objValue)) { - Utils::notifyBox(Common::String::format("You can also see:\n%s.", _vm->_text->getNoun(obj->nounIndex, LOOK_NAME))); + if ((obj->_cycling != kCycleInvisible) && + (obj->_screenIndex == *_vm->_screen_p) && + (((TAKE & obj->_genericCmd) == TAKE) || obj->_objValue)) { + Utils::notifyBox(Common::String::format("You can also see:\n%s.", _vm->_text->getNoun(obj->_nounIndex, LOOK_NAME))); } } } @@ -360,19 +360,19 @@ void ObjectHandler::showTakeables() { bool ObjectHandler::findObjectSpace(object_t *obj, int16 *destx, int16 *desty) { debugC(1, kDebugObject, "findObjectSpace(obj, %d, %d)", *destx, *desty); - seq_t *curImage = obj->currImagePtr; - int16 y = obj->y + curImage->y2 - 1; + seq_t *curImage = obj->_currImagePtr; + int16 y = obj->_y + curImage->_y2 - 1; bool foundFl = true; // Try left rear corner - for (int16 x = *destx = obj->x + curImage->x1; x < *destx + kHeroMaxWidth; x++) { + for (int16 x = *destx = obj->_x + curImage->_x1; x < *destx + kHeroMaxWidth; x++) { if (checkBoundary(x, y)) foundFl = false; } if (!foundFl) { // Try right rear corner foundFl = true; - for (int16 x = *destx = obj->x + curImage->x2 - kHeroMaxWidth + 1; x <= obj->x + (int16)curImage->x2; x++) { + for (int16 x = *destx = obj->_x + curImage->_x2 - kHeroMaxWidth + 1; x <= obj->_x + (int16)curImage->_x2; x++) { if (checkBoundary(x, y)) foundFl = false; } @@ -381,7 +381,7 @@ bool ObjectHandler::findObjectSpace(object_t *obj, int16 *destx, int16 *desty) { if (!foundFl) { // Try left front corner foundFl = true; y += 2; - for (int16 x = *destx = obj->x + curImage->x1; x < *destx + kHeroMaxWidth; x++) { + for (int16 x = *destx = obj->_x + curImage->_x1; x < *destx + kHeroMaxWidth; x++) { if (checkBoundary(x, y)) foundFl = false; } @@ -389,7 +389,7 @@ bool ObjectHandler::findObjectSpace(object_t *obj, int16 *destx, int16 *desty) { if (!foundFl) { // Try right rear corner foundFl = true; - for (int16 x = *destx = obj->x + curImage->x2 - kHeroMaxWidth + 1; x <= obj->x + (int16)curImage->x2; x++) { + for (int16 x = *destx = obj->_x + curImage->_x2 - kHeroMaxWidth + 1; x <= obj->_x + (int16)curImage->_x2; x++) { if (checkBoundary(x, y)) foundFl = false; } @@ -400,13 +400,13 @@ bool ObjectHandler::findObjectSpace(object_t *obj, int16 *destx, int16 *desty) { } void ObjectHandler::readUse(Common::ReadStream &in, uses_t &curUse) { - curUse.objId = in.readSint16BE(); - curUse.dataIndex = in.readUint16BE(); + curUse._objId = in.readSint16BE(); + curUse._dataIndex = in.readUint16BE(); uint16 numSubElem = in.readUint16BE(); - curUse.targets = (target_t *)malloc(sizeof(target_t) * numSubElem); + curUse._targets = (target_t *)malloc(sizeof(target_t) * numSubElem); for (int j = 0; j < numSubElem; j++) { - curUse.targets[j].nounIndex = in.readUint16BE(); - curUse.targets[j].verbIndex = in.readUint16BE(); + curUse._targets[j]._nounIndex = in.readUint16BE(); + curUse._targets[j]._verbIndex = in.readUint16BE(); } } /** @@ -414,7 +414,7 @@ void ObjectHandler::readUse(Common::ReadStream &in, uses_t &curUse) { */ void ObjectHandler::loadObjectUses(Common::ReadStream &in) { uses_t tmpUse; - tmpUse.targets = 0; + tmpUse._targets = 0; //Read _uses for (int varnt = 0; varnt < _vm->_numVariant; varnt++) { @@ -429,68 +429,68 @@ void ObjectHandler::loadObjectUses(Common::ReadStream &in) { readUse(in, _uses[i]); else { readUse(in, tmpUse); - free(tmpUse.targets); - tmpUse.targets = 0; + free(tmpUse._targets); + tmpUse._targets = 0; } } } } void ObjectHandler::readObject(Common::ReadStream &in, object_t &curObject) { - curObject.nounIndex = in.readUint16BE(); - curObject.dataIndex = in.readUint16BE(); + curObject._nounIndex = in.readUint16BE(); + curObject._dataIndex = in.readUint16BE(); uint16 numSubElem = in.readUint16BE(); if (numSubElem == 0) - curObject.stateDataIndex = 0; + curObject._stateDataIndex = 0; else - curObject.stateDataIndex = (uint16 *)malloc(sizeof(uint16) * numSubElem); + curObject._stateDataIndex = (uint16 *)malloc(sizeof(uint16) * numSubElem); for (int j = 0; j < numSubElem; j++) - curObject.stateDataIndex[j] = in.readUint16BE(); - - curObject.pathType = (path_t) in.readSint16BE(); - curObject.vxPath = in.readSint16BE(); - curObject.vyPath = in.readSint16BE(); - curObject.actIndex = in.readUint16BE(); - curObject.seqNumb = in.readByte(); - curObject.currImagePtr = 0; - - if (curObject.seqNumb == 0) { - curObject.seqList[0].imageNbr = 0; - curObject.seqList[0].seqPtr = 0; + curObject._stateDataIndex[j] = in.readUint16BE(); + + curObject._pathType = (path_t) in.readSint16BE(); + curObject._vxPath = in.readSint16BE(); + curObject._vyPath = in.readSint16BE(); + curObject._actIndex = in.readUint16BE(); + curObject._seqNumb = in.readByte(); + curObject._currImagePtr = 0; + + if (curObject._seqNumb == 0) { + curObject._seqList[0]._imageNbr = 0; + curObject._seqList[0]._seqPtr = 0; } - for (int j = 0; j < curObject.seqNumb; j++) { - curObject.seqList[j].imageNbr = in.readUint16BE(); - curObject.seqList[j].seqPtr = 0; + for (int j = 0; j < curObject._seqNumb; j++) { + curObject._seqList[j]._imageNbr = in.readUint16BE(); + curObject._seqList[j]._seqPtr = 0; } - curObject.cycling = (cycle_t)in.readByte(); - curObject.cycleNumb = in.readByte(); - curObject.frameInterval = in.readByte(); - curObject.frameTimer = in.readByte(); - curObject.radius = in.readByte(); - curObject.screenIndex = in.readByte(); - curObject.x = in.readSint16BE(); - curObject.y = in.readSint16BE(); - curObject.oldx = in.readSint16BE(); - curObject.oldy = in.readSint16BE(); - curObject.vx = in.readByte(); - curObject.vy = in.readByte(); - curObject.objValue = in.readByte(); - curObject.genericCmd = in.readSint16BE(); - curObject.cmdIndex = in.readUint16BE(); - curObject.carriedFl = (in.readByte() != 0); - curObject.state = in.readByte(); - curObject.verbOnlyFl = (in.readByte() != 0); - curObject.priority = in.readByte(); - curObject.viewx = in.readSint16BE(); - curObject.viewy = in.readSint16BE(); - curObject.direction = in.readSint16BE(); - curObject.curSeqNum = in.readByte(); - curObject.curImageNum = in.readByte(); - curObject.oldvx = in.readByte(); - curObject.oldvy = in.readByte(); + curObject._cycling = (cycle_t)in.readByte(); + curObject._cycleNumb = in.readByte(); + curObject._frameInterval = in.readByte(); + curObject._frameTimer = in.readByte(); + curObject._radius = in.readByte(); + curObject._screenIndex = in.readByte(); + curObject._x = in.readSint16BE(); + curObject._y = in.readSint16BE(); + curObject._oldx = in.readSint16BE(); + curObject._oldy = in.readSint16BE(); + curObject._vx = in.readByte(); + curObject._vy = in.readByte(); + curObject._objValue = in.readByte(); + curObject._genericCmd = in.readSint16BE(); + curObject._cmdIndex = in.readUint16BE(); + curObject._carriedFl = (in.readByte() != 0); + curObject._state = in.readByte(); + curObject._verbOnlyFl = (in.readByte() != 0); + curObject._priority = in.readByte(); + curObject._viewx = in.readSint16BE(); + curObject._viewy = in.readSint16BE(); + curObject._direction = in.readSint16BE(); + curObject._curSeqNum = in.readByte(); + curObject._curImageNum = in.readByte(); + curObject._oldvx = in.readByte(); + curObject._oldvy = in.readByte(); } /** * Load ObjectArr from Hugo.dat @@ -498,7 +498,7 @@ void ObjectHandler::readObject(Common::ReadStream &in, object_t &curObject) { void ObjectHandler::loadObjectArr(Common::ReadStream &in) { debugC(6, kDebugObject, "loadObject(&in)"); object_t tmpObject; - tmpObject.stateDataIndex = 0; + tmpObject._stateDataIndex = 0; for (int varnt = 0; varnt < _vm->_numVariant; varnt++) { uint16 numElem = in.readUint16BE(); @@ -514,8 +514,8 @@ void ObjectHandler::loadObjectArr(Common::ReadStream &in) { else { // Skip over uneeded objects. readObject(in, tmpObject); - free(tmpObject.stateDataIndex); - tmpObject.stateDataIndex = 0; + free(tmpObject._stateDataIndex); + tmpObject._stateDataIndex = 0; } } } @@ -528,7 +528,7 @@ void ObjectHandler::loadObjectArr(Common::ReadStream &in) { void ObjectHandler::setCarriedScreen(int screenNum) { for (int i = kHeroIndex + 1; i < _numObj; i++) {// Any others if (isCarried(i)) // being carried - _objects[i].screenIndex = screenNum; + _objects[i]._screenIndex = screenNum; } } @@ -562,30 +562,30 @@ void ObjectHandler::saveObjects(Common::WriteStream *out) { // Save where curr_seq_p is pointing to saveSeq(&_objects[i]); - out->writeByte(_objects[i].pathType); - out->writeSint16BE(_objects[i].vxPath); - out->writeSint16BE(_objects[i].vyPath); - out->writeByte(_objects[i].cycling); - out->writeByte(_objects[i].cycleNumb); - out->writeByte(_objects[i].frameTimer); - out->writeByte(_objects[i].screenIndex); - out->writeSint16BE(_objects[i].x); - out->writeSint16BE(_objects[i].y); - out->writeSint16BE(_objects[i].oldx); - out->writeSint16BE(_objects[i].oldy); - out->writeSByte(_objects[i].vx); - out->writeSByte(_objects[i].vy); - out->writeByte(_objects[i].objValue); - out->writeByte((_objects[i].carriedFl) ? 1 : 0); - out->writeByte(_objects[i].state); - out->writeByte(_objects[i].priority); - out->writeSint16BE(_objects[i].viewx); - out->writeSint16BE(_objects[i].viewy); - out->writeSint16BE(_objects[i].direction); - out->writeByte(_objects[i].curSeqNum); - out->writeByte(_objects[i].curImageNum); - out->writeSByte(_objects[i].oldvx); - out->writeSByte(_objects[i].oldvy); + out->writeByte(_objects[i]._pathType); + out->writeSint16BE(_objects[i]._vxPath); + out->writeSint16BE(_objects[i]._vyPath); + out->writeByte(_objects[i]._cycling); + out->writeByte(_objects[i]._cycleNumb); + out->writeByte(_objects[i]._frameTimer); + out->writeByte(_objects[i]._screenIndex); + out->writeSint16BE(_objects[i]._x); + out->writeSint16BE(_objects[i]._y); + out->writeSint16BE(_objects[i]._oldx); + out->writeSint16BE(_objects[i]._oldy); + out->writeSByte(_objects[i]._vx); + out->writeSByte(_objects[i]._vy); + out->writeByte(_objects[i]._objValue); + out->writeByte((_objects[i]._carriedFl) ? 1 : 0); + out->writeByte(_objects[i]._state); + out->writeByte(_objects[i]._priority); + out->writeSint16BE(_objects[i]._viewx); + out->writeSint16BE(_objects[i]._viewy); + out->writeSint16BE(_objects[i]._direction); + out->writeByte(_objects[i]._curSeqNum); + out->writeByte(_objects[i]._curImageNum); + out->writeSByte(_objects[i]._oldvx); + out->writeSByte(_objects[i]._oldvy); } } @@ -594,30 +594,30 @@ void ObjectHandler::saveObjects(Common::WriteStream *out) { */ void ObjectHandler::restoreObjects(Common::SeekableReadStream *in) { for (int i = 0; i < _numObj; i++) { - _objects[i].pathType = (path_t) in->readByte(); - _objects[i].vxPath = in->readSint16BE(); - _objects[i].vyPath = in->readSint16BE(); - _objects[i].cycling = (cycle_t) in->readByte(); - _objects[i].cycleNumb = in->readByte(); - _objects[i].frameTimer = in->readByte(); - _objects[i].screenIndex = in->readByte(); - _objects[i].x = in->readSint16BE(); - _objects[i].y = in->readSint16BE(); - _objects[i].oldx = in->readSint16BE(); - _objects[i].oldy = in->readSint16BE(); - _objects[i].vx = in->readSByte(); - _objects[i].vy = in->readSByte(); - _objects[i].objValue = in->readByte(); - _objects[i].carriedFl = (in->readByte() == 1); - _objects[i].state = in->readByte(); - _objects[i].priority = in->readByte(); - _objects[i].viewx = in->readSint16BE(); - _objects[i].viewy = in->readSint16BE(); - _objects[i].direction = in->readSint16BE(); - _objects[i].curSeqNum = in->readByte(); - _objects[i].curImageNum = in->readByte(); - _objects[i].oldvx = in->readSByte(); - _objects[i].oldvy = in->readSByte(); + _objects[i]._pathType = (path_t) in->readByte(); + _objects[i]._vxPath = in->readSint16BE(); + _objects[i]._vyPath = in->readSint16BE(); + _objects[i]._cycling = (cycle_t) in->readByte(); + _objects[i]._cycleNumb = in->readByte(); + _objects[i]._frameTimer = in->readByte(); + _objects[i]._screenIndex = in->readByte(); + _objects[i]._x = in->readSint16BE(); + _objects[i]._y = in->readSint16BE(); + _objects[i]._oldx = in->readSint16BE(); + _objects[i]._oldy = in->readSint16BE(); + _objects[i]._vx = in->readSByte(); + _objects[i]._vy = in->readSByte(); + _objects[i]._objValue = in->readByte(); + _objects[i]._carriedFl = (in->readByte() == 1); + _objects[i]._state = in->readByte(); + _objects[i]._priority = in->readByte(); + _objects[i]._viewx = in->readSint16BE(); + _objects[i]._viewy = in->readSint16BE(); + _objects[i]._direction = in->readSint16BE(); + _objects[i]._curSeqNum = in->readByte(); + _objects[i]._curImageNum = in->readByte(); + _objects[i]._oldvx = in->readSByte(); + _objects[i]._oldvy = in->readSByte(); } } @@ -627,7 +627,7 @@ void ObjectHandler::restoreObjects(Common::SeekableReadStream *in) { int ObjectHandler::calcMaxScore() { int score = 0; for (int i = 0; i < _numObj; i++) - score += _objects[i].objValue; + score += _objects[i]._objValue; return score; } @@ -788,26 +788,26 @@ void ObjectHandler::boundaryCollision(object_t *obj) { if (obj == _vm->_hero) { // Hotspots only relevant to HERO int x; - if (obj->vx > 0) - x = obj->x + obj->currImagePtr->x2; + if (obj->_vx > 0) + x = obj->_x + obj->_currImagePtr->_x2; else - x = obj->x + obj->currImagePtr->x1; - int y = obj->y + obj->currImagePtr->y2; + x = obj->_x + obj->_currImagePtr->_x1; + int y = obj->_y + obj->_currImagePtr->_y2; - int16 index = _vm->_mouse->findExit(x, y, obj->screenIndex); + int16 index = _vm->_mouse->findExit(x, y, obj->_screenIndex); if (index >= 0) _vm->_scheduler->insertActionList(_vm->_mouse->getHotspotActIndex(index)); } else { // Check whether an object collided with HERO - int dx = _vm->_hero->x + _vm->_hero->currImagePtr->x1 - obj->x - obj->currImagePtr->x1; - int dy = _vm->_hero->y + _vm->_hero->currImagePtr->y2 - obj->y - obj->currImagePtr->y2; + int dx = _vm->_hero->_x + _vm->_hero->_currImagePtr->_x1 - obj->_x - obj->_currImagePtr->_x1; + int dy = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2 - obj->_y - obj->_currImagePtr->_y2; // If object's radius is infinity, use a closer value - int8 radius = obj->radius; + int8 radius = obj->_radius; if (radius < 0) radius = kStepDx * 2; if ((abs(dx) <= radius) && (abs(dy) <= radius)) - _vm->_scheduler->insertActionList(obj->actIndex); + _vm->_scheduler->insertActionList(obj->_actIndex); } } diff --git a/engines/hugo/object.h b/engines/hugo/object.h index 84c20db041..8f8043dbbc 100644 --- a/engines/hugo/object.h +++ b/engines/hugo/object.h @@ -35,14 +35,14 @@ namespace Hugo { struct target_t { // Secondary target for action - uint16 nounIndex; // Secondary object - uint16 verbIndex; // Action on secondary object + uint16 _nounIndex; // Secondary object + uint16 _verbIndex; // Action on secondary object }; struct uses_t { // Define uses of certain objects - int16 objId; // Primary object - uint16 dataIndex; // String if no secondary object matches - target_t *targets; // List of secondary targets + int16 _objId; // Primary object + uint16 _dataIndex; // String if no secondary object matches + target_t *_targets; // List of secondary targets }; class ObjectHandler { diff --git a/engines/hugo/object_v1d.cpp b/engines/hugo/object_v1d.cpp index 831dc88dea..7b8f90e189 100644 --- a/engines/hugo/object_v1d.cpp +++ b/engines/hugo/object_v1d.cpp @@ -64,7 +64,7 @@ void ObjectHandler_v1d::updateImages() { for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; - if ((obj->screenIndex == *_vm->_screen_p) && (obj->cycling >= kCycleAlmostInvisible)) + if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling >= kCycleAlmostInvisible)) objindex[num_objs++] = i; } @@ -75,27 +75,27 @@ void ObjectHandler_v1d::updateImages() { for (int i = 0; i < num_objs; i++) { object_t *obj = &_objects[objindex[i]]; // Count down inter-frame timer - if (obj->frameTimer) - obj->frameTimer--; + if (obj->_frameTimer) + obj->_frameTimer--; - if (obj->cycling > kCycleAlmostInvisible) { // Only if visible - switch (obj->cycling) { + if (obj->_cycling > kCycleAlmostInvisible) { // Only if visible + switch (obj->_cycling) { case kCycleNotCycling: - _vm->_screen->displayFrame(obj->x, obj->y, obj->currImagePtr, false); + _vm->_screen->displayFrame(obj->_x, obj->_y, obj->_currImagePtr, false); break; case kCycleForward: - if (obj->frameTimer) // Not time to see next frame yet - _vm->_screen->displayFrame(obj->x, obj->y, obj->currImagePtr, false); + if (obj->_frameTimer) // Not time to see next frame yet + _vm->_screen->displayFrame(obj->_x, obj->_y, obj->_currImagePtr, false); else - _vm->_screen->displayFrame(obj->x, obj->y, obj->currImagePtr->nextSeqPtr, false); + _vm->_screen->displayFrame(obj->_x, obj->_y, obj->_currImagePtr->_nextSeqPtr, false); break; case kCycleBackward: { - seq_t *seqPtr = obj->currImagePtr; - if (!obj->frameTimer) { // Show next frame - while (seqPtr->nextSeqPtr != obj->currImagePtr) - seqPtr = seqPtr->nextSeqPtr; + seq_t *seqPtr = obj->_currImagePtr; + if (!obj->_frameTimer) { // Show next frame + while (seqPtr->_nextSeqPtr != obj->_currImagePtr) + seqPtr = seqPtr->_nextSeqPtr; } - _vm->_screen->displayFrame(obj->x, obj->y, seqPtr, false); + _vm->_screen->displayFrame(obj->_x, obj->_y, seqPtr, false); break; } default: @@ -109,28 +109,28 @@ void ObjectHandler_v1d::updateImages() { // Cycle any animating objects for (int i = 0; i < num_objs; i++) { object_t *obj = &_objects[objindex[i]]; - if (obj->cycling != kCycleInvisible) { + if (obj->_cycling != kCycleInvisible) { // Only if it's visible - if (obj->cycling == kCycleAlmostInvisible) - obj->cycling = kCycleInvisible; + if (obj->_cycling == kCycleAlmostInvisible) + obj->_cycling = kCycleInvisible; // Now Rotate to next picture in sequence - switch (obj->cycling) { + switch (obj->_cycling) { case kCycleNotCycling: break; case kCycleForward: - if (!obj->frameTimer) { + if (!obj->_frameTimer) { // Time to step to next frame - obj->currImagePtr = obj->currImagePtr->nextSeqPtr; + obj->_currImagePtr = obj->_currImagePtr->_nextSeqPtr; // Find out if this is last frame of sequence // If so, reset frame_timer and decrement n_cycle - if (obj->frameInterval || obj->cycleNumb) { - obj->frameTimer = obj->frameInterval; - for (int j = 0; j < obj->seqNumb; j++) { - if (obj->currImagePtr->nextSeqPtr == obj->seqList[j].seqPtr) { - if (obj->cycleNumb) { // Decr cycleNumb if Non-continous - if (!--obj->cycleNumb) - obj->cycling = kCycleNotCycling; + if (obj->_frameInterval || obj->_cycleNumb) { + obj->_frameTimer = obj->_frameInterval; + for (int j = 0; j < obj->_seqNumb; j++) { + if (obj->_currImagePtr->_nextSeqPtr == obj->_seqList[j]._seqPtr) { + if (obj->_cycleNumb) { // Decr cycleNumb if Non-continous + if (!--obj->_cycleNumb) + obj->_cycling = kCycleNotCycling; } } } @@ -138,20 +138,20 @@ void ObjectHandler_v1d::updateImages() { } break; case kCycleBackward: { - if (!obj->frameTimer) { + if (!obj->_frameTimer) { // Time to step to prev frame - seq_t *seqPtr = obj->currImagePtr; - while (obj->currImagePtr->nextSeqPtr != seqPtr) - obj->currImagePtr = obj->currImagePtr->nextSeqPtr; + seq_t *seqPtr = obj->_currImagePtr; + while (obj->_currImagePtr->_nextSeqPtr != seqPtr) + obj->_currImagePtr = obj->_currImagePtr->_nextSeqPtr; // Find out if this is first frame of sequence // If so, reset frame_timer and decrement n_cycle - if (obj->frameInterval || obj->cycleNumb) { - obj->frameTimer = obj->frameInterval; - for (int j = 0; j < obj->seqNumb; j++) { - if (obj->currImagePtr == obj->seqList[j].seqPtr) { - if (obj->cycleNumb){ // Decr cycleNumb if Non-continous - if (!--obj->cycleNumb) - obj->cycling = kCycleNotCycling; + if (obj->_frameInterval || obj->_cycleNumb) { + obj->_frameTimer = obj->_frameInterval; + for (int j = 0; j < obj->_seqNumb; j++) { + if (obj->_currImagePtr == obj->_seqList[j]._seqPtr) { + if (obj->_cycleNumb){ // Decr cycleNumb if Non-continous + if (!--obj->_cycleNumb) + obj->_cycling = kCycleNotCycling; } } } @@ -162,8 +162,8 @@ void ObjectHandler_v1d::updateImages() { default: break; } - obj->oldx = obj->x; - obj->oldy = obj->y; + obj->_oldx = obj->_x; + obj->_oldy = obj->_y; } } } @@ -184,161 +184,161 @@ void ObjectHandler_v1d::moveObjects() { // Don't store foreground or background objects for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->currImagePtr; // Get ptr to current image - if (obj->screenIndex == *_vm->_screen_p) { - switch (obj->pathType) { + seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + if (obj->_screenIndex == *_vm->_screen_p) { + switch (obj->_pathType) { case kPathChase: { // Allowable motion wrt boundary - int dx = _vm->_hero->x + _vm->_hero->currImagePtr->x1 - obj->x - currImage->x1; - int dy = _vm->_hero->y + _vm->_hero->currImagePtr->y2 - obj->y - currImage->y2 - 1; + int dx = _vm->_hero->_x + _vm->_hero->_currImagePtr->_x1 - obj->_x - currImage->_x1; + int dy = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2 - obj->_y - currImage->_y2 - 1; if (abs(dx) <= 1) - obj->vx = 0; + obj->_vx = 0; else - obj->vx = (dx > 0) ? MIN(dx, obj->vxPath) : MAX(dx, -obj->vxPath); + obj->_vx = (dx > 0) ? MIN(dx, obj->_vxPath) : MAX(dx, -obj->_vxPath); if (abs(dy) <= 1) - obj->vy = 0; + obj->_vy = 0; else - obj->vy = (dy > 0) ? MIN(dy, obj->vyPath) : MAX(dy, -obj->vyPath); + obj->_vy = (dy > 0) ? MIN(dy, obj->_vyPath) : MAX(dy, -obj->_vyPath); // Set first image in sequence (if multi-seq object) - if (obj->seqNumb == 4) { - if (!obj->vx) { // Got 4 directions - if (obj->vx != obj->oldvx) {// vx just stopped + if (obj->_seqNumb == 4) { + if (!obj->_vx) { // Got 4 directions + if (obj->_vx != obj->_oldvx) {// vx just stopped if (dy > 0) - obj->currImagePtr = obj->seqList[SEQ_DOWN].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_DOWN]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_UP].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_UP]._seqPtr; } - } else if (obj->vx != obj->oldvx) { + } else if (obj->_vx != obj->_oldvx) { if (dx > 0) - obj->currImagePtr = obj->seqList[SEQ_RIGHT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_LEFT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; } } - if (obj->vx || obj->vy) { - if (obj->seqNumb > 1) - obj->cycling = kCycleForward; + if (obj->_vx || obj->_vy) { + if (obj->_seqNumb > 1) + obj->_cycling = kCycleForward; } else { - obj->cycling = kCycleNotCycling; + obj->_cycling = kCycleNotCycling; boundaryCollision(obj); // Must have got hero! } - obj->oldvx = obj->vx; - obj->oldvy = obj->vy; - currImage = obj->currImagePtr; // Get (new) ptr to current image + obj->_oldvx = obj->_vx; + obj->_oldvy = obj->_vy; + currImage = obj->_currImagePtr; // Get (new) ptr to current image break; } case kPathWander: if (!_vm->_rnd->getRandomNumber(3 * _vm->_normalTPS)) { // Kick on random interval - obj->vx = _vm->_rnd->getRandomNumber(obj->vxPath << 1) - obj->vxPath; - obj->vy = _vm->_rnd->getRandomNumber(obj->vyPath << 1) - obj->vyPath; + obj->_vx = _vm->_rnd->getRandomNumber(obj->_vxPath << 1) - obj->_vxPath; + obj->_vy = _vm->_rnd->getRandomNumber(obj->_vyPath << 1) - obj->_vyPath; // Set first image in sequence (if multi-seq object) - if (obj->seqNumb > 1) { - if (!obj->vx && (obj->seqNumb > 2)) { - if (obj->vx != obj->oldvx) { // vx just stopped - if (obj->vy > 0) - obj->currImagePtr = obj->seqList[SEQ_DOWN].seqPtr; + if (obj->_seqNumb > 1) { + if (!obj->_vx && (obj->_seqNumb > 2)) { + if (obj->_vx != obj->_oldvx) { // vx just stopped + if (obj->_vy > 0) + obj->_currImagePtr = obj->_seqList[SEQ_DOWN]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_UP].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_UP]._seqPtr; } - } else if (obj->vx != obj->oldvx) { - if (obj->vx > 0) - obj->currImagePtr = obj->seqList[SEQ_RIGHT].seqPtr; + } else if (obj->_vx != obj->_oldvx) { + if (obj->_vx > 0) + obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_LEFT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; } - if (obj->vx || obj->vy) - obj->cycling = kCycleForward; + if (obj->_vx || obj->_vy) + obj->_cycling = kCycleForward; else - obj->cycling = kCycleNotCycling; + obj->_cycling = kCycleNotCycling; } - obj->oldvx = obj->vx; - obj->oldvy = obj->vy; - currImage = obj->currImagePtr; // Get (new) ptr to current image + obj->_oldvx = obj->_vx; + obj->_oldvy = obj->_vy; + currImage = obj->_currImagePtr; // Get (new) ptr to current image } break; default: ; // Really, nothing } // Store boundaries - if ((obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) - storeBoundary(obj->x + currImage->x1, obj->x + currImage->x2, obj->y + currImage->y2); + if ((obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) + storeBoundary(obj->_x + currImage->_x1, obj->_x + currImage->_x2, obj->_y + currImage->_y2); } } // Move objects, allowing for boundaries for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; // Get pointer to object - if ((obj->screenIndex == *_vm->_screen_p) && (obj->vx || obj->vy)) { + if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_vx || obj->_vy)) { // Only process if it's moving // Do object movement. Delta_x,y return allowed movement in x,y // to move as close to a boundary as possible without crossing it. - seq_t *currImage = obj->currImagePtr; // Get ptr to current image + seq_t *currImage = obj->_currImagePtr; // Get ptr to current image // object coordinates - int x1 = obj->x + currImage->x1; // Left edge of object - int x2 = obj->x + currImage->x2; // Right edge - int y1 = obj->y + currImage->y1; // Top edge - int y2 = obj->y + currImage->y2; // Bottom edge + int x1 = obj->_x + currImage->_x1; // Left edge of object + int x2 = obj->_x + currImage->_x2; // Right edge + int y1 = obj->_y + currImage->_y1; // Top edge + int y2 = obj->_y + currImage->_y2; // Bottom edge - if ((obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) + if ((obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) clearBoundary(x1, x2, y2); // Clear our own boundary // Allowable motion wrt boundary - int dx = deltaX(x1, x2, obj->vx, y2); - if (dx != obj->vx) { + int dx = deltaX(x1, x2, obj->_vx, y2); + if (dx != obj->_vx) { // An object boundary collision! boundaryCollision(obj); - obj->vx = 0; + obj->_vx = 0; } - int dy = deltaY(x1, x2, obj->vy, y2); - if (dy != obj->vy) { + int dy = deltaY(x1, x2, obj->_vy, y2); + if (dy != obj->_vy) { // An object boundary collision! boundaryCollision(obj); - obj->vy = 0; + obj->_vy = 0; } - if ((obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) + if ((obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) storeBoundary(x1, x2, y2); // Re-store our own boundary - obj->x += dx; // Update object position - obj->y += dy; + obj->_x += dx; // Update object position + obj->_y += dy; // Don't let object go outside screen if (x1 < kEdge) - obj->x = kEdge2; + obj->_x = kEdge2; if (x2 > (kXPix - kEdge)) - obj->x = kXPix - kEdge2 - (x2 - x1); + obj->_x = kXPix - kEdge2 - (x2 - x1); if (y1 < kEdge) - obj->y = kEdge2; + obj->_y = kEdge2; if (y2 > (kYPix - kEdge)) - obj->y = kYPix - kEdge2 - (y2 - y1); + obj->_y = kYPix - kEdge2 - (y2 - y1); - if ((obj->vx == 0) && (obj->vy == 0)) - obj->cycling = kCycleNotCycling; + if ((obj->_vx == 0) && (obj->_vy == 0)) + obj->_cycling = kCycleNotCycling; } } // Clear all object baselines from the boundary file. for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->currImagePtr; // Get ptr to current image - if ((obj->screenIndex == *_vm->_screen_p) && (obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) - clearBoundary(obj->oldx + currImage->x1, obj->oldx + currImage->x2, obj->oldy + currImage->y2); + seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) + clearBoundary(obj->_oldx + currImage->_x1, obj->_oldx + currImage->_x2, obj->_oldy + currImage->_y2); } // If maze mode is enabled, do special maze processing - if (_vm->_maze.enabledFl) { - seq_t *currImage = _vm->_hero->currImagePtr;// Get ptr to current image + if (_vm->_maze._enabledFl) { + seq_t *currImage = _vm->_hero->_currImagePtr;// Get ptr to current image // hero coordinates - int x1 = _vm->_hero->x + currImage->x1; // Left edge of object - int x2 = _vm->_hero->x + currImage->x2; // Right edge - int y1 = _vm->_hero->y + currImage->y1; // Top edge - int y2 = _vm->_hero->y + currImage->y2; // Bottom edge + int x1 = _vm->_hero->_x + currImage->_x1; // Left edge of object + int x2 = _vm->_hero->_x + currImage->_x2; // Right edge + int y1 = _vm->_hero->_y + currImage->_y1; // Top edge + int y2 = _vm->_hero->_y + currImage->_y2; // Bottom edge _vm->_scheduler->processMaze(x1, x2, y1, y2); } @@ -355,11 +355,11 @@ void ObjectHandler_v1d::swapImages(int objIndex1, int objIndex2) { seqList_t tmpSeqList[kMaxSeqNumb]; int seqListSize = sizeof(seqList_t) * kMaxSeqNumb; - memmove(tmpSeqList, _objects[objIndex1].seqList, seqListSize); - memmove(_objects[objIndex1].seqList, _objects[objIndex2].seqList, seqListSize); - memmove(_objects[objIndex2].seqList, tmpSeqList, seqListSize); - _objects[objIndex1].currImagePtr = _objects[objIndex1].seqList[0].seqPtr; - _objects[objIndex2].currImagePtr = _objects[objIndex2].seqList[0].seqPtr; + memmove(tmpSeqList, _objects[objIndex1]._seqList, seqListSize); + memmove(_objects[objIndex1]._seqList, _objects[objIndex2]._seqList, seqListSize); + memmove(_objects[objIndex2]._seqList, tmpSeqList, seqListSize); + _objects[objIndex1]._currImagePtr = _objects[objIndex1]._seqList[0]._seqPtr; + _objects[objIndex2]._currImagePtr = _objects[objIndex2]._seqList[0]._seqPtr; _vm->_heroImage = (_vm->_heroImage == kHeroIndex) ? objIndex2 : kHeroIndex; } @@ -367,9 +367,9 @@ void ObjectHandler_v1d::homeIn(int objIndex1, const int objIndex2, const int8 ob // object obj1 will home in on object obj2 object_t *obj1 = &_objects[objIndex1]; object_t *obj2 = &_objects[objIndex2]; - obj1->pathType = kPathAuto; - int dx = obj1->x + obj1->currImagePtr->x1 - obj2->x - obj2->currImagePtr->x1; - int dy = obj1->y + obj1->currImagePtr->y1 - obj2->y - obj2->currImagePtr->y1; + obj1->_pathType = kPathAuto; + int dx = obj1->_x + obj1->_currImagePtr->_x1 - obj2->_x - obj2->_currImagePtr->_x1; + int dy = obj1->_y + obj1->_currImagePtr->_y1 - obj2->_y - obj2->_currImagePtr->_y1; if (dx == 0) // Don't EVER divide by zero! dx = 1; @@ -377,11 +377,11 @@ void ObjectHandler_v1d::homeIn(int objIndex1, const int objIndex2, const int8 ob dy = 1; if (abs(dx) > abs(dy)) { - obj1->vx = objDx * -sign(dx); - obj1->vy = abs((objDy * dy) / dx) * -sign(dy); + obj1->_vx = objDx * -sign(dx); + obj1->_vy = abs((objDy * dy) / dx) * -sign(dy); } else { - obj1->vy = objDy * sign(dy); - obj1->vx = abs((objDx * dx) / dy) * sign(dx); + obj1->_vy = objDy * sign(dy); + obj1->_vx = abs((objDx * dx) / dy) * sign(dx); } } } // End of namespace Hugo diff --git a/engines/hugo/object_v1w.cpp b/engines/hugo/object_v1w.cpp index 4388ef5520..dd3de5fe40 100644 --- a/engines/hugo/object_v1w.cpp +++ b/engines/hugo/object_v1w.cpp @@ -64,7 +64,7 @@ void ObjectHandler_v1w::updateImages() { for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; - if ((obj->screenIndex == *_vm->_screen_p) && (obj->cycling >= kCycleAlmostInvisible)) + if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling >= kCycleAlmostInvisible)) objindex[num_objs++] = i; } @@ -75,27 +75,27 @@ void ObjectHandler_v1w::updateImages() { for (int i = 0; i < num_objs; i++) { object_t *obj = &_objects[objindex[i]]; // Count down inter-frame timer - if (obj->frameTimer) - obj->frameTimer--; + if (obj->_frameTimer) + obj->_frameTimer--; - if (obj->cycling > kCycleAlmostInvisible) { // Only if visible - switch (obj->cycling) { + if (obj->_cycling > kCycleAlmostInvisible) { // Only if visible + switch (obj->_cycling) { case kCycleNotCycling: - _vm->_screen->displayFrame(obj->x, obj->y, obj->currImagePtr, obj->priority == kPriorityOverOverlay); + _vm->_screen->displayFrame(obj->_x, obj->_y, obj->_currImagePtr, obj->_priority == kPriorityOverOverlay); break; case kCycleForward: - if (obj->frameTimer) // Not time to see next frame yet - _vm->_screen->displayFrame(obj->x, obj->y, obj->currImagePtr, obj->priority == kPriorityOverOverlay); + if (obj->_frameTimer) // Not time to see next frame yet + _vm->_screen->displayFrame(obj->_x, obj->_y, obj->_currImagePtr, obj->_priority == kPriorityOverOverlay); else - _vm->_screen->displayFrame(obj->x, obj->y, obj->currImagePtr->nextSeqPtr, obj->priority == kPriorityOverOverlay); + _vm->_screen->displayFrame(obj->_x, obj->_y, obj->_currImagePtr->_nextSeqPtr, obj->_priority == kPriorityOverOverlay); break; case kCycleBackward: { - seq_t *seqPtr = obj->currImagePtr; - if (!obj->frameTimer) { // Show next frame - while (seqPtr->nextSeqPtr != obj->currImagePtr) - seqPtr = seqPtr->nextSeqPtr; + seq_t *seqPtr = obj->_currImagePtr; + if (!obj->_frameTimer) { // Show next frame + while (seqPtr->_nextSeqPtr != obj->_currImagePtr) + seqPtr = seqPtr->_nextSeqPtr; } - _vm->_screen->displayFrame(obj->x, obj->y, seqPtr, obj->priority == kPriorityOverOverlay); + _vm->_screen->displayFrame(obj->_x, obj->_y, seqPtr, obj->_priority == kPriorityOverOverlay); break; } default: @@ -107,28 +107,28 @@ void ObjectHandler_v1w::updateImages() { // Cycle any animating objects for (int i = 0; i < num_objs; i++) { object_t *obj = &_objects[objindex[i]]; - if (obj->cycling != kCycleInvisible) { + if (obj->_cycling != kCycleInvisible) { // Only if it's visible - if (obj->cycling == kCycleAlmostInvisible) - obj->cycling = kCycleInvisible; + if (obj->_cycling == kCycleAlmostInvisible) + obj->_cycling = kCycleInvisible; // Now Rotate to next picture in sequence - switch (obj->cycling) { + switch (obj->_cycling) { case kCycleNotCycling: break; case kCycleForward: - if (!obj->frameTimer) { + if (!obj->_frameTimer) { // Time to step to next frame - obj->currImagePtr = obj->currImagePtr->nextSeqPtr; + obj->_currImagePtr = obj->_currImagePtr->_nextSeqPtr; // Find out if this is last frame of sequence // If so, reset frame_timer and decrement n_cycle - if (obj->frameInterval || obj->cycleNumb) { - obj->frameTimer = obj->frameInterval; - for (int j = 0; j < obj->seqNumb; j++) { - if (obj->currImagePtr->nextSeqPtr == obj->seqList[j].seqPtr) { - if (obj->cycleNumb) { // Decr cycleNumb if Non-continous - if (!--obj->cycleNumb) - obj->cycling = kCycleNotCycling; + if (obj->_frameInterval || obj->_cycleNumb) { + obj->_frameTimer = obj->_frameInterval; + for (int j = 0; j < obj->_seqNumb; j++) { + if (obj->_currImagePtr->_nextSeqPtr == obj->_seqList[j]._seqPtr) { + if (obj->_cycleNumb) { // Decr cycleNumb if Non-continous + if (!--obj->_cycleNumb) + obj->_cycling = kCycleNotCycling; } } } @@ -136,20 +136,20 @@ void ObjectHandler_v1w::updateImages() { } break; case kCycleBackward: { - if (!obj->frameTimer) { + if (!obj->_frameTimer) { // Time to step to prev frame - seq_t *seqPtr = obj->currImagePtr; - while (obj->currImagePtr->nextSeqPtr != seqPtr) - obj->currImagePtr = obj->currImagePtr->nextSeqPtr; + seq_t *seqPtr = obj->_currImagePtr; + while (obj->_currImagePtr->_nextSeqPtr != seqPtr) + obj->_currImagePtr = obj->_currImagePtr->_nextSeqPtr; // Find out if this is first frame of sequence // If so, reset frame_timer and decrement n_cycle - if (obj->frameInterval || obj->cycleNumb) { - obj->frameTimer = obj->frameInterval; - for (int j = 0; j < obj->seqNumb; j++) { - if (obj->currImagePtr == obj->seqList[j].seqPtr) { - if (obj->cycleNumb){ // Decr cycleNumb if Non-continous - if (!--obj->cycleNumb) - obj->cycling = kCycleNotCycling; + if (obj->_frameInterval || obj->_cycleNumb) { + obj->_frameTimer = obj->_frameInterval; + for (int j = 0; j < obj->_seqNumb; j++) { + if (obj->_currImagePtr == obj->_seqList[j]._seqPtr) { + if (obj->_cycleNumb){ // Decr cycleNumb if Non-continous + if (!--obj->_cycleNumb) + obj->_cycling = kCycleNotCycling; } } } @@ -160,8 +160,8 @@ void ObjectHandler_v1w::updateImages() { default: break; } - obj->oldx = obj->x; - obj->oldy = obj->y; + obj->_oldx = obj->_x; + obj->_oldy = obj->_y; } } } @@ -181,174 +181,174 @@ void ObjectHandler_v1w::moveObjects() { // Don't store foreground or background objects for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->currImagePtr; // Get ptr to current image - if (obj->screenIndex == *_vm->_screen_p) { - switch (obj->pathType) { + seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + if (obj->_screenIndex == *_vm->_screen_p) { + switch (obj->_pathType) { case kPathChase: case kPathChase2: { - int8 radius = obj->radius; // Default to object's radius + int8 radius = obj->_radius; // Default to object's radius if (radius < 0) // If radius infinity, use closer value radius = kStepDx; // Allowable motion wrt boundary - int dx = _vm->_hero->x + _vm->_hero->currImagePtr->x1 - obj->x - currImage->x1; - int dy = _vm->_hero->y + _vm->_hero->currImagePtr->y2 - obj->y - currImage->y2 - 1; + int dx = _vm->_hero->_x + _vm->_hero->_currImagePtr->_x1 - obj->_x - currImage->_x1; + int dy = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2 - obj->_y - currImage->_y2 - 1; if (abs(dx) <= radius) - obj->vx = 0; + obj->_vx = 0; else - obj->vx = (dx > 0) ? MIN(dx, obj->vxPath) : MAX(dx, -obj->vxPath); + obj->_vx = (dx > 0) ? MIN(dx, obj->_vxPath) : MAX(dx, -obj->_vxPath); if (abs(dy) <= radius) - obj->vy = 0; + obj->_vy = 0; else - obj->vy = (dy > 0) ? MIN(dy, obj->vyPath) : MAX(dy, -obj->vyPath); + obj->_vy = (dy > 0) ? MIN(dy, obj->_vyPath) : MAX(dy, -obj->_vyPath); // Set first image in sequence (if multi-seq object) - switch (obj->seqNumb) { + switch (obj->_seqNumb) { case 4: - if (!obj->vx) { // Got 4 directions - if (obj->vx != obj->oldvx) { // vx just stopped + if (!obj->_vx) { // Got 4 directions + if (obj->_vx != obj->_oldvx) { // vx just stopped if (dy >= 0) - obj->currImagePtr = obj->seqList[SEQ_DOWN].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_DOWN]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_UP].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_UP]._seqPtr; } - } else if (obj->vx != obj->oldvx) { + } else if (obj->_vx != obj->_oldvx) { if (dx > 0) - obj->currImagePtr = obj->seqList[SEQ_RIGHT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_LEFT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; } break; case 3: case 2: - if (obj->vx != obj->oldvx) { // vx just stopped + if (obj->_vx != obj->_oldvx) { // vx just stopped if (dx > 0) // Left & right only - obj->currImagePtr = obj->seqList[SEQ_RIGHT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_LEFT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; } break; } - if (obj->vx || obj->vy) { - obj->cycling = kCycleForward; + if (obj->_vx || obj->_vy) { + obj->_cycling = kCycleForward; } else { - obj->cycling = kCycleNotCycling; + obj->_cycling = kCycleNotCycling; boundaryCollision(obj); // Must have got hero! } - obj->oldvx = obj->vx; - obj->oldvy = obj->vy; - currImage = obj->currImagePtr; // Get (new) ptr to current image + obj->_oldvx = obj->_vx; + obj->_oldvy = obj->_vy; + currImage = obj->_currImagePtr; // Get (new) ptr to current image break; } case kPathWander2: case kPathWander: if (!_vm->_rnd->getRandomNumber(3 * _vm->_normalTPS)) { // Kick on random interval - obj->vx = _vm->_rnd->getRandomNumber(obj->vxPath << 1) - obj->vxPath; - obj->vy = _vm->_rnd->getRandomNumber(obj->vyPath << 1) - obj->vyPath; + obj->_vx = _vm->_rnd->getRandomNumber(obj->_vxPath << 1) - obj->_vxPath; + obj->_vy = _vm->_rnd->getRandomNumber(obj->_vyPath << 1) - obj->_vyPath; // Set first image in sequence (if multi-seq object) - if (obj->seqNumb > 1) { - if (!obj->vx && (obj->seqNumb >= 4)) { - if (obj->vx != obj->oldvx) { // vx just stopped - if (obj->vy > 0) - obj->currImagePtr = obj->seqList[SEQ_DOWN].seqPtr; + if (obj->_seqNumb > 1) { + if (!obj->_vx && (obj->_seqNumb >= 4)) { + if (obj->_vx != obj->_oldvx) { // vx just stopped + if (obj->_vy > 0) + obj->_currImagePtr = obj->_seqList[SEQ_DOWN]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_UP].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_UP]._seqPtr; } - } else if (obj->vx != obj->oldvx) { - if (obj->vx > 0) - obj->currImagePtr = obj->seqList[SEQ_RIGHT].seqPtr; + } else if (obj->_vx != obj->_oldvx) { + if (obj->_vx > 0) + obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_LEFT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; } } - obj->oldvx = obj->vx; - obj->oldvy = obj->vy; - currImage = obj->currImagePtr; // Get (new) ptr to current image + obj->_oldvx = obj->_vx; + obj->_oldvy = obj->_vy; + currImage = obj->_currImagePtr; // Get (new) ptr to current image } - if (obj->vx || obj->vy) - obj->cycling = kCycleForward; + if (obj->_vx || obj->_vy) + obj->_cycling = kCycleForward; break; default: ; // Really, nothing } // Store boundaries - if ((obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) - storeBoundary(obj->x + currImage->x1, obj->x + currImage->x2, obj->y + currImage->y2); + if ((obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) + storeBoundary(obj->_x + currImage->_x1, obj->_x + currImage->_x2, obj->_y + currImage->_y2); } } // Move objects, allowing for boundaries for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; // Get pointer to object - if ((obj->screenIndex == *_vm->_screen_p) && (obj->vx || obj->vy)) { + if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_vx || obj->_vy)) { // Only process if it's moving // Do object movement. Delta_x,y return allowed movement in x,y // to move as close to a boundary as possible without crossing it. - seq_t *currImage = obj->currImagePtr; // Get ptr to current image + seq_t *currImage = obj->_currImagePtr; // Get ptr to current image // object coordinates - int x1 = obj->x + currImage->x1; // Left edge of object - int x2 = obj->x + currImage->x2; // Right edge - int y1 = obj->y + currImage->y1; // Top edge - int y2 = obj->y + currImage->y2; // Bottom edge + int x1 = obj->_x + currImage->_x1; // Left edge of object + int x2 = obj->_x + currImage->_x2; // Right edge + int y1 = obj->_y + currImage->_y1; // Top edge + int y2 = obj->_y + currImage->_y2; // Bottom edge - if ((obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) + if ((obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) clearBoundary(x1, x2, y2); // Clear our own boundary // Allowable motion wrt boundary - int dx = deltaX(x1, x2, obj->vx, y2); - if (dx != obj->vx) { + int dx = deltaX(x1, x2, obj->_vx, y2); + if (dx != obj->_vx) { // An object boundary collision! boundaryCollision(obj); - obj->vx = 0; + obj->_vx = 0; } - int dy = deltaY(x1, x2, obj->vy, y2); - if (dy != obj->vy) { + int dy = deltaY(x1, x2, obj->_vy, y2); + if (dy != obj->_vy) { // An object boundary collision! boundaryCollision(obj); - obj->vy = 0; + obj->_vy = 0; } - if ((obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) + if ((obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) storeBoundary(x1, x2, y2); // Re-store our own boundary - obj->x += dx; // Update object position - obj->y += dy; + obj->_x += dx; // Update object position + obj->_y += dy; // Don't let object go outside screen if (x1 < kEdge) - obj->x = kEdge2; + obj->_x = kEdge2; if (x2 > (kXPix - kEdge)) - obj->x = kXPix - kEdge2 - (x2 - x1); + obj->_x = kXPix - kEdge2 - (x2 - x1); if (y1 < kEdge) - obj->y = kEdge2; + obj->_y = kEdge2; if (y2 > (kYPix - kEdge)) - obj->y = kYPix - kEdge2 - (y2 - y1); + obj->_y = kYPix - kEdge2 - (y2 - y1); - if ((obj->vx == 0) && (obj->vy == 0) && (obj->pathType != kPathWander2) && (obj->pathType != kPathChase2)) - obj->cycling = kCycleNotCycling; + if ((obj->_vx == 0) && (obj->_vy == 0) && (obj->_pathType != kPathWander2) && (obj->_pathType != kPathChase2)) + obj->_cycling = kCycleNotCycling; } } // Clear all object baselines from the boundary file. for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->currImagePtr; // Get ptr to current image - if ((obj->screenIndex == *_vm->_screen_p) && (obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) - clearBoundary(obj->oldx + currImage->x1, obj->oldx + currImage->x2, obj->oldy + currImage->y2); + seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) + clearBoundary(obj->_oldx + currImage->_x1, obj->_oldx + currImage->_x2, obj->_oldy + currImage->_y2); } // If maze mode is enabled, do special maze processing - if (_vm->_maze.enabledFl) { - seq_t *currImage = _vm->_hero->currImagePtr; // Get ptr to current image + if (_vm->_maze._enabledFl) { + seq_t *currImage = _vm->_hero->_currImagePtr; // Get ptr to current image // hero coordinates - int x1 = _vm->_hero->x + currImage->x1; // Left edge of object - int x2 = _vm->_hero->x + currImage->x2; // Right edge - int y1 = _vm->_hero->y + currImage->y1; // Top edge - int y2 = _vm->_hero->y + currImage->y2; // Bottom edge + int x1 = _vm->_hero->_x + currImage->_x1; // Left edge of object + int x2 = _vm->_hero->_x + currImage->_x2; // Right edge + int y1 = _vm->_hero->_y + currImage->_y1; // Top edge + int y2 = _vm->_hero->_y + currImage->_y2; // Bottom edge _vm->_scheduler->processMaze(x1, x2, y1, y2); } @@ -367,15 +367,15 @@ void ObjectHandler_v1w::swapImages(int objIndex1, int objIndex2) { seqList_t tmpSeqList[kMaxSeqNumb]; int seqListSize = sizeof(seqList_t) * kMaxSeqNumb; - memmove(tmpSeqList, _objects[objIndex1].seqList, seqListSize); - memmove(_objects[objIndex1].seqList, _objects[objIndex2].seqList, seqListSize); - memmove(_objects[objIndex2].seqList, tmpSeqList, seqListSize); + memmove(tmpSeqList, _objects[objIndex1]._seqList, seqListSize); + memmove(_objects[objIndex1]._seqList, _objects[objIndex2]._seqList, seqListSize); + memmove(_objects[objIndex2]._seqList, tmpSeqList, seqListSize); restoreSeq(&_objects[objIndex1]); - _objects[objIndex2].currImagePtr = _objects[objIndex2].seqList[0].seqPtr; + _objects[objIndex2]._currImagePtr = _objects[objIndex2]._seqList[0]._seqPtr; _vm->_heroImage = (_vm->_heroImage == kHeroIndex) ? objIndex2 : kHeroIndex; // Make sure baseline stays constant - _objects[objIndex1].y += _objects[objIndex2].currImagePtr->y2 - _objects[objIndex1].currImagePtr->y2; + _objects[objIndex1]._y += _objects[objIndex2]._currImagePtr->_y2 - _objects[objIndex1]._currImagePtr->_y2; } } // End of namespace Hugo diff --git a/engines/hugo/object_v2d.cpp b/engines/hugo/object_v2d.cpp index 4a22fab2c0..025374521c 100644 --- a/engines/hugo/object_v2d.cpp +++ b/engines/hugo/object_v2d.cpp @@ -64,7 +64,7 @@ void ObjectHandler_v2d::updateImages() { for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; - if ((obj->screenIndex == *_vm->_screen_p) && (obj->cycling >= kCycleAlmostInvisible)) + if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling >= kCycleAlmostInvisible)) objindex[num_objs++] = i; } @@ -75,27 +75,27 @@ void ObjectHandler_v2d::updateImages() { for (int i = 0; i < num_objs; i++) { object_t *obj = &_objects[objindex[i]]; // Count down inter-frame timer - if (obj->frameTimer) - obj->frameTimer--; + if (obj->_frameTimer) + obj->_frameTimer--; - if (obj->cycling > kCycleAlmostInvisible) { // Only if visible - switch (obj->cycling) { + if (obj->_cycling > kCycleAlmostInvisible) { // Only if visible + switch (obj->_cycling) { case kCycleNotCycling: - _vm->_screen->displayFrame(obj->x, obj->y, obj->currImagePtr, obj->priority == kPriorityOverOverlay); + _vm->_screen->displayFrame(obj->_x, obj->_y, obj->_currImagePtr, obj->_priority == kPriorityOverOverlay); break; case kCycleForward: - if (obj->frameTimer) // Not time to see next frame yet - _vm->_screen->displayFrame(obj->x, obj->y, obj->currImagePtr, obj->priority == kPriorityOverOverlay); + if (obj->_frameTimer) // Not time to see next frame yet + _vm->_screen->displayFrame(obj->_x, obj->_y, obj->_currImagePtr, obj->_priority == kPriorityOverOverlay); else - _vm->_screen->displayFrame(obj->x, obj->y, obj->currImagePtr->nextSeqPtr, obj->priority == kPriorityOverOverlay); + _vm->_screen->displayFrame(obj->_x, obj->_y, obj->_currImagePtr->_nextSeqPtr, obj->_priority == kPriorityOverOverlay); break; case kCycleBackward: { - seq_t *seqPtr = obj->currImagePtr; - if (!obj->frameTimer) { // Show next frame - while (seqPtr->nextSeqPtr != obj->currImagePtr) - seqPtr = seqPtr->nextSeqPtr; + seq_t *seqPtr = obj->_currImagePtr; + if (!obj->_frameTimer) { // Show next frame + while (seqPtr->_nextSeqPtr != obj->_currImagePtr) + seqPtr = seqPtr->_nextSeqPtr; } - _vm->_screen->displayFrame(obj->x, obj->y, seqPtr, obj->priority == kPriorityOverOverlay); + _vm->_screen->displayFrame(obj->_x, obj->_y, seqPtr, obj->_priority == kPriorityOverOverlay); break; } default: @@ -109,28 +109,28 @@ void ObjectHandler_v2d::updateImages() { // Cycle any animating objects for (int i = 0; i < num_objs; i++) { object_t *obj = &_objects[objindex[i]]; - if (obj->cycling != kCycleInvisible) { + if (obj->_cycling != kCycleInvisible) { // Only if it's visible - if (obj->cycling == kCycleAlmostInvisible) - obj->cycling = kCycleInvisible; + if (obj->_cycling == kCycleAlmostInvisible) + obj->_cycling = kCycleInvisible; // Now Rotate to next picture in sequence - switch (obj->cycling) { + switch (obj->_cycling) { case kCycleNotCycling: break; case kCycleForward: - if (!obj->frameTimer) { + if (!obj->_frameTimer) { // Time to step to next frame - obj->currImagePtr = obj->currImagePtr->nextSeqPtr; + obj->_currImagePtr = obj->_currImagePtr->_nextSeqPtr; // Find out if this is last frame of sequence // If so, reset frame_timer and decrement n_cycle - if (obj->frameInterval || obj->cycleNumb) { - obj->frameTimer = obj->frameInterval; - for (int j = 0; j < obj->seqNumb; j++) { - if (obj->currImagePtr->nextSeqPtr == obj->seqList[j].seqPtr) { - if (obj->cycleNumb) { // Decr cycleNumb if Non-continous - if (!--obj->cycleNumb) - obj->cycling = kCycleNotCycling; + if (obj->_frameInterval || obj->_cycleNumb) { + obj->_frameTimer = obj->_frameInterval; + for (int j = 0; j < obj->_seqNumb; j++) { + if (obj->_currImagePtr->_nextSeqPtr == obj->_seqList[j]._seqPtr) { + if (obj->_cycleNumb) { // Decr cycleNumb if Non-continous + if (!--obj->_cycleNumb) + obj->_cycling = kCycleNotCycling; } } } @@ -138,20 +138,20 @@ void ObjectHandler_v2d::updateImages() { } break; case kCycleBackward: { - if (!obj->frameTimer) { + if (!obj->_frameTimer) { // Time to step to prev frame - seq_t *seqPtr = obj->currImagePtr; - while (obj->currImagePtr->nextSeqPtr != seqPtr) - obj->currImagePtr = obj->currImagePtr->nextSeqPtr; + seq_t *seqPtr = obj->_currImagePtr; + while (obj->_currImagePtr->_nextSeqPtr != seqPtr) + obj->_currImagePtr = obj->_currImagePtr->_nextSeqPtr; // Find out if this is first frame of sequence // If so, reset frame_timer and decrement n_cycle - if (obj->frameInterval || obj->cycleNumb) { - obj->frameTimer = obj->frameInterval; - for (int j = 0; j < obj->seqNumb; j++) { - if (obj->currImagePtr == obj->seqList[j].seqPtr) { - if (obj->cycleNumb){ // Decr cycleNumb if Non-continous - if (!--obj->cycleNumb) - obj->cycling = kCycleNotCycling; + if (obj->_frameInterval || obj->_cycleNumb) { + obj->_frameTimer = obj->_frameInterval; + for (int j = 0; j < obj->_seqNumb; j++) { + if (obj->_currImagePtr == obj->_seqList[j]._seqPtr) { + if (obj->_cycleNumb){ // Decr cycleNumb if Non-continous + if (!--obj->_cycleNumb) + obj->_cycling = kCycleNotCycling; } } } @@ -162,8 +162,8 @@ void ObjectHandler_v2d::updateImages() { default: break; } - obj->oldx = obj->x; - obj->oldy = obj->y; + obj->_oldx = obj->_x; + obj->_oldy = obj->_y; } } } @@ -184,174 +184,174 @@ void ObjectHandler_v2d::moveObjects() { // Don't store foreground or background objects for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->currImagePtr; // Get ptr to current image - if (obj->screenIndex == *_vm->_screen_p) { - switch (obj->pathType) { + seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + if (obj->_screenIndex == *_vm->_screen_p) { + switch (obj->_pathType) { case kPathChase: case kPathChase2: { - int8 radius = obj->radius; // Default to object's radius + int8 radius = obj->_radius; // Default to object's radius if (radius < 0) // If radius infinity, use closer value radius = kStepDx; // Allowable motion wrt boundary - int dx = _vm->_hero->x + _vm->_hero->currImagePtr->x1 - obj->x - currImage->x1; - int dy = _vm->_hero->y + _vm->_hero->currImagePtr->y2 - obj->y - currImage->y2 - 1; + int dx = _vm->_hero->_x + _vm->_hero->_currImagePtr->_x1 - obj->_x - currImage->_x1; + int dy = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2 - obj->_y - currImage->_y2 - 1; if (abs(dx) <= radius) - obj->vx = 0; + obj->_vx = 0; else - obj->vx = (dx > 0) ? MIN(dx, obj->vxPath) : MAX(dx, -obj->vxPath); + obj->_vx = (dx > 0) ? MIN(dx, obj->_vxPath) : MAX(dx, -obj->_vxPath); if (abs(dy) <= radius) - obj->vy = 0; + obj->_vy = 0; else - obj->vy = (dy > 0) ? MIN(dy, obj->vyPath) : MAX(dy, -obj->vyPath); + obj->_vy = (dy > 0) ? MIN(dy, obj->_vyPath) : MAX(dy, -obj->_vyPath); // Set first image in sequence (if multi-seq object) - switch (obj->seqNumb) { + switch (obj->_seqNumb) { case 4: - if (!obj->vx) { // Got 4 directions - if (obj->vx != obj->oldvx) { // vx just stopped + if (!obj->_vx) { // Got 4 directions + if (obj->_vx != obj->_oldvx) { // vx just stopped if (dy > 0) - obj->currImagePtr = obj->seqList[SEQ_DOWN].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_DOWN]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_UP].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_UP]._seqPtr; } - } else if (obj->vx != obj->oldvx) { + } else if (obj->_vx != obj->_oldvx) { if (dx > 0) - obj->currImagePtr = obj->seqList[SEQ_RIGHT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_LEFT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; } break; case 3: case 2: - if (obj->vx != obj->oldvx) { // vx just stopped + if (obj->_vx != obj->_oldvx) { // vx just stopped if (dx > 0) // Left & right only - obj->currImagePtr = obj->seqList[SEQ_RIGHT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_LEFT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; } break; } - if (obj->vx || obj->vy) { - obj->cycling = kCycleForward; + if (obj->_vx || obj->_vy) { + obj->_cycling = kCycleForward; } else { - obj->cycling = kCycleNotCycling; + obj->_cycling = kCycleNotCycling; boundaryCollision(obj); // Must have got hero! } - obj->oldvx = obj->vx; - obj->oldvy = obj->vy; - currImage = obj->currImagePtr; // Get (new) ptr to current image + obj->_oldvx = obj->_vx; + obj->_oldvy = obj->_vy; + currImage = obj->_currImagePtr; // Get (new) ptr to current image break; } case kPathWander2: case kPathWander: if (!_vm->_rnd->getRandomNumber(3 * _vm->_normalTPS)) { // Kick on random interval - obj->vx = _vm->_rnd->getRandomNumber(obj->vxPath << 1) - obj->vxPath; - obj->vy = _vm->_rnd->getRandomNumber(obj->vyPath << 1) - obj->vyPath; + obj->_vx = _vm->_rnd->getRandomNumber(obj->_vxPath << 1) - obj->_vxPath; + obj->_vy = _vm->_rnd->getRandomNumber(obj->_vyPath << 1) - obj->_vyPath; // Set first image in sequence (if multi-seq object) - if (obj->seqNumb > 1) { - if (!obj->vx && (obj->seqNumb >= 4)) { - if (obj->vx != obj->oldvx) { // vx just stopped - if (obj->vy > 0) - obj->currImagePtr = obj->seqList[SEQ_DOWN].seqPtr; + if (obj->_seqNumb > 1) { + if (!obj->_vx && (obj->_seqNumb >= 4)) { + if (obj->_vx != obj->_oldvx) { // vx just stopped + if (obj->_vy > 0) + obj->_currImagePtr = obj->_seqList[SEQ_DOWN]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_UP].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_UP]._seqPtr; } - } else if (obj->vx != obj->oldvx) { - if (obj->vx > 0) - obj->currImagePtr = obj->seqList[SEQ_RIGHT].seqPtr; + } else if (obj->_vx != obj->_oldvx) { + if (obj->_vx > 0) + obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_LEFT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; } } - obj->oldvx = obj->vx; - obj->oldvy = obj->vy; - currImage = obj->currImagePtr; // Get (new) ptr to current image + obj->_oldvx = obj->_vx; + obj->_oldvy = obj->_vy; + currImage = obj->_currImagePtr; // Get (new) ptr to current image } - if (obj->vx || obj->vy) - obj->cycling = kCycleForward; + if (obj->_vx || obj->_vy) + obj->_cycling = kCycleForward; break; default: ; // Really, nothing } // Store boundaries - if ((obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) - storeBoundary(obj->x + currImage->x1, obj->x + currImage->x2, obj->y + currImage->y2); + if ((obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) + storeBoundary(obj->_x + currImage->_x1, obj->_x + currImage->_x2, obj->_y + currImage->_y2); } } // Move objects, allowing for boundaries for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; // Get pointer to object - if ((obj->screenIndex == *_vm->_screen_p) && (obj->vx || obj->vy)) { + if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_vx || obj->_vy)) { // Only process if it's moving // Do object movement. Delta_x,y return allowed movement in x,y // to move as close to a boundary as possible without crossing it. - seq_t *currImage = obj->currImagePtr; // Get ptr to current image + seq_t *currImage = obj->_currImagePtr; // Get ptr to current image // object coordinates - int x1 = obj->x + currImage->x1; // Left edge of object - int x2 = obj->x + currImage->x2; // Right edge - int y1 = obj->y + currImage->y1; // Top edge - int y2 = obj->y + currImage->y2; // Bottom edge + int x1 = obj->_x + currImage->_x1; // Left edge of object + int x2 = obj->_x + currImage->_x2; // Right edge + int y1 = obj->_y + currImage->_y1; // Top edge + int y2 = obj->_y + currImage->_y2; // Bottom edge - if ((obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) + if ((obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) clearBoundary(x1, x2, y2); // Clear our own boundary // Allowable motion wrt boundary - int dx = deltaX(x1, x2, obj->vx, y2); - if (dx != obj->vx) { + int dx = deltaX(x1, x2, obj->_vx, y2); + if (dx != obj->_vx) { // An object boundary collision! boundaryCollision(obj); - obj->vx = 0; + obj->_vx = 0; } - int dy = deltaY(x1, x2, obj->vy, y2); - if (dy != obj->vy) { + int dy = deltaY(x1, x2, obj->_vy, y2); + if (dy != obj->_vy) { // An object boundary collision! boundaryCollision(obj); - obj->vy = 0; + obj->_vy = 0; } - if ((obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) + if ((obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) storeBoundary(x1, x2, y2); // Re-store our own boundary - obj->x += dx; // Update object position - obj->y += dy; + obj->_x += dx; // Update object position + obj->_y += dy; // Don't let object go outside screen if (x1 < kEdge) - obj->x = kEdge2; + obj->_x = kEdge2; if (x2 > (kXPix - kEdge)) - obj->x = kXPix - kEdge2 - (x2 - x1); + obj->_x = kXPix - kEdge2 - (x2 - x1); if (y1 < kEdge) - obj->y = kEdge2; + obj->_y = kEdge2; if (y2 > (kYPix - kEdge)) - obj->y = kYPix - kEdge2 - (y2 - y1); + obj->_y = kYPix - kEdge2 - (y2 - y1); - if ((obj->vx == 0) && (obj->vy == 0) && (obj->pathType != kPathWander2) && (obj->pathType != kPathChase2)) - obj->cycling = kCycleNotCycling; + if ((obj->_vx == 0) && (obj->_vy == 0) && (obj->_pathType != kPathWander2) && (obj->_pathType != kPathChase2)) + obj->_cycling = kCycleNotCycling; } } // Clear all object baselines from the boundary file. for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->currImagePtr; // Get ptr to current image - if ((obj->screenIndex == *_vm->_screen_p) && (obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) - clearBoundary(obj->oldx + currImage->x1, obj->oldx + currImage->x2, obj->oldy + currImage->y2); + seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) + clearBoundary(obj->_oldx + currImage->_x1, obj->_oldx + currImage->_x2, obj->_oldy + currImage->_y2); } // If maze mode is enabled, do special maze processing - if (_vm->_maze.enabledFl) { - seq_t *currImage = _vm->_hero->currImagePtr; // Get ptr to current image + if (_vm->_maze._enabledFl) { + seq_t *currImage = _vm->_hero->_currImagePtr; // Get ptr to current image // hero coordinates - int x1 = _vm->_hero->x + currImage->x1; // Left edge of object - int x2 = _vm->_hero->x + currImage->x2; // Right edge - int y1 = _vm->_hero->y + currImage->y1; // Top edge - int y2 = _vm->_hero->y + currImage->y2; // Bottom edge + int x1 = _vm->_hero->_x + currImage->_x1; // Left edge of object + int x2 = _vm->_hero->_x + currImage->_x2; // Right edge + int y1 = _vm->_hero->_y + currImage->_y1; // Top edge + int y2 = _vm->_hero->_y + currImage->_y2; // Bottom edge _vm->_scheduler->processMaze(x1, x2, y1, y2); } @@ -361,9 +361,9 @@ void ObjectHandler_v2d::homeIn(const int objIndex1, const int objIndex2, const i // object obj1 will home in on object obj2 object_t *obj1 = &_objects[objIndex1]; object_t *obj2 = &_objects[objIndex2]; - obj1->pathType = kPathAuto; - int dx = obj1->x + obj1->currImagePtr->x1 - obj2->x - obj2->currImagePtr->x1; - int dy = obj1->y + obj1->currImagePtr->y1 - obj2->y - obj2->currImagePtr->y1; + obj1->_pathType = kPathAuto; + int dx = obj1->_x + obj1->_currImagePtr->_x1 - obj2->_x - obj2->_currImagePtr->_x1; + int dy = obj1->_y + obj1->_currImagePtr->_y1 - obj2->_y - obj2->_currImagePtr->_y1; if (dx == 0) // Don't EVER divide by zero! dx = 1; @@ -371,11 +371,11 @@ void ObjectHandler_v2d::homeIn(const int objIndex1, const int objIndex2, const i dy = 1; if (abs(dx) > abs(dy)) { - obj1->vx = objDx * -sign(dx); - obj1->vy = abs((objDy * dy) / dx) * -sign(dy); + obj1->_vx = objDx * -sign(dx); + obj1->_vy = abs((objDy * dy) / dx) * -sign(dy); } else { - obj1->vy = objDy * -sign(dy); - obj1->vx = abs((objDx * dx) / dy) * -sign(dx); + obj1->_vy = objDy * -sign(dy); + obj1->_vx = abs((objDx * dx) / dy) * -sign(dx); } } } // End of namespace Hugo diff --git a/engines/hugo/object_v3d.cpp b/engines/hugo/object_v3d.cpp index cde7f5fd62..15d5fcd936 100644 --- a/engines/hugo/object_v3d.cpp +++ b/engines/hugo/object_v3d.cpp @@ -65,175 +65,175 @@ void ObjectHandler_v3d::moveObjects() { // Don't store foreground or background objects for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->currImagePtr; // Get ptr to current image - if (obj->screenIndex == *_vm->_screen_p) { - switch (obj->pathType) { + seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + if (obj->_screenIndex == *_vm->_screen_p) { + switch (obj->_pathType) { case kPathChase: case kPathChase2: { - int8 radius = obj->radius; // Default to object's radius + int8 radius = obj->_radius; // Default to object's radius if (radius < 0) // If radius infinity, use closer value radius = kStepDx; // Allowable motion wrt boundary - int dx = _vm->_hero->x + _vm->_hero->currImagePtr->x1 - obj->x - currImage->x1; - int dy = _vm->_hero->y + _vm->_hero->currImagePtr->y2 - obj->y - currImage->y2 - 1; + int dx = _vm->_hero->_x + _vm->_hero->_currImagePtr->_x1 - obj->_x - currImage->_x1; + int dy = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2 - obj->_y - currImage->_y2 - 1; if (abs(dx) <= radius) - obj->vx = 0; + obj->_vx = 0; else - obj->vx = (dx > 0) ? MIN(dx, obj->vxPath) : MAX(dx, -obj->vxPath); + obj->_vx = (dx > 0) ? MIN(dx, obj->_vxPath) : MAX(dx, -obj->_vxPath); if (abs(dy) <= radius) - obj->vy = 0; + obj->_vy = 0; else - obj->vy = (dy > 0) ? MIN(dy, obj->vyPath) : MAX(dy, -obj->vyPath); + obj->_vy = (dy > 0) ? MIN(dy, obj->_vyPath) : MAX(dy, -obj->_vyPath); // Set first image in sequence (if multi-seq object) - switch (obj->seqNumb) { + switch (obj->_seqNumb) { case 4: - if (!obj->vx) { // Got 4 directions - if (obj->vx != obj->oldvx) { // vx just stopped + if (!obj->_vx) { // Got 4 directions + if (obj->_vx != obj->_oldvx) { // vx just stopped if (dy >= 0) - obj->currImagePtr = obj->seqList[SEQ_DOWN].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_DOWN]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_UP].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_UP]._seqPtr; } - } else if (obj->vx != obj->oldvx) { + } else if (obj->_vx != obj->_oldvx) { if (dx > 0) - obj->currImagePtr = obj->seqList[SEQ_RIGHT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_LEFT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; } break; case 3: case 2: - if (obj->vx != obj->oldvx) { // vx just stopped + if (obj->_vx != obj->_oldvx) { // vx just stopped if (dx > 0) // Left & right only - obj->currImagePtr = obj->seqList[SEQ_RIGHT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_LEFT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; } break; } - if (obj->vx || obj->vy) { - obj->cycling = kCycleForward; + if (obj->_vx || obj->_vy) { + obj->_cycling = kCycleForward; } else { - obj->cycling = kCycleNotCycling; + obj->_cycling = kCycleNotCycling; boundaryCollision(obj); // Must have got hero! } - obj->oldvx = obj->vx; - obj->oldvy = obj->vy; - currImage = obj->currImagePtr; // Get (new) ptr to current image + obj->_oldvx = obj->_vx; + obj->_oldvy = obj->_vy; + currImage = obj->_currImagePtr; // Get (new) ptr to current image break; } case kPathWander2: case kPathWander: if (!_vm->_rnd->getRandomNumber(3 * _vm->_normalTPS)) { // Kick on random interval - obj->vx = _vm->_rnd->getRandomNumber(obj->vxPath << 1) - obj->vxPath; - obj->vy = _vm->_rnd->getRandomNumber(obj->vyPath << 1) - obj->vyPath; + obj->_vx = _vm->_rnd->getRandomNumber(obj->_vxPath << 1) - obj->_vxPath; + obj->_vy = _vm->_rnd->getRandomNumber(obj->_vyPath << 1) - obj->_vyPath; // Set first image in sequence (if multi-seq object) - if (obj->seqNumb > 1) { - if (!obj->vx && (obj->seqNumb >= 4)) { - if (obj->vx != obj->oldvx) { // vx just stopped - if (obj->vy > 0) - obj->currImagePtr = obj->seqList[SEQ_DOWN].seqPtr; + if (obj->_seqNumb > 1) { + if (!obj->_vx && (obj->_seqNumb >= 4)) { + if (obj->_vx != obj->_oldvx) { // vx just stopped + if (obj->_vy > 0) + obj->_currImagePtr = obj->_seqList[SEQ_DOWN]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_UP].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_UP]._seqPtr; } - } else if (obj->vx != obj->oldvx) { - if (obj->vx > 0) - obj->currImagePtr = obj->seqList[SEQ_RIGHT].seqPtr; + } else if (obj->_vx != obj->_oldvx) { + if (obj->_vx > 0) + obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; else - obj->currImagePtr = obj->seqList[SEQ_LEFT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; } } - obj->oldvx = obj->vx; - obj->oldvy = obj->vy; - currImage = obj->currImagePtr; // Get (new) ptr to current image + obj->_oldvx = obj->_vx; + obj->_oldvy = obj->_vy; + currImage = obj->_currImagePtr; // Get (new) ptr to current image } - if (obj->vx || obj->vy) - obj->cycling = kCycleForward; + if (obj->_vx || obj->_vy) + obj->_cycling = kCycleForward; break; default: ; // Really, nothing } // Store boundaries - if ((obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) - storeBoundary(obj->x + currImage->x1, obj->x + currImage->x2, obj->y + currImage->y2); + if ((obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) + storeBoundary(obj->_x + currImage->_x1, obj->_x + currImage->_x2, obj->_y + currImage->_y2); } } // Move objects, allowing for boundaries for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; // Get pointer to object - if ((obj->screenIndex == *_vm->_screen_p) && (obj->vx || obj->vy)) { + if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_vx || obj->_vy)) { // Only process if it's moving // Do object movement. Delta_x,y return allowed movement in x,y // to move as close to a boundary as possible without crossing it. - seq_t *currImage = obj->currImagePtr; // Get ptr to current image + seq_t *currImage = obj->_currImagePtr; // Get ptr to current image // object coordinates - int x1 = obj->x + currImage->x1; // Left edge of object - int x2 = obj->x + currImage->x2; // Right edge - int y1 = obj->y + currImage->y1; // Top edge - int y2 = obj->y + currImage->y2; // Bottom edge + int x1 = obj->_x + currImage->_x1; // Left edge of object + int x2 = obj->_x + currImage->_x2; // Right edge + int y1 = obj->_y + currImage->_y1; // Top edge + int y2 = obj->_y + currImage->_y2; // Bottom edge - if ((obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) + if ((obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) clearBoundary(x1, x2, y2); // Clear our own boundary // Allowable motion wrt boundary - int dx = deltaX(x1, x2, obj->vx, y2); - if (dx != obj->vx) { + int dx = deltaX(x1, x2, obj->_vx, y2); + if (dx != obj->_vx) { // An object boundary collision! boundaryCollision(obj); - obj->vx = 0; + obj->_vx = 0; } - int dy = deltaY(x1, x2, obj->vy, y2); - if (dy != obj->vy) { + int dy = deltaY(x1, x2, obj->_vy, y2); + if (dy != obj->_vy) { // An object boundary collision! boundaryCollision(obj); - obj->vy = 0; + obj->_vy = 0; } - if ((obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) + if ((obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) storeBoundary(x1, x2, y2); // Re-store our own boundary - obj->x += dx; // Update object position - obj->y += dy; + obj->_x += dx; // Update object position + obj->_y += dy; // Don't let object go outside screen if (x1 < kEdge) - obj->x = kEdge2; + obj->_x = kEdge2; if (x2 > (kXPix - kEdge)) - obj->x = kXPix - kEdge2 - (x2 - x1); + obj->_x = kXPix - kEdge2 - (x2 - x1); if (y1 < kEdge) - obj->y = kEdge2; + obj->_y = kEdge2; if (y2 > (kYPix - kEdge)) - obj->y = kYPix - kEdge2 - (y2 - y1); + obj->_y = kYPix - kEdge2 - (y2 - y1); - if ((obj->vx == 0) && (obj->vy == 0) && (obj->pathType != kPathWander2) && (obj->pathType != kPathChase2)) - obj->cycling = kCycleNotCycling; + if ((obj->_vx == 0) && (obj->_vy == 0) && (obj->_pathType != kPathWander2) && (obj->_pathType != kPathChase2)) + obj->_cycling = kCycleNotCycling; } } // Clear all object baselines from the boundary file. for (int i = 0; i < _numObj; i++) { object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->currImagePtr; // Get ptr to current image - if ((obj->screenIndex == *_vm->_screen_p) && (obj->cycling > kCycleAlmostInvisible) && (obj->priority == kPriorityFloating)) - clearBoundary(obj->oldx + currImage->x1, obj->oldx + currImage->x2, obj->oldy + currImage->y2); + seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) + clearBoundary(obj->_oldx + currImage->_x1, obj->_oldx + currImage->_x2, obj->_oldy + currImage->_y2); } // If maze mode is enabled, do special maze processing - if (_vm->_maze.enabledFl) { - seq_t *currImage = _vm->_hero->currImagePtr;// Get ptr to current image + if (_vm->_maze._enabledFl) { + seq_t *currImage = _vm->_hero->_currImagePtr;// Get ptr to current image // hero coordinates - int x1 = _vm->_hero->x + currImage->x1; // Left edge of object - int x2 = _vm->_hero->x + currImage->x2; // Right edge - int y1 = _vm->_hero->y + currImage->y1; // Top edge - int y2 = _vm->_hero->y + currImage->y2; // Bottom edge + int x1 = _vm->_hero->_x + currImage->_x1; // Left edge of object + int x2 = _vm->_hero->_x + currImage->_x2; // Right edge + int y1 = _vm->_hero->_y + currImage->_y1; // Top edge + int y2 = _vm->_hero->_y + currImage->_y2; // Bottom edge _vm->_scheduler->processMaze(x1, x2, y1, y2); } @@ -252,15 +252,15 @@ void ObjectHandler_v3d::swapImages(int objIndex1, int objIndex2) { seqList_t tmpSeqList[kMaxSeqNumb]; int seqListSize = sizeof(seqList_t) * kMaxSeqNumb; - memmove(tmpSeqList, _objects[objIndex1].seqList, seqListSize); - memmove(_objects[objIndex1].seqList, _objects[objIndex2].seqList, seqListSize); - memmove(_objects[objIndex2].seqList, tmpSeqList, seqListSize); + memmove(tmpSeqList, _objects[objIndex1]._seqList, seqListSize); + memmove(_objects[objIndex1]._seqList, _objects[objIndex2]._seqList, seqListSize); + memmove(_objects[objIndex2]._seqList, tmpSeqList, seqListSize); restoreSeq(&_objects[objIndex1]); - _objects[objIndex2].currImagePtr = _objects[objIndex2].seqList[0].seqPtr; + _objects[objIndex2]._currImagePtr = _objects[objIndex2]._seqList[0]._seqPtr; _vm->_heroImage = (_vm->_heroImage == kHeroIndex) ? objIndex2 : kHeroIndex; // Make sure baseline stays constant - _objects[objIndex1].y += _objects[objIndex2].currImagePtr->y2 - _objects[objIndex1].currImagePtr->y2; + _objects[objIndex1]._y += _objects[objIndex2]._currImagePtr->_y2 - _objects[objIndex1]._currImagePtr->_y2; } } // End of namespace Hugo diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp index 4eaed6fecf..b4255e607b 100644 --- a/engines/hugo/parser.cpp +++ b/engines/hugo/parser.cpp @@ -58,21 +58,21 @@ Parser::~Parser() { } uint16 Parser::getCmdDefaultVerbIdx(const uint16 index) const { - return _cmdList[index][0].verbIndex; + return _cmdList[index][0]._verbIndex; } /** * Read a cmd structure from Hugo.dat */ void Parser::readCmd(Common::ReadStream &in, cmd &curCmd) { - curCmd.verbIndex = in.readUint16BE(); - curCmd.reqIndex = in.readUint16BE(); - curCmd.textDataNoCarryIndex = in.readUint16BE(); - curCmd.reqState = in.readByte(); - curCmd.newState = in.readByte(); - curCmd.textDataWrongIndex = in.readUint16BE(); - curCmd.textDataDoneIndex = in.readUint16BE(); - curCmd.actIndex = in.readUint16BE(); + curCmd._verbIndex = in.readUint16BE(); + curCmd._reqIndex = in.readUint16BE(); + curCmd._textDataNoCarryIndex = in.readUint16BE(); + curCmd._reqState = in.readByte(); + curCmd._newState = in.readByte(); + curCmd._textDataWrongIndex = in.readUint16BE(); + curCmd._textDataDoneIndex = in.readUint16BE(); + curCmd._actIndex = in.readUint16BE(); } /** @@ -100,12 +100,12 @@ void Parser::loadCmdList(Common::ReadStream &in) { void Parser::readBG(Common::ReadStream &in, background_t &curBG) { - curBG.verbIndex = in.readUint16BE(); - curBG.nounIndex = in.readUint16BE(); - curBG.commentIndex = in.readSint16BE(); - curBG.matchFl = (in.readByte() != 0); - curBG.roomState = in.readByte(); - curBG.bonusIndex = in.readByte(); + curBG._verbIndex = in.readUint16BE(); + curBG._nounIndex = in.readUint16BE(); + curBG._commentIndex = in.readSint16BE(); + curBG._matchFl = (in.readByte() != 0); + curBG._roomState = in.readByte(); + curBG._bonusIndex = in.readByte(); } /** @@ -165,11 +165,11 @@ const char *Parser::useBG(const char *name) { debugC(1, kDebugEngine, "useBG(%s)", name); objectList_t p = _backgroundObjects[*_vm->_screen_p]; - for (int i = 0; p[i].verbIndex != 0; i++) { - if ((name == _vm->_text->getNoun(p[i].nounIndex, 0) && - p[i].verbIndex != _vm->_look) && - ((p[i].roomState == kStateDontCare) || (p[i].roomState == _vm->_screenStates[*_vm->_screen_p]))) - return _vm->_text->getVerb(p[i].verbIndex, 0); + for (int i = 0; p[i]._verbIndex != 0; i++) { + if ((name == _vm->_text->getNoun(p[i]._nounIndex, 0) && + p[i]._verbIndex != _vm->_look) && + ((p[i]._roomState == kStateDontCare) || (p[i]._roomState == _vm->_screenStates[*_vm->_screen_p]))) + return _vm->_text->getVerb(p[i]._verbIndex, 0); } return 0; @@ -222,7 +222,7 @@ void Parser::charHandler() { _cmdLine[--_cmdLineIndex] = '\0'; break; case Common::KEYCODE_RETURN: // EOL, pass line to line handler - if (_cmdLineIndex && (_vm->_hero->pathType != kPathQuiet)) { + if (_cmdLineIndex && (_vm->_hero->_pathType != kPathQuiet)) { // Remove inventory bar if active if (_vm->_inventory->getInventoryState() == kInventoryActive) _vm->_inventory->setInventoryState(kInventoryUp); @@ -248,9 +248,9 @@ void Parser::charHandler() { _cmdLineCursor = (_cmdLineCursor == '_') ? ' ' : '_'; // See if recall button pressed - if (gameStatus.recallFl) { + if (gameStatus._recallFl) { // Copy previous line to current cmdline - gameStatus.recallFl = false; + gameStatus._recallFl = false; strcpy(_cmdLine, _vm->_line); _cmdLineIndex = strlen(_cmdLine); } @@ -259,9 +259,9 @@ void Parser::charHandler() { sprintf(_vm->_scoreLine, "F1-Help %s Score: %d of %d Sound %s", (_vm->_config.turboFl) ? "T" : " ", _vm->getScore(), _vm->getMaxScore(), (_vm->_config.soundFl) ? "On" : "Off"); // See if "look" button pressed - if (gameStatus.lookFl) { + if (gameStatus._lookFl) { command("look around"); - gameStatus.lookFl = false; + gameStatus._lookFl = false; } } @@ -288,8 +288,8 @@ void Parser::keyHandler(Common::Event event) { _vm->_file->restoreGame(0); break; case Common::KEYCODE_s: - if (gameStatus.viewState == kViewPlay) { - if (gameStatus.gameOverFl) + if (gameStatus._viewState == kViewPlay) { + if (gameStatus._gameOverFl) _vm->gameOverMsg(); else _vm->_file->saveGame(-1, Common::String()); @@ -304,8 +304,8 @@ void Parser::keyHandler(Common::Event event) { // Process key down event - called from OnKeyDown() switch (nChar) { // Set various toggle states case Common::KEYCODE_ESCAPE: // Escape key, may want to QUIT - if (gameStatus.viewState == kViewIntro) - gameStatus.skipIntroFl = true; + if (gameStatus._viewState == kViewIntro) + gameStatus._skipIntroFl = true; else { if (_vm->_inventory->getInventoryState() == kInventoryActive) // Remove inventory, if displayed _vm->_inventory->setInventoryState(kInventoryUp); @@ -333,7 +333,7 @@ void Parser::keyHandler(Common::Event event) { break; case Common::KEYCODE_F1: // User Help (DOS) if (_checkDoubleF1Fl) - gameStatus.helpFl = true; + gameStatus._helpFl = true; else _vm->_screen->userHelp(); _checkDoubleF1Fl = !_checkDoubleF1Fl; @@ -343,11 +343,11 @@ void Parser::keyHandler(Common::Event event) { _vm->_sound->toggleMusic(); break; case Common::KEYCODE_F3: // Repeat last line - gameStatus.recallFl = true; + gameStatus._recallFl = true; break; case Common::KEYCODE_F4: // Save game - if (gameStatus.viewState == kViewPlay) { - if (gameStatus.gameOverFl) + if (gameStatus._viewState == kViewPlay) { + if (gameStatus._gameOverFl) _vm->gameOverMsg(); else _vm->_file->saveGame(-1, Common::String()); @@ -366,7 +366,7 @@ void Parser::keyHandler(Common::Event event) { warning("STUB: F9 (DOS) - BossKey"); break; default: // Any other key - if (!gameStatus.storyModeFl) { // Keyboard disabled + if (!gameStatus._storyModeFl) { // Keyboard disabled // Add printable keys to ring buffer uint16 bnext = _putIndex + 1; if (bnext >= sizeof(_ringBuffer)) @@ -452,7 +452,7 @@ void Parser::showDosInventory() const { for (int i = 0; i < _vm->_object->_numObj; i++) { // Find widths of 2 columns if (_vm->_object->isCarried(i)) { - uint16 len = strlen(_vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 2)); + uint16 len = strlen(_vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 2)); if (index++ & 1) // Right hand column len2 = (len > len2) ? len : len2; else @@ -473,9 +473,9 @@ void Parser::showDosInventory() const { for (int i = 0; i < _vm->_object->_numObj; i++) { // Assign strings if (_vm->_object->isCarried(i)) { if (index++ & 1) - buffer += Common::String(_vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 2)) + "\n"; + buffer += Common::String(_vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 2)) + "\n"; else - buffer += Common::String(_vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 2)) + Common::String(blanks, len1 - strlen(_vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 2))); + buffer += Common::String(_vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 2)) + Common::String(blanks, len1 - strlen(_vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 2))); } } if (index & 1) diff --git a/engines/hugo/parser.h b/engines/hugo/parser.h index f8b9d9f13b..18f4916b1e 100644 --- a/engines/hugo/parser.h +++ b/engines/hugo/parser.h @@ -48,14 +48,14 @@ enum seqTextParser { * The following determines how a verb is acted on, for an object */ struct cmd { - uint16 verbIndex; // the verb - uint16 reqIndex; // ptr to list of required objects - uint16 textDataNoCarryIndex; // ptr to string if any of above not carried - byte reqState; // required state for verb to be done - byte newState; // new states if verb done - uint16 textDataWrongIndex; // ptr to string if wrong state - uint16 textDataDoneIndex; // ptr to string if verb done - uint16 actIndex; // Ptr to action list if verb done + uint16 _verbIndex; // the verb + uint16 _reqIndex; // ptr to list of required objects + uint16 _textDataNoCarryIndex; // ptr to string if any of above not carried + byte _reqState; // required state for verb to be done + byte _newState; // new states if verb done + uint16 _textDataWrongIndex; // ptr to string if wrong state + uint16 _textDataDoneIndex; // ptr to string if verb done + uint16 _actIndex; // Ptr to action list if verb done }; /** @@ -65,12 +65,12 @@ struct cmd { * "don't understand" we produce an interesting msg to keep user sane. */ struct background_t { - uint16 verbIndex; - uint16 nounIndex; - int commentIndex; // Index of comment produced on match - bool matchFl; // TRUE if noun must match when present - byte roomState; // "State" of room. Comments might differ. - byte bonusIndex; // Index of bonus score (0 = no bonus) + uint16 _verbIndex; + uint16 _nounIndex; + int _commentIndex; // Index of comment produced on match + bool _matchFl; // TRUE if noun must match when present + byte _roomState; // "State" of room. Comments might differ. + byte _bonusIndex; // Index of bonus score (0 = no bonus) }; typedef background_t *objectList_t; diff --git a/engines/hugo/parser_v1d.cpp b/engines/hugo/parser_v1d.cpp index ccd428311b..aa43cce536 100644 --- a/engines/hugo/parser_v1d.cpp +++ b/engines/hugo/parser_v1d.cpp @@ -81,32 +81,32 @@ const char *Parser_v1d::findNextNoun(const char *noun) const { bool Parser_v1d::isNear_v1(const char *verb, const char *noun, object_t *obj, char *comment) const { debugC(1, kDebugParser, "isNear(%s, %s, obj, %s)", verb, noun, comment); - if (!noun && !obj->verbOnlyFl) { // No noun specified & object not context senesitive + if (!noun && !obj->_verbOnlyFl) { // No noun specified & object not context senesitive return false; - } else if (noun && (noun != _vm->_text->getNoun(obj->nounIndex, 0))) { // Noun specified & not same as object + } else if (noun && (noun != _vm->_text->getNoun(obj->_nounIndex, 0))) { // Noun specified & not same as object return false; - } else if (obj->carriedFl) { // Object is being carried + } else if (obj->_carriedFl) { // Object is being carried return true; - } else if (obj->screenIndex != *_vm->_screen_p) { // Not in same screen - if (obj->objValue) + } else if (obj->_screenIndex != *_vm->_screen_p) { // Not in same screen + if (obj->_objValue) strcpy (comment, _vm->_text->getTextParser(kCmtAny4)); return false; } - if (obj->cycling == kCycleInvisible) { - if (obj->seqNumb) { // There is an image + if (obj->_cycling == kCycleInvisible) { + if (obj->_seqNumb) { // There is an image strcpy(comment, _vm->_text->getTextParser(kCmtAny5)); return false; } else { // No image, assume visible - if ((obj->radius < 0) || - ((abs(obj->x - _vm->_hero->x) <= obj->radius) && - (abs(obj->y - _vm->_hero->y - _vm->_hero->currImagePtr->y2) <= obj->radius))) { + if ((obj->_radius < 0) || + ((abs(obj->_x - _vm->_hero->_x) <= obj->_radius) && + (abs(obj->_y - _vm->_hero->_y - _vm->_hero->_currImagePtr->_y2) <= obj->_radius))) { return true; } else { // User is either not close enough (stationary, valueless objects) // or is not carrying it (small, portable objects of value) if (noun) { // Don't say unless object specified - if (obj->objValue && (verb != _vm->_text->getVerb(_vm->_take, 0))) + if (obj->_objValue && (verb != _vm->_text->getVerb(_vm->_take, 0))) strcpy(comment, _vm->_text->getTextParser(kCmtAny4)); else strcpy(comment, _vm->_text->getTextParser(kCmtClose)); @@ -116,15 +116,15 @@ bool Parser_v1d::isNear_v1(const char *verb, const char *noun, object_t *obj, ch } } - if ((obj->radius < 0) || - ((abs(obj->x - _vm->_hero->x) <= obj->radius) && - (abs(obj->y + obj->currImagePtr->y2 - _vm->_hero->y - _vm->_hero->currImagePtr->y2) <= obj->radius))) { + if ((obj->_radius < 0) || + ((abs(obj->_x - _vm->_hero->_x) <= obj->_radius) && + (abs(obj->_y + obj->_currImagePtr->_y2 - _vm->_hero->_y - _vm->_hero->_currImagePtr->_y2) <= obj->_radius))) { return true; } else { // User is either not close enough (stationary, valueless objects) // or is not carrying it (small, portable objects of value) if (noun) { // Don't say unless object specified - if (obj->objValue && (verb != _vm->_text->getVerb(_vm->_take, 0))) + if (obj->_objValue && (verb != _vm->_text->getVerb(_vm->_take, 0))) strcpy(comment, _vm->_text->getTextParser(kCmtAny4)); else strcpy(comment, _vm->_text->getTextParser(kCmtClose)); @@ -143,28 +143,28 @@ bool Parser_v1d::isNear_v1(const char *verb, const char *noun, object_t *obj, ch bool Parser_v1d::isGenericVerb_v1(const char *word, object_t *obj) { debugC(1, kDebugParser, "isGenericVerb(%s, object_t *obj)", word); - if (!obj->genericCmd) + if (!obj->_genericCmd) return false; // Following is equivalent to switch, but couldn't do one if (word == _vm->_text->getVerb(_vm->_look, 0)) { - if ((LOOK & obj->genericCmd) == LOOK) - Utils::notifyBox(_vm->_text->getTextData(obj->dataIndex)); + if ((LOOK & obj->_genericCmd) == LOOK) + Utils::notifyBox(_vm->_text->getTextData(obj->_dataIndex)); else Utils::notifyBox(_vm->_text->getTextParser(kTBUnusual_1d)); } else if (word == _vm->_text->getVerb(_vm->_take, 0)) { - if (obj->carriedFl) + if (obj->_carriedFl) Utils::notifyBox(_vm->_text->getTextParser(kTBHave)); - else if ((TAKE & obj->genericCmd) == TAKE) + else if ((TAKE & obj->_genericCmd) == TAKE) takeObject(obj); - else if (!obj->verbOnlyFl) // Make sure not taking object in context! + else if (!obj->_verbOnlyFl) // Make sure not taking object in context! Utils::notifyBox(_vm->_text->getTextParser(kTBNoUse)); else return false; } else if (word == _vm->_text->getVerb(_vm->_drop, 0)) { - if (!obj->carriedFl) + if (!obj->_carriedFl) Utils::notifyBox(_vm->_text->getTextParser(kTBDontHave)); - else if ((DROP & obj->genericCmd) == DROP) + else if ((DROP & obj->_genericCmd) == DROP) dropObject(obj); else Utils::notifyBox(_vm->_text->getTextParser(kTBNeed)); @@ -185,42 +185,42 @@ bool Parser_v1d::isObjectVerb_v1(const char *word, object_t *obj) { debugC(1, kDebugParser, "isObjectVerb(%s, object_t *obj)", word); // First, find matching verb in cmd list - uint16 cmdIndex = obj->cmdIndex; // ptr to list of commands + uint16 cmdIndex = obj->_cmdIndex; // ptr to list of commands if (!cmdIndex) // No commands for this obj return false; int i; - for (i = 0; _cmdList[cmdIndex][i].verbIndex != 0; i++) { // For each cmd - if (!strcmp(word, _vm->_text->getVerb(_cmdList[cmdIndex][i].verbIndex, 0))) // Is this verb catered for? + for (i = 0; _cmdList[cmdIndex][i]._verbIndex != 0; i++) { // For each cmd + if (!strcmp(word, _vm->_text->getVerb(_cmdList[cmdIndex][i]._verbIndex, 0))) // Is this verb catered for? break; } - if (_cmdList[cmdIndex][i].verbIndex == 0) // No + if (_cmdList[cmdIndex][i]._verbIndex == 0) // No return false; // Verb match found, check all required objects are being carried cmd *cmnd = &_cmdList[cmdIndex][i]; // ptr to struct cmd - if (cmnd->reqIndex) { // At least 1 thing in list - uint16 *reqs = _arrayReqs[cmnd->reqIndex]; // ptr to list of required objects + if (cmnd->_reqIndex) { // At least 1 thing in list + uint16 *reqs = _arrayReqs[cmnd->_reqIndex]; // ptr to list of required objects for (i = 0; reqs[i]; i++) { // for each obj if (!_vm->_object->isCarrying(reqs[i])) { - Utils::notifyBox(_vm->_text->getTextData(cmnd->textDataNoCarryIndex)); + Utils::notifyBox(_vm->_text->getTextData(cmnd->_textDataNoCarryIndex)); return true; } } } // Required objects are present, now check state is correct - if ((obj->state != cmnd->reqState) && (cmnd->reqState != kStateDontCare)){ - Utils::notifyBox(_vm->_text->getTextData(cmnd->textDataWrongIndex)); + if ((obj->_state != cmnd->_reqState) && (cmnd->_reqState != kStateDontCare)){ + Utils::notifyBox(_vm->_text->getTextData(cmnd->_textDataWrongIndex)); return true; } // Everything checked. Change the state and carry out any actions - if (cmnd->reqState != kStateDontCare) // Don't change new state if required state didn't care - obj->state = cmnd->newState; - Utils::notifyBox(_vm->_text->getTextData(cmnd->textDataDoneIndex)); - _vm->_scheduler->insertActionList(cmnd->actIndex); + if (cmnd->_reqState != kStateDontCare) // Don't change new state if required state didn't care + obj->_state = cmnd->_newState; + Utils::notifyBox(_vm->_text->getTextData(cmnd->_textDataDoneIndex)); + _vm->_scheduler->insertActionList(cmnd->_actIndex); // Special case if verb is Take or Drop. Assume additional generic actions if ((word == _vm->_text->getVerb(_vm->_take, 0)) || (word == _vm->_text->getVerb(_vm->_drop, 0))) isGenericVerb_v1(word, obj); @@ -237,9 +237,9 @@ bool Parser_v1d::isBackgroundWord_v1(const char *noun, const char *verb, objectL if (!noun) return false; - for (int i = 0; obj[i].verbIndex; i++) { - if ((verb == _vm->_text->getVerb(obj[i].verbIndex, 0)) && (noun == _vm->_text->getNoun(obj[i].nounIndex, 0))) { - Utils::notifyBox(_vm->_file->fetchString(obj[i].commentIndex)); + for (int i = 0; obj[i]._verbIndex; i++) { + if ((verb == _vm->_text->getVerb(obj[i]._verbIndex, 0)) && (noun == _vm->_text->getNoun(obj[i]._nounIndex, 0))) { + Utils::notifyBox(_vm->_file->fetchString(obj[i]._commentIndex)); return true; } } @@ -252,13 +252,13 @@ bool Parser_v1d::isBackgroundWord_v1(const char *noun, const char *verb, objectL void Parser_v1d::takeObject(object_t *obj) { debugC(1, kDebugParser, "takeObject(object_t *obj)"); - obj->carriedFl = true; - if (obj->seqNumb) // Don't change if no image to display - obj->cycling = kCycleAlmostInvisible; + obj->_carriedFl = true; + if (obj->_seqNumb) // Don't change if no image to display + obj->_cycling = kCycleAlmostInvisible; - _vm->adjustScore(obj->objValue); + _vm->adjustScore(obj->_objValue); - Utils::notifyBox(Common::String::format(TAKE_TEXT, _vm->_text->getNoun(obj->nounIndex, TAKE_NAME))); + Utils::notifyBox(Common::String::format(TAKE_TEXT, _vm->_text->getNoun(obj->_nounIndex, TAKE_NAME))); } /** @@ -267,13 +267,13 @@ void Parser_v1d::takeObject(object_t *obj) { void Parser_v1d::dropObject(object_t *obj) { debugC(1, kDebugParser, "dropObject(object_t *obj)"); - obj->carriedFl = false; - obj->screenIndex = *_vm->_screen_p; - if (obj->seqNumb) // Don't change if no image to display - obj->cycling = kCycleNotCycling; - obj->x = _vm->_hero->x - 1; - obj->y = _vm->_hero->y + _vm->_hero->currImagePtr->y2 - 1; - _vm->adjustScore(-obj->objValue); + obj->_carriedFl = false; + obj->_screenIndex = *_vm->_screen_p; + if (obj->_seqNumb) // Don't change if no image to display + obj->_cycling = kCycleNotCycling; + obj->_x = _vm->_hero->_x - 1; + obj->_y = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2 - 1; + _vm->adjustScore(-obj->_objValue); Utils::notifyBox(_vm->_text->getTextParser(kTBOk)); } @@ -284,15 +284,15 @@ void Parser_v1d::dropObject(object_t *obj) { bool Parser_v1d::isCatchallVerb_v1(bool testNounFl, const char *noun, const char *verb, objectList_t obj) const { debugC(1, kDebugParser, "isCatchallVerb(%d, %s, %s, object_list_t obj)", (testNounFl) ? 1 : 0, noun, verb); - if (_vm->_maze.enabledFl) + if (_vm->_maze._enabledFl) return false; if (testNounFl && !noun) return false; - for (int i = 0; obj[i].verbIndex; i++) { - if ((verb == _vm->_text->getVerb(obj[i].verbIndex, 0)) && ((noun == _vm->_text->getNoun(obj[i].nounIndex, 0)) || (obj[i].nounIndex == 0))) { - Utils::notifyBox(_vm->_file->fetchString(obj[i].commentIndex)); + for (int i = 0; obj[i]._verbIndex; i++) { + if ((verb == _vm->_text->getVerb(obj[i]._verbIndex, 0)) && ((noun == _vm->_text->getNoun(obj[i]._nounIndex, 0)) || (obj[i]._nounIndex == 0))) { + Utils::notifyBox(_vm->_file->fetchString(obj[i]._commentIndex)); return true; } } @@ -310,7 +310,7 @@ void Parser_v1d::lineHandler() { // Toggle God Mode if (!strncmp(_vm->_line, "PPG", 3)) { _vm->_sound->playSound(!_vm->_soundTest, kSoundPriorityHigh); - gameStatus.godModeFl = !gameStatus.godModeFl; + gameStatus._godModeFl = !gameStatus._godModeFl; return; } @@ -321,7 +321,7 @@ void Parser_v1d::lineHandler() { // fetch Hero carries named object // fetch all Hero carries all possible objects // find Takes hero to screen containing named object - if (gameStatus.godModeFl) { + if (gameStatus._godModeFl) { // Special code to allow me to go straight to any screen if (strstr(_vm->_line, "goto")) { for (int i = 0; i < _vm->_numScreens; i++) { @@ -335,7 +335,7 @@ void Parser_v1d::lineHandler() { // Special code to allow me to get objects from anywhere if (strstr(_vm->_line, "fetch all")) { for (int i = 0; i < _vm->_object->_numObj; i++) { - if (_vm->_object->_objects[i].genericCmd & TAKE) + if (_vm->_object->_objects[i]._genericCmd & TAKE) takeObject(&_vm->_object->_objects[i]); } return; @@ -343,7 +343,7 @@ void Parser_v1d::lineHandler() { if (strstr(_vm->_line, "fetch")) { for (int i = 0; i < _vm->_object->_numObj; i++) { - if (!scumm_stricmp(&_vm->_line[strlen("fetch") + 1], _vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 0))) { + if (!scumm_stricmp(&_vm->_line[strlen("fetch") + 1], _vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 0))) { takeObject(&_vm->_object->_objects[i]); return; } @@ -353,8 +353,8 @@ void Parser_v1d::lineHandler() { // Special code to allow me to goto objects if (strstr(_vm->_line, "find")) { for (int i = 0; i < _vm->_object->_numObj; i++) { - if (!scumm_stricmp(&_vm->_line[strlen("find") + 1], _vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 0))) { - _vm->_scheduler->newScreen(_vm->_object->_objects[i].screenIndex); + if (!scumm_stricmp(&_vm->_line[strlen("find") + 1], _vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 0))) { + _vm->_scheduler->newScreen(_vm->_object->_objects[i]._screenIndex); return; } } @@ -369,7 +369,7 @@ void Parser_v1d::lineHandler() { // SAVE/RESTORE if (!strcmp("save", _vm->_line)) { - if (gameStatus.gameOverFl) + if (gameStatus._gameOverFl) _vm->gameOverMsg(); else _vm->_file->saveGame(-1, Common::String()); @@ -387,7 +387,7 @@ void Parser_v1d::lineHandler() { if (strspn(_vm->_line, " ") == strlen(_vm->_line)) // Nothing but spaces! return; - if (gameStatus.gameOverFl) { + if (gameStatus._gameOverFl) { // No commands allowed! _vm->gameOverMsg(); return; @@ -425,8 +425,8 @@ void Parser_v1d::lineHandler() { void Parser_v1d::showInventory() const { status_t &gameStatus = _vm->getGameStatus(); - if (gameStatus.viewState == kViewPlay) { - if (gameStatus.gameOverFl) + if (gameStatus._viewState == kViewPlay) { + if (gameStatus._gameOverFl) _vm->gameOverMsg(); else showDosInventory(); diff --git a/engines/hugo/parser_v1w.cpp b/engines/hugo/parser_v1w.cpp index b1657c3bf4..832e6fd1b0 100644 --- a/engines/hugo/parser_v1w.cpp +++ b/engines/hugo/parser_v1w.cpp @@ -61,7 +61,7 @@ void Parser_v1w::lineHandler() { // Toggle God Mode if (!strncmp(_vm->_line, "PPG", 3)) { _vm->_sound->playSound(!_vm->_soundTest, kSoundPriorityHigh); - gameStatus.godModeFl = !gameStatus.godModeFl; + gameStatus._godModeFl = !gameStatus._godModeFl; return; } @@ -72,7 +72,7 @@ void Parser_v1w::lineHandler() { // fetch Hero carries named object // fetch all Hero carries all possible objects // find Takes hero to screen containing named object - if (gameStatus.godModeFl) { + if (gameStatus._godModeFl) { // Special code to allow me to go straight to any screen if (strstr(_vm->_line, "goto")) { for (int i = 0; i < _vm->_numScreens; i++) { @@ -86,7 +86,7 @@ void Parser_v1w::lineHandler() { // Special code to allow me to get objects from anywhere if (strstr(_vm->_line, "fetch all")) { for (int i = 0; i < _vm->_object->_numObj; i++) { - if (_vm->_object->_objects[i].genericCmd & TAKE) + if (_vm->_object->_objects[i]._genericCmd & TAKE) takeObject(&_vm->_object->_objects[i]); } return; @@ -94,7 +94,7 @@ void Parser_v1w::lineHandler() { if (strstr(_vm->_line, "fetch")) { for (int i = 0; i < _vm->_object->_numObj; i++) { - if (!scumm_stricmp(&_vm->_line[strlen("fetch") + 1], _vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 0))) { + if (!scumm_stricmp(&_vm->_line[strlen("fetch") + 1], _vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 0))) { takeObject(&_vm->_object->_objects[i]); return; } @@ -104,8 +104,8 @@ void Parser_v1w::lineHandler() { // Special code to allow me to goto objects if (strstr(_vm->_line, "find")) { for (int i = 0; i < _vm->_object->_numObj; i++) { - if (!scumm_stricmp(&_vm->_line[strlen("find") + 1], _vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 0))) { - _vm->_scheduler->newScreen(_vm->_object->_objects[i].screenIndex); + if (!scumm_stricmp(&_vm->_line[strlen("find") + 1], _vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 0))) { + _vm->_scheduler->newScreen(_vm->_object->_objects[i]._screenIndex); return; } } @@ -121,12 +121,12 @@ void Parser_v1w::lineHandler() { } // SAVE/RESTORE - if (!strcmp("save", _vm->_line) && gameStatus.viewState == kViewPlay) { + if (!strcmp("save", _vm->_line) && gameStatus._viewState == kViewPlay) { _vm->_file->saveGame(-1, Common::String()); return; } - if (!strcmp("restore", _vm->_line) && (gameStatus.viewState == kViewPlay || gameStatus.viewState == kViewIdle)) { + if (!strcmp("restore", _vm->_line) && (gameStatus._viewState == kViewPlay || gameStatus._viewState == kViewIdle)) { _vm->_file->restoreGame(-1); return; } @@ -137,7 +137,7 @@ void Parser_v1w::lineHandler() { if (strspn(_vm->_line, " ") == strlen(_vm->_line)) // Nothing but spaces! return; - if (gameStatus.gameOverFl) { + if (gameStatus._gameOverFl) { // No commands allowed! _vm->gameOverMsg(); return; @@ -148,7 +148,7 @@ void Parser_v1w::lineHandler() { // Test for nearby objects referenced explicitly for (int i = 0; i < _vm->_object->_numObj; i++) { object_t *obj = &_vm->_object->_objects[i]; - if (isWordPresent(_vm->_text->getNounArray(obj->nounIndex))) { + if (isWordPresent(_vm->_text->getNounArray(obj->_nounIndex))) { if (isObjectVerb_v3(obj, farComment) || isGenericVerb_v3(obj, farComment)) return; } @@ -158,7 +158,7 @@ void Parser_v1w::lineHandler() { // Note comment is unused if not near. for (int i = 0; i < _vm->_object->_numObj; i++) { object_t *obj = &_vm->_object->_objects[i]; - if (obj->verbOnlyFl) { + if (obj->_verbOnlyFl) { char contextComment[kCompLineSize * 5] = ""; // Unused comment for context objects if (isObjectVerb_v3(obj, contextComment) || isGenericVerb_v3(obj, contextComment)) return; @@ -185,7 +185,7 @@ void Parser_v1w::lineHandler() { // Nothing matches. Report recognition success to user. const char *verb = findVerb(); const char *noun = findNoun(); - if (verb == _vm->_text->getVerb(_vm->_look, 0) && _vm->_maze.enabledFl) { + if (verb == _vm->_text->getVerb(_vm->_look, 0) && _vm->_maze._enabledFl) { Utils::notifyBox(_vm->_text->getTextParser(kTBMaze)); _vm->_object->showTakeables(); } else if (verb && noun) { // A combination I didn't think of @@ -202,14 +202,14 @@ void Parser_v1w::lineHandler() { void Parser_v1w::showInventory() const { status_t &gameStatus = _vm->getGameStatus(); istate_t inventState = _vm->_inventory->getInventoryState(); - if (gameStatus.gameOverFl) { + if (gameStatus._gameOverFl) { _vm->gameOverMsg(); - } else if ((inventState == kInventoryOff) && (gameStatus.viewState == kViewPlay)) { + } else if ((inventState == kInventoryOff) && (gameStatus._viewState == kViewPlay)) { _vm->_inventory->setInventoryState(kInventoryDown); - gameStatus.viewState = kViewInvent; + gameStatus._viewState = kViewInvent; } else if (inventState == kInventoryActive) { _vm->_inventory->setInventoryState(kInventoryUp); - gameStatus.viewState = kViewInvent; + gameStatus._viewState = kViewInvent; } } diff --git a/engines/hugo/parser_v2d.cpp b/engines/hugo/parser_v2d.cpp index 0095c4d726..2daf3c5e9f 100644 --- a/engines/hugo/parser_v2d.cpp +++ b/engines/hugo/parser_v2d.cpp @@ -60,7 +60,7 @@ void Parser_v2d::lineHandler() { // Toggle God Mode if (!strncmp(_vm->_line, "PPG", 3)) { _vm->_sound->playSound(!_vm->_soundTest, kSoundPriorityHigh); - gameStatus.godModeFl = !gameStatus.godModeFl; + gameStatus._godModeFl = !gameStatus._godModeFl; return; } @@ -71,7 +71,7 @@ void Parser_v2d::lineHandler() { // fetch Hero carries named object // fetch all Hero carries all possible objects // find Takes hero to screen containing named object - if (gameStatus.godModeFl) { + if (gameStatus._godModeFl) { // Special code to allow me to go straight to any screen if (strstr(_vm->_line, "goto")) { for (int i = 0; i < _vm->_numScreens; i++) { @@ -85,7 +85,7 @@ void Parser_v2d::lineHandler() { // Special code to allow me to get objects from anywhere if (strstr(_vm->_line, "fetch all")) { for (int i = 0; i < _vm->_object->_numObj; i++) { - if (_vm->_object->_objects[i].genericCmd & TAKE) + if (_vm->_object->_objects[i]._genericCmd & TAKE) takeObject(&_vm->_object->_objects[i]); } return; @@ -93,7 +93,7 @@ void Parser_v2d::lineHandler() { if (strstr(_vm->_line, "fetch")) { for (int i = 0; i < _vm->_object->_numObj; i++) { - if (!scumm_stricmp(&_vm->_line[strlen("fetch") + 1], _vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 0))) { + if (!scumm_stricmp(&_vm->_line[strlen("fetch") + 1], _vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 0))) { takeObject(&_vm->_object->_objects[i]); return; } @@ -103,8 +103,8 @@ void Parser_v2d::lineHandler() { // Special code to allow me to goto objects if (strstr(_vm->_line, "find")) { for (int i = 0; i < _vm->_object->_numObj; i++) { - if (!scumm_stricmp(&_vm->_line[strlen("find") + 1], _vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 0))) { - _vm->_scheduler->newScreen(_vm->_object->_objects[i].screenIndex); + if (!scumm_stricmp(&_vm->_line[strlen("find") + 1], _vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 0))) { + _vm->_scheduler->newScreen(_vm->_object->_objects[i]._screenIndex); return; } } @@ -119,7 +119,7 @@ void Parser_v2d::lineHandler() { // SAVE/RESTORE if (!strcmp("save", _vm->_line)) { - if (gameStatus.gameOverFl) + if (gameStatus._gameOverFl) _vm->gameOverMsg(); else _vm->_file->saveGame(-1, Common::String()); @@ -137,7 +137,7 @@ void Parser_v2d::lineHandler() { if (strspn(_vm->_line, " ") == strlen(_vm->_line)) // Nothing but spaces! return; - if (gameStatus.gameOverFl) { + if (gameStatus._gameOverFl) { // No commands allowed! _vm->gameOverMsg(); return; @@ -172,7 +172,7 @@ void Parser_v2d::lineHandler() { && !isCatchallVerb_v1(false, noun, verb, _catchallList)) { if (*farComment != '\0') { // An object matched but not near enough Utils::notifyBox(farComment); - } else if (_vm->_maze.enabledFl && (verb == _vm->_text->getVerb(_vm->_look, 0))) { + } else if (_vm->_maze._enabledFl && (verb == _vm->_text->getVerb(_vm->_look, 0))) { Utils::notifyBox(_vm->_text->getTextParser(kTBMaze)); _vm->_object->showTakeables(); } else if (verb && noun) { // A combination I didn't think of diff --git a/engines/hugo/parser_v3d.cpp b/engines/hugo/parser_v3d.cpp index b45e9186b3..abfe263f6e 100644 --- a/engines/hugo/parser_v3d.cpp +++ b/engines/hugo/parser_v3d.cpp @@ -60,7 +60,7 @@ void Parser_v3d::lineHandler() { // Toggle God Mode if (!strncmp(_vm->_line, "PPG", 3)) { _vm->_sound->playSound(!_vm->_soundTest, kSoundPriorityHigh); - gameStatus.godModeFl = !gameStatus.godModeFl; + gameStatus._godModeFl = !gameStatus._godModeFl; return; } @@ -71,7 +71,7 @@ void Parser_v3d::lineHandler() { // fetch Hero carries named object // fetch all Hero carries all possible objects // find Takes hero to screen containing named object - if (gameStatus.godModeFl) { + if (gameStatus._godModeFl) { // Special code to allow me to go straight to any screen if (strstr(_vm->_line, "goto")) { for (int i = 0; i < _vm->_numScreens; i++) { @@ -85,7 +85,7 @@ void Parser_v3d::lineHandler() { // Special code to allow me to get objects from anywhere if (strstr(_vm->_line, "fetch all")) { for (int i = 0; i < _vm->_object->_numObj; i++) { - if (_vm->_object->_objects[i].genericCmd & TAKE) + if (_vm->_object->_objects[i]._genericCmd & TAKE) takeObject(&_vm->_object->_objects[i]); } return; @@ -93,7 +93,7 @@ void Parser_v3d::lineHandler() { if (strstr(_vm->_line, "fetch")) { for (int i = 0; i < _vm->_object->_numObj; i++) { - if (!scumm_stricmp(&_vm->_line[strlen("fetch") + 1], _vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 0))) { + if (!scumm_stricmp(&_vm->_line[strlen("fetch") + 1], _vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 0))) { takeObject(&_vm->_object->_objects[i]); return; } @@ -103,8 +103,8 @@ void Parser_v3d::lineHandler() { // Special code to allow me to goto objects if (strstr(_vm->_line, "find")) { for (int i = 0; i < _vm->_object->_numObj; i++) { - if (!scumm_stricmp(&_vm->_line[strlen("find") + 1], _vm->_text->getNoun(_vm->_object->_objects[i].nounIndex, 0))) { - _vm->_scheduler->newScreen(_vm->_object->_objects[i].screenIndex); + if (!scumm_stricmp(&_vm->_line[strlen("find") + 1], _vm->_text->getNoun(_vm->_object->_objects[i]._nounIndex, 0))) { + _vm->_scheduler->newScreen(_vm->_object->_objects[i]._screenIndex); return; } } @@ -121,7 +121,7 @@ void Parser_v3d::lineHandler() { // SAVE/RESTORE if (!strcmp("save", _vm->_line)) { - if (gameStatus.gameOverFl) + if (gameStatus._gameOverFl) _vm->gameOverMsg(); else _vm->_file->saveGame(-1, Common::String()); @@ -139,7 +139,7 @@ void Parser_v3d::lineHandler() { if (strspn(_vm->_line, " ") == strlen(_vm->_line)) // Nothing but spaces! return; - if (gameStatus.gameOverFl) { + if (gameStatus._gameOverFl) { // No commands allowed! _vm->gameOverMsg(); return; @@ -150,7 +150,7 @@ void Parser_v3d::lineHandler() { // Test for nearby objects referenced explicitly for (int i = 0; i < _vm->_object->_numObj; i++) { object_t *obj = &_vm->_object->_objects[i]; - if (isWordPresent(_vm->_text->getNounArray(obj->nounIndex))) { + if (isWordPresent(_vm->_text->getNounArray(obj->_nounIndex))) { if (isObjectVerb_v3(obj, farComment) || isGenericVerb_v3(obj, farComment)) return; } @@ -160,7 +160,7 @@ void Parser_v3d::lineHandler() { // Note comment is unused if not near. for (int i = 0; i < _vm->_object->_numObj; i++) { object_t *obj = &_vm->_object->_objects[i]; - if (obj->verbOnlyFl) { + if (obj->_verbOnlyFl) { char contextComment[kCompLineSize * 5] = ""; // Unused comment for context objects if (isObjectVerb_v3(obj, contextComment) || isGenericVerb_v3(obj, contextComment)) return; @@ -208,47 +208,47 @@ bool Parser_v3d::isObjectVerb_v3(object_t *obj, char *comment) { debugC(1, kDebugParser, "isObjectVerb(object_t *obj, %s)", comment); // First, find matching verb in cmd list - uint16 cmdIndex = obj->cmdIndex; // ptr to list of commands + uint16 cmdIndex = obj->_cmdIndex; // ptr to list of commands if (cmdIndex == 0) // No commands for this obj return false; int i; - for (i = 0; _cmdList[cmdIndex][i].verbIndex != 0; i++) { // For each cmd - if (isWordPresent(_vm->_text->getVerbArray(_cmdList[cmdIndex][i].verbIndex))) // Was this verb used? + for (i = 0; _cmdList[cmdIndex][i]._verbIndex != 0; i++) { // For each cmd + if (isWordPresent(_vm->_text->getVerbArray(_cmdList[cmdIndex][i]._verbIndex))) // Was this verb used? break; } - if (_cmdList[cmdIndex][i].verbIndex == 0) // No verbs used. + if (_cmdList[cmdIndex][i]._verbIndex == 0) // No verbs used. return false; // Verb match found. Check if object is Near - char *verb = *_vm->_text->getVerbArray(_cmdList[cmdIndex][i].verbIndex); + char *verb = *_vm->_text->getVerbArray(_cmdList[cmdIndex][i]._verbIndex); if (!isNear_v3(obj, verb, comment)) return false; // Check all required objects are being carried cmd *cmnd = &_cmdList[cmdIndex][i]; // ptr to struct cmd - if (cmnd->reqIndex) { // At least 1 thing in list - uint16 *reqs = _arrayReqs[cmnd->reqIndex]; // ptr to list of required objects + if (cmnd->_reqIndex) { // At least 1 thing in list + uint16 *reqs = _arrayReqs[cmnd->_reqIndex]; // ptr to list of required objects for (i = 0; reqs[i]; i++) { // for each obj if (!_vm->_object->isCarrying(reqs[i])) { - Utils::notifyBox(_vm->_text->getTextData(cmnd->textDataNoCarryIndex)); + Utils::notifyBox(_vm->_text->getTextData(cmnd->_textDataNoCarryIndex)); return true; } } } // Required objects are present, now check state is correct - if ((obj->state != cmnd->reqState) && (cmnd->reqState != kStateDontCare)) { - Utils::notifyBox(_vm->_text->getTextData(cmnd->textDataWrongIndex)); + if ((obj->_state != cmnd->_reqState) && (cmnd->_reqState != kStateDontCare)) { + Utils::notifyBox(_vm->_text->getTextData(cmnd->_textDataWrongIndex)); return true; } // Everything checked. Change the state and carry out any actions - if (cmnd->reqState != kStateDontCare) // Don't change new state if required state didn't care - obj->state = cmnd->newState; - Utils::notifyBox(_vm->_text->getTextData(cmnd->textDataDoneIndex)); - _vm->_scheduler->insertActionList(cmnd->actIndex); + if (cmnd->_reqState != kStateDontCare) // Don't change new state if required state didn't care + obj->_state = cmnd->_newState; + Utils::notifyBox(_vm->_text->getTextData(cmnd->_textDataDoneIndex)); + _vm->_scheduler->insertActionList(cmnd->_actIndex); // See if any additional generic actions if ((verb == _vm->_text->getVerb(_vm->_look, 0)) || (verb == _vm->_text->getVerb(_vm->_take, 0)) || (verb == _vm->_text->getVerb(_vm->_drop, 0))) @@ -262,18 +262,18 @@ bool Parser_v3d::isObjectVerb_v3(object_t *obj, char *comment) { bool Parser_v3d::isGenericVerb_v3(object_t *obj, char *comment) { debugC(1, kDebugParser, "isGenericVerb(object_t *obj, %s)", comment); - if (!obj->genericCmd) + if (!obj->_genericCmd) return false; // Following is equivalent to switch, but couldn't do one if (isWordPresent(_vm->_text->getVerbArray(_vm->_look)) && isNear_v3(obj, _vm->_text->getVerb(_vm->_look, 0), comment)) { // Test state-dependent look before general look - if ((obj->genericCmd & LOOK_S) == LOOK_S) { - Utils::notifyBox(_vm->_text->getTextData(obj->stateDataIndex[obj->state])); + if ((obj->_genericCmd & LOOK_S) == LOOK_S) { + Utils::notifyBox(_vm->_text->getTextData(obj->_stateDataIndex[obj->_state])); } else { - if ((LOOK & obj->genericCmd) == LOOK) { - if (obj->dataIndex != 0) - Utils::notifyBox(_vm->_text->getTextData(obj->dataIndex)); + if ((LOOK & obj->_genericCmd) == LOOK) { + if (obj->_dataIndex != 0) + Utils::notifyBox(_vm->_text->getTextData(obj->_dataIndex)); else return false; } else { @@ -281,22 +281,22 @@ bool Parser_v3d::isGenericVerb_v3(object_t *obj, char *comment) { } } } else if (isWordPresent(_vm->_text->getVerbArray(_vm->_take)) && isNear_v3(obj, _vm->_text->getVerb(_vm->_take, 0), comment)) { - if (obj->carriedFl) + if (obj->_carriedFl) Utils::notifyBox(_vm->_text->getTextParser(kTBHave)); - else if ((TAKE & obj->genericCmd) == TAKE) + else if ((TAKE & obj->_genericCmd) == TAKE) takeObject(obj); - else if (obj->cmdIndex) // No comment if possible commands + else if (obj->_cmdIndex) // No comment if possible commands return false; - else if (!obj->verbOnlyFl && (TAKE & obj->genericCmd) == TAKE) // Make sure not taking object in context! + else if (!obj->_verbOnlyFl && (TAKE & obj->_genericCmd) == TAKE) // Make sure not taking object in context! Utils::notifyBox(_vm->_text->getTextParser(kTBNoUse)); else return false; } else if (isWordPresent(_vm->_text->getVerbArray(_vm->_drop))) { - if (!obj->carriedFl && ((DROP & obj->genericCmd) == DROP)) + if (!obj->_carriedFl && ((DROP & obj->_genericCmd) == DROP)) Utils::notifyBox(_vm->_text->getTextParser(kTBDontHave)); - else if (obj->carriedFl && ((DROP & obj->genericCmd) == DROP)) + else if (obj->_carriedFl && ((DROP & obj->_genericCmd) == DROP)) dropObject(obj); - else if (obj->cmdIndex == 0) + else if (obj->_cmdIndex == 0) Utils::notifyBox(_vm->_text->getTextParser(kTBNeed)); else return false; @@ -316,32 +316,32 @@ bool Parser_v3d::isGenericVerb_v3(object_t *obj, char *comment) { bool Parser_v3d::isNear_v3(object_t *obj, const char *verb, char *comment) const { debugC(1, kDebugParser, "isNear(object_t *obj, %s, %s)", verb, comment); - if (obj->carriedFl) // Object is being carried + if (obj->_carriedFl) // Object is being carried return true; - if (obj->screenIndex != *_vm->_screen_p) { + if (obj->_screenIndex != *_vm->_screen_p) { // Not in same screen - if (obj->objValue) + if (obj->_objValue) strcpy(comment, _vm->_text->getTextParser(kCmtAny1)); else strcpy(comment, _vm->_text->getTextParser(kCmtAny2)); return false; } - if (obj->cycling == kCycleInvisible) { - if (obj->seqNumb) { + if (obj->_cycling == kCycleInvisible) { + if (obj->_seqNumb) { // There is an image strcpy(comment, _vm->_text->getTextParser(kCmtAny3)); return false; } else { // No image, assume visible - if ((obj->radius < 0) || - ((abs(obj->x - _vm->_hero->x) <= obj->radius) && - (abs(obj->y - _vm->_hero->y - _vm->_hero->currImagePtr->y2) <= obj->radius))) { + if ((obj->_radius < 0) || + ((abs(obj->_x - _vm->_hero->_x) <= obj->_radius) && + (abs(obj->_y - _vm->_hero->_y - _vm->_hero->_currImagePtr->_y2) <= obj->_radius))) { return true; } else { // User is not close enough - if (obj->objValue && (verb != _vm->_text->getVerb(_vm->_take, 0))) + if (obj->_objValue && (verb != _vm->_text->getVerb(_vm->_take, 0))) strcpy(comment, _vm->_text->getTextParser(kCmtAny1)); else strcpy(comment, _vm->_text->getTextParser(kCmtClose)); @@ -350,13 +350,13 @@ bool Parser_v3d::isNear_v3(object_t *obj, const char *verb, char *comment) const } } - if ((obj->radius < 0) || - ((abs(obj->x - _vm->_hero->x) <= obj->radius) && - (abs(obj->y + obj->currImagePtr->y2 - _vm->_hero->y - _vm->_hero->currImagePtr->y2) <= obj->radius))) { + if ((obj->_radius < 0) || + ((abs(obj->_x - _vm->_hero->_x) <= obj->_radius) && + (abs(obj->_y + obj->_currImagePtr->_y2 - _vm->_hero->_y - _vm->_hero->_currImagePtr->_y2) <= obj->_radius))) { return true; } else { // User is not close enough - if (obj->objValue && (verb != _vm->_text->getVerb(_vm->_take, 0))) + if (obj->_objValue && (verb != _vm->_text->getVerb(_vm->_take, 0))) strcpy(comment, _vm->_text->getTextParser(kCmtAny1)); else strcpy(comment, _vm->_text->getTextParser(kCmtClose)); @@ -371,15 +371,15 @@ bool Parser_v3d::isNear_v3(object_t *obj, const char *verb, char *comment) const void Parser_v3d::takeObject(object_t *obj) { debugC(1, kDebugParser, "takeObject(object_t *obj)"); - obj->carriedFl = true; - if (obj->seqNumb) { // Don't change if no image to display - obj->cycling = kCycleInvisible; + obj->_carriedFl = true; + if (obj->_seqNumb) { // Don't change if no image to display + obj->_cycling = kCycleInvisible; } - _vm->adjustScore(obj->objValue); + _vm->adjustScore(obj->_objValue); - if (obj->seqNumb > 0) // If object has an image, force walk to dropped - obj->viewx = -1; // (possibly moved) object next time taken! - Utils::notifyBox(Common::String::format(TAKE_TEXT, _vm->_text->getNoun(obj->nounIndex, TAKE_NAME))); + if (obj->_seqNumb > 0) // If object has an image, force walk to dropped + obj->_viewx = -1; // (possibly moved) object next time taken! + Utils::notifyBox(Common::String::format(TAKE_TEXT, _vm->_text->getNoun(obj->_nounIndex, TAKE_NAME))); } /** @@ -388,16 +388,16 @@ void Parser_v3d::takeObject(object_t *obj) { void Parser_v3d::dropObject(object_t *obj) { debugC(1, kDebugParser, "dropObject(object_t *obj)"); - obj->carriedFl = false; - obj->screenIndex = *_vm->_screen_p; - if ((obj->seqNumb > 1) || (obj->seqList[0].imageNbr > 1)) - obj->cycling = kCycleForward; + obj->_carriedFl = false; + obj->_screenIndex = *_vm->_screen_p; + if ((obj->_seqNumb > 1) || (obj->_seqList[0]._imageNbr > 1)) + obj->_cycling = kCycleForward; else - obj->cycling = kCycleNotCycling; - obj->x = _vm->_hero->x - 1; - obj->y = _vm->_hero->y + _vm->_hero->currImagePtr->y2 - 1; - obj->y = (obj->y + obj->currImagePtr->y2 < kYPix) ? obj->y : kYPix - obj->currImagePtr->y2 - 10; - _vm->adjustScore(-obj->objValue); + obj->_cycling = kCycleNotCycling; + obj->_x = _vm->_hero->_x - 1; + obj->_y = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2 - 1; + obj->_y = (obj->_y + obj->_currImagePtr->_y2 < kYPix) ? obj->_y : kYPix - obj->_currImagePtr->_y2 - 10; + _vm->adjustScore(-obj->_objValue); Utils::notifyBox(_vm->_text->getTextParser(kTBOk)); } @@ -410,19 +410,19 @@ void Parser_v3d::dropObject(object_t *obj) { bool Parser_v3d::isCatchallVerb_v3(objectList_t obj) const { debugC(1, kDebugParser, "isCatchallVerb(object_list_t obj)"); - if (_vm->_maze.enabledFl) + if (_vm->_maze._enabledFl) return false; - for (int i = 0; obj[i].verbIndex != 0; i++) { - if (isWordPresent(_vm->_text->getVerbArray(obj[i].verbIndex)) && obj[i].nounIndex == 0 && - (!obj[i].matchFl || !findNoun()) && - ((obj[i].roomState == kStateDontCare) || - (obj[i].roomState == _vm->_screenStates[*_vm->_screen_p]))) { - Utils::notifyBox(_vm->_file->fetchString(obj[i].commentIndex)); - _vm->_scheduler->processBonus(obj[i].bonusIndex); + for (int i = 0; obj[i]._verbIndex != 0; i++) { + if (isWordPresent(_vm->_text->getVerbArray(obj[i]._verbIndex)) && obj[i]._nounIndex == 0 && + (!obj[i]._matchFl || !findNoun()) && + ((obj[i]._roomState == kStateDontCare) || + (obj[i]._roomState == _vm->_screenStates[*_vm->_screen_p]))) { + Utils::notifyBox(_vm->_file->fetchString(obj[i]._commentIndex)); + _vm->_scheduler->processBonus(obj[i]._bonusIndex); // If this is LOOK (without a noun), show any takeable objects - if (*(_vm->_text->getVerbArray(obj[i].verbIndex)) == _vm->_text->getVerb(_vm->_look, 0)) + if (*(_vm->_text->getVerbArray(obj[i]._verbIndex)) == _vm->_text->getVerb(_vm->_look, 0)) _vm->_object->showTakeables(); return true; @@ -438,16 +438,16 @@ bool Parser_v3d::isCatchallVerb_v3(objectList_t obj) const { bool Parser_v3d::isBackgroundWord_v3(objectList_t obj) const { debugC(1, kDebugParser, "isBackgroundWord(object_list_t obj)"); - if (_vm->_maze.enabledFl) + if (_vm->_maze._enabledFl) return false; - for (int i = 0; obj[i].verbIndex != 0; i++) { - if (isWordPresent(_vm->_text->getVerbArray(obj[i].verbIndex)) && - isWordPresent(_vm->_text->getNounArray(obj[i].nounIndex)) && - ((obj[i].roomState == kStateDontCare) || - (obj[i].roomState == _vm->_screenStates[*_vm->_screen_p]))) { - Utils::notifyBox(_vm->_file->fetchString(obj[i].commentIndex)); - _vm->_scheduler->processBonus(obj[i].bonusIndex); + for (int i = 0; obj[i]._verbIndex != 0; i++) { + if (isWordPresent(_vm->_text->getVerbArray(obj[i]._verbIndex)) && + isWordPresent(_vm->_text->getNounArray(obj[i]._nounIndex)) && + ((obj[i]._roomState == kStateDontCare) || + (obj[i]._roomState == _vm->_screenStates[*_vm->_screen_p]))) { + Utils::notifyBox(_vm->_file->fetchString(obj[i]._commentIndex)); + _vm->_scheduler->processBonus(obj[i]._bonusIndex); return true; } } diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp index 281aacf031..552ddaf5c9 100644 --- a/engines/hugo/route.cpp +++ b/engines/hugo/route.cpp @@ -67,35 +67,35 @@ void Route::setDirection(const uint16 keyCode) { switch (keyCode) { case Common::KEYCODE_UP: case Common::KEYCODE_KP8: - obj->currImagePtr = obj->seqList[SEQ_UP].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_UP]._seqPtr; break; case Common::KEYCODE_DOWN: case Common::KEYCODE_KP2: - obj->currImagePtr = obj->seqList[SEQ_DOWN].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_DOWN]._seqPtr; break; case Common::KEYCODE_LEFT: case Common::KEYCODE_KP4: - obj->currImagePtr = obj->seqList[SEQ_LEFT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; break; case Common::KEYCODE_RIGHT: case Common::KEYCODE_KP6: - obj->currImagePtr = obj->seqList[SEQ_RIGHT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; break; case Common::KEYCODE_HOME: case Common::KEYCODE_KP7: - obj->currImagePtr = obj->seqList[SEQ_LEFT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; break; case Common::KEYCODE_END: case Common::KEYCODE_KP1: - obj->currImagePtr = obj->seqList[SEQ_LEFT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_LEFT]._seqPtr; break; case Common::KEYCODE_PAGEUP: case Common::KEYCODE_KP9: - obj->currImagePtr = obj->seqList[SEQ_RIGHT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; break; case Common::KEYCODE_PAGEDOWN: case Common::KEYCODE_KP3: - obj->currImagePtr = obj->seqList[SEQ_RIGHT].seqPtr; + obj->_currImagePtr = obj->_seqList[SEQ_RIGHT]._seqPtr; break; } } @@ -109,66 +109,66 @@ void Route::setWalk(const uint16 direction) { object_t *obj = _vm->_hero; // Pointer to hero object - if (_vm->getGameStatus().storyModeFl || obj->pathType != kPathUser) // Make sure user has control + if (_vm->getGameStatus()._storyModeFl || obj->_pathType != kPathUser) // Make sure user has control return; - if (!obj->vx && !obj->vy) + if (!obj->_vx && !obj->_vy) _oldWalkDirection = 0; // Fix for consistant restarts if (direction != _oldWalkDirection) { // Direction has changed setDirection(direction); // Face new direction - obj->vx = obj->vy = 0; + obj->_vx = obj->_vy = 0; switch (direction) { // And set correct velocity case Common::KEYCODE_UP: case Common::KEYCODE_KP8: - obj->vy = -kStepDy; + obj->_vy = -kStepDy; break; case Common::KEYCODE_DOWN: case Common::KEYCODE_KP2: - obj->vy = kStepDy; + obj->_vy = kStepDy; break; case Common::KEYCODE_LEFT: case Common::KEYCODE_KP4: - obj->vx = -kStepDx; + obj->_vx = -kStepDx; break; case Common::KEYCODE_RIGHT: case Common::KEYCODE_KP6: - obj->vx = kStepDx; + obj->_vx = kStepDx; break; case Common::KEYCODE_HOME: case Common::KEYCODE_KP7: - obj->vx = -kStepDx; + obj->_vx = -kStepDx; // Note: in v1 Dos and v2 Dos, obj->vy is set to DY - obj->vy = -kStepDy / 2; + obj->_vy = -kStepDy / 2; break; case Common::KEYCODE_END: case Common::KEYCODE_KP1: - obj->vx = -kStepDx; + obj->_vx = -kStepDx; // Note: in v1 Dos and v2 Dos, obj->vy is set to -DY - obj->vy = kStepDy / 2; + obj->_vy = kStepDy / 2; break; case Common::KEYCODE_PAGEUP: case Common::KEYCODE_KP9: - obj->vx = kStepDx; + obj->_vx = kStepDx; // Note: in v1 Dos and v2 Dos, obj->vy is set to -DY - obj->vy = -kStepDy / 2; + obj->_vy = -kStepDy / 2; break; case Common::KEYCODE_PAGEDOWN: case Common::KEYCODE_KP3: - obj->vx = kStepDx; + obj->_vx = kStepDx; // Note: in v1 Dos and v2 Dos, obj->vy is set to DY - obj->vy = kStepDy / 2; + obj->_vy = kStepDy / 2; break; } _oldWalkDirection = direction; - obj->cycling = kCycleForward; + obj->_cycling = kCycleForward; } else { // Same key twice - halt hero - obj->vy = 0; - obj->vx = 0; + obj->_vy = 0; + obj->_vx = 0; _oldWalkDirection = 0; - obj->cycling = kCycleNotCycling; + obj->_cycling = kCycleNotCycling; } } @@ -228,7 +228,7 @@ void Route::segment(int16 x, int16 y) { if (y <= 0 || y >= kYPix - 1) return; - if (_vm->_hero->x < x1) { + if (_vm->_hero->_x < x1) { // Hero x not in segment, search x1..x2 // Find all segments above current for (x = x1; !(_routeFoundFl || _fullStackFl || _fullSegmentFl) && x <= x2; x++) { @@ -241,7 +241,7 @@ void Route::segment(int16 x, int16 y) { if (_boundaryMap[y + 1][x] == 0) segment(x, y + 1); } - } else if (_vm->_hero->x + kHeroMaxWidth > x2) { + } else if (_vm->_hero->_x + kHeroMaxWidth > x2) { // Hero x not in segment, search x1..x2 // Find all segments above current for (x = x2; !(_routeFoundFl || _fullStackFl || _fullSegmentFl) && x >= x1; x--) { @@ -257,22 +257,22 @@ void Route::segment(int16 x, int16 y) { } else { // Organize search around hero x position - this gives // better chance for more direct route. - for (x = _vm->_hero->x; !(_routeFoundFl || _fullStackFl || _fullSegmentFl) && x <= x2; x++) { + for (x = _vm->_hero->_x; !(_routeFoundFl || _fullStackFl || _fullSegmentFl) && x <= x2; x++) { if (_boundaryMap[y - 1][x] == 0) segment(x, y - 1); } - for (x = x1; !(_routeFoundFl || _fullStackFl || _fullSegmentFl) && x < _vm->_hero->x; x++) { + for (x = x1; !(_routeFoundFl || _fullStackFl || _fullSegmentFl) && x < _vm->_hero->_x; x++) { if (_boundaryMap[y - 1][x] == 0) segment(x, y - 1); } - for (x = _vm->_hero->x; !(_routeFoundFl || _fullStackFl || _fullSegmentFl) && x <= x2; x++) { + for (x = _vm->_hero->_x; !(_routeFoundFl || _fullStackFl || _fullSegmentFl) && x <= x2; x++) { if (_boundaryMap[y + 1][x] == 0) segment(x, y + 1); } - for (x = x1; !(_routeFoundFl || _fullStackFl || _fullSegmentFl) && x < _vm->_hero->x; x++) { + for (x = x1; !(_routeFoundFl || _fullStackFl || _fullSegmentFl) && x < _vm->_hero->_x; x++) { if (_boundaryMap[y + 1][x] == 0) segment(x, y + 1); } @@ -327,16 +327,16 @@ bool Route::findRoute(const int16 cx, const int16 cy) { _destY = cy; // Destination coords _destX = cx; // Destination coords - int16 herox1 = _vm->_hero->x + _vm->_hero->currImagePtr->x1; // Hero baseline - int16 herox2 = _vm->_hero->x + _vm->_hero->currImagePtr->x2; // Hero baseline - int16 heroy = _vm->_hero->y + _vm->_hero->currImagePtr->y2; // Hero baseline + int16 herox1 = _vm->_hero->_x + _vm->_hero->_currImagePtr->_x1; // Hero baseline + int16 herox2 = _vm->_hero->_x + _vm->_hero->_currImagePtr->_x2; // Hero baseline + int16 heroy = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2; // Hero baseline // Store all object baselines into objbound (except hero's = [0]) object_t *obj; // Ptr to object int i; for (i = 1, obj = &_vm->_object->_objects[i]; i < _vm->_object->_numObj; i++, obj++) { - if ((obj->screenIndex == *_vm->_screen_p) && (obj->cycling != kCycleInvisible) && (obj->priority == kPriorityFloating)) - _vm->_object->storeBoundary(obj->oldx + obj->currImagePtr->x1, obj->oldx + obj->currImagePtr->x2, obj->oldy + obj->currImagePtr->y2); + if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling != kCycleInvisible) && (obj->_priority == kPriorityFloating)) + _vm->_object->storeBoundary(obj->_oldx + obj->_currImagePtr->_x1, obj->_oldx + obj->_currImagePtr->_x2, obj->_oldy + obj->_currImagePtr->_y2); } // Combine objbound and boundary bitmaps to local byte map @@ -350,8 +350,8 @@ bool Route::findRoute(const int16 cx, const int16 cy) { // Clear all object baselines from objbound for (i = 0, obj = _vm->_object->_objects; i < _vm->_object->_numObj; i++, obj++) { - if ((obj->screenIndex == *_vm->_screen_p) && (obj->cycling != kCycleInvisible) && (obj->priority == kPriorityFloating)) - _vm->_object->clearBoundary(obj->oldx + obj->currImagePtr->x1, obj->oldx + obj->currImagePtr->x2, obj->oldy + obj->currImagePtr->y2); + if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling != kCycleInvisible) && (obj->_priority == kPriorityFloating)) + _vm->_object->clearBoundary(obj->_oldx + obj->_currImagePtr->_x1, obj->_oldx + obj->_currImagePtr->_x2, obj->_oldy + obj->_currImagePtr->_y2); } // Search from hero to destination @@ -433,18 +433,18 @@ void Route::processRoute() { return; // Current hero position - int16 herox = _vm->_hero->x + _vm->_hero->currImagePtr->x1; - int16 heroy = _vm->_hero->y + _vm->_hero->currImagePtr->y2; + int16 herox = _vm->_hero->_x + _vm->_hero->_currImagePtr->_x1; + int16 heroy = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2; Point *routeNode = &_route[_routeIndex]; // Arrived at node? if (abs(herox - routeNode->x) < kStepDx + 1 && abs(heroy - routeNode->y) < kStepDy) { // kStepDx too low // Close enough - position hero exactly - _vm->_hero->x = _vm->_hero->oldx = routeNode->x - _vm->_hero->currImagePtr->x1; - _vm->_hero->y = _vm->_hero->oldy = routeNode->y - _vm->_hero->currImagePtr->y2; - _vm->_hero->vx = _vm->_hero->vy = 0; - _vm->_hero->cycling = kCycleNotCycling; + _vm->_hero->_x = _vm->_hero->_oldx = routeNode->x - _vm->_hero->_currImagePtr->_x1; + _vm->_hero->_y = _vm->_hero->_oldy = routeNode->y - _vm->_hero->_currImagePtr->_y2; + _vm->_hero->_vx = _vm->_hero->_vy = 0; + _vm->_hero->_cycling = kCycleNotCycling; // Arrived at final node? if (--_routeIndex < 0) { @@ -458,7 +458,7 @@ void Route::processRoute() { _vm->_object->lookObject(&_vm->_object->_objects[_routeObjId]); turnedFl = false; } else { - setDirection(_vm->_object->_objects[_routeObjId].direction); + setDirection(_vm->_object->_objects[_routeObjId]._direction); _routeIndex++; // Come round again turnedFl = true; } @@ -468,7 +468,7 @@ void Route::processRoute() { _vm->_object->useObject(_routeObjId); turnedFl = false; } else { - setDirection(_vm->_object->_objects[_routeObjId].direction); + setDirection(_vm->_object->_objects[_routeObjId]._direction); _routeIndex++; // Come round again turnedFl = true; } @@ -477,7 +477,7 @@ void Route::processRoute() { break; } } - } else if (_vm->_hero->vx == 0 && _vm->_hero->vy == 0) { + } else if (_vm->_hero->_vx == 0 && _vm->_hero->_vy == 0) { // Set direction of travel if at a node // Note realignment when changing to (thinner) up/down sprite, // otherwise hero could bump into boundaries along route. @@ -487,10 +487,10 @@ void Route::processRoute() { setWalk(Common::KEYCODE_LEFT); } else if (heroy < routeNode->y) { setWalk(Common::KEYCODE_DOWN); - _vm->_hero->x = _vm->_hero->oldx = routeNode->x - _vm->_hero->currImagePtr->x1; + _vm->_hero->_x = _vm->_hero->_oldx = routeNode->x - _vm->_hero->_currImagePtr->_x1; } else if (heroy > routeNode->y) { setWalk(Common::KEYCODE_UP); - _vm->_hero->x = _vm->_hero->oldx = routeNode->x - _vm->_hero->currImagePtr->x1; + _vm->_hero->_x = _vm->_hero->_oldx = routeNode->x - _vm->_hero->_currImagePtr->_x1; } } } @@ -504,7 +504,7 @@ bool Route::startRoute(const go_t routeType, const int16 objId, int16 cx, int16 debugC(1, kDebugRoute, "startRoute(%d, %d, %d, %d)", routeType, objId, cx, cy); // Don't attempt to walk if user does not have control - if (_vm->_hero->pathType != kPathUser) + if (_vm->_hero->_pathType != kPathUser) return false; // if inventory showing, make it go away @@ -521,7 +521,7 @@ bool Route::startRoute(const go_t routeType, const int16 objId, int16 cx, int16 bool foundFl = false; // TRUE if route found ok if ((foundFl = findRoute(cx, cy))) { // Found a route? _routeIndex = _routeListIndex; // Node index - _vm->_hero->vx = _vm->_hero->vy = 0; // Stop manual motion + _vm->_hero->_vx = _vm->_hero->_vy = 0; // Stop manual motion } return foundFl; diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp index 896e8fa2ce..18e414420a 100644 --- a/engines/hugo/schedule.cpp +++ b/engines/hugo/schedule.cpp @@ -112,7 +112,7 @@ void Scheduler::insertActionList(const uint16 actIndex) { uint32 Scheduler::getWinTicks() const { debugC(5, kDebugSchedule, "getWinTicks()"); - return _vm->getGameStatus().tick; + return _vm->getGameStatus()._tick; } /** @@ -656,32 +656,32 @@ void Scheduler::screenActions(const int screenNum) { void Scheduler::processMaze(const int x1, const int x2, const int y1, const int y2) { debugC(1, kDebugSchedule, "processMaze"); - if (x1 < _vm->_maze.x1) { + if (x1 < _vm->_maze._x1) { // Exit west _actListArr[_alNewscrIndex][3].a8.screenIndex = *_vm->_screen_p - 1; - _actListArr[_alNewscrIndex][0].a2.x = _vm->_maze.x2 - kShiftSize - (x2 - x1); - _actListArr[_alNewscrIndex][0].a2.y = _vm->_hero->y; + _actListArr[_alNewscrIndex][0].a2.x = _vm->_maze._x2 - kShiftSize - (x2 - x1); + _actListArr[_alNewscrIndex][0].a2.y = _vm->_hero->_y; _vm->_route->resetRoute(); insertActionList(_alNewscrIndex); - } else if (x2 > _vm->_maze.x2) { + } else if (x2 > _vm->_maze._x2) { // Exit east _actListArr[_alNewscrIndex][3].a8.screenIndex = *_vm->_screen_p + 1; - _actListArr[_alNewscrIndex][0].a2.x = _vm->_maze.x1 + kShiftSize; - _actListArr[_alNewscrIndex][0].a2.y = _vm->_hero->y; + _actListArr[_alNewscrIndex][0].a2.x = _vm->_maze._x1 + kShiftSize; + _actListArr[_alNewscrIndex][0].a2.y = _vm->_hero->_y; _vm->_route->resetRoute(); insertActionList(_alNewscrIndex); - } else if (y1 < _vm->_maze.y1 - kShiftSize) { + } else if (y1 < _vm->_maze._y1 - kShiftSize) { // Exit north - _actListArr[_alNewscrIndex][3].a8.screenIndex = *_vm->_screen_p - _vm->_maze.size; - _actListArr[_alNewscrIndex][0].a2.x = _vm->_maze.x3; - _actListArr[_alNewscrIndex][0].a2.y = _vm->_maze.y2 - kShiftSize - (y2 - y1); + _actListArr[_alNewscrIndex][3].a8.screenIndex = *_vm->_screen_p - _vm->_maze._size; + _actListArr[_alNewscrIndex][0].a2.x = _vm->_maze._x3; + _actListArr[_alNewscrIndex][0].a2.y = _vm->_maze._y2 - kShiftSize - (y2 - y1); _vm->_route->resetRoute(); insertActionList(_alNewscrIndex); - } else if (y2 > _vm->_maze.y2 - kShiftSize / 2) { + } else if (y2 > _vm->_maze._y2 - kShiftSize / 2) { // Exit south - _actListArr[_alNewscrIndex][3].a8.screenIndex = *_vm->_screen_p + _vm->_maze.size; - _actListArr[_alNewscrIndex][0].a2.x = _vm->_maze.x4; - _actListArr[_alNewscrIndex][0].a2.y = _vm->_maze.y1 + kShiftSize; + _actListArr[_alNewscrIndex][3].a8.screenIndex = *_vm->_screen_p + _vm->_maze._size; + _actListArr[_alNewscrIndex][0].a2.x = _vm->_maze._x4; + _actListArr[_alNewscrIndex][0].a2.y = _vm->_maze._y1 + kShiftSize; _vm->_route->resetRoute(); insertActionList(_alNewscrIndex); } @@ -1144,7 +1144,7 @@ void Scheduler::insertAction(act *action) { break; // Workaround: When dying, switch to storyMode in order to block the keyboard. case GAMEOVER: - _vm->getGameStatus().storyModeFl = true; + _vm->getGameStatus()._storyModeFl = true; // No break on purpose default: curEvent->localActionFl = true; // Rest are for current screen only @@ -1205,12 +1205,12 @@ event_t *Scheduler::doAction(event_t *curEvent) { insertActionList(action->a0.actIndex); break; case START_OBJ: // act1: Start an object cycling - _vm->_object->_objects[action->a1.objIndex].cycleNumb = action->a1.cycleNumb; - _vm->_object->_objects[action->a1.objIndex].cycling = action->a1.cycle; + _vm->_object->_objects[action->a1.objIndex]._cycleNumb = action->a1.cycleNumb; + _vm->_object->_objects[action->a1.objIndex]._cycling = action->a1.cycle; break; case INIT_OBJXY: // act2: Initialize an object - _vm->_object->_objects[action->a2.objIndex].x = action->a2.x; // Coordinates - _vm->_object->_objects[action->a2.objIndex].y = action->a2.y; + _vm->_object->_objects[action->a2.objIndex]._x = action->a2.x; // Coordinates + _vm->_object->_objects[action->a2.objIndex]._y = action->a2.y; break; case PROMPT: // act3: Prompt user for key phrase promptAction(action); @@ -1225,21 +1225,21 @@ event_t *Scheduler::doAction(event_t *curEvent) { _vm->_object->setCarry(action->a6.objIndex, action->a6.carriedFl); // carried status break; case INIT_HF_COORD: // act7: Initialize an object to hero's "feet" coords - _vm->_object->_objects[action->a7.objIndex].x = _vm->_hero->x - 1; - _vm->_object->_objects[action->a7.objIndex].y = _vm->_hero->y + _vm->_hero->currImagePtr->y2 - 1; - _vm->_object->_objects[action->a7.objIndex].screenIndex = *_vm->_screen_p; // Don't forget screen! + _vm->_object->_objects[action->a7.objIndex]._x = _vm->_hero->_x - 1; + _vm->_object->_objects[action->a7.objIndex]._y = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2 - 1; + _vm->_object->_objects[action->a7.objIndex]._screenIndex = *_vm->_screen_p; // Don't forget screen! break; case NEW_SCREEN: // act8: Start new screen newScreen(action->a8.screenIndex); break; case INIT_OBJSTATE: // act9: Initialize an object state - _vm->_object->_objects[action->a9.objIndex].state = action->a9.newState; + _vm->_object->_objects[action->a9.objIndex]._state = action->a9.newState; break; case INIT_PATH: // act10: Initialize an object path and velocity _vm->_object->setPath(action->a10.objIndex, (path_t) action->a10.newPathType, action->a10.vxPath, action->a10.vyPath); break; case COND_R: // act11: action lists conditional on object state - if (_vm->_object->_objects[action->a11.objIndex].state == action->a11.stateReq) + if (_vm->_object->_objects[action->a11.objIndex]._state == action->a11.stateReq) insertActionList(action->a11.actPassIndex); else insertActionList(action->a11.actFailIndex); @@ -1251,7 +1251,7 @@ event_t *Scheduler::doAction(event_t *curEvent) { _vm->_object->swapImages(action->a13.objIndex1, action->a13.objIndex2); break; case COND_SCR: // act14: Conditional on current screen - if (_vm->_object->_objects[action->a14.objIndex].screenIndex == action->a14.screenReq) + if (_vm->_object->_objects[action->a14.objIndex]._screenIndex == action->a14.screenReq) insertActionList(action->a14.actPassIndex); else insertActionList(action->a14.actFailIndex); @@ -1262,16 +1262,16 @@ event_t *Scheduler::doAction(event_t *curEvent) { case INIT_OBJ_SEQ: // act16: Set sequence number to use // Note: Don't set a sequence at time 0 of a new screen, it causes // problems clearing the boundary bits of the object! t>0 is safe - _vm->_object->_objects[action->a16.objIndex].currImagePtr = _vm->_object->_objects[action->a16.objIndex].seqList[action->a16.seqIndex].seqPtr; + _vm->_object->_objects[action->a16.objIndex]._currImagePtr = _vm->_object->_objects[action->a16.objIndex]._seqList[action->a16.seqIndex]._seqPtr; break; case SET_STATE_BITS: // act17: OR mask with curr obj state - _vm->_object->_objects[action->a17.objIndex].state |= action->a17.stateMask; + _vm->_object->_objects[action->a17.objIndex]._state |= action->a17.stateMask; break; case CLEAR_STATE_BITS: // act18: AND ~mask with curr obj state - _vm->_object->_objects[action->a18.objIndex].state &= ~action->a18.stateMask; + _vm->_object->_objects[action->a18.objIndex]._state &= ~action->a18.stateMask; break; case TEST_STATE_BITS: // act19: If all bits set, do apass else afail - if ((_vm->_object->_objects[action->a19.objIndex].state & action->a19.stateMask) == action->a19.stateMask) + if ((_vm->_object->_objects[action->a19.objIndex]._state & action->a19.stateMask) == action->a19.stateMask) insertActionList(action->a19.actPassIndex); else insertActionList(action->a19.actFailIndex); @@ -1282,12 +1282,12 @@ event_t *Scheduler::doAction(event_t *curEvent) { case GAMEOVER: // act21: Game over! // NOTE: Must wait at least 1 tick before issuing this action if // any objects are to be made invisible! - gameStatus.gameOverFl = true; + gameStatus._gameOverFl = true; break; case INIT_HH_COORD: // act22: Initialize an object to hero's actual coords - _vm->_object->_objects[action->a22.objIndex].x = _vm->_hero->x; - _vm->_object->_objects[action->a22.objIndex].y = _vm->_hero->y; - _vm->_object->_objects[action->a22.objIndex].screenIndex = *_vm->_screen_p;// Don't forget screen! + _vm->_object->_objects[action->a22.objIndex]._x = _vm->_hero->_x; + _vm->_object->_objects[action->a22.objIndex]._y = _vm->_hero->_y; + _vm->_object->_objects[action->a22.objIndex]._screenIndex = *_vm->_screen_p;// Don't forget screen! break; case EXIT: // act23: Exit game back to DOS _vm->endGame(); @@ -1297,8 +1297,8 @@ event_t *Scheduler::doAction(event_t *curEvent) { break; case COND_BOX: // act25: Conditional on bounding box obj1 = &_vm->_object->_objects[action->a25.objIndex]; - dx = obj1->x + obj1->currImagePtr->x1; - dy = obj1->y + obj1->currImagePtr->y2; + dx = obj1->_x + obj1->_currImagePtr->_x1; + dy = obj1->_y + obj1->_currImagePtr->_y2; if ((dx >= action->a25.x1) && (dx <= action->a25.x2) && (dy >= action->a25.y1) && (dy <= action->a25.y2)) insertActionList(action->a25.actPassIndex); @@ -1312,10 +1312,10 @@ event_t *Scheduler::doAction(event_t *curEvent) { _vm->_sound->playSound(action->a26.soundIndex, kSoundPriorityMedium); break; case ADD_SCORE: // act27: Add object's value to score - _vm->adjustScore(_vm->_object->_objects[action->a27.objIndex].objValue); + _vm->adjustScore(_vm->_object->_objects[action->a27.objIndex]._objValue); break; case SUB_SCORE: // act28: Subtract object's value from score - _vm->adjustScore(-_vm->_object->_objects[action->a28.objIndex].objValue); + _vm->adjustScore(-_vm->_object->_objects[action->a28.objIndex]._objValue); break; case COND_CARRY: // act29: Conditional on object being carried if (_vm->_object->isCarried(action->a29.objIndex)) @@ -1324,24 +1324,24 @@ event_t *Scheduler::doAction(event_t *curEvent) { insertActionList(action->a29.actFailIndex); break; case INIT_MAZE: // act30: Enable and init maze structure - _vm->_maze.enabledFl = true; - _vm->_maze.size = action->a30.mazeSize; - _vm->_maze.x1 = action->a30.x1; - _vm->_maze.y1 = action->a30.y1; - _vm->_maze.x2 = action->a30.x2; - _vm->_maze.y2 = action->a30.y2; - _vm->_maze.x3 = action->a30.x3; - _vm->_maze.x4 = action->a30.x4; - _vm->_maze.firstScreenIndex = action->a30.firstScreenIndex; + _vm->_maze._enabledFl = true; + _vm->_maze._size = action->a30.mazeSize; + _vm->_maze._x1 = action->a30.x1; + _vm->_maze._y1 = action->a30.y1; + _vm->_maze._x2 = action->a30.x2; + _vm->_maze._y2 = action->a30.y2; + _vm->_maze._x3 = action->a30.x3; + _vm->_maze._x4 = action->a30.x4; + _vm->_maze._firstScreenIndex = action->a30.firstScreenIndex; break; case EXIT_MAZE: // act31: Disable maze mode - _vm->_maze.enabledFl = false; + _vm->_maze._enabledFl = false; break; case INIT_PRIORITY: - _vm->_object->_objects[action->a32.objIndex].priority = action->a32.priority; + _vm->_object->_objects[action->a32.objIndex]._priority = action->a32.priority; break; case INIT_SCREEN: - _vm->_object->_objects[action->a33.objIndex].screenIndex = action->a33.screenIndex; + _vm->_object->_objects[action->a33.objIndex]._screenIndex = action->a33.screenIndex; break; case AGSCHEDULE: // act34: Schedule a (global) action list insertActionList(action->a34.actIndex); @@ -1359,15 +1359,15 @@ event_t *Scheduler::doAction(event_t *curEvent) { _vm->_screenStates[action->a37.screenIndex] = action->a37.newState; break; case INIT_LIPS: // act38: Position lips on object - _vm->_object->_objects[action->a38.lipsObjIndex].x = _vm->_object->_objects[action->a38.objIndex].x + action->a38.dxLips; - _vm->_object->_objects[action->a38.lipsObjIndex].y = _vm->_object->_objects[action->a38.objIndex].y + action->a38.dyLips; - _vm->_object->_objects[action->a38.lipsObjIndex].screenIndex = *_vm->_screen_p; // Don't forget screen! - _vm->_object->_objects[action->a38.lipsObjIndex].cycling = kCycleForward; + _vm->_object->_objects[action->a38.lipsObjIndex]._x = _vm->_object->_objects[action->a38.objIndex]._x + action->a38.dxLips; + _vm->_object->_objects[action->a38.lipsObjIndex]._y = _vm->_object->_objects[action->a38.objIndex]._y + action->a38.dyLips; + _vm->_object->_objects[action->a38.lipsObjIndex]._screenIndex = *_vm->_screen_p; // Don't forget screen! + _vm->_object->_objects[action->a38.lipsObjIndex]._cycling = kCycleForward; break; case INIT_STORY_MODE: // act39: Init story_mode flag // This is similar to the QUIET path mode, except that it is // independant of it and it additionally disables the ">" prompt - gameStatus.storyModeFl = action->a39.storyModeFl; + gameStatus._storyModeFl = action->a39.storyModeFl; break; case WARN: // act40: Text box (CF TEXT) Utils::notifyBox(_vm->_file->fetchString(action->a40.stringIndex)); @@ -1379,7 +1379,7 @@ event_t *Scheduler::doAction(event_t *curEvent) { insertActionList(action->a41.actFailIndex); break; case TEXT_TAKE: // act42: Text box with "take" message - Utils::notifyBox(Common::String::format(TAKE_TEXT, _vm->_text->getNoun(_vm->_object->_objects[action->a42.objIndex].nounIndex, TAKE_NAME))); + Utils::notifyBox(Common::String::format(TAKE_TEXT, _vm->_text->getNoun(_vm->_object->_objects[action->a42.objIndex]._nounIndex, TAKE_NAME))); break; case YESNO: // act43: Prompt user for Yes or No if (Utils::yesNoBox(_vm->_file->fetchString(action->a43.promptIndex))) @@ -1403,16 +1403,16 @@ event_t *Scheduler::doAction(event_t *curEvent) { _vm->_mouse->setJumpExitFl(action->a46.jumpExitFl); break; case INIT_VIEW: // act47: Init object.viewx, viewy, dir - _vm->_object->_objects[action->a47.objIndex].viewx = action->a47.viewx; - _vm->_object->_objects[action->a47.objIndex].viewy = action->a47.viewy; - _vm->_object->_objects[action->a47.objIndex].direction = action->a47.direction; + _vm->_object->_objects[action->a47.objIndex]._viewx = action->a47.viewx; + _vm->_object->_objects[action->a47.objIndex]._viewy = action->a47.viewy; + _vm->_object->_objects[action->a47.objIndex]._direction = action->a47.direction; break; case INIT_OBJ_FRAME: // act48: Set seq,frame number to use // Note: Don't set a sequence at time 0 of a new screen, it causes // problems clearing the boundary bits of the object! t>0 is safe - _vm->_object->_objects[action->a48.objIndex].currImagePtr = _vm->_object->_objects[action->a48.objIndex].seqList[action->a48.seqIndex].seqPtr; + _vm->_object->_objects[action->a48.objIndex]._currImagePtr = _vm->_object->_objects[action->a48.objIndex]._seqList[action->a48.seqIndex]._seqPtr; for (dx = 0; dx < action->a48.frameIndex; dx++) - _vm->_object->_objects[action->a48.objIndex].currImagePtr = _vm->_object->_objects[action->a48.objIndex].currImagePtr->nextSeqPtr; + _vm->_object->_objects[action->a48.objIndex]._currImagePtr = _vm->_object->_objects[action->a48.objIndex]._currImagePtr->_nextSeqPtr; break; case OLD_SONG: // Replaces ACT26 for DOS games. @@ -1644,6 +1644,6 @@ void Scheduler_v1w::runScheduler() { while (curEvent && (curEvent->time <= ticker)) // While mature events found curEvent = doAction(curEvent); // Perform the action (returns next_p) - _vm->getGameStatus().tick++; // Accessed elsewhere via getTicks() + _vm->getGameStatus()._tick++; // Accessed elsewhere via getTicks() } } // End of namespace Hugo diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp index d0b4e3dfe8..eed4164d5e 100644 --- a/engines/hugo/sound.cpp +++ b/engines/hugo/sound.cpp @@ -186,7 +186,7 @@ void SoundHandler::playMusic(int16 tune) { uint16 size; // Size of sequence data if (_vm->_config.musicFl) { - _vm->getGameStatus().song = tune; + _vm->getGameStatus()._song = tune; seqPtr = _vm->_file->getSound(tune, &size); playMIDI(seqPtr, size); free(seqPtr); @@ -245,7 +245,7 @@ void SoundHandler::checkMusic() { return; for (int i = 0; _vm->_defltTunes[i] != -1; i++) { - if (_vm->_defltTunes[i] == _vm->getGameStatus().song) { + if (_vm->_defltTunes[i] == _vm->getGameStatus()._song) { if (_vm->_defltTunes[i + 1] != -1) playMusic(_vm->_defltTunes[i + 1]); else -- cgit v1.2.3 From 998448128c8527427b1b472d17c68b7770ee6f4c Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 13 Jun 2012 11:50:49 +0200 Subject: HUGO: Some more renaming --- engines/hugo/display.cpp | 66 ++++++++++++++++++++++---------------------- engines/hugo/display.h | 8 +++--- engines/hugo/file.cpp | 70 +++++++++++++++++++++++------------------------ engines/hugo/file.h | 42 ++++++++++++++-------------- engines/hugo/file_v1w.cpp | 28 +++++++++---------- engines/hugo/file_v2d.cpp | 46 +++++++++++++++---------------- engines/hugo/file_v3d.cpp | 60 ++++++++++++++++++++-------------------- 7 files changed, 160 insertions(+), 160 deletions(-) diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index 7028195dd4..12a9edfbb7 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -85,20 +85,20 @@ Screen::Screen(HugoEngine *vm) : _vm(vm) { fontLoadedFl[i] = false; } for (int i = 0; i < kBlitListSize; i++) { - _dlBlistList[i].x = 0; - _dlBlistList[i].y = 0; - _dlBlistList[i].dx = 0; - _dlBlistList[i].dy = 0; + _dlBlistList[i]._x = 0; + _dlBlistList[i]._y = 0; + _dlBlistList[i]._dx = 0; + _dlBlistList[i]._dy = 0; } for (int i = 0; i < kRectListSize; i++) { - _dlAddList[i].x = 0; - _dlAddList[i].y = 0; - _dlAddList[i].dx = 0; - _dlAddList[i].dy = 0; - _dlRestoreList[i].x = 0; - _dlRestoreList[i].y = 0; - _dlRestoreList[i].dx = 0; - _dlRestoreList[i].dy = 0; + _dlAddList[i]._x = 0; + _dlAddList[i]._y = 0; + _dlAddList[i]._dx = 0; + _dlAddList[i]._dy = 0; + _dlRestoreList[i]._x = 0; + _dlRestoreList[i]._y = 0; + _dlRestoreList[i]._dx = 0; + _dlRestoreList[i]._dy = 0; } } @@ -274,15 +274,15 @@ void Screen::displayFrame(const int sx, const int sy, seq_t *seq, const bool for void Screen::merge(const rect_t *rectA, rect_t *rectB) { debugC(6, kDebugDisplay, "merge()"); - int16 xa = rectA->x + rectA->dx; // Find x2,y2 for each rectangle - int16 xb = rectB->x + rectB->dx; - int16 ya = rectA->y + rectA->dy; - int16 yb = rectB->y + rectB->dy; + int16 xa = rectA->_x + rectA->_dx; // Find x2,y2 for each rectangle + int16 xb = rectB->_x + rectB->_dx; + int16 ya = rectA->_y + rectA->_dy; + int16 yb = rectB->_y + rectB->_dy; - rectB->x = MIN(rectA->x, rectB->x); // Minimum x,y - rectB->y = MIN(rectA->y, rectB->y); - rectB->dx = MAX(xa, xb) - rectB->x; // Maximum dx,dy - rectB->dy = MAX(ya, yb) - rectB->y; + rectB->_x = MIN(rectA->_x, rectB->_x); // Minimum x,y + rectB->_y = MIN(rectA->_y, rectB->_y); + rectB->_dx = MAX(xa, xb) - rectB->_x; // Maximum dx,dy + rectB->_dy = MAX(ya, yb) - rectB->_y; } /** @@ -301,7 +301,7 @@ int16 Screen::mergeLists(rect_t *list, rect_t *blist, const int16 len, int16 ble int16 c = 0; rect_t *bp = blist; for (int16 b = 0; b < blen; b++, bp++) { - if (bp->dx) // blist entry used + if (bp->_dx) // blist entry used if (isOverlapping(list, bp)) coalesce[c++] = b; } @@ -318,7 +318,7 @@ int16 Screen::mergeLists(rect_t *list, rect_t *blist, const int16 len, int16 ble while (--c) { rect_t *cp = &blist[coalesce[c]]; merge(cp, bp); - cp->dx = 0; // Delete entry + cp->_dx = 0; // Delete entry } } } @@ -348,10 +348,10 @@ void Screen::displayList(dupdate_t update, ...) { } va_start(marker, update); // Initialize variable arguments p = &_dlAddList[_dlAddIndex]; - p->x = va_arg(marker, int); // x - p->y = va_arg(marker, int); // y - p->dx = va_arg(marker, int); // dx - p->dy = va_arg(marker, int); // dy + p->_x = va_arg(marker, int); // x + p->_y = va_arg(marker, int); // y + p->_dx = va_arg(marker, int); // dx + p->_dy = va_arg(marker, int); // dy va_end(marker); // Reset variable arguments _dlAddIndex++; break; @@ -370,15 +370,15 @@ void Screen::displayList(dupdate_t update, ...) { // Blit the combined blit-list for (_dlRestoreIndex = 0, p = _dlBlistList; _dlRestoreIndex < blitLength; _dlRestoreIndex++, p++) { - if (p->dx) // Marks a used entry - displayRect(p->x, p->y, p->dx, p->dy); + if (p->_dx) // Marks a used entry + displayRect(p->_x, p->_y, p->_dx, p->_dy); } break; case kDisplayRestore: // Restore each rectangle for (_dlRestoreIndex = 0, p = _dlAddList; _dlRestoreIndex < _dlAddIndex; _dlRestoreIndex++, p++) { // Restoring from _backBuffer to _frontBuffer _dlRestoreList[_dlRestoreIndex] = *p; // Copy add-list to restore-list - moveImage(_backBuffer, p->x, p->y, p->dx, p->dy, kXPix, _frontBuffer, p->x, p->y, kXPix); + moveImage(_backBuffer, p->_x, p->_y, p->_dx, p->_dy, kXPix, _frontBuffer, p->_x, p->_y, kXPix); } _dlAddIndex = 0; // Reset add-list break; @@ -628,19 +628,19 @@ void Screen::hideCursor() { } bool Screen::isInX(const int16 x, const rect_t *rect) const { - return (x >= rect->x) && (x <= rect->x + rect->dx); + return (x >= rect->_x) && (x <= rect->_x + rect->_dx); } bool Screen::isInY(const int16 y, const rect_t *rect) const { - return (y >= rect->y) && (y <= rect->y + rect->dy); + return (y >= rect->_y) && (y <= rect->_y + rect->_dy); } /** * Check if two rectangles are overlapping */ bool Screen::isOverlapping(const rect_t *rectA, const rect_t *rectB) const { - return (isInX(rectA->x, rectB) || isInX(rectA->x + rectA->dx, rectB) || isInX(rectB->x, rectA) || isInX(rectB->x + rectB->dx, rectA)) && - (isInY(rectA->y, rectB) || isInY(rectA->y + rectA->dy, rectB) || isInY(rectB->y, rectA) || isInY(rectB->y + rectB->dy, rectA)); + return (isInX(rectA->_x, rectB) || isInX(rectA->_x + rectA->_dx, rectB) || isInX(rectB->_x, rectA) || isInX(rectB->_x + rectB->_dx, rectA)) && + (isInY(rectA->_y, rectB) || isInY(rectA->_y + rectA->_dy, rectB) || isInY(rectB->_y, rectA) || isInY(rectB->_y + rectB->_dy, rectA)); } /** diff --git a/engines/hugo/display.h b/engines/hugo/display.h index 38c63e9fe5..0d8120e916 100644 --- a/engines/hugo/display.h +++ b/engines/hugo/display.h @@ -39,10 +39,10 @@ static const int kCenter = -1; // Used to center text in x class Screen { public: struct rect_t { // Rectangle used in Display list - int16 x; // Position in dib - int16 y; // Position in dib - int16 dx; // width - int16 dy; // height + int16 _x; // Position in dib + int16 _y; // Position in dib + int16 _dx; // width + int16 _dy; // height }; Screen(HugoEngine *vm); diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp index 8b03a9a430..a3fc5dfe49 100644 --- a/engines/hugo/file.cpp +++ b/engines/hugo/file.cpp @@ -53,7 +53,7 @@ static const int s_bootCypherLen = sizeof(s_bootCypher) - 1; FileManager::FileManager(HugoEngine *vm) : _vm(vm) { - has_read_header = false; + _hasReadHeader = false; firstUIFFl = true; } @@ -115,23 +115,23 @@ seq_t *FileManager::readPCX(Common::ReadStream &f, seq_t *seqPtr, byte *imagePtr debugC(1, kDebugFile, "readPCX(..., %s)", name); // Read in the PCC header and check consistency - PCC_header.mfctr = f.readByte(); - PCC_header.vers = f.readByte(); - PCC_header.enc = f.readByte(); - PCC_header.bpx = f.readByte(); - PCC_header.x1 = f.readUint16LE(); - PCC_header.y1 = f.readUint16LE(); - PCC_header.x2 = f.readUint16LE(); - PCC_header.y2 = f.readUint16LE(); - PCC_header.xres = f.readUint16LE(); - PCC_header.yres = f.readUint16LE(); - f.read(PCC_header.palette, sizeof(PCC_header.palette)); - PCC_header.vmode = f.readByte(); - PCC_header.planes = f.readByte(); - PCC_header.bytesPerLine = f.readUint16LE(); - f.read(PCC_header.fill2, sizeof(PCC_header.fill2)); - - if (PCC_header.mfctr != 10) + _PCCHeader._mfctr = f.readByte(); + _PCCHeader._vers = f.readByte(); + _PCCHeader._enc = f.readByte(); + _PCCHeader._bpx = f.readByte(); + _PCCHeader._x1 = f.readUint16LE(); + _PCCHeader._y1 = f.readUint16LE(); + _PCCHeader._x2 = f.readUint16LE(); + _PCCHeader._y2 = f.readUint16LE(); + _PCCHeader._xres = f.readUint16LE(); + _PCCHeader._yres = f.readUint16LE(); + f.read(_PCCHeader._palette, sizeof(_PCCHeader._palette)); + _PCCHeader._vmode = f.readByte(); + _PCCHeader._planes = f.readByte(); + _PCCHeader._bytesPerLine = f.readUint16LE(); + f.read(_PCCHeader._fill2, sizeof(_PCCHeader._fill2)); + + if (_PCCHeader._mfctr != 10) error("Bad data file format: %s", name); // Allocate memory for seq_t if 0 @@ -142,10 +142,10 @@ seq_t *FileManager::readPCX(Common::ReadStream &f, seq_t *seqPtr, byte *imagePtr // Find size of image data in 8-bit DIB format // Note save of x2 - marks end of valid data before garbage - uint16 bytesPerLine4 = PCC_header.bytesPerLine * 4; // 4-bit bpl + uint16 bytesPerLine4 = _PCCHeader._bytesPerLine * 4; // 4-bit bpl seqPtr->_bytesPerLine8 = bytesPerLine4 * 2; // 8-bit bpl - seqPtr->_lines = PCC_header.y2 - PCC_header.y1 + 1; - seqPtr->_x2 = PCC_header.x2 - PCC_header.x1 + 1; + seqPtr->_lines = _PCCHeader._y2 - _PCCHeader._y1 + 1; + seqPtr->_x2 = _PCCHeader._x2 - _PCCHeader._x1 + 1; // Size of the image uint16 size = seqPtr->_lines * seqPtr->_bytesPerLine8; @@ -168,12 +168,12 @@ seq_t *FileManager::readPCX(Common::ReadStream &f, seq_t *seqPtr, byte *imagePtr for (int i = 0; i < (c & kLengthMask); i++) { *p++ = d; if ((uint16)(p - pline) == bytesPerLine4) - p = convertPCC(pline, y++, PCC_header.bytesPerLine, imagePtr); + p = convertPCC(pline, y++, _PCCHeader._bytesPerLine, imagePtr); } } else { *p++ = c; if ((uint16)(p - pline) == bytesPerLine4) - p = convertPCC(pline, y++, PCC_header.bytesPerLine, imagePtr); + p = convertPCC(pline, y++, _PCCHeader._bytesPerLine, imagePtr); } } return seqPtr; @@ -296,27 +296,27 @@ sound_pt FileManager::getSound(const int16 sound, uint16 *size) { return 0; } - if (!has_read_header) { + if (!_hasReadHeader) { for (int i = 0; i < kMaxSounds; i++) { - s_hdr[i]._size = fp.readUint16LE(); - s_hdr[i]._offset = fp.readUint32LE(); + _s_hdr[i]._size = fp.readUint16LE(); + _s_hdr[i]._offset = fp.readUint32LE(); } if (fp.err()) error("Wrong sound file format"); - has_read_header = true; + _hasReadHeader = true; } - *size = s_hdr[sound]._size; + *size = _s_hdr[sound]._size; if (*size == 0) error("Wrong sound file format or missing sound %d", sound); // Allocate memory for sound or music, if possible - sound_pt soundPtr = (byte *)malloc(s_hdr[sound]._size); // Ptr to sound data + sound_pt soundPtr = (byte *)malloc(_s_hdr[sound]._size); // Ptr to sound data assert(soundPtr); // Seek to data and read it - fp.seek(s_hdr[sound]._offset, SEEK_SET); - if (fp.read(soundPtr, s_hdr[sound]._size) != s_hdr[sound]._size) + fp.seek(_s_hdr[sound]._offset, SEEK_SET); + if (fp.read(soundPtr, _s_hdr[sound]._size) != _s_hdr[sound]._size) error("Wrong sound file format"); fp.close(); @@ -639,8 +639,8 @@ uif_hdr_t *FileManager::getUIFHeader(const uif_t id) { error("Wrong UIF file format"); for (int i = 0; i < kMaxUifs; ++i) { - UIFHeader[i].size = ip.readUint16LE(); - UIFHeader[i].offset = ip.readUint32LE(); + UIFHeader[i]._size = ip.readUint16LE(); + UIFHeader[i]._offset = ip.readUint32LE(); } ip.close(); @@ -661,7 +661,7 @@ void FileManager::readUIFItem(const int16 id, byte *buf) { // Seek to data uif_hdr_t *UIFHeaderPtr = getUIFHeader((uif_t)id); - ip.seek(UIFHeaderPtr->offset, SEEK_SET); + ip.seek(UIFHeaderPtr->_offset, SEEK_SET); // We support pcx images and straight data seq_t *dummySeq; // Dummy seq_t for image data @@ -671,7 +671,7 @@ void FileManager::readUIFItem(const int16 id, byte *buf) { free(dummySeq); break; default: // Read file data into supplied array - if (ip.read(buf, UIFHeaderPtr->size) != UIFHeaderPtr->size) + if (ip.read(buf, UIFHeaderPtr->_size) != UIFHeaderPtr->_size) error("Wrong UIF file format"); break; } diff --git a/engines/hugo/file.h b/engines/hugo/file.h index 3792c01ab4..81d3c73f5a 100644 --- a/engines/hugo/file.h +++ b/engines/hugo/file.h @@ -37,8 +37,8 @@ namespace Hugo { enum ovl_t {kOvlBoundary, kOvlOverlay, kOvlBase}; struct uif_hdr_t { // UIF font/image look up - uint16 size; // Size of uif item - uint32 offset; // Offset of item in file + uint16 _size; // Size of uif item + uint32 _offset; // Offset of item in file }; @@ -85,24 +85,24 @@ protected: * Structure of scenery file lookup entry */ struct sceneBlock_t { - uint32 scene_off; - uint32 scene_len; - uint32 b_off; - uint32 b_len; - uint32 o_off; - uint32 o_len; - uint32 ob_off; - uint32 ob_len; + uint32 _scene_off; + uint32 _scene_len; + uint32 _b_off; + uint32 _b_len; + uint32 _o_off; + uint32 _o_len; + uint32 _ob_off; + uint32 _ob_len; }; - struct PCC_header_t { // Structure of PCX file header - byte mfctr, vers, enc, bpx; - uint16 x1, y1, x2, y2; // bounding box - uint16 xres, yres; - byte palette[3 * kNumColors]; // EGA color palette - byte vmode, planes; - uint16 bytesPerLine; // Bytes per line - byte fill2[60]; + struct _PCCHeader_t { // Structure of PCX file header + byte _mfctr, _vers, _enc, _bpx; + uint16 _x1, _y1, _x2, _y2; // bounding box + uint16 _xres, _yres; + byte _palette[3 * kNumColors]; // EGA color palette + byte _vmode, _planes; + uint16 _bytesPerLine; // Bytes per line + byte _fill2[60]; }; // Header of a PCC file bool firstUIFFl; @@ -112,13 +112,13 @@ protected: Common::File _sceneryArchive1; // Handle for scenery file Common::File _objectsArchive; // Handle for objects file - PCC_header_t PCC_header; + _PCCHeader_t _PCCHeader; seq_t *readPCX(Common::ReadStream &f, seq_t *seqPtr, byte *imagePtr, const bool firstFl, const char *name); // If this is the first call, read the lookup table - bool has_read_header; - sound_hdr_t s_hdr[kMaxSounds]; // Sound lookup table + bool _hasReadHeader; + sound_hdr_t _s_hdr[kMaxSounds]; // Sound lookup table private: byte *convertPCC(byte *p, const uint16 y, const uint16 bpl, image_pt dataPtr) const; diff --git a/engines/hugo/file_v1w.cpp b/engines/hugo/file_v1w.cpp index 8a06cef939..3bb4b66367 100644 --- a/engines/hugo/file_v1w.cpp +++ b/engines/hugo/file_v1w.cpp @@ -52,28 +52,28 @@ void FileManager_v1w::readOverlay(const int screenNum, image_pt image, ovl_t ove _sceneryArchive1.seek((uint32)screenNum * sizeof(sceneBlock_t), SEEK_SET); sceneBlock_t sceneBlock; // Database header entry - sceneBlock.scene_off = _sceneryArchive1.readUint32LE(); - sceneBlock.scene_len = _sceneryArchive1.readUint32LE(); - sceneBlock.b_off = _sceneryArchive1.readUint32LE(); - sceneBlock.b_len = _sceneryArchive1.readUint32LE(); - sceneBlock.o_off = _sceneryArchive1.readUint32LE(); - sceneBlock.o_len = _sceneryArchive1.readUint32LE(); - sceneBlock.ob_off = _sceneryArchive1.readUint32LE(); - sceneBlock.ob_len = _sceneryArchive1.readUint32LE(); + sceneBlock._scene_off = _sceneryArchive1.readUint32LE(); + sceneBlock._scene_len = _sceneryArchive1.readUint32LE(); + sceneBlock._b_off = _sceneryArchive1.readUint32LE(); + sceneBlock._b_len = _sceneryArchive1.readUint32LE(); + sceneBlock._o_off = _sceneryArchive1.readUint32LE(); + sceneBlock._o_len = _sceneryArchive1.readUint32LE(); + sceneBlock._ob_off = _sceneryArchive1.readUint32LE(); + sceneBlock._ob_len = _sceneryArchive1.readUint32LE(); uint32 i = 0; switch (overlayType) { case kOvlBoundary: - _sceneryArchive1.seek(sceneBlock.b_off, SEEK_SET); - i = sceneBlock.b_len; + _sceneryArchive1.seek(sceneBlock._b_off, SEEK_SET); + i = sceneBlock._b_len; break; case kOvlOverlay: - _sceneryArchive1.seek(sceneBlock.o_off, SEEK_SET); - i = sceneBlock.o_len; + _sceneryArchive1.seek(sceneBlock._o_off, SEEK_SET); + i = sceneBlock._o_len; break; case kOvlBase: - _sceneryArchive1.seek(sceneBlock.ob_off, SEEK_SET); - i = sceneBlock.ob_len; + _sceneryArchive1.seek(sceneBlock._ob_off, SEEK_SET); + i = sceneBlock._ob_len; break; default: error("Bad overlayType: %d", overlayType); diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp index 520e1b77b6..009b0b0bb8 100644 --- a/engines/hugo/file_v2d.cpp +++ b/engines/hugo/file_v2d.cpp @@ -81,16 +81,16 @@ void FileManager_v2d::readBackground(const int screenIndex) { _sceneryArchive1.seek((uint32) screenIndex * sizeof(sceneBlock_t), SEEK_SET); sceneBlock_t sceneBlock; // Read a database header entry - sceneBlock.scene_off = _sceneryArchive1.readUint32LE(); - sceneBlock.scene_len = _sceneryArchive1.readUint32LE(); - sceneBlock.b_off = _sceneryArchive1.readUint32LE(); - sceneBlock.b_len = _sceneryArchive1.readUint32LE(); - sceneBlock.o_off = _sceneryArchive1.readUint32LE(); - sceneBlock.o_len = _sceneryArchive1.readUint32LE(); - sceneBlock.ob_off = _sceneryArchive1.readUint32LE(); - sceneBlock.ob_len = _sceneryArchive1.readUint32LE(); + sceneBlock._scene_off = _sceneryArchive1.readUint32LE(); + sceneBlock._scene_len = _sceneryArchive1.readUint32LE(); + sceneBlock._b_off = _sceneryArchive1.readUint32LE(); + sceneBlock._b_len = _sceneryArchive1.readUint32LE(); + sceneBlock._o_off = _sceneryArchive1.readUint32LE(); + sceneBlock._o_len = _sceneryArchive1.readUint32LE(); + sceneBlock._ob_off = _sceneryArchive1.readUint32LE(); + sceneBlock._ob_len = _sceneryArchive1.readUint32LE(); - _sceneryArchive1.seek(sceneBlock.scene_off, SEEK_SET); + _sceneryArchive1.seek(sceneBlock._scene_off, SEEK_SET); // Read the image into dummy seq and static dib_a seq_t *dummySeq; // Image sequence structure for Read_pcx @@ -108,28 +108,28 @@ void FileManager_v2d::readOverlay(const int screenNum, image_pt image, ovl_t ove _sceneryArchive1.seek((uint32)screenNum * sizeof(sceneBlock_t), SEEK_SET); sceneBlock_t sceneBlock; // Database header entry - sceneBlock.scene_off = _sceneryArchive1.readUint32LE(); - sceneBlock.scene_len = _sceneryArchive1.readUint32LE(); - sceneBlock.b_off = _sceneryArchive1.readUint32LE(); - sceneBlock.b_len = _sceneryArchive1.readUint32LE(); - sceneBlock.o_off = _sceneryArchive1.readUint32LE(); - sceneBlock.o_len = _sceneryArchive1.readUint32LE(); - sceneBlock.ob_off = _sceneryArchive1.readUint32LE(); - sceneBlock.ob_len = _sceneryArchive1.readUint32LE(); + sceneBlock._scene_off = _sceneryArchive1.readUint32LE(); + sceneBlock._scene_len = _sceneryArchive1.readUint32LE(); + sceneBlock._b_off = _sceneryArchive1.readUint32LE(); + sceneBlock._b_len = _sceneryArchive1.readUint32LE(); + sceneBlock._o_off = _sceneryArchive1.readUint32LE(); + sceneBlock._o_len = _sceneryArchive1.readUint32LE(); + sceneBlock._ob_off = _sceneryArchive1.readUint32LE(); + sceneBlock._ob_len = _sceneryArchive1.readUint32LE(); uint32 i = 0; switch (overlayType) { case kOvlBoundary: - _sceneryArchive1.seek(sceneBlock.b_off, SEEK_SET); - i = sceneBlock.b_len; + _sceneryArchive1.seek(sceneBlock._b_off, SEEK_SET); + i = sceneBlock._b_len; break; case kOvlOverlay: - _sceneryArchive1.seek(sceneBlock.o_off, SEEK_SET); - i = sceneBlock.o_len; + _sceneryArchive1.seek(sceneBlock._o_off, SEEK_SET); + i = sceneBlock._o_len; break; case kOvlBase: - _sceneryArchive1.seek(sceneBlock.ob_off, SEEK_SET); - i = sceneBlock.ob_len; + _sceneryArchive1.seek(sceneBlock._ob_off, SEEK_SET); + i = sceneBlock._ob_len; break; default: error("Bad overlayType: %d", overlayType); diff --git a/engines/hugo/file_v3d.cpp b/engines/hugo/file_v3d.cpp index d86003a040..99a3a68d9e 100644 --- a/engines/hugo/file_v3d.cpp +++ b/engines/hugo/file_v3d.cpp @@ -53,22 +53,22 @@ void FileManager_v3d::readBackground(const int screenIndex) { _sceneryArchive1.seek((uint32) screenIndex * sizeof(sceneBlock_t), SEEK_SET); sceneBlock_t sceneBlock; // Read a database header entry - sceneBlock.scene_off = _sceneryArchive1.readUint32LE(); - sceneBlock.scene_len = _sceneryArchive1.readUint32LE(); - sceneBlock.b_off = _sceneryArchive1.readUint32LE(); - sceneBlock.b_len = _sceneryArchive1.readUint32LE(); - sceneBlock.o_off = _sceneryArchive1.readUint32LE(); - sceneBlock.o_len = _sceneryArchive1.readUint32LE(); - sceneBlock.ob_off = _sceneryArchive1.readUint32LE(); - sceneBlock.ob_len = _sceneryArchive1.readUint32LE(); + sceneBlock._scene_off = _sceneryArchive1.readUint32LE(); + sceneBlock._scene_len = _sceneryArchive1.readUint32LE(); + sceneBlock._b_off = _sceneryArchive1.readUint32LE(); + sceneBlock._b_len = _sceneryArchive1.readUint32LE(); + sceneBlock._o_off = _sceneryArchive1.readUint32LE(); + sceneBlock._o_len = _sceneryArchive1.readUint32LE(); + sceneBlock._ob_off = _sceneryArchive1.readUint32LE(); + sceneBlock._ob_len = _sceneryArchive1.readUint32LE(); seq_t *dummySeq; // Image sequence structure for Read_pcx if (screenIndex < 20) { - _sceneryArchive1.seek(sceneBlock.scene_off, SEEK_SET); + _sceneryArchive1.seek(sceneBlock._scene_off, SEEK_SET); // Read the image into dummy seq and static dib_a dummySeq = readPCX(_sceneryArchive1, 0, _vm->_screen->getFrontBuffer(), true, _vm->_text->getScreenNames(screenIndex)); } else { - _sceneryArchive2.seek(sceneBlock.scene_off, SEEK_SET); + _sceneryArchive2.seek(sceneBlock._scene_off, SEEK_SET); // Read the image into dummy seq and static dib_a dummySeq = readPCX(_sceneryArchive2, 0, _vm->_screen->getFrontBuffer(), true, _vm->_text->getScreenNames(screenIndex)); } @@ -113,30 +113,30 @@ void FileManager_v3d::readOverlay(const int screenNum, image_pt image, ovl_t ove _sceneryArchive1.seek((uint32)screenNum * sizeof(sceneBlock_t), SEEK_SET); sceneBlock_t sceneBlock; // Database header entry - sceneBlock.scene_off = _sceneryArchive1.readUint32LE(); - sceneBlock.scene_len = _sceneryArchive1.readUint32LE(); - sceneBlock.b_off = _sceneryArchive1.readUint32LE(); - sceneBlock.b_len = _sceneryArchive1.readUint32LE(); - sceneBlock.o_off = _sceneryArchive1.readUint32LE(); - sceneBlock.o_len = _sceneryArchive1.readUint32LE(); - sceneBlock.ob_off = _sceneryArchive1.readUint32LE(); - sceneBlock.ob_len = _sceneryArchive1.readUint32LE(); + sceneBlock._scene_off = _sceneryArchive1.readUint32LE(); + sceneBlock._scene_len = _sceneryArchive1.readUint32LE(); + sceneBlock._b_off = _sceneryArchive1.readUint32LE(); + sceneBlock._b_len = _sceneryArchive1.readUint32LE(); + sceneBlock._o_off = _sceneryArchive1.readUint32LE(); + sceneBlock._o_len = _sceneryArchive1.readUint32LE(); + sceneBlock._ob_off = _sceneryArchive1.readUint32LE(); + sceneBlock._ob_len = _sceneryArchive1.readUint32LE(); uint32 i = 0; if (screenNum < 20) { switch (overlayType) { case kOvlBoundary: - _sceneryArchive1.seek(sceneBlock.b_off, SEEK_SET); - i = sceneBlock.b_len; + _sceneryArchive1.seek(sceneBlock._b_off, SEEK_SET); + i = sceneBlock._b_len; break; case kOvlOverlay: - _sceneryArchive1.seek(sceneBlock.o_off, SEEK_SET); - i = sceneBlock.o_len; + _sceneryArchive1.seek(sceneBlock._o_off, SEEK_SET); + i = sceneBlock._o_len; break; case kOvlBase: - _sceneryArchive1.seek(sceneBlock.ob_off, SEEK_SET); - i = sceneBlock.ob_len; + _sceneryArchive1.seek(sceneBlock._ob_off, SEEK_SET); + i = sceneBlock._ob_len; break; default: error("Bad overlayType: %d", overlayType); @@ -166,16 +166,16 @@ void FileManager_v3d::readOverlay(const int screenNum, image_pt image, ovl_t ove } else { switch (overlayType) { case kOvlBoundary: - _sceneryArchive2.seek(sceneBlock.b_off, SEEK_SET); - i = sceneBlock.b_len; + _sceneryArchive2.seek(sceneBlock._b_off, SEEK_SET); + i = sceneBlock._b_len; break; case kOvlOverlay: - _sceneryArchive2.seek(sceneBlock.o_off, SEEK_SET); - i = sceneBlock.o_len; + _sceneryArchive2.seek(sceneBlock._o_off, SEEK_SET); + i = sceneBlock._o_len; break; case kOvlBase: - _sceneryArchive2.seek(sceneBlock.ob_off, SEEK_SET); - i = sceneBlock.ob_len; + _sceneryArchive2.seek(sceneBlock._ob_off, SEEK_SET); + i = sceneBlock._ob_len; break; default: error("Bad overlayType: %d", overlayType); -- cgit v1.2.3 From 045613af95b84b6a57526125da35b949d0f431ea Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 13 Jun 2012 12:54:40 +0300 Subject: SCI: Shuffle the kernel functions inside kfile.cpp This puts them in the order that they are defined in the kernel tables --- engines/sci/engine/kfile.cpp | 1144 +++++++++++++++++++++--------------------- 1 file changed, 580 insertions(+), 564 deletions(-) diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 052332957b..445a019368 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -152,18 +152,6 @@ reg_t kDeviceInfo(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } -reg_t kGetSaveDir(EngineState *s, int argc, reg_t *argv) { -#ifdef ENABLE_SCI32 - // SCI32 uses a parameter here. It is used to modify a string, stored in a - // global variable, so that game scripts store the save directory. We - // don't really set a save game directory, thus not setting the string to - // anything is the correct thing to do here. - //if (argc > 0) - // warning("kGetSaveDir called with %d parameter(s): %04x:%04x", argc, PRINT_REG(argv[0])); -#endif - return s->_segMan->getSaveDirPtr(); -} - reg_t kCheckFreeSpace(EngineState *s, int argc, reg_t *argv) { if (argc > 1) { // SCI1.1/SCI32 @@ -194,292 +182,187 @@ reg_t kCheckFreeSpace(EngineState *s, int argc, reg_t *argv) { return make_reg(0, 1); } -reg_t kCheckSaveGame(EngineState *s, int argc, reg_t *argv) { - Common::String game_id = s->_segMan->getString(argv[0]); - uint16 virtualId = argv[1].toUint16(); - - debug(3, "kCheckSaveGame(%s, %d)", game_id.c_str(), virtualId); +reg_t kValidPath(EngineState *s, int argc, reg_t *argv) { + Common::String path = s->_segMan->getString(argv[0]); - Common::Array saves; - listSavegames(saves); + debug(3, "kValidPath(%s) -> %d", path.c_str(), s->r_acc.offset); - // we allow 0 (happens in QfG2 when trying to restore from an empty saved game list) and return false in that case - if (virtualId == 0) - return NULL_REG; + // Always return true + return make_reg(0, 1); +} - // Find saved-game - if ((virtualId < SAVEGAMEID_OFFICIALRANGE_START) || (virtualId > SAVEGAMEID_OFFICIALRANGE_END)) - error("kCheckSaveGame: called with invalid savegameId"); - uint savegameId = virtualId - SAVEGAMEID_OFFICIALRANGE_START; - int savegameNr = findSavegame(saves, savegameId); - if (savegameNr == -1) - return NULL_REG; +#ifdef ENABLE_SCI32 - // Check for compatible savegame version - int ver = saves[savegameNr].version; - if (ver < MINIMUM_SAVEGAME_VERSION || ver > CURRENT_SAVEGAME_VERSION) - return NULL_REG; +reg_t kCD(EngineState *s, int argc, reg_t *argv) { + // TODO: Stub + switch (argv[0].toUint16()) { + case 0: + // Return whether the contents of disc argv[1] is available. + return TRUE_REG; + default: + warning("CD(%d)", argv[0].toUint16()); + } - // Otherwise we assume the savegame is OK - return TRUE_REG; + return NULL_REG; } -reg_t kGetSaveFiles(EngineState *s, int argc, reg_t *argv) { - Common::String game_id = s->_segMan->getString(argv[0]); - - debug(3, "kGetSaveFiles(%s)", game_id.c_str()); +#endif - // Scripts ask for current save files, we can assume that if afterwards they ask us to create a new slot they really - // mean new slot instead of overwriting the old one - s->_lastSaveVirtualId = SAVEGAMEID_OFFICIALRANGE_START; +// ---- FileIO operations ----------------------------------------------------- - Common::Array saves; - listSavegames(saves); - uint totalSaves = MIN(saves.size(), MAX_SAVEGAME_NR); +reg_t kFileIO(EngineState *s, int argc, reg_t *argv) { + if (!s) + return make_reg(0, getSciVersion()); + error("not supposed to call this"); +} - reg_t *slot = s->_segMan->derefRegPtr(argv[2], totalSaves); +reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) { + Common::String name = s->_segMan->getString(argv[0]); - if (!slot) { - warning("kGetSaveFiles: %04X:%04X invalid or too small to hold slot data", PRINT_REG(argv[2])); - totalSaves = 0; +#ifdef ENABLE_SCI32 + if (name == PHANTASMAGORIA_SAVEGAME_INDEX) { + if (s->_virtualIndexFile) { + return make_reg(0, VIRTUALFILE_HANDLE); + } else { + Common::String englishName = g_sci->getSciLanguageString(name, K_LANG_ENGLISH); + Common::String wrappedName = g_sci->wrapFilename(englishName); + if (!g_sci->getSaveFileManager()->listSavefiles(wrappedName).empty()) { + s->_virtualIndexFile = new VirtualIndexFile(wrappedName); + return make_reg(0, VIRTUALFILE_HANDLE); + } + } } +#endif - const uint bufSize = (totalSaves * SCI_MAX_SAVENAME_LENGTH) + 1; - char *saveNames = new char[bufSize]; - char *saveNamePtr = saveNames; + // SCI32 can call K_FILEIO_OPEN with only one argument. It seems to + // just be checking if it exists. + int mode = (argc < 2) ? (int)_K_FILE_MODE_OPEN_OR_FAIL : argv[1].toUint16(); + bool unwrapFilename = true; - for (uint i = 0; i < totalSaves; i++) { - *slot++ = make_reg(0, saves[i].id + SAVEGAMEID_OFFICIALRANGE_START); // Store the virtual savegame ID ffs. see above - strcpy(saveNamePtr, saves[i].name); - saveNamePtr += SCI_MAX_SAVENAME_LENGTH; + // SQ4 floppy prepends /\ to the filenames + if (name.hasPrefix("/\\")) { + name.deleteChar(0); + name.deleteChar(0); } - *saveNamePtr = 0; // Terminate list + // SQ4 floppy attempts to update the savegame index file sq4sg.dir when + // deleting saved games. We don't use an index file for saving or loading, + // so just stop the game from modifying the file here in order to avoid + // having it saved in the ScummVM save directory. + if (name == "sq4sg.dir") { + debugC(kDebugLevelFile, "Not opening unused file sq4sg.dir"); + return SIGNAL_REG; + } - s->_segMan->memcpy(argv[1], (byte *)saveNames, bufSize); - delete[] saveNames; + if (name.empty()) { + // Happens many times during KQ1 (e.g. when typing something) + debugC(kDebugLevelFile, "Attempted to open a file with an empty filename"); + return SIGNAL_REG; + } + debugC(kDebugLevelFile, "kFileIO(open): %s, 0x%x", name.c_str(), mode); - return make_reg(0, totalSaves); + // QFG import rooms get a virtual filelisting instead of an actual one + if (g_sci->inQfGImportRoom()) { + // We need to find out what the user actually selected, "savedHeroes" is + // already destroyed when we get here. That's why we need to remember + // selection via kDrawControl. + name = s->_dirseeker.getVirtualFilename(s->_chosenQfGImportItem); + unwrapFilename = false; + } + + return file_open(s, name, mode, unwrapFilename); } -reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) { - Common::String game_id; - int16 virtualId = argv[1].toSint16(); - int16 savegameId = -1; - Common::String game_description; - Common::String version; +reg_t kFileIOClose(EngineState *s, int argc, reg_t *argv) { + debugC(kDebugLevelFile, "kFileIO(close): %d", argv[0].toUint16()); - if (argc > 3) - version = s->_segMan->getString(argv[3]); + if (argv[0] == SIGNAL_REG) + return s->r_acc; + + uint16 handle = argv[0].toUint16(); - // We check here, we don't want to delete a users save in case we are within a kernel function - if (s->executionStackBase) { - warning("kSaveGame - won't save from within kernel function"); - return NULL_REG; +#ifdef ENABLE_SCI32 + if (handle == VIRTUALFILE_HANDLE) { + s->_virtualIndexFile->close(); + return SIGNAL_REG; } +#endif - if (argv[0].isNull()) { - // Direct call, from a patched Game::save - if ((argv[1] != SIGNAL_REG) || (!argv[2].isNull())) - error("kSaveGame: assumed patched call isn't accurate"); - - // we are supposed to show a dialog for the user and let him choose where to save - g_sci->_soundCmd->pauseAll(true); // pause music - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true); - savegameId = dialog->runModalWithCurrentTarget(); - game_description = dialog->getResultString(); - if (game_description.empty()) { - // create our own description for the saved game, the user didnt enter it - game_description = dialog->createDefaultSaveDescription(savegameId); - } - delete dialog; - g_sci->_soundCmd->pauseAll(false); // unpause music ( we can't have it paused during save) - if (savegameId < 0) - return NULL_REG; - - } else { - // Real call from script - game_id = s->_segMan->getString(argv[0]); - if (argv[2].isNull()) - error("kSaveGame: called with description being NULL"); - game_description = s->_segMan->getString(argv[2]); - - debug(3, "kSaveGame(%s,%d,%s,%s)", game_id.c_str(), virtualId, game_description.c_str(), version.c_str()); + FileHandle *f = getFileFromHandle(s, handle); + if (f) { + f->close(); + if (getSciVersion() <= SCI_VERSION_0_LATE) + return s->r_acc; // SCI0 semantics: no value returned + return SIGNAL_REG; + } - Common::Array saves; - listSavegames(saves); + if (getSciVersion() <= SCI_VERSION_0_LATE) + return s->r_acc; // SCI0 semantics: no value returned + return NULL_REG; +} - if ((virtualId >= SAVEGAMEID_OFFICIALRANGE_START) && (virtualId <= SAVEGAMEID_OFFICIALRANGE_END)) { - // savegameId is an actual Id, so search for it just to make sure - savegameId = virtualId - SAVEGAMEID_OFFICIALRANGE_START; - if (findSavegame(saves, savegameId) == -1) - return NULL_REG; - } else if (virtualId < SAVEGAMEID_OFFICIALRANGE_START) { - // virtualId is low, we assume that scripts expect us to create new slot - if (virtualId == s->_lastSaveVirtualId) { - // if last virtual id is the same as this one, we assume that caller wants to overwrite last save - savegameId = s->_lastSaveNewId; - } else { - uint savegameNr; - // savegameId is in lower range, scripts expect us to create a new slot - for (savegameId = 0; savegameId < SAVEGAMEID_OFFICIALRANGE_START; savegameId++) { - for (savegameNr = 0; savegameNr < saves.size(); savegameNr++) { - if (savegameId == saves[savegameNr].id) - break; - } - if (savegameNr == saves.size()) - break; - } - if (savegameId == SAVEGAMEID_OFFICIALRANGE_START) - error("kSavegame: no more savegame slots available"); - } - } else { - error("kSaveGame: invalid savegameId used"); - } +reg_t kFileIOReadRaw(EngineState *s, int argc, reg_t *argv) { + uint16 handle = argv[0].toUint16(); + uint16 size = argv[2].toUint16(); + int bytesRead = 0; + char *buf = new char[size]; + debugC(kDebugLevelFile, "kFileIO(readRaw): %d, %d", handle, size); - // Save in case caller wants to overwrite last newly created save - s->_lastSaveVirtualId = virtualId; - s->_lastSaveNewId = savegameId; +#ifdef ENABLE_SCI32 + if (handle == VIRTUALFILE_HANDLE) { + bytesRead = s->_virtualIndexFile->read(buf, size); + } else { +#endif + FileHandle *f = getFileFromHandle(s, handle); + if (f) + bytesRead = f->_in->read(buf, size); +#ifdef ENABLE_SCI32 } +#endif - s->r_acc = NULL_REG; + // 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); - Common::String filename = g_sci->getSavegameName(savegameId); - Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); - Common::OutSaveFile *out; + delete[] buf; + return make_reg(0, bytesRead); +} - out = saveFileMan->openForSaving(filename); - if (!out) { - warning("Error opening savegame \"%s\" for writing", filename.c_str()); - } else { - if (!gamestate_save(s, out, game_description, version)) { - warning("Saving the game failed"); - } else { - s->r_acc = TRUE_REG; // save successful - } - - out->finalize(); - if (out->err()) { - warning("Writing the savegame failed"); - s->r_acc = NULL_REG; // write failure - } - delete out; - } - - return s->r_acc; -} - -reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) { - Common::String game_id = !argv[0].isNull() ? s->_segMan->getString(argv[0]) : ""; - int16 savegameId = argv[1].toSint16(); - bool pausedMusic = false; - - debug(3, "kRestoreGame(%s,%d)", game_id.c_str(), savegameId); - - if (argv[0].isNull()) { - // Direct call, either from launcher or from a patched Game::restore - if (savegameId == -1) { - // we are supposed to show a dialog for the user and let him choose a saved game - g_sci->_soundCmd->pauseAll(true); // pause music - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false); - savegameId = dialog->runModalWithCurrentTarget(); - delete dialog; - if (savegameId < 0) { - g_sci->_soundCmd->pauseAll(false); // unpause music - return s->r_acc; - } - pausedMusic = true; - } - // don't adjust ID of the saved game, it's already correct - } else { - if (argv[2].isNull()) - error("kRestoreGame: called with parameter 2 being NULL"); - // Real call from script, we need to adjust ID - if ((savegameId < SAVEGAMEID_OFFICIALRANGE_START) || (savegameId > SAVEGAMEID_OFFICIALRANGE_END)) { - warning("Savegame ID %d is not allowed", savegameId); - return TRUE_REG; - } - savegameId -= SAVEGAMEID_OFFICIALRANGE_START; - } - - s->r_acc = NULL_REG; // signals success +reg_t kFileIOWriteRaw(EngineState *s, int argc, reg_t *argv) { + uint16 handle = argv[0].toUint16(); + uint16 size = argv[2].toUint16(); + char *buf = new char[size]; + bool success = false; + s->_segMan->memcpy((byte *)buf, argv[1], size); + debugC(kDebugLevelFile, "kFileIO(writeRaw): %d, %d", handle, size); - Common::Array saves; - listSavegames(saves); - if (findSavegame(saves, savegameId) == -1) { - s->r_acc = TRUE_REG; - warning("Savegame ID %d not found", savegameId); +#ifdef ENABLE_SCI32 + if (handle == VIRTUALFILE_HANDLE) { + s->_virtualIndexFile->write(buf, size); + success = true; } else { - Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); - Common::String filename = g_sci->getSavegameName(savegameId); - Common::SeekableReadStream *in; - - in = saveFileMan->openForLoading(filename); - if (in) { - // found a savegame file - - gamestate_restore(s, in); - delete in; - - if (g_sci->getGameId() == GID_MOTHERGOOSE256) { - // WORKAROUND: Mother Goose SCI1/SCI1.1 does some weird things for - // saving a previously restored game. - // We set the current savedgame-id directly and remove the script - // code concerning this via script patch. - s->variables[VAR_GLOBAL][0xB3].offset = SAVEGAMEID_OFFICIALRANGE_START + savegameId; - } - } else { - s->r_acc = TRUE_REG; - warning("Savegame #%d not found", savegameId); +#endif + FileHandle *f = getFileFromHandle(s, handle); + if (f) { + f->_out->write(buf, size); + success = true; } +#ifdef ENABLE_SCI32 } +#endif - if (!s->r_acc.isNull()) { - // no success? - if (pausedMusic) - g_sci->_soundCmd->pauseAll(false); // unpause music - } - - return s->r_acc; -} - -reg_t kValidPath(EngineState *s, int argc, reg_t *argv) { - Common::String path = s->_segMan->getString(argv[0]); - - debug(3, "kValidPath(%s) -> %d", path.c_str(), s->r_acc.offset); - - // Always return true - return make_reg(0, 1); -} - -reg_t kFileIO(EngineState *s, int argc, reg_t *argv) { - if (!s) - return make_reg(0, getSciVersion()); - error("not supposed to call this"); + delete[] buf; + if (success) + return NULL_REG; + return make_reg(0, 6); // DOS - invalid handle } -reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) { +reg_t kFileIOUnlink(EngineState *s, int argc, reg_t *argv) { Common::String name = s->_segMan->getString(argv[0]); - -#ifdef ENABLE_SCI32 - if (name == PHANTASMAGORIA_SAVEGAME_INDEX) { - if (s->_virtualIndexFile) { - return make_reg(0, VIRTUALFILE_HANDLE); - } else { - Common::String englishName = g_sci->getSciLanguageString(name, K_LANG_ENGLISH); - Common::String wrappedName = g_sci->wrapFilename(englishName); - if (!g_sci->getSaveFileManager()->listSavefiles(wrappedName).empty()) { - s->_virtualIndexFile = new VirtualIndexFile(wrappedName); - return make_reg(0, VIRTUALFILE_HANDLE); - } - } - } -#endif - - // SCI32 can call K_FILEIO_OPEN with only one argument. It seems to - // just be checking if it exists. - int mode = (argc < 2) ? (int)_K_FILE_MODE_OPEN_OR_FAIL : argv[1].toUint16(); - bool unwrapFilename = true; + Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); + bool result; // SQ4 floppy prepends /\ to the filenames if (name.hasPrefix("/\\")) { @@ -487,407 +370,546 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) { name.deleteChar(0); } - // SQ4 floppy attempts to update the savegame index file sq4sg.dir when - // deleting saved games. We don't use an index file for saving or loading, - // so just stop the game from modifying the file here in order to avoid - // having it saved in the ScummVM save directory. - if (name == "sq4sg.dir") { - debugC(kDebugLevelFile, "Not opening unused file sq4sg.dir"); - return SIGNAL_REG; - } - - if (name.empty()) { - // Happens many times during KQ1 (e.g. when typing something) - debugC(kDebugLevelFile, "Attempted to open a file with an empty filename"); - return SIGNAL_REG; - } - debugC(kDebugLevelFile, "kFileIO(open): %s, 0x%x", name.c_str(), mode); + // Special case for SQ4 floppy: This game has hardcoded names for all of + // its savegames, and they are all named "sq4sg.xxx", where xxx is the + // slot. We just take the slot number here, and delete the appropriate + // save game. + if (name.hasPrefix("sq4sg.")) { + // Special handling for SQ4... get the slot number and construct the + // save game name. + int slotNum = atoi(name.c_str() + name.size() - 3); + Common::Array saves; + listSavegames(saves); + int savedir_nr = saves[slotNum].id; + name = g_sci->getSavegameName(savedir_nr); + result = saveFileMan->removeSavefile(name); + } else if (getSciVersion() >= SCI_VERSION_2) { + // The file name may be already wrapped, so check both cases + result = saveFileMan->removeSavefile(name); + if (!result) { + const Common::String wrappedName = g_sci->wrapFilename(name); + result = saveFileMan->removeSavefile(wrappedName); + } - // QFG import rooms get a virtual filelisting instead of an actual one - if (g_sci->inQfGImportRoom()) { - // We need to find out what the user actually selected, "savedHeroes" is - // already destroyed when we get here. That's why we need to remember - // selection via kDrawControl. - name = s->_dirseeker.getVirtualFilename(s->_chosenQfGImportItem); - unwrapFilename = false; +#ifdef ENABLE_SCI32 + if (name == PHANTASMAGORIA_SAVEGAME_INDEX) { + delete s->_virtualIndexFile; + s->_virtualIndexFile = 0; + } +#endif + } else { + const Common::String wrappedName = g_sci->wrapFilename(name); + result = saveFileMan->removeSavefile(wrappedName); } - return file_open(s, name, mode, unwrapFilename); + debugC(kDebugLevelFile, "kFileIO(unlink): %s", name.c_str()); + if (result) + return NULL_REG; + return make_reg(0, 2); // DOS - file not found error code } -reg_t kFileIOClose(EngineState *s, int argc, reg_t *argv) { - debugC(kDebugLevelFile, "kFileIO(close): %d", argv[0].toUint16()); +reg_t kFileIOReadString(EngineState *s, int argc, reg_t *argv) { + uint16 maxsize = argv[1].toUint16(); + char *buf = new char[maxsize]; + uint16 handle = argv[2].toUint16(); + debugC(kDebugLevelFile, "kFileIO(readString): %d, %d", handle, maxsize); + uint32 bytesRead; - if (argv[0] == SIGNAL_REG) - return s->r_acc; - - uint16 handle = argv[0].toUint16(); +#ifdef ENABLE_SCI32 + if (handle == VIRTUALFILE_HANDLE) + bytesRead = s->_virtualIndexFile->readLine(buf, maxsize); + else +#endif + bytesRead = fgets_wrapper(s, buf, maxsize, handle); + + s->_segMan->memcpy(argv[0], (const byte*)buf, maxsize); + delete[] buf; + return bytesRead ? argv[0] : NULL_REG; +} + +reg_t kFileIOWriteString(EngineState *s, int argc, reg_t *argv) { + int handle = argv[0].toUint16(); + Common::String str = s->_segMan->getString(argv[1]); + debugC(kDebugLevelFile, "kFileIO(writeString): %d", handle); #ifdef ENABLE_SCI32 if (handle == VIRTUALFILE_HANDLE) { - s->_virtualIndexFile->close(); - return SIGNAL_REG; + s->_virtualIndexFile->write(str.c_str(), str.size()); + return NULL_REG; } #endif FileHandle *f = getFileFromHandle(s, handle); + if (f) { - f->close(); + f->_out->write(str.c_str(), str.size()); if (getSciVersion() <= SCI_VERSION_0_LATE) return s->r_acc; // SCI0 semantics: no value returned - return SIGNAL_REG; + return NULL_REG; } if (getSciVersion() <= SCI_VERSION_0_LATE) return s->r_acc; // SCI0 semantics: no value returned - return NULL_REG; + return make_reg(0, 6); // DOS - invalid handle } -reg_t kFileIOReadRaw(EngineState *s, int argc, reg_t *argv) { +reg_t kFileIOSeek(EngineState *s, int argc, reg_t *argv) { uint16 handle = argv[0].toUint16(); - uint16 size = argv[2].toUint16(); - int bytesRead = 0; - char *buf = new char[size]; - debugC(kDebugLevelFile, "kFileIO(readRaw): %d, %d", handle, size); + uint16 offset = ABS(argv[1].toSint16()); // can be negative + uint16 whence = argv[2].toUint16(); + debugC(kDebugLevelFile, "kFileIO(seek): %d, %d, %d", handle, offset, whence); #ifdef ENABLE_SCI32 - if (handle == VIRTUALFILE_HANDLE) { - bytesRead = s->_virtualIndexFile->read(buf, size); - } else { + if (handle == VIRTUALFILE_HANDLE) + return make_reg(0, s->_virtualIndexFile->seek(offset, whence)); #endif - FileHandle *f = getFileFromHandle(s, handle); - if (f) - bytesRead = f->_in->read(buf, size); -#ifdef ENABLE_SCI32 + + FileHandle *f = getFileFromHandle(s, handle); + + if (f && f->_in) { + // Backward seeking isn't supported in zip file streams, thus adapt the + // parameters accordingly if games ask for such a seek mode. A known + // case where this is requested is the save file manager in Phantasmagoria + if (whence == SEEK_END) { + whence = SEEK_SET; + offset = f->_in->size() - offset; + } + + return make_reg(0, f->_in->seek(offset, whence)); + } else if (f && f->_out) { + error("kFileIOSeek: Unsupported seek operation on a writeable stream (offset: %d, whence: %d)", offset, whence); } -#endif - // 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); + return SIGNAL_REG; +} - delete[] buf; - return make_reg(0, bytesRead); +reg_t kFileIOFindFirst(EngineState *s, int argc, reg_t *argv) { + Common::String mask = s->_segMan->getString(argv[0]); + reg_t buf = argv[1]; + int attr = argv[2].toUint16(); // We won't use this, Win32 might, though... + debugC(kDebugLevelFile, "kFileIO(findFirst): %s, 0x%x", mask.c_str(), attr); + + // We remove ".*". mask will get prefixed, so we will return all additional files for that gameid + if (mask == "*.*") + mask = "*"; + return s->_dirseeker.firstFile(mask, buf, s->_segMan); } -reg_t kFileIOWriteRaw(EngineState *s, int argc, reg_t *argv) { - uint16 handle = argv[0].toUint16(); - uint16 size = argv[2].toUint16(); - char *buf = new char[size]; - bool success = false; - s->_segMan->memcpy((byte *)buf, argv[1], size); - debugC(kDebugLevelFile, "kFileIO(writeRaw): %d, %d", handle, size); +reg_t kFileIOFindNext(EngineState *s, int argc, reg_t *argv) { + debugC(kDebugLevelFile, "kFileIO(findNext)"); + return s->_dirseeker.nextFile(s->_segMan); +} + +reg_t kFileIOExists(EngineState *s, int argc, reg_t *argv) { + Common::String name = s->_segMan->getString(argv[0]); #ifdef ENABLE_SCI32 - if (handle == VIRTUALFILE_HANDLE) { - s->_virtualIndexFile->write(buf, size); - success = true; - } else { + // Cache the file existence result for the Phantasmagoria + // save index file, as the game scripts keep checking for + // its existence. + if (name == PHANTASMAGORIA_SAVEGAME_INDEX && s->_virtualIndexFile) + return TRUE_REG; #endif - FileHandle *f = getFileFromHandle(s, handle); - if (f) { - f->_out->write(buf, size); - success = true; - } -#ifdef ENABLE_SCI32 + + bool exists = false; + + // Check for regular file + exists = Common::File::exists(name); + + // Check for a savegame with the name + Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); + if (!exists) + exists = !saveFileMan->listSavefiles(name).empty(); + + // Try searching for the file prepending "target-" + const Common::String wrappedName = g_sci->wrapFilename(name); + if (!exists) { + exists = !saveFileMan->listSavefiles(wrappedName).empty(); } -#endif - delete[] buf; - if (success) - return NULL_REG; - return make_reg(0, 6); // DOS - invalid handle -} + // SCI2+ debug mode + if (DebugMan.isDebugChannelEnabled(kDebugLevelDebugMode)) { + if (!exists && name == "1.scr") // PQ4 + exists = true; + if (!exists && name == "18.scr") // QFG4 + exists = true; + if (!exists && name == "99.scr") // GK1, KQ7 + exists = true; + if (!exists && name == "classes") // GK2, SQ6, LSL7 + exists = true; + } -reg_t kFileIOReadString(EngineState *s, int argc, reg_t *argv) { - uint16 maxsize = argv[1].toUint16(); - char *buf = new char[maxsize]; - uint16 handle = argv[2].toUint16(); - debugC(kDebugLevelFile, "kFileIO(readString): %d, %d", handle, maxsize); - uint32 bytesRead; + // Special case for non-English versions of LSL5: The English version of + // LSL5 calls kFileIO(), case K_FILEIO_OPEN for reading to check if + // memory.drv exists (which is where the game's password is stored). If + // it's not found, it calls kFileIO() again, case K_FILEIO_OPEN for + // writing and creates a new file. Non-English versions call kFileIO(), + // case K_FILEIO_FILE_EXISTS instead, and fail if memory.drv can't be + // found. We create a default memory.drv file with no password, so that + // the game can continue. + if (!exists && name == "memory.drv") { + // Create a new file, and write the bytes for the empty password + // string inside + byte defaultContent[] = { 0xE9, 0xE9, 0xEB, 0xE1, 0x0D, 0x0A, 0x31, 0x30, 0x30, 0x30 }; + Common::WriteStream *outFile = saveFileMan->openForSaving(wrappedName); + for (int i = 0; i < 10; i++) + outFile->writeByte(defaultContent[i]); + outFile->finalize(); + exists = !outFile->err(); // check whether we managed to create the file. + delete outFile; + } -#ifdef ENABLE_SCI32 - if (handle == VIRTUALFILE_HANDLE) - bytesRead = s->_virtualIndexFile->readLine(buf, maxsize); - else -#endif - bytesRead = fgets_wrapper(s, buf, maxsize, handle); + // Special case for KQ6 Mac: The game checks for two video files to see + // if they exist before it plays them. Since we support multiple naming + // schemes for resource fork files, we also need to support that here in + // case someone has a "HalfDome.bin" file, etc. + if (!exists && g_sci->getGameId() == GID_KQ6 && g_sci->getPlatform() == Common::kPlatformMacintosh && + (name == "HalfDome" || name == "Kq6Movie")) + exists = Common::MacResManager::exists(name); - s->_segMan->memcpy(argv[0], (const byte*)buf, maxsize); - delete[] buf; - return bytesRead ? argv[0] : NULL_REG; + debugC(kDebugLevelFile, "kFileIO(fileExists) %s -> %d", name.c_str(), exists); + return make_reg(0, exists); } -reg_t kFileIOWriteString(EngineState *s, int argc, reg_t *argv) { - int handle = argv[0].toUint16(); - Common::String str = s->_segMan->getString(argv[1]); - debugC(kDebugLevelFile, "kFileIO(writeString): %d", handle); +reg_t kFileIORename(EngineState *s, int argc, reg_t *argv) { + Common::String oldName = s->_segMan->getString(argv[0]); + Common::String newName = s->_segMan->getString(argv[1]); + + // SCI1.1 returns 0 on success and a DOS error code on fail. SCI32 + // returns -1 on fail. We just return -1 for all versions. + if (g_sci->getSaveFileManager()->renameSavefile(oldName, newName)) + return NULL_REG; + else + return SIGNAL_REG; +} #ifdef ENABLE_SCI32 - if (handle == VIRTUALFILE_HANDLE) { - s->_virtualIndexFile->write(str.c_str(), str.size()); +reg_t kFileIOReadByte(EngineState *s, int argc, reg_t *argv) { + // Read the byte into the low byte of the accumulator + FileHandle *f = getFileFromHandle(s, argv[0].toUint16()); + if (!f) return NULL_REG; - } -#endif + return make_reg(0, (s->r_acc.toUint16() & 0xff00) | f->_in->readByte()); +} - FileHandle *f = getFileFromHandle(s, handle); +reg_t kFileIOWriteByte(EngineState *s, int argc, reg_t *argv) { + FileHandle *f = getFileFromHandle(s, argv[0].toUint16()); + if (f) + f->_out->writeByte(argv[1].toUint16() & 0xff); + return s->r_acc; // FIXME: does this really not return anything? +} - if (f) { - f->_out->write(str.c_str(), str.size()); - if (getSciVersion() <= SCI_VERSION_0_LATE) - return s->r_acc; // SCI0 semantics: no value returned +reg_t kFileIOReadWord(EngineState *s, int argc, reg_t *argv) { + FileHandle *f = getFileFromHandle(s, argv[0].toUint16()); + if (!f) return NULL_REG; - } + return make_reg(0, f->_in->readUint16LE()); +} - if (getSciVersion() <= SCI_VERSION_0_LATE) - return s->r_acc; // SCI0 semantics: no value returned - return make_reg(0, 6); // DOS - invalid handle +reg_t kFileIOWriteWord(EngineState *s, int argc, reg_t *argv) { + FileHandle *f = getFileFromHandle(s, argv[0].toUint16()); + if (f) + f->_out->writeUint16LE(argv[1].toUint16()); + return s->r_acc; // FIXME: does this really not return anything? } -reg_t kFileIOUnlink(EngineState *s, int argc, reg_t *argv) { - Common::String name = s->_segMan->getString(argv[0]); - Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); - bool result; +reg_t kFileIOCreateSaveSlot(EngineState *s, int argc, reg_t *argv) { + // Used in Shivers when the user enters his name on the guest book + // in the beginning to start the game. - // SQ4 floppy prepends /\ to the filenames - if (name.hasPrefix("/\\")) { - name.deleteChar(0); - name.deleteChar(0); - } + // Creates a new save slot, and returns if the operation was successful - // Special case for SQ4 floppy: This game has hardcoded names for all of - // its savegames, and they are all named "sq4sg.xxx", where xxx is the - // slot. We just take the slot number here, and delete the appropriate - // save game. - if (name.hasPrefix("sq4sg.")) { - // Special handling for SQ4... get the slot number and construct the - // save game name. - int slotNum = atoi(name.c_str() + name.size() - 3); - Common::Array saves; - listSavegames(saves); - int savedir_nr = saves[slotNum].id; - name = g_sci->getSavegameName(savedir_nr); - result = saveFileMan->removeSavefile(name); - } else if (getSciVersion() >= SCI_VERSION_2) { - // The file name may be already wrapped, so check both cases - result = saveFileMan->removeSavefile(name); - if (!result) { - const Common::String wrappedName = g_sci->wrapFilename(name); - result = saveFileMan->removeSavefile(wrappedName); - } + // Argument 0 denotes the save slot as a negative integer, 2 means "0" + // Argument 1 is a string, with the file name, obtained from kSave(5). + // The interpreter checks if it can be written to (by checking for free + // disk space and write permissions) -#ifdef ENABLE_SCI32 - if (name == PHANTASMAGORIA_SAVEGAME_INDEX) { - delete s->_virtualIndexFile; - s->_virtualIndexFile = 0; - } -#endif - } else { - const Common::String wrappedName = g_sci->wrapFilename(name); - result = saveFileMan->removeSavefile(wrappedName); - } + // We don't really use or need any of this... - debugC(kDebugLevelFile, "kFileIO(unlink): %s", name.c_str()); - if (result) - return NULL_REG; - return make_reg(0, 2); // DOS - file not found error code + uint16 saveSlot = argv[0].toUint16(); + char* fileName = s->_segMan->lookupString(argv[1])->getRawData(); + warning("kFileIOCreateSaveSlot(%d, '%s')", saveSlot, fileName); + + return TRUE_REG; // slot creation was successful } -reg_t kFileIOSeek(EngineState *s, int argc, reg_t *argv) { - uint16 handle = argv[0].toUint16(); - uint16 offset = ABS(argv[1].toSint16()); // can be negative - uint16 whence = argv[2].toUint16(); - debugC(kDebugLevelFile, "kFileIO(seek): %d, %d, %d", handle, offset, whence); +#endif + +// ---- Save operations ------------------------------------------------------- #ifdef ENABLE_SCI32 - if (handle == VIRTUALFILE_HANDLE) - return make_reg(0, s->_virtualIndexFile->seek(offset, whence)); + +reg_t kSave(EngineState *s, int argc, reg_t *argv) { + if (!s) + return make_reg(0, getSciVersion()); + error("not supposed to call this"); +} + #endif - FileHandle *f = getFileFromHandle(s, handle); +reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) { + Common::String game_id; + int16 virtualId = argv[1].toSint16(); + int16 savegameId = -1; + Common::String game_description; + Common::String version; - if (f && f->_in) { - // Backward seeking isn't supported in zip file streams, thus adapt the - // parameters accordingly if games ask for such a seek mode. A known - // case where this is requested is the save file manager in Phantasmagoria - if (whence == SEEK_END) { - whence = SEEK_SET; - offset = f->_in->size() - offset; + if (argc > 3) + version = s->_segMan->getString(argv[3]); + + // We check here, we don't want to delete a users save in case we are within a kernel function + if (s->executionStackBase) { + warning("kSaveGame - won't save from within kernel function"); + return NULL_REG; + } + + if (argv[0].isNull()) { + // Direct call, from a patched Game::save + if ((argv[1] != SIGNAL_REG) || (!argv[2].isNull())) + error("kSaveGame: assumed patched call isn't accurate"); + + // we are supposed to show a dialog for the user and let him choose where to save + g_sci->_soundCmd->pauseAll(true); // pause music + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true); + savegameId = dialog->runModalWithCurrentTarget(); + game_description = dialog->getResultString(); + if (game_description.empty()) { + // create our own description for the saved game, the user didnt enter it + game_description = dialog->createDefaultSaveDescription(savegameId); } + delete dialog; + g_sci->_soundCmd->pauseAll(false); // unpause music ( we can't have it paused during save) + if (savegameId < 0) + return NULL_REG; - return make_reg(0, f->_in->seek(offset, whence)); - } else if (f && f->_out) { - error("kFileIOSeek: Unsupported seek operation on a writeable stream (offset: %d, whence: %d)", offset, whence); + } else { + // Real call from script + game_id = s->_segMan->getString(argv[0]); + if (argv[2].isNull()) + error("kSaveGame: called with description being NULL"); + game_description = s->_segMan->getString(argv[2]); + + debug(3, "kSaveGame(%s,%d,%s,%s)", game_id.c_str(), virtualId, game_description.c_str(), version.c_str()); + + Common::Array saves; + listSavegames(saves); + + if ((virtualId >= SAVEGAMEID_OFFICIALRANGE_START) && (virtualId <= SAVEGAMEID_OFFICIALRANGE_END)) { + // savegameId is an actual Id, so search for it just to make sure + savegameId = virtualId - SAVEGAMEID_OFFICIALRANGE_START; + if (findSavegame(saves, savegameId) == -1) + return NULL_REG; + } else if (virtualId < SAVEGAMEID_OFFICIALRANGE_START) { + // virtualId is low, we assume that scripts expect us to create new slot + if (virtualId == s->_lastSaveVirtualId) { + // if last virtual id is the same as this one, we assume that caller wants to overwrite last save + savegameId = s->_lastSaveNewId; + } else { + uint savegameNr; + // savegameId is in lower range, scripts expect us to create a new slot + for (savegameId = 0; savegameId < SAVEGAMEID_OFFICIALRANGE_START; savegameId++) { + for (savegameNr = 0; savegameNr < saves.size(); savegameNr++) { + if (savegameId == saves[savegameNr].id) + break; + } + if (savegameNr == saves.size()) + break; + } + if (savegameId == SAVEGAMEID_OFFICIALRANGE_START) + error("kSavegame: no more savegame slots available"); + } + } else { + error("kSaveGame: invalid savegameId used"); + } + + // Save in case caller wants to overwrite last newly created save + s->_lastSaveVirtualId = virtualId; + s->_lastSaveNewId = savegameId; } - return SIGNAL_REG; -} + s->r_acc = NULL_REG; -reg_t kFileIOFindFirst(EngineState *s, int argc, reg_t *argv) { - Common::String mask = s->_segMan->getString(argv[0]); - reg_t buf = argv[1]; - int attr = argv[2].toUint16(); // We won't use this, Win32 might, though... - debugC(kDebugLevelFile, "kFileIO(findFirst): %s, 0x%x", mask.c_str(), attr); + Common::String filename = g_sci->getSavegameName(savegameId); + Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); + Common::OutSaveFile *out; + + out = saveFileMan->openForSaving(filename); + if (!out) { + warning("Error opening savegame \"%s\" for writing", filename.c_str()); + } else { + if (!gamestate_save(s, out, game_description, version)) { + warning("Saving the game failed"); + } else { + s->r_acc = TRUE_REG; // save successful + } + + out->finalize(); + if (out->err()) { + warning("Writing the savegame failed"); + s->r_acc = NULL_REG; // write failure + } + delete out; + } - // We remove ".*". mask will get prefixed, so we will return all additional files for that gameid - if (mask == "*.*") - mask = "*"; - return s->_dirseeker.firstFile(mask, buf, s->_segMan); + return s->r_acc; } -reg_t kFileIOFindNext(EngineState *s, int argc, reg_t *argv) { - debugC(kDebugLevelFile, "kFileIO(findNext)"); - return s->_dirseeker.nextFile(s->_segMan); -} +reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) { + Common::String game_id = !argv[0].isNull() ? s->_segMan->getString(argv[0]) : ""; + int16 savegameId = argv[1].toSint16(); + bool pausedMusic = false; -reg_t kFileIOExists(EngineState *s, int argc, reg_t *argv) { - Common::String name = s->_segMan->getString(argv[0]); + debug(3, "kRestoreGame(%s,%d)", game_id.c_str(), savegameId); -#ifdef ENABLE_SCI32 - // Cache the file existence result for the Phantasmagoria - // save index file, as the game scripts keep checking for - // its existence. - if (name == PHANTASMAGORIA_SAVEGAME_INDEX && s->_virtualIndexFile) - return TRUE_REG; -#endif + if (argv[0].isNull()) { + // Direct call, either from launcher or from a patched Game::restore + if (savegameId == -1) { + // we are supposed to show a dialog for the user and let him choose a saved game + g_sci->_soundCmd->pauseAll(true); // pause music + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false); + savegameId = dialog->runModalWithCurrentTarget(); + delete dialog; + if (savegameId < 0) { + g_sci->_soundCmd->pauseAll(false); // unpause music + return s->r_acc; + } + pausedMusic = true; + } + // don't adjust ID of the saved game, it's already correct + } else { + if (argv[2].isNull()) + error("kRestoreGame: called with parameter 2 being NULL"); + // Real call from script, we need to adjust ID + if ((savegameId < SAVEGAMEID_OFFICIALRANGE_START) || (savegameId > SAVEGAMEID_OFFICIALRANGE_END)) { + warning("Savegame ID %d is not allowed", savegameId); + return TRUE_REG; + } + savegameId -= SAVEGAMEID_OFFICIALRANGE_START; + } - bool exists = false; + s->r_acc = NULL_REG; // signals success - // Check for regular file - exists = Common::File::exists(name); + Common::Array saves; + listSavegames(saves); + if (findSavegame(saves, savegameId) == -1) { + s->r_acc = TRUE_REG; + warning("Savegame ID %d not found", savegameId); + } else { + Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); + Common::String filename = g_sci->getSavegameName(savegameId); + Common::SeekableReadStream *in; - // Check for a savegame with the name - Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); - if (!exists) - exists = !saveFileMan->listSavefiles(name).empty(); + in = saveFileMan->openForLoading(filename); + if (in) { + // found a savegame file - // Try searching for the file prepending "target-" - const Common::String wrappedName = g_sci->wrapFilename(name); - if (!exists) { - exists = !saveFileMan->listSavefiles(wrappedName).empty(); - } + gamestate_restore(s, in); + delete in; - // SCI2+ debug mode - if (DebugMan.isDebugChannelEnabled(kDebugLevelDebugMode)) { - if (!exists && name == "1.scr") // PQ4 - exists = true; - if (!exists && name == "18.scr") // QFG4 - exists = true; - if (!exists && name == "99.scr") // GK1, KQ7 - exists = true; - if (!exists && name == "classes") // GK2, SQ6, LSL7 - exists = true; + if (g_sci->getGameId() == GID_MOTHERGOOSE256) { + // WORKAROUND: Mother Goose SCI1/SCI1.1 does some weird things for + // saving a previously restored game. + // We set the current savedgame-id directly and remove the script + // code concerning this via script patch. + s->variables[VAR_GLOBAL][0xB3].offset = SAVEGAMEID_OFFICIALRANGE_START + savegameId; + } + } else { + s->r_acc = TRUE_REG; + warning("Savegame #%d not found", savegameId); + } } - // Special case for non-English versions of LSL5: The English version of - // LSL5 calls kFileIO(), case K_FILEIO_OPEN for reading to check if - // memory.drv exists (which is where the game's password is stored). If - // it's not found, it calls kFileIO() again, case K_FILEIO_OPEN for - // writing and creates a new file. Non-English versions call kFileIO(), - // case K_FILEIO_FILE_EXISTS instead, and fail if memory.drv can't be - // found. We create a default memory.drv file with no password, so that - // the game can continue. - if (!exists && name == "memory.drv") { - // Create a new file, and write the bytes for the empty password - // string inside - byte defaultContent[] = { 0xE9, 0xE9, 0xEB, 0xE1, 0x0D, 0x0A, 0x31, 0x30, 0x30, 0x30 }; - Common::WriteStream *outFile = saveFileMan->openForSaving(wrappedName); - for (int i = 0; i < 10; i++) - outFile->writeByte(defaultContent[i]); - outFile->finalize(); - exists = !outFile->err(); // check whether we managed to create the file. - delete outFile; + if (!s->r_acc.isNull()) { + // no success? + if (pausedMusic) + g_sci->_soundCmd->pauseAll(false); // unpause music } - // Special case for KQ6 Mac: The game checks for two video files to see - // if they exist before it plays them. Since we support multiple naming - // schemes for resource fork files, we also need to support that here in - // case someone has a "HalfDome.bin" file, etc. - if (!exists && g_sci->getGameId() == GID_KQ6 && g_sci->getPlatform() == Common::kPlatformMacintosh && - (name == "HalfDome" || name == "Kq6Movie")) - exists = Common::MacResManager::exists(name); + return s->r_acc; +} - debugC(kDebugLevelFile, "kFileIO(fileExists) %s -> %d", name.c_str(), exists); - return make_reg(0, exists); +reg_t kGetSaveDir(EngineState *s, int argc, reg_t *argv) { +#ifdef ENABLE_SCI32 + // SCI32 uses a parameter here. It is used to modify a string, stored in a + // global variable, so that game scripts store the save directory. We + // don't really set a save game directory, thus not setting the string to + // anything is the correct thing to do here. + //if (argc > 0) + // warning("kGetSaveDir called with %d parameter(s): %04x:%04x", argc, PRINT_REG(argv[0])); +#endif + return s->_segMan->getSaveDirPtr(); } -reg_t kFileIORename(EngineState *s, int argc, reg_t *argv) { - Common::String oldName = s->_segMan->getString(argv[0]); - Common::String newName = s->_segMan->getString(argv[1]); +reg_t kCheckSaveGame(EngineState *s, int argc, reg_t *argv) { + Common::String game_id = s->_segMan->getString(argv[0]); + uint16 virtualId = argv[1].toUint16(); - // SCI1.1 returns 0 on success and a DOS error code on fail. SCI32 - // returns -1 on fail. We just return -1 for all versions. - if (g_sci->getSaveFileManager()->renameSavefile(oldName, newName)) - return NULL_REG; - else - return SIGNAL_REG; -} + debug(3, "kCheckSaveGame(%s, %d)", game_id.c_str(), virtualId); -#ifdef ENABLE_SCI32 -reg_t kFileIOReadByte(EngineState *s, int argc, reg_t *argv) { - // Read the byte into the low byte of the accumulator - FileHandle *f = getFileFromHandle(s, argv[0].toUint16()); - if (!f) + Common::Array saves; + listSavegames(saves); + + // we allow 0 (happens in QfG2 when trying to restore from an empty saved game list) and return false in that case + if (virtualId == 0) return NULL_REG; - return make_reg(0, (s->r_acc.toUint16() & 0xff00) | f->_in->readByte()); -} -reg_t kFileIOWriteByte(EngineState *s, int argc, reg_t *argv) { - FileHandle *f = getFileFromHandle(s, argv[0].toUint16()); - if (f) - f->_out->writeByte(argv[1].toUint16() & 0xff); - return s->r_acc; // FIXME: does this really not return anything? -} + // Find saved-game + if ((virtualId < SAVEGAMEID_OFFICIALRANGE_START) || (virtualId > SAVEGAMEID_OFFICIALRANGE_END)) + error("kCheckSaveGame: called with invalid savegameId"); + uint savegameId = virtualId - SAVEGAMEID_OFFICIALRANGE_START; + int savegameNr = findSavegame(saves, savegameId); + if (savegameNr == -1) + return NULL_REG; -reg_t kFileIOReadWord(EngineState *s, int argc, reg_t *argv) { - FileHandle *f = getFileFromHandle(s, argv[0].toUint16()); - if (!f) + // Check for compatible savegame version + int ver = saves[savegameNr].version; + if (ver < MINIMUM_SAVEGAME_VERSION || ver > CURRENT_SAVEGAME_VERSION) return NULL_REG; - return make_reg(0, f->_in->readUint16LE()); -} -reg_t kFileIOWriteWord(EngineState *s, int argc, reg_t *argv) { - FileHandle *f = getFileFromHandle(s, argv[0].toUint16()); - if (f) - f->_out->writeUint16LE(argv[1].toUint16()); - return s->r_acc; // FIXME: does this really not return anything? + // Otherwise we assume the savegame is OK + return TRUE_REG; } -reg_t kFileIOCreateSaveSlot(EngineState *s, int argc, reg_t *argv) { - // Used in Shivers when the user enters his name on the guest book - // in the beginning to start the game. +reg_t kGetSaveFiles(EngineState *s, int argc, reg_t *argv) { + Common::String game_id = s->_segMan->getString(argv[0]); - // Creates a new save slot, and returns if the operation was successful + debug(3, "kGetSaveFiles(%s)", game_id.c_str()); - // Argument 0 denotes the save slot as a negative integer, 2 means "0" - // Argument 1 is a string, with the file name, obtained from kSave(5). - // The interpreter checks if it can be written to (by checking for free - // disk space and write permissions) + // Scripts ask for current save files, we can assume that if afterwards they ask us to create a new slot they really + // mean new slot instead of overwriting the old one + s->_lastSaveVirtualId = SAVEGAMEID_OFFICIALRANGE_START; - // We don't really use or need any of this... + Common::Array saves; + listSavegames(saves); + uint totalSaves = MIN(saves.size(), MAX_SAVEGAME_NR); - uint16 saveSlot = argv[0].toUint16(); - char* fileName = s->_segMan->lookupString(argv[1])->getRawData(); - warning("kFileIOCreateSaveSlot(%d, '%s')", saveSlot, fileName); + reg_t *slot = s->_segMan->derefRegPtr(argv[2], totalSaves); - return TRUE_REG; // slot creation was successful -} + if (!slot) { + warning("kGetSaveFiles: %04X:%04X invalid or too small to hold slot data", PRINT_REG(argv[2])); + totalSaves = 0; + } -reg_t kCD(EngineState *s, int argc, reg_t *argv) { - // TODO: Stub - switch (argv[0].toUint16()) { - case 0: - // Return whether the contents of disc argv[1] is available. - return TRUE_REG; - default: - warning("CD(%d)", argv[0].toUint16()); + const uint bufSize = (totalSaves * SCI_MAX_SAVENAME_LENGTH) + 1; + char *saveNames = new char[bufSize]; + char *saveNamePtr = saveNames; + + for (uint i = 0; i < totalSaves; i++) { + *slot++ = make_reg(0, saves[i].id + SAVEGAMEID_OFFICIALRANGE_START); // Store the virtual savegame ID ffs. see above + strcpy(saveNamePtr, saves[i].name); + saveNamePtr += SCI_MAX_SAVENAME_LENGTH; } - return NULL_REG; + *saveNamePtr = 0; // Terminate list + + s->_segMan->memcpy(argv[1], (byte *)saveNames, bufSize); + delete[] saveNames; + + return make_reg(0, totalSaves); } +#ifdef ENABLE_SCI32 + reg_t kMakeSaveCatName(EngineState *s, int argc, reg_t *argv) { // Normally, this creates the name of the save catalogue/directory to save into. // First parameter is the string to save the result into. Second is a string @@ -928,12 +950,6 @@ reg_t kAutoSave(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } -reg_t kSave(EngineState *s, int argc, reg_t *argv) { - if (!s) - return make_reg(0, getSciVersion()); - error("not supposed to call this"); -} - #endif } // End of namespace Sci -- cgit v1.2.3 From d3929bd4bc4dbd0f7f2b57000be757e6bc7706e8 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 13 Jun 2012 14:50:09 +0200 Subject: HUGO: Some more renaming --- engines/hugo/file.h | 16 +++---- engines/hugo/file_v1w.cpp | 28 ++++++------ engines/hugo/file_v2d.cpp | 46 +++++++++---------- engines/hugo/file_v3d.cpp | 60 ++++++++++++------------- engines/hugo/intro.cpp | 110 +++++++++++++++++++++++----------------------- engines/hugo/intro.h | 6 +-- engines/hugo/route.cpp | 22 +++++----- engines/hugo/route.h | 4 +- 8 files changed, 146 insertions(+), 146 deletions(-) diff --git a/engines/hugo/file.h b/engines/hugo/file.h index 81d3c73f5a..817bf49daf 100644 --- a/engines/hugo/file.h +++ b/engines/hugo/file.h @@ -85,14 +85,14 @@ protected: * Structure of scenery file lookup entry */ struct sceneBlock_t { - uint32 _scene_off; - uint32 _scene_len; - uint32 _b_off; - uint32 _b_len; - uint32 _o_off; - uint32 _o_len; - uint32 _ob_off; - uint32 _ob_len; + uint32 _sceneOffset; + uint32 _sceneLength; + uint32 _boundaryOffset; + uint32 _boundaryLength; + uint32 _overlayOffset; + uint32 _overlayLength; + uint32 _baseOffset; + uint32 _baseLength; }; struct _PCCHeader_t { // Structure of PCX file header diff --git a/engines/hugo/file_v1w.cpp b/engines/hugo/file_v1w.cpp index 3bb4b66367..fba13d6915 100644 --- a/engines/hugo/file_v1w.cpp +++ b/engines/hugo/file_v1w.cpp @@ -52,28 +52,28 @@ void FileManager_v1w::readOverlay(const int screenNum, image_pt image, ovl_t ove _sceneryArchive1.seek((uint32)screenNum * sizeof(sceneBlock_t), SEEK_SET); sceneBlock_t sceneBlock; // Database header entry - sceneBlock._scene_off = _sceneryArchive1.readUint32LE(); - sceneBlock._scene_len = _sceneryArchive1.readUint32LE(); - sceneBlock._b_off = _sceneryArchive1.readUint32LE(); - sceneBlock._b_len = _sceneryArchive1.readUint32LE(); - sceneBlock._o_off = _sceneryArchive1.readUint32LE(); - sceneBlock._o_len = _sceneryArchive1.readUint32LE(); - sceneBlock._ob_off = _sceneryArchive1.readUint32LE(); - sceneBlock._ob_len = _sceneryArchive1.readUint32LE(); + sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._sceneLength = _sceneryArchive1.readUint32LE(); + sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._boundaryLength = _sceneryArchive1.readUint32LE(); + sceneBlock._overlayOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._overlayLength = _sceneryArchive1.readUint32LE(); + sceneBlock._baseOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._baseLength = _sceneryArchive1.readUint32LE(); uint32 i = 0; switch (overlayType) { case kOvlBoundary: - _sceneryArchive1.seek(sceneBlock._b_off, SEEK_SET); - i = sceneBlock._b_len; + _sceneryArchive1.seek(sceneBlock._boundaryOffset, SEEK_SET); + i = sceneBlock._boundaryLength; break; case kOvlOverlay: - _sceneryArchive1.seek(sceneBlock._o_off, SEEK_SET); - i = sceneBlock._o_len; + _sceneryArchive1.seek(sceneBlock._overlayOffset, SEEK_SET); + i = sceneBlock._overlayLength; break; case kOvlBase: - _sceneryArchive1.seek(sceneBlock._ob_off, SEEK_SET); - i = sceneBlock._ob_len; + _sceneryArchive1.seek(sceneBlock._baseOffset, SEEK_SET); + i = sceneBlock._baseLength; break; default: error("Bad overlayType: %d", overlayType); diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp index 009b0b0bb8..7239e5174a 100644 --- a/engines/hugo/file_v2d.cpp +++ b/engines/hugo/file_v2d.cpp @@ -81,16 +81,16 @@ void FileManager_v2d::readBackground(const int screenIndex) { _sceneryArchive1.seek((uint32) screenIndex * sizeof(sceneBlock_t), SEEK_SET); sceneBlock_t sceneBlock; // Read a database header entry - sceneBlock._scene_off = _sceneryArchive1.readUint32LE(); - sceneBlock._scene_len = _sceneryArchive1.readUint32LE(); - sceneBlock._b_off = _sceneryArchive1.readUint32LE(); - sceneBlock._b_len = _sceneryArchive1.readUint32LE(); - sceneBlock._o_off = _sceneryArchive1.readUint32LE(); - sceneBlock._o_len = _sceneryArchive1.readUint32LE(); - sceneBlock._ob_off = _sceneryArchive1.readUint32LE(); - sceneBlock._ob_len = _sceneryArchive1.readUint32LE(); + sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._sceneLength = _sceneryArchive1.readUint32LE(); + sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._boundaryLength = _sceneryArchive1.readUint32LE(); + sceneBlock._overlayOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._overlayLength = _sceneryArchive1.readUint32LE(); + sceneBlock._baseOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._baseLength = _sceneryArchive1.readUint32LE(); - _sceneryArchive1.seek(sceneBlock._scene_off, SEEK_SET); + _sceneryArchive1.seek(sceneBlock._sceneOffset, SEEK_SET); // Read the image into dummy seq and static dib_a seq_t *dummySeq; // Image sequence structure for Read_pcx @@ -108,28 +108,28 @@ void FileManager_v2d::readOverlay(const int screenNum, image_pt image, ovl_t ove _sceneryArchive1.seek((uint32)screenNum * sizeof(sceneBlock_t), SEEK_SET); sceneBlock_t sceneBlock; // Database header entry - sceneBlock._scene_off = _sceneryArchive1.readUint32LE(); - sceneBlock._scene_len = _sceneryArchive1.readUint32LE(); - sceneBlock._b_off = _sceneryArchive1.readUint32LE(); - sceneBlock._b_len = _sceneryArchive1.readUint32LE(); - sceneBlock._o_off = _sceneryArchive1.readUint32LE(); - sceneBlock._o_len = _sceneryArchive1.readUint32LE(); - sceneBlock._ob_off = _sceneryArchive1.readUint32LE(); - sceneBlock._ob_len = _sceneryArchive1.readUint32LE(); + sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._sceneLength = _sceneryArchive1.readUint32LE(); + sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._boundaryLength = _sceneryArchive1.readUint32LE(); + sceneBlock._overlayOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._overlayLength = _sceneryArchive1.readUint32LE(); + sceneBlock._baseOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._baseLength = _sceneryArchive1.readUint32LE(); uint32 i = 0; switch (overlayType) { case kOvlBoundary: - _sceneryArchive1.seek(sceneBlock._b_off, SEEK_SET); - i = sceneBlock._b_len; + _sceneryArchive1.seek(sceneBlock._boundaryOffset, SEEK_SET); + i = sceneBlock._boundaryLength; break; case kOvlOverlay: - _sceneryArchive1.seek(sceneBlock._o_off, SEEK_SET); - i = sceneBlock._o_len; + _sceneryArchive1.seek(sceneBlock._overlayOffset, SEEK_SET); + i = sceneBlock._overlayLength; break; case kOvlBase: - _sceneryArchive1.seek(sceneBlock._ob_off, SEEK_SET); - i = sceneBlock._ob_len; + _sceneryArchive1.seek(sceneBlock._baseOffset, SEEK_SET); + i = sceneBlock._baseLength; break; default: error("Bad overlayType: %d", overlayType); diff --git a/engines/hugo/file_v3d.cpp b/engines/hugo/file_v3d.cpp index 99a3a68d9e..34c745efb6 100644 --- a/engines/hugo/file_v3d.cpp +++ b/engines/hugo/file_v3d.cpp @@ -53,22 +53,22 @@ void FileManager_v3d::readBackground(const int screenIndex) { _sceneryArchive1.seek((uint32) screenIndex * sizeof(sceneBlock_t), SEEK_SET); sceneBlock_t sceneBlock; // Read a database header entry - sceneBlock._scene_off = _sceneryArchive1.readUint32LE(); - sceneBlock._scene_len = _sceneryArchive1.readUint32LE(); - sceneBlock._b_off = _sceneryArchive1.readUint32LE(); - sceneBlock._b_len = _sceneryArchive1.readUint32LE(); - sceneBlock._o_off = _sceneryArchive1.readUint32LE(); - sceneBlock._o_len = _sceneryArchive1.readUint32LE(); - sceneBlock._ob_off = _sceneryArchive1.readUint32LE(); - sceneBlock._ob_len = _sceneryArchive1.readUint32LE(); + sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._sceneLength = _sceneryArchive1.readUint32LE(); + sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._boundaryLength = _sceneryArchive1.readUint32LE(); + sceneBlock._overlayOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._overlayLength = _sceneryArchive1.readUint32LE(); + sceneBlock._baseOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._baseLength = _sceneryArchive1.readUint32LE(); seq_t *dummySeq; // Image sequence structure for Read_pcx if (screenIndex < 20) { - _sceneryArchive1.seek(sceneBlock._scene_off, SEEK_SET); + _sceneryArchive1.seek(sceneBlock._sceneOffset, SEEK_SET); // Read the image into dummy seq and static dib_a dummySeq = readPCX(_sceneryArchive1, 0, _vm->_screen->getFrontBuffer(), true, _vm->_text->getScreenNames(screenIndex)); } else { - _sceneryArchive2.seek(sceneBlock._scene_off, SEEK_SET); + _sceneryArchive2.seek(sceneBlock._sceneOffset, SEEK_SET); // Read the image into dummy seq and static dib_a dummySeq = readPCX(_sceneryArchive2, 0, _vm->_screen->getFrontBuffer(), true, _vm->_text->getScreenNames(screenIndex)); } @@ -113,30 +113,30 @@ void FileManager_v3d::readOverlay(const int screenNum, image_pt image, ovl_t ove _sceneryArchive1.seek((uint32)screenNum * sizeof(sceneBlock_t), SEEK_SET); sceneBlock_t sceneBlock; // Database header entry - sceneBlock._scene_off = _sceneryArchive1.readUint32LE(); - sceneBlock._scene_len = _sceneryArchive1.readUint32LE(); - sceneBlock._b_off = _sceneryArchive1.readUint32LE(); - sceneBlock._b_len = _sceneryArchive1.readUint32LE(); - sceneBlock._o_off = _sceneryArchive1.readUint32LE(); - sceneBlock._o_len = _sceneryArchive1.readUint32LE(); - sceneBlock._ob_off = _sceneryArchive1.readUint32LE(); - sceneBlock._ob_len = _sceneryArchive1.readUint32LE(); + sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._sceneLength = _sceneryArchive1.readUint32LE(); + sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._boundaryLength = _sceneryArchive1.readUint32LE(); + sceneBlock._overlayOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._overlayLength = _sceneryArchive1.readUint32LE(); + sceneBlock._baseOffset = _sceneryArchive1.readUint32LE(); + sceneBlock._baseLength = _sceneryArchive1.readUint32LE(); uint32 i = 0; if (screenNum < 20) { switch (overlayType) { case kOvlBoundary: - _sceneryArchive1.seek(sceneBlock._b_off, SEEK_SET); - i = sceneBlock._b_len; + _sceneryArchive1.seek(sceneBlock._boundaryOffset, SEEK_SET); + i = sceneBlock._boundaryLength; break; case kOvlOverlay: - _sceneryArchive1.seek(sceneBlock._o_off, SEEK_SET); - i = sceneBlock._o_len; + _sceneryArchive1.seek(sceneBlock._overlayOffset, SEEK_SET); + i = sceneBlock._overlayLength; break; case kOvlBase: - _sceneryArchive1.seek(sceneBlock._ob_off, SEEK_SET); - i = sceneBlock._ob_len; + _sceneryArchive1.seek(sceneBlock._baseOffset, SEEK_SET); + i = sceneBlock._baseLength; break; default: error("Bad overlayType: %d", overlayType); @@ -166,16 +166,16 @@ void FileManager_v3d::readOverlay(const int screenNum, image_pt image, ovl_t ove } else { switch (overlayType) { case kOvlBoundary: - _sceneryArchive2.seek(sceneBlock._b_off, SEEK_SET); - i = sceneBlock._b_len; + _sceneryArchive2.seek(sceneBlock._boundaryOffset, SEEK_SET); + i = sceneBlock._boundaryLength; break; case kOvlOverlay: - _sceneryArchive2.seek(sceneBlock._o_off, SEEK_SET); - i = sceneBlock._o_len; + _sceneryArchive2.seek(sceneBlock._overlayOffset, SEEK_SET); + i = sceneBlock._overlayLength; break; case kOvlBase: - _sceneryArchive2.seek(sceneBlock._ob_off, SEEK_SET); - i = sceneBlock._ob_len; + _sceneryArchive2.seek(sceneBlock._baseOffset, SEEK_SET); + i = sceneBlock._baseLength; break; default: error("Bad overlayType: %d", overlayType); diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp index 599d8f21d3..f2ae06eb39 100644 --- a/engines/hugo/intro.cpp +++ b/engines/hugo/intro.cpp @@ -86,12 +86,12 @@ void intro_v1d::preNewGame() { void intro_v1d::introInit() { _introState = 0; - introTicks = 0; - surf.w = 320; - surf.h = 200; - surf.pixels = _vm->_screen->getFrontBuffer(); - surf.pitch = 320; - surf.format = Graphics::PixelFormat::createFormatCLUT8(); + _introTicks = 0; + _surf.w = 320; + _surf.h = 200; + _surf.pixels = _vm->_screen->getFrontBuffer(); + _surf.pitch = 320; + _surf.format = Graphics::PixelFormat::createFormatCLUT8(); _vm->_screen->displayList(kDisplayInit); } @@ -101,7 +101,7 @@ bool intro_v1d::introPlay() { if (_vm->getGameStatus()._skipIntroFl) return true; - if (introTicks < introSize) { + if (_introTicks < introSize) { switch (_introState++) { case 0: _vm->_screen->drawRectangle(true, 0, 0, 319, 199, _TMAGENTA); @@ -113,7 +113,7 @@ bool intro_v1d::introPlay() { _vm->_screen->drawShape(250,92,_TLIGHTMAGENTA,_TMAGENTA); // TROMAN, size 10-5 - if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 8))) + if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 8))) error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 8"); char buffer[80]; @@ -126,19 +126,19 @@ bool intro_v1d::introPlay() { else error("Unknown registration flag in hugo.bsf: %d", _vm->_boot._registered); - font.drawString(&surf, buffer, 0, 163, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); - font.drawString(&surf, _vm->getCopyrightString(), 0, 176, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 163, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); + _font.drawString(&_surf, _vm->getCopyrightString(), 0, 176, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); if ((*_vm->_boot._distrib != '\0') && (scumm_stricmp(_vm->_boot._distrib, "David P. Gray"))) { sprintf(buffer, "Distributed by %s.", _vm->_boot._distrib); - font.drawString(&surf, buffer, 0, 75, 320, _TMAGENTA, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 75, 320, _TMAGENTA, Graphics::kTextAlignCenter); } // SCRIPT, size 24-16 strcpy(buffer, "Hugo's"); - if (font.loadFromFON("SCRIPT.FON")) { - font.drawString(&surf, buffer, 0, 20, 320, _TMAGENTA, Graphics::kTextAlignCenter); + if (_font.loadFromFON("SCRIPT.FON")) { + _font.drawString(&_surf, buffer, 0, 20, 320, _TMAGENTA, Graphics::kTextAlignCenter); } else { // Workaround: SCRIPT.FON doesn't load properly at the moment _vm->_screen->loadFont(2); @@ -146,78 +146,78 @@ bool intro_v1d::introPlay() { } // TROMAN, size 30-24 - if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 24))) + if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 24))) error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 24"); strcpy(buffer, "House of Horrors !"); - font.drawString(&surf, buffer, 0, 50, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 50, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); break; case 2: _vm->_screen->drawRectangle(true, 82, 92, 237, 138, _TBLACK); // TROMAN, size 16-9 - if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 14))) + if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 14))) error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 14"); strcpy(buffer, "S t a r r i n g :"); - font.drawString(&surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter); break; case 3: // TROMAN, size 20-9 - if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 18))) + if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 18))) error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 18"); strcpy(buffer, "Hugo !"); - font.drawString(&surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); break; case 4: _vm->_screen->drawRectangle(true, 82, 92, 237, 138, _TBLACK); // TROMAN, size 16-9 - if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 14))) + if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 14))) error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 14"); strcpy(buffer, "P r o d u c e d b y :"); - font.drawString(&surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter); break; case 5: // TROMAN size 16-9 strcpy(buffer, "David P Gray !"); - font.drawString(&surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); break; case 6: _vm->_screen->drawRectangle(true, 82, 92, 237, 138, _TBLACK); // TROMAN, size 16-9 strcpy(buffer, "D i r e c t e d b y :"); - font.drawString(&surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter); break; case 7: // TROMAN, size 16-9 strcpy(buffer, "David P Gray !"); - font.drawString(&surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); break; case 8: _vm->_screen->drawRectangle(true, 82, 92, 237, 138, _TBLACK); // TROMAN, size 16-9 strcpy(buffer, "M u s i c b y :"); - font.drawString(&surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 95, 320, _TMAGENTA, Graphics::kTextAlignCenter); break; case 9: // TROMAN, size 16-9 strcpy(buffer, "David P Gray !"); - font.drawString(&surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 115, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); break; case 10: _vm->_screen->drawRectangle(true, 82, 92, 237, 138, _TBLACK); // TROMAN, size 20-14 - if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 18))) + if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 18))) error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 18"); strcpy(buffer, "E n j o y !"); - font.drawString(&surf, buffer, 0, 100, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 100, 320, _TLIGHTMAGENTA, Graphics::kTextAlignCenter); break; } @@ -226,7 +226,7 @@ bool intro_v1d::introPlay() { g_system->delayMillis(1000); } - return (++introTicks >= introSize); + return (++_introTicks >= introSize); } intro_v2d::intro_v2d(HugoEngine *vm) : IntroHandler(vm) { @@ -241,16 +241,16 @@ void intro_v2d::preNewGame() { void intro_v2d::introInit() { _vm->_screen->displayList(kDisplayInit); _vm->_file->readBackground(_vm->_numScreens - 1); // display splash screen - surf.w = 320; - surf.h = 200; - surf.pixels = _vm->_screen->getFrontBuffer(); - surf.pitch = 320; - surf.format = Graphics::PixelFormat::createFormatCLUT8(); + _surf.w = 320; + _surf.h = 200; + _surf.pixels = _vm->_screen->getFrontBuffer(); + _surf.pitch = 320; + _surf.format = Graphics::PixelFormat::createFormatCLUT8(); char buffer[128]; // TROMAN, size 10-5 - if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 8))) + if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 8))) error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 8"); if (_vm->_boot._registered) @@ -258,12 +258,12 @@ void intro_v2d::introInit() { else sprintf(buffer, "%s Shareware Version", _vm->getCopyrightString()); - font.drawString(&surf, buffer, 0, 186, 320, _TLIGHTRED, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 186, 320, _TLIGHTRED, Graphics::kTextAlignCenter); if ((*_vm->_boot._distrib != '\0') && (scumm_stricmp(_vm->_boot._distrib, "David P. Gray"))) { // TROMAN, size 10-5 sprintf(buffer, "Distributed by %s.", _vm->_boot._distrib); - font.drawString(&surf, buffer, 0, 1, 320, _TLIGHTRED, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 1, 320, _TLIGHTRED, Graphics::kTextAlignCenter); } _vm->_screen->displayBackground(); @@ -287,11 +287,11 @@ void intro_v3d::preNewGame() { void intro_v3d::introInit() { _vm->_screen->displayList(kDisplayInit); _vm->_file->readBackground(_vm->_numScreens - 1); // display splash screen - surf.w = 320; - surf.h = 200; - surf.pixels = _vm->_screen->getFrontBuffer(); - surf.pitch = 320; - surf.format = Graphics::PixelFormat::createFormatCLUT8(); + _surf.w = 320; + _surf.h = 200; + _surf.pixels = _vm->_screen->getFrontBuffer(); + _surf.pitch = 320; + _surf.format = Graphics::PixelFormat::createFormatCLUT8(); char buffer[128]; if (_vm->_boot._registered) @@ -300,14 +300,14 @@ void intro_v3d::introInit() { sprintf(buffer,"%s Shareware Version", _vm->getCopyrightString()); // TROMAN, size 10-5 - if (!font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 8))) + if (!_font.loadFromFON("TMSRB.FON", Graphics::WinFontDirEntry("Tms Rmn", 8))) error("Unable to load font TMSRB.FON, face 'Tms Rmn', size 8"); - font.drawString(&surf, buffer, 0, 190, 320, _TBROWN, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 190, 320, _TBROWN, Graphics::kTextAlignCenter); if ((*_vm->_boot._distrib != '\0') && (scumm_stricmp(_vm->_boot._distrib, "David P. Gray"))) { sprintf(buffer, "Distributed by %s.", _vm->_boot._distrib); - font.drawString(&surf, buffer, 0, 0, 320, _TBROWN, Graphics::kTextAlignCenter); + _font.drawString(&_surf, buffer, 0, 0, 320, _TBROWN, Graphics::kTextAlignCenter); } _vm->_screen->displayBackground(); @@ -316,7 +316,7 @@ void intro_v3d::introInit() { _vm->_file->readBackground(22); // display screen MAP_3d _vm->_screen->displayBackground(); - introTicks = 0; + _introTicks = 0; _vm->_sound->_DOSSongPtr = _vm->_sound->_DOSIntroSong; } @@ -328,12 +328,12 @@ bool intro_v3d::introPlay() { if (_vm->getGameStatus()._skipIntroFl) return true; - if (introTicks < getIntroSize()) { - font.drawString(&surf, ".", _introX[introTicks], _introY[introTicks] - kDibOffY, 320, _TBRIGHTWHITE); + if (_introTicks < getIntroSize()) { + _font.drawString(&_surf, ".", _introX[_introTicks], _introY[_introTicks] - kDibOffY, 320, _TBRIGHTWHITE); _vm->_screen->displayBackground(); // Text boxes at various times - switch (introTicks) { + switch (_introTicks) { case 4: Utils::notifyBox(_vm->_text->getTextIntro(kIntro1)); break; @@ -346,7 +346,7 @@ bool intro_v3d::introPlay() { } } - return (++introTicks >= getIntroSize()); + return (++_introTicks >= getIntroSize()); } intro_v1w::intro_v1w(HugoEngine *vm) : IntroHandler(vm) { @@ -407,7 +407,7 @@ void intro_v3w::introInit() { g_system->delayMillis(3000); _vm->_file->readBackground(22); // display screen MAP_3w _vm->_screen->displayBackground(); - introTicks = 0; + _introTicks = 0; _vm->_screen->loadFont(0); } @@ -419,13 +419,13 @@ bool intro_v3w::introPlay() { if (_vm->getGameStatus()._skipIntroFl) return true; - if (introTicks < getIntroSize()) { + if (_introTicks < getIntroSize()) { // Scale viewport x_intro,y_intro to screen (offsetting y) - _vm->_screen->writeStr(_introX[introTicks], _introY[introTicks] - kDibOffY, "x", _TBRIGHTWHITE); + _vm->_screen->writeStr(_introX[_introTicks], _introY[_introTicks] - kDibOffY, "x", _TBRIGHTWHITE); _vm->_screen->displayBackground(); // Text boxes at various times - switch (introTicks) { + switch (_introTicks) { case 4: Utils::notifyBox(_vm->_text->getTextIntro(kIntro1)); break; @@ -438,6 +438,6 @@ bool intro_v3w::introPlay() { } } - return (++introTicks >= getIntroSize()); + return (++_introTicks >= getIntroSize()); } } // End of namespace Hugo diff --git a/engines/hugo/intro.h b/engines/hugo/intro.h index 1bb039216a..d5a5a4e4b4 100644 --- a/engines/hugo/intro.h +++ b/engines/hugo/intro.h @@ -42,8 +42,8 @@ enum seqTextIntro { class IntroHandler { public: IntroHandler(HugoEngine *vm); - Graphics::Surface surf; - Graphics::WinFont font; + Graphics::Surface _surf; + Graphics::WinFont _font; virtual ~IntroHandler(); @@ -62,7 +62,7 @@ protected: byte *_introX; byte *_introY; byte _introXSize; - int16 introTicks; // Count calls to introPlay() + int16 _introTicks; // Count calls to introPlay() }; class intro_v1w : public IntroHandler { diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp index 552ddaf5c9..7f63ccac3b 100644 --- a/engines/hugo/route.cpp +++ b/engines/hugo/route.cpp @@ -286,9 +286,9 @@ void Route::segment(int16 x, int16 y) { } else { // Create segment seg_p = &_segment[_segmentNumb]; - seg_p->y = y; - seg_p->x1 = x1; - seg_p->x2 = x2; + seg_p->_y = y; + seg_p->_x1 = x1; + seg_p->_x2 = x2; _segmentNumb++; } } @@ -368,9 +368,9 @@ bool Route::findRoute(const int16 cx, const int16 cy) { _route[0].y = _destY; // Make a final segment for hero's base (we left a spare) - _segment[_segmentNumb].y = heroy; - _segment[_segmentNumb].x1 = herox1; - _segment[_segmentNumb].x2 = herox2; + _segment[_segmentNumb]._y = heroy; + _segment[_segmentNumb]._x1 = herox1; + _segment[_segmentNumb]._x2 = herox2; _segmentNumb++; Point *routeNode; // Ptr to route node @@ -378,22 +378,22 @@ bool Route::findRoute(const int16 cx, const int16 cy) { for (i = 0, _routeListIndex = 0; i < _segmentNumb - 1; i++) { if ((routeNode = newNode()) == 0) // New node for new segment return false; // Too many nodes - routeNode->y = _segment[i].y; + routeNode->y = _segment[i]._y; // Look ahead for furthest straight line for (int16 j = i + 1; j < _segmentNumb; j++) { segment_t *seg_p = &_segment[j]; // Can we get to this segment from previous node? - if (seg_p->x1 <= routeNode->x && seg_p->x2 >= routeNode->x + _heroWidth - 1) { - routeNode->y = seg_p->y; // Yes, keep updating node + if (seg_p->_x1 <= routeNode->x && seg_p->_x2 >= routeNode->x + _heroWidth - 1) { + routeNode->y = seg_p->_y; // Yes, keep updating node } else { // No, create another node on previous segment to reach it if ((routeNode = newNode()) == 0) // Add new route node return false; // Too many nodes // Find overlap between old and new segments - int16 x1 = MAX(_segment[j - 1].x1, seg_p->x1); - int16 x2 = MIN(_segment[j - 1].x2, seg_p->x2); + int16 x1 = MAX(_segment[j - 1]._x1, seg_p->_x1); + int16 x2 = MIN(_segment[j - 1]._x2, seg_p->_x2); // If room, add a little offset to reduce staircase effect int16 dx = kHeroMaxWidth >> 1; diff --git a/engines/hugo/route.h b/engines/hugo/route.h index a95dd2151b..b20ac771d7 100644 --- a/engines/hugo/route.h +++ b/engines/hugo/route.h @@ -43,8 +43,8 @@ struct Point { }; struct segment_t { // Search segment - int16 y; // y position - int16 x1, x2; // Range of segment + int16 _y; // y position + int16 _x1, _x2; // Range of segment }; class Route { -- cgit v1.2.3 From 0c7fcff8a3fa10fc9bedcf0ac299809f9a140632 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 13 Jun 2012 16:28:47 +0200 Subject: HUGO: Use Common::Point in pathfinding --- engines/hugo/route.cpp | 6 +++--- engines/hugo/route.h | 11 ++++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp index 7f63ccac3b..873cb587af 100644 --- a/engines/hugo/route.cpp +++ b/engines/hugo/route.cpp @@ -298,7 +298,7 @@ void Route::segment(int16 x, int16 y) { * Create and return ptr to new node. Initialize with previous node. * Returns 0 if MAX_NODES exceeded */ -Point *Route::newNode() { +Common::Point *Route::newNode() { debugC(1, kDebugRoute, "newNode"); _routeListIndex++; @@ -373,7 +373,7 @@ bool Route::findRoute(const int16 cx, const int16 cy) { _segment[_segmentNumb]._x2 = herox2; _segmentNumb++; - Point *routeNode; // Ptr to route node + Common::Point *routeNode; // Ptr to route node // Look in segments[] for straight lines from destination to hero for (i = 0, _routeListIndex = 0; i < _segmentNumb - 1; i++) { if ((routeNode = newNode()) == 0) // New node for new segment @@ -435,7 +435,7 @@ void Route::processRoute() { // Current hero position int16 herox = _vm->_hero->_x + _vm->_hero->_currImagePtr->_x1; int16 heroy = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2; - Point *routeNode = &_route[_routeIndex]; + Common::Point *routeNode = &_route[_routeIndex]; // Arrived at node? if (abs(herox - routeNode->x) < kStepDx + 1 && abs(heroy - routeNode->y) < kStepDy) { diff --git a/engines/hugo/route.h b/engines/hugo/route.h index b20ac771d7..53b0dd0f88 100644 --- a/engines/hugo/route.h +++ b/engines/hugo/route.h @@ -30,6 +30,8 @@ #ifndef HUGO_ROUTE_H #define HUGO_ROUTE_H +#include "common/rect.h" + namespace Hugo { /** @@ -37,11 +39,6 @@ namespace Hugo { */ enum go_t {kRouteSpace, kRouteExit, kRouteLook, kRouteGet}; -struct Point { - int x; - int y; -}; - struct segment_t { // Search segment int16 _y; // y position int16 _x1, _x2; // Range of segment @@ -75,7 +72,7 @@ private: byte _boundaryMap[kYPix][kXPix]; // Boundary byte map segment_t _segment[kMaxSeg]; // List of points in fill-path - Point _route[kMaxNodes]; // List of nodes in route (global) + Common::Point _route[kMaxNodes]; // List of nodes in route (global) int16 _segmentNumb; // Count number of segments int16 _routeListIndex; // Index into route list int16 _destX; @@ -87,7 +84,7 @@ private: void segment(int16 x, int16 y); bool findRoute(const int16 cx, const int16 cy); - Point *newNode(); + Common::Point *newNode(); }; } // End of namespace Hugo -- cgit v1.2.3 From fbc2c6d08ac96c92e2424118dc9b0548628287e5 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 13 Jun 2012 17:44:09 +0200 Subject: HUGO: More renaming --- engines/hugo/dialogs.cpp | 8 +- engines/hugo/file.cpp | 24 +- engines/hugo/file.h | 6 +- engines/hugo/hugo.cpp | 12 +- engines/hugo/hugo.h | 32 +- engines/hugo/mouse.cpp | 46 +- engines/hugo/parser.cpp | 4 +- engines/hugo/schedule.cpp | 1032 ++++++++++++++++++++++----------------------- engines/hugo/schedule.h | 519 +++++++++++------------ engines/hugo/sound.cpp | 12 +- 10 files changed, 840 insertions(+), 855 deletions(-) diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp index 0efd47a3bd..0f07d52aee 100644 --- a/engines/hugo/dialogs.cpp +++ b/engines/hugo/dialogs.cpp @@ -109,12 +109,12 @@ void TopMenu::reflowLayout() { // Set the graphics to the 'on' buttons, except for the variable ones _whatButton->setGfx(_arrayBmp[4 * kMenuWhat + scale - 1]); - _musicButton->setGfx(_arrayBmp[4 * kMenuMusic + scale - 1 + ((_vm->_config.musicFl) ? 0 : 2)]); - _soundFXButton->setGfx(_arrayBmp[4 * kMenuSoundFX + scale - 1 + ((_vm->_config.soundFl) ? 0 : 2)]); + _musicButton->setGfx(_arrayBmp[4 * kMenuMusic + scale - 1 + ((_vm->_config._musicFl) ? 0 : 2)]); + _soundFXButton->setGfx(_arrayBmp[4 * kMenuSoundFX + scale - 1 + ((_vm->_config._soundFl) ? 0 : 2)]); _saveButton->setGfx(_arrayBmp[4 * kMenuSave + scale - 1]); _loadButton->setGfx(_arrayBmp[4 * kMenuLoad + scale - 1]); _recallButton->setGfx(_arrayBmp[4 * kMenuRecall + scale - 1]); - _turboButton->setGfx(_arrayBmp[4 * kMenuTurbo + scale - 1 + ((_vm->_config.turboFl) ? 0 : 2)]); + _turboButton->setGfx(_arrayBmp[4 * kMenuTurbo + scale - 1 + ((_vm->_config._turboFl) ? 0 : 2)]); _lookButton->setGfx(_arrayBmp[4 * kMenuLook + scale - 1]); _inventButton->setGfx(_arrayBmp[4 * kMenuInventory + scale - 1]); } @@ -176,7 +176,7 @@ void TopMenu::handleCommand(GUI::CommandSender *sender, uint32 command, uint32 d break; case kCmdMusic: _vm->_sound->toggleMusic(); - _musicButton->setGfx(_arrayBmp[4 * kMenuMusic + (g_system->getOverlayWidth() > 320 ? 2 : 1) - 1 + ((_vm->_config.musicFl) ? 0 : 2)]); + _musicButton->setGfx(_arrayBmp[4 * kMenuMusic + (g_system->getOverlayWidth() > 320 ? 2 : 1) - 1 + ((_vm->_config._musicFl) ? 0 : 2)]); _musicButton->draw(); g_gui.theme()->updateScreen(); g_system->updateScreen(); diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp index a3fc5dfe49..219e29a25a 100644 --- a/engines/hugo/file.cpp +++ b/engines/hugo/file.cpp @@ -54,7 +54,7 @@ static const int s_bootCypherLen = sizeof(s_bootCypher) - 1; FileManager::FileManager(HugoEngine *vm) : _vm(vm) { _hasReadHeader = false; - firstUIFFl = true; + _firstUIFFl = true; } FileManager::~FileManager() { @@ -624,28 +624,28 @@ void FileManager::readBootFile() { * This file contains, between others, the bitmaps of the fonts used in the application * UIF means User interface database (Windows Only) */ -uif_hdr_t *FileManager::getUIFHeader(const uif_t id) { - debugC(1, kDebugFile, "getUIFHeader(%d)", id); +uif_hdr_t *FileManager::get_UIFHeader(const uif_t id) { + debugC(1, kDebugFile, "get_UIFHeader(%d)", id); // Initialize offset lookup if not read yet - if (firstUIFFl) { - firstUIFFl = false; + if (_firstUIFFl) { + _firstUIFFl = false; // Open unbuffered to do far read Common::File ip; // Image data file if (!ip.open(getUifFilename())) error("File not found: %s", getUifFilename()); - if (ip.size() < (int32)sizeof(UIFHeader)) + if (ip.size() < (int32)sizeof(_UIFHeader)) error("Wrong UIF file format"); for (int i = 0; i < kMaxUifs; ++i) { - UIFHeader[i]._size = ip.readUint16LE(); - UIFHeader[i]._offset = ip.readUint32LE(); + _UIFHeader[i]._size = ip.readUint16LE(); + _UIFHeader[i]._offset = ip.readUint32LE(); } ip.close(); } - return &UIFHeader[id]; + return &_UIFHeader[id]; } /** @@ -660,8 +660,8 @@ void FileManager::readUIFItem(const int16 id, byte *buf) { error("File not found: %s", getUifFilename()); // Seek to data - uif_hdr_t *UIFHeaderPtr = getUIFHeader((uif_t)id); - ip.seek(UIFHeaderPtr->_offset, SEEK_SET); + uif_hdr_t *_UIFHeaderPtr = get_UIFHeader((uif_t)id); + ip.seek(_UIFHeaderPtr->_offset, SEEK_SET); // We support pcx images and straight data seq_t *dummySeq; // Dummy seq_t for image data @@ -671,7 +671,7 @@ void FileManager::readUIFItem(const int16 id, byte *buf) { free(dummySeq); break; default: // Read file data into supplied array - if (ip.read(buf, UIFHeaderPtr->_size) != UIFHeaderPtr->_size) + if (ip.read(buf, _UIFHeaderPtr->_size) != _UIFHeaderPtr->_size) error("Wrong UIF file format"); break; } diff --git a/engines/hugo/file.h b/engines/hugo/file.h index 817bf49daf..e7c467a315 100644 --- a/engines/hugo/file.h +++ b/engines/hugo/file.h @@ -105,8 +105,8 @@ protected: byte _fill2[60]; }; // Header of a PCC file - bool firstUIFFl; - uif_hdr_t UIFHeader[kMaxUifs]; // Lookup for uif fonts/images + bool _firstUIFFl; + uif_hdr_t _UIFHeader[kMaxUifs]; // Lookup for uif fonts/images Common::File _stringArchive; // Handle for string file Common::File _sceneryArchive1; // Handle for scenery file @@ -122,7 +122,7 @@ protected: private: byte *convertPCC(byte *p, const uint16 y, const uint16 bpl, image_pt dataPtr) const; - uif_hdr_t *getUIFHeader(const uif_t id); + uif_hdr_t *get_UIFHeader(const uif_t id); //Strangerke : Not used? void printBootText(); diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index 450f4ff837..7462da0df8 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -562,10 +562,10 @@ void HugoEngine::initStatus() { void HugoEngine::initConfig() { debugC(1, kDebugEngine, "initConfig()"); - _config.musicFl = true; // Music state initially on - _config.soundFl = true; // Sound state initially on - _config.turboFl = false; // Turbo state initially off - initPlaylist(_config.playlist); // Initialize default tune playlist + _config._musicFl = true; // Music state initially on + _config._soundFl = true; // Sound state initially on + _config._turboFl = false; // Turbo state initially off + initPlaylist(_config._playlist); // Initialize default tune playlist _file->readBootFile(); // Read startup structure } @@ -577,7 +577,7 @@ void HugoEngine::resetConfig() { // Find first tune and play it for (int16 i = 0; i < kMaxTunes; i++) { - if (_config.playlist[i]) { + if (_config._playlist[i]) { _sound->playMusic(i); break; } @@ -694,7 +694,7 @@ bool HugoEngine::canSaveGameStateCurrently() { } int8 HugoEngine::getTPS() const { - return ((_config.turboFl) ? kTurboTps : _normalTPS); + return ((_config._turboFl) ? kTurboTps : _normalTPS); } void HugoEngine::syncSoundSettings() { diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h index 3ad6fced24..68b771faa4 100644 --- a/engines/hugo/hugo.h +++ b/engines/hugo/hugo.h @@ -83,10 +83,10 @@ static const int kHeroMinWidth = 16; // Minimum width of hero typedef char command_t[kMaxLineSize + 8]; // Command line (+spare for prompt,cursor) struct config_t { // User's config (saved) - bool musicFl; // State of Music button/menu item - bool soundFl; // State of Sound button/menu item - bool turboFl; // State of Turbo button/menu item - bool playlist[kMaxTunes]; // Tune playlist + bool _musicFl; // State of Music button/menu item + bool _soundFl; // State of Sound button/menu item + bool _turboFl; // State of Turbo button/menu item + bool _playlist[kMaxTunes]; // Tune playlist }; typedef byte icondib_t[kXPix * kInvDy]; // Icon bar dib @@ -185,32 +185,16 @@ struct status_t { // Game status (not saved) uint32 _tick; // Current time in ticks vstate_t _viewState; // View state machine int16 _song; // Current song - -// Strangerke - Suppress as related to playback -// bool playbackFl; // Game is in playback mode -// bool recordFl; // Game is in record mode -// Strangerke - Not used ? -// bool helpFl; // Calling WinHelp (don't disable music) -// bool mmtimeFl; // Multimedia timer supported -// bool demoFl; // Game is in demo mode -// bool textBoxFl; // Game is (halted) in text box -// int16 screenWidth; // Desktop screen width -// int16 saveSlot; // Current slot to save/restore game -// int16 cx, cy; // Cursor position (dib coords) -// uint32 saveTick; // Time of last save in ticks -// -// typedef char fpath_t[kMaxPath]; // File path -// fpath_t path; // Alternate path for saved files }; /** * Structure to define an EXIT or other collision-activated hotspot */ struct hotspot_t { - int screenIndex; // Screen in which hotspot appears - int x1, y1, x2, y2; // Bounding box of hotspot - uint16 actIndex; // Actions to carry out if a 'hit' - int16 viewx, viewy, direction; // Used in auto-route mode + int _screenIndex; // Screen in which hotspot appears + int _x1, _y1, _x2, _y2; // Bounding box of hotspot + uint16 _actIndex; // Actions to carry out if a 'hit' + int16 _viewx, _viewy, _direction; // Used in auto-route mode }; class FileManager; diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp index 323f362b10..864934a0d3 100644 --- a/engines/hugo/mouse.cpp +++ b/engines/hugo/mouse.cpp @@ -98,11 +98,11 @@ int MouseHandler::getMouseY() const { } int16 MouseHandler::getDirection(const int16 hotspotId) const { - return _hotspots[hotspotId].direction; + return _hotspots[hotspotId]._direction; } int16 MouseHandler::getHotspotActIndex(const int16 hotspotId) const { - return _hotspots[hotspotId].actIndex; + return _hotspots[hotspotId]._actIndex; } /** @@ -137,9 +137,9 @@ void MouseHandler::cursorText(const char *buffer, const int16 cx, const int16 cy int16 MouseHandler::findExit(const int16 cx, const int16 cy, byte screenId) { debugC(2, kDebugMouse, "findExit(%d, %d, %d)", cx, cy, screenId); - for (int i = 0; _hotspots[i].screenIndex >= 0; i++) { - if (_hotspots[i].screenIndex == screenId) { - if (cx >= _hotspots[i].x1 && cx <= _hotspots[i].x2 && cy >= _hotspots[i].y1 && cy <= _hotspots[i].y2) + for (int i = 0; _hotspots[i]._screenIndex >= 0; i++) { + if (_hotspots[i]._screenIndex == screenId) { + if (cx >= _hotspots[i]._x1 && cx <= _hotspots[i]._x2 && cy >= _hotspots[i]._y1 && cy <= _hotspots[i]._y2) return i; } } @@ -224,19 +224,19 @@ void MouseHandler::processLeftClick(const int16 objId, const int16 cx, const int break; case kExitHotspot: // Walk to exit hotspot i = findExit(cx, cy, *_vm->_screen_p); - x = _hotspots[i].viewx; - y = _hotspots[i].viewy; + x = _hotspots[i]._viewx; + y = _hotspots[i]._viewy; if (x >= 0) { // Hotspot refers to an exit // Special case of immediate exit if (_jumpExitFl) { // Get rid of iconbar if necessary if (_vm->_inventory->getInventoryState() != kInventoryOff) _vm->_inventory->setInventoryState(kInventoryUp); - _vm->_scheduler->insertActionList(_hotspots[i].actIndex); + _vm->_scheduler->insertActionList(_hotspots[i]._actIndex); } else { // Set up route to exit spot - if (_hotspots[i].direction == Common::KEYCODE_RIGHT) + if (_hotspots[i]._direction == Common::KEYCODE_RIGHT) x -= kHeroMaxWidth; - else if (_hotspots[i].direction == Common::KEYCODE_LEFT) + else if (_hotspots[i]._direction == Common::KEYCODE_LEFT) x += kHeroMaxWidth; if (!_vm->_route->startRoute(kRouteExit, i, x, y)) Utils::notifyBox(_vm->_text->getTextMouse(kMsNoWayText)); // Can't get there @@ -328,7 +328,7 @@ void MouseHandler::mouseHandler() { // Process cursor over an exit hotspot if (objId == -1) { int i = findExit(cx, cy, *_vm->_screen_p); - if (i != -1 && _hotspots[i].viewx >= 0) { + if (i != -1 && _hotspots[i]._viewx >= 0) { objId = kExitHotspot; cursorText(_vm->_text->getTextMouse(kMsExit), cx, cy, U_FONT8, _TBRIGHTWHITE); } @@ -344,15 +344,15 @@ void MouseHandler::mouseHandler() { } void MouseHandler::readHotspot(Common::ReadStream &in, hotspot_t &hotspot) { - hotspot.screenIndex = in.readSint16BE(); - hotspot.x1 = in.readSint16BE(); - hotspot.y1 = in.readSint16BE(); - hotspot.x2 = in.readSint16BE(); - hotspot.y2 = in.readSint16BE(); - hotspot.actIndex = in.readUint16BE(); - hotspot.viewx = in.readSint16BE(); - hotspot.viewy = in.readSint16BE(); - hotspot.direction = in.readSint16BE(); + hotspot._screenIndex = in.readSint16BE(); + hotspot._x1 = in.readSint16BE(); + hotspot._y1 = in.readSint16BE(); + hotspot._x2 = in.readSint16BE(); + hotspot._y2 = in.readSint16BE(); + hotspot._actIndex = in.readUint16BE(); + hotspot._viewx = in.readSint16BE(); + hotspot._viewy = in.readSint16BE(); + hotspot._direction = in.readSint16BE(); } /** @@ -376,10 +376,10 @@ void MouseHandler::loadHotspots(Common::ReadStream &in) { * Display hotspot boundaries for the current screen */ void MouseHandler::drawHotspots() const { - for (int i = 0; _hotspots[i].screenIndex >= 0; i++) { + for (int i = 0; _hotspots[i]._screenIndex >= 0; i++) { hotspot_t *hotspot = &_hotspots[i]; - if (hotspot->screenIndex == _vm->_hero->_screenIndex) - _vm->_screen->drawRectangle(false, hotspot->x1, hotspot->y1, hotspot->x2, hotspot->y2, _TLIGHTRED); + if (hotspot->_screenIndex == _vm->_hero->_screenIndex) + _vm->_screen->drawRectangle(false, hotspot->_x1, hotspot->_y1, hotspot->_x2, hotspot->_y2, _TLIGHTRED); } } } // End of namespace Hugo diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp index b4255e607b..3b0eb1d979 100644 --- a/engines/hugo/parser.cpp +++ b/engines/hugo/parser.cpp @@ -198,7 +198,7 @@ void Parser::freeParser() { } void Parser::switchTurbo() { - _vm->_config.turboFl = !_vm->_config.turboFl; + _vm->_config._turboFl = !_vm->_config._turboFl; } /** @@ -256,7 +256,7 @@ void Parser::charHandler() { } sprintf(_vm->_statusLine, ">%s%c", _cmdLine, _cmdLineCursor); - sprintf(_vm->_scoreLine, "F1-Help %s Score: %d of %d Sound %s", (_vm->_config.turboFl) ? "T" : " ", _vm->getScore(), _vm->getMaxScore(), (_vm->_config.soundFl) ? "On" : "Off"); + sprintf(_vm->_scoreLine, "F1-Help %s Score: %d of %d Sound %s", (_vm->_config._turboFl) ? "T" : " ", _vm->getScore(), _vm->getMaxScore(), (_vm->_config._soundFl) ? "On" : "Off"); // See if "look" button pressed if (gameStatus._lookFl) { diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp index 18e414420a..0e57b08f19 100644 --- a/engines/hugo/schedule.cpp +++ b/engines/hugo/schedule.cpp @@ -68,13 +68,13 @@ void Scheduler::initEventQueue() { // Chain next_p from first to last for (int i = kMaxEvents; --i;) - _events[i - 1].nextEvent = &_events[i]; - _events[kMaxEvents - 1].nextEvent = 0; + _events[i - 1]._nextEvent = &_events[i]; + _events[kMaxEvents - 1]._nextEvent = 0; // Chain prev_p from last to first for (int i = 1; i < kMaxEvents; i++) - _events[i].prevEvent = &_events[i - 1]; - _events[0].prevEvent = 0; + _events[i]._prevEvent = &_events[i - 1]; + _events[0]._prevEvent = 0; _headEvent = _tailEvent = 0; // Event list is empty _freeEvent = _events; // Free list is full @@ -89,8 +89,8 @@ event_t *Scheduler::getQueue() { if (!_freeEvent) // Error: no more events available error("An error has occurred: %s", "getQueue"); event_t *resEvent = _freeEvent; - _freeEvent = _freeEvent->nextEvent; - resEvent->nextEvent = 0; + _freeEvent = _freeEvent->_nextEvent; + resEvent->_nextEvent = 0; return resEvent; } @@ -101,7 +101,7 @@ void Scheduler::insertActionList(const uint16 actIndex) { debugC(1, kDebugSchedule, "insertActionList(%d)", actIndex); if (_actListArr[actIndex]) { - for (int i = 0; _actListArr[actIndex][i].a0.actType != ANULL; i++) + for (int i = 0; _actListArr[actIndex][i]._a0._actType != ANULL; i++) insertAction(&_actListArr[actIndex][i]); } } @@ -147,9 +147,9 @@ uint32 Scheduler::getDosTicks(const bool updateFl) { void Scheduler::processBonus(const int bonusIndex) { debugC(1, kDebugSchedule, "processBonus(%d)", bonusIndex); - if (!_points[bonusIndex].scoredFl) { - _vm->adjustScore(_points[bonusIndex].score); - _points[bonusIndex].scoredFl = true; + if (!_points[bonusIndex]._scoredFl) { + _vm->adjustScore(_points[bonusIndex]._score); + _points[bonusIndex]._scoredFl = true; } } @@ -178,8 +178,8 @@ void Scheduler::newScreen(const int screenIndex) { event_t *curEvent = _headEvent; // The earliest event event_t *wrkEvent; // Event ptr while (curEvent) { // While mature events found - wrkEvent = curEvent->nextEvent; // Save p (becomes undefined after Del) - if (curEvent->localActionFl) + wrkEvent = curEvent->_nextEvent; // Save p (becomes undefined after Del) + if (curEvent->_localActionFl) delQueue(curEvent); // Return event to free list curEvent = wrkEvent; } @@ -261,8 +261,8 @@ void Scheduler::loadPoints(Common::SeekableReadStream &in) { _numBonuses = numElem; _points = (point_t *)malloc(sizeof(point_t) * _numBonuses); for (int i = 0; i < _numBonuses; i++) { - _points[i].score = in.readByte(); - _points[i].scoredFl = false; + _points[i]._score = in.readByte(); + _points[i]._scoredFl = false; } } else { in.skip(numElem); @@ -273,277 +273,277 @@ void Scheduler::loadPoints(Common::SeekableReadStream &in) { void Scheduler::readAct(Common::ReadStream &in, act &curAct) { uint16 numSubAct; - curAct.a0.actType = (action_t) in.readByte(); - switch (curAct.a0.actType) { + curAct._a0._actType = (action_t) in.readByte(); + switch (curAct._a0._actType) { case ANULL: // -1 break; case ASCHEDULE: // 0 - curAct.a0.timer = in.readSint16BE(); - curAct.a0.actIndex = in.readUint16BE(); + curAct._a0._timer = in.readSint16BE(); + curAct._a0._actIndex = in.readUint16BE(); break; case START_OBJ: // 1 - curAct.a1.timer = in.readSint16BE(); - curAct.a1.objIndex = in.readSint16BE(); - curAct.a1.cycleNumb = in.readSint16BE(); - curAct.a1.cycle = (cycle_t) in.readByte(); + curAct._a1._timer = in.readSint16BE(); + curAct._a1._objIndex = in.readSint16BE(); + curAct._a1._cycleNumb = in.readSint16BE(); + curAct._a1._cycle = (cycle_t) in.readByte(); break; case INIT_OBJXY: // 2 - curAct.a2.timer = in.readSint16BE(); - curAct.a2.objIndex = in.readSint16BE(); - curAct.a2.x = in.readSint16BE(); - curAct.a2.y = in.readSint16BE(); + curAct._a2._timer = in.readSint16BE(); + curAct._a2._objIndex = in.readSint16BE(); + curAct._a2._x = in.readSint16BE(); + curAct._a2._y = in.readSint16BE(); break; case PROMPT: // 3 - curAct.a3.timer = in.readSint16BE(); - curAct.a3.promptIndex = in.readSint16BE(); + curAct._a3._timer = in.readSint16BE(); + curAct._a3._promptIndex = in.readSint16BE(); numSubAct = in.readUint16BE(); - curAct.a3.responsePtr = (int *)malloc(sizeof(int) * numSubAct); + curAct._a3._responsePtr = (int *)malloc(sizeof(int) * numSubAct); for (int k = 0; k < numSubAct; k++) - curAct.a3.responsePtr[k] = in.readSint16BE(); - curAct.a3.actPassIndex = in.readUint16BE(); - curAct.a3.actFailIndex = in.readUint16BE(); - curAct.a3.encodedFl = (in.readByte() == 1) ? true : false; + curAct._a3._responsePtr[k] = in.readSint16BE(); + curAct._a3._actPassIndex = in.readUint16BE(); + curAct._a3._actFailIndex = in.readUint16BE(); + curAct._a3._encodedFl = (in.readByte() == 1) ? true : false; break; case BKGD_COLOR: // 4 - curAct.a4.timer = in.readSint16BE(); - curAct.a4.newBackgroundColor = in.readUint32BE(); + curAct._a4._timer = in.readSint16BE(); + curAct._a4._newBackgroundColor = in.readUint32BE(); break; case INIT_OBJVXY: // 5 - curAct.a5.timer = in.readSint16BE(); - curAct.a5.objIndex = in.readSint16BE(); - curAct.a5.vx = in.readSint16BE(); - curAct.a5.vy = in.readSint16BE(); + curAct._a5._timer = in.readSint16BE(); + curAct._a5._objIndex = in.readSint16BE(); + curAct._a5._vx = in.readSint16BE(); + curAct._a5._vy = in.readSint16BE(); break; case INIT_CARRY: // 6 - curAct.a6.timer = in.readSint16BE(); - curAct.a6.objIndex = in.readSint16BE(); - curAct.a6.carriedFl = (in.readByte() == 1) ? true : false; + curAct._a6._timer = in.readSint16BE(); + curAct._a6._objIndex = in.readSint16BE(); + curAct._a6._carriedFl = (in.readByte() == 1) ? true : false; break; case INIT_HF_COORD: // 7 - curAct.a7.timer = in.readSint16BE(); - curAct.a7.objIndex = in.readSint16BE(); + curAct._a7._timer = in.readSint16BE(); + curAct._a7._objIndex = in.readSint16BE(); break; case NEW_SCREEN: // 8 - curAct.a8.timer = in.readSint16BE(); - curAct.a8.screenIndex = in.readSint16BE(); + curAct._a8._timer = in.readSint16BE(); + curAct._a8._screenIndex = in.readSint16BE(); break; case INIT_OBJSTATE: // 9 - curAct.a9.timer = in.readSint16BE(); - curAct.a9.objIndex = in.readSint16BE(); - curAct.a9.newState = in.readByte(); + curAct._a9._timer = in.readSint16BE(); + curAct._a9._objIndex = in.readSint16BE(); + curAct._a9._newState = in.readByte(); break; case INIT_PATH: // 10 - curAct.a10.timer = in.readSint16BE(); - curAct.a10.objIndex = in.readSint16BE(); - curAct.a10.newPathType = in.readSint16BE(); - curAct.a10.vxPath = in.readByte(); - curAct.a10.vyPath = in.readByte(); + curAct._a10._timer = in.readSint16BE(); + curAct._a10._objIndex = in.readSint16BE(); + curAct._a10._newPathType = in.readSint16BE(); + curAct._a10._vxPath = in.readByte(); + curAct._a10._vyPath = in.readByte(); break; case COND_R: // 11 - curAct.a11.timer = in.readSint16BE(); - curAct.a11.objIndex = in.readSint16BE(); - curAct.a11.stateReq = in.readByte(); - curAct.a11.actPassIndex = in.readUint16BE(); - curAct.a11.actFailIndex = in.readUint16BE(); + curAct._a11._timer = in.readSint16BE(); + curAct._a11._objIndex = in.readSint16BE(); + curAct._a11._stateReq = in.readByte(); + curAct._a11._actPassIndex = in.readUint16BE(); + curAct._a11._actFailIndex = in.readUint16BE(); break; case TEXT: // 12 - curAct.a12.timer = in.readSint16BE(); - curAct.a12.stringIndex = in.readSint16BE(); + curAct._a12._timer = in.readSint16BE(); + curAct._a12._stringIndex = in.readSint16BE(); break; case SWAP_IMAGES: // 13 - curAct.a13.timer = in.readSint16BE(); - curAct.a13.objIndex1 = in.readSint16BE(); - curAct.a13.objIndex2 = in.readSint16BE(); + curAct._a13._timer = in.readSint16BE(); + curAct._a13._objIndex1 = in.readSint16BE(); + curAct._a13._objIndex2 = in.readSint16BE(); break; case COND_SCR: // 14 - curAct.a14.timer = in.readSint16BE(); - curAct.a14.objIndex = in.readSint16BE(); - curAct.a14.screenReq = in.readSint16BE(); - curAct.a14.actPassIndex = in.readUint16BE(); - curAct.a14.actFailIndex = in.readUint16BE(); + curAct._a14._timer = in.readSint16BE(); + curAct._a14._objIndex = in.readSint16BE(); + curAct._a14._screenReq = in.readSint16BE(); + curAct._a14._actPassIndex = in.readUint16BE(); + curAct._a14._actFailIndex = in.readUint16BE(); break; case AUTOPILOT: // 15 - curAct.a15.timer = in.readSint16BE(); - curAct.a15.objIndex1 = in.readSint16BE(); - curAct.a15.objIndex2 = in.readSint16BE(); - curAct.a15.dx = in.readByte(); - curAct.a15.dy = in.readByte(); + curAct._a15._timer = in.readSint16BE(); + curAct._a15._objIndex1 = in.readSint16BE(); + curAct._a15._objIndex2 = in.readSint16BE(); + curAct._a15._dx = in.readByte(); + curAct._a15._dy = in.readByte(); break; case INIT_OBJ_SEQ: // 16 - curAct.a16.timer = in.readSint16BE(); - curAct.a16.objIndex = in.readSint16BE(); - curAct.a16.seqIndex = in.readSint16BE(); + curAct._a16._timer = in.readSint16BE(); + curAct._a16._objIndex = in.readSint16BE(); + curAct._a16._seqIndex = in.readSint16BE(); break; case SET_STATE_BITS: // 17 - curAct.a17.timer = in.readSint16BE(); - curAct.a17.objIndex = in.readSint16BE(); - curAct.a17.stateMask = in.readSint16BE(); + curAct._a17._timer = in.readSint16BE(); + curAct._a17._objIndex = in.readSint16BE(); + curAct._a17._stateMask = in.readSint16BE(); break; case CLEAR_STATE_BITS: // 18 - curAct.a18.timer = in.readSint16BE(); - curAct.a18.objIndex = in.readSint16BE(); - curAct.a18.stateMask = in.readSint16BE(); + curAct._a18._timer = in.readSint16BE(); + curAct._a18._objIndex = in.readSint16BE(); + curAct._a18._stateMask = in.readSint16BE(); break; case TEST_STATE_BITS: // 19 - curAct.a19.timer = in.readSint16BE(); - curAct.a19.objIndex = in.readSint16BE(); - curAct.a19.stateMask = in.readSint16BE(); - curAct.a19.actPassIndex = in.readUint16BE(); - curAct.a19.actFailIndex = in.readUint16BE(); + curAct._a19._timer = in.readSint16BE(); + curAct._a19._objIndex = in.readSint16BE(); + curAct._a19._stateMask = in.readSint16BE(); + curAct._a19._actPassIndex = in.readUint16BE(); + curAct._a19._actFailIndex = in.readUint16BE(); break; case DEL_EVENTS: // 20 - curAct.a20.timer = in.readSint16BE(); - curAct.a20.actTypeDel = (action_t) in.readByte(); + curAct._a20._timer = in.readSint16BE(); + curAct._a20._actTypeDel = (action_t) in.readByte(); break; case GAMEOVER: // 21 - curAct.a21.timer = in.readSint16BE(); + curAct._a21._timer = in.readSint16BE(); break; case INIT_HH_COORD: // 22 - curAct.a22.timer = in.readSint16BE(); - curAct.a22.objIndex = in.readSint16BE(); + curAct._a22._timer = in.readSint16BE(); + curAct._a22._objIndex = in.readSint16BE(); break; case EXIT: // 23 - curAct.a23.timer = in.readSint16BE(); + curAct._a23._timer = in.readSint16BE(); break; case BONUS: // 24 - curAct.a24.timer = in.readSint16BE(); - curAct.a24.pointIndex = in.readSint16BE(); + curAct._a24._timer = in.readSint16BE(); + curAct._a24._pointIndex = in.readSint16BE(); break; case COND_BOX: // 25 - curAct.a25.timer = in.readSint16BE(); - curAct.a25.objIndex = in.readSint16BE(); - curAct.a25.x1 = in.readSint16BE(); - curAct.a25.y1 = in.readSint16BE(); - curAct.a25.x2 = in.readSint16BE(); - curAct.a25.y2 = in.readSint16BE(); - curAct.a25.actPassIndex = in.readUint16BE(); - curAct.a25.actFailIndex = in.readUint16BE(); + curAct._a25._timer = in.readSint16BE(); + curAct._a25._objIndex = in.readSint16BE(); + curAct._a25._x1 = in.readSint16BE(); + curAct._a25._y1 = in.readSint16BE(); + curAct._a25._x2 = in.readSint16BE(); + curAct._a25._y2 = in.readSint16BE(); + curAct._a25._actPassIndex = in.readUint16BE(); + curAct._a25._actFailIndex = in.readUint16BE(); break; case SOUND: // 26 - curAct.a26.timer = in.readSint16BE(); - curAct.a26.soundIndex = in.readSint16BE(); + curAct._a26._timer = in.readSint16BE(); + curAct._a26._soundIndex = in.readSint16BE(); break; case ADD_SCORE: // 27 - curAct.a27.timer = in.readSint16BE(); - curAct.a27.objIndex = in.readSint16BE(); + curAct._a27._timer = in.readSint16BE(); + curAct._a27._objIndex = in.readSint16BE(); break; case SUB_SCORE: // 28 - curAct.a28.timer = in.readSint16BE(); - curAct.a28.objIndex = in.readSint16BE(); + curAct._a28._timer = in.readSint16BE(); + curAct._a28._objIndex = in.readSint16BE(); break; case COND_CARRY: // 29 - curAct.a29.timer = in.readSint16BE(); - curAct.a29.objIndex = in.readSint16BE(); - curAct.a29.actPassIndex = in.readUint16BE(); - curAct.a29.actFailIndex = in.readUint16BE(); + curAct._a29._timer = in.readSint16BE(); + curAct._a29._objIndex = in.readSint16BE(); + curAct._a29._actPassIndex = in.readUint16BE(); + curAct._a29._actFailIndex = in.readUint16BE(); break; case INIT_MAZE: // 30 - curAct.a30.timer = in.readSint16BE(); - curAct.a30.mazeSize = in.readByte(); - curAct.a30.x1 = in.readSint16BE(); - curAct.a30.y1 = in.readSint16BE(); - curAct.a30.x2 = in.readSint16BE(); - curAct.a30.y2 = in.readSint16BE(); - curAct.a30.x3 = in.readSint16BE(); - curAct.a30.x4 = in.readSint16BE(); - curAct.a30.firstScreenIndex = in.readByte(); + curAct._a30._timer = in.readSint16BE(); + curAct._a30._mazeSize = in.readByte(); + curAct._a30._x1 = in.readSint16BE(); + curAct._a30._y1 = in.readSint16BE(); + curAct._a30._x2 = in.readSint16BE(); + curAct._a30._y2 = in.readSint16BE(); + curAct._a30._x3 = in.readSint16BE(); + curAct._a30._x4 = in.readSint16BE(); + curAct._a30._firstScreenIndex = in.readByte(); break; case EXIT_MAZE: // 31 - curAct.a31.timer = in.readSint16BE(); + curAct._a31._timer = in.readSint16BE(); break; case INIT_PRIORITY: // 32 - curAct.a32.timer = in.readSint16BE(); - curAct.a32.objIndex = in.readSint16BE(); - curAct.a32.priority = in.readByte(); + curAct._a32._timer = in.readSint16BE(); + curAct._a32._objIndex = in.readSint16BE(); + curAct._a32._priority = in.readByte(); break; case INIT_SCREEN: // 33 - curAct.a33.timer = in.readSint16BE(); - curAct.a33.objIndex = in.readSint16BE(); - curAct.a33.screenIndex = in.readSint16BE(); + curAct._a33._timer = in.readSint16BE(); + curAct._a33._objIndex = in.readSint16BE(); + curAct._a33._screenIndex = in.readSint16BE(); break; case AGSCHEDULE: // 34 - curAct.a34.timer = in.readSint16BE(); - curAct.a34.actIndex = in.readUint16BE(); + curAct._a34._timer = in.readSint16BE(); + curAct._a34._actIndex = in.readUint16BE(); break; case REMAPPAL: // 35 - curAct.a35.timer = in.readSint16BE(); - curAct.a35.oldColorIndex = in.readSint16BE(); - curAct.a35.newColorIndex = in.readSint16BE(); + curAct._a35._timer = in.readSint16BE(); + curAct._a35._oldColorIndex = in.readSint16BE(); + curAct._a35._newColorIndex = in.readSint16BE(); break; case COND_NOUN: // 36 - curAct.a36.timer = in.readSint16BE(); - curAct.a36.nounIndex = in.readUint16BE(); - curAct.a36.actPassIndex = in.readUint16BE(); - curAct.a36.actFailIndex = in.readUint16BE(); + curAct._a36._timer = in.readSint16BE(); + curAct._a36._nounIndex = in.readUint16BE(); + curAct._a36._actPassIndex = in.readUint16BE(); + curAct._a36._actFailIndex = in.readUint16BE(); break; case SCREEN_STATE: // 37 - curAct.a37.timer = in.readSint16BE(); - curAct.a37.screenIndex = in.readSint16BE(); - curAct.a37.newState = in.readByte(); + curAct._a37._timer = in.readSint16BE(); + curAct._a37._screenIndex = in.readSint16BE(); + curAct._a37._newState = in.readByte(); break; case INIT_LIPS: // 38 - curAct.a38.timer = in.readSint16BE(); - curAct.a38.lipsObjIndex = in.readSint16BE(); - curAct.a38.objIndex = in.readSint16BE(); - curAct.a38.dxLips = in.readByte(); - curAct.a38.dyLips = in.readByte(); + curAct._a38._timer = in.readSint16BE(); + curAct._a38._lipsObjIndex = in.readSint16BE(); + curAct._a38._objIndex = in.readSint16BE(); + curAct._a38._dxLips = in.readByte(); + curAct._a38._dyLips = in.readByte(); break; case INIT_STORY_MODE: // 39 - curAct.a39.timer = in.readSint16BE(); - curAct.a39.storyModeFl = (in.readByte() == 1); + curAct._a39._timer = in.readSint16BE(); + curAct._a39._storyModeFl = (in.readByte() == 1); break; case WARN: // 40 - curAct.a40.timer = in.readSint16BE(); - curAct.a40.stringIndex = in.readSint16BE(); + curAct._a40._timer = in.readSint16BE(); + curAct._a40._stringIndex = in.readSint16BE(); break; case COND_BONUS: // 41 - curAct.a41.timer = in.readSint16BE(); - curAct.a41.BonusIndex = in.readSint16BE(); - curAct.a41.actPassIndex = in.readUint16BE(); - curAct.a41.actFailIndex = in.readUint16BE(); + curAct._a41._timer = in.readSint16BE(); + curAct._a41._bonusIndex = in.readSint16BE(); + curAct._a41._actPassIndex = in.readUint16BE(); + curAct._a41._actFailIndex = in.readUint16BE(); break; case TEXT_TAKE: // 42 - curAct.a42.timer = in.readSint16BE(); - curAct.a42.objIndex = in.readSint16BE(); + curAct._a42._timer = in.readSint16BE(); + curAct._a42._objIndex = in.readSint16BE(); break; case YESNO: // 43 - curAct.a43.timer = in.readSint16BE(); - curAct.a43.promptIndex = in.readSint16BE(); - curAct.a43.actYesIndex = in.readUint16BE(); - curAct.a43.actNoIndex = in.readUint16BE(); + curAct._a43._timer = in.readSint16BE(); + curAct._a43._promptIndex = in.readSint16BE(); + curAct._a43._actYesIndex = in.readUint16BE(); + curAct._a43._actNoIndex = in.readUint16BE(); break; case STOP_ROUTE: // 44 - curAct.a44.timer = in.readSint16BE(); + curAct._a44._timer = in.readSint16BE(); break; case COND_ROUTE: // 45 - curAct.a45.timer = in.readSint16BE(); - curAct.a45.routeIndex = in.readSint16BE(); - curAct.a45.actPassIndex = in.readUint16BE(); - curAct.a45.actFailIndex = in.readUint16BE(); + curAct._a45._timer = in.readSint16BE(); + curAct._a45._routeIndex = in.readSint16BE(); + curAct._a45._actPassIndex = in.readUint16BE(); + curAct._a45._actFailIndex = in.readUint16BE(); break; case INIT_JUMPEXIT: // 46 - curAct.a46.timer = in.readSint16BE(); - curAct.a46.jumpExitFl = (in.readByte() == 1); + curAct._a46._timer = in.readSint16BE(); + curAct._a46._jumpExitFl = (in.readByte() == 1); break; case INIT_VIEW: // 47 - curAct.a47.timer = in.readSint16BE(); - curAct.a47.objIndex = in.readSint16BE(); - curAct.a47.viewx = in.readSint16BE(); - curAct.a47.viewy = in.readSint16BE(); - curAct.a47.direction = in.readSint16BE(); + curAct._a47._timer = in.readSint16BE(); + curAct._a47._objIndex = in.readSint16BE(); + curAct._a47._viewx = in.readSint16BE(); + curAct._a47._viewy = in.readSint16BE(); + curAct._a47._direction = in.readSint16BE(); break; case INIT_OBJ_FRAME: // 48 - curAct.a48.timer = in.readSint16BE(); - curAct.a48.objIndex = in.readSint16BE(); - curAct.a48.seqIndex = in.readSint16BE(); - curAct.a48.frameIndex = in.readSint16BE(); + curAct._a48._timer = in.readSint16BE(); + curAct._a48._objIndex = in.readSint16BE(); + curAct._a48._seqIndex = in.readSint16BE(); + curAct._a48._frameIndex = in.readSint16BE(); break; case OLD_SONG: //49 - curAct.a49.timer = in.readSint16BE(); - curAct.a49.songIndex = in.readUint16BE(); + curAct._a49._timer = in.readSint16BE(); + curAct._a49._songIndex = in.readUint16BE(); break; default: - error("Engine - Unknown action type encountered: %d", curAct.a0.actType); + error("Engine - Unknown action type encountered: %d", curAct._a0._actType); } } @@ -572,13 +572,13 @@ void Scheduler::loadActListArr(Common::ReadStream &in) { readAct(in, _actListArr[i][j]); } else { readAct(in, tmpAct); - if (tmpAct.a0.actType == PROMPT) - free(tmpAct.a3.responsePtr); + if (tmpAct._a0._actType == PROMPT) + free(tmpAct._a3._responsePtr); } } if (varnt == _vm->_gameVariant) - _actListArr[i][numSubElem].a0.actType = ANULL; + _actListArr[i][numSubElem]._a0._actType = ANULL; } } } @@ -626,9 +626,9 @@ void Scheduler::freeScheduler() { if (_actListArr) { for (int i = 0; i < _actListArrSize; i++) { - for (int j = 0; _actListArr[i][j].a0.actType != ANULL; j++) { - if (_actListArr[i][j].a0.actType == PROMPT) - free(_actListArr[i][j].a3.responsePtr); + for (int j = 0; _actListArr[i][j]._a0._actType != ANULL; j++) { + if (_actListArr[i][j]._a0._actType == PROMPT) + free(_actListArr[i][j]._a3._responsePtr); } free(_actListArr[i]); } @@ -658,30 +658,30 @@ void Scheduler::processMaze(const int x1, const int x2, const int y1, const int if (x1 < _vm->_maze._x1) { // Exit west - _actListArr[_alNewscrIndex][3].a8.screenIndex = *_vm->_screen_p - 1; - _actListArr[_alNewscrIndex][0].a2.x = _vm->_maze._x2 - kShiftSize - (x2 - x1); - _actListArr[_alNewscrIndex][0].a2.y = _vm->_hero->_y; + _actListArr[_alNewscrIndex][3]._a8._screenIndex = *_vm->_screen_p - 1; + _actListArr[_alNewscrIndex][0]._a2._x = _vm->_maze._x2 - kShiftSize - (x2 - x1); + _actListArr[_alNewscrIndex][0]._a2._y = _vm->_hero->_y; _vm->_route->resetRoute(); insertActionList(_alNewscrIndex); } else if (x2 > _vm->_maze._x2) { // Exit east - _actListArr[_alNewscrIndex][3].a8.screenIndex = *_vm->_screen_p + 1; - _actListArr[_alNewscrIndex][0].a2.x = _vm->_maze._x1 + kShiftSize; - _actListArr[_alNewscrIndex][0].a2.y = _vm->_hero->_y; + _actListArr[_alNewscrIndex][3]._a8._screenIndex = *_vm->_screen_p + 1; + _actListArr[_alNewscrIndex][0]._a2._x = _vm->_maze._x1 + kShiftSize; + _actListArr[_alNewscrIndex][0]._a2._y = _vm->_hero->_y; _vm->_route->resetRoute(); insertActionList(_alNewscrIndex); } else if (y1 < _vm->_maze._y1 - kShiftSize) { // Exit north - _actListArr[_alNewscrIndex][3].a8.screenIndex = *_vm->_screen_p - _vm->_maze._size; - _actListArr[_alNewscrIndex][0].a2.x = _vm->_maze._x3; - _actListArr[_alNewscrIndex][0].a2.y = _vm->_maze._y2 - kShiftSize - (y2 - y1); + _actListArr[_alNewscrIndex][3]._a8._screenIndex = *_vm->_screen_p - _vm->_maze._size; + _actListArr[_alNewscrIndex][0]._a2._x = _vm->_maze._x3; + _actListArr[_alNewscrIndex][0]._a2._y = _vm->_maze._y2 - kShiftSize - (y2 - y1); _vm->_route->resetRoute(); insertActionList(_alNewscrIndex); } else if (y2 > _vm->_maze._y2 - kShiftSize / 2) { // Exit south - _actListArr[_alNewscrIndex][3].a8.screenIndex = *_vm->_screen_p + _vm->_maze._size; - _actListArr[_alNewscrIndex][0].a2.x = _vm->_maze._x4; - _actListArr[_alNewscrIndex][0].a2.y = _vm->_maze._y1 + kShiftSize; + _actListArr[_alNewscrIndex][3]._a8._screenIndex = *_vm->_screen_p + _vm->_maze._size; + _actListArr[_alNewscrIndex][0]._a2._x = _vm->_maze._x4; + _actListArr[_alNewscrIndex][0]._a2._y = _vm->_maze._y1 + kShiftSize; _vm->_route->resetRoute(); insertActionList(_alNewscrIndex); } @@ -712,13 +712,13 @@ void Scheduler::saveEvents(Common::WriteStream *f) { // fix up action pointer (to do better) int16 index, subElem; - findAction(wrkEvent->action, &index, &subElem); + findAction(wrkEvent->_action, &index, &subElem); f->writeSint16BE(index); f->writeSint16BE(subElem); - f->writeByte((wrkEvent->localActionFl) ? 1 : 0); - f->writeUint32BE(wrkEvent->time); - f->writeSint16BE((wrkEvent->prevEvent == 0) ? -1 : (wrkEvent->prevEvent - _events)); - f->writeSint16BE((wrkEvent->nextEvent == 0) ? -1 : (wrkEvent->nextEvent - _events)); + f->writeByte((wrkEvent->_localActionFl) ? 1 : 0); + f->writeUint32BE(wrkEvent->_time); + f->writeSint16BE((wrkEvent->_prevEvent == 0) ? -1 : (wrkEvent->_prevEvent - _events)); + f->writeSint16BE((wrkEvent->_nextEvent == 0) ? -1 : (wrkEvent->_nextEvent - _events)); } } @@ -738,7 +738,7 @@ void Scheduler::restoreActions(Common::ReadStream *f) { int16 Scheduler::calcMaxPoints() const { int16 tmpScore = 0; for (int i = 0; i < _numBonuses; i++) - tmpScore += _points[i].score; + tmpScore += _points[i]._score; return tmpScore; } @@ -752,282 +752,282 @@ void Scheduler::saveActions(Common::WriteStream *f) const { for (int i = 0; i < _actListArrSize; i++) { // write all the sub elems data - for (nbrSubElem = 1; _actListArr[i][nbrSubElem - 1].a0.actType != ANULL; nbrSubElem++) + for (nbrSubElem = 1; _actListArr[i][nbrSubElem - 1]._a0._actType != ANULL; nbrSubElem++) ; f->writeUint16BE(nbrSubElem); for (int j = 0; j < nbrSubElem; j++) { - subElemType = _actListArr[i][j].a0.actType; + subElemType = _actListArr[i][j]._a0._actType; f->writeByte(subElemType); switch (subElemType) { case ANULL: // -1 break; case ASCHEDULE: // 0 - f->writeSint16BE(_actListArr[i][j].a0.timer); - f->writeUint16BE(_actListArr[i][j].a0.actIndex); + f->writeSint16BE(_actListArr[i][j]._a0._timer); + f->writeUint16BE(_actListArr[i][j]._a0._actIndex); break; case START_OBJ: // 1 - f->writeSint16BE(_actListArr[i][j].a1.timer); - f->writeSint16BE(_actListArr[i][j].a1.objIndex); - f->writeSint16BE(_actListArr[i][j].a1.cycleNumb); - f->writeByte(_actListArr[i][j].a1.cycle); + f->writeSint16BE(_actListArr[i][j]._a1._timer); + f->writeSint16BE(_actListArr[i][j]._a1._objIndex); + f->writeSint16BE(_actListArr[i][j]._a1._cycleNumb); + f->writeByte(_actListArr[i][j]._a1._cycle); break; case INIT_OBJXY: // 2 - f->writeSint16BE(_actListArr[i][j].a2.timer); - f->writeSint16BE(_actListArr[i][j].a2.objIndex); - f->writeSint16BE(_actListArr[i][j].a2.x); - f->writeSint16BE(_actListArr[i][j].a2.y); + f->writeSint16BE(_actListArr[i][j]._a2._timer); + f->writeSint16BE(_actListArr[i][j]._a2._objIndex); + f->writeSint16BE(_actListArr[i][j]._a2._x); + f->writeSint16BE(_actListArr[i][j]._a2._y); break; case PROMPT: // 3 - f->writeSint16BE(_actListArr[i][j].a3.timer); - f->writeSint16BE(_actListArr[i][j].a3.promptIndex); - for (nbrCpt = 0; _actListArr[i][j].a3.responsePtr[nbrCpt] != -1; nbrCpt++) + f->writeSint16BE(_actListArr[i][j]._a3._timer); + f->writeSint16BE(_actListArr[i][j]._a3._promptIndex); + for (nbrCpt = 0; _actListArr[i][j]._a3._responsePtr[nbrCpt] != -1; nbrCpt++) ; nbrCpt++; f->writeUint16BE(nbrCpt); for (int k = 0; k < nbrCpt; k++) - f->writeSint16BE(_actListArr[i][j].a3.responsePtr[k]); - f->writeUint16BE(_actListArr[i][j].a3.actPassIndex); - f->writeUint16BE(_actListArr[i][j].a3.actFailIndex); - f->writeByte((_actListArr[i][j].a3.encodedFl) ? 1 : 0); + f->writeSint16BE(_actListArr[i][j]._a3._responsePtr[k]); + f->writeUint16BE(_actListArr[i][j]._a3._actPassIndex); + f->writeUint16BE(_actListArr[i][j]._a3._actFailIndex); + f->writeByte((_actListArr[i][j]._a3._encodedFl) ? 1 : 0); break; case BKGD_COLOR: // 4 - f->writeSint16BE(_actListArr[i][j].a4.timer); - f->writeUint32BE(_actListArr[i][j].a4.newBackgroundColor); + f->writeSint16BE(_actListArr[i][j]._a4._timer); + f->writeUint32BE(_actListArr[i][j]._a4._newBackgroundColor); break; case INIT_OBJVXY: // 5 - f->writeSint16BE(_actListArr[i][j].a5.timer); - f->writeSint16BE(_actListArr[i][j].a5.objIndex); - f->writeSint16BE(_actListArr[i][j].a5.vx); - f->writeSint16BE(_actListArr[i][j].a5.vy); + f->writeSint16BE(_actListArr[i][j]._a5._timer); + f->writeSint16BE(_actListArr[i][j]._a5._objIndex); + f->writeSint16BE(_actListArr[i][j]._a5._vx); + f->writeSint16BE(_actListArr[i][j]._a5._vy); break; case INIT_CARRY: // 6 - f->writeSint16BE(_actListArr[i][j].a6.timer); - f->writeSint16BE(_actListArr[i][j].a6.objIndex); - f->writeByte((_actListArr[i][j].a6.carriedFl) ? 1 : 0); + f->writeSint16BE(_actListArr[i][j]._a6._timer); + f->writeSint16BE(_actListArr[i][j]._a6._objIndex); + f->writeByte((_actListArr[i][j]._a6._carriedFl) ? 1 : 0); break; case INIT_HF_COORD: // 7 - f->writeSint16BE(_actListArr[i][j].a7.timer); - f->writeSint16BE(_actListArr[i][j].a7.objIndex); + f->writeSint16BE(_actListArr[i][j]._a7._timer); + f->writeSint16BE(_actListArr[i][j]._a7._objIndex); break; case NEW_SCREEN: // 8 - f->writeSint16BE(_actListArr[i][j].a8.timer); - f->writeSint16BE(_actListArr[i][j].a8.screenIndex); + f->writeSint16BE(_actListArr[i][j]._a8._timer); + f->writeSint16BE(_actListArr[i][j]._a8._screenIndex); break; case INIT_OBJSTATE: // 9 - f->writeSint16BE(_actListArr[i][j].a9.timer); - f->writeSint16BE(_actListArr[i][j].a9.objIndex); - f->writeByte(_actListArr[i][j].a9.newState); + f->writeSint16BE(_actListArr[i][j]._a9._timer); + f->writeSint16BE(_actListArr[i][j]._a9._objIndex); + f->writeByte(_actListArr[i][j]._a9._newState); break; case INIT_PATH: // 10 - f->writeSint16BE(_actListArr[i][j].a10.timer); - f->writeSint16BE(_actListArr[i][j].a10.objIndex); - f->writeSint16BE(_actListArr[i][j].a10.newPathType); - f->writeByte(_actListArr[i][j].a10.vxPath); - f->writeByte(_actListArr[i][j].a10.vyPath); + f->writeSint16BE(_actListArr[i][j]._a10._timer); + f->writeSint16BE(_actListArr[i][j]._a10._objIndex); + f->writeSint16BE(_actListArr[i][j]._a10._newPathType); + f->writeByte(_actListArr[i][j]._a10._vxPath); + f->writeByte(_actListArr[i][j]._a10._vyPath); break; case COND_R: // 11 - f->writeSint16BE(_actListArr[i][j].a11.timer); - f->writeSint16BE(_actListArr[i][j].a11.objIndex); - f->writeByte(_actListArr[i][j].a11.stateReq); - f->writeUint16BE(_actListArr[i][j].a11.actPassIndex); - f->writeUint16BE(_actListArr[i][j].a11.actFailIndex); + f->writeSint16BE(_actListArr[i][j]._a11._timer); + f->writeSint16BE(_actListArr[i][j]._a11._objIndex); + f->writeByte(_actListArr[i][j]._a11._stateReq); + f->writeUint16BE(_actListArr[i][j]._a11._actPassIndex); + f->writeUint16BE(_actListArr[i][j]._a11._actFailIndex); break; case TEXT: // 12 - f->writeSint16BE(_actListArr[i][j].a12.timer); - f->writeSint16BE(_actListArr[i][j].a12.stringIndex); + f->writeSint16BE(_actListArr[i][j]._a12._timer); + f->writeSint16BE(_actListArr[i][j]._a12._stringIndex); break; case SWAP_IMAGES: // 13 - f->writeSint16BE(_actListArr[i][j].a13.timer); - f->writeSint16BE(_actListArr[i][j].a13.objIndex1); - f->writeSint16BE(_actListArr[i][j].a13.objIndex2); + f->writeSint16BE(_actListArr[i][j]._a13._timer); + f->writeSint16BE(_actListArr[i][j]._a13._objIndex1); + f->writeSint16BE(_actListArr[i][j]._a13._objIndex2); break; case COND_SCR: // 14 - f->writeSint16BE(_actListArr[i][j].a14.timer); - f->writeSint16BE(_actListArr[i][j].a14.objIndex); - f->writeSint16BE(_actListArr[i][j].a14.screenReq); - f->writeUint16BE(_actListArr[i][j].a14.actPassIndex); - f->writeUint16BE(_actListArr[i][j].a14.actFailIndex); + f->writeSint16BE(_actListArr[i][j]._a14._timer); + f->writeSint16BE(_actListArr[i][j]._a14._objIndex); + f->writeSint16BE(_actListArr[i][j]._a14._screenReq); + f->writeUint16BE(_actListArr[i][j]._a14._actPassIndex); + f->writeUint16BE(_actListArr[i][j]._a14._actFailIndex); break; case AUTOPILOT: // 15 - f->writeSint16BE(_actListArr[i][j].a15.timer); - f->writeSint16BE(_actListArr[i][j].a15.objIndex1); - f->writeSint16BE(_actListArr[i][j].a15.objIndex2); - f->writeByte(_actListArr[i][j].a15.dx); - f->writeByte(_actListArr[i][j].a15.dy); + f->writeSint16BE(_actListArr[i][j]._a15._timer); + f->writeSint16BE(_actListArr[i][j]._a15._objIndex1); + f->writeSint16BE(_actListArr[i][j]._a15._objIndex2); + f->writeByte(_actListArr[i][j]._a15._dx); + f->writeByte(_actListArr[i][j]._a15._dy); break; case INIT_OBJ_SEQ: // 16 - f->writeSint16BE(_actListArr[i][j].a16.timer); - f->writeSint16BE(_actListArr[i][j].a16.objIndex); - f->writeSint16BE(_actListArr[i][j].a16.seqIndex); + f->writeSint16BE(_actListArr[i][j]._a16._timer); + f->writeSint16BE(_actListArr[i][j]._a16._objIndex); + f->writeSint16BE(_actListArr[i][j]._a16._seqIndex); break; case SET_STATE_BITS: // 17 - f->writeSint16BE(_actListArr[i][j].a17.timer); - f->writeSint16BE(_actListArr[i][j].a17.objIndex); - f->writeSint16BE(_actListArr[i][j].a17.stateMask); + f->writeSint16BE(_actListArr[i][j]._a17._timer); + f->writeSint16BE(_actListArr[i][j]._a17._objIndex); + f->writeSint16BE(_actListArr[i][j]._a17._stateMask); break; case CLEAR_STATE_BITS: // 18 - f->writeSint16BE(_actListArr[i][j].a18.timer); - f->writeSint16BE(_actListArr[i][j].a18.objIndex); - f->writeSint16BE(_actListArr[i][j].a18.stateMask); + f->writeSint16BE(_actListArr[i][j]._a18._timer); + f->writeSint16BE(_actListArr[i][j]._a18._objIndex); + f->writeSint16BE(_actListArr[i][j]._a18._stateMask); break; case TEST_STATE_BITS: // 19 - f->writeSint16BE(_actListArr[i][j].a19.timer); - f->writeSint16BE(_actListArr[i][j].a19.objIndex); - f->writeSint16BE(_actListArr[i][j].a19.stateMask); - f->writeUint16BE(_actListArr[i][j].a19.actPassIndex); - f->writeUint16BE(_actListArr[i][j].a19.actFailIndex); + f->writeSint16BE(_actListArr[i][j]._a19._timer); + f->writeSint16BE(_actListArr[i][j]._a19._objIndex); + f->writeSint16BE(_actListArr[i][j]._a19._stateMask); + f->writeUint16BE(_actListArr[i][j]._a19._actPassIndex); + f->writeUint16BE(_actListArr[i][j]._a19._actFailIndex); break; case DEL_EVENTS: // 20 - f->writeSint16BE(_actListArr[i][j].a20.timer); - f->writeByte(_actListArr[i][j].a20.actTypeDel); + f->writeSint16BE(_actListArr[i][j]._a20._timer); + f->writeByte(_actListArr[i][j]._a20._actTypeDel); break; case GAMEOVER: // 21 - f->writeSint16BE(_actListArr[i][j].a21.timer); + f->writeSint16BE(_actListArr[i][j]._a21._timer); break; case INIT_HH_COORD: // 22 - f->writeSint16BE(_actListArr[i][j].a22.timer); - f->writeSint16BE(_actListArr[i][j].a22.objIndex); + f->writeSint16BE(_actListArr[i][j]._a22._timer); + f->writeSint16BE(_actListArr[i][j]._a22._objIndex); break; case EXIT: // 23 - f->writeSint16BE(_actListArr[i][j].a23.timer); + f->writeSint16BE(_actListArr[i][j]._a23._timer); break; case BONUS: // 24 - f->writeSint16BE(_actListArr[i][j].a24.timer); - f->writeSint16BE(_actListArr[i][j].a24.pointIndex); + f->writeSint16BE(_actListArr[i][j]._a24._timer); + f->writeSint16BE(_actListArr[i][j]._a24._pointIndex); break; case COND_BOX: // 25 - f->writeSint16BE(_actListArr[i][j].a25.timer); - f->writeSint16BE(_actListArr[i][j].a25.objIndex); - f->writeSint16BE(_actListArr[i][j].a25.x1); - f->writeSint16BE(_actListArr[i][j].a25.y1); - f->writeSint16BE(_actListArr[i][j].a25.x2); - f->writeSint16BE(_actListArr[i][j].a25.y2); - f->writeUint16BE(_actListArr[i][j].a25.actPassIndex); - f->writeUint16BE(_actListArr[i][j].a25.actFailIndex); + f->writeSint16BE(_actListArr[i][j]._a25._timer); + f->writeSint16BE(_actListArr[i][j]._a25._objIndex); + f->writeSint16BE(_actListArr[i][j]._a25._x1); + f->writeSint16BE(_actListArr[i][j]._a25._y1); + f->writeSint16BE(_actListArr[i][j]._a25._x2); + f->writeSint16BE(_actListArr[i][j]._a25._y2); + f->writeUint16BE(_actListArr[i][j]._a25._actPassIndex); + f->writeUint16BE(_actListArr[i][j]._a25._actFailIndex); break; case SOUND: // 26 - f->writeSint16BE(_actListArr[i][j].a26.timer); - f->writeSint16BE(_actListArr[i][j].a26.soundIndex); + f->writeSint16BE(_actListArr[i][j]._a26._timer); + f->writeSint16BE(_actListArr[i][j]._a26._soundIndex); break; case ADD_SCORE: // 27 - f->writeSint16BE(_actListArr[i][j].a27.timer); - f->writeSint16BE(_actListArr[i][j].a27.objIndex); + f->writeSint16BE(_actListArr[i][j]._a27._timer); + f->writeSint16BE(_actListArr[i][j]._a27._objIndex); break; case SUB_SCORE: // 28 - f->writeSint16BE(_actListArr[i][j].a28.timer); - f->writeSint16BE(_actListArr[i][j].a28.objIndex); + f->writeSint16BE(_actListArr[i][j]._a28._timer); + f->writeSint16BE(_actListArr[i][j]._a28._objIndex); break; case COND_CARRY: // 29 - f->writeSint16BE(_actListArr[i][j].a29.timer); - f->writeSint16BE(_actListArr[i][j].a29.objIndex); - f->writeUint16BE(_actListArr[i][j].a29.actPassIndex); - f->writeUint16BE(_actListArr[i][j].a29.actFailIndex); + f->writeSint16BE(_actListArr[i][j]._a29._timer); + f->writeSint16BE(_actListArr[i][j]._a29._objIndex); + f->writeUint16BE(_actListArr[i][j]._a29._actPassIndex); + f->writeUint16BE(_actListArr[i][j]._a29._actFailIndex); break; case INIT_MAZE: // 30 - f->writeSint16BE(_actListArr[i][j].a30.timer); - f->writeByte(_actListArr[i][j].a30.mazeSize); - f->writeSint16BE(_actListArr[i][j].a30.x1); - f->writeSint16BE(_actListArr[i][j].a30.y1); - f->writeSint16BE(_actListArr[i][j].a30.x2); - f->writeSint16BE(_actListArr[i][j].a30.y2); - f->writeSint16BE(_actListArr[i][j].a30.x3); - f->writeSint16BE(_actListArr[i][j].a30.x4); - f->writeByte(_actListArr[i][j].a30.firstScreenIndex); + f->writeSint16BE(_actListArr[i][j]._a30._timer); + f->writeByte(_actListArr[i][j]._a30._mazeSize); + f->writeSint16BE(_actListArr[i][j]._a30._x1); + f->writeSint16BE(_actListArr[i][j]._a30._y1); + f->writeSint16BE(_actListArr[i][j]._a30._x2); + f->writeSint16BE(_actListArr[i][j]._a30._y2); + f->writeSint16BE(_actListArr[i][j]._a30._x3); + f->writeSint16BE(_actListArr[i][j]._a30._x4); + f->writeByte(_actListArr[i][j]._a30._firstScreenIndex); break; case EXIT_MAZE: // 31 - f->writeSint16BE(_actListArr[i][j].a31.timer); + f->writeSint16BE(_actListArr[i][j]._a31._timer); break; case INIT_PRIORITY: // 32 - f->writeSint16BE(_actListArr[i][j].a32.timer); - f->writeSint16BE(_actListArr[i][j].a32.objIndex); - f->writeByte(_actListArr[i][j].a32.priority); + f->writeSint16BE(_actListArr[i][j]._a32._timer); + f->writeSint16BE(_actListArr[i][j]._a32._objIndex); + f->writeByte(_actListArr[i][j]._a32._priority); break; case INIT_SCREEN: // 33 - f->writeSint16BE(_actListArr[i][j].a33.timer); - f->writeSint16BE(_actListArr[i][j].a33.objIndex); - f->writeSint16BE(_actListArr[i][j].a33.screenIndex); + f->writeSint16BE(_actListArr[i][j]._a33._timer); + f->writeSint16BE(_actListArr[i][j]._a33._objIndex); + f->writeSint16BE(_actListArr[i][j]._a33._screenIndex); break; case AGSCHEDULE: // 34 - f->writeSint16BE(_actListArr[i][j].a34.timer); - f->writeUint16BE(_actListArr[i][j].a34.actIndex); + f->writeSint16BE(_actListArr[i][j]._a34._timer); + f->writeUint16BE(_actListArr[i][j]._a34._actIndex); break; case REMAPPAL: // 35 - f->writeSint16BE(_actListArr[i][j].a35.timer); - f->writeSint16BE(_actListArr[i][j].a35.oldColorIndex); - f->writeSint16BE(_actListArr[i][j].a35.newColorIndex); + f->writeSint16BE(_actListArr[i][j]._a35._timer); + f->writeSint16BE(_actListArr[i][j]._a35._oldColorIndex); + f->writeSint16BE(_actListArr[i][j]._a35._newColorIndex); break; case COND_NOUN: // 36 - f->writeSint16BE(_actListArr[i][j].a36.timer); - f->writeUint16BE(_actListArr[i][j].a36.nounIndex); - f->writeUint16BE(_actListArr[i][j].a36.actPassIndex); - f->writeUint16BE(_actListArr[i][j].a36.actFailIndex); + f->writeSint16BE(_actListArr[i][j]._a36._timer); + f->writeUint16BE(_actListArr[i][j]._a36._nounIndex); + f->writeUint16BE(_actListArr[i][j]._a36._actPassIndex); + f->writeUint16BE(_actListArr[i][j]._a36._actFailIndex); break; case SCREEN_STATE: // 37 - f->writeSint16BE(_actListArr[i][j].a37.timer); - f->writeSint16BE(_actListArr[i][j].a37.screenIndex); - f->writeByte(_actListArr[i][j].a37.newState); + f->writeSint16BE(_actListArr[i][j]._a37._timer); + f->writeSint16BE(_actListArr[i][j]._a37._screenIndex); + f->writeByte(_actListArr[i][j]._a37._newState); break; case INIT_LIPS: // 38 - f->writeSint16BE(_actListArr[i][j].a38.timer); - f->writeSint16BE(_actListArr[i][j].a38.lipsObjIndex); - f->writeSint16BE(_actListArr[i][j].a38.objIndex); - f->writeByte(_actListArr[i][j].a38.dxLips); - f->writeByte(_actListArr[i][j].a38.dyLips); + f->writeSint16BE(_actListArr[i][j]._a38._timer); + f->writeSint16BE(_actListArr[i][j]._a38._lipsObjIndex); + f->writeSint16BE(_actListArr[i][j]._a38._objIndex); + f->writeByte(_actListArr[i][j]._a38._dxLips); + f->writeByte(_actListArr[i][j]._a38._dyLips); break; case INIT_STORY_MODE: // 39 - f->writeSint16BE(_actListArr[i][j].a39.timer); - f->writeByte((_actListArr[i][j].a39.storyModeFl) ? 1 : 0); + f->writeSint16BE(_actListArr[i][j]._a39._timer); + f->writeByte((_actListArr[i][j]._a39._storyModeFl) ? 1 : 0); break; case WARN: // 40 - f->writeSint16BE(_actListArr[i][j].a40.timer); - f->writeSint16BE(_actListArr[i][j].a40.stringIndex); + f->writeSint16BE(_actListArr[i][j]._a40._timer); + f->writeSint16BE(_actListArr[i][j]._a40._stringIndex); break; case COND_BONUS: // 41 - f->writeSint16BE(_actListArr[i][j].a41.timer); - f->writeSint16BE(_actListArr[i][j].a41.BonusIndex); - f->writeUint16BE(_actListArr[i][j].a41.actPassIndex); - f->writeUint16BE(_actListArr[i][j].a41.actFailIndex); + f->writeSint16BE(_actListArr[i][j]._a41._timer); + f->writeSint16BE(_actListArr[i][j]._a41._bonusIndex); + f->writeUint16BE(_actListArr[i][j]._a41._actPassIndex); + f->writeUint16BE(_actListArr[i][j]._a41._actFailIndex); break; case TEXT_TAKE: // 42 - f->writeSint16BE(_actListArr[i][j].a42.timer); - f->writeSint16BE(_actListArr[i][j].a42.objIndex); + f->writeSint16BE(_actListArr[i][j]._a42._timer); + f->writeSint16BE(_actListArr[i][j]._a42._objIndex); break; case YESNO: // 43 - f->writeSint16BE(_actListArr[i][j].a43.timer); - f->writeSint16BE(_actListArr[i][j].a43.promptIndex); - f->writeUint16BE(_actListArr[i][j].a43.actYesIndex); - f->writeUint16BE(_actListArr[i][j].a43.actNoIndex); + f->writeSint16BE(_actListArr[i][j]._a43._timer); + f->writeSint16BE(_actListArr[i][j]._a43._promptIndex); + f->writeUint16BE(_actListArr[i][j]._a43._actYesIndex); + f->writeUint16BE(_actListArr[i][j]._a43._actNoIndex); break; case STOP_ROUTE: // 44 - f->writeSint16BE(_actListArr[i][j].a44.timer); + f->writeSint16BE(_actListArr[i][j]._a44._timer); break; case COND_ROUTE: // 45 - f->writeSint16BE(_actListArr[i][j].a45.timer); - f->writeSint16BE(_actListArr[i][j].a45.routeIndex); - f->writeUint16BE(_actListArr[i][j].a45.actPassIndex); - f->writeUint16BE(_actListArr[i][j].a45.actFailIndex); + f->writeSint16BE(_actListArr[i][j]._a45._timer); + f->writeSint16BE(_actListArr[i][j]._a45._routeIndex); + f->writeUint16BE(_actListArr[i][j]._a45._actPassIndex); + f->writeUint16BE(_actListArr[i][j]._a45._actFailIndex); break; case INIT_JUMPEXIT: // 46 - f->writeSint16BE(_actListArr[i][j].a46.timer); - f->writeByte((_actListArr[i][j].a46.jumpExitFl) ? 1 : 0); + f->writeSint16BE(_actListArr[i][j]._a46._timer); + f->writeByte((_actListArr[i][j]._a46._jumpExitFl) ? 1 : 0); break; case INIT_VIEW: // 47 - f->writeSint16BE(_actListArr[i][j].a47.timer); - f->writeSint16BE(_actListArr[i][j].a47.objIndex); - f->writeSint16BE(_actListArr[i][j].a47.viewx); - f->writeSint16BE(_actListArr[i][j].a47.viewy); - f->writeSint16BE(_actListArr[i][j].a47.direction); + f->writeSint16BE(_actListArr[i][j]._a47._timer); + f->writeSint16BE(_actListArr[i][j]._a47._objIndex); + f->writeSint16BE(_actListArr[i][j]._a47._viewx); + f->writeSint16BE(_actListArr[i][j]._a47._viewy); + f->writeSint16BE(_actListArr[i][j]._a47._direction); break; case INIT_OBJ_FRAME: // 48 - f->writeSint16BE(_actListArr[i][j].a48.timer); - f->writeSint16BE(_actListArr[i][j].a48.objIndex); - f->writeSint16BE(_actListArr[i][j].a48.seqIndex); - f->writeSint16BE(_actListArr[i][j].a48.frameIndex); + f->writeSint16BE(_actListArr[i][j]._a48._timer); + f->writeSint16BE(_actListArr[i][j]._a48._objIndex); + f->writeSint16BE(_actListArr[i][j]._a48._seqIndex); + f->writeSint16BE(_actListArr[i][j]._a48._frameIndex); break; case OLD_SONG: // 49, Added by Strangerke for DOS versions - f->writeSint16BE(_actListArr[i][j].a49.timer); - f->writeUint16BE(_actListArr[i][j].a49.songIndex); + f->writeSint16BE(_actListArr[i][j]._a49._timer); + f->writeUint16BE(_actListArr[i][j]._a49._songIndex); break; default: error("Unknown action %d", subElemType); @@ -1057,7 +1057,7 @@ void Scheduler::findAction(const act* action, int16* index, int16* subElem) { return; } j++; - } while (_actListArr[i][j-1].a0.actType != ANULL); + } while (_actListArr[i][j-1]._a0._actType != ANULL); } // action not found ?? assert(0); @@ -1102,18 +1102,18 @@ void Scheduler::restoreEvents(Common::ReadStream *f) { // fix up action pointer (to do better) if ((index == -1) && (subElem == -1)) - _events[i].action = 0; + _events[i]._action = 0; else - _events[i].action = (act *)&_actListArr[index][subElem]; + _events[i]._action = (act *)&_actListArr[index][subElem]; - _events[i].localActionFl = (f->readByte() == 1) ? true : false; - _events[i].time = f->readUint32BE(); + _events[i]._localActionFl = (f->readByte() == 1) ? true : false; + _events[i]._time = f->readUint32BE(); int16 prevIndex = f->readSint16BE(); int16 nextIndex = f->readSint16BE(); - _events[i].prevEvent = (prevIndex == -1) ? (event_t *)0 : &_events[prevIndex]; - _events[i].nextEvent = (nextIndex == -1) ? (event_t *)0 : &_events[nextIndex]; + _events[i]._prevEvent = (prevIndex == -1) ? (event_t *)0 : &_events[prevIndex]; + _events[i]._nextEvent = (nextIndex == -1) ? (event_t *)0 : &_events[nextIndex]; } _freeEvent = (freeIndex == -1) ? 0 : &_events[freeIndex]; _headEvent = (headIndex == -1) ? 0 : &_events[headIndex]; @@ -1123,8 +1123,8 @@ void Scheduler::restoreEvents(Common::ReadStream *f) { uint32 curTime = getTicks(); event_t *wrkEvent = _headEvent; // The earliest event while (wrkEvent) { // While mature events found - wrkEvent->time = wrkEvent->time - saveTime + curTime; - wrkEvent = wrkEvent->nextEvent; + wrkEvent->_time = wrkEvent->_time - saveTime + curTime; + wrkEvent = wrkEvent->_nextEvent; } } @@ -1133,52 +1133,52 @@ void Scheduler::restoreEvents(Common::ReadStream *f) { * The queue goes from head (earliest) to tail (latest) timewise */ void Scheduler::insertAction(act *action) { - debugC(1, kDebugSchedule, "insertAction() - Action type A%d", action->a0.actType); + debugC(1, kDebugSchedule, "insertAction() - Action type A%d", action->_a0._actType); // First, get and initialize the event structure event_t *curEvent = getQueue(); - curEvent->action = action; - switch (action->a0.actType) { // Assign whether local or global + curEvent->_action = action; + switch (action->_a0._actType) { // Assign whether local or global case AGSCHEDULE: - curEvent->localActionFl = false; // Lasts over a new screen + curEvent->_localActionFl = false; // Lasts over a new screen break; // Workaround: When dying, switch to storyMode in order to block the keyboard. case GAMEOVER: _vm->getGameStatus()._storyModeFl = true; // No break on purpose default: - curEvent->localActionFl = true; // Rest are for current screen only + curEvent->_localActionFl = true; // Rest are for current screen only break; } - curEvent->time = action->a0.timer + getTicks(); // Convert rel to abs time + curEvent->_time = action->_a0._timer + getTicks(); // Convert rel to abs time // Now find the place to insert the event if (!_tailEvent) { // Empty queue _tailEvent = _headEvent = curEvent; - curEvent->nextEvent = curEvent->prevEvent = 0; + curEvent->_nextEvent = curEvent->_prevEvent = 0; } else { event_t *wrkEvent = _tailEvent; // Search from latest time back bool found = false; while (wrkEvent && !found) { - if (wrkEvent->time <= curEvent->time) { // Found if new event later + if (wrkEvent->_time <= curEvent->_time) { // Found if new event later found = true; if (wrkEvent == _tailEvent) // New latest in list _tailEvent = curEvent; else - wrkEvent->nextEvent->prevEvent = curEvent; - curEvent->nextEvent = wrkEvent->nextEvent; - wrkEvent->nextEvent = curEvent; - curEvent->prevEvent = wrkEvent; + wrkEvent->_nextEvent->_prevEvent = curEvent; + curEvent->_nextEvent = wrkEvent->_nextEvent; + wrkEvent->_nextEvent = curEvent; + curEvent->_prevEvent = wrkEvent; } - wrkEvent = wrkEvent->prevEvent; + wrkEvent = wrkEvent->_prevEvent; } if (!found) { // Must be earliest in list - _headEvent->prevEvent = curEvent; // So insert as new head - curEvent->nextEvent = _headEvent; - curEvent->prevEvent = 0; + _headEvent->_prevEvent = curEvent; // So insert as new head + curEvent->_nextEvent = _headEvent; + curEvent->_prevEvent = 0; _headEvent = curEvent; } } @@ -1190,94 +1190,94 @@ void Scheduler::insertAction(act *action) { * to the next action in the list, except special case of NEW_SCREEN */ event_t *Scheduler::doAction(event_t *curEvent) { - debugC(1, kDebugSchedule, "doAction - Event action type : %d", curEvent->action->a0.actType); + debugC(1, kDebugSchedule, "doAction - Event action type : %d", curEvent->_action->_a0._actType); status_t &gameStatus = _vm->getGameStatus(); - act *action = curEvent->action; + act *action = curEvent->_action; object_t *obj1; int dx, dy; event_t *wrkEvent; // Save ev_p->next_p for return - switch (action->a0.actType) { + switch (action->_a0._actType) { case ANULL: // Big NOP from DEL_EVENTS break; case ASCHEDULE: // act0: Schedule an action list - insertActionList(action->a0.actIndex); + insertActionList(action->_a0._actIndex); break; case START_OBJ: // act1: Start an object cycling - _vm->_object->_objects[action->a1.objIndex]._cycleNumb = action->a1.cycleNumb; - _vm->_object->_objects[action->a1.objIndex]._cycling = action->a1.cycle; + _vm->_object->_objects[action->_a1._objIndex]._cycleNumb = action->_a1._cycleNumb; + _vm->_object->_objects[action->_a1._objIndex]._cycling = action->_a1._cycle; break; case INIT_OBJXY: // act2: Initialize an object - _vm->_object->_objects[action->a2.objIndex]._x = action->a2.x; // Coordinates - _vm->_object->_objects[action->a2.objIndex]._y = action->a2.y; + _vm->_object->_objects[action->_a2._objIndex]._x = action->_a2._x; // Coordinates + _vm->_object->_objects[action->_a2._objIndex]._y = action->_a2._y; break; case PROMPT: // act3: Prompt user for key phrase promptAction(action); break; case BKGD_COLOR: // act4: Set new background color - _vm->_screen->setBackgroundColor(action->a4.newBackgroundColor); + _vm->_screen->setBackgroundColor(action->_a4._newBackgroundColor); break; case INIT_OBJVXY: // act5: Initialize an object velocity - _vm->_object->setVelocity(action->a5.objIndex, action->a5.vx, action->a5.vy); + _vm->_object->setVelocity(action->_a5._objIndex, action->_a5._vx, action->_a5._vy); break; case INIT_CARRY: // act6: Initialize an object - _vm->_object->setCarry(action->a6.objIndex, action->a6.carriedFl); // carried status + _vm->_object->setCarry(action->_a6._objIndex, action->_a6._carriedFl); // carried status break; case INIT_HF_COORD: // act7: Initialize an object to hero's "feet" coords - _vm->_object->_objects[action->a7.objIndex]._x = _vm->_hero->_x - 1; - _vm->_object->_objects[action->a7.objIndex]._y = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2 - 1; - _vm->_object->_objects[action->a7.objIndex]._screenIndex = *_vm->_screen_p; // Don't forget screen! + _vm->_object->_objects[action->_a7._objIndex]._x = _vm->_hero->_x - 1; + _vm->_object->_objects[action->_a7._objIndex]._y = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2 - 1; + _vm->_object->_objects[action->_a7._objIndex]._screenIndex = *_vm->_screen_p; // Don't forget screen! break; case NEW_SCREEN: // act8: Start new screen - newScreen(action->a8.screenIndex); + newScreen(action->_a8._screenIndex); break; case INIT_OBJSTATE: // act9: Initialize an object state - _vm->_object->_objects[action->a9.objIndex]._state = action->a9.newState; + _vm->_object->_objects[action->_a9._objIndex]._state = action->_a9._newState; break; case INIT_PATH: // act10: Initialize an object path and velocity - _vm->_object->setPath(action->a10.objIndex, (path_t) action->a10.newPathType, action->a10.vxPath, action->a10.vyPath); + _vm->_object->setPath(action->_a10._objIndex, (path_t) action->_a10._newPathType, action->_a10._vxPath, action->_a10._vyPath); break; case COND_R: // act11: action lists conditional on object state - if (_vm->_object->_objects[action->a11.objIndex]._state == action->a11.stateReq) - insertActionList(action->a11.actPassIndex); + if (_vm->_object->_objects[action->_a11._objIndex]._state == action->_a11._stateReq) + insertActionList(action->_a11._actPassIndex); else - insertActionList(action->a11.actFailIndex); + insertActionList(action->_a11._actFailIndex); break; case TEXT: // act12: Text box (CF WARN) - Utils::notifyBox(_vm->_file->fetchString(action->a12.stringIndex)); // Fetch string from file + Utils::notifyBox(_vm->_file->fetchString(action->_a12._stringIndex)); // Fetch string from file break; case SWAP_IMAGES: // act13: Swap 2 object images - _vm->_object->swapImages(action->a13.objIndex1, action->a13.objIndex2); + _vm->_object->swapImages(action->_a13._objIndex1, action->_a13._objIndex2); break; case COND_SCR: // act14: Conditional on current screen - if (_vm->_object->_objects[action->a14.objIndex]._screenIndex == action->a14.screenReq) - insertActionList(action->a14.actPassIndex); + if (_vm->_object->_objects[action->_a14._objIndex]._screenIndex == action->_a14._screenReq) + insertActionList(action->_a14._actPassIndex); else - insertActionList(action->a14.actFailIndex); + insertActionList(action->_a14._actFailIndex); break; case AUTOPILOT: // act15: Home in on a (stationary) object - _vm->_object->homeIn(action->a15.objIndex1, action->a15.objIndex2, action->a15.dx, action->a15.dy); + _vm->_object->homeIn(action->_a15._objIndex1, action->_a15._objIndex2, action->_a15._dx, action->_a15._dy); break; case INIT_OBJ_SEQ: // act16: Set sequence number to use // Note: Don't set a sequence at time 0 of a new screen, it causes // problems clearing the boundary bits of the object! t>0 is safe - _vm->_object->_objects[action->a16.objIndex]._currImagePtr = _vm->_object->_objects[action->a16.objIndex]._seqList[action->a16.seqIndex]._seqPtr; + _vm->_object->_objects[action->_a16._objIndex]._currImagePtr = _vm->_object->_objects[action->_a16._objIndex]._seqList[action->_a16._seqIndex]._seqPtr; break; case SET_STATE_BITS: // act17: OR mask with curr obj state - _vm->_object->_objects[action->a17.objIndex]._state |= action->a17.stateMask; + _vm->_object->_objects[action->_a17._objIndex]._state |= action->_a17._stateMask; break; case CLEAR_STATE_BITS: // act18: AND ~mask with curr obj state - _vm->_object->_objects[action->a18.objIndex]._state &= ~action->a18.stateMask; + _vm->_object->_objects[action->_a18._objIndex]._state &= ~action->_a18._stateMask; break; case TEST_STATE_BITS: // act19: If all bits set, do apass else afail - if ((_vm->_object->_objects[action->a19.objIndex]._state & action->a19.stateMask) == action->a19.stateMask) - insertActionList(action->a19.actPassIndex); + if ((_vm->_object->_objects[action->_a19._objIndex]._state & action->_a19._stateMask) == action->_a19._stateMask) + insertActionList(action->_a19._actPassIndex); else - insertActionList(action->a19.actFailIndex); + insertActionList(action->_a19._actFailIndex); break; case DEL_EVENTS: // act20: Remove all events of this action type - delEventType(action->a20.actTypeDel); + delEventType(action->_a20._actTypeDel); break; case GAMEOVER: // act21: Game over! // NOTE: Must wait at least 1 tick before issuing this action if @@ -1285,148 +1285,148 @@ event_t *Scheduler::doAction(event_t *curEvent) { gameStatus._gameOverFl = true; break; case INIT_HH_COORD: // act22: Initialize an object to hero's actual coords - _vm->_object->_objects[action->a22.objIndex]._x = _vm->_hero->_x; - _vm->_object->_objects[action->a22.objIndex]._y = _vm->_hero->_y; - _vm->_object->_objects[action->a22.objIndex]._screenIndex = *_vm->_screen_p;// Don't forget screen! + _vm->_object->_objects[action->_a22._objIndex]._x = _vm->_hero->_x; + _vm->_object->_objects[action->_a22._objIndex]._y = _vm->_hero->_y; + _vm->_object->_objects[action->_a22._objIndex]._screenIndex = *_vm->_screen_p;// Don't forget screen! break; case EXIT: // act23: Exit game back to DOS _vm->endGame(); break; case BONUS: // act24: Get bonus score for action - processBonus(action->a24.pointIndex); + processBonus(action->_a24._pointIndex); break; case COND_BOX: // act25: Conditional on bounding box - obj1 = &_vm->_object->_objects[action->a25.objIndex]; + obj1 = &_vm->_object->_objects[action->_a25._objIndex]; dx = obj1->_x + obj1->_currImagePtr->_x1; dy = obj1->_y + obj1->_currImagePtr->_y2; - if ((dx >= action->a25.x1) && (dx <= action->a25.x2) && - (dy >= action->a25.y1) && (dy <= action->a25.y2)) - insertActionList(action->a25.actPassIndex); + if ((dx >= action->_a25._x1) && (dx <= action->_a25._x2) && + (dy >= action->_a25._y1) && (dy <= action->_a25._y2)) + insertActionList(action->_a25._actPassIndex); else - insertActionList(action->a25.actFailIndex); + insertActionList(action->_a25._actFailIndex); break; case SOUND: // act26: Play a sound (or tune) - if (action->a26.soundIndex < _vm->_tunesNbr) - _vm->_sound->playMusic(action->a26.soundIndex); + if (action->_a26._soundIndex < _vm->_tunesNbr) + _vm->_sound->playMusic(action->_a26._soundIndex); else - _vm->_sound->playSound(action->a26.soundIndex, kSoundPriorityMedium); + _vm->_sound->playSound(action->_a26._soundIndex, kSoundPriorityMedium); break; case ADD_SCORE: // act27: Add object's value to score - _vm->adjustScore(_vm->_object->_objects[action->a27.objIndex]._objValue); + _vm->adjustScore(_vm->_object->_objects[action->_a27._objIndex]._objValue); break; case SUB_SCORE: // act28: Subtract object's value from score - _vm->adjustScore(-_vm->_object->_objects[action->a28.objIndex]._objValue); + _vm->adjustScore(-_vm->_object->_objects[action->_a28._objIndex]._objValue); break; case COND_CARRY: // act29: Conditional on object being carried - if (_vm->_object->isCarried(action->a29.objIndex)) - insertActionList(action->a29.actPassIndex); + if (_vm->_object->isCarried(action->_a29._objIndex)) + insertActionList(action->_a29._actPassIndex); else - insertActionList(action->a29.actFailIndex); + insertActionList(action->_a29._actFailIndex); break; case INIT_MAZE: // act30: Enable and init maze structure _vm->_maze._enabledFl = true; - _vm->_maze._size = action->a30.mazeSize; - _vm->_maze._x1 = action->a30.x1; - _vm->_maze._y1 = action->a30.y1; - _vm->_maze._x2 = action->a30.x2; - _vm->_maze._y2 = action->a30.y2; - _vm->_maze._x3 = action->a30.x3; - _vm->_maze._x4 = action->a30.x4; - _vm->_maze._firstScreenIndex = action->a30.firstScreenIndex; + _vm->_maze._size = action->_a30._mazeSize; + _vm->_maze._x1 = action->_a30._x1; + _vm->_maze._y1 = action->_a30._y1; + _vm->_maze._x2 = action->_a30._x2; + _vm->_maze._y2 = action->_a30._y2; + _vm->_maze._x3 = action->_a30._x3; + _vm->_maze._x4 = action->_a30._x4; + _vm->_maze._firstScreenIndex = action->_a30._firstScreenIndex; break; case EXIT_MAZE: // act31: Disable maze mode _vm->_maze._enabledFl = false; break; case INIT_PRIORITY: - _vm->_object->_objects[action->a32.objIndex]._priority = action->a32.priority; + _vm->_object->_objects[action->_a32._objIndex]._priority = action->_a32._priority; break; case INIT_SCREEN: - _vm->_object->_objects[action->a33.objIndex]._screenIndex = action->a33.screenIndex; + _vm->_object->_objects[action->_a33._objIndex]._screenIndex = action->_a33._screenIndex; break; case AGSCHEDULE: // act34: Schedule a (global) action list - insertActionList(action->a34.actIndex); + insertActionList(action->_a34._actIndex); break; case REMAPPAL: // act35: Remap a palette color - _vm->_screen->remapPal(action->a35.oldColorIndex, action->a35.newColorIndex); + _vm->_screen->remapPal(action->_a35._oldColorIndex, action->_a35._newColorIndex); break; case COND_NOUN: // act36: Conditional on noun mentioned - if (_vm->_parser->isWordPresent(_vm->_text->getNounArray(action->a36.nounIndex))) - insertActionList(action->a36.actPassIndex); + if (_vm->_parser->isWordPresent(_vm->_text->getNounArray(action->_a36._nounIndex))) + insertActionList(action->_a36._actPassIndex); else - insertActionList(action->a36.actFailIndex); + insertActionList(action->_a36._actFailIndex); break; case SCREEN_STATE: // act37: Set new screen state - _vm->_screenStates[action->a37.screenIndex] = action->a37.newState; + _vm->_screenStates[action->_a37._screenIndex] = action->_a37._newState; break; case INIT_LIPS: // act38: Position lips on object - _vm->_object->_objects[action->a38.lipsObjIndex]._x = _vm->_object->_objects[action->a38.objIndex]._x + action->a38.dxLips; - _vm->_object->_objects[action->a38.lipsObjIndex]._y = _vm->_object->_objects[action->a38.objIndex]._y + action->a38.dyLips; - _vm->_object->_objects[action->a38.lipsObjIndex]._screenIndex = *_vm->_screen_p; // Don't forget screen! - _vm->_object->_objects[action->a38.lipsObjIndex]._cycling = kCycleForward; + _vm->_object->_objects[action->_a38._lipsObjIndex]._x = _vm->_object->_objects[action->_a38._objIndex]._x + action->_a38._dxLips; + _vm->_object->_objects[action->_a38._lipsObjIndex]._y = _vm->_object->_objects[action->_a38._objIndex]._y + action->_a38._dyLips; + _vm->_object->_objects[action->_a38._lipsObjIndex]._screenIndex = *_vm->_screen_p; // Don't forget screen! + _vm->_object->_objects[action->_a38._lipsObjIndex]._cycling = kCycleForward; break; case INIT_STORY_MODE: // act39: Init story_mode flag // This is similar to the QUIET path mode, except that it is // independant of it and it additionally disables the ">" prompt - gameStatus._storyModeFl = action->a39.storyModeFl; + gameStatus._storyModeFl = action->_a39._storyModeFl; break; case WARN: // act40: Text box (CF TEXT) - Utils::notifyBox(_vm->_file->fetchString(action->a40.stringIndex)); + Utils::notifyBox(_vm->_file->fetchString(action->_a40._stringIndex)); break; case COND_BONUS: // act41: Perform action if got bonus - if (_points[action->a41.BonusIndex].scoredFl) - insertActionList(action->a41.actPassIndex); + if (_points[action->_a41._bonusIndex]._scoredFl) + insertActionList(action->_a41._actPassIndex); else - insertActionList(action->a41.actFailIndex); + insertActionList(action->_a41._actFailIndex); break; case TEXT_TAKE: // act42: Text box with "take" message - Utils::notifyBox(Common::String::format(TAKE_TEXT, _vm->_text->getNoun(_vm->_object->_objects[action->a42.objIndex]._nounIndex, TAKE_NAME))); + Utils::notifyBox(Common::String::format(TAKE_TEXT, _vm->_text->getNoun(_vm->_object->_objects[action->_a42._objIndex]._nounIndex, TAKE_NAME))); break; case YESNO: // act43: Prompt user for Yes or No - if (Utils::yesNoBox(_vm->_file->fetchString(action->a43.promptIndex))) - insertActionList(action->a43.actYesIndex); + if (Utils::yesNoBox(_vm->_file->fetchString(action->_a43._promptIndex))) + insertActionList(action->_a43._actYesIndex); else - insertActionList(action->a43.actNoIndex); + insertActionList(action->_a43._actNoIndex); break; case STOP_ROUTE: // act44: Stop any route in progress _vm->_route->resetRoute(); break; case COND_ROUTE: // act45: Conditional on route in progress - if (_vm->_route->getRouteIndex() >= action->a45.routeIndex) - insertActionList(action->a45.actPassIndex); + if (_vm->_route->getRouteIndex() >= action->_a45._routeIndex) + insertActionList(action->_a45._actPassIndex); else - insertActionList(action->a45.actFailIndex); + insertActionList(action->_a45._actFailIndex); break; case INIT_JUMPEXIT: // act46: Init status.jumpexit flag // This is to allow left click on exit to get there immediately // For example the plane crash in Hugo2 where hero is invisible // Couldn't use INVISIBLE flag since conflicts with boat in Hugo1 - _vm->_mouse->setJumpExitFl(action->a46.jumpExitFl); + _vm->_mouse->setJumpExitFl(action->_a46._jumpExitFl); break; - case INIT_VIEW: // act47: Init object.viewx, viewy, dir - _vm->_object->_objects[action->a47.objIndex]._viewx = action->a47.viewx; - _vm->_object->_objects[action->a47.objIndex]._viewy = action->a47.viewy; - _vm->_object->_objects[action->a47.objIndex]._direction = action->a47.direction; + case INIT_VIEW: // act47: Init object._viewx, viewy, dir + _vm->_object->_objects[action->_a47._objIndex]._viewx = action->_a47._viewx; + _vm->_object->_objects[action->_a47._objIndex]._viewy = action->_a47._viewy; + _vm->_object->_objects[action->_a47._objIndex]._direction = action->_a47._direction; break; case INIT_OBJ_FRAME: // act48: Set seq,frame number to use // Note: Don't set a sequence at time 0 of a new screen, it causes // problems clearing the boundary bits of the object! t>0 is safe - _vm->_object->_objects[action->a48.objIndex]._currImagePtr = _vm->_object->_objects[action->a48.objIndex]._seqList[action->a48.seqIndex]._seqPtr; - for (dx = 0; dx < action->a48.frameIndex; dx++) - _vm->_object->_objects[action->a48.objIndex]._currImagePtr = _vm->_object->_objects[action->a48.objIndex]._currImagePtr->_nextSeqPtr; + _vm->_object->_objects[action->_a48._objIndex]._currImagePtr = _vm->_object->_objects[action->_a48._objIndex]._seqList[action->_a48._seqIndex]._seqPtr; + for (dx = 0; dx < action->_a48._frameIndex; dx++) + _vm->_object->_objects[action->_a48._objIndex]._currImagePtr = _vm->_object->_objects[action->_a48._objIndex]._currImagePtr->_nextSeqPtr; break; case OLD_SONG: // Replaces ACT26 for DOS games. - _vm->_sound->_DOSSongPtr = _vm->_text->getTextData(action->a49.songIndex); + _vm->_sound->_DOSSongPtr = _vm->_text->getTextData(action->_a49._songIndex); break; default: error("An error has occurred: %s", "doAction"); break; } - if (action->a0.actType == NEW_SCREEN) { // New_screen() deletes entire list + if (action->_a0._actType == NEW_SCREEN) { // New_screen() deletes entire list return 0; // next_p = 0 since list now empty } else { - wrkEvent = curEvent->nextEvent; + wrkEvent = curEvent->_nextEvent; delQueue(curEvent); // Return event to free list return wrkEvent; // Return next event ptr } @@ -1445,37 +1445,37 @@ void Scheduler::delQueue(event_t *curEvent) { debugC(4, kDebugSchedule, "delQueue()"); if (curEvent == _headEvent) { // If p was the head ptr - _headEvent = curEvent->nextEvent; // then make new head_p + _headEvent = curEvent->_nextEvent; // then make new head_p } else { // Unlink p - curEvent->prevEvent->nextEvent = curEvent->nextEvent; - if (curEvent->nextEvent) - curEvent->nextEvent->prevEvent = curEvent->prevEvent; + curEvent->_prevEvent->_nextEvent = curEvent->_nextEvent; + if (curEvent->_nextEvent) + curEvent->_nextEvent->_prevEvent = curEvent->_prevEvent; else - _tailEvent = curEvent->prevEvent; + _tailEvent = curEvent->_prevEvent; } if (_headEvent) - _headEvent->prevEvent = 0; // Mark end of list + _headEvent->_prevEvent = 0; // Mark end of list else _tailEvent = 0; // Empty queue - curEvent->nextEvent = _freeEvent; // Return p to free list + curEvent->_nextEvent = _freeEvent; // Return p to free list if (_freeEvent) // Special case, if free list was empty - _freeEvent->prevEvent = curEvent; + _freeEvent->_prevEvent = curEvent; _freeEvent = curEvent; } /** * Delete all the active events of a given type */ -void Scheduler::delEventType(const action_t actTypeDel) { +void Scheduler::delEventType(const action_t _actTypeDel) { // Note: actions are not deleted here, simply turned into NOPs! event_t *wrkEvent = _headEvent; // The earliest event event_t *saveEvent; while (wrkEvent) { // While events found in list - saveEvent = wrkEvent->nextEvent; - if (wrkEvent->action->a20.actType == actTypeDel) + saveEvent = wrkEvent->_nextEvent; + if (wrkEvent->_action->_a20._actType == _actTypeDel) delQueue(wrkEvent); wrkEvent = saveEvent; } @@ -1486,8 +1486,8 @@ void Scheduler::delEventType(const action_t actTypeDel) { */ void Scheduler::savePoints(Common::WriteStream *out) const { for (int i = 0; i < _numBonuses; i++) { - out->writeByte(_points[i].score); - out->writeByte((_points[i].scoredFl) ? 1 : 0); + out->writeByte(_points[i]._score); + out->writeByte((_points[i]._scoredFl) ? 1 : 0); } } @@ -1497,8 +1497,8 @@ void Scheduler::savePoints(Common::WriteStream *out) const { void Scheduler::restorePoints(Common::ReadStream *in) { // Restore points table for (int i = 0; i < _numBonuses; i++) { - _points[i].score = in->readByte(); - _points[i].scoredFl = (in->readByte() == 1); + _points[i]._score = in->readByte(); + _points[i]._scoredFl = (in->readByte() == 1); } } @@ -1527,27 +1527,27 @@ void Scheduler_v1d::runScheduler() { uint32 ticker = getTicks(); // The time now, in ticks event_t *curEvent = _headEvent; // The earliest event - while (curEvent && (curEvent->time <= ticker)) // While mature events found + while (curEvent && (curEvent->_time <= ticker)) // While mature events found curEvent = doAction(curEvent); // Perform the action (returns next_p) } void Scheduler_v1d::promptAction(act *action) { Common::String response; - response = Utils::promptBox(_vm->_file->fetchString(action->a3.promptIndex)); + response = Utils::promptBox(_vm->_file->fetchString(action->_a3._promptIndex)); response.toLowercase(); char resp[256]; Common::strlcpy(resp, response.c_str(), 256); - if (action->a3.encodedFl) + if (action->_a3._encodedFl) decodeString(resp); - if (strstr(resp, _vm->_file->fetchString(action->a3.responsePtr[0]))) - insertActionList(action->a3.actPassIndex); + if (strstr(resp, _vm->_file->fetchString(action->_a3._responsePtr[0]))) + insertActionList(action->_a3._actPassIndex); else - insertActionList(action->a3.actFailIndex); + insertActionList(action->_a3._actFailIndex); } /** @@ -1577,24 +1577,24 @@ const char *Scheduler_v2d::getCypher() const { void Scheduler_v2d::promptAction(act *action) { Common::String response; - response = Utils::promptBox(_vm->_file->fetchString(action->a3.promptIndex)); + response = Utils::promptBox(_vm->_file->fetchString(action->_a3._promptIndex)); response.toLowercase(); - debug(1, "doAction(act3), expecting answer %s", _vm->_file->fetchString(action->a3.responsePtr[0])); + debug(1, "doAction(act3), expecting answer %s", _vm->_file->fetchString(action->_a3._responsePtr[0])); bool found = false; const char *tmpStr; // General purpose string ptr - for (int dx = 0; !found && (action->a3.responsePtr[dx] != -1); dx++) { - tmpStr = _vm->_file->fetchString(action->a3.responsePtr[dx]); + for (int dx = 0; !found && (action->_a3._responsePtr[dx] != -1); dx++) { + tmpStr = _vm->_file->fetchString(action->_a3._responsePtr[dx]); if (response.contains(tmpStr)) found = true; } if (found) - insertActionList(action->a3.actPassIndex); + insertActionList(action->_a3._actPassIndex); else - insertActionList(action->a3.actFailIndex); + insertActionList(action->_a3._actFailIndex); } /** @@ -1641,9 +1641,9 @@ void Scheduler_v1w::runScheduler() { uint32 ticker = getTicks(); // The time now, in ticks event_t *curEvent = _headEvent; // The earliest event - while (curEvent && (curEvent->time <= ticker)) // While mature events found + while (curEvent && (curEvent->_time <= ticker)) // While mature events found curEvent = doAction(curEvent); // Perform the action (returns next_p) - _vm->getGameStatus()._tick++; // Accessed elsewhere via getTicks() + _vm->getGameStatus()._tick++; // Accessed elsewhere via getTicks() } } // End of namespace Hugo diff --git a/engines/hugo/schedule.h b/engines/hugo/schedule.h index 60d51f0673..74a65a5c64 100644 --- a/engines/hugo/schedule.h +++ b/engines/hugo/schedule.h @@ -93,424 +93,425 @@ enum action_t { // Parameters: }; struct act0 { // Type 0 - Schedule - action_t actType; // The type of action - int timer; // Time to set off the action - uint16 actIndex; // Ptr to an action list + action_t _actType; // The type of action + int _timer; // Time to set off the action + uint16 _actIndex; // Ptr to an action list }; struct act1 { // Type 1 - Start an object - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number - int cycleNumb; // Number of times to cycle - cycle_t cycle; // Direction to start cycling + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number + int _cycleNumb; // Number of times to cycle + cycle_t _cycle; // Direction to start cycling }; struct act2 { // Type 2 - Initialize an object coords - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number - int x, y; // Coordinates + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number + int _x, _y; // Coordinates }; struct act3 { // Type 3 - Prompt user for text - action_t actType; // The type of action - int timer; // Time to set off the action - uint16 promptIndex; // Index of prompt string - int *responsePtr; // Array of indexes to valid response string(s) (terminate list with -1) - uint16 actPassIndex; // Ptr to action list if success - uint16 actFailIndex; // Ptr to action list if failure - bool encodedFl; // (HUGO 1 DOS ONLY) Whether response is encoded or not + action_t _actType; // The type of action + int _timer; // Time to set off the action + uint16 _promptIndex; // Index of prompt string + int *_responsePtr; // Array of indexes to valid response string(s) (terminate list with -1) + uint16 _actPassIndex; // Ptr to action list if success + uint16 _actFailIndex; // Ptr to action list if failure + bool _encodedFl; // (HUGO 1 DOS ONLY) Whether response is encoded or not }; struct act4 { // Type 4 - Set new background color - action_t actType; // The type of action - int timer; // Time to set off the action - long newBackgroundColor; // New color + action_t _actType; // The type of action + int _timer; // Time to set off the action + long _newBackgroundColor; // New color }; struct act5 { // Type 5 - Initialize an object velocity - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number - int vx, vy; // velocity + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number + int _vx, _vy; // velocity }; struct act6 { // Type 6 - Initialize an object carrying - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number - bool carriedFl; // carrying + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number + bool _carriedFl; // carrying }; struct act7 { // Type 7 - Initialize an object to hero's coords - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number }; struct act8 { // Type 8 - switch to new screen - action_t actType; // The type of action - int timer; // Time to set off the action - int screenIndex; // The new screen number + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _screenIndex; // The new screen number }; struct act9 { // Type 9 - Initialize an object state - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number - byte newState; // New state + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number + byte _newState; // New state }; struct act10 { // Type 10 - Initialize an object path type - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number - int newPathType; // New path type - int8 vxPath, vyPath; // Max delta velocities e.g. for CHASE + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number + int _newPathType; // New path type + int8 _vxPath, _vyPath; // Max delta velocities e.g. for CHASE }; struct act11 { // Type 11 - Conditional on object's state - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number - byte stateReq; // Required state - uint16 actPassIndex; // Ptr to action list if success - uint16 actFailIndex; // Ptr to action list if failure + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number + byte _stateReq; // Required state + uint16 _actPassIndex; // Ptr to action list if success + uint16 _actFailIndex; // Ptr to action list if failure }; struct act12 { // Type 12 - Simple text box - action_t actType; // The type of action - int timer; // Time to set off the action - int stringIndex; // Index (enum) of string in strings.dat + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _stringIndex; // Index (enum) of string in strings.dat }; struct act13 { // Type 13 - Swap first object image with second - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex1; // Index of first object - int objIndex2; // 2nd + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex1; // Index of first object + int _objIndex2; // 2nd }; struct act14 { // Type 14 - Conditional on current screen - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The required object - int screenReq; // The required screen number - uint16 actPassIndex; // Ptr to action list if success - uint16 actFailIndex; // Ptr to action list if failure + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The required object + int _screenReq; // The required screen number + uint16 _actPassIndex; // Ptr to action list if success + uint16 _actFailIndex; // Ptr to action list if failure }; struct act15 { // Type 15 - Home in on an object - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex1; // The object number homing in - int objIndex2; // The object number to home in on - int8 dx, dy; // Max delta velocities + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex1; // The object number homing in + int _objIndex2; // The object number to home in on + int8 _dx, _dy; // Max delta velocities }; + // Note: Don't set a sequence at time 0 of a new screen, it causes // problems clearing the boundary bits of the object! timer > 0 is safe struct act16 { // Type 16 - Set curr_seq_p to seq - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number - int seqIndex; // The index of seq array to set to + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number + int _seqIndex; // The index of seq array to set to }; struct act17 { // Type 17 - SET obj individual state bits - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number - int stateMask; // The mask to OR with current obj state + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number + int _stateMask; // The mask to OR with current obj state }; struct act18 { // Type 18 - CLEAR obj individual state bits - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number - int stateMask; // The mask to ~AND with current obj state + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number + int _stateMask; // The mask to ~AND with current obj state }; struct act19 { // Type 19 - TEST obj individual state bits - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number - int stateMask; // The mask to AND with current obj state - uint16 actPassIndex; // Ptr to action list (all bits set) - uint16 actFailIndex; // Ptr to action list (not all set) + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number + int _stateMask; // The mask to AND with current obj state + uint16 _actPassIndex; // Ptr to action list (all bits set) + uint16 _actFailIndex; // Ptr to action list (not all set) }; struct act20 { // Type 20 - Remove all events with this type of action - action_t actType; // The type of action - int timer; // Time to set off the action - action_t actTypeDel; // The action type to remove + action_t _actType; // The type of action + int _timer; // Time to set off the action + action_t _actTypeDel; // The action type to remove }; struct act21 { // Type 21 - Gameover. Disable hero & commands - action_t actType; // The type of action - int timer; // Time to set off the action + action_t _actType; // The type of action + int _timer; // Time to set off the action }; struct act22 { // Type 22 - Initialize an object to hero's coords - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number }; struct act23 { // Type 23 - Exit game back to DOS - action_t actType; // The type of action - int timer; // Time to set off the action + action_t _actType; // The type of action + int _timer; // Time to set off the action }; struct act24 { // Type 24 - Get bonus score - action_t actType; // The type of action - int timer; // Time to set off the action - int pointIndex; // Index into points array + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _pointIndex; // Index into points array }; struct act25 { // Type 25 - Conditional on bounding box - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The required object number - int x1, y1, x2, y2; // The bounding box - uint16 actPassIndex; // Ptr to action list if success - uint16 actFailIndex; // Ptr to action list if failure + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The required object number + int _x1, _y1, _x2, _y2; // The bounding box + uint16 _actPassIndex; // Ptr to action list if success + uint16 _actFailIndex; // Ptr to action list if failure }; struct act26 { // Type 26 - Play a sound - action_t actType; // The type of action - int timer; // Time to set off the action - int16 soundIndex; // Sound index in data file + action_t _actType; // The type of action + int _timer; // Time to set off the action + int16 _soundIndex; // Sound index in data file }; struct act27 { // Type 27 - Add object's value to score - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // object number + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // object number }; struct act28 { // Type 28 - Subtract object's value from score - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // object number + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // object number }; struct act29 { // Type 29 - Conditional on object carried - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The required object number - uint16 actPassIndex; // Ptr to action list if success - uint16 actFailIndex; // Ptr to action list if failure + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The required object number + uint16 _actPassIndex; // Ptr to action list if success + uint16 _actFailIndex; // Ptr to action list if failure }; struct act30 { // Type 30 - Start special maze processing - action_t actType; // The type of action - int timer; // Time to set off the action - byte mazeSize; // Size of (square) maze - int x1, y1, x2, y2; // Bounding box of maze - int x3, x4; // Extra x points for perspective correction - byte firstScreenIndex; // First (top left) screen of maze + action_t _actType; // The type of action + int _timer; // Time to set off the action + byte _mazeSize; // Size of (square) maze + int _x1, _y1, _x2, _y2; // Bounding box of maze + int _x3, _x4; // Extra x points for perspective correction + byte _firstScreenIndex; // First (top left) screen of maze }; struct act31 { // Type 31 - Exit special maze processing - action_t actType; // The type of action - int timer; // Time to set off the action + action_t _actType; // The type of action + int _timer; // Time to set off the action }; struct act32 { // Type 32 - Init fbg field of object - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number - byte priority; // Value of foreground/background field + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number + byte _priority; // Value of foreground/background field }; struct act33 { // Type 33 - Init screen field of object - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number - int screenIndex; // Screen number + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number + int _screenIndex; // Screen number }; struct act34 { // Type 34 - Global Schedule - action_t actType; // The type of action - int timer; // Time to set off the action - uint16 actIndex; // Ptr to an action list + action_t _actType; // The type of action + int _timer; // Time to set off the action + uint16 _actIndex; // Ptr to an action list }; struct act35 { // Type 35 - Remappe palette - action_t actType; // The type of action - int timer; // Time to set off the action - int16 oldColorIndex; // Old color index, 0..15 - int16 newColorIndex; // New color index, 0..15 + action_t _actType; // The type of action + int _timer; // Time to set off the action + int16 _oldColorIndex; // Old color index, 0..15 + int16 _newColorIndex; // New color index, 0..15 }; struct act36 { // Type 36 - Conditional on noun mentioned - action_t actType; // The type of action - int timer; // Time to set off the action - uint16 nounIndex; // The required noun (list) - uint16 actPassIndex; // Ptr to action list if success - uint16 actFailIndex; // Ptr to action list if failure + action_t _actType; // The type of action + int _timer; // Time to set off the action + uint16 _nounIndex; // The required noun (list) + uint16 _actPassIndex; // Ptr to action list if success + uint16 _actFailIndex; // Ptr to action list if failure }; struct act37 { // Type 37 - Set new screen state - action_t actType; // The type of action - int timer; // Time to set off the action - int screenIndex; // The screen number - byte newState; // The new state + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _screenIndex; // The screen number + byte _newState; // The new state }; struct act38 { // Type 38 - Position lips - action_t actType; // The type of action - int timer; // Time to set off the action - int lipsObjIndex; // The LIPS object - int objIndex; // The object to speak - byte dxLips; // Relative offset of x - byte dyLips; // Relative offset of y + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _lipsObjIndex; // The LIPS object + int _objIndex; // The object to speak + byte _dxLips; // Relative offset of x + byte _dyLips; // Relative offset of y }; struct act39 { // Type 39 - Init story mode - action_t actType; // The type of action - int timer; // Time to set off the action - bool storyModeFl; // New state of story_mode flag + action_t _actType; // The type of action + int _timer; // Time to set off the action + bool _storyModeFl; // New state of story_mode flag }; struct act40 { // Type 40 - Unsolicited text box - action_t actType; // The type of action - int timer; // Time to set off the action - int stringIndex; // Index (enum) of string in strings.dat + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _stringIndex; // Index (enum) of string in strings.dat }; struct act41 { // Type 41 - Conditional on bonus scored - action_t actType; // The type of action - int timer; // Time to set off the action - int BonusIndex; // Index into bonus list - uint16 actPassIndex; // Index of the action list if scored for the first time - uint16 actFailIndex; // Index of the action list if already scored + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _bonusIndex; // Index into bonus list + uint16 _actPassIndex; // Index of the action list if scored for the first time + uint16 _actFailIndex; // Index of the action list if already scored }; struct act42 { // Type 42 - Text box with "take" string - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object taken + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object taken }; struct act43 { // Type 43 - Prompt user for Yes or No - action_t actType; // The type of action - int timer; // Time to set off the action - int promptIndex; // index of prompt string - uint16 actYesIndex; // Ptr to action list if YES - uint16 actNoIndex; // Ptr to action list if NO + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _promptIndex; // index of prompt string + uint16 _actYesIndex; // Ptr to action list if YES + uint16 _actNoIndex; // Ptr to action list if NO }; struct act44 { // Type 44 - Stop any route in progress - action_t actType; // The type of action - int timer; // Time to set off the action + action_t _actType; // The type of action + int _timer; // Time to set off the action }; struct act45 { // Type 45 - Conditional on route in progress - action_t actType; // The type of action - int timer; // Time to set off the action - int routeIndex; // Must be >= current status.rindex - uint16 actPassIndex; // Ptr to action list if en-route - uint16 actFailIndex; // Ptr to action list if not + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _routeIndex; // Must be >= current status.rindex + uint16 _actPassIndex; // Ptr to action list if en-route + uint16 _actFailIndex; // Ptr to action list if not }; struct act46 { // Type 46 - Init status.jumpexit - action_t actType; // The type of action - int timer; // Time to set off the action - bool jumpExitFl; // New state of jumpexit flag + action_t _actType; // The type of action + int _timer; // Time to set off the action + bool _jumpExitFl; // New state of jumpexit flag }; struct act47 { // Type 47 - Init viewx,viewy,dir - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object - int16 viewx; // object.viewx - int16 viewy; // object.viewy - int16 direction; // object.dir + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object + int16 _viewx; // object.viewx + int16 _viewy; // object.viewy + int16 _direction; // object.dir }; struct act48 { // Type 48 - Set curr_seq_p to frame n - action_t actType; // The type of action - int timer; // Time to set off the action - int objIndex; // The object number - int seqIndex; // The index of seq array to set to - int frameIndex; // The index of frame to set to + action_t _actType; // The type of action + int _timer; // Time to set off the action + int _objIndex; // The object number + int _seqIndex; // The index of seq array to set to + int _frameIndex; // The index of frame to set to }; -struct act49 { // Added by Strangerke - Type 79 - Play a song (DOS way) - action_t actType; // The type of action - int timer; // Time to set off the action - uint16 songIndex; // Song index in string array +struct act49 { // Added by Strangerke - Type 49 - Play a song (DOS way) + action_t _actType; // The type of action + int _timer; // Time to set off the action + uint16 _songIndex; // Song index in string array }; union act { - act0 a0; - act1 a1; - act2 a2; - act3 a3; - act4 a4; - act5 a5; - act6 a6; - act7 a7; - act8 a8; - act9 a9; - act10 a10; - act11 a11; - act12 a12; - act13 a13; - act14 a14; - act15 a15; - act16 a16; - act17 a17; - act18 a18; - act19 a19; - act20 a20; - act21 a21; - act22 a22; - act23 a23; - act24 a24; - act25 a25; - act26 a26; - act27 a27; - act28 a28; - act29 a29; - act30 a30; - act31 a31; - act32 a32; - act33 a33; - act34 a34; - act35 a35; - act36 a36; - act37 a37; - act38 a38; - act39 a39; - act40 a40; - act41 a41; - act42 a42; - act43 a43; - act44 a44; - act45 a45; - act46 a46; - act47 a47; - act48 a48; - act49 a49; + act0 _a0; + act1 _a1; + act2 _a2; + act3 _a3; + act4 _a4; + act5 _a5; + act6 _a6; + act7 _a7; + act8 _a8; + act9 _a9; + act10 _a10; + act11 _a11; + act12 _a12; + act13 _a13; + act14 _a14; + act15 _a15; + act16 _a16; + act17 _a17; + act18 _a18; + act19 _a19; + act20 _a20; + act21 _a21; + act22 _a22; + act23 _a23; + act24 _a24; + act25 _a25; + act26 _a26; + act27 _a27; + act28 _a28; + act29 _a29; + act30 _a30; + act31 _a31; + act32 _a32; + act33 _a33; + act34 _a34; + act35 _a35; + act36 _a36; + act37 _a37; + act38 _a38; + act39 _a39; + act40 _a40; + act41 _a41; + act42 _a42; + act43 _a43; + act44 _a44; + act45 _a45; + act46 _a46; + act47 _a47; + act48 _a48; + act49 _a49; }; struct event_t { - act *action; // Ptr to action to perform - bool localActionFl; // true if action is only for this screen - uint32 time; // (absolute) time to perform action - struct event_t *prevEvent; // Chain to previous event - struct event_t *nextEvent; // Chain to next event + act *_action; // Ptr to action to perform + bool _localActionFl; // true if action is only for this screen + uint32 _time; // (absolute) time to perform action + struct event_t *_prevEvent; // Chain to previous event + struct event_t *_nextEvent; // Chain to next event }; /** * Following are points for achieving certain actions. */ struct point_t { - byte score; // The value of the point - bool scoredFl; // Whether scored yet + byte _score; // The value of the point + bool _scoredFl; // Whether scored yet }; class Scheduler { diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp index eed4164d5e..463a19ae8c 100644 --- a/engines/hugo/sound.cpp +++ b/engines/hugo/sound.cpp @@ -162,16 +162,16 @@ void SoundHandler::stopMusic() { * Turn music on and off */ void SoundHandler::toggleMusic() { - _vm->_config.musicFl = !_vm->_config.musicFl; + _vm->_config._musicFl = !_vm->_config._musicFl; - _midiPlayer->pause(!_vm->_config.musicFl); + _midiPlayer->pause(!_vm->_config._musicFl); } /** * Turn digitized sound on and off */ void SoundHandler::toggleSound() { - _vm->_config.soundFl = !_vm->_config.soundFl; + _vm->_config._soundFl = !_vm->_config._soundFl; } void SoundHandler::playMIDI(sound_pt seq_p, uint16 size) { @@ -185,7 +185,7 @@ void SoundHandler::playMusic(int16 tune) { sound_pt seqPtr; // Sequence data from file uint16 size; // Size of sequence data - if (_vm->_config.musicFl) { + if (_vm->_config._musicFl) { _vm->getGameStatus()._song = tune; seqPtr = _vm->_file->getSound(tune, &size); playMIDI(seqPtr, size); @@ -203,7 +203,7 @@ void SoundHandler::playSound(int16 sound, const byte priority) { uint16 size; // Size of data // Sound disabled - if (!_vm->_config.soundFl || !_vm->_mixer->isReady()) + if (!_vm->_config._soundFl || !_vm->_mixer->isReady()) return; syncVolume(); @@ -270,7 +270,7 @@ void SoundHandler::pcspkr_player() { static const uint16 pcspkrFlats[8] = {1435, 1279, 2342, 2150, 1916, 1755, 1611}; // The flats, Ab to Bb // Does the user not want any sound? - if (!_vm->_config.soundFl || !_vm->_mixer->isReady()) + if (!_vm->_config._soundFl || !_vm->_mixer->isReady()) return; // Is there no song? -- cgit v1.2.3 From 999ae29de43444118b5990a272a98031c4707ee0 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 13 Jun 2012 20:58:01 +0200 Subject: HUGO: Rename structs and enums --- engines/hugo/display.cpp | 48 ++++++------- engines/hugo/display.h | 52 +++++++------- engines/hugo/file.cpp | 36 +++++----- engines/hugo/file.h | 32 ++++----- engines/hugo/file_v1d.cpp | 10 +-- engines/hugo/file_v1w.cpp | 8 +-- engines/hugo/file_v2d.cpp | 14 ++-- engines/hugo/file_v3d.cpp | 14 ++-- engines/hugo/game.h | 38 +++++----- engines/hugo/hugo.cpp | 12 ++-- engines/hugo/hugo.h | 68 +++++++++--------- engines/hugo/inventory.cpp | 10 +-- engines/hugo/inventory.h | 10 +-- engines/hugo/mouse.cpp | 24 +++---- engines/hugo/mouse.h | 6 +- engines/hugo/object.cpp | 74 ++++++++++---------- engines/hugo/object.h | 38 +++++----- engines/hugo/object_v1d.cpp | 42 +++++------ engines/hugo/object_v1w.cpp | 38 +++++----- engines/hugo/object_v2d.cpp | 38 +++++----- engines/hugo/object_v3d.cpp | 18 ++--- engines/hugo/parser.cpp | 20 +++--- engines/hugo/parser.h | 42 +++++------ engines/hugo/parser_v1d.cpp | 28 ++++---- engines/hugo/parser_v1w.cpp | 10 +-- engines/hugo/parser_v2d.cpp | 4 +- engines/hugo/parser_v3d.cpp | 30 ++++---- engines/hugo/route.cpp | 30 ++++---- engines/hugo/route.h | 18 ++--- engines/hugo/schedule.cpp | 72 +++++++++---------- engines/hugo/schedule.h | 166 ++++++++++++++++++++++---------------------- engines/hugo/sound.cpp | 4 +- 32 files changed, 527 insertions(+), 527 deletions(-) diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index 12a9edfbb7..34b0303eee 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -105,23 +105,23 @@ Screen::Screen(HugoEngine *vm) : _vm(vm) { Screen::~Screen() { } -icondib_t &Screen::getIconBuffer() { +Icondib &Screen::getIconBuffer() { return _iconBuffer; } -viewdib_t &Screen::getBackBuffer() { +Viewdib &Screen::getBackBuffer() { return _backBuffer; } -viewdib_t &Screen::getBackBufferBackup() { +Viewdib &Screen::getBackBufferBackup() { return _backBufferBackup; } -viewdib_t &Screen::getFrontBuffer() { +Viewdib &Screen::getFrontBuffer() { return _frontBuffer; } -viewdib_t &Screen::getGUIBuffer() { +Viewdib &Screen::getGUIBuffer() { return _GUIBuffer; } @@ -149,7 +149,7 @@ void Screen::initDisplay() { /** * Move an image from source to destination */ -void Screen::moveImage(image_pt srcImage, const int16 x1, const int16 y1, const int16 dx, int16 dy, const int16 width1, image_pt dstImage, const int16 x2, const int16 y2, const int16 width2) { +void Screen::moveImage(ImagePtr srcImage, const int16 x1, const int16 y1, const int16 dx, int16 dy, const int16 width1, ImagePtr dstImage, const int16 x2, const int16 y2, const int16 width2) { debugC(3, kDebugDisplay, "moveImage(srcImage, %d, %d, %d, %d, %d, dstImage, %d, %d, %d)", x1, y1, dx, dy, width1, x2, y2, width2); int16 wrap_src = width1 - dx; // Wrap to next src row @@ -236,14 +236,14 @@ void Screen::setBackgroundColor(const uint16 color) { * Merge an object frame into _frontBuffer at sx, sy and update rectangle list. * If fore TRUE, force object above any overlay */ -void Screen::displayFrame(const int sx, const int sy, seq_t *seq, const bool foreFl) { +void Screen::displayFrame(const int sx, const int sy, Seq *seq, const bool foreFl) { debugC(3, kDebugDisplay, "displayFrame(%d, %d, seq, %d)", sx, sy, (foreFl) ? 1 : 0); - image_pt image = seq->_imagePtr; // Ptr to object image data - image_pt subFrontBuffer = &_frontBuffer[sy * kXPix + sx]; // Ptr to offset in _frontBuffer + ImagePtr image = seq->_imagePtr; // Ptr to object image data + ImagePtr subFrontBuffer = &_frontBuffer[sy * kXPix + sx]; // Ptr to offset in _frontBuffer int16 frontBufferwrap = kXPix - seq->_x2 - 1; // Wraps dest_p after each line int16 imageWrap = seq->_bytesPerLine8 - seq->_x2 - 1; - overlayState_t overlayState = (foreFl) ? kOvlForeground : kOvlUndef; // Overlay state of object + OverlayState overlayState = (foreFl) ? kOvlForeground : kOvlUndef; // Overlay state of object for (uint16 y = 0; y < seq->_lines; y++) { // Each line in object for (uint16 x = 0; x <= seq->_x2; x++) { if (*image) { // Non-transparent @@ -271,7 +271,7 @@ void Screen::displayFrame(const int sx, const int sy, seq_t *seq, const bool for /** * Merge rectangles A,B leaving result in B */ -void Screen::merge(const rect_t *rectA, rect_t *rectB) { +void Screen::merge(const Rect *rectA, Rect *rectB) { debugC(6, kDebugDisplay, "merge()"); int16 xa = rectA->_x + rectA->_dx; // Find x2,y2 for each rectangle @@ -291,7 +291,7 @@ void Screen::merge(const rect_t *rectA, rect_t *rectB) { * of blist. bmax is the max size of the blist. Note that blist can * have holes, in which case dx = 0. Returns used length of blist. */ -int16 Screen::mergeLists(rect_t *list, rect_t *blist, const int16 len, int16 blen) { +int16 Screen::mergeLists(Rect *list, Rect *blist, const int16 len, int16 blen) { debugC(4, kDebugDisplay, "mergeLists()"); int16 coalesce[kBlitListSize]; // List of overlapping rects @@ -299,7 +299,7 @@ int16 Screen::mergeLists(rect_t *list, rect_t *blist, const int16 len, int16 ble for (int16 a = 0; a < len; a++, list++) { // Compile list of overlapping rectangles in blit list int16 c = 0; - rect_t *bp = blist; + Rect *bp = blist; for (int16 b = 0; b < blen; b++, bp++) { if (bp->_dx) // blist entry used if (isOverlapping(list, bp)) @@ -316,7 +316,7 @@ int16 Screen::mergeLists(rect_t *list, rect_t *blist, const int16 len, int16 ble // Merge any more blist entries while (--c) { - rect_t *cp = &blist[coalesce[c]]; + Rect *cp = &blist[coalesce[c]]; merge(cp, bp); cp->_dx = 0; // Delete entry } @@ -329,12 +329,12 @@ int16 Screen::mergeLists(rect_t *list, rect_t *blist, const int16 len, int16 ble * Process the display list * Trailing args are int16 x,y,dx,dy for the D_ADD operation */ -void Screen::displayList(dupdate_t update, ...) { +void Screen::displayList(Dupdate update, ...) { debugC(6, kDebugDisplay, "displayList()"); int16 blitLength = 0; // Length of blit list va_list marker; // Args used for D_ADD operation - rect_t *p; // Ptr to dlist entry + Rect *p; // Ptr to dlist entry switch (update) { case kDisplayInit: // Init lists, restore whole screen @@ -627,18 +627,18 @@ void Screen::hideCursor() { CursorMan.showMouse(false); } -bool Screen::isInX(const int16 x, const rect_t *rect) const { +bool Screen::isInX(const int16 x, const Rect *rect) const { return (x >= rect->_x) && (x <= rect->_x + rect->_dx); } -bool Screen::isInY(const int16 y, const rect_t *rect) const { +bool Screen::isInY(const int16 y, const Rect *rect) const { return (y >= rect->_y) && (y <= rect->_y + rect->_dy); } /** * Check if two rectangles are overlapping */ -bool Screen::isOverlapping(const rect_t *rectA, const rect_t *rectB) const { +bool Screen::isOverlapping(const Rect *rectA, const Rect *rectB) const { return (isInX(rectA->_x, rectB) || isInX(rectA->_x + rectA->_dx, rectB) || isInX(rectB->_x, rectA) || isInX(rectB->_x + rectB->_dx, rectA)) && (isInY(rectA->_y, rectB) || isInY(rectA->_y + rectA->_dy, rectB) || isInY(rectB->_y, rectA) || isInY(rectB->_y + rectB->_dy, rectA)); } @@ -656,7 +656,7 @@ void Screen::drawBoundaries() { _vm->_mouse->drawHotspots(); for (int i = 0; i < _vm->_object->_numObj; i++) { - object_t *obj = &_vm->_object->_objects[i]; // Get pointer to object + Object *obj = &_vm->_object->_objects[i]; // Get pointer to object if (obj->_screenIndex == *_vm->_screen_p) { if ((obj->_currImagePtr != 0) && (obj->_cycling != kCycleInvisible)) drawRectangle(false, obj->_x + obj->_currImagePtr->_x1, obj->_y + obj->_currImagePtr->_y1, @@ -730,12 +730,12 @@ void Screen_v1d::loadFontArr(Common::ReadStream &in) { * processed object by looking down the current column for an overlay * base byte set (in which case the object is foreground). */ -overlayState_t Screen_v1d::findOvl(seq_t *seq_p, image_pt dst_p, uint16 y) { +OverlayState Screen_v1d::findOvl(Seq *seqPtr, ImagePtr dst_p, uint16 y) { debugC(4, kDebugDisplay, "findOvl()"); uint16 index = (uint16)(dst_p - _frontBuffer) >> 3; - for (int i = 0; i < seq_p->_lines-y; i++) { // Each line in object + for (int i = 0; i < seqPtr->_lines-y; i++) { // Each line in object if (_vm->_object->getBaseBoundary(index)) // If any overlay base byte is non-zero then the object is foreground, else back. return kOvlForeground; index += kCompLineSize; @@ -799,10 +799,10 @@ void Screen_v1w::loadFontArr(Common::ReadStream &in) { * processed object by looking down the current column for an overlay * base bit set (in which case the object is foreground). */ -overlayState_t Screen_v1w::findOvl(seq_t *seq_p, image_pt dst_p, uint16 y) { +OverlayState Screen_v1w::findOvl(Seq *seqPtr, ImagePtr dst_p, uint16 y) { debugC(4, kDebugDisplay, "findOvl()"); - for (; y < seq_p->_lines; y++) { // Each line in object + for (; y < seqPtr->_lines; y++) { // Each line in object byte ovb = _vm->_object->getBaseBoundary((uint16)(dst_p - _frontBuffer) >> 3); // Ptr into overlay bits if (ovb & (0x80 >> ((uint16)(dst_p - _frontBuffer) & 7))) // Overlay bit is set return kOvlForeground; // Found a bit - must be foreground diff --git a/engines/hugo/display.h b/engines/hugo/display.h index 0d8120e916..5fab2f18cc 100644 --- a/engines/hugo/display.h +++ b/engines/hugo/display.h @@ -31,14 +31,14 @@ #define HUGO_DISPLAY_H namespace Hugo { -enum overlayState_t {kOvlUndef, kOvlForeground, kOvlBackground}; // Overlay state +enum OverlayState {kOvlUndef, kOvlForeground, kOvlBackground}; // Overlay state static const int kCenter = -1; // Used to center text in x class Screen { public: - struct rect_t { // Rectangle used in Display list + struct Rect { // Rectangle used in Display list int16 _x; // Position in dib int16 _y; // Position in dib int16 _dx; // width @@ -55,8 +55,8 @@ public: int16 stringLength(const char *s) const; void displayBackground(); - void displayFrame(const int sx, const int sy, seq_t *seq, const bool foreFl); - void displayList(dupdate_t update, ...); + void displayFrame(const int sx, const int sy, Seq *seq, const bool foreFl); + void displayList(Dupdate update, ...); void displayRect(const int16 x, const int16 y, const int16 dx, const int16 dy); void drawBoundaries(); void drawRectangle(const bool filledFl, const int16 x1, const int16 y1, const int16 x2, const int16 y2, const int color); @@ -67,7 +67,7 @@ public: void initDisplay(); void initNewScreenDisplay(); void loadPalette(Common::ReadStream &in); - void moveImage(image_pt srcImage, const int16 x1, const int16 y1, const int16 dx, int16 dy, const int16 width1, image_pt dstImage, const int16 x2, const int16 y2, const int16 width2); + void moveImage(ImagePtr srcImage, const int16 x1, const int16 y1, const int16 dx, int16 dy, const int16 width1, ImagePtr dstImage, const int16 x2, const int16 y2, const int16 width2); void remapPal(uint16 oldIndex, uint16 newIndex); void resetInventoryObjId(); void restorePal(Common::ReadStream *f); @@ -80,11 +80,11 @@ public: void userHelp() const; void writeStr(int16 sx, const int16 sy, const char *s, const byte color); - icondib_t &getIconBuffer(); - viewdib_t &getBackBuffer(); - viewdib_t &getBackBufferBackup(); - viewdib_t &getFrontBuffer(); - viewdib_t &getGUIBuffer(); + Icondib &getIconBuffer(); + Viewdib &getBackBuffer(); + Viewdib &getBackBufferBackup(); + Viewdib &getFrontBuffer(); + Viewdib &getGUIBuffer(); protected: HugoEngine *_vm; @@ -108,37 +108,37 @@ protected: byte *_mainPalette; int16 _arrayFontSize[kNumFonts]; - viewdib_t _frontBuffer; + Viewdib _frontBuffer; - inline bool isInX(const int16 x, const rect_t *rect) const; - inline bool isInY(const int16 y, const rect_t *rect) const; - inline bool isOverlapping(const rect_t *rectA, const rect_t *rectB) const; + inline bool isInX(const int16 x, const Rect *rect) const; + inline bool isInY(const int16 y, const Rect *rect) const; + inline bool isOverlapping(const Rect *rectA, const Rect *rectB) const; - virtual overlayState_t findOvl(seq_t *seq_p, image_pt dst_p, uint16 y) = 0; + virtual OverlayState findOvl(Seq *seqPtr, ImagePtr dst_p, uint16 y) = 0; private: byte *_curPalette; byte _iconImage[kInvDx * kInvDy]; byte _paletteSize; - icondib_t _iconBuffer; // Inventory icon DIB + Icondib _iconBuffer; // Inventory icon DIB - int16 mergeLists(rect_t *list, rect_t *blist, const int16 len, int16 blen); + int16 mergeLists(Rect *list, Rect *blist, const int16 len, int16 blen); int16 center(const char *s) const; - viewdib_t _backBuffer; - viewdib_t _GUIBuffer; // User interface images - viewdib_t _backBufferBackup; // Backup _backBuffer during inventory + Viewdib _backBuffer; + Viewdib _GUIBuffer; // User interface images + Viewdib _backBufferBackup; // Backup _backBuffer during inventory // Formerly static variables used by displayList() int16 _dlAddIndex, _dlRestoreIndex; // Index into add/restore lists - rect_t _dlRestoreList[kRectListSize]; // The restore list - rect_t _dlAddList[kRectListSize]; // The add list - rect_t _dlBlistList[kBlitListSize]; // The blit list + Rect _dlRestoreList[kRectListSize]; // The restore list + Rect _dlAddList[kRectListSize]; // The add list + Rect _dlBlistList[kBlitListSize]; // The blit list // void createPal(); - void merge(const rect_t *rectA, rect_t *rectB); + void merge(const Rect *rectA, Rect *rectB); void writeChr(const int sx, const int sy, const byte color, const char *local_fontdata); }; @@ -150,7 +150,7 @@ public: void loadFont(int16 fontId); void loadFontArr(Common::ReadStream &in); protected: - overlayState_t findOvl(seq_t *seq_p, image_pt dst_p, uint16 y); + OverlayState findOvl(Seq *seqPtr, ImagePtr dst_p, uint16 y); }; class Screen_v1w : public Screen { @@ -161,7 +161,7 @@ public: void loadFont(int16 fontId); void loadFontArr(Common::ReadStream &in); protected: - overlayState_t findOvl(seq_t *seq_p, image_pt dst_p, uint16 y); + OverlayState findOvl(Seq *seqPtr, ImagePtr dst_p, uint16 y); }; } // End of namespace Hugo diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp index 219e29a25a..b78a26241b 100644 --- a/engines/hugo/file.cpp +++ b/engines/hugo/file.cpp @@ -91,8 +91,8 @@ const char *FileManager::getUifFilename() const { * Convert 4 planes (RGBI) data to 8-bit DIB format * Return original plane data ptr */ -byte *FileManager::convertPCC(byte *p, const uint16 y, const uint16 bpl, image_pt dataPtr) const { - debugC(2, kDebugFile, "convertPCC(byte *p, %d, %d, image_pt data_p)", y, bpl); +byte *FileManager::convertPCC(byte *p, const uint16 y, const uint16 bpl, ImagePtr dataPtr) const { + debugC(2, kDebugFile, "convertPCC(byte *p, %d, %d, ImagePtr data_p)", y, bpl); dataPtr += y * bpl * 8; // Point to correct DIB line for (int16 r = 0, g = bpl, b = g + bpl, i = b + bpl; r < bpl; r++, g++, b++, i++) { // Each byte in all planes @@ -107,11 +107,11 @@ byte *FileManager::convertPCC(byte *p, const uint16 y, const uint16 bpl, image_p } /** - * Read a pcx file of length len. Use supplied seq_p and image_p or - * allocate space if NULL. Name used for errors. Returns address of seq_p + * Read a pcx file of length len. Use supplied seqPtr and image_p or + * allocate space if NULL. Name used for errors. Returns address of seqPtr * Set first TRUE to initialize b_index (i.e. not reading a sequential image in file). */ -seq_t *FileManager::readPCX(Common::ReadStream &f, seq_t *seqPtr, byte *imagePtr, const bool firstFl, const char *name) { +Seq *FileManager::readPCX(Common::ReadStream &f, Seq *seqPtr, byte *imagePtr, const bool firstFl, const char *name) { debugC(1, kDebugFile, "readPCX(..., %s)", name); // Read in the PCC header and check consistency @@ -134,9 +134,9 @@ seq_t *FileManager::readPCX(Common::ReadStream &f, seq_t *seqPtr, byte *imagePtr if (_PCCHeader._mfctr != 10) error("Bad data file format: %s", name); - // Allocate memory for seq_t if 0 + // Allocate memory for Seq if 0 if (seqPtr == 0) { - if ((seqPtr = (seq_t *)malloc(sizeof(seq_t))) == 0) + if ((seqPtr = (Seq *)malloc(sizeof(Seq))) == 0) error("Insufficient memory to run game."); } @@ -182,8 +182,8 @@ seq_t *FileManager::readPCX(Common::ReadStream &f, seq_t *seqPtr, byte *imagePtr /** * Read object file of PCC images into object supplied */ -void FileManager::readImage(const int objNum, object_t *objPtr) { - debugC(1, kDebugFile, "readImage(%d, object_t *objPtr)", objNum); +void FileManager::readImage(const int objNum, Object *objPtr) { + debugC(1, kDebugFile, "readImage(%d, Object *objPtr)", objNum); /** * Structure of object file lookup entry @@ -215,7 +215,7 @@ void FileManager::readImage(const int objNum, object_t *objPtr) { } bool firstImgFl = true; // Initializes pcx read function - seq_t *seqPtr = 0; // Ptr to sequence structure + Seq *seqPtr = 0; // Ptr to sequence structure // Now read the images into an images list for (int j = 0; j < objPtr->_seqNumb; j++) { // for each sequence @@ -239,7 +239,7 @@ void FileManager::readImage(const int objNum, object_t *objPtr) { seqPtr->_y1 = seqPtr->_lines; seqPtr->_y2 = 0; - image_pt dibPtr = seqPtr->_imagePtr; + ImagePtr dibPtr = seqPtr->_imagePtr; for (int y = 0; y < seqPtr->_lines; y++, dibPtr += seqPtr->_bytesPerLine8 - x2) { for (int x = 0; x < x2; x++) { if (*dibPtr++) { // Some data found @@ -382,7 +382,7 @@ bool FileManager::saveGame(const int16 slot, const Common::String &descrip) { _vm->_object->saveObjects(out); - const status_t &gameStatus = _vm->getGameStatus(); + const Status &gameStatus = _vm->getGameStatus(); // Save whether hero image is swapped out->writeByte(_vm->_heroImage); @@ -486,7 +486,7 @@ bool FileManager::restoreGame(const int16 slot) { _vm->_object->swapImages(kHeroIndex, _vm->_heroImage); _vm->_heroImage = heroImg; - status_t &gameStatus = _vm->getGameStatus(); + Status &gameStatus = _vm->getGameStatus(); int score = in->readSint16BE(); _vm->setScore(score); @@ -514,7 +514,7 @@ bool FileManager::restoreGame(const int16 slot) { _vm->_maze._firstScreenIndex = in->readByte(); _vm->_scheduler->restoreScreen(*_vm->_screen_p); - if ((_vm->getGameStatus()._viewState = (vstate_t) in->readByte()) != kViewPlay) + if ((_vm->getGameStatus()._viewState = (Vstate) in->readByte()) != kViewPlay) _vm->_screen->hideCursor(); @@ -624,8 +624,8 @@ void FileManager::readBootFile() { * This file contains, between others, the bitmaps of the fonts used in the application * UIF means User interface database (Windows Only) */ -uif_hdr_t *FileManager::get_UIFHeader(const uif_t id) { - debugC(1, kDebugFile, "get_UIFHeader(%d)", id); +UifHdr *FileManager::getUIFHeader(const Uif id) { + debugC(1, kDebugFile, "getUIFHeader(%d)", id); // Initialize offset lookup if not read yet if (_firstUIFFl) { @@ -660,11 +660,11 @@ void FileManager::readUIFItem(const int16 id, byte *buf) { error("File not found: %s", getUifFilename()); // Seek to data - uif_hdr_t *_UIFHeaderPtr = get_UIFHeader((uif_t)id); + UifHdr *_UIFHeaderPtr = getUIFHeader((Uif)id); ip.seek(_UIFHeaderPtr->_offset, SEEK_SET); // We support pcx images and straight data - seq_t *dummySeq; // Dummy seq_t for image data + Seq *dummySeq; // Dummy Seq for image data switch (id) { case UIF_IMAGES: // Read uif images file dummySeq = readPCX(ip, 0, buf, true, getUifFilename()); diff --git a/engines/hugo/file.h b/engines/hugo/file.h index e7c467a315..151b749ce7 100644 --- a/engines/hugo/file.h +++ b/engines/hugo/file.h @@ -34,9 +34,9 @@ namespace Hugo { /** * Enumerate overlay file types */ -enum ovl_t {kOvlBoundary, kOvlOverlay, kOvlBase}; +enum OvlType {kOvlBoundary, kOvlOverlay, kOvlBase}; -struct uif_hdr_t { // UIF font/image look up +struct UifHdr { // UIF font/image look up uint16 _size; // Size of uif item uint32 _offset; // Offset of item in file }; @@ -50,7 +50,7 @@ public: sound_pt getSound(const int16 sound, uint16 *size); void readBootFile(); - void readImage(const int objNum, object_t *objPtr); + void readImage(const int objNum, Object *objPtr); void readUIFImages(); void readUIFItem(const int16 id, byte *buf); bool restoreGame(const int16 slot); @@ -69,7 +69,7 @@ public: virtual void instructions() const = 0; virtual void readBackground(const int screenIndex) = 0; - virtual void readOverlay(const int screenNum, image_pt image, ovl_t overlayType) = 0; + virtual void readOverlay(const int screenNum, ImagePtr image, OvlType overlayType) = 0; virtual const char *fetchString(const int index) = 0; @@ -84,7 +84,7 @@ protected: /** * Structure of scenery file lookup entry */ - struct sceneBlock_t { + struct SceneBlock { uint32 _sceneOffset; uint32 _sceneLength; uint32 _boundaryOffset; @@ -95,7 +95,7 @@ protected: uint32 _baseLength; }; - struct _PCCHeader_t { // Structure of PCX file header + struct PCCHeader { // Structure of PCX file header byte _mfctr, _vers, _enc, _bpx; uint16 _x1, _y1, _x2, _y2; // bounding box uint16 _xres, _yres; @@ -106,23 +106,23 @@ protected: }; // Header of a PCC file bool _firstUIFFl; - uif_hdr_t _UIFHeader[kMaxUifs]; // Lookup for uif fonts/images + UifHdr _UIFHeader[kMaxUifs]; // Lookup for uif fonts/images Common::File _stringArchive; // Handle for string file Common::File _sceneryArchive1; // Handle for scenery file Common::File _objectsArchive; // Handle for objects file - _PCCHeader_t _PCCHeader; + PCCHeader _PCCHeader; - seq_t *readPCX(Common::ReadStream &f, seq_t *seqPtr, byte *imagePtr, const bool firstFl, const char *name); + Seq *readPCX(Common::ReadStream &f, Seq *seqPtr, byte *imagePtr, const bool firstFl, const char *name); // If this is the first call, read the lookup table bool _hasReadHeader; - sound_hdr_t _s_hdr[kMaxSounds]; // Sound lookup table + SoundHdr _s_hdr[kMaxSounds]; // Sound lookup table private: - byte *convertPCC(byte *p, const uint16 y, const uint16 bpl, image_pt dataPtr) const; - uif_hdr_t *get_UIFHeader(const uif_t id); + byte *convertPCC(byte *p, const uint16 y, const uint16 bpl, ImagePtr dataPtr) const; + UifHdr *getUIFHeader(const Uif id); //Strangerke : Not used? void printBootText(); @@ -137,7 +137,7 @@ public: virtual void instructions() const; virtual void openDatabaseFiles(); virtual void readBackground(const int screenIndex); - virtual void readOverlay(const int screenNum, image_pt image, ovl_t overlayType); + virtual void readOverlay(const int screenNum, ImagePtr image, OvlType overlayType); virtual const char *fetchString(const int index); }; @@ -149,7 +149,7 @@ public: virtual void closeDatabaseFiles(); virtual void openDatabaseFiles(); virtual void readBackground(const int screenIndex); - virtual void readOverlay(const int screenNum, image_pt image, ovl_t overlayType); + virtual void readOverlay(const int screenNum, ImagePtr image, OvlType overlayType); const char *fetchString(const int index); private: char *_fetchStringBuf; @@ -163,7 +163,7 @@ public: void closeDatabaseFiles(); void openDatabaseFiles(); void readBackground(const int screenIndex); - void readOverlay(const int screenNum, image_pt image, ovl_t overlayType); + void readOverlay(const int screenNum, ImagePtr image, OvlType overlayType); private: Common::File _sceneryArchive2; // Handle for scenery file }; @@ -181,7 +181,7 @@ public: FileManager_v1w(HugoEngine *vm); ~FileManager_v1w(); - void readOverlay(const int screenNum, image_pt image, ovl_t overlayType); + void readOverlay(const int screenNum, ImagePtr image, OvlType overlayType); }; } // End of namespace Hugo diff --git a/engines/hugo/file_v1d.cpp b/engines/hugo/file_v1d.cpp index c3bb0e275f..e42223fb13 100644 --- a/engines/hugo/file_v1d.cpp +++ b/engines/hugo/file_v1d.cpp @@ -55,11 +55,11 @@ void FileManager_v1d::closeDatabaseFiles() { /** * Open and read in an overlay file, close file */ -void FileManager_v1d::readOverlay(const int screenNum, image_pt image, const ovl_t overlayType) { +void FileManager_v1d::readOverlay(const int screenNum, ImagePtr image, const OvlType overlayType) { debugC(1, kDebugFile, "readOverlay(%d, ...)", screenNum); - const char *ovl_ext[] = {".b", ".o", ".ob"}; - Common::String buf = Common::String(_vm->_text->getScreenNames(screenNum)) + Common::String(ovl_ext[overlayType]); + const char *ovlExt[] = {".b", ".o", ".ob"}; + Common::String buf = Common::String(_vm->_text->getScreenNames(screenNum)) + Common::String(ovlExt[overlayType]); if (!Common::File::exists(buf)) { memset(image, 0, kOvlSize); @@ -70,7 +70,7 @@ void FileManager_v1d::readOverlay(const int screenNum, image_pt image, const ovl if (!_sceneryArchive1.open(buf)) error("File not found: %s", buf.c_str()); - image_pt tmpImage = image; // temp ptr to overlay file + ImagePtr tmpImage = image; // temp ptr to overlay file _sceneryArchive1.read(tmpImage, kOvlSize); _sceneryArchive1.close(); @@ -87,7 +87,7 @@ void FileManager_v1d::readBackground(const int screenIndex) { if (!_sceneryArchive1.open(buf)) error("File not found: %s", buf.c_str()); // Read the image into dummy seq and static dib_a - seq_t *dummySeq; // Image sequence structure for Read_pcx + Seq *dummySeq; // Image sequence structure for Read_pcx dummySeq = readPCX(_sceneryArchive1, 0, _vm->_screen->getFrontBuffer(), true, _vm->_text->getScreenNames(screenIndex)); free(dummySeq); _sceneryArchive1.close(); diff --git a/engines/hugo/file_v1w.cpp b/engines/hugo/file_v1w.cpp index fba13d6915..002a1dc103 100644 --- a/engines/hugo/file_v1w.cpp +++ b/engines/hugo/file_v1w.cpp @@ -45,13 +45,13 @@ FileManager_v1w::~FileManager_v1w() { /** * Open and read in an overlay file, close file */ -void FileManager_v1w::readOverlay(const int screenNum, image_pt image, ovl_t overlayType) { +void FileManager_v1w::readOverlay(const int screenNum, ImagePtr image, OvlType overlayType) { debugC(1, kDebugFile, "readOverlay(%d, ...)", screenNum); - image_pt tmpImage = image; // temp ptr to overlay file - _sceneryArchive1.seek((uint32)screenNum * sizeof(sceneBlock_t), SEEK_SET); + ImagePtr tmpImage = image; // temp ptr to overlay file + _sceneryArchive1.seek((uint32)screenNum * sizeof(SceneBlock), SEEK_SET); - sceneBlock_t sceneBlock; // Database header entry + SceneBlock sceneBlock; // Database header entry sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE(); sceneBlock._sceneLength = _sceneryArchive1.readUint32LE(); sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE(); diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp index 7239e5174a..19c90980b0 100644 --- a/engines/hugo/file_v2d.cpp +++ b/engines/hugo/file_v2d.cpp @@ -78,9 +78,9 @@ void FileManager_v2d::closeDatabaseFiles() { void FileManager_v2d::readBackground(const int screenIndex) { debugC(1, kDebugFile, "readBackground(%d)", screenIndex); - _sceneryArchive1.seek((uint32) screenIndex * sizeof(sceneBlock_t), SEEK_SET); + _sceneryArchive1.seek((uint32) screenIndex * sizeof(SceneBlock), SEEK_SET); - sceneBlock_t sceneBlock; // Read a database header entry + SceneBlock sceneBlock; // Read a database header entry sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE(); sceneBlock._sceneLength = _sceneryArchive1.readUint32LE(); sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE(); @@ -93,7 +93,7 @@ void FileManager_v2d::readBackground(const int screenIndex) { _sceneryArchive1.seek(sceneBlock._sceneOffset, SEEK_SET); // Read the image into dummy seq and static dib_a - seq_t *dummySeq; // Image sequence structure for Read_pcx + Seq *dummySeq; // Image sequence structure for Read_pcx dummySeq = readPCX(_sceneryArchive1, 0, _vm->_screen->getFrontBuffer(), true, _vm->_text->getScreenNames(screenIndex)); free(dummySeq); } @@ -101,13 +101,13 @@ void FileManager_v2d::readBackground(const int screenIndex) { /** * Open and read in an overlay file, close file */ -void FileManager_v2d::readOverlay(const int screenNum, image_pt image, ovl_t overlayType) { +void FileManager_v2d::readOverlay(const int screenNum, ImagePtr image, OvlType overlayType) { debugC(1, kDebugFile, "readOverlay(%d, ...)", screenNum); - image_pt tmpImage = image; // temp ptr to overlay file - _sceneryArchive1.seek((uint32)screenNum * sizeof(sceneBlock_t), SEEK_SET); + ImagePtr tmpImage = image; // temp ptr to overlay file + _sceneryArchive1.seek((uint32)screenNum * sizeof(SceneBlock), SEEK_SET); - sceneBlock_t sceneBlock; // Database header entry + SceneBlock sceneBlock; // Database header entry sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE(); sceneBlock._sceneLength = _sceneryArchive1.readUint32LE(); sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE(); diff --git a/engines/hugo/file_v3d.cpp b/engines/hugo/file_v3d.cpp index 34c745efb6..5eb0cfc2c8 100644 --- a/engines/hugo/file_v3d.cpp +++ b/engines/hugo/file_v3d.cpp @@ -50,9 +50,9 @@ FileManager_v3d::~FileManager_v3d() { void FileManager_v3d::readBackground(const int screenIndex) { debugC(1, kDebugFile, "readBackground(%d)", screenIndex); - _sceneryArchive1.seek((uint32) screenIndex * sizeof(sceneBlock_t), SEEK_SET); + _sceneryArchive1.seek((uint32) screenIndex * sizeof(SceneBlock), SEEK_SET); - sceneBlock_t sceneBlock; // Read a database header entry + SceneBlock sceneBlock; // Read a database header entry sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE(); sceneBlock._sceneLength = _sceneryArchive1.readUint32LE(); sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE(); @@ -62,7 +62,7 @@ void FileManager_v3d::readBackground(const int screenIndex) { sceneBlock._baseOffset = _sceneryArchive1.readUint32LE(); sceneBlock._baseLength = _sceneryArchive1.readUint32LE(); - seq_t *dummySeq; // Image sequence structure for Read_pcx + Seq *dummySeq; // Image sequence structure for Read_pcx if (screenIndex < 20) { _sceneryArchive1.seek(sceneBlock._sceneOffset, SEEK_SET); // Read the image into dummy seq and static dib_a @@ -106,13 +106,13 @@ void FileManager_v3d::closeDatabaseFiles() { /** * Open and read in an overlay file, close file */ -void FileManager_v3d::readOverlay(const int screenNum, image_pt image, ovl_t overlayType) { +void FileManager_v3d::readOverlay(const int screenNum, ImagePtr image, OvlType overlayType) { debugC(1, kDebugFile, "readOverlay(%d, ...)", screenNum); - image_pt tmpImage = image; // temp ptr to overlay file - _sceneryArchive1.seek((uint32)screenNum * sizeof(sceneBlock_t), SEEK_SET); + ImagePtr tmpImage = image; // temp ptr to overlay file + _sceneryArchive1.seek((uint32)screenNum * sizeof(SceneBlock), SEEK_SET); - sceneBlock_t sceneBlock; // Database header entry + SceneBlock sceneBlock; // Database header entry sceneBlock._sceneOffset = _sceneryArchive1.readUint32LE(); sceneBlock._sceneLength = _sceneryArchive1.readUint32LE(); sceneBlock._boundaryOffset = _sceneryArchive1.readUint32LE(); diff --git a/engines/hugo/game.h b/engines/hugo/game.h index ab5e2dff56..29e3bf9b55 100644 --- a/engines/hugo/game.h +++ b/engines/hugo/game.h @@ -45,7 +45,7 @@ namespace Hugo { enum {LOOK_NAME = 1, TAKE_NAME}; // Index of name used in showing takeables and in confirming take // Definitions of 'generic' commands: Max # depends on size of gencmd in -// the object_t record since each requires 1 bit. Currently up to 16 +// the Object record since each requires 1 bit. Currently up to 16 enum {LOOK = 1, TAKE = 2, DROP = 4, LOOK_S = 8}; enum TEXTCOLORS { @@ -55,25 +55,25 @@ enum TEXTCOLORS { _TLIGHTRED, _TLIGHTMAGENTA, _TLIGHTYELLOW, _TBRIGHTWHITE }; -enum uif_t {U_FONT5, U_FONT6, U_FONT8, UIF_IMAGES, NUM_UIF_ITEMS}; +enum Uif {U_FONT5, U_FONT6, U_FONT8, UIF_IMAGES, NUM_UIF_ITEMS}; static const int kFirstFont = U_FONT5; /** * Enumerate ways of cycling a sequence of frames */ -enum cycle_t {kCycleInvisible, kCycleAlmostInvisible, kCycleNotCycling, kCycleForward, kCycleBackward}; +enum Cycle {kCycleInvisible, kCycleAlmostInvisible, kCycleNotCycling, kCycleForward, kCycleBackward}; /** * Enumerate sequence index matching direction of travel */ enum {SEQ_RIGHT, SEQ_LEFT, SEQ_DOWN, SEQ_UP}; -enum font_t {LARGE_ROMAN, MED_ROMAN, NUM_GDI_FONTS, INIT_FONTS, DEL_FONTS}; +enum Font {LARGE_ROMAN, MED_ROMAN, NUM_GDI_FONTS, INIT_FONTS, DEL_FONTS}; /** * Enumerate the different path types for an object */ -enum path_t { +enum Path { kPathUser, // User has control of object via cursor keys kPathAuto, // Computer has control, controlled by action lists kPathQuiet, // Computer has control and no commands allowed @@ -83,7 +83,7 @@ enum path_t { kPathWander2 // Same as WANDER, except keeps cycling when stationary }; -struct hugo_boot_t { // Common HUGO boot file +struct hugoBoot { // Common HUGO boot file char _checksum; // Checksum for boot structure (not exit text) char _registered; // TRUE if registered version, else FALSE char _pbswitch[8]; // Playback switch string @@ -94,13 +94,13 @@ struct hugo_boot_t { // Common HUGO boot file /** * Game specific type definitions */ -typedef byte *image_pt; // ptr to an object image (sprite) +typedef byte *ImagePtr; // ptr to an object image (sprite) typedef byte *sound_pt; // ptr to sound (or music) data /** * Structure for initializing maze processing */ -struct maze_t { +struct Maze { bool _enabledFl; // TRUE when maze processing enabled byte _size; // Size of (square) maze matrix int _x1, _y1, _x2, _y2; // maze hotspot bounding box @@ -112,24 +112,24 @@ struct maze_t { * The following is a linked list of images in an animation sequence * The image data is in 8-bit DIB format, i.e. 1 byte = 1 pixel */ -struct seq_t { // Linked list of images +struct Seq { // Linked list of images byte *_imagePtr; // ptr to image uint16 _bytesPerLine8; // bytes per line (8bits) uint16 _lines; // lines uint16 _x1, _x2, _y1, _y2; // Offsets from x,y: data bounding box - seq_t *_nextSeqPtr; // ptr to next record + Seq *_nextSeqPtr; // ptr to next record }; /** * The following is an array of structures of above sequences */ -struct seqList_t { +struct SeqList { uint16 _imageNbr; // Number of images in sequence - seq_t *_seqPtr; // Ptr to sequence structure + Seq *_seqPtr; // Ptr to sequence structure }; #include "common/pack-start.h" // START STRUCT PACKING -struct sound_hdr_t { // Sound file lookup entry +struct SoundHdr { // Sound file lookup entry uint16 _size; // Size of sound data in bytes uint32 _offset; // Offset of sound data in file } PACKED_STRUCT; @@ -140,17 +140,17 @@ static const int kMaxSeqNumb = 4; // Number of sequences of im /** * Following is definition of object attributes */ -struct object_t { +struct Object { uint16 _nounIndex; // String identifying object uint16 _dataIndex; // String describing the object - uint16 *_stateDataIndex; // Added by Strangerke to handle the LOOK_S state-dependant descriptions - path_t _pathType; // Describe path object follows + uint16 *_stateDataIndex; // Added by Strangerke to handle the LOOK_S state-dependant descriptions + Path _pathType; // Describe path object follows int _vxPath, _vyPath; // Delta velocities (e.g. for CHASE) uint16 _actIndex; // Action list to do on collision with hero byte _seqNumb; // Number of sequences in list - seq_t *_currImagePtr; // Sequence image currently in use - seqList_t _seqList[kMaxSeqNumb]; // Array of sequence structure ptrs and lengths - cycle_t _cycling; // Whether cycling, forward or backward + Seq *_currImagePtr; // Sequence image currently in use + SeqList _seqList[kMaxSeqNumb]; // Array of sequence structure ptrs and lengths + Cycle _cycling; // Whether cycling, forward or backward byte _cycleNumb; // No. of times to cycle byte _frameInterval; // Interval (in ticks) between frames byte _frameTimer; // Decrementing timer for above diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index 7462da0df8..5ae43b8b5a 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -106,7 +106,7 @@ GUI::Debugger *HugoEngine::getDebugger() { return _console; } -status_t &HugoEngine::getGameStatus() { +Status &HugoEngine::getGameStatus() { return _status; } @@ -323,7 +323,7 @@ void HugoEngine::initMachine() { * Hugo game state machine - called during onIdle */ void HugoEngine::runMachine() { - status_t &gameStatus = getGameStatus(); + Status &gameStatus = getGameStatus(); // Don't process if gameover if (gameStatus._gameOverFl) @@ -639,10 +639,10 @@ void HugoEngine::readScreenFiles(const int screenNum) { memcpy(_screen->getBackBuffer(), _screen->getFrontBuffer(), sizeof(_screen->getFrontBuffer())); // Make a copy // Workaround for graphic glitches in DOS versions. Cleaning the overlays fix the problem - memset(_object->_objBound, '\0', sizeof(overlay_t)); - memset(_object->_boundary, '\0', sizeof(overlay_t)); - memset(_object->_overlay, '\0', sizeof(overlay_t)); - memset(_object->_ovlBase, '\0', sizeof(overlay_t)); + memset(_object->_objBound, '\0', sizeof(Overlay)); + memset(_object->_boundary, '\0', sizeof(Overlay)); + memset(_object->_overlay, '\0', sizeof(Overlay)); + memset(_object->_ovlBase, '\0', sizeof(Overlay)); _file->readOverlay(screenNum, _object->_boundary, kOvlBoundary); // Boundary file _file->readOverlay(screenNum, _object->_overlay, kOvlOverlay); // Overlay file diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h index 68b771faa4..312f2272db 100644 --- a/engines/hugo/hugo.h +++ b/engines/hugo/hugo.h @@ -80,18 +80,18 @@ static const int kMaxPath = 256; // Max length of a full path static const int kHeroMaxWidth = 24; // Maximum width of hero static const int kHeroMinWidth = 16; // Minimum width of hero -typedef char command_t[kMaxLineSize + 8]; // Command line (+spare for prompt,cursor) +typedef char Command[kMaxLineSize + 8]; // Command line (+spare for prompt,cursor) -struct config_t { // User's config (saved) - bool _musicFl; // State of Music button/menu item - bool _soundFl; // State of Sound button/menu item - bool _turboFl; // State of Turbo button/menu item - bool _playlist[kMaxTunes]; // Tune playlist +struct Config { // User's config (saved) + bool _musicFl; // State of Music button/menu item + bool _soundFl; // State of Sound button/menu item + bool _turboFl; // State of Turbo button/menu item + bool _playlist[kMaxTunes]; // Tune playlist }; -typedef byte icondib_t[kXPix * kInvDy]; // Icon bar dib -typedef byte viewdib_t[(long)kXPix * kYPix]; // Viewport dib -typedef byte overlay_t[kOvlSize]; // Overlay file +typedef byte Icondib[kXPix * kInvDy]; // Icon bar dib +typedef byte Viewdib[(long)kXPix * kYPix]; // Viewport dib +typedef byte Overlay[kOvlSize]; // Overlay file enum GameType { kGameTypeNone = 0, @@ -131,12 +131,12 @@ enum HugoRegistered { /** * Inventory icon bar states */ -enum istate_t {kInventoryOff, kInventoryUp, kInventoryDown, kInventoryActive}; +enum Istate {kInventoryOff, kInventoryUp, kInventoryDown, kInventoryActive}; /** * Game view state machine */ -enum vstate_t {kViewIdle, kViewIntroInit, kViewIntro, kViewPlay, kViewInvent, kViewExit}; +enum Vstate {kViewIdle, kViewIntroInit, kViewIntro, kViewPlay, kViewInvent, kViewExit}; /** * Enumerate whether object is foreground, background or 'floating' @@ -152,12 +152,12 @@ enum {kPriorityForeground, kPriorityBackground, kPriorityFloating, kPriorityOver /** * Display list functions */ -enum dupdate_t {kDisplayInit, kDisplayAdd, kDisplayDisplay, kDisplayRestore}; +enum Dupdate {kDisplayInit, kDisplayAdd, kDisplayDisplay, kDisplayRestore}; /** * Priority for sound effect */ -enum priority_t {kSoundPriorityLow, kSoundPriorityMedium, kSoundPriorityHigh}; +enum Priority {kSoundPriorityLow, kSoundPriorityMedium, kSoundPriorityHigh}; enum HugoGameFeatures { GF_PACKED = (1 << 0) // Database @@ -170,27 +170,27 @@ enum seqTextEngine { struct HugoGameDescription; -struct status_t { // Game status (not saved) - bool _storyModeFl; // Game is telling story - no commands - bool _gameOverFl; // Game is over - hero knobbled - bool _lookFl; // Toolbar "look" button pressed - bool _recallFl; // Toolbar "recall" button pressed - bool _newScreenFl; // New screen just loaded in dib_a - bool _godModeFl; // Allow DEBUG features in live version - bool _showBoundariesFl; // Flag used to show and hide boundaries, +struct Status { // Game status (not saved) + bool _storyModeFl; // Game is telling story - no commands + bool _gameOverFl; // Game is over - hero knobbled + bool _lookFl; // Toolbar "look" button pressed + bool _recallFl; // Toolbar "recall" button pressed + bool _newScreenFl; // New screen just loaded in dib_a + bool _godModeFl; // Allow DEBUG features in live version + bool _showBoundariesFl; // Flag used to show and hide boundaries, // used by the console bool _doQuitFl; bool _skipIntroFl; bool _helpFl; - uint32 _tick; // Current time in ticks - vstate_t _viewState; // View state machine - int16 _song; // Current song + uint32 _tick; // Current time in ticks + Vstate _viewState; // View state machine + int16 _song; // Current song }; /** * Structure to define an EXIT or other collision-activated hotspot */ -struct hotspot_t { +struct Hotspot { int _screenIndex; // Screen in which hotspot appears int _x1, _y1, _x2, _y2; // Bounding box of hotspot uint16 _actIndex; // Actions to carry out if a 'hit' @@ -225,19 +225,19 @@ public: uint16 _numStates; int8 _normalTPS; // Number of ticks (frames) per second. // 8 for Win versions, 9 for DOS versions - object_t *_hero; + Object *_hero; byte *_screen_p; byte _heroImage; byte *_screenStates; - command_t _line; // Line of user text input - config_t _config; // User's config + Command _line; // Line of user text input + Config _config; // User's config int16 *_defltTunes; uint16 _look; uint16 _take; uint16 _drop; - maze_t _maze; // Maze control structure - hugo_boot_t _boot; // Boot info structure + Maze _maze; // Maze control structure + hugoBoot _boot; // Boot info structure GUI::Debugger *getDebugger(); @@ -246,8 +246,8 @@ public: const char *_episode; Common::String _picDir; - command_t _statusLine; - command_t _scoreLine; + Command _statusLine; + Command _scoreLine; const HugoGameDescription *_gameDescription; uint32 getFeatures() const; @@ -279,7 +279,7 @@ public: void shutdown(); void syncSoundSettings(); - status_t &getGameStatus(); + Status &getGameStatus(); int getScore() const; void setScore(const int newScore); void adjustScore(const int adjustment); @@ -314,7 +314,7 @@ protected: private: static const int kTurboTps = 16; // This many in turbo mode - status_t _status; // Game status structure + Status _status; // Game status structure uint32 _lastTime; uint32 _curTime; diff --git a/engines/hugo/inventory.cpp b/engines/hugo/inventory.cpp index 151fe0ee13..c2495beadb 100644 --- a/engines/hugo/inventory.cpp +++ b/engines/hugo/inventory.cpp @@ -56,7 +56,7 @@ void InventoryHandler::setInventoryObjId(int16 objId) { _inventoryObjId = objId; } -void InventoryHandler::setInventoryState(istate_t state) { +void InventoryHandler::setInventoryState(Istate state) { _inventoryState = state; } @@ -68,7 +68,7 @@ int16 InventoryHandler::getInventoryObjId() const { return _inventoryObjId; } -istate_t InventoryHandler::getInventoryState() const { +Istate InventoryHandler::getInventoryState() const { return _inventoryState; } @@ -137,8 +137,8 @@ void InventoryHandler::constructInventory(const int16 imageTotNumb, int displayN * Process required action for inventory * Returns objId under cursor (or -1) for INV_GET */ -int16 InventoryHandler::processInventory(const invact_t action, ...) { - debugC(1, kDebugInventory, "processInventory(invact_t action, ...)"); +int16 InventoryHandler::processInventory(const InvAct action, ...) { + debugC(1, kDebugInventory, "processInventory(InvAct action, ...)"); int16 imageNumb; // Total number of inventory items int displayNumb; // Total number displayed/carried @@ -208,7 +208,7 @@ int16 InventoryHandler::processInventory(const invact_t action, ...) { * Process inventory state machine */ void InventoryHandler::runInventory() { - status_t &gameStatus = _vm->getGameStatus(); + Status &gameStatus = _vm->getGameStatus(); debugC(1, kDebugInventory, "runInventory"); diff --git a/engines/hugo/inventory.h b/engines/hugo/inventory.h index 666cc37b51..5b55c3ec94 100644 --- a/engines/hugo/inventory.h +++ b/engines/hugo/inventory.h @@ -34,22 +34,22 @@ namespace Hugo { /** * Actions for Process_inventory() */ -enum invact_t {kInventoryActionInit, kInventoryActionLeft, kInventoryActionRight, kInventoryActionGet}; +enum InvAct {kInventoryActionInit, kInventoryActionLeft, kInventoryActionRight, kInventoryActionGet}; class InventoryHandler { public: InventoryHandler(HugoEngine *vm); void setInventoryObjId(int16 objId); - void setInventoryState(istate_t state); + void setInventoryState(Istate state); void freeInvent(); int16 getInventoryObjId() const; - istate_t getInventoryState() const; + Istate getInventoryState() const; int16 findIconId(int16 objId); void loadInvent(Common::SeekableReadStream &in); - int16 processInventory(const invact_t action, ...); + int16 processInventory(const InvAct action, ...); void runInventory(); private: @@ -59,7 +59,7 @@ private: int16 _firstIconId; // Index of first icon to display int16 *_invent; - istate_t _inventoryState; // Inventory icon bar state + Istate _inventoryState; // Inventory icon bar state int16 _inventoryHeight; // Inventory icon bar height int16 _inventoryObjId; // Inventory object selected, or -1 byte _maxInvent; diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp index 864934a0d3..fef3cca608 100644 --- a/engines/hugo/mouse.cpp +++ b/engines/hugo/mouse.cpp @@ -108,7 +108,7 @@ int16 MouseHandler::getHotspotActIndex(const int16 hotspotId) const { /** * Shadow-blit supplied string into dib_a at cx,cy and add to display list */ -void MouseHandler::cursorText(const char *buffer, const int16 cx, const int16 cy, const uif_t fontId, const int16 color) { +void MouseHandler::cursorText(const char *buffer, const int16 cx, const int16 cy, const Uif fontId, const int16 color) { debugC(1, kDebugMouse, "cursorText(%s, %d, %d, %d, %d)", buffer, cx, cy, fontId, color); _vm->_screen->loadFont(fontId); @@ -152,7 +152,7 @@ int16 MouseHandler::findExit(const int16 cx, const int16 cy, byte screenId) { void MouseHandler::processRightClick(const int16 objId, const int16 cx, const int16 cy) { debugC(1, kDebugMouse, "ProcessRightClick(%d, %d, %d)", objId, cx, cy); - status_t &gameStatus = _vm->getGameStatus(); + Status &gameStatus = _vm->getGameStatus(); if (gameStatus._storyModeFl || _vm->_hero->_pathType == kPathQuiet) // Make sure user has control return; @@ -168,7 +168,7 @@ void MouseHandler::processRightClick(const int16 objId, const int16 cx, const in else _vm->_object->useObject(objId); // Use status.objid on object } else { // Clicked over viewport object - object_t *obj = &_vm->_object->_objects[objId]; + Object *obj = &_vm->_object->_objects[objId]; int16 x, y; switch (obj->_viewx) { // Where to walk to case -1: // Walk to object position @@ -203,9 +203,9 @@ void MouseHandler::processLeftClick(const int16 objId, const int16 cx, const int debugC(1, kDebugMouse, "ProcessLeftClick(%d, %d, %d)", objId, cx, cy); int16 i, x, y; - object_t *obj; + Object *obj; - status_t &gameStatus = _vm->getGameStatus(); + Status &gameStatus = _vm->getGameStatus(); if (gameStatus._storyModeFl || _vm->_hero->_pathType == kPathQuiet) // Make sure user has control return; @@ -284,8 +284,8 @@ void MouseHandler::processLeftClick(const int16 objId, const int16 cx, const int void MouseHandler::mouseHandler() { debugC(2, kDebugMouse, "mouseHandler"); - status_t &gameStatus = _vm->getGameStatus(); - istate_t inventState = _vm->_inventory->getInventoryState(); + Status &gameStatus = _vm->getGameStatus(); + Istate inventState = _vm->_inventory->getInventoryState(); if ((gameStatus._viewState != kViewPlay) && (inventState != kInventoryActive)) return; @@ -343,7 +343,7 @@ void MouseHandler::mouseHandler() { resetRightButton(); } -void MouseHandler::readHotspot(Common::ReadStream &in, hotspot_t &hotspot) { +void MouseHandler::readHotspot(Common::ReadStream &in, Hotspot &hotspot) { hotspot._screenIndex = in.readSint16BE(); hotspot._x1 = in.readSint16BE(); hotspot._y1 = in.readSint16BE(); @@ -359,13 +359,13 @@ void MouseHandler::readHotspot(Common::ReadStream &in, hotspot_t &hotspot) { * Load hotspots data from hugo.dat */ void MouseHandler::loadHotspots(Common::ReadStream &in) { - hotspot_t *wrkHotspots = 0; - hotspot_t tmp; + Hotspot *wrkHotspots = 0; + Hotspot tmp; memset(&tmp, 0, sizeof(tmp)); for (int varnt = 0; varnt < _vm->_numVariant; varnt++) { int numRows = in.readUint16BE(); if (varnt == _vm->_gameVariant) - _hotspots = wrkHotspots = (hotspot_t *)malloc(sizeof(hotspot_t) * numRows); + _hotspots = wrkHotspots = (Hotspot *)malloc(sizeof(Hotspot) * numRows); for (int i = 0; i < numRows; i++) readHotspot(in, (varnt == _vm->_gameVariant) ? wrkHotspots[i] : tmp); @@ -377,7 +377,7 @@ void MouseHandler::loadHotspots(Common::ReadStream &in) { */ void MouseHandler::drawHotspots() const { for (int i = 0; _hotspots[i]._screenIndex >= 0; i++) { - hotspot_t *hotspot = &_hotspots[i]; + Hotspot *hotspot = &_hotspots[i]; if (hotspot->_screenIndex == _vm->_hero->_screenIndex) _vm->_screen->drawRectangle(false, hotspot->_x1, hotspot->_y1, hotspot->_x2, hotspot->_y2, _TLIGHTRED); } diff --git a/engines/hugo/mouse.h b/engines/hugo/mouse.h index 35f9e4e87e..e20716f72c 100644 --- a/engines/hugo/mouse.h +++ b/engines/hugo/mouse.h @@ -70,17 +70,17 @@ private: kMsExit = 1 }; - hotspot_t *_hotspots; + Hotspot *_hotspots; bool _leftButtonFl; // Left mouse button pressed bool _rightButtonFl; // Right button pressed int _mouseX; int _mouseY; bool _jumpExitFl; // Allowed to jump to a screen exit - void cursorText(const char *buffer, const int16 cx, const int16 cy, const uif_t fontId, const int16 color); + void cursorText(const char *buffer, const int16 cx, const int16 cy, const Uif fontId, const int16 color); void processRightClick(const int16 objId, const int16 cx, const int16 cy); void processLeftClick(const int16 objId, const int16 cx, const int16 cy); - void readHotspot(Common::ReadStream &in, hotspot_t &hotspot); + void readHotspot(Common::ReadStream &in, Hotspot &hotspot); }; } // End of namespace Hugo diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp index 92a04227d6..e0dd0abd49 100644 --- a/engines/hugo/object.cpp +++ b/engines/hugo/object.cpp @@ -48,10 +48,10 @@ ObjectHandler::ObjectHandler(HugoEngine *vm) : _vm(vm), _objects(0), _uses(0) { _numObj = 0; _objCount = 0; _usesSize = 0; - memset(_objBound, '\0', sizeof(overlay_t)); - memset(_boundary, '\0', sizeof(overlay_t)); - memset(_overlay, '\0', sizeof(overlay_t)); - memset(_ovlBase, '\0', sizeof(overlay_t)); + memset(_objBound, '\0', sizeof(Overlay)); + memset(_boundary, '\0', sizeof(Overlay)); + memset(_overlay, '\0', sizeof(Overlay)); + memset(_ovlBase, '\0', sizeof(Overlay)); } ObjectHandler::~ObjectHandler() { @@ -86,7 +86,7 @@ void ObjectHandler::setVelocity(int objIndex, int8 vx, int8 vy) { _objects[objIndex]._vy = vy; } -void ObjectHandler::setPath(int objIndex, path_t pathType, int16 vxPath, int16 vyPath) { +void ObjectHandler::setPath(int objIndex, Path pathType, int16 vxPath, int16 vyPath) { _objects[objIndex]._pathType = pathType; _objects[objIndex]._vxPath = vxPath; _objects[objIndex]._vyPath = vyPath; @@ -95,12 +95,12 @@ void ObjectHandler::setPath(int objIndex, path_t pathType, int16 vxPath, int16 v /** * Save sequence number and image number in given object */ -void ObjectHandler::saveSeq(object_t *obj) { +void ObjectHandler::saveSeq(Object *obj) { debugC(1, kDebugObject, "saveSeq"); bool found = false; for (int i = 0; !found && (i < obj->_seqNumb); i++) { - seq_t *q = obj->_seqList[i]._seqPtr; + Seq *q = obj->_seqList[i]._seqPtr; for (int j = 0; !found && (j < obj->_seqList[i]._imageNbr); j++) { if (obj->_currImagePtr == q) { found = true; @@ -114,12 +114,12 @@ void ObjectHandler::saveSeq(object_t *obj) { } /** - * Set up cur_seq_p from stored sequence and image number in object + * Set up cur_seqPtr from stored sequence and image number in object */ -void ObjectHandler::restoreSeq(object_t *obj) { +void ObjectHandler::restoreSeq(Object *obj) { debugC(1, kDebugObject, "restoreSeq"); - seq_t *q = obj->_seqList[obj->_curSeqNum]._seqPtr; + Seq *q = obj->_seqList[obj->_curSeqNum]._seqPtr; for (int j = 0; j < obj->_curImageNum; j++) q = q->_nextSeqPtr; obj->_currImagePtr = q; @@ -134,7 +134,7 @@ void ObjectHandler::useObject(int16 objId) { const char *verb; // Background verb to use directly int16 inventObjId = _vm->_inventory->getInventoryObjId(); - object_t *obj = &_objects[objId]; // Ptr to object + Object *obj = &_objects[objId]; // Ptr to object if (inventObjId == -1) { // Get or use objid directly if ((obj->_genericCmd & TAKE) || obj->_objValue) // Get collectible item @@ -153,12 +153,12 @@ void ObjectHandler::useObject(int16 objId) { _vm->_text->getNoun(obj->_nounIndex, 0)); // Check valid use of objects and override verb if necessary - for (uses_t *use = _uses; use->_objId != _numObj; use++) { + for (Uses *use = _uses; use->_objId != _numObj; use++) { if (inventObjId == use->_objId) { // Look for secondary object, if found use matching verb bool foundFl = false; - for (target_t *target = use->_targets; target->_nounIndex != 0; target++) + for (Target *target = use->_targets; target->_nounIndex != 0; target++) if (target->_nounIndex == obj->_nounIndex) { foundFl = true; sprintf(_vm->_line, "%s %s %s", _vm->_text->getVerb(target->_verbIndex, 0), @@ -195,12 +195,12 @@ int16 ObjectHandler::findObject(uint16 x, uint16 y) { int16 objIndex = -1; // Index of found object uint16 y2Max = 0; // Greatest y2 - object_t *obj = _objects; + Object *obj = _objects; // Check objects on screen for (int i = 0; i < _numObj; i++, obj++) { // Object must be in current screen and "useful" if (obj->_screenIndex == *_vm->_screen_p && (obj->_genericCmd || obj->_objValue || obj->_cmdIndex)) { - seq_t *curImage = obj->_currImagePtr; + Seq *curImage = obj->_currImagePtr; // Object must have a visible image... if (curImage != 0 && obj->_cycling != kCycleInvisible) { // If cursor inside object @@ -233,7 +233,7 @@ int16 ObjectHandler::findObject(uint16 x, uint16 y) { * Issue "Look at " command * Note special case of swapped hero image */ -void ObjectHandler::lookObject(object_t *obj) { +void ObjectHandler::lookObject(Object *obj) { debugC(1, kDebugObject, "lookObject"); if (obj == _vm->_hero) @@ -252,10 +252,10 @@ void ObjectHandler::freeObjects() { if (_vm->_hero != 0 && _vm->_hero->_seqList[0]._seqPtr != 0) { // Free all sequence lists and image data for (int16 i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; + Object *obj = &_objects[i]; for (int16 j = 0; j < obj->_seqNumb; j++) { - seq_t *seq = obj->_seqList[j]._seqPtr; - seq_t *next; + Seq *seq = obj->_seqList[j]._seqPtr; + Seq *next; if (seq == 0) // Failure during database load break; if (seq->_imagePtr != 0) { @@ -300,8 +300,8 @@ void ObjectHandler::freeObjects() { int ObjectHandler::y2comp(const void *a, const void *b) { debugC(6, kDebugObject, "y2comp"); - const object_t *p1 = &HugoEngine::get()._object->_objects[*(const byte *)a]; - const object_t *p2 = &HugoEngine::get()._object->_objects[*(const byte *)b]; + const Object *p1 = &HugoEngine::get()._object->_objects[*(const byte *)a]; + const Object *p2 = &HugoEngine::get()._object->_objects[*(const byte *)b]; if (p1 == p2) // Why does qsort try the same indexes? @@ -345,7 +345,7 @@ void ObjectHandler::showTakeables() { debugC(1, kDebugObject, "showTakeables"); for (int j = 0; j < _numObj; j++) { - object_t *obj = &_objects[j]; + Object *obj = &_objects[j]; if ((obj->_cycling != kCycleInvisible) && (obj->_screenIndex == *_vm->_screen_p) && (((TAKE & obj->_genericCmd) == TAKE) || obj->_objValue)) { @@ -357,10 +357,10 @@ void ObjectHandler::showTakeables() { /** * Find a clear space around supplied object that hero can walk to */ -bool ObjectHandler::findObjectSpace(object_t *obj, int16 *destx, int16 *desty) { +bool ObjectHandler::findObjectSpace(Object *obj, int16 *destx, int16 *desty) { debugC(1, kDebugObject, "findObjectSpace(obj, %d, %d)", *destx, *desty); - seq_t *curImage = obj->_currImagePtr; + Seq *curImage = obj->_currImagePtr; int16 y = obj->_y + curImage->_y2 - 1; bool foundFl = true; @@ -399,11 +399,11 @@ bool ObjectHandler::findObjectSpace(object_t *obj, int16 *destx, int16 *desty) { return foundFl; } -void ObjectHandler::readUse(Common::ReadStream &in, uses_t &curUse) { +void ObjectHandler::readUse(Common::ReadStream &in, Uses &curUse) { curUse._objId = in.readSint16BE(); curUse._dataIndex = in.readUint16BE(); uint16 numSubElem = in.readUint16BE(); - curUse._targets = (target_t *)malloc(sizeof(target_t) * numSubElem); + curUse._targets = (Target *)malloc(sizeof(Target) * numSubElem); for (int j = 0; j < numSubElem; j++) { curUse._targets[j]._nounIndex = in.readUint16BE(); curUse._targets[j]._verbIndex = in.readUint16BE(); @@ -413,7 +413,7 @@ void ObjectHandler::readUse(Common::ReadStream &in, uses_t &curUse) { * Load _uses from Hugo.dat */ void ObjectHandler::loadObjectUses(Common::ReadStream &in) { - uses_t tmpUse; + Uses tmpUse; tmpUse._targets = 0; //Read _uses @@ -421,7 +421,7 @@ void ObjectHandler::loadObjectUses(Common::ReadStream &in) { uint16 numElem = in.readUint16BE(); if (varnt == _vm->_gameVariant) { _usesSize = numElem; - _uses = (uses_t *)malloc(sizeof(uses_t) * numElem); + _uses = (Uses *)malloc(sizeof(Uses) * numElem); } for (int i = 0; i < numElem; i++) { @@ -436,7 +436,7 @@ void ObjectHandler::loadObjectUses(Common::ReadStream &in) { } } -void ObjectHandler::readObject(Common::ReadStream &in, object_t &curObject) { +void ObjectHandler::readObject(Common::ReadStream &in, Object &curObject) { curObject._nounIndex = in.readUint16BE(); curObject._dataIndex = in.readUint16BE(); uint16 numSubElem = in.readUint16BE(); @@ -448,7 +448,7 @@ void ObjectHandler::readObject(Common::ReadStream &in, object_t &curObject) { for (int j = 0; j < numSubElem; j++) curObject._stateDataIndex[j] = in.readUint16BE(); - curObject._pathType = (path_t) in.readSint16BE(); + curObject._pathType = (Path) in.readSint16BE(); curObject._vxPath = in.readSint16BE(); curObject._vyPath = in.readSint16BE(); curObject._actIndex = in.readUint16BE(); @@ -465,7 +465,7 @@ void ObjectHandler::readObject(Common::ReadStream &in, object_t &curObject) { curObject._seqList[j]._seqPtr = 0; } - curObject._cycling = (cycle_t)in.readByte(); + curObject._cycling = (Cycle)in.readByte(); curObject._cycleNumb = in.readByte(); curObject._frameInterval = in.readByte(); curObject._frameTimer = in.readByte(); @@ -497,7 +497,7 @@ void ObjectHandler::readObject(Common::ReadStream &in, object_t &curObject) { */ void ObjectHandler::loadObjectArr(Common::ReadStream &in) { debugC(6, kDebugObject, "loadObject(&in)"); - object_t tmpObject; + Object tmpObject; tmpObject._stateDataIndex = 0; for (int varnt = 0; varnt < _vm->_numVariant; varnt++) { @@ -505,7 +505,7 @@ void ObjectHandler::loadObjectArr(Common::ReadStream &in) { if (varnt == _vm->_gameVariant) { _objCount = numElem; - _objects = (object_t *)malloc(sizeof(object_t) * numElem); + _objects = (Object *)malloc(sizeof(Object) * numElem); } for (int i = 0; i < numElem; i++) { @@ -559,7 +559,7 @@ void ObjectHandler::restoreAllSeq() { */ void ObjectHandler::saveObjects(Common::WriteStream *out) { for (int i = 0; i < _numObj; i++) { - // Save where curr_seq_p is pointing to + // Save where curr_seqPtr is pointing to saveSeq(&_objects[i]); out->writeByte(_objects[i]._pathType); @@ -594,10 +594,10 @@ void ObjectHandler::saveObjects(Common::WriteStream *out) { */ void ObjectHandler::restoreObjects(Common::SeekableReadStream *in) { for (int i = 0; i < _numObj; i++) { - _objects[i]._pathType = (path_t) in->readByte(); + _objects[i]._pathType = (Path) in->readByte(); _objects[i]._vxPath = in->readSint16BE(); _objects[i]._vyPath = in->readSint16BE(); - _objects[i]._cycling = (cycle_t) in->readByte(); + _objects[i]._cycling = (Cycle) in->readByte(); _objects[i]._cycleNumb = in->readByte(); _objects[i]._frameTimer = in->readByte(); _objects[i]._screenIndex = in->readByte(); @@ -782,7 +782,7 @@ void ObjectHandler::clearScreenBoundary(const int x1, const int x2, const int y) /** * An object has collided with a boundary. See if any actions are required */ -void ObjectHandler::boundaryCollision(object_t *obj) { +void ObjectHandler::boundaryCollision(Object *obj) { debugC(1, kDebugEngine, "boundaryCollision"); if (obj == _vm->_hero) { diff --git a/engines/hugo/object.h b/engines/hugo/object.h index 8f8043dbbc..fd0d731a98 100644 --- a/engines/hugo/object.h +++ b/engines/hugo/object.h @@ -34,15 +34,15 @@ namespace Hugo { -struct target_t { // Secondary target for action +struct Target { // Secondary target for action uint16 _nounIndex; // Secondary object uint16 _verbIndex; // Action on secondary object }; -struct uses_t { // Define uses of certain objects +struct Uses { // Define uses of certain objects int16 _objId; // Primary object uint16 _dataIndex; // String if no secondary object matches - target_t *_targets; // List of secondary targets + Target *_targets; // List of secondary targets }; class ObjectHandler { @@ -50,12 +50,12 @@ public: ObjectHandler(HugoEngine *vm); virtual ~ObjectHandler(); - overlay_t _objBound; - overlay_t _boundary; // Boundary overlay file - overlay_t _overlay; // First overlay file - overlay_t _ovlBase; // First overlay base file + Overlay _objBound; + Overlay _boundary; // Boundary overlay file + Overlay _overlay; // First overlay file + Overlay _ovlBase; // First overlay base file - object_t *_objects; + Object *_objects; uint16 _numObj; byte getBoundaryOverlay(uint16 index) const; @@ -65,7 +65,7 @@ public: int deltaX(const int x1, const int x2, const int vx, int y) const; int deltaY(const int x1, const int x2, const int vy, const int y) const; - void boundaryCollision(object_t *obj); + void boundaryCollision(Object *obj); void clearBoundary(const int x1, const int x2, const int y); void clearScreenBoundary(const int x1, const int x2, const int y); void storeBoundary(const int x1, const int x2, const int y); @@ -76,7 +76,7 @@ public: virtual void swapImages(int objIndex1, int objIndex2) = 0; bool isCarrying(uint16 wordIndex); - bool findObjectSpace(object_t *obj, int16 *destx, int16 *desty); + bool findObjectSpace(Object *obj, int16 *destx, int16 *desty); int calcMaxScore(); int16 findObject(uint16 x, uint16 y); @@ -84,14 +84,14 @@ public: void loadObjectArr(Common::ReadStream &in); void loadObjectUses(Common::ReadStream &in); void loadNumObj(Common::ReadStream &in); - void lookObject(object_t *obj); + void lookObject(Object *obj); void readObjectImages(); - void readObject(Common::ReadStream &in, object_t &curObject); - void readUse(Common::ReadStream &in, uses_t &curUse); + void readObject(Common::ReadStream &in, Object &curObject); + void readUse(Common::ReadStream &in, Uses &curUse); void restoreAllSeq(); void restoreObjects(Common::SeekableReadStream *in); void saveObjects(Common::WriteStream *out); - void saveSeq(object_t *obj); + void saveSeq(Object *obj); void setCarriedScreen(int screenNum); void showTakeables(); void useObject(int16 objId); @@ -101,7 +101,7 @@ public: bool isCarried(int objIndex) const; void setCarry(int objIndex, bool val); void setVelocity(int objIndex, int8 vx, int8 vy); - void setPath(int objIndex, path_t pathType, int16 vxPath, int16 vyPath); + void setPath(int objIndex, Path pathType, int16 vxPath, int16 vyPath); protected: HugoEngine *_vm; @@ -110,11 +110,11 @@ protected: static const int kEdge2 = kEdge * 2; // Push object further back on edge collision static const int kMaxObjNumb = 128; // Used in Update_images() - uint16 _objCount; - uses_t *_uses; - uint16 _usesSize; + uint16 _objCount; + Uses *_uses; + uint16 _usesSize; - void restoreSeq(object_t *obj); + void restoreSeq(Object *obj); inline bool checkBoundary(int16 x, int16 y); template diff --git a/engines/hugo/object_v1d.cpp b/engines/hugo/object_v1d.cpp index 7b8f90e189..e5fedb3b2a 100644 --- a/engines/hugo/object_v1d.cpp +++ b/engines/hugo/object_v1d.cpp @@ -59,21 +59,21 @@ void ObjectHandler_v1d::updateImages() { debugC(5, kDebugObject, "updateImages"); // Initialize the index array to visible objects in current screen - int num_objs = 0; + int objNumb = 0; byte objindex[kMaxObjNumb]; // Array of indeces to objects for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; + Object *obj = &_objects[i]; if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling >= kCycleAlmostInvisible)) - objindex[num_objs++] = i; + objindex[objNumb++] = i; } // Sort the objects into increasing y+y2 (painter's algorithm) - qsort(objindex, num_objs, sizeof(objindex[0]), y2comp); + qsort(objindex, objNumb, sizeof(objindex[0]), y2comp); // Add each visible object to display list - for (int i = 0; i < num_objs; i++) { - object_t *obj = &_objects[objindex[i]]; + for (int i = 0; i < objNumb; i++) { + Object *obj = &_objects[objindex[i]]; // Count down inter-frame timer if (obj->_frameTimer) obj->_frameTimer--; @@ -90,7 +90,7 @@ void ObjectHandler_v1d::updateImages() { _vm->_screen->displayFrame(obj->_x, obj->_y, obj->_currImagePtr->_nextSeqPtr, false); break; case kCycleBackward: { - seq_t *seqPtr = obj->_currImagePtr; + Seq *seqPtr = obj->_currImagePtr; if (!obj->_frameTimer) { // Show next frame while (seqPtr->_nextSeqPtr != obj->_currImagePtr) seqPtr = seqPtr->_nextSeqPtr; @@ -107,8 +107,8 @@ void ObjectHandler_v1d::updateImages() { _vm->_scheduler->waitForRefresh(); // Cycle any animating objects - for (int i = 0; i < num_objs; i++) { - object_t *obj = &_objects[objindex[i]]; + for (int i = 0; i < objNumb; i++) { + Object *obj = &_objects[objindex[i]]; if (obj->_cycling != kCycleInvisible) { // Only if it's visible if (obj->_cycling == kCycleAlmostInvisible) @@ -140,7 +140,7 @@ void ObjectHandler_v1d::updateImages() { case kCycleBackward: { if (!obj->_frameTimer) { // Time to step to prev frame - seq_t *seqPtr = obj->_currImagePtr; + Seq *seqPtr = obj->_currImagePtr; while (obj->_currImagePtr->_nextSeqPtr != seqPtr) obj->_currImagePtr = obj->_currImagePtr->_nextSeqPtr; // Find out if this is first frame of sequence @@ -183,8 +183,8 @@ void ObjectHandler_v1d::moveObjects() { // and store all (visible) object baselines into the boundary file. // Don't store foreground or background objects for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Object *obj = &_objects[i]; // Get pointer to object + Seq *currImage = obj->_currImagePtr; // Get ptr to current image if (obj->_screenIndex == *_vm->_screen_p) { switch (obj->_pathType) { case kPathChase: { @@ -271,13 +271,13 @@ void ObjectHandler_v1d::moveObjects() { // Move objects, allowing for boundaries for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object + Object *obj = &_objects[i]; // Get pointer to object if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_vx || obj->_vy)) { // Only process if it's moving // Do object movement. Delta_x,y return allowed movement in x,y // to move as close to a boundary as possible without crossing it. - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Seq *currImage = obj->_currImagePtr; // Get ptr to current image // object coordinates int x1 = obj->_x + currImage->_x1; // Left edge of object int x2 = obj->_x + currImage->_x2; // Right edge @@ -325,15 +325,15 @@ void ObjectHandler_v1d::moveObjects() { // Clear all object baselines from the boundary file. for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Object *obj = &_objects[i]; // Get pointer to object + Seq *currImage = obj->_currImagePtr; // Get ptr to current image if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) clearBoundary(obj->_oldx + currImage->_x1, obj->_oldx + currImage->_x2, obj->_oldy + currImage->_y2); } // If maze mode is enabled, do special maze processing if (_vm->_maze._enabledFl) { - seq_t *currImage = _vm->_hero->_currImagePtr;// Get ptr to current image + Seq *currImage = _vm->_hero->_currImagePtr;// Get ptr to current image // hero coordinates int x1 = _vm->_hero->_x + currImage->_x1; // Left edge of object int x2 = _vm->_hero->_x + currImage->_x2; // Right edge @@ -352,8 +352,8 @@ void ObjectHandler_v1d::moveObjects() { void ObjectHandler_v1d::swapImages(int objIndex1, int objIndex2) { debugC(1, kDebugObject, "swapImages(%d, %d)", objIndex1, objIndex2); - seqList_t tmpSeqList[kMaxSeqNumb]; - int seqListSize = sizeof(seqList_t) * kMaxSeqNumb; + SeqList tmpSeqList[kMaxSeqNumb]; + int seqListSize = sizeof(SeqList) * kMaxSeqNumb; memmove(tmpSeqList, _objects[objIndex1]._seqList, seqListSize); memmove(_objects[objIndex1]._seqList, _objects[objIndex2]._seqList, seqListSize); @@ -365,8 +365,8 @@ void ObjectHandler_v1d::swapImages(int objIndex1, int objIndex2) { void ObjectHandler_v1d::homeIn(int objIndex1, const int objIndex2, const int8 objDx, const int8 objDy) { // object obj1 will home in on object obj2 - object_t *obj1 = &_objects[objIndex1]; - object_t *obj2 = &_objects[objIndex2]; + Object *obj1 = &_objects[objIndex1]; + Object *obj2 = &_objects[objIndex2]; obj1->_pathType = kPathAuto; int dx = obj1->_x + obj1->_currImagePtr->_x1 - obj2->_x - obj2->_currImagePtr->_x1; int dy = obj1->_y + obj1->_currImagePtr->_y1 - obj2->_y - obj2->_currImagePtr->_y1; diff --git a/engines/hugo/object_v1w.cpp b/engines/hugo/object_v1w.cpp index dd3de5fe40..e1e8496d9d 100644 --- a/engines/hugo/object_v1w.cpp +++ b/engines/hugo/object_v1w.cpp @@ -59,21 +59,21 @@ void ObjectHandler_v1w::updateImages() { debugC(5, kDebugObject, "updateImages"); // Initialize the index array to visible objects in current screen - int num_objs = 0; + int objNumb = 0; byte objindex[kMaxObjNumb]; // Array of indeces to objects for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; + Object *obj = &_objects[i]; if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling >= kCycleAlmostInvisible)) - objindex[num_objs++] = i; + objindex[objNumb++] = i; } // Sort the objects into increasing y+y2 (painter's algorithm) - qsort(objindex, num_objs, sizeof(objindex[0]), y2comp); + qsort(objindex, objNumb, sizeof(objindex[0]), y2comp); // Add each visible object to display list - for (int i = 0; i < num_objs; i++) { - object_t *obj = &_objects[objindex[i]]; + for (int i = 0; i < objNumb; i++) { + Object *obj = &_objects[objindex[i]]; // Count down inter-frame timer if (obj->_frameTimer) obj->_frameTimer--; @@ -90,7 +90,7 @@ void ObjectHandler_v1w::updateImages() { _vm->_screen->displayFrame(obj->_x, obj->_y, obj->_currImagePtr->_nextSeqPtr, obj->_priority == kPriorityOverOverlay); break; case kCycleBackward: { - seq_t *seqPtr = obj->_currImagePtr; + Seq *seqPtr = obj->_currImagePtr; if (!obj->_frameTimer) { // Show next frame while (seqPtr->_nextSeqPtr != obj->_currImagePtr) seqPtr = seqPtr->_nextSeqPtr; @@ -105,8 +105,8 @@ void ObjectHandler_v1w::updateImages() { } // Cycle any animating objects - for (int i = 0; i < num_objs; i++) { - object_t *obj = &_objects[objindex[i]]; + for (int i = 0; i < objNumb; i++) { + Object *obj = &_objects[objindex[i]]; if (obj->_cycling != kCycleInvisible) { // Only if it's visible if (obj->_cycling == kCycleAlmostInvisible) @@ -138,7 +138,7 @@ void ObjectHandler_v1w::updateImages() { case kCycleBackward: { if (!obj->_frameTimer) { // Time to step to prev frame - seq_t *seqPtr = obj->_currImagePtr; + Seq *seqPtr = obj->_currImagePtr; while (obj->_currImagePtr->_nextSeqPtr != seqPtr) obj->_currImagePtr = obj->_currImagePtr->_nextSeqPtr; // Find out if this is first frame of sequence @@ -180,8 +180,8 @@ void ObjectHandler_v1w::moveObjects() { // and store all (visible) object baselines into the boundary file. // Don't store foreground or background objects for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Object *obj = &_objects[i]; // Get pointer to object + Seq *currImage = obj->_currImagePtr; // Get ptr to current image if (obj->_screenIndex == *_vm->_screen_p) { switch (obj->_pathType) { case kPathChase: @@ -281,13 +281,13 @@ void ObjectHandler_v1w::moveObjects() { // Move objects, allowing for boundaries for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object + Object *obj = &_objects[i]; // Get pointer to object if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_vx || obj->_vy)) { // Only process if it's moving // Do object movement. Delta_x,y return allowed movement in x,y // to move as close to a boundary as possible without crossing it. - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Seq *currImage = obj->_currImagePtr; // Get ptr to current image // object coordinates int x1 = obj->_x + currImage->_x1; // Left edge of object int x2 = obj->_x + currImage->_x2; // Right edge @@ -335,15 +335,15 @@ void ObjectHandler_v1w::moveObjects() { // Clear all object baselines from the boundary file. for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Object *obj = &_objects[i]; // Get pointer to object + Seq *currImage = obj->_currImagePtr; // Get ptr to current image if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) clearBoundary(obj->_oldx + currImage->_x1, obj->_oldx + currImage->_x2, obj->_oldy + currImage->_y2); } // If maze mode is enabled, do special maze processing if (_vm->_maze._enabledFl) { - seq_t *currImage = _vm->_hero->_currImagePtr; // Get ptr to current image + Seq *currImage = _vm->_hero->_currImagePtr; // Get ptr to current image // hero coordinates int x1 = _vm->_hero->_x + currImage->_x1; // Left edge of object int x2 = _vm->_hero->_x + currImage->_x2; // Right edge @@ -364,8 +364,8 @@ void ObjectHandler_v1w::swapImages(int objIndex1, int objIndex2) { saveSeq(&_objects[objIndex1]); - seqList_t tmpSeqList[kMaxSeqNumb]; - int seqListSize = sizeof(seqList_t) * kMaxSeqNumb; + SeqList tmpSeqList[kMaxSeqNumb]; + int seqListSize = sizeof(SeqList) * kMaxSeqNumb; memmove(tmpSeqList, _objects[objIndex1]._seqList, seqListSize); memmove(_objects[objIndex1]._seqList, _objects[objIndex2]._seqList, seqListSize); diff --git a/engines/hugo/object_v2d.cpp b/engines/hugo/object_v2d.cpp index 025374521c..f0d83269d5 100644 --- a/engines/hugo/object_v2d.cpp +++ b/engines/hugo/object_v2d.cpp @@ -59,21 +59,21 @@ void ObjectHandler_v2d::updateImages() { debugC(5, kDebugObject, "updateImages"); // Initialize the index array to visible objects in current screen - int num_objs = 0; + int objNumb = 0; byte objindex[kMaxObjNumb]; // Array of indeces to objects for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; + Object *obj = &_objects[i]; if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling >= kCycleAlmostInvisible)) - objindex[num_objs++] = i; + objindex[objNumb++] = i; } // Sort the objects into increasing y+y2 (painter's algorithm) - qsort(objindex, num_objs, sizeof(objindex[0]), y2comp); + qsort(objindex, objNumb, sizeof(objindex[0]), y2comp); // Add each visible object to display list - for (int i = 0; i < num_objs; i++) { - object_t *obj = &_objects[objindex[i]]; + for (int i = 0; i < objNumb; i++) { + Object *obj = &_objects[objindex[i]]; // Count down inter-frame timer if (obj->_frameTimer) obj->_frameTimer--; @@ -90,7 +90,7 @@ void ObjectHandler_v2d::updateImages() { _vm->_screen->displayFrame(obj->_x, obj->_y, obj->_currImagePtr->_nextSeqPtr, obj->_priority == kPriorityOverOverlay); break; case kCycleBackward: { - seq_t *seqPtr = obj->_currImagePtr; + Seq *seqPtr = obj->_currImagePtr; if (!obj->_frameTimer) { // Show next frame while (seqPtr->_nextSeqPtr != obj->_currImagePtr) seqPtr = seqPtr->_nextSeqPtr; @@ -107,8 +107,8 @@ void ObjectHandler_v2d::updateImages() { _vm->_scheduler->waitForRefresh(); // Cycle any animating objects - for (int i = 0; i < num_objs; i++) { - object_t *obj = &_objects[objindex[i]]; + for (int i = 0; i < objNumb; i++) { + Object *obj = &_objects[objindex[i]]; if (obj->_cycling != kCycleInvisible) { // Only if it's visible if (obj->_cycling == kCycleAlmostInvisible) @@ -140,7 +140,7 @@ void ObjectHandler_v2d::updateImages() { case kCycleBackward: { if (!obj->_frameTimer) { // Time to step to prev frame - seq_t *seqPtr = obj->_currImagePtr; + Seq *seqPtr = obj->_currImagePtr; while (obj->_currImagePtr->_nextSeqPtr != seqPtr) obj->_currImagePtr = obj->_currImagePtr->_nextSeqPtr; // Find out if this is first frame of sequence @@ -183,8 +183,8 @@ void ObjectHandler_v2d::moveObjects() { // and store all (visible) object baselines into the boundary file. // Don't store foreground or background objects for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Object *obj = &_objects[i]; // Get pointer to object + Seq *currImage = obj->_currImagePtr; // Get ptr to current image if (obj->_screenIndex == *_vm->_screen_p) { switch (obj->_pathType) { case kPathChase: @@ -284,13 +284,13 @@ void ObjectHandler_v2d::moveObjects() { // Move objects, allowing for boundaries for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object + Object *obj = &_objects[i]; // Get pointer to object if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_vx || obj->_vy)) { // Only process if it's moving // Do object movement. Delta_x,y return allowed movement in x,y // to move as close to a boundary as possible without crossing it. - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Seq *currImage = obj->_currImagePtr; // Get ptr to current image // object coordinates int x1 = obj->_x + currImage->_x1; // Left edge of object int x2 = obj->_x + currImage->_x2; // Right edge @@ -338,15 +338,15 @@ void ObjectHandler_v2d::moveObjects() { // Clear all object baselines from the boundary file. for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Object *obj = &_objects[i]; // Get pointer to object + Seq *currImage = obj->_currImagePtr; // Get ptr to current image if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) clearBoundary(obj->_oldx + currImage->_x1, obj->_oldx + currImage->_x2, obj->_oldy + currImage->_y2); } // If maze mode is enabled, do special maze processing if (_vm->_maze._enabledFl) { - seq_t *currImage = _vm->_hero->_currImagePtr; // Get ptr to current image + Seq *currImage = _vm->_hero->_currImagePtr; // Get ptr to current image // hero coordinates int x1 = _vm->_hero->_x + currImage->_x1; // Left edge of object int x2 = _vm->_hero->_x + currImage->_x2; // Right edge @@ -359,8 +359,8 @@ void ObjectHandler_v2d::moveObjects() { void ObjectHandler_v2d::homeIn(const int objIndex1, const int objIndex2, const int8 objDx, const int8 objDy) { // object obj1 will home in on object obj2 - object_t *obj1 = &_objects[objIndex1]; - object_t *obj2 = &_objects[objIndex2]; + Object *obj1 = &_objects[objIndex1]; + Object *obj2 = &_objects[objIndex2]; obj1->_pathType = kPathAuto; int dx = obj1->_x + obj1->_currImagePtr->_x1 - obj2->_x - obj2->_currImagePtr->_x1; int dy = obj1->_y + obj1->_currImagePtr->_y1 - obj2->_y - obj2->_currImagePtr->_y1; diff --git a/engines/hugo/object_v3d.cpp b/engines/hugo/object_v3d.cpp index 15d5fcd936..13c9c8c93d 100644 --- a/engines/hugo/object_v3d.cpp +++ b/engines/hugo/object_v3d.cpp @@ -64,8 +64,8 @@ void ObjectHandler_v3d::moveObjects() { // and store all (visible) object baselines into the boundary file. // Don't store foreground or background objects for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Object *obj = &_objects[i]; // Get pointer to object + Seq *currImage = obj->_currImagePtr; // Get ptr to current image if (obj->_screenIndex == *_vm->_screen_p) { switch (obj->_pathType) { case kPathChase: @@ -166,13 +166,13 @@ void ObjectHandler_v3d::moveObjects() { // Move objects, allowing for boundaries for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object + Object *obj = &_objects[i]; // Get pointer to object if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_vx || obj->_vy)) { // Only process if it's moving // Do object movement. Delta_x,y return allowed movement in x,y // to move as close to a boundary as possible without crossing it. - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Seq *currImage = obj->_currImagePtr; // Get ptr to current image // object coordinates int x1 = obj->_x + currImage->_x1; // Left edge of object int x2 = obj->_x + currImage->_x2; // Right edge @@ -220,15 +220,15 @@ void ObjectHandler_v3d::moveObjects() { // Clear all object baselines from the boundary file. for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Object *obj = &_objects[i]; // Get pointer to object + Seq *currImage = obj->_currImagePtr; // Get ptr to current image if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) clearBoundary(obj->_oldx + currImage->_x1, obj->_oldx + currImage->_x2, obj->_oldy + currImage->_y2); } // If maze mode is enabled, do special maze processing if (_vm->_maze._enabledFl) { - seq_t *currImage = _vm->_hero->_currImagePtr;// Get ptr to current image + Seq *currImage = _vm->_hero->_currImagePtr;// Get ptr to current image // hero coordinates int x1 = _vm->_hero->_x + currImage->_x1; // Left edge of object int x2 = _vm->_hero->_x + currImage->_x2; // Right edge @@ -249,8 +249,8 @@ void ObjectHandler_v3d::swapImages(int objIndex1, int objIndex2) { saveSeq(&_objects[objIndex1]); - seqList_t tmpSeqList[kMaxSeqNumb]; - int seqListSize = sizeof(seqList_t) * kMaxSeqNumb; + SeqList tmpSeqList[kMaxSeqNumb]; + int seqListSize = sizeof(SeqList) * kMaxSeqNumb; memmove(tmpSeqList, _objects[objIndex1]._seqList, seqListSize); memmove(_objects[objIndex1]._seqList, _objects[objIndex2]._seqList, seqListSize); diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp index 3b0eb1d979..68343a0374 100644 --- a/engines/hugo/parser.cpp +++ b/engines/hugo/parser.cpp @@ -99,7 +99,7 @@ void Parser::loadCmdList(Common::ReadStream &in) { } -void Parser::readBG(Common::ReadStream &in, background_t &curBG) { +void Parser::readBG(Common::ReadStream &in, Background &curBG) { curBG._verbIndex = in.readUint16BE(); curBG._nounIndex = in.readUint16BE(); curBG._commentIndex = in.readSint16BE(); @@ -112,7 +112,7 @@ void Parser::readBG(Common::ReadStream &in, background_t &curBG) { * Read _backgrounObjects from Hugo.dat */ void Parser::loadBackgroundObjects(Common::ReadStream &in) { - background_t tmpBG; + Background tmpBG; memset(&tmpBG, 0, sizeof(tmpBG)); for (int varnt = 0; varnt < _vm->_numVariant; varnt++) { @@ -120,13 +120,13 @@ void Parser::loadBackgroundObjects(Common::ReadStream &in) { if (varnt == _vm->_gameVariant) { _backgroundObjectsSize = numElem; - _backgroundObjects = (background_t **)malloc(sizeof(background_t *) * numElem); + _backgroundObjects = (Background **)malloc(sizeof(Background *) * numElem); } for (int i = 0; i < numElem; i++) { uint16 numSubElem = in.readUint16BE(); if (varnt == _vm->_gameVariant) - _backgroundObjects[i] = (background_t *)malloc(sizeof(background_t) * numSubElem); + _backgroundObjects[i] = (Background *)malloc(sizeof(Background) * numSubElem); for (int j = 0; j < numSubElem; j++) readBG(in, (varnt == _vm->_gameVariant) ? _backgroundObjects[i][j] : tmpBG); @@ -138,15 +138,15 @@ void Parser::loadBackgroundObjects(Common::ReadStream &in) { * Read _catchallList from Hugo.dat */ void Parser::loadCatchallList(Common::ReadStream &in) { - background_t *wrkCatchallList = 0; - background_t tmpBG; + Background *wrkCatchallList = 0; + Background tmpBG; memset(&tmpBG, 0, sizeof(tmpBG)); for (int varnt = 0; varnt < _vm->_numVariant; varnt++) { uint16 numElem = in.readUint16BE(); if (varnt == _vm->_gameVariant) - _catchallList = wrkCatchallList = (background_t *)malloc(sizeof(background_t) * numElem); + _catchallList = wrkCatchallList = (Background *)malloc(sizeof(Background) * numElem); for (int i = 0; i < numElem; i++) readBG(in, (varnt == _vm->_gameVariant) ? wrkCatchallList[i] : tmpBG); @@ -164,7 +164,7 @@ void Parser::loadArrayReqs(Common::SeekableReadStream &in) { const char *Parser::useBG(const char *name) { debugC(1, kDebugEngine, "useBG(%s)", name); - objectList_t p = _backgroundObjects[*_vm->_screen_p]; + ObjectList p = _backgroundObjects[*_vm->_screen_p]; for (int i = 0; p[i]._verbIndex != 0; i++) { if ((name == _vm->_text->getNoun(p[i]._nounIndex, 0) && p[i]._verbIndex != _vm->_look) && @@ -208,7 +208,7 @@ void Parser::switchTurbo() { void Parser::charHandler() { debugC(4, kDebugParser, "charHandler"); - status_t &gameStatus = _vm->getGameStatus(); + Status &gameStatus = _vm->getGameStatus(); // Check for one or more characters in ring buffer while (_getIndex != _putIndex) { @@ -268,7 +268,7 @@ void Parser::charHandler() { void Parser::keyHandler(Common::Event event) { debugC(1, kDebugParser, "keyHandler(%d)", event.kbd.keycode); - status_t &gameStatus = _vm->getGameStatus(); + Status &gameStatus = _vm->getGameStatus(); uint16 nChar = event.kbd.keycode; if (event.kbd.flags & (Common::KBD_ALT | Common::KBD_SCRL)) diff --git a/engines/hugo/parser.h b/engines/hugo/parser.h index 18f4916b1e..e72c46f591 100644 --- a/engines/hugo/parser.h +++ b/engines/hugo/parser.h @@ -64,7 +64,7 @@ struct cmd { * interesting ever happens with them. Rather than just be dumb and say * "don't understand" we produce an interesting msg to keep user sane. */ -struct background_t { +struct Background { uint16 _verbIndex; uint16 _nounIndex; int _commentIndex; // Index of comment produced on match @@ -73,7 +73,7 @@ struct background_t { byte _bonusIndex; // Index of bonus score (0 = no bonus) }; -typedef background_t *objectList_t; +typedef Background *ObjectList; class Parser { public: @@ -97,7 +97,7 @@ public: virtual void lineHandler() = 0; virtual void showInventory() const = 0; - virtual void takeObject(object_t *obj) = 0; + virtual void takeObject(Object *obj) = 0; protected: HugoEngine *_vm; @@ -105,18 +105,18 @@ protected: int16 _cmdLineIndex; // Index into line uint32 _cmdLineTick; // For flashing cursor char _cmdLineCursor; - command_t _cmdLine; // Build command line + Command _cmdLine; // Build command line uint16 _backgroundObjectsSize; uint16 _cmdListSize; uint16 **_arrayReqs; - background_t **_backgroundObjects; - background_t *_catchallList; + Background **_backgroundObjects; + Background *_catchallList; cmd **_cmdList; const char *findNoun() const; const char *findVerb() const; - void readBG(Common::ReadStream &in, background_t &curBG); + void readBG(Common::ReadStream &in, Background &curBG); void readCmd(Common::ReadStream &in, cmd &curCmd); void showDosInventory() const; @@ -136,17 +136,17 @@ public: virtual void lineHandler(); virtual void showInventory() const; - virtual void takeObject(object_t *obj); + virtual void takeObject(Object *obj); protected: - virtual void dropObject(object_t *obj); + virtual void dropObject(Object *obj); const char *findNextNoun(const char *noun) const; - bool isBackgroundWord_v1(const char *noun, const char *verb, objectList_t obj) const; - bool isCatchallVerb_v1(bool testNounFl, const char *noun, const char *verb, objectList_t obj) const; - bool isGenericVerb_v1(const char *word, object_t *obj); - bool isNear_v1(const char *verb, const char *noun, object_t *obj, char *comment) const; - bool isObjectVerb_v1(const char *word, object_t *obj); + bool isBackgroundWord_v1(const char *noun, const char *verb, ObjectList obj) const; + bool isCatchallVerb_v1(bool testNounFl, const char *noun, const char *verb, ObjectList obj) const; + bool isGenericVerb_v1(const char *word, Object *obj); + bool isNear_v1(const char *verb, const char *noun, Object *obj, char *comment) const; + bool isObjectVerb_v1(const char *word, Object *obj); }; class Parser_v2d : public Parser_v1d { @@ -164,13 +164,13 @@ public: virtual void lineHandler(); protected: - void dropObject(object_t *obj); - bool isBackgroundWord_v3(objectList_t obj) const; - bool isCatchallVerb_v3(objectList_t obj) const; - bool isGenericVerb_v3(object_t *obj, char *comment); - bool isNear_v3(object_t *obj, const char *verb, char *comment) const; - bool isObjectVerb_v3(object_t *obj, char *comment); - void takeObject(object_t *obj); + void dropObject(Object *obj); + bool isBackgroundWord_v3(ObjectList obj) const; + bool isCatchallVerb_v3(ObjectList obj) const; + bool isGenericVerb_v3(Object *obj, char *comment); + bool isNear_v3(Object *obj, const char *verb, char *comment) const; + bool isObjectVerb_v3(Object *obj, char *comment); + void takeObject(Object *obj); }; class Parser_v1w : public Parser_v3d { diff --git a/engines/hugo/parser_v1d.cpp b/engines/hugo/parser_v1d.cpp index aa43cce536..f29a03f796 100644 --- a/engines/hugo/parser_v1d.cpp +++ b/engines/hugo/parser_v1d.cpp @@ -78,7 +78,7 @@ const char *Parser_v1d::findNextNoun(const char *noun) const { * If object not near, return suitable string; may be similar object closer * If radius is -1, treat radius as infinity */ -bool Parser_v1d::isNear_v1(const char *verb, const char *noun, object_t *obj, char *comment) const { +bool Parser_v1d::isNear_v1(const char *verb, const char *noun, Object *obj, char *comment) const { debugC(1, kDebugParser, "isNear(%s, %s, obj, %s)", verb, noun, comment); if (!noun && !obj->_verbOnlyFl) { // No noun specified & object not context senesitive @@ -140,8 +140,8 @@ bool Parser_v1d::isNear_v1(const char *verb, const char *noun, object_t *obj, ch * say_ok needed for special case of take/drop which may be handled not only * here but also in a cmd_list with a donestr string simultaneously */ -bool Parser_v1d::isGenericVerb_v1(const char *word, object_t *obj) { - debugC(1, kDebugParser, "isGenericVerb(%s, object_t *obj)", word); +bool Parser_v1d::isGenericVerb_v1(const char *word, Object *obj) { + debugC(1, kDebugParser, "isGenericVerb(%s, Object *obj)", word); if (!obj->_genericCmd) return false; @@ -181,8 +181,8 @@ bool Parser_v1d::isGenericVerb_v1(const char *word, object_t *obj) { * and if it passes, perform the actions in the action list. If the verb * is catered for, return TRUE */ -bool Parser_v1d::isObjectVerb_v1(const char *word, object_t *obj) { - debugC(1, kDebugParser, "isObjectVerb(%s, object_t *obj)", word); +bool Parser_v1d::isObjectVerb_v1(const char *word, Object *obj) { + debugC(1, kDebugParser, "isObjectVerb(%s, Object *obj)", word); // First, find matching verb in cmd list uint16 cmdIndex = obj->_cmdIndex; // ptr to list of commands @@ -231,7 +231,7 @@ bool Parser_v1d::isObjectVerb_v1(const char *word, object_t *obj) { * Print text for possible background object. Return TRUE if match found * Only match if both verb and noun found. Test_ca will match verb-only */ -bool Parser_v1d::isBackgroundWord_v1(const char *noun, const char *verb, objectList_t obj) const { +bool Parser_v1d::isBackgroundWord_v1(const char *noun, const char *verb, ObjectList obj) const { debugC(1, kDebugParser, "isBackgroundWord(%s, %s, object_list_t obj)", noun, verb); if (!noun) @@ -249,8 +249,8 @@ bool Parser_v1d::isBackgroundWord_v1(const char *noun, const char *verb, objectL /** * Do all things necessary to carry an object */ -void Parser_v1d::takeObject(object_t *obj) { - debugC(1, kDebugParser, "takeObject(object_t *obj)"); +void Parser_v1d::takeObject(Object *obj) { + debugC(1, kDebugParser, "takeObject(Object *obj)"); obj->_carriedFl = true; if (obj->_seqNumb) // Don't change if no image to display @@ -264,8 +264,8 @@ void Parser_v1d::takeObject(object_t *obj) { /** * Do all necessary things to drop an object */ -void Parser_v1d::dropObject(object_t *obj) { - debugC(1, kDebugParser, "dropObject(object_t *obj)"); +void Parser_v1d::dropObject(Object *obj) { + debugC(1, kDebugParser, "dropObject(Object *obj)"); obj->_carriedFl = false; obj->_screenIndex = *_vm->_screen_p; @@ -281,7 +281,7 @@ void Parser_v1d::dropObject(object_t *obj) { * Print text for possible background object. Return TRUE if match found * If test_noun TRUE, must have a noun given */ -bool Parser_v1d::isCatchallVerb_v1(bool testNounFl, const char *noun, const char *verb, objectList_t obj) const { +bool Parser_v1d::isCatchallVerb_v1(bool testNounFl, const char *noun, const char *verb, ObjectList obj) const { debugC(1, kDebugParser, "isCatchallVerb(%d, %s, %s, object_list_t obj)", (testNounFl) ? 1 : 0, noun, verb); if (_vm->_maze._enabledFl) @@ -305,7 +305,7 @@ bool Parser_v1d::isCatchallVerb_v1(bool testNounFl, const char *noun, const char void Parser_v1d::lineHandler() { debugC(1, kDebugParser, "lineHandler()"); - status_t &gameStatus = _vm->getGameStatus(); + Status &gameStatus = _vm->getGameStatus(); // Toggle God Mode if (!strncmp(_vm->_line, "PPG", 3)) { @@ -403,7 +403,7 @@ void Parser_v1d::lineHandler() { noun = findNextNoun(noun); // Find a noun in the line // Must try at least once for objects allowing verb-context for (int i = 0; i < _vm->_object->_numObj; i++) { - object_t *obj = &_vm->_object->_objects[i]; + Object *obj = &_vm->_object->_objects[i]; if (isNear_v1(verb, noun, obj, farComment)) { if (isObjectVerb_v1(verb, obj) // Foreground object || isGenericVerb_v1(verb, obj))// Common action type @@ -424,7 +424,7 @@ void Parser_v1d::lineHandler() { } void Parser_v1d::showInventory() const { - status_t &gameStatus = _vm->getGameStatus(); + Status &gameStatus = _vm->getGameStatus(); if (gameStatus._viewState == kViewPlay) { if (gameStatus._gameOverFl) _vm->gameOverMsg(); diff --git a/engines/hugo/parser_v1w.cpp b/engines/hugo/parser_v1w.cpp index 832e6fd1b0..8c0da63554 100644 --- a/engines/hugo/parser_v1w.cpp +++ b/engines/hugo/parser_v1w.cpp @@ -56,7 +56,7 @@ Parser_v1w::~Parser_v1w() { void Parser_v1w::lineHandler() { debugC(1, kDebugParser, "lineHandler()"); - status_t &gameStatus = _vm->getGameStatus(); + Status &gameStatus = _vm->getGameStatus(); // Toggle God Mode if (!strncmp(_vm->_line, "PPG", 3)) { @@ -147,7 +147,7 @@ void Parser_v1w::lineHandler() { // Test for nearby objects referenced explicitly for (int i = 0; i < _vm->_object->_numObj; i++) { - object_t *obj = &_vm->_object->_objects[i]; + Object *obj = &_vm->_object->_objects[i]; if (isWordPresent(_vm->_text->getNounArray(obj->_nounIndex))) { if (isObjectVerb_v3(obj, farComment) || isGenericVerb_v3(obj, farComment)) return; @@ -157,7 +157,7 @@ void Parser_v1w::lineHandler() { // Test for nearby objects that only require a verb // Note comment is unused if not near. for (int i = 0; i < _vm->_object->_numObj; i++) { - object_t *obj = &_vm->_object->_objects[i]; + Object *obj = &_vm->_object->_objects[i]; if (obj->_verbOnlyFl) { char contextComment[kCompLineSize * 5] = ""; // Unused comment for context objects if (isObjectVerb_v3(obj, contextComment) || isGenericVerb_v3(obj, contextComment)) @@ -200,8 +200,8 @@ void Parser_v1w::lineHandler() { } void Parser_v1w::showInventory() const { - status_t &gameStatus = _vm->getGameStatus(); - istate_t inventState = _vm->_inventory->getInventoryState(); + Status &gameStatus = _vm->getGameStatus(); + Istate inventState = _vm->_inventory->getInventoryState(); if (gameStatus._gameOverFl) { _vm->gameOverMsg(); } else if ((inventState == kInventoryOff) && (gameStatus._viewState == kViewPlay)) { diff --git a/engines/hugo/parser_v2d.cpp b/engines/hugo/parser_v2d.cpp index 2daf3c5e9f..674836b90e 100644 --- a/engines/hugo/parser_v2d.cpp +++ b/engines/hugo/parser_v2d.cpp @@ -55,7 +55,7 @@ Parser_v2d::~Parser_v2d() { void Parser_v2d::lineHandler() { debugC(1, kDebugParser, "lineHandler()"); - status_t &gameStatus = _vm->getGameStatus(); + Status &gameStatus = _vm->getGameStatus(); // Toggle God Mode if (!strncmp(_vm->_line, "PPG", 3)) { @@ -153,7 +153,7 @@ void Parser_v2d::lineHandler() { noun = findNextNoun(noun); // Find a noun in the line // Must try at least once for objects allowing verb-context for (int i = 0; i < _vm->_object->_numObj; i++) { - object_t *obj = &_vm->_object->_objects[i]; + Object *obj = &_vm->_object->_objects[i]; if (isNear_v1(verb, noun, obj, farComment)) { if (isObjectVerb_v1(verb, obj) // Foreground object || isGenericVerb_v1(verb, obj))// Common action type diff --git a/engines/hugo/parser_v3d.cpp b/engines/hugo/parser_v3d.cpp index abfe263f6e..9bbaf49f67 100644 --- a/engines/hugo/parser_v3d.cpp +++ b/engines/hugo/parser_v3d.cpp @@ -55,7 +55,7 @@ Parser_v3d::~Parser_v3d() { void Parser_v3d::lineHandler() { debugC(1, kDebugParser, "lineHandler()"); - status_t &gameStatus = _vm->getGameStatus(); + Status &gameStatus = _vm->getGameStatus(); // Toggle God Mode if (!strncmp(_vm->_line, "PPG", 3)) { @@ -149,7 +149,7 @@ void Parser_v3d::lineHandler() { // Test for nearby objects referenced explicitly for (int i = 0; i < _vm->_object->_numObj; i++) { - object_t *obj = &_vm->_object->_objects[i]; + Object *obj = &_vm->_object->_objects[i]; if (isWordPresent(_vm->_text->getNounArray(obj->_nounIndex))) { if (isObjectVerb_v3(obj, farComment) || isGenericVerb_v3(obj, farComment)) return; @@ -159,7 +159,7 @@ void Parser_v3d::lineHandler() { // Test for nearby objects that only require a verb // Note comment is unused if not near. for (int i = 0; i < _vm->_object->_numObj; i++) { - object_t *obj = &_vm->_object->_objects[i]; + Object *obj = &_vm->_object->_objects[i]; if (obj->_verbOnlyFl) { char contextComment[kCompLineSize * 5] = ""; // Unused comment for context objects if (isObjectVerb_v3(obj, contextComment) || isGenericVerb_v3(obj, contextComment)) @@ -204,8 +204,8 @@ void Parser_v3d::lineHandler() { * If it does, and the object is near and passes the tests in the command * list then carry out the actions in the action list and return TRUE */ -bool Parser_v3d::isObjectVerb_v3(object_t *obj, char *comment) { - debugC(1, kDebugParser, "isObjectVerb(object_t *obj, %s)", comment); +bool Parser_v3d::isObjectVerb_v3(Object *obj, char *comment) { + debugC(1, kDebugParser, "isObjectVerb(Object *obj, %s)", comment); // First, find matching verb in cmd list uint16 cmdIndex = obj->_cmdIndex; // ptr to list of commands @@ -259,8 +259,8 @@ bool Parser_v3d::isObjectVerb_v3(object_t *obj, char *comment) { /** * Test whether command line contains one of the generic actions */ -bool Parser_v3d::isGenericVerb_v3(object_t *obj, char *comment) { - debugC(1, kDebugParser, "isGenericVerb(object_t *obj, %s)", comment); +bool Parser_v3d::isGenericVerb_v3(Object *obj, char *comment) { + debugC(1, kDebugParser, "isGenericVerb(Object *obj, %s)", comment); if (!obj->_genericCmd) return false; @@ -313,8 +313,8 @@ bool Parser_v3d::isGenericVerb_v3(object_t *obj, char *comment) { * If radius is -1, treat radius as infinity * Verb is included to determine correct comment if not near */ -bool Parser_v3d::isNear_v3(object_t *obj, const char *verb, char *comment) const { - debugC(1, kDebugParser, "isNear(object_t *obj, %s, %s)", verb, comment); +bool Parser_v3d::isNear_v3(Object *obj, const char *verb, char *comment) const { + debugC(1, kDebugParser, "isNear(Object *obj, %s, %s)", verb, comment); if (obj->_carriedFl) // Object is being carried return true; @@ -368,8 +368,8 @@ bool Parser_v3d::isNear_v3(object_t *obj, const char *verb, char *comment) const /** * Do all things necessary to carry an object */ -void Parser_v3d::takeObject(object_t *obj) { - debugC(1, kDebugParser, "takeObject(object_t *obj)"); +void Parser_v3d::takeObject(Object *obj) { + debugC(1, kDebugParser, "takeObject(Object *obj)"); obj->_carriedFl = true; if (obj->_seqNumb) { // Don't change if no image to display @@ -385,8 +385,8 @@ void Parser_v3d::takeObject(object_t *obj) { /** * Do all necessary things to drop an object */ -void Parser_v3d::dropObject(object_t *obj) { - debugC(1, kDebugParser, "dropObject(object_t *obj)"); +void Parser_v3d::dropObject(Object *obj) { + debugC(1, kDebugParser, "dropObject(Object *obj)"); obj->_carriedFl = false; obj->_screenIndex = *_vm->_screen_p; @@ -407,7 +407,7 @@ void Parser_v3d::dropObject(object_t *obj) { * Note that if the background command list has match set TRUE then do not * print text if there are any recognizable nouns in the command line */ -bool Parser_v3d::isCatchallVerb_v3(objectList_t obj) const { +bool Parser_v3d::isCatchallVerb_v3(ObjectList obj) const { debugC(1, kDebugParser, "isCatchallVerb(object_list_t obj)"); if (_vm->_maze._enabledFl) @@ -435,7 +435,7 @@ bool Parser_v3d::isCatchallVerb_v3(objectList_t obj) const { * Search for matching verb/noun pairs in background command list * Print text for possible background object. Return TRUE if match found */ -bool Parser_v3d::isBackgroundWord_v3(objectList_t obj) const { +bool Parser_v3d::isBackgroundWord_v3(ObjectList obj) const { debugC(1, kDebugParser, "isBackgroundWord(object_list_t obj)"); if (_vm->_maze._enabledFl) diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp index 873cb587af..45d72bafb1 100644 --- a/engines/hugo/route.cpp +++ b/engines/hugo/route.cpp @@ -61,7 +61,7 @@ int16 Route::getRouteIndex() const { void Route::setDirection(const uint16 keyCode) { debugC(1, kDebugRoute, "setDirection(%d)", keyCode); - object_t *obj = _vm->_hero; // Pointer to hero object + Object *obj = _vm->_hero; // Pointer to hero object // Set first image in sequence switch (keyCode) { @@ -107,7 +107,7 @@ void Route::setDirection(const uint16 keyCode) { void Route::setWalk(const uint16 direction) { debugC(1, kDebugRoute, "setWalk(%d)", direction); - object_t *obj = _vm->_hero; // Pointer to hero object + Object *obj = _vm->_hero; // Pointer to hero object if (_vm->getGameStatus()._storyModeFl || obj->_pathType != kPathUser) // Make sure user has control return; @@ -188,8 +188,8 @@ void Route::segment(int16 x, int16 y) { debugC(1, kDebugRoute, "segment(%d, %d)", x, y); // Note: use of static - can't waste stack - static image_pt p; // Ptr to _boundaryMap[y] - static segment_t *seg_p; // Ptr to segment + static ImagePtr p; // Ptr to _boundaryMap[y] + static Segment *segPtr; // Ptr to segment // Bomb out if stack exhausted // Vinterstum: Is this just a safeguard, or actually used? @@ -285,10 +285,10 @@ void Route::segment(int16 x, int16 y) { _fullSegmentFl = true; } else { // Create segment - seg_p = &_segment[_segmentNumb]; - seg_p->_y = y; - seg_p->_x1 = x1; - seg_p->_x2 = x2; + segPtr = &_segment[_segmentNumb]; + segPtr->_y = y; + segPtr->_x1 = x1; + segPtr->_x2 = x2; _segmentNumb++; } } @@ -332,7 +332,7 @@ bool Route::findRoute(const int16 cx, const int16 cy) { int16 heroy = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2; // Hero baseline // Store all object baselines into objbound (except hero's = [0]) - object_t *obj; // Ptr to object + Object *obj; // Ptr to object int i; for (i = 1, obj = &_vm->_object->_objects[i]; i < _vm->_object->_numObj; i++, obj++) { if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling != kCycleInvisible) && (obj->_priority == kPriorityFloating)) @@ -382,18 +382,18 @@ bool Route::findRoute(const int16 cx, const int16 cy) { // Look ahead for furthest straight line for (int16 j = i + 1; j < _segmentNumb; j++) { - segment_t *seg_p = &_segment[j]; + Segment *segPtr = &_segment[j]; // Can we get to this segment from previous node? - if (seg_p->_x1 <= routeNode->x && seg_p->_x2 >= routeNode->x + _heroWidth - 1) { - routeNode->y = seg_p->_y; // Yes, keep updating node + if (segPtr->_x1 <= routeNode->x && segPtr->_x2 >= routeNode->x + _heroWidth - 1) { + routeNode->y = segPtr->_y; // Yes, keep updating node } else { // No, create another node on previous segment to reach it if ((routeNode = newNode()) == 0) // Add new route node return false; // Too many nodes // Find overlap between old and new segments - int16 x1 = MAX(_segment[j - 1]._x1, seg_p->_x1); - int16 x2 = MIN(_segment[j - 1]._x2, seg_p->_x2); + int16 x1 = MAX(_segment[j - 1]._x1, segPtr->_x1); + int16 x2 = MIN(_segment[j - 1]._x2, segPtr->_x2); // If room, add a little offset to reduce staircase effect int16 dx = kHeroMaxWidth >> 1; @@ -500,7 +500,7 @@ void Route::processRoute() { * go_for is the purpose, id indexes the exit or object to walk to * Returns FALSE if route not found */ -bool Route::startRoute(const go_t routeType, const int16 objId, int16 cx, int16 cy) { +bool Route::startRoute(const RouteType routeType, const int16 objId, int16 cx, int16 cy) { debugC(1, kDebugRoute, "startRoute(%d, %d, %d, %d)", routeType, objId, cx, cy); // Don't attempt to walk if user does not have control diff --git a/engines/hugo/route.h b/engines/hugo/route.h index 53b0dd0f88..716829a201 100644 --- a/engines/hugo/route.h +++ b/engines/hugo/route.h @@ -37,11 +37,11 @@ namespace Hugo { /** * Purpose of an automatic route */ -enum go_t {kRouteSpace, kRouteExit, kRouteLook, kRouteGet}; +enum RouteType {kRouteSpace, kRouteExit, kRouteLook, kRouteGet}; -struct segment_t { // Search segment - int16 _y; // y position - int16 _x1, _x2; // Range of segment +struct Segment { // Search segment + int16 _y; // y position + int16 _x1, _x2; // Range of segment }; class Route { @@ -52,7 +52,7 @@ public: int16 getRouteIndex() const; void processRoute(); - bool startRoute(const go_t routeType, const int16 objId, int16 cx, int16 cy); + bool startRoute(const RouteType routeType, const int16 objId, int16 cx, int16 cy); void setDirection(const uint16 keyCode); void setWalk(const uint16 direction); @@ -66,12 +66,12 @@ private: uint16 _oldWalkDirection; // Last direction char - int16 _routeIndex; // Index into route list, or -1 - go_t _routeType; // Purpose of an automatic route - int16 _routeObjId; // Index of exit of object walking to + int16 _routeIndex; // Index into route list, or -1 + RouteType _routeType; // Purpose of an automatic route + int16 _routeObjId; // Index of exit of object walking to byte _boundaryMap[kYPix][kXPix]; // Boundary byte map - segment_t _segment[kMaxSeg]; // List of points in fill-path + Segment _segment[kMaxSeg]; // List of points in fill-path Common::Point _route[kMaxNodes]; // List of nodes in route (global) int16 _segmentNumb; // Count number of segments int16 _routeListIndex; // Index into route list diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp index 0e57b08f19..3bbec6670e 100644 --- a/engines/hugo/schedule.cpp +++ b/engines/hugo/schedule.cpp @@ -83,12 +83,12 @@ void Scheduler::initEventQueue() { /** * Return a ptr to an event structure from the free list */ -event_t *Scheduler::getQueue() { +Event *Scheduler::getQueue() { debugC(4, kDebugSchedule, "getQueue"); if (!_freeEvent) // Error: no more events available error("An error has occurred: %s", "getQueue"); - event_t *resEvent = _freeEvent; + Event *resEvent = _freeEvent; _freeEvent = _freeEvent->_nextEvent; resEvent->_nextEvent = 0; return resEvent; @@ -175,8 +175,8 @@ void Scheduler::newScreen(const int screenIndex) { } // 1. Clear out all local events - event_t *curEvent = _headEvent; // The earliest event - event_t *wrkEvent; // Event ptr + Event *curEvent = _headEvent; // The earliest event + Event *wrkEvent; // Event ptr while (curEvent) { // While mature events found wrkEvent = curEvent->_nextEvent; // Save p (becomes undefined after Del) if (curEvent->_localActionFl) @@ -259,7 +259,7 @@ void Scheduler::loadPoints(Common::SeekableReadStream &in) { uint16 numElem = in.readUint16BE(); if (varnt == _vm->_gameVariant) { _numBonuses = numElem; - _points = (point_t *)malloc(sizeof(point_t) * _numBonuses); + _points = (Point *)malloc(sizeof(Point) * _numBonuses); for (int i = 0; i < _numBonuses; i++) { _points[i]._score = in.readByte(); _points[i]._scoredFl = false; @@ -270,10 +270,10 @@ void Scheduler::loadPoints(Common::SeekableReadStream &in) { } } -void Scheduler::readAct(Common::ReadStream &in, act &curAct) { +void Scheduler::readAct(Common::ReadStream &in, Act &curAct) { uint16 numSubAct; - curAct._a0._actType = (action_t) in.readByte(); + curAct._a0._actType = (Action) in.readByte(); switch (curAct._a0._actType) { case ANULL: // -1 break; @@ -285,7 +285,7 @@ void Scheduler::readAct(Common::ReadStream &in, act &curAct) { curAct._a1._timer = in.readSint16BE(); curAct._a1._objIndex = in.readSint16BE(); curAct._a1._cycleNumb = in.readSint16BE(); - curAct._a1._cycle = (cycle_t) in.readByte(); + curAct._a1._cycle = (Cycle) in.readByte(); break; case INIT_OBJXY: // 2 curAct._a2._timer = in.readSint16BE(); @@ -393,7 +393,7 @@ void Scheduler::readAct(Common::ReadStream &in, act &curAct) { break; case DEL_EVENTS: // 20 curAct._a20._timer = in.readSint16BE(); - curAct._a20._actTypeDel = (action_t) in.readByte(); + curAct._a20._actTypeDel = (Action) in.readByte(); break; case GAMEOVER: // 21 curAct._a21._timer = in.readSint16BE(); @@ -553,20 +553,20 @@ void Scheduler::readAct(Common::ReadStream &in, act &curAct) { void Scheduler::loadActListArr(Common::ReadStream &in) { debugC(6, kDebugSchedule, "loadActListArr(&in)"); - act tmpAct; + Act tmpAct; int numElem, numSubElem; for (int varnt = 0; varnt < _vm->_numVariant; varnt++) { numElem = in.readUint16BE(); if (varnt == _vm->_gameVariant) { _actListArrSize = numElem; - _actListArr = (act **)malloc(sizeof(act *) * _actListArrSize); + _actListArr = (Act **)malloc(sizeof(Act *) * _actListArrSize); } for (int i = 0; i < numElem; i++) { numSubElem = in.readUint16BE(); if (varnt == _vm->_gameVariant) - _actListArr[i] = (act *)malloc(sizeof(act) * (numSubElem + 1)); + _actListArr[i] = (Act *)malloc(sizeof(Act) * (numSubElem + 1)); for (int j = 0; j < numSubElem; j++) { if (varnt == _vm->_gameVariant) { readAct(in, _actListArr[i][j]); @@ -708,7 +708,7 @@ void Scheduler::saveEvents(Common::WriteStream *f) { // Convert event ptrs to indexes for (int16 i = 0; i < kMaxEvents; i++) { - event_t *wrkEvent = &_events[i]; + Event *wrkEvent = &_events[i]; // fix up action pointer (to do better) int16 index, subElem; @@ -1039,7 +1039,7 @@ void Scheduler::saveActions(Common::WriteStream *f) const { /* * Find the index in the action list to be able to serialize the action to save game */ -void Scheduler::findAction(const act* action, int16* index, int16* subElem) { +void Scheduler::findAction(const Act *action, int16 *index, int16 *subElem) { assert(index && subElem); if (!action) { @@ -1104,7 +1104,7 @@ void Scheduler::restoreEvents(Common::ReadStream *f) { if ((index == -1) && (subElem == -1)) _events[i]._action = 0; else - _events[i]._action = (act *)&_actListArr[index][subElem]; + _events[i]._action = (Act *)&_actListArr[index][subElem]; _events[i]._localActionFl = (f->readByte() == 1) ? true : false; _events[i]._time = f->readUint32BE(); @@ -1112,8 +1112,8 @@ void Scheduler::restoreEvents(Common::ReadStream *f) { int16 prevIndex = f->readSint16BE(); int16 nextIndex = f->readSint16BE(); - _events[i]._prevEvent = (prevIndex == -1) ? (event_t *)0 : &_events[prevIndex]; - _events[i]._nextEvent = (nextIndex == -1) ? (event_t *)0 : &_events[nextIndex]; + _events[i]._prevEvent = (prevIndex == -1) ? (Event *)0 : &_events[prevIndex]; + _events[i]._nextEvent = (nextIndex == -1) ? (Event *)0 : &_events[nextIndex]; } _freeEvent = (freeIndex == -1) ? 0 : &_events[freeIndex]; _headEvent = (headIndex == -1) ? 0 : &_events[headIndex]; @@ -1121,7 +1121,7 @@ void Scheduler::restoreEvents(Common::ReadStream *f) { // Adjust times to fit our time uint32 curTime = getTicks(); - event_t *wrkEvent = _headEvent; // The earliest event + Event *wrkEvent = _headEvent; // The earliest event while (wrkEvent) { // While mature events found wrkEvent->_time = wrkEvent->_time - saveTime + curTime; wrkEvent = wrkEvent->_nextEvent; @@ -1132,11 +1132,11 @@ void Scheduler::restoreEvents(Common::ReadStream *f) { * Insert the action pointed to by p into the timer event queue * The queue goes from head (earliest) to tail (latest) timewise */ -void Scheduler::insertAction(act *action) { +void Scheduler::insertAction(Act *action) { debugC(1, kDebugSchedule, "insertAction() - Action type A%d", action->_a0._actType); // First, get and initialize the event structure - event_t *curEvent = getQueue(); + Event *curEvent = getQueue(); curEvent->_action = action; switch (action->_a0._actType) { // Assign whether local or global case AGSCHEDULE: @@ -1158,7 +1158,7 @@ void Scheduler::insertAction(act *action) { _tailEvent = _headEvent = curEvent; curEvent->_nextEvent = curEvent->_prevEvent = 0; } else { - event_t *wrkEvent = _tailEvent; // Search from latest time back + Event *wrkEvent = _tailEvent; // Search from latest time back bool found = false; while (wrkEvent && !found) { @@ -1189,14 +1189,14 @@ void Scheduler::insertAction(act *action) { * It dequeues the event and returns it to the free list. It returns a ptr * to the next action in the list, except special case of NEW_SCREEN */ -event_t *Scheduler::doAction(event_t *curEvent) { +Event *Scheduler::doAction(Event *curEvent) { debugC(1, kDebugSchedule, "doAction - Event action type : %d", curEvent->_action->_a0._actType); - status_t &gameStatus = _vm->getGameStatus(); - act *action = curEvent->_action; - object_t *obj1; - int dx, dy; - event_t *wrkEvent; // Save ev_p->next_p for return + Status &gameStatus = _vm->getGameStatus(); + Act *action = curEvent->_action; + Object *obj1; + int dx, dy; + Event *wrkEvent; // Save ev_p->next_p for return switch (action->_a0._actType) { case ANULL: // Big NOP from DEL_EVENTS @@ -1236,7 +1236,7 @@ event_t *Scheduler::doAction(event_t *curEvent) { _vm->_object->_objects[action->_a9._objIndex]._state = action->_a9._newState; break; case INIT_PATH: // act10: Initialize an object path and velocity - _vm->_object->setPath(action->_a10._objIndex, (path_t) action->_a10._newPathType, action->_a10._vxPath, action->_a10._vyPath); + _vm->_object->setPath(action->_a10._objIndex, (Path) action->_a10._newPathType, action->_a10._vxPath, action->_a10._vyPath); break; case COND_R: // act11: action lists conditional on object state if (_vm->_object->_objects[action->_a11._objIndex]._state == action->_a11._stateReq) @@ -1441,7 +1441,7 @@ event_t *Scheduler::doAction(event_t *curEvent) { * was modified to allow deletes anywhere in the list, and the DEL_EVENT * action was modified to perform the actual delete. */ -void Scheduler::delQueue(event_t *curEvent) { +void Scheduler::delQueue(Event *curEvent) { debugC(4, kDebugSchedule, "delQueue()"); if (curEvent == _headEvent) { // If p was the head ptr @@ -1468,10 +1468,10 @@ void Scheduler::delQueue(event_t *curEvent) { /** * Delete all the active events of a given type */ -void Scheduler::delEventType(const action_t _actTypeDel) { +void Scheduler::delEventType(const Action _actTypeDel) { // Note: actions are not deleted here, simply turned into NOPs! - event_t *wrkEvent = _headEvent; // The earliest event - event_t *saveEvent; + Event *wrkEvent = _headEvent; // The earliest event + Event *saveEvent; while (wrkEvent) { // While events found in list saveEvent = wrkEvent->_nextEvent; @@ -1525,13 +1525,13 @@ void Scheduler_v1d::runScheduler() { debugC(6, kDebugSchedule, "runScheduler"); uint32 ticker = getTicks(); // The time now, in ticks - event_t *curEvent = _headEvent; // The earliest event + Event *curEvent = _headEvent; // The earliest event while (curEvent && (curEvent->_time <= ticker)) // While mature events found curEvent = doAction(curEvent); // Perform the action (returns next_p) } -void Scheduler_v1d::promptAction(act *action) { +void Scheduler_v1d::promptAction(Act *action) { Common::String response; response = Utils::promptBox(_vm->_file->fetchString(action->_a3._promptIndex)); @@ -1574,7 +1574,7 @@ const char *Scheduler_v2d::getCypher() const { return "Copyright 1991, Gray Design Associates"; } -void Scheduler_v2d::promptAction(act *action) { +void Scheduler_v2d::promptAction(Act *action) { Common::String response; response = Utils::promptBox(_vm->_file->fetchString(action->_a3._promptIndex)); @@ -1639,7 +1639,7 @@ void Scheduler_v1w::runScheduler() { debugC(6, kDebugSchedule, "runScheduler"); uint32 ticker = getTicks(); // The time now, in ticks - event_t *curEvent = _headEvent; // The earliest event + Event *curEvent = _headEvent; // The earliest event while (curEvent && (curEvent->_time <= ticker)) // While mature events found curEvent = doAction(curEvent); // Perform the action (returns next_p) diff --git a/engines/hugo/schedule.h b/engines/hugo/schedule.h index 74a65a5c64..37851f1ebc 100644 --- a/engines/hugo/schedule.h +++ b/engines/hugo/schedule.h @@ -37,7 +37,7 @@ namespace Hugo { /** * Following defines the action types and action list */ -enum action_t { // Parameters: +enum Action { // Parameters: ANULL = 0xff, // Special NOP used to 'delete' events in DEL_EVENTS ASCHEDULE = 0, // 0 - Ptr to action list to be rescheduled START_OBJ, // 1 - Object number @@ -56,7 +56,7 @@ enum action_t { // Parameters: SWAP_IMAGES, // 13 - Swap 2 object images COND_SCR, // 14 - Conditional on current screen AUTOPILOT, // 15 - Set object to home in on another (stationary) object - INIT_OBJ_SEQ, // 16 - Object number, sequence index to set curr_seq_p to + INIT_OBJ_SEQ, // 16 - Object number, sequence index to set curr_seqPtr to SET_STATE_BITS, // 17 - Objnum, mask to OR with obj states word CLEAR_STATE_BITS, // 18 - Objnum, mask to ~AND with obj states word TEST_STATE_BITS, // 19 - Objnum, mask to test obj states word @@ -88,33 +88,33 @@ enum action_t { // Parameters: COND_ROUTE, // 45 - Conditional on route in progress INIT_JUMPEXIT, // 46 - Initialize status.jumpexit INIT_VIEW, // 47 - Initialize viewx, viewy, dir - INIT_OBJ_FRAME, // 48 - Object number, seq,frame to set curr_seq_p to + INIT_OBJ_FRAME, // 48 - Object number, seq,frame to set curr_seqPtr to OLD_SONG = 49 // Added by Strangerke - Set currently playing sound, old way: that is, using a string index instead of a reference in a file }; struct act0 { // Type 0 - Schedule - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action uint16 _actIndex; // Ptr to an action list }; struct act1 { // Type 1 - Start an object - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number int _cycleNumb; // Number of times to cycle - cycle_t _cycle; // Direction to start cycling + Cycle _cycle; // Direction to start cycling }; struct act2 { // Type 2 - Initialize an object coords - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number int _x, _y; // Coordinates }; struct act3 { // Type 3 - Prompt user for text - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action uint16 _promptIndex; // Index of prompt string int *_responsePtr; // Array of indexes to valid response string(s) (terminate list with -1) @@ -124,54 +124,54 @@ struct act3 { // Type 3 - Prompt user for }; struct act4 { // Type 4 - Set new background color - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action long _newBackgroundColor; // New color }; struct act5 { // Type 5 - Initialize an object velocity - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number int _vx, _vy; // velocity }; struct act6 { // Type 6 - Initialize an object carrying - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number bool _carriedFl; // carrying }; struct act7 { // Type 7 - Initialize an object to hero's coords - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number }; struct act8 { // Type 8 - switch to new screen - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _screenIndex; // The new screen number }; struct act9 { // Type 9 - Initialize an object state - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number byte _newState; // New state }; struct act10 { // Type 10 - Initialize an object path type - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number int _newPathType; // New path type - int8 _vxPath, _vyPath; // Max delta velocities e.g. for CHASE + int8 _vxPath, _vyPath; // Max delta velocities e.g. for CHASE }; struct act11 { // Type 11 - Conditional on object's state - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number byte _stateReq; // Required state @@ -180,20 +180,20 @@ struct act11 { // Type 11 - Conditional on }; struct act12 { // Type 12 - Simple text box - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _stringIndex; // Index (enum) of string in strings.dat }; struct act13 { // Type 13 - Swap first object image with second - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex1; // Index of first object int _objIndex2; // 2nd }; struct act14 { // Type 14 - Conditional on current screen - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The required object int _screenReq; // The required screen number @@ -202,7 +202,7 @@ struct act14 { // Type 14 - Conditional on }; struct act15 { // Type 15 - Home in on an object - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex1; // The object number homing in int _objIndex2; // The object number to home in on @@ -211,29 +211,29 @@ struct act15 { // Type 15 - Home in on an o // Note: Don't set a sequence at time 0 of a new screen, it causes // problems clearing the boundary bits of the object! timer > 0 is safe -struct act16 { // Type 16 - Set curr_seq_p to seq - action_t _actType; // The type of action +struct act16 { // Type 16 - Set curr_seqPtr to seq + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number int _seqIndex; // The index of seq array to set to }; struct act17 { // Type 17 - SET obj individual state bits - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number int _stateMask; // The mask to OR with current obj state }; struct act18 { // Type 18 - CLEAR obj individual state bits - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number int _stateMask; // The mask to ~AND with current obj state }; struct act19 { // Type 19 - TEST obj individual state bits - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number int _stateMask; // The mask to AND with current obj state @@ -242,35 +242,35 @@ struct act19 { // Type 19 - TEST obj indivi }; struct act20 { // Type 20 - Remove all events with this type of action - action_t _actType; // The type of action - int _timer; // Time to set off the action - action_t _actTypeDel; // The action type to remove + Action _actType; // The type of action + int _timer; // Time to set off the action + Action _actTypeDel; // The action type to remove }; struct act21 { // Type 21 - Gameover. Disable hero & commands - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action }; struct act22 { // Type 22 - Initialize an object to hero's coords - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number }; struct act23 { // Type 23 - Exit game back to DOS - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action }; struct act24 { // Type 24 - Get bonus score - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _pointIndex; // Index into points array }; struct act25 { // Type 25 - Conditional on bounding box - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The required object number int _x1, _y1, _x2, _y2; // The bounding box @@ -279,25 +279,25 @@ struct act25 { // Type 25 - Conditional on }; struct act26 { // Type 26 - Play a sound - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int16 _soundIndex; // Sound index in data file }; struct act27 { // Type 27 - Add object's value to score - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // object number }; struct act28 { // Type 28 - Subtract object's value from score - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // object number }; struct act29 { // Type 29 - Conditional on object carried - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The required object number uint16 _actPassIndex; // Ptr to action list if success @@ -305,7 +305,7 @@ struct act29 { // Type 29 - Conditional on }; struct act30 { // Type 30 - Start special maze processing - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action byte _mazeSize; // Size of (square) maze int _x1, _y1, _x2, _y2; // Bounding box of maze @@ -314,39 +314,39 @@ struct act30 { // Type 30 - Start special m }; struct act31 { // Type 31 - Exit special maze processing - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action }; struct act32 { // Type 32 - Init fbg field of object - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number byte _priority; // Value of foreground/background field }; struct act33 { // Type 33 - Init screen field of object - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number int _screenIndex; // Screen number }; struct act34 { // Type 34 - Global Schedule - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action uint16 _actIndex; // Ptr to an action list }; struct act35 { // Type 35 - Remappe palette - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int16 _oldColorIndex; // Old color index, 0..15 int16 _newColorIndex; // New color index, 0..15 }; struct act36 { // Type 36 - Conditional on noun mentioned - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action uint16 _nounIndex; // The required noun (list) uint16 _actPassIndex; // Ptr to action list if success @@ -354,14 +354,14 @@ struct act36 { // Type 36 - Conditional on }; struct act37 { // Type 37 - Set new screen state - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _screenIndex; // The screen number byte _newState; // The new state }; struct act38 { // Type 38 - Position lips - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _lipsObjIndex; // The LIPS object int _objIndex; // The object to speak @@ -370,19 +370,19 @@ struct act38 { // Type 38 - Position lips }; struct act39 { // Type 39 - Init story mode - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action bool _storyModeFl; // New state of story_mode flag }; struct act40 { // Type 40 - Unsolicited text box - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _stringIndex; // Index (enum) of string in strings.dat }; struct act41 { // Type 41 - Conditional on bonus scored - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _bonusIndex; // Index into bonus list uint16 _actPassIndex; // Index of the action list if scored for the first time @@ -390,13 +390,13 @@ struct act41 { // Type 41 - Conditional on }; struct act42 { // Type 42 - Text box with "take" string - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object taken }; struct act43 { // Type 43 - Prompt user for Yes or No - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _promptIndex; // index of prompt string uint16 _actYesIndex; // Ptr to action list if YES @@ -404,12 +404,12 @@ struct act43 { // Type 43 - Prompt user for }; struct act44 { // Type 44 - Stop any route in progress - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action }; struct act45 { // Type 45 - Conditional on route in progress - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _routeIndex; // Must be >= current status.rindex uint16 _actPassIndex; // Ptr to action list if en-route @@ -417,13 +417,13 @@ struct act45 { // Type 45 - Conditional on }; struct act46 { // Type 46 - Init status.jumpexit - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action bool _jumpExitFl; // New state of jumpexit flag }; struct act47 { // Type 47 - Init viewx,viewy,dir - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object int16 _viewx; // object.viewx @@ -431,8 +431,8 @@ struct act47 { // Type 47 - Init viewx,view int16 _direction; // object.dir }; -struct act48 { // Type 48 - Set curr_seq_p to frame n - action_t _actType; // The type of action +struct act48 { // Type 48 - Set curr_seqPtr to frame n + Action _actType; // The type of action int _timer; // Time to set off the action int _objIndex; // The object number int _seqIndex; // The index of seq array to set to @@ -440,12 +440,12 @@ struct act48 { // Type 48 - Set curr_seq_p }; struct act49 { // Added by Strangerke - Type 49 - Play a song (DOS way) - action_t _actType; // The type of action + Action _actType; // The type of action int _timer; // Time to set off the action uint16 _songIndex; // Song index in string array }; -union act { +union Act { act0 _a0; act1 _a1; act2 _a2; @@ -498,18 +498,18 @@ union act { act49 _a49; }; -struct event_t { - act *_action; // Ptr to action to perform - bool _localActionFl; // true if action is only for this screen - uint32 _time; // (absolute) time to perform action - struct event_t *_prevEvent; // Chain to previous event - struct event_t *_nextEvent; // Chain to next event +struct Event { + Act *_action; // Ptr to action to perform + bool _localActionFl; // true if action is only for this screen + uint32 _time; // (absolute) time to perform action + struct Event *_prevEvent; // Chain to previous event + struct Event *_nextEvent; // Chain to next event }; /** * Following are points for achieving certain actions. */ -struct point_t { +struct Point { byte _score; // The value of the point bool _scoredFl; // Whether scored yet }; @@ -554,36 +554,36 @@ protected: uint16 **_screenActs; byte _numBonuses; - point_t *_points; + Point *_points; uint32 _curTick; // Current system time in ticks uint32 _oldTime; // The previous wall time in ticks uint32 _refreshTimeout; - event_t *_freeEvent; // Free list of event structures - event_t *_headEvent; // Head of list (earliest time) - event_t *_tailEvent; // Tail of list (latest time) - event_t _events[kMaxEvents]; // Statically declare event structures + Event *_freeEvent; // Free list of event structures + Event *_headEvent; // Head of list (earliest time) + Event *_tailEvent; // Tail of list (latest time) + Event _events[kMaxEvents]; // Statically declare event structures - act **_actListArr; + Act **_actListArr; virtual const char *getCypher() const = 0; virtual uint32 getTicks() = 0; - virtual void promptAction(act *action) = 0; + virtual void promptAction(Act *action) = 0; - event_t *doAction(event_t *curEvent); - event_t *getQueue(); + Event *doAction(Event *curEvent); + Event *getQueue(); uint32 getDosTicks(const bool updateFl); uint32 getWinTicks() const; - void delEventType(const action_t actTypeDel); - void delQueue(event_t *curEvent); - void findAction(const act* action, int16* index, int16* subElem); - void insertAction(act *action); - void readAct(Common::ReadStream &in, act &curAct); + void delEventType(const Action actTypeDel); + void delQueue(Event *curEvent); + void findAction(const Act* action, int16* index, int16* subElem); + void insertAction(Act *action); + void readAct(Common::ReadStream &in, Act &curAct); void restoreActions(Common::ReadStream *f); void restoreEvents(Common::ReadStream *f); void restorePoints(Common::ReadStream *in); @@ -605,7 +605,7 @@ public: protected: virtual const char *getCypher() const; virtual uint32 getTicks(); - virtual void promptAction(act *action); + virtual void promptAction(Act *action); }; class Scheduler_v2d : public Scheduler_v1d { @@ -618,7 +618,7 @@ public: protected: virtual const char *getCypher() const; - void promptAction(act *action); + void promptAction(Act *action); }; class Scheduler_v3d : public Scheduler_v2d { diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp index 463a19ae8c..a8b4759d9b 100644 --- a/engines/hugo/sound.cpp +++ b/engines/hugo/sound.cpp @@ -174,8 +174,8 @@ void SoundHandler::toggleSound() { _vm->_config._soundFl = !_vm->_config._soundFl; } -void SoundHandler::playMIDI(sound_pt seq_p, uint16 size) { - _midiPlayer->play(seq_p, size); +void SoundHandler::playMIDI(sound_pt seqPtr, uint16 size) { + _midiPlayer->play(seqPtr, size); } /** -- cgit v1.2.3 From 179427c78f2a634beb4485661bf2b1fc78ef559f Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 13 Jun 2012 21:18:37 +0200 Subject: HUGO: Rename pointers --- engines/hugo/display.cpp | 14 ++-- engines/hugo/display.h | 6 +- engines/hugo/file.cpp | 18 ++--- engines/hugo/file.h | 4 +- engines/hugo/game.h | 2 +- engines/hugo/hugo.cpp | 4 +- engines/hugo/hugo.h | 2 +- engines/hugo/mouse.cpp | 4 +- engines/hugo/object.cpp | 4 +- engines/hugo/object_v1d.cpp | 8 +- engines/hugo/object_v1w.cpp | 8 +- engines/hugo/object_v2d.cpp | 8 +- engines/hugo/object_v3d.cpp | 6 +- engines/hugo/parser.cpp | 4 +- engines/hugo/parser_v1d.cpp | 8 +- engines/hugo/parser_v1w.cpp | 4 +- engines/hugo/parser_v2d.cpp | 6 +- engines/hugo/parser_v3d.cpp | 12 +-- engines/hugo/route.cpp | 4 +- engines/hugo/schedule.cpp | 188 ++++++++++++++++++++++---------------------- engines/hugo/sound.cpp | 14 ++-- engines/hugo/sound.h | 2 +- 22 files changed, 165 insertions(+), 165 deletions(-) diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index 34b0303eee..b86b1f0366 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -657,7 +657,7 @@ void Screen::drawBoundaries() { for (int i = 0; i < _vm->_object->_numObj; i++) { Object *obj = &_vm->_object->_objects[i]; // Get pointer to object - if (obj->_screenIndex == *_vm->_screen_p) { + if (obj->_screenIndex == *_vm->_screenPtr) { if ((obj->_currImagePtr != 0) && (obj->_cycling != kCycleInvisible)) drawRectangle(false, obj->_x + obj->_currImagePtr->_x1, obj->_y + obj->_currImagePtr->_y1, obj->_x + obj->_currImagePtr->_x2, obj->_y + obj->_currImagePtr->_y2, _TLIGHTGREEN); @@ -730,10 +730,10 @@ void Screen_v1d::loadFontArr(Common::ReadStream &in) { * processed object by looking down the current column for an overlay * base byte set (in which case the object is foreground). */ -OverlayState Screen_v1d::findOvl(Seq *seqPtr, ImagePtr dst_p, uint16 y) { +OverlayState Screen_v1d::findOvl(Seq *seqPtr, ImagePtr dstPtr, uint16 y) { debugC(4, kDebugDisplay, "findOvl()"); - uint16 index = (uint16)(dst_p - _frontBuffer) >> 3; + uint16 index = (uint16)(dstPtr - _frontBuffer) >> 3; for (int i = 0; i < seqPtr->_lines-y; i++) { // Each line in object if (_vm->_object->getBaseBoundary(index)) // If any overlay base byte is non-zero then the object is foreground, else back. @@ -799,14 +799,14 @@ void Screen_v1w::loadFontArr(Common::ReadStream &in) { * processed object by looking down the current column for an overlay * base bit set (in which case the object is foreground). */ -OverlayState Screen_v1w::findOvl(Seq *seqPtr, ImagePtr dst_p, uint16 y) { +OverlayState Screen_v1w::findOvl(Seq *seqPtr, ImagePtr dstPtr, uint16 y) { debugC(4, kDebugDisplay, "findOvl()"); for (; y < seqPtr->_lines; y++) { // Each line in object - byte ovb = _vm->_object->getBaseBoundary((uint16)(dst_p - _frontBuffer) >> 3); // Ptr into overlay bits - if (ovb & (0x80 >> ((uint16)(dst_p - _frontBuffer) & 7))) // Overlay bit is set + byte ovb = _vm->_object->getBaseBoundary((uint16)(dstPtr - _frontBuffer) >> 3); // Ptr into overlay bits + if (ovb & (0x80 >> ((uint16)(dstPtr - _frontBuffer) & 7))) // Overlay bit is set return kOvlForeground; // Found a bit - must be foreground - dst_p += kXPix; + dstPtr += kXPix; } return kOvlBackground; // No bits set, must be background diff --git a/engines/hugo/display.h b/engines/hugo/display.h index 5fab2f18cc..00dc1b743c 100644 --- a/engines/hugo/display.h +++ b/engines/hugo/display.h @@ -114,7 +114,7 @@ protected: inline bool isInY(const int16 y, const Rect *rect) const; inline bool isOverlapping(const Rect *rectA, const Rect *rectB) const; - virtual OverlayState findOvl(Seq *seqPtr, ImagePtr dst_p, uint16 y) = 0; + virtual OverlayState findOvl(Seq *seqPtr, ImagePtr dstPtr, uint16 y) = 0; private: byte *_curPalette; @@ -150,7 +150,7 @@ public: void loadFont(int16 fontId); void loadFontArr(Common::ReadStream &in); protected: - OverlayState findOvl(Seq *seqPtr, ImagePtr dst_p, uint16 y); + OverlayState findOvl(Seq *seqPtr, ImagePtr dstPtr, uint16 y); }; class Screen_v1w : public Screen { @@ -161,7 +161,7 @@ public: void loadFont(int16 fontId); void loadFontArr(Common::ReadStream &in); protected: - OverlayState findOvl(Seq *seqPtr, ImagePtr dst_p, uint16 y); + OverlayState findOvl(Seq *seqPtr, ImagePtr dstPtr, uint16 y); }; } // End of namespace Hugo diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp index b78a26241b..5556f5abc0 100644 --- a/engines/hugo/file.cpp +++ b/engines/hugo/file.cpp @@ -92,7 +92,7 @@ const char *FileManager::getUifFilename() const { * Return original plane data ptr */ byte *FileManager::convertPCC(byte *p, const uint16 y, const uint16 bpl, ImagePtr dataPtr) const { - debugC(2, kDebugFile, "convertPCC(byte *p, %d, %d, ImagePtr data_p)", y, bpl); + debugC(2, kDebugFile, "convertPCC(byte *p, %d, %d, ImagePtr dataPtr)", y, bpl); dataPtr += y * bpl * 8; // Point to correct DIB line for (int16 r = 0, g = bpl, b = g + bpl, i = b + bpl; r < bpl; r++, g++, b++, i++) { // Each byte in all planes @@ -282,7 +282,7 @@ void FileManager::readImage(const int objNum, Object *objPtr) { * Read sound (or music) file data. Call with SILENCE to free-up * any allocated memory. Also returns size of data */ -sound_pt FileManager::getSound(const int16 sound, uint16 *size) { +SoundPtr FileManager::getSound(const int16 sound, uint16 *size) { debugC(1, kDebugFile, "getSound(%d)", sound); // No more to do if SILENCE (called for cleanup purposes) @@ -298,25 +298,25 @@ sound_pt FileManager::getSound(const int16 sound, uint16 *size) { if (!_hasReadHeader) { for (int i = 0; i < kMaxSounds; i++) { - _s_hdr[i]._size = fp.readUint16LE(); - _s_hdr[i]._offset = fp.readUint32LE(); + _soundHdr[i]._size = fp.readUint16LE(); + _soundHdr[i]._offset = fp.readUint32LE(); } if (fp.err()) error("Wrong sound file format"); _hasReadHeader = true; } - *size = _s_hdr[sound]._size; + *size = _soundHdr[sound]._size; if (*size == 0) error("Wrong sound file format or missing sound %d", sound); // Allocate memory for sound or music, if possible - sound_pt soundPtr = (byte *)malloc(_s_hdr[sound]._size); // Ptr to sound data + SoundPtr soundPtr = (byte *)malloc(_soundHdr[sound]._size); // Ptr to sound data assert(soundPtr); // Seek to data and read it - fp.seek(_s_hdr[sound]._offset, SEEK_SET); - if (fp.read(soundPtr, _s_hdr[sound]._size) != _s_hdr[sound]._size) + fp.seek(_soundHdr[sound]._offset, SEEK_SET); + if (fp.read(soundPtr, _soundHdr[sound]._size) != _soundHdr[sound]._size) error("Wrong sound file format"); fp.close(); @@ -513,7 +513,7 @@ bool FileManager::restoreGame(const int16 slot) { _vm->_maze._x4 = in->readSint16BE(); _vm->_maze._firstScreenIndex = in->readByte(); - _vm->_scheduler->restoreScreen(*_vm->_screen_p); + _vm->_scheduler->restoreScreen(*_vm->_screenPtr); if ((_vm->getGameStatus()._viewState = (Vstate) in->readByte()) != kViewPlay) _vm->_screen->hideCursor(); diff --git a/engines/hugo/file.h b/engines/hugo/file.h index 151b749ce7..e4aa7f7fec 100644 --- a/engines/hugo/file.h +++ b/engines/hugo/file.h @@ -47,7 +47,7 @@ public: FileManager(HugoEngine *vm); virtual ~FileManager(); - sound_pt getSound(const int16 sound, uint16 *size); + SoundPtr getSound(const int16 sound, uint16 *size); void readBootFile(); void readImage(const int objNum, Object *objPtr); @@ -118,7 +118,7 @@ protected: // If this is the first call, read the lookup table bool _hasReadHeader; - SoundHdr _s_hdr[kMaxSounds]; // Sound lookup table + SoundHdr _soundHdr[kMaxSounds]; // Sound lookup table private: byte *convertPCC(byte *p, const uint16 y, const uint16 bpl, ImagePtr dataPtr) const; diff --git a/engines/hugo/game.h b/engines/hugo/game.h index 29e3bf9b55..ed49ee8cbe 100644 --- a/engines/hugo/game.h +++ b/engines/hugo/game.h @@ -95,7 +95,7 @@ struct hugoBoot { // Common HUGO boot file * Game specific type definitions */ typedef byte *ImagePtr; // ptr to an object image (sprite) -typedef byte *sound_pt; // ptr to sound (or music) data +typedef byte *SoundPtr; // ptr to sound (or music) data /** * Structure for initializing maze processing diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index 5ae43b8b5a..f2db630198 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -427,7 +427,7 @@ bool HugoEngine::loadHugoDat() { _scheduler->loadActListArr(in); _scheduler->loadAlNewscrIndex(in); _hero = &_object->_objects[kHeroIndex]; // This always points to hero - _screen_p = &(_object->_objects[kHeroIndex]._screenIndex); // Current screen is hero's + _screenPtr = &(_object->_objects[kHeroIndex]._screenIndex); // Current screen is hero's _heroImage = kHeroIndex; // Current in use hero image for (int varnt = 0; varnt < _numVariant; varnt++) { @@ -660,7 +660,7 @@ void HugoEngine::readScreenFiles(const int screenNum) { void HugoEngine::setNewScreen(const int screenNum) { debugC(1, kDebugEngine, "setNewScreen(%d)", screenNum); - *_screen_p = screenNum; // HERO object + *_screenPtr = screenNum; // HERO object _object->setCarriedScreen(screenNum); // Carried objects } diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h index 312f2272db..9f495a9037 100644 --- a/engines/hugo/hugo.h +++ b/engines/hugo/hugo.h @@ -226,7 +226,7 @@ public: int8 _normalTPS; // Number of ticks (frames) per second. // 8 for Win versions, 9 for DOS versions Object *_hero; - byte *_screen_p; + byte *_screenPtr; byte _heroImage; byte *_screenStates; Command _line; // Line of user text input diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp index fef3cca608..a95170696c 100644 --- a/engines/hugo/mouse.cpp +++ b/engines/hugo/mouse.cpp @@ -223,7 +223,7 @@ void MouseHandler::processLeftClick(const int16 objId, const int16 cx, const int _vm->_screen->displayList(kDisplayAdd, 0, kDibOffY, kXPix, kInvDy); break; case kExitHotspot: // Walk to exit hotspot - i = findExit(cx, cy, *_vm->_screen_p); + i = findExit(cx, cy, *_vm->_screenPtr); x = _hotspots[i]._viewx; y = _hotspots[i]._viewy; if (x >= 0) { // Hotspot refers to an exit @@ -327,7 +327,7 @@ void MouseHandler::mouseHandler() { // Process cursor over an exit hotspot if (objId == -1) { - int i = findExit(cx, cy, *_vm->_screen_p); + int i = findExit(cx, cy, *_vm->_screenPtr); if (i != -1 && _hotspots[i]._viewx >= 0) { objId = kExitHotspot; cursorText(_vm->_text->getTextMouse(kMsExit), cx, cy, U_FONT8, _TBRIGHTWHITE); diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp index e0dd0abd49..7b4783e4d8 100644 --- a/engines/hugo/object.cpp +++ b/engines/hugo/object.cpp @@ -199,7 +199,7 @@ int16 ObjectHandler::findObject(uint16 x, uint16 y) { // Check objects on screen for (int i = 0; i < _numObj; i++, obj++) { // Object must be in current screen and "useful" - if (obj->_screenIndex == *_vm->_screen_p && (obj->_genericCmd || obj->_objValue || obj->_cmdIndex)) { + if (obj->_screenIndex == *_vm->_screenPtr && (obj->_genericCmd || obj->_objValue || obj->_cmdIndex)) { Seq *curImage = obj->_currImagePtr; // Object must have a visible image... if (curImage != 0 && obj->_cycling != kCycleInvisible) { @@ -347,7 +347,7 @@ void ObjectHandler::showTakeables() { for (int j = 0; j < _numObj; j++) { Object *obj = &_objects[j]; if ((obj->_cycling != kCycleInvisible) && - (obj->_screenIndex == *_vm->_screen_p) && + (obj->_screenIndex == *_vm->_screenPtr) && (((TAKE & obj->_genericCmd) == TAKE) || obj->_objValue)) { Utils::notifyBox(Common::String::format("You can also see:\n%s.", _vm->_text->getNoun(obj->_nounIndex, LOOK_NAME))); } diff --git a/engines/hugo/object_v1d.cpp b/engines/hugo/object_v1d.cpp index e5fedb3b2a..7f88e9e5b8 100644 --- a/engines/hugo/object_v1d.cpp +++ b/engines/hugo/object_v1d.cpp @@ -64,7 +64,7 @@ void ObjectHandler_v1d::updateImages() { for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; - if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling >= kCycleAlmostInvisible)) + if ((obj->_screenIndex == *_vm->_screenPtr) && (obj->_cycling >= kCycleAlmostInvisible)) objindex[objNumb++] = i; } @@ -185,7 +185,7 @@ void ObjectHandler_v1d::moveObjects() { for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; // Get pointer to object Seq *currImage = obj->_currImagePtr; // Get ptr to current image - if (obj->_screenIndex == *_vm->_screen_p) { + if (obj->_screenIndex == *_vm->_screenPtr) { switch (obj->_pathType) { case kPathChase: { // Allowable motion wrt boundary @@ -272,7 +272,7 @@ void ObjectHandler_v1d::moveObjects() { // Move objects, allowing for boundaries for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; // Get pointer to object - if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_vx || obj->_vy)) { + if ((obj->_screenIndex == *_vm->_screenPtr) && (obj->_vx || obj->_vy)) { // Only process if it's moving // Do object movement. Delta_x,y return allowed movement in x,y @@ -327,7 +327,7 @@ void ObjectHandler_v1d::moveObjects() { for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; // Get pointer to object Seq *currImage = obj->_currImagePtr; // Get ptr to current image - if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) + if ((obj->_screenIndex == *_vm->_screenPtr) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) clearBoundary(obj->_oldx + currImage->_x1, obj->_oldx + currImage->_x2, obj->_oldy + currImage->_y2); } diff --git a/engines/hugo/object_v1w.cpp b/engines/hugo/object_v1w.cpp index e1e8496d9d..61b0f2e48a 100644 --- a/engines/hugo/object_v1w.cpp +++ b/engines/hugo/object_v1w.cpp @@ -64,7 +64,7 @@ void ObjectHandler_v1w::updateImages() { for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; - if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling >= kCycleAlmostInvisible)) + if ((obj->_screenIndex == *_vm->_screenPtr) && (obj->_cycling >= kCycleAlmostInvisible)) objindex[objNumb++] = i; } @@ -182,7 +182,7 @@ void ObjectHandler_v1w::moveObjects() { for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; // Get pointer to object Seq *currImage = obj->_currImagePtr; // Get ptr to current image - if (obj->_screenIndex == *_vm->_screen_p) { + if (obj->_screenIndex == *_vm->_screenPtr) { switch (obj->_pathType) { case kPathChase: case kPathChase2: { @@ -282,7 +282,7 @@ void ObjectHandler_v1w::moveObjects() { // Move objects, allowing for boundaries for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; // Get pointer to object - if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_vx || obj->_vy)) { + if ((obj->_screenIndex == *_vm->_screenPtr) && (obj->_vx || obj->_vy)) { // Only process if it's moving // Do object movement. Delta_x,y return allowed movement in x,y @@ -337,7 +337,7 @@ void ObjectHandler_v1w::moveObjects() { for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; // Get pointer to object Seq *currImage = obj->_currImagePtr; // Get ptr to current image - if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) + if ((obj->_screenIndex == *_vm->_screenPtr) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) clearBoundary(obj->_oldx + currImage->_x1, obj->_oldx + currImage->_x2, obj->_oldy + currImage->_y2); } diff --git a/engines/hugo/object_v2d.cpp b/engines/hugo/object_v2d.cpp index f0d83269d5..7cb6c20dd0 100644 --- a/engines/hugo/object_v2d.cpp +++ b/engines/hugo/object_v2d.cpp @@ -64,7 +64,7 @@ void ObjectHandler_v2d::updateImages() { for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; - if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling >= kCycleAlmostInvisible)) + if ((obj->_screenIndex == *_vm->_screenPtr) && (obj->_cycling >= kCycleAlmostInvisible)) objindex[objNumb++] = i; } @@ -185,7 +185,7 @@ void ObjectHandler_v2d::moveObjects() { for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; // Get pointer to object Seq *currImage = obj->_currImagePtr; // Get ptr to current image - if (obj->_screenIndex == *_vm->_screen_p) { + if (obj->_screenIndex == *_vm->_screenPtr) { switch (obj->_pathType) { case kPathChase: case kPathChase2: { @@ -285,7 +285,7 @@ void ObjectHandler_v2d::moveObjects() { // Move objects, allowing for boundaries for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; // Get pointer to object - if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_vx || obj->_vy)) { + if ((obj->_screenIndex == *_vm->_screenPtr) && (obj->_vx || obj->_vy)) { // Only process if it's moving // Do object movement. Delta_x,y return allowed movement in x,y @@ -340,7 +340,7 @@ void ObjectHandler_v2d::moveObjects() { for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; // Get pointer to object Seq *currImage = obj->_currImagePtr; // Get ptr to current image - if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) + if ((obj->_screenIndex == *_vm->_screenPtr) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) clearBoundary(obj->_oldx + currImage->_x1, obj->_oldx + currImage->_x2, obj->_oldy + currImage->_y2); } diff --git a/engines/hugo/object_v3d.cpp b/engines/hugo/object_v3d.cpp index 13c9c8c93d..7bb4b95b4a 100644 --- a/engines/hugo/object_v3d.cpp +++ b/engines/hugo/object_v3d.cpp @@ -66,7 +66,7 @@ void ObjectHandler_v3d::moveObjects() { for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; // Get pointer to object Seq *currImage = obj->_currImagePtr; // Get ptr to current image - if (obj->_screenIndex == *_vm->_screen_p) { + if (obj->_screenIndex == *_vm->_screenPtr) { switch (obj->_pathType) { case kPathChase: case kPathChase2: { @@ -167,7 +167,7 @@ void ObjectHandler_v3d::moveObjects() { // Move objects, allowing for boundaries for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; // Get pointer to object - if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_vx || obj->_vy)) { + if ((obj->_screenIndex == *_vm->_screenPtr) && (obj->_vx || obj->_vy)) { // Only process if it's moving // Do object movement. Delta_x,y return allowed movement in x,y @@ -222,7 +222,7 @@ void ObjectHandler_v3d::moveObjects() { for (int i = 0; i < _numObj; i++) { Object *obj = &_objects[i]; // Get pointer to object Seq *currImage = obj->_currImagePtr; // Get ptr to current image - if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) + if ((obj->_screenIndex == *_vm->_screenPtr) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) clearBoundary(obj->_oldx + currImage->_x1, obj->_oldx + currImage->_x2, obj->_oldy + currImage->_y2); } diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp index 68343a0374..d18cc2181c 100644 --- a/engines/hugo/parser.cpp +++ b/engines/hugo/parser.cpp @@ -164,11 +164,11 @@ void Parser::loadArrayReqs(Common::SeekableReadStream &in) { const char *Parser::useBG(const char *name) { debugC(1, kDebugEngine, "useBG(%s)", name); - ObjectList p = _backgroundObjects[*_vm->_screen_p]; + ObjectList p = _backgroundObjects[*_vm->_screenPtr]; for (int i = 0; p[i]._verbIndex != 0; i++) { if ((name == _vm->_text->getNoun(p[i]._nounIndex, 0) && p[i]._verbIndex != _vm->_look) && - ((p[i]._roomState == kStateDontCare) || (p[i]._roomState == _vm->_screenStates[*_vm->_screen_p]))) + ((p[i]._roomState == kStateDontCare) || (p[i]._roomState == _vm->_screenStates[*_vm->_screenPtr]))) return _vm->_text->getVerb(p[i]._verbIndex, 0); } diff --git a/engines/hugo/parser_v1d.cpp b/engines/hugo/parser_v1d.cpp index f29a03f796..f29b0161f5 100644 --- a/engines/hugo/parser_v1d.cpp +++ b/engines/hugo/parser_v1d.cpp @@ -87,7 +87,7 @@ bool Parser_v1d::isNear_v1(const char *verb, const char *noun, Object *obj, char return false; } else if (obj->_carriedFl) { // Object is being carried return true; - } else if (obj->_screenIndex != *_vm->_screen_p) { // Not in same screen + } else if (obj->_screenIndex != *_vm->_screenPtr) { // Not in same screen if (obj->_objValue) strcpy (comment, _vm->_text->getTextParser(kCmtAny4)); return false; @@ -268,7 +268,7 @@ void Parser_v1d::dropObject(Object *obj) { debugC(1, kDebugParser, "dropObject(Object *obj)"); obj->_carriedFl = false; - obj->_screenIndex = *_vm->_screen_p; + obj->_screenIndex = *_vm->_screenPtr; if (obj->_seqNumb) // Don't change if no image to display obj->_cycling = kCycleNotCycling; obj->_x = _vm->_hero->_x - 1; @@ -410,7 +410,7 @@ void Parser_v1d::lineHandler() { return; } } - if ((*farComment == '\0') && isBackgroundWord_v1(noun, verb, _backgroundObjects[*_vm->_screen_p])) + if ((*farComment == '\0') && isBackgroundWord_v1(noun, verb, _backgroundObjects[*_vm->_screenPtr])) return; } while (noun); } @@ -418,7 +418,7 @@ void Parser_v1d::lineHandler() { if (*farComment != '\0') // An object matched but not near enough Utils::notifyBox(farComment); else if (!isCatchallVerb_v1(true, noun, verb, _catchallList) && - !isCatchallVerb_v1(false, noun, verb, _backgroundObjects[*_vm->_screen_p]) && + !isCatchallVerb_v1(false, noun, verb, _backgroundObjects[*_vm->_screenPtr]) && !isCatchallVerb_v1(false, noun, verb, _catchallList)) Utils::notifyBox(_vm->_text->getTextParser(kTBEh_1d)); } diff --git a/engines/hugo/parser_v1w.cpp b/engines/hugo/parser_v1w.cpp index 8c0da63554..3722ccc0e1 100644 --- a/engines/hugo/parser_v1w.cpp +++ b/engines/hugo/parser_v1w.cpp @@ -166,9 +166,9 @@ void Parser_v1w::lineHandler() { } // No objects match command line, try background and catchall commands - if (isBackgroundWord_v3(_backgroundObjects[*_vm->_screen_p])) + if (isBackgroundWord_v3(_backgroundObjects[*_vm->_screenPtr])) return; - if (isCatchallVerb_v3(_backgroundObjects[*_vm->_screen_p])) + if (isCatchallVerb_v3(_backgroundObjects[*_vm->_screenPtr])) return; if (isBackgroundWord_v3(_catchallList)) diff --git a/engines/hugo/parser_v2d.cpp b/engines/hugo/parser_v2d.cpp index 674836b90e..6d71186f49 100644 --- a/engines/hugo/parser_v2d.cpp +++ b/engines/hugo/parser_v2d.cpp @@ -160,15 +160,15 @@ void Parser_v2d::lineHandler() { return; } } - if ((*farComment != '\0') && isBackgroundWord_v1(noun, verb, _backgroundObjects[*_vm->_screen_p])) + if ((*farComment != '\0') && isBackgroundWord_v1(noun, verb, _backgroundObjects[*_vm->_screenPtr])) return; } while (noun); } noun = findNextNoun(noun); - if ( !isCatchallVerb_v1(true, noun, verb, _backgroundObjects[*_vm->_screen_p]) + if ( !isCatchallVerb_v1(true, noun, verb, _backgroundObjects[*_vm->_screenPtr]) && !isCatchallVerb_v1(true, noun, verb, _catchallList) - && !isCatchallVerb_v1(false, noun, verb, _backgroundObjects[*_vm->_screen_p]) + && !isCatchallVerb_v1(false, noun, verb, _backgroundObjects[*_vm->_screenPtr]) && !isCatchallVerb_v1(false, noun, verb, _catchallList)) { if (*farComment != '\0') { // An object matched but not near enough Utils::notifyBox(farComment); diff --git a/engines/hugo/parser_v3d.cpp b/engines/hugo/parser_v3d.cpp index 9bbaf49f67..a7e5896833 100644 --- a/engines/hugo/parser_v3d.cpp +++ b/engines/hugo/parser_v3d.cpp @@ -168,9 +168,9 @@ void Parser_v3d::lineHandler() { } // No objects match command line, try background and catchall commands - if (isBackgroundWord_v3(_backgroundObjects[*_vm->_screen_p])) + if (isBackgroundWord_v3(_backgroundObjects[*_vm->_screenPtr])) return; - if (isCatchallVerb_v3(_backgroundObjects[*_vm->_screen_p])) + if (isCatchallVerb_v3(_backgroundObjects[*_vm->_screenPtr])) return; if (isBackgroundWord_v3(_catchallList)) @@ -319,7 +319,7 @@ bool Parser_v3d::isNear_v3(Object *obj, const char *verb, char *comment) const { if (obj->_carriedFl) // Object is being carried return true; - if (obj->_screenIndex != *_vm->_screen_p) { + if (obj->_screenIndex != *_vm->_screenPtr) { // Not in same screen if (obj->_objValue) strcpy(comment, _vm->_text->getTextParser(kCmtAny1)); @@ -389,7 +389,7 @@ void Parser_v3d::dropObject(Object *obj) { debugC(1, kDebugParser, "dropObject(Object *obj)"); obj->_carriedFl = false; - obj->_screenIndex = *_vm->_screen_p; + obj->_screenIndex = *_vm->_screenPtr; if ((obj->_seqNumb > 1) || (obj->_seqList[0]._imageNbr > 1)) obj->_cycling = kCycleForward; else @@ -417,7 +417,7 @@ bool Parser_v3d::isCatchallVerb_v3(ObjectList obj) const { if (isWordPresent(_vm->_text->getVerbArray(obj[i]._verbIndex)) && obj[i]._nounIndex == 0 && (!obj[i]._matchFl || !findNoun()) && ((obj[i]._roomState == kStateDontCare) || - (obj[i]._roomState == _vm->_screenStates[*_vm->_screen_p]))) { + (obj[i]._roomState == _vm->_screenStates[*_vm->_screenPtr]))) { Utils::notifyBox(_vm->_file->fetchString(obj[i]._commentIndex)); _vm->_scheduler->processBonus(obj[i]._bonusIndex); @@ -445,7 +445,7 @@ bool Parser_v3d::isBackgroundWord_v3(ObjectList obj) const { if (isWordPresent(_vm->_text->getVerbArray(obj[i]._verbIndex)) && isWordPresent(_vm->_text->getNounArray(obj[i]._nounIndex)) && ((obj[i]._roomState == kStateDontCare) || - (obj[i]._roomState == _vm->_screenStates[*_vm->_screen_p]))) { + (obj[i]._roomState == _vm->_screenStates[*_vm->_screenPtr]))) { Utils::notifyBox(_vm->_file->fetchString(obj[i]._commentIndex)); _vm->_scheduler->processBonus(obj[i]._bonusIndex); return true; diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp index 45d72bafb1..54dae88c28 100644 --- a/engines/hugo/route.cpp +++ b/engines/hugo/route.cpp @@ -335,7 +335,7 @@ bool Route::findRoute(const int16 cx, const int16 cy) { Object *obj; // Ptr to object int i; for (i = 1, obj = &_vm->_object->_objects[i]; i < _vm->_object->_numObj; i++, obj++) { - if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling != kCycleInvisible) && (obj->_priority == kPriorityFloating)) + if ((obj->_screenIndex == *_vm->_screenPtr) && (obj->_cycling != kCycleInvisible) && (obj->_priority == kPriorityFloating)) _vm->_object->storeBoundary(obj->_oldx + obj->_currImagePtr->_x1, obj->_oldx + obj->_currImagePtr->_x2, obj->_oldy + obj->_currImagePtr->_y2); } @@ -350,7 +350,7 @@ bool Route::findRoute(const int16 cx, const int16 cy) { // Clear all object baselines from objbound for (i = 0, obj = _vm->_object->_objects; i < _vm->_object->_numObj; i++, obj++) { - if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling != kCycleInvisible) && (obj->_priority == kPriorityFloating)) + if ((obj->_screenIndex == *_vm->_screenPtr) && (obj->_cycling != kCycleInvisible) && (obj->_priority == kPriorityFloating)) _vm->_object->clearBoundary(obj->_oldx + obj->_currImagePtr->_x1, obj->_oldx + obj->_currImagePtr->_x2, obj->_oldy + obj->_currImagePtr->_y2); } diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp index 3bbec6670e..32b8a47df7 100644 --- a/engines/hugo/schedule.cpp +++ b/engines/hugo/schedule.cpp @@ -66,12 +66,12 @@ void Scheduler::initCypher() { void Scheduler::initEventQueue() { debugC(1, kDebugSchedule, "initEventQueue"); - // Chain next_p from first to last + // Chain nextEvent from first to last for (int i = kMaxEvents; --i;) _events[i - 1]._nextEvent = &_events[i]; _events[kMaxEvents - 1]._nextEvent = 0; - // Chain prev_p from last to first + // Chain prevEvent from last to first for (int i = 1; i < kMaxEvents; i++) _events[i]._prevEvent = &_events[i - 1]; _events[0]._prevEvent = 0; @@ -658,28 +658,28 @@ void Scheduler::processMaze(const int x1, const int x2, const int y1, const int if (x1 < _vm->_maze._x1) { // Exit west - _actListArr[_alNewscrIndex][3]._a8._screenIndex = *_vm->_screen_p - 1; + _actListArr[_alNewscrIndex][3]._a8._screenIndex = *_vm->_screenPtr - 1; _actListArr[_alNewscrIndex][0]._a2._x = _vm->_maze._x2 - kShiftSize - (x2 - x1); _actListArr[_alNewscrIndex][0]._a2._y = _vm->_hero->_y; _vm->_route->resetRoute(); insertActionList(_alNewscrIndex); } else if (x2 > _vm->_maze._x2) { // Exit east - _actListArr[_alNewscrIndex][3]._a8._screenIndex = *_vm->_screen_p + 1; + _actListArr[_alNewscrIndex][3]._a8._screenIndex = *_vm->_screenPtr + 1; _actListArr[_alNewscrIndex][0]._a2._x = _vm->_maze._x1 + kShiftSize; _actListArr[_alNewscrIndex][0]._a2._y = _vm->_hero->_y; _vm->_route->resetRoute(); insertActionList(_alNewscrIndex); } else if (y1 < _vm->_maze._y1 - kShiftSize) { // Exit north - _actListArr[_alNewscrIndex][3]._a8._screenIndex = *_vm->_screen_p - _vm->_maze._size; + _actListArr[_alNewscrIndex][3]._a8._screenIndex = *_vm->_screenPtr - _vm->_maze._size; _actListArr[_alNewscrIndex][0]._a2._x = _vm->_maze._x3; _actListArr[_alNewscrIndex][0]._a2._y = _vm->_maze._y2 - kShiftSize - (y2 - y1); _vm->_route->resetRoute(); insertActionList(_alNewscrIndex); } else if (y2 > _vm->_maze._y2 - kShiftSize / 2) { // Exit south - _actListArr[_alNewscrIndex][3]._a8._screenIndex = *_vm->_screen_p + _vm->_maze._size; + _actListArr[_alNewscrIndex][3]._a8._screenIndex = *_vm->_screenPtr + _vm->_maze._size; _actListArr[_alNewscrIndex][0]._a2._x = _vm->_maze._x4; _actListArr[_alNewscrIndex][0]._a2._y = _vm->_maze._y1 + kShiftSize; _vm->_route->resetRoute(); @@ -1090,10 +1090,10 @@ void Scheduler::restoreSchedulerData(Common::ReadStream *in) { void Scheduler::restoreEvents(Common::ReadStream *f) { debugC(1, kDebugSchedule, "restoreEvents"); - uint32 saveTime = f->readUint32BE(); // time of save - int16 freeIndex = f->readSint16BE(); // Free list index - int16 headIndex = f->readSint16BE(); // Head of list index - int16 tailIndex = f->readSint16BE(); // Tail of list index + uint32 saveTime = f->readUint32BE(); // time of save + int16 freeIndex = f->readSint16BE(); // Free list index + int16 headIndex = f->readSint16BE(); // Head of list index + int16 tailIndex = f->readSint16BE(); // Tail of list index // Restore events indexes to pointers for (int i = 0; i < kMaxEvents; i++) { @@ -1121,8 +1121,8 @@ void Scheduler::restoreEvents(Common::ReadStream *f) { // Adjust times to fit our time uint32 curTime = getTicks(); - Event *wrkEvent = _headEvent; // The earliest event - while (wrkEvent) { // While mature events found + Event *wrkEvent = _headEvent; // The earliest event + while (wrkEvent) { // While mature events found wrkEvent->_time = wrkEvent->_time - saveTime + curTime; wrkEvent = wrkEvent->_nextEvent; } @@ -1140,31 +1140,31 @@ void Scheduler::insertAction(Act *action) { curEvent->_action = action; switch (action->_a0._actType) { // Assign whether local or global case AGSCHEDULE: - curEvent->_localActionFl = false; // Lasts over a new screen + curEvent->_localActionFl = false; // Lasts over a new screen break; // Workaround: When dying, switch to storyMode in order to block the keyboard. case GAMEOVER: _vm->getGameStatus()._storyModeFl = true; // No break on purpose default: - curEvent->_localActionFl = true; // Rest are for current screen only + curEvent->_localActionFl = true; // Rest are for current screen only break; } curEvent->_time = action->_a0._timer + getTicks(); // Convert rel to abs time // Now find the place to insert the event - if (!_tailEvent) { // Empty queue + if (!_tailEvent) { // Empty queue _tailEvent = _headEvent = curEvent; curEvent->_nextEvent = curEvent->_prevEvent = 0; } else { - Event *wrkEvent = _tailEvent; // Search from latest time back + Event *wrkEvent = _tailEvent; // Search from latest time back bool found = false; while (wrkEvent && !found) { - if (wrkEvent->_time <= curEvent->_time) { // Found if new event later + if (wrkEvent->_time <= curEvent->_time) { // Found if new event later found = true; - if (wrkEvent == _tailEvent) // New latest in list + if (wrkEvent == _tailEvent) // New latest in list _tailEvent = curEvent; else wrkEvent->_nextEvent->_prevEvent = curEvent; @@ -1175,8 +1175,8 @@ void Scheduler::insertAction(Act *action) { wrkEvent = wrkEvent->_prevEvent; } - if (!found) { // Must be earliest in list - _headEvent->_prevEvent = curEvent; // So insert as new head + if (!found) { // Must be earliest in list + _headEvent->_prevEvent = curEvent; // So insert as new head curEvent->_nextEvent = _headEvent; curEvent->_prevEvent = 0; _headEvent = curEvent; @@ -1196,106 +1196,106 @@ Event *Scheduler::doAction(Event *curEvent) { Act *action = curEvent->_action; Object *obj1; int dx, dy; - Event *wrkEvent; // Save ev_p->next_p for return + Event *wrkEvent; // Save ev_p->nextEvent for return switch (action->_a0._actType) { - case ANULL: // Big NOP from DEL_EVENTS + case ANULL: // Big NOP from DEL_EVENTS break; - case ASCHEDULE: // act0: Schedule an action list + case ASCHEDULE: // act0: Schedule an action list insertActionList(action->_a0._actIndex); break; - case START_OBJ: // act1: Start an object cycling + case START_OBJ: // act1: Start an object cycling _vm->_object->_objects[action->_a1._objIndex]._cycleNumb = action->_a1._cycleNumb; _vm->_object->_objects[action->_a1._objIndex]._cycling = action->_a1._cycle; break; - case INIT_OBJXY: // act2: Initialize an object + case INIT_OBJXY: // act2: Initialize an object _vm->_object->_objects[action->_a2._objIndex]._x = action->_a2._x; // Coordinates _vm->_object->_objects[action->_a2._objIndex]._y = action->_a2._y; break; - case PROMPT: // act3: Prompt user for key phrase + case PROMPT: // act3: Prompt user for key phrase promptAction(action); break; - case BKGD_COLOR: // act4: Set new background color + case BKGD_COLOR: // act4: Set new background color _vm->_screen->setBackgroundColor(action->_a4._newBackgroundColor); break; - case INIT_OBJVXY: // act5: Initialize an object velocity + case INIT_OBJVXY: // act5: Initialize an object velocity _vm->_object->setVelocity(action->_a5._objIndex, action->_a5._vx, action->_a5._vy); break; - case INIT_CARRY: // act6: Initialize an object + case INIT_CARRY: // act6: Initialize an object _vm->_object->setCarry(action->_a6._objIndex, action->_a6._carriedFl); // carried status break; - case INIT_HF_COORD: // act7: Initialize an object to hero's "feet" coords + case INIT_HF_COORD: // act7: Initialize an object to hero's "feet" coords _vm->_object->_objects[action->_a7._objIndex]._x = _vm->_hero->_x - 1; _vm->_object->_objects[action->_a7._objIndex]._y = _vm->_hero->_y + _vm->_hero->_currImagePtr->_y2 - 1; - _vm->_object->_objects[action->_a7._objIndex]._screenIndex = *_vm->_screen_p; // Don't forget screen! + _vm->_object->_objects[action->_a7._objIndex]._screenIndex = *_vm->_screenPtr; // Don't forget screen! break; - case NEW_SCREEN: // act8: Start new screen + case NEW_SCREEN: // act8: Start new screen newScreen(action->_a8._screenIndex); break; - case INIT_OBJSTATE: // act9: Initialize an object state + case INIT_OBJSTATE: // act9: Initialize an object state _vm->_object->_objects[action->_a9._objIndex]._state = action->_a9._newState; break; - case INIT_PATH: // act10: Initialize an object path and velocity + case INIT_PATH: // act10: Initialize an object path and velocity _vm->_object->setPath(action->_a10._objIndex, (Path) action->_a10._newPathType, action->_a10._vxPath, action->_a10._vyPath); break; - case COND_R: // act11: action lists conditional on object state + case COND_R: // act11: action lists conditional on object state if (_vm->_object->_objects[action->_a11._objIndex]._state == action->_a11._stateReq) insertActionList(action->_a11._actPassIndex); else insertActionList(action->_a11._actFailIndex); break; - case TEXT: // act12: Text box (CF WARN) + case TEXT: // act12: Text box (CF WARN) Utils::notifyBox(_vm->_file->fetchString(action->_a12._stringIndex)); // Fetch string from file break; - case SWAP_IMAGES: // act13: Swap 2 object images + case SWAP_IMAGES: // act13: Swap 2 object images _vm->_object->swapImages(action->_a13._objIndex1, action->_a13._objIndex2); break; - case COND_SCR: // act14: Conditional on current screen + case COND_SCR: // act14: Conditional on current screen if (_vm->_object->_objects[action->_a14._objIndex]._screenIndex == action->_a14._screenReq) insertActionList(action->_a14._actPassIndex); else insertActionList(action->_a14._actFailIndex); break; - case AUTOPILOT: // act15: Home in on a (stationary) object + case AUTOPILOT: // act15: Home in on a (stationary) object _vm->_object->homeIn(action->_a15._objIndex1, action->_a15._objIndex2, action->_a15._dx, action->_a15._dy); break; - case INIT_OBJ_SEQ: // act16: Set sequence number to use + case INIT_OBJ_SEQ: // act16: Set sequence number to use // Note: Don't set a sequence at time 0 of a new screen, it causes // problems clearing the boundary bits of the object! t>0 is safe _vm->_object->_objects[action->_a16._objIndex]._currImagePtr = _vm->_object->_objects[action->_a16._objIndex]._seqList[action->_a16._seqIndex]._seqPtr; break; - case SET_STATE_BITS: // act17: OR mask with curr obj state + case SET_STATE_BITS: // act17: OR mask with curr obj state _vm->_object->_objects[action->_a17._objIndex]._state |= action->_a17._stateMask; break; - case CLEAR_STATE_BITS: // act18: AND ~mask with curr obj state + case CLEAR_STATE_BITS: // act18: AND ~mask with curr obj state _vm->_object->_objects[action->_a18._objIndex]._state &= ~action->_a18._stateMask; break; - case TEST_STATE_BITS: // act19: If all bits set, do apass else afail + case TEST_STATE_BITS: // act19: If all bits set, do apass else afail if ((_vm->_object->_objects[action->_a19._objIndex]._state & action->_a19._stateMask) == action->_a19._stateMask) insertActionList(action->_a19._actPassIndex); else insertActionList(action->_a19._actFailIndex); break; - case DEL_EVENTS: // act20: Remove all events of this action type + case DEL_EVENTS: // act20: Remove all events of this action type delEventType(action->_a20._actTypeDel); break; - case GAMEOVER: // act21: Game over! + case GAMEOVER: // act21: Game over! // NOTE: Must wait at least 1 tick before issuing this action if // any objects are to be made invisible! gameStatus._gameOverFl = true; break; - case INIT_HH_COORD: // act22: Initialize an object to hero's actual coords + case INIT_HH_COORD: // act22: Initialize an object to hero's actual coords _vm->_object->_objects[action->_a22._objIndex]._x = _vm->_hero->_x; _vm->_object->_objects[action->_a22._objIndex]._y = _vm->_hero->_y; - _vm->_object->_objects[action->_a22._objIndex]._screenIndex = *_vm->_screen_p;// Don't forget screen! + _vm->_object->_objects[action->_a22._objIndex]._screenIndex = *_vm->_screenPtr;// Don't forget screen! break; - case EXIT: // act23: Exit game back to DOS + case EXIT: // act23: Exit game back to DOS _vm->endGame(); break; - case BONUS: // act24: Get bonus score for action + case BONUS: // act24: Get bonus score for action processBonus(action->_a24._pointIndex); break; - case COND_BOX: // act25: Conditional on bounding box + case COND_BOX: // act25: Conditional on bounding box obj1 = &_vm->_object->_objects[action->_a25._objIndex]; dx = obj1->_x + obj1->_currImagePtr->_x1; dy = obj1->_y + obj1->_currImagePtr->_y2; @@ -1305,25 +1305,25 @@ Event *Scheduler::doAction(Event *curEvent) { else insertActionList(action->_a25._actFailIndex); break; - case SOUND: // act26: Play a sound (or tune) + case SOUND: // act26: Play a sound (or tune) if (action->_a26._soundIndex < _vm->_tunesNbr) _vm->_sound->playMusic(action->_a26._soundIndex); else _vm->_sound->playSound(action->_a26._soundIndex, kSoundPriorityMedium); break; - case ADD_SCORE: // act27: Add object's value to score + case ADD_SCORE: // act27: Add object's value to score _vm->adjustScore(_vm->_object->_objects[action->_a27._objIndex]._objValue); break; - case SUB_SCORE: // act28: Subtract object's value from score + case SUB_SCORE: // act28: Subtract object's value from score _vm->adjustScore(-_vm->_object->_objects[action->_a28._objIndex]._objValue); break; - case COND_CARRY: // act29: Conditional on object being carried + case COND_CARRY: // act29: Conditional on object being carried if (_vm->_object->isCarried(action->_a29._objIndex)) insertActionList(action->_a29._actPassIndex); else insertActionList(action->_a29._actFailIndex); break; - case INIT_MAZE: // act30: Enable and init maze structure + case INIT_MAZE: // act30: Enable and init maze structure _vm->_maze._enabledFl = true; _vm->_maze._size = action->_a30._mazeSize; _vm->_maze._x1 = action->_a30._x1; @@ -1334,7 +1334,7 @@ Event *Scheduler::doAction(Event *curEvent) { _vm->_maze._x4 = action->_a30._x4; _vm->_maze._firstScreenIndex = action->_a30._firstScreenIndex; break; - case EXIT_MAZE: // act31: Disable maze mode + case EXIT_MAZE: // act31: Disable maze mode _vm->_maze._enabledFl = false; break; case INIT_PRIORITY: @@ -1343,71 +1343,71 @@ Event *Scheduler::doAction(Event *curEvent) { case INIT_SCREEN: _vm->_object->_objects[action->_a33._objIndex]._screenIndex = action->_a33._screenIndex; break; - case AGSCHEDULE: // act34: Schedule a (global) action list + case AGSCHEDULE: // act34: Schedule a (global) action list insertActionList(action->_a34._actIndex); break; - case REMAPPAL: // act35: Remap a palette color + case REMAPPAL: // act35: Remap a palette color _vm->_screen->remapPal(action->_a35._oldColorIndex, action->_a35._newColorIndex); break; - case COND_NOUN: // act36: Conditional on noun mentioned + case COND_NOUN: // act36: Conditional on noun mentioned if (_vm->_parser->isWordPresent(_vm->_text->getNounArray(action->_a36._nounIndex))) insertActionList(action->_a36._actPassIndex); else insertActionList(action->_a36._actFailIndex); break; - case SCREEN_STATE: // act37: Set new screen state + case SCREEN_STATE: // act37: Set new screen state _vm->_screenStates[action->_a37._screenIndex] = action->_a37._newState; break; - case INIT_LIPS: // act38: Position lips on object + case INIT_LIPS: // act38: Position lips on object _vm->_object->_objects[action->_a38._lipsObjIndex]._x = _vm->_object->_objects[action->_a38._objIndex]._x + action->_a38._dxLips; _vm->_object->_objects[action->_a38._lipsObjIndex]._y = _vm->_object->_objects[action->_a38._objIndex]._y + action->_a38._dyLips; - _vm->_object->_objects[action->_a38._lipsObjIndex]._screenIndex = *_vm->_screen_p; // Don't forget screen! + _vm->_object->_objects[action->_a38._lipsObjIndex]._screenIndex = *_vm->_screenPtr; // Don't forget screen! _vm->_object->_objects[action->_a38._lipsObjIndex]._cycling = kCycleForward; break; - case INIT_STORY_MODE: // act39: Init story_mode flag + case INIT_STORY_MODE: // act39: Init story_mode flag // This is similar to the QUIET path mode, except that it is // independant of it and it additionally disables the ">" prompt gameStatus._storyModeFl = action->_a39._storyModeFl; break; - case WARN: // act40: Text box (CF TEXT) + case WARN: // act40: Text box (CF TEXT) Utils::notifyBox(_vm->_file->fetchString(action->_a40._stringIndex)); break; - case COND_BONUS: // act41: Perform action if got bonus + case COND_BONUS: // act41: Perform action if got bonus if (_points[action->_a41._bonusIndex]._scoredFl) insertActionList(action->_a41._actPassIndex); else insertActionList(action->_a41._actFailIndex); break; - case TEXT_TAKE: // act42: Text box with "take" message + case TEXT_TAKE: // act42: Text box with "take" message Utils::notifyBox(Common::String::format(TAKE_TEXT, _vm->_text->getNoun(_vm->_object->_objects[action->_a42._objIndex]._nounIndex, TAKE_NAME))); break; - case YESNO: // act43: Prompt user for Yes or No + case YESNO: // act43: Prompt user for Yes or No if (Utils::yesNoBox(_vm->_file->fetchString(action->_a43._promptIndex))) insertActionList(action->_a43._actYesIndex); else insertActionList(action->_a43._actNoIndex); break; - case STOP_ROUTE: // act44: Stop any route in progress + case STOP_ROUTE: // act44: Stop any route in progress _vm->_route->resetRoute(); break; - case COND_ROUTE: // act45: Conditional on route in progress + case COND_ROUTE: // act45: Conditional on route in progress if (_vm->_route->getRouteIndex() >= action->_a45._routeIndex) insertActionList(action->_a45._actPassIndex); else insertActionList(action->_a45._actFailIndex); break; - case INIT_JUMPEXIT: // act46: Init status.jumpexit flag + case INIT_JUMPEXIT: // act46: Init status.jumpexit flag // This is to allow left click on exit to get there immediately // For example the plane crash in Hugo2 where hero is invisible // Couldn't use INVISIBLE flag since conflicts with boat in Hugo1 _vm->_mouse->setJumpExitFl(action->_a46._jumpExitFl); break; - case INIT_VIEW: // act47: Init object._viewx, viewy, dir + case INIT_VIEW: // act47: Init object._viewx, viewy, dir _vm->_object->_objects[action->_a47._objIndex]._viewx = action->_a47._viewx; _vm->_object->_objects[action->_a47._objIndex]._viewy = action->_a47._viewy; _vm->_object->_objects[action->_a47._objIndex]._direction = action->_a47._direction; break; - case INIT_OBJ_FRAME: // act48: Set seq,frame number to use + case INIT_OBJ_FRAME: // act48: Set seq,frame number to use // Note: Don't set a sequence at time 0 of a new screen, it causes // problems clearing the boundary bits of the object! t>0 is safe _vm->_object->_objects[action->_a48._objIndex]._currImagePtr = _vm->_object->_objects[action->_a48._objIndex]._seqList[action->_a48._seqIndex]._seqPtr; @@ -1424,11 +1424,11 @@ Event *Scheduler::doAction(Event *curEvent) { } if (action->_a0._actType == NEW_SCREEN) { // New_screen() deletes entire list - return 0; // next_p = 0 since list now empty + return 0; // nextEvent = 0 since list now empty } else { wrkEvent = curEvent->_nextEvent; - delQueue(curEvent); // Return event to free list - return wrkEvent; // Return next event ptr + delQueue(curEvent); // Return event to free list + return wrkEvent; // Return next event ptr } } @@ -1444,9 +1444,9 @@ Event *Scheduler::doAction(Event *curEvent) { void Scheduler::delQueue(Event *curEvent) { debugC(4, kDebugSchedule, "delQueue()"); - if (curEvent == _headEvent) { // If p was the head ptr - _headEvent = curEvent->_nextEvent; // then make new head_p - } else { // Unlink p + if (curEvent == _headEvent) { // If p was the head ptr + _headEvent = curEvent->_nextEvent; // then make new head_p + } else { // Unlink p curEvent->_prevEvent->_nextEvent = curEvent->_nextEvent; if (curEvent->_nextEvent) curEvent->_nextEvent->_prevEvent = curEvent->_prevEvent; @@ -1455,12 +1455,12 @@ void Scheduler::delQueue(Event *curEvent) { } if (_headEvent) - _headEvent->_prevEvent = 0; // Mark end of list + _headEvent->_prevEvent = 0; // Mark end of list else - _tailEvent = 0; // Empty queue + _tailEvent = 0; // Empty queue - curEvent->_nextEvent = _freeEvent; // Return p to free list - if (_freeEvent) // Special case, if free list was empty + curEvent->_nextEvent = _freeEvent; // Return p to free list + if (_freeEvent) // Special case, if free list was empty _freeEvent->_prevEvent = curEvent; _freeEvent = curEvent; } @@ -1470,10 +1470,10 @@ void Scheduler::delQueue(Event *curEvent) { */ void Scheduler::delEventType(const Action _actTypeDel) { // Note: actions are not deleted here, simply turned into NOPs! - Event *wrkEvent = _headEvent; // The earliest event + Event *wrkEvent = _headEvent; // The earliest event Event *saveEvent; - while (wrkEvent) { // While events found in list + while (wrkEvent) { // While events found in list saveEvent = wrkEvent->_nextEvent; if (wrkEvent->_action->_a20._actType == _actTypeDel) delQueue(wrkEvent); @@ -1524,11 +1524,11 @@ uint32 Scheduler_v1d::getTicks() { void Scheduler_v1d::runScheduler() { debugC(6, kDebugSchedule, "runScheduler"); - uint32 ticker = getTicks(); // The time now, in ticks - Event *curEvent = _headEvent; // The earliest event + uint32 ticker = getTicks(); // The time now, in ticks + Event *curEvent = _headEvent; // The earliest event - while (curEvent && (curEvent->_time <= ticker)) // While mature events found - curEvent = doAction(curEvent); // Perform the action (returns next_p) + while (curEvent && (curEvent->_time <= ticker)) // While mature events found + curEvent = doAction(curEvent); // Perform the action (returns nextEvent) } void Scheduler_v1d::promptAction(Act *action) { @@ -1583,7 +1583,7 @@ void Scheduler_v2d::promptAction(Act *action) { debug(1, "doAction(act3), expecting answer %s", _vm->_file->fetchString(action->_a3._responsePtr[0])); bool found = false; - const char *tmpStr; // General purpose string ptr + const char *tmpStr; // General purpose string ptr for (int dx = 0; !found && (action->_a3._responsePtr[dx] != -1); dx++) { tmpStr = _vm->_file->fetchString(action->_a3._responsePtr[dx]); @@ -1638,12 +1638,12 @@ uint32 Scheduler_v1w::getTicks() { void Scheduler_v1w::runScheduler() { debugC(6, kDebugSchedule, "runScheduler"); - uint32 ticker = getTicks(); // The time now, in ticks - Event *curEvent = _headEvent; // The earliest event + uint32 ticker = getTicks(); // The time now, in ticks + Event *curEvent = _headEvent; // The earliest event - while (curEvent && (curEvent->_time <= ticker)) // While mature events found - curEvent = doAction(curEvent); // Perform the action (returns next_p) + while (curEvent && (curEvent->_time <= ticker)) // While mature events found + curEvent = doAction(curEvent); // Perform the action (returns nextEvent) - _vm->getGameStatus()._tick++; // Accessed elsewhere via getTicks() + _vm->getGameStatus()._tick++; // Accessed elsewhere via getTicks() } } // End of namespace Hugo diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp index a8b4759d9b..aefa03cd5e 100644 --- a/engines/hugo/sound.cpp +++ b/engines/hugo/sound.cpp @@ -174,7 +174,7 @@ void SoundHandler::toggleSound() { _vm->_config._soundFl = !_vm->_config._soundFl; } -void SoundHandler::playMIDI(sound_pt seqPtr, uint16 size) { +void SoundHandler::playMIDI(SoundPtr seqPtr, uint16 size) { _midiPlayer->play(seqPtr, size); } @@ -182,7 +182,7 @@ void SoundHandler::playMIDI(sound_pt seqPtr, uint16 size) { * Read a tune sequence from the sound database and start playing it */ void SoundHandler::playMusic(int16 tune) { - sound_pt seqPtr; // Sequence data from file + SoundPtr seqPtr; // Sequence data from file uint16 size; // Size of sequence data if (_vm->_config._musicFl) { @@ -198,9 +198,9 @@ void SoundHandler::playMusic(int16 tune) { * Override currently playing sound only if lower or same priority */ void SoundHandler::playSound(int16 sound, const byte priority) { - // uint32 dwVolume; // Left, right volume of sound - sound_pt sound_p; // Sound data - uint16 size; // Size of data + // uint32 dwVolume; // Left, right volume of sound + SoundPtr soundPtr; // Sound data + uint16 size; // Size of data // Sound disabled if (!_vm->_config._soundFl || !_vm->_mixer->isReady()) @@ -210,10 +210,10 @@ void SoundHandler::playSound(int16 sound, const byte priority) { _curPriority = priority; // Get sound data - if ((sound_p = _vm->_file->getSound(sound, &size)) == 0) + if ((soundPtr = _vm->_file->getSound(sound, &size)) == 0) return; - Audio::AudioStream *stream = Audio::makeRawStream(sound_p, size, 11025, Audio::FLAG_UNSIGNED); + Audio::AudioStream *stream = Audio::makeRawStream(soundPtr, size, 11025, Audio::FLAG_UNSIGNED); _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, stream); } diff --git a/engines/hugo/sound.h b/engines/hugo/sound.h index cb6d4e3168..b00d93eeb1 100644 --- a/engines/hugo/sound.h +++ b/engines/hugo/sound.h @@ -97,7 +97,7 @@ private: void stopSound(); void stopMusic(); - void playMIDI(sound_pt seq_p, uint16 size); + void playMIDI(SoundPtr seqPtr, uint16 size); }; } // End of namespace Hugo -- cgit v1.2.3 From e4f08a4644c5a59b8e02b3702eef436e52e2d994 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 13 Jun 2012 22:55:27 +0300 Subject: SCI: Fix the loading screen and the loading functionality in Shivers Shivers uses extra special hardcoded save files together with the normal ones that are used to store slot names and spot descriptions. The scheme is a bit odd, and since the names of the extra save files are hardcoded, this scheme is problematic to use. We skip the creation of these files altogether and use virtual files instead, which means that the (broken) spot descriptions won't be visible next to each save description. This isn't a major issue for now, and it's left as a future TODO to implement this feature in a cleaner way, and not with extra save files. This scheme fixes the slot descriptions in the loading screen. Also, kCD(1) has been implemented, which fixes loading of the save states themselves --- engines/sci/engine/file.cpp | 8 ++++- engines/sci/engine/file.h | 1 + engines/sci/engine/kfile.cpp | 85 ++++++++++++++++++++++++++++++++++++-------- 3 files changed, 78 insertions(+), 16 deletions(-) diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp index 66f54d67df..3470d23fe2 100644 --- a/engines/sci/engine/file.cpp +++ b/engines/sci/engine/file.cpp @@ -346,6 +346,12 @@ VirtualIndexFile::VirtualIndexFile(Common::String fileName) : _fileName(fileName delete inFile; } +VirtualIndexFile::VirtualIndexFile(uint32 initialSize) : _changed(false) { + _bufferSize = initialSize; + _buffer = new char[_bufferSize]; + _ptr = _buffer; +} + VirtualIndexFile::~VirtualIndexFile() { close(); @@ -430,7 +436,7 @@ bool VirtualIndexFile::seek(int32 offset, int whence) { } void VirtualIndexFile::close() { - if (_changed) { + if (_changed && !_fileName.empty()) { Common::WriteStream *outFile = g_sci->getSaveFileManager()->openForSaving(_fileName); outFile->write(_buffer, _bufferSize); delete outFile; diff --git a/engines/sci/engine/file.h b/engines/sci/engine/file.h index 896dcd2a42..1c8e302d15 100644 --- a/engines/sci/engine/file.h +++ b/engines/sci/engine/file.h @@ -115,6 +115,7 @@ private: class VirtualIndexFile { public: VirtualIndexFile(Common::String fileName); + VirtualIndexFile(uint32 initialSize); ~VirtualIndexFile(); uint32 read(char *buffer, uint32 size); diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 445a019368..7a2f161829 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -199,6 +199,9 @@ reg_t kCD(EngineState *s, int argc, reg_t *argv) { case 0: // Return whether the contents of disc argv[1] is available. return TRUE_REG; + case 1: + // Return the current CD number + return make_reg(0, 1); default: warning("CD(%d)", argv[0].toUint16()); } @@ -219,21 +222,6 @@ reg_t kFileIO(EngineState *s, int argc, reg_t *argv) { reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) { Common::String name = s->_segMan->getString(argv[0]); -#ifdef ENABLE_SCI32 - if (name == PHANTASMAGORIA_SAVEGAME_INDEX) { - if (s->_virtualIndexFile) { - return make_reg(0, VIRTUALFILE_HANDLE); - } else { - Common::String englishName = g_sci->getSciLanguageString(name, K_LANG_ENGLISH); - Common::String wrappedName = g_sci->wrapFilename(englishName); - if (!g_sci->getSaveFileManager()->listSavefiles(wrappedName).empty()) { - s->_virtualIndexFile = new VirtualIndexFile(wrappedName); - return make_reg(0, VIRTUALFILE_HANDLE); - } - } - } -#endif - // SCI32 can call K_FILEIO_OPEN with only one argument. It seems to // just be checking if it exists. int mode = (argc < 2) ? (int)_K_FILE_MODE_OPEN_OR_FAIL : argv[1].toUint16(); @@ -261,6 +249,73 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) { } debugC(kDebugLevelFile, "kFileIO(open): %s, 0x%x", name.c_str(), mode); +#ifdef ENABLE_SCI32 + if (name == PHANTASMAGORIA_SAVEGAME_INDEX) { + if (s->_virtualIndexFile) { + return make_reg(0, VIRTUALFILE_HANDLE); + } else { + Common::String englishName = g_sci->getSciLanguageString(name, K_LANG_ENGLISH); + Common::String wrappedName = g_sci->wrapFilename(englishName); + if (!g_sci->getSaveFileManager()->listSavefiles(wrappedName).empty()) { + s->_virtualIndexFile = new VirtualIndexFile(wrappedName); + return make_reg(0, VIRTUALFILE_HANDLE); + } + } + } + + // Shivers is trying to store savegame descriptions and current spots in + // separate .SG files, which are hardcoded in the scripts. + // Essentially, there is a normal save file, created by the executable + // and an extra hardcoded save file, created by the game scripts, probably + // because they didn't want to modify the save/load code to add the extra + // information. + // Each slot in the book then has two strings, the save description and a + // description of the current spot that the player is at. Currently, the + // spot strings are always empty (probably related to the unimplemented + // kString subop 14, which gets called right before this call). + // For now, we don't allow the creation of these files, which means that + // all the spot descriptions next to each slot description will be empty + // (they are empty anyway). Until a viable solution is found to handle these + // extra files and until the spot description strings are initialized + // correctly, we resort to virtual files in order to make the load screen + // useable. Without this code it is unusable, as the extra information is + // always saved to 0.SG for some reason, but on restore the correct file is + // used. Perhaps the virtual ID is not taken into account when saving. + // + // Future TODO: maintain spot descriptions and show them too, ideally without + // having to return to this logic of extra hardcoded files. + if (g_sci->getGameId() == GID_SHIVERS && name.hasSuffix(".SG")) { + if (mode == _K_FILE_MODE_OPEN_OR_CREATE || mode == _K_FILE_MODE_CREATE) { + // Game scripts are trying to create a file with the save + // description, stop them here + debugC(kDebugLevelFile, "Not creating unused file %s", name.c_str()); + return SIGNAL_REG; + } else if (mode == _K_FILE_MODE_OPEN_OR_FAIL) { + // Create a virtual file containing the save game description + // and slot number, as the game scripts expect. + int slotNumber; + sscanf(name.c_str(), "%d.SG", &slotNumber); + + Common::Array saves; + listSavegames(saves); + int savegameNr = findSavegame(saves, slotNumber - SAVEGAMEID_OFFICIALRANGE_START); + + if (!s->_virtualIndexFile) { + // Make the virtual file buffer big enough to avoid having it grow dynamically. + // 50 bytes should be more than enough. + s->_virtualIndexFile = new VirtualIndexFile(50); + } + + s->_virtualIndexFile->seek(0, SEEK_SET); + s->_virtualIndexFile->write(saves[savegameNr].name, strlen(saves[savegameNr].name)); + s->_virtualIndexFile->write("\0", 1); + s->_virtualIndexFile->write("\0", 1); // Spot description (empty) + s->_virtualIndexFile->seek(0, SEEK_SET); + return make_reg(0, VIRTUALFILE_HANDLE); + } + } +#endif + // QFG import rooms get a virtual filelisting instead of an actual one if (g_sci->inQfGImportRoom()) { // We need to find out what the user actually selected, "savedHeroes" is -- cgit v1.2.3 From 87eb651886ef911d8026d777abec72c88ffdf32f Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 14 Jun 2012 00:19:34 +0100 Subject: TOON: Migrate Character API x,y coordinates and subclasses to int16. This harmonises the usage with Common::Point. --- engines/toon/character.cpp | 34 ++++++++++++++++------------------ engines/toon/character.h | 28 ++++++++++++++-------------- engines/toon/drew.cpp | 2 +- engines/toon/drew.h | 2 +- engines/toon/flux.cpp | 4 ++-- engines/toon/flux.h | 2 +- 6 files changed, 35 insertions(+), 37 deletions(-) diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp index 260296cc9f..2a28642f6a 100644 --- a/engines/toon/character.cpp +++ b/engines/toon/character.cpp @@ -81,7 +81,7 @@ Character::~Character(void) { void Character::init() { } -void Character::forceFacing( int32 facing ) { +void Character::forceFacing(int32 facing) { debugC(4, kDebugCharacter, "forceFacing(%d)", facing); _facing = facing; } @@ -136,8 +136,7 @@ void Character::setFacing(int32 facing) { _facing = facing; } -void Character::forcePosition(int32 x, int32 y) { - +void Character::forcePosition(int16 x, int16 y) { debugC(5, kDebugCharacter, "forcePosition(%d, %d)", x, y); setPosition(x, y); @@ -145,7 +144,7 @@ void Character::forcePosition(int32 x, int32 y) { _finalY = y; } -void Character::setPosition(int32 x, int32 y) { +void Character::setPosition(int16 x, int16 y) { debugC(5, kDebugCharacter, "setPosition(%d, %d)", x, y); _x = x; @@ -155,7 +154,7 @@ void Character::setPosition(int32 x, int32 y) { return; } -bool Character::walkTo(int32 newPosX, int32 newPosY) { +bool Character::walkTo(int16 newPosX, int16 newPosY) { debugC(1, kDebugCharacter, "walkTo(%d, %d)", newPosX, newPosY); if (!_visible) @@ -168,21 +167,19 @@ bool Character::walkTo(int32 newPosX, int32 newPosY) { // don't allow flux to go at the same position as drew if (_id == 1 ) { - int32 sizeX = MAX(5, 30 * _vm->getDrew()->getScale() / 1024); - int32 sizeY = MAX(2, 20 * _vm->getDrew()->getScale() / 1024); + int16 sizeX = MAX(5, 30 * _vm->getDrew()->getScale() / 1024); + int16 sizeY = MAX(2, 20 * _vm->getDrew()->getScale() / 1024); _vm->getPathFinding()->addBlockingEllipse(_vm->getDrew()->getFinalX(), _vm->getDrew()->getFinalY(), sizeX, sizeY); } - int16 tempFinalX, tempFinalY; - _vm->getPathFinding()->findClosestWalkingPoint(newPosX, newPosY, &tempFinalX, &tempFinalY, _x, _y); - _finalX = tempFinalX, _finalY = tempFinalY; // FIXME - Bodge to match types... + _vm->getPathFinding()->findClosestWalkingPoint(newPosX, newPosY, &_finalX, &_finalY, _x, _y); if (_x == _finalX && _y == _finalY) return true; if (_vm->getPathFinding()->findPath(_x, _y, _finalX, _finalY)) { - int32 localFinalX = _finalX; - int32 localFinalY = _finalY; + int16 localFinalX = _finalX; + int16 localFinalY = _finalY; int32 smoothDx = 0; int32 smoothDy = 0; @@ -266,10 +263,11 @@ int32 Character::getFlag() { return _flags; } -int32 Character::getX() { +int16 Character::getX() { return _x; } -int32 Character::getY() { + +int16 Character::getY() { return _y; } @@ -529,7 +527,7 @@ void Character::update(int32 timeIncrement) { } // adapted from Kyra -int32 Character::getFacingFromDirection(int32 dx, int32 dy) { +int32 Character::getFacingFromDirection(int16 dx, int16 dy) { debugC(4, kDebugCharacter, "getFacingFromDirection(%d, %d)", dx, dy); static const int facingTable[] = { @@ -640,7 +638,7 @@ void Character::load(Common::ReadStream *stream) { // "not visible" flag. if (_flags & 0x100) { _flags &= ~0x100; - setVisible(false); + setVisible(false); } } @@ -1080,11 +1078,11 @@ void Character::setDefaultSpecialAnimationId(int32 defaultAnimationId) { _animSpecialDefaultId = defaultAnimationId; } -int32 Character::getFinalX() { +int16 Character::getFinalX() { return _finalX; } -int32 Character::getFinalY() { +int16 Character::getFinalY() { return _finalY; } diff --git a/engines/toon/character.h b/engines/toon/character.h index d06a6c060c..d2d84a8c9b 100644 --- a/engines/toon/character.h +++ b/engines/toon/character.h @@ -65,13 +65,13 @@ public: virtual int32 getFlag(); virtual int32 getAnimFlag(); virtual void setAnimFlag(int32 flag); - virtual void setPosition(int32 x, int32 y); - virtual void forcePosition(int32 x, int32 y); - virtual int32 getX(); - virtual int32 getY(); - virtual int32 getFinalX(); - virtual int32 getFinalY(); - virtual bool walkTo(int32 newPosX, int32 newPosY); + virtual void setPosition(int16 x, int16 y); + virtual void forcePosition(int16 x, int16 y); + virtual int16 getX(); + virtual int16 getY(); + virtual int16 getFinalX(); + virtual int16 getFinalY(); + virtual bool walkTo(int16 newPosX, int16 newPosY); virtual bool getVisible(); virtual void setVisible(bool visible); virtual bool loadWalkAnimation(const Common::String &animName); @@ -99,7 +99,7 @@ public: virtual void resetScale() {} virtual void plotPath(Graphics::Surface& surface); - int32 getFacingFromDirection(int32 dx, int32 dy); + int32 getFacingFromDirection(int16 dx, int16 dy); static const SpecialCharacterAnimation *getSpecialAnimation(int32 characterId, int32 animationId); protected: @@ -112,11 +112,11 @@ protected: int32 _sceneAnimationId; int32 _lineToSayId; int32 _time; - int32 _x; - int32 _y; + int16 _x; + int16 _y; int32 _z; - int32 _finalX; - int32 _finalY; + int16 _finalX; + int16 _finalY; int32 _facing; int32 _flags; int32 _animFlags; @@ -137,8 +137,8 @@ protected: Animation *_shadowAnim; Animation *_specialAnim; - int32 _currentPathX[4096]; - int32 _currentPathY[4096]; + int16 _currentPathX[4096]; + int16 _currentPathY[4096]; int32 _currentPathNodeCount; int32 _currentPathNode; int32 _currentWalkStamp; diff --git a/engines/toon/drew.cpp b/engines/toon/drew.cpp index df5cfcfa03..dfd3f515fa 100644 --- a/engines/toon/drew.cpp +++ b/engines/toon/drew.cpp @@ -48,7 +48,7 @@ bool CharacterDrew::setupPalette() { return false; } -void CharacterDrew::setPosition(int32 x, int32 y) { +void CharacterDrew::setPosition(int16 x, int16 y) { debugC(5, kDebugCharacter, "setPosition(%d, %d)", x, y); _z = _vm->getLayerAtPoint(x, y); diff --git a/engines/toon/drew.h b/engines/toon/drew.h index 3357b99846..ff1b619125 100644 --- a/engines/toon/drew.h +++ b/engines/toon/drew.h @@ -35,7 +35,7 @@ public: virtual ~CharacterDrew(); bool setupPalette(); void playStandingAnim(); - void setPosition(int32 x, int32 y); + void setPosition(int16 x, int16 y); void resetScale(); void update(int32 timeIncrement); void playWalkAnim(int32 start, int32 end); diff --git a/engines/toon/flux.cpp b/engines/toon/flux.cpp index b752e65c82..70aa40fb36 100644 --- a/engines/toon/flux.cpp +++ b/engines/toon/flux.cpp @@ -45,7 +45,7 @@ void CharacterFlux::playStandingAnim() { _animationInstance->stopAnimation(); _animationInstance->setLooping(true); - //s/etVisible(true); + //setVisible(true); } void CharacterFlux::setVisible(bool visible) { @@ -99,7 +99,7 @@ int32 CharacterFlux::fixFacingForAnimation(int32 originalFacing, int32 animation return finalFacing; } -void CharacterFlux::setPosition(int32 x, int32 y) { +void CharacterFlux::setPosition(int16 x, int16 y) { debugC(5, kDebugCharacter, "setPosition(%d, %d)", x, y); _z = _vm->getLayerAtPoint(x, y); diff --git a/engines/toon/flux.h b/engines/toon/flux.h index c208bc5bda..1dc0d9c55f 100644 --- a/engines/toon/flux.h +++ b/engines/toon/flux.h @@ -34,7 +34,7 @@ public: CharacterFlux(ToonEngine *vm); virtual ~CharacterFlux(); - void setPosition(int32 x, int32 y); + void setPosition(int16 x, int16 y); void playStandingAnim(); void playWalkAnim(int32 start, int32 end); void update(int32 timeIncrement); -- cgit v1.2.3 From b9057761df4de1b314aaec9eb7b14653863bb031 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 14 Jun 2012 02:36:45 +0300 Subject: SCI: Add missing documentation for the plane_items / pi console command --- engines/sci/console.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 6a44972a4b..94ac437a15 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -373,6 +373,7 @@ bool Console::cmdHelp(int argc, const char **argv) { DebugPrintf(" animate_list / al - Shows the current list of objects in kAnimate's draw list (SCI0 - SCI1.1)\n"); DebugPrintf(" window_list / wl - Shows a list of all the windows (ports) in the draw list (SCI0 - SCI1.1)\n"); DebugPrintf(" plane_list / pl - Shows a list of all the planes in the draw list (SCI2+)\n"); + DebugPrintf(" plane_items / pi - Shows a list of all items for a plane (SCI2+)\n"); DebugPrintf(" saved_bits - List saved bits on the hunk\n"); DebugPrintf(" show_saved_bits - Display saved bits\n"); DebugPrintf("\n"); -- cgit v1.2.3 From 84ed361370a83d1806cd146562c4debf3a6aa767 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 14 Jun 2012 02:59:52 +0200 Subject: GUI: Remove unused SaveLoadChooser::setList. --- gui/saveload.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/saveload.h b/gui/saveload.h index e81b10d214..a19f5ab083 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -66,7 +66,7 @@ public: ~SaveLoadChooser(); virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); - void setList(const StringArray& list); + /** * Runs the save/load chooser with the currently active config manager * domain as target. -- cgit v1.2.3 From 27b8b7e9b6644767ad9de1e40c188a7abd631c4e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 Jun 2012 04:06:25 +0200 Subject: GUI: Hide save/load chooser implementation. --- gui/saveload.cpp | 125 +++++++++++++++++++++++++++++++++++++++++++------------ gui/saveload.h | 43 ++----------------- 2 files changed, 103 insertions(+), 65 deletions(-) diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 67d871e133..717523b107 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -41,8 +41,52 @@ enum { }; -SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode) - : Dialog("SaveLoadChooser"), _delSupport(0), _list(0), _chooseButton(0), _deleteButton(0), _gfxWidget(0) { +class SaveLoadChooserImpl : GUI::Dialog { + typedef Common::String String; + typedef Common::Array StringArray; +public: + SaveLoadChooserImpl(const String &title, const String &buttonLabel, bool saveMode); + + int runModalWithCurrentTarget(); + int runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target); + + virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); + + const Common::String &getResultString() const; + + virtual void open(); + + virtual void reflowLayout(); + + virtual void close(); +private: + GUI::ListWidget *_list; + GUI::ButtonWidget *_chooseButton; + GUI::ButtonWidget *_deleteButton; + GUI::GraphicsWidget *_gfxWidget; + GUI::ContainerWidget *_container; + GUI::StaticTextWidget *_date; + GUI::StaticTextWidget *_time; + GUI::StaticTextWidget *_playtime; + + const EnginePlugin *_plugin; + bool _delSupport; + bool _metaInfoSupport; + bool _thumbnailSupport; + bool _saveDateSupport; + bool _playTimeSupport; + String _target; + SaveStateList _saveList; + String _resultString; + + uint8 _fillR, _fillG, _fillB; + + void updateSaveList(); + void updateSelection(bool redraw); +}; + +SaveLoadChooserImpl::SaveLoadChooserImpl(const String &title, const String &buttonLabel, bool saveMode) + : Dialog("SaveLoadChooser"), _list(0), _chooseButton(0), _deleteButton(0), _gfxWidget(0) { _delSupport = _metaInfoSupport = _thumbnailSupport = _saveDateSupport = _playTimeSupport = false; _backgroundType = ThemeEngine::kDialogBackgroundSpecial; @@ -74,10 +118,7 @@ SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, // _container->setHints(GUI::THEME_HINT_USE_SHADOW); } -SaveLoadChooser::~SaveLoadChooser() { -} - -int SaveLoadChooser::runModalWithCurrentTarget() { +int SaveLoadChooserImpl::runModalWithCurrentTarget() { const Common::String gameId = ConfMan.get("gameid"); const EnginePlugin *plugin = 0; @@ -86,7 +127,7 @@ int SaveLoadChooser::runModalWithCurrentTarget() { return runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); } -int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target) { +int SaveLoadChooserImpl::runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target) { if (_gfxWidget) _gfxWidget->setGfx(0); @@ -114,7 +155,7 @@ int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, con return ret; } -void SaveLoadChooser::open() { +void SaveLoadChooserImpl::open() { Dialog::open(); // So that quitting ScummVM will not cause the dialog result to say a @@ -122,24 +163,12 @@ void SaveLoadChooser::open() { setResult(-1); } -const Common::String &SaveLoadChooser::getResultString() const { +const Common::String &SaveLoadChooserImpl::getResultString() const { int selItem = _list->getSelected(); return (selItem >= 0) ? _list->getSelectedString() : _resultString; } -Common::String SaveLoadChooser::createDefaultSaveDescription(const int slot) const { -#if defined(USE_SAVEGAME_TIMESTAMP) - TimeDate curTime; - g_system->getTimeAndDate(curTime); - curTime.tm_year += 1900; // fixup year - curTime.tm_mon++; // fixup month - return Common::String::format("%04d.%02d.%02d / %02d:%02d:%02d", curTime.tm_year, curTime.tm_mon, curTime.tm_mday, curTime.tm_hour, curTime.tm_min, curTime.tm_sec); -#else - return Common::String::format("Save %d", slot + 1); -#endif -} - -void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { +void SaveLoadChooserImpl::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { int selItem = _list->getSelected(); switch (cmd) { @@ -189,7 +218,7 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da } } -void SaveLoadChooser::reflowLayout() { +void SaveLoadChooserImpl::reflowLayout() { if (g_gui.xmlEval()->getVar("Globals.SaveLoadChooser.ExtInfo.Visible") == 1 && _thumbnailSupport) { int16 x, y; uint16 w, h; @@ -246,7 +275,7 @@ void SaveLoadChooser::reflowLayout() { Dialog::reflowLayout(); } -void SaveLoadChooser::updateSelection(bool redraw) { +void SaveLoadChooserImpl::updateSelection(bool redraw) { int selItem = _list->getSelected(); bool isDeletable = _delSupport; @@ -329,7 +358,7 @@ void SaveLoadChooser::updateSelection(bool redraw) { } } -void SaveLoadChooser::close() { +void SaveLoadChooserImpl::close() { _plugin = 0; _target.clear(); _saveList.clear(); @@ -338,7 +367,7 @@ void SaveLoadChooser::close() { Dialog::close(); } -void SaveLoadChooser::updateSaveList() { +void SaveLoadChooserImpl::updateSaveList() { _saveList = (*_plugin)->listSaves(_target.c_str()); int curSlot = 0; @@ -402,4 +431,48 @@ void SaveLoadChooser::updateSaveList() { _list->setList(saveNames, &colors); } +// --- SaveLoadChooser implementation --- + +SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode) { + _impl = new SaveLoadChooserImpl(title, buttonLabel, saveMode); +} + +SaveLoadChooser::~SaveLoadChooser() { + delete _impl; + _impl = 0; +} + +Common::String SaveLoadChooser::createDefaultSaveDescription(const int slot) const { +#if defined(USE_SAVEGAME_TIMESTAMP) + TimeDate curTime; + g_system->getTimeAndDate(curTime); + curTime.tm_year += 1900; // fixup year + curTime.tm_mon++; // fixup month + return Common::String::format("%04d.%02d.%02d / %02d:%02d:%02d", curTime.tm_year, curTime.tm_mon, curTime.tm_mday, curTime.tm_hour, curTime.tm_min, curTime.tm_sec); +#else + return Common::String::format("Save %d", slot + 1); +#endif +} + +int SaveLoadChooser::runModalWithCurrentTarget() { + if (_impl) + return _impl->runModalWithCurrentTarget(); + else + return -1; +} + +int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target) { + if (_impl) + return _impl->runModalWithPluginAndTarget(plugin, target); + else + return -1; +} + +Common::String SaveLoadChooser::getResultString() const { + if (_impl) + return _impl->getResultString(); + else + return Common::String(); +} + } // End of namespace GUI diff --git a/gui/saveload.h b/gui/saveload.h index a19f5ab083..9cd3c4605f 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -27,46 +27,16 @@ namespace GUI { -class ListWidget; -class GraphicsWidget; -class ButtonWidget; -class CommandSender; -class ContainerWidget; -class StaticTextWidget; +class SaveLoadChooserImpl; -class SaveLoadChooser : GUI::Dialog { +class SaveLoadChooser { typedef Common::String String; - typedef Common::Array StringArray; protected: - GUI::ListWidget *_list; - GUI::ButtonWidget *_chooseButton; - GUI::ButtonWidget *_deleteButton; - GUI::GraphicsWidget *_gfxWidget; - GUI::ContainerWidget *_container; - GUI::StaticTextWidget *_date; - GUI::StaticTextWidget *_time; - GUI::StaticTextWidget *_playtime; - - const EnginePlugin *_plugin; - bool _delSupport; - bool _metaInfoSupport; - bool _thumbnailSupport; - bool _saveDateSupport; - bool _playTimeSupport; - String _target; - SaveStateList _saveList; - String _resultString; - - uint8 _fillR, _fillG, _fillB; - - void updateSaveList(); - void updateSelection(bool redraw); + SaveLoadChooserImpl *_impl; public: SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode); ~SaveLoadChooser(); - virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); - /** * Runs the save/load chooser with the currently active config manager * domain as target. @@ -75,9 +45,8 @@ public: */ int runModalWithCurrentTarget(); int runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target); - void open(); - const Common::String &getResultString() const; + Common::String getResultString() const; /** * Creates a default save description for the specified slot. Depending @@ -93,10 +62,6 @@ public: * @return The slot description. */ Common::String createDefaultSaveDescription(const int slot) const; - - virtual void reflowLayout(); - - virtual void close(); }; } // End of namespace GUI -- cgit v1.2.3 From b7c3ffd37cfe10b45976b3e7fb4a595350ef7734 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 14 Jun 2012 03:12:48 +0200 Subject: BASE: Add operator* to PluginSubclass. --- base/plugins.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/plugins.h b/base/plugins.h index fffb5fb910..4409c9eaea 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -205,6 +205,10 @@ typedef Common::Array PluginList; template class PluginSubclass : public Plugin { public: + PO_t &operator*() const { + return *(PO_t *)_pluginObject; + } + PO_t *operator->() const { return (PO_t *)_pluginObject; } -- cgit v1.2.3 From e866dfd4069dfb4418ebdc0d4522b56aebed7522 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 14 Jun 2012 03:13:49 +0200 Subject: GUI: Refactor engine plugin access out of SaveLoadChooserImpl into SaveLoadChooser. --- gui/saveload.cpp | 77 ++++++++++++++++++++++++++------------------------------ 1 file changed, 36 insertions(+), 41 deletions(-) diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 717523b107..e2f9461ddb 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -47,8 +47,7 @@ class SaveLoadChooserImpl : GUI::Dialog { public: SaveLoadChooserImpl(const String &title, const String &buttonLabel, bool saveMode); - int runModalWithCurrentTarget(); - int runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target); + int run(const String &target, const MetaEngine *metaEngine); virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); @@ -69,7 +68,7 @@ private: GUI::StaticTextWidget *_time; GUI::StaticTextWidget *_playtime; - const EnginePlugin *_plugin; + const MetaEngine *_metaEngine; bool _delSupport; bool _metaInfoSupport; bool _thumbnailSupport; @@ -118,41 +117,22 @@ SaveLoadChooserImpl::SaveLoadChooserImpl(const String &title, const String &butt // _container->setHints(GUI::THEME_HINT_USE_SHADOW); } -int SaveLoadChooserImpl::runModalWithCurrentTarget() { - const Common::String gameId = ConfMan.get("gameid"); - - const EnginePlugin *plugin = 0; - EngineMan.findGame(gameId, &plugin); - - return runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); -} - -int SaveLoadChooserImpl::runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target) { +int SaveLoadChooserImpl::run(const String &target, const MetaEngine *metaEngine) { if (_gfxWidget) _gfxWidget->setGfx(0); - // Set up the game domain as newly active domain, so - // target specific savepath will be checked - String oldDomain = ConfMan.getActiveDomainName(); - ConfMan.setActiveDomain(target); - - _plugin = plugin; + _metaEngine = metaEngine; _target = target; - _delSupport = (*_plugin)->hasFeature(MetaEngine::kSupportsDeleteSave); - _metaInfoSupport = (*_plugin)->hasFeature(MetaEngine::kSavesSupportMetaInfo); - _thumbnailSupport = _metaInfoSupport && (*_plugin)->hasFeature(MetaEngine::kSavesSupportThumbnail); - _saveDateSupport = _metaInfoSupport && (*_plugin)->hasFeature(MetaEngine::kSavesSupportCreationDate); - _playTimeSupport = _metaInfoSupport && (*_plugin)->hasFeature(MetaEngine::kSavesSupportPlayTime); + _delSupport = _metaEngine->hasFeature(MetaEngine::kSupportsDeleteSave); + _metaInfoSupport = _metaEngine->hasFeature(MetaEngine::kSavesSupportMetaInfo); + _thumbnailSupport = _metaInfoSupport && _metaEngine->hasFeature(MetaEngine::kSavesSupportThumbnail); + _saveDateSupport = _metaInfoSupport && _metaEngine->hasFeature(MetaEngine::kSavesSupportCreationDate); + _playTimeSupport = _metaInfoSupport && _metaEngine->hasFeature(MetaEngine::kSavesSupportPlayTime); _resultString.clear(); reflowLayout(); updateSaveList(); - int ret = Dialog::runModal(); - - // Revert to the old active domain - ConfMan.setActiveDomain(oldDomain); - - return ret; + return Dialog::runModal(); } void SaveLoadChooserImpl::open() { @@ -201,7 +181,7 @@ void SaveLoadChooserImpl::handleCommand(CommandSender *sender, uint32 cmd, uint3 MessageDialog alert(_("Do you really want to delete this savegame?"), _("Delete"), _("Cancel")); if (alert.runModal() == GUI::kMessageOK) { - (*_plugin)->removeSaveState(_target.c_str(), _saveList[selItem].getSaveSlot()); + _metaEngine->removeSaveState(_target.c_str(), _saveList[selItem].getSaveSlot()); setResult(-1); _list->setSelected(-1); @@ -288,7 +268,7 @@ void SaveLoadChooserImpl::updateSelection(bool redraw) { _playtime->setLabel(_("No playtime saved")); if (selItem >= 0 && _metaInfoSupport) { - SaveStateDescriptor desc = (*_plugin)->querySaveMetaInfos(_target.c_str(), _saveList[selItem].getSaveSlot()); + SaveStateDescriptor desc = _metaEngine->querySaveMetaInfos(_target.c_str(), _saveList[selItem].getSaveSlot()); isDeletable = desc.getDeletableFlag() && _delSupport; isWriteProtected = desc.getWriteProtectedFlag(); @@ -359,7 +339,7 @@ void SaveLoadChooserImpl::updateSelection(bool redraw) { } void SaveLoadChooserImpl::close() { - _plugin = 0; + _metaEngine = 0; _target.clear(); _saveList.clear(); _list->setList(StringArray()); @@ -368,7 +348,7 @@ void SaveLoadChooserImpl::close() { } void SaveLoadChooserImpl::updateSaveList() { - _saveList = (*_plugin)->listSaves(_target.c_str()); + _saveList = _metaEngine->listSaves(_target.c_str()); int curSlot = 0; int saveSlot = 0; @@ -410,7 +390,7 @@ void SaveLoadChooserImpl::updateSaveList() { // Fill the rest of the save slots with empty saves - int maximumSaveSlots = (*_plugin)->getMaximumSaveSlot(); + int maximumSaveSlots = _metaEngine->getMaximumSaveSlot(); #ifdef __DS__ // Low memory on the DS means too many save slots are impractical, so limit @@ -455,17 +435,32 @@ Common::String SaveLoadChooser::createDefaultSaveDescription(const int slot) con } int SaveLoadChooser::runModalWithCurrentTarget() { - if (_impl) - return _impl->runModalWithCurrentTarget(); - else + if (!_impl) return -1; + + const Common::String gameId = ConfMan.get("gameid"); + + const EnginePlugin *plugin = 0; + EngineMan.findGame(gameId, &plugin); + + return runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName()); } int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target) { - if (_impl) - return _impl->runModalWithPluginAndTarget(plugin, target); - else + if (!_impl) return -1; + + // Set up the game domain as newly active domain, so + // target specific savepath will be checked + String oldDomain = ConfMan.getActiveDomainName(); + ConfMan.setActiveDomain(target); + + int ret = _impl->run(target, &(**plugin)); + + // Revert to the old active domain + ConfMan.setActiveDomain(oldDomain); + + return ret; } Common::String SaveLoadChooser::getResultString() const { -- cgit v1.2.3 From 62c66cdb9c11c029e48706932c2513eaea1dd82b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 14 Jun 2012 03:17:33 +0200 Subject: GUI: Fix include guard of saveload.h. --- gui/saveload.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/saveload.h b/gui/saveload.h index 9cd3c4605f..a3834ff777 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -19,8 +19,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef GUI_SAVELOAD_DIALOG_H -#define GUI_SAVELOAD_DIALOG_H +#ifndef GUI_SAVELOAD_H +#define GUI_SAVELOAD_H #include "gui/dialog.h" #include "engines/metaengine.h" -- cgit v1.2.3 From 0a3fb38bc728c11654810d426819853d86ae609c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 14 Jun 2012 12:10:39 +0300 Subject: SCI: Add handling of two more configuration settings for LSL7 --- engines/sci/engine/kmisc.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index 47c891eefd..2e80764d01 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -388,6 +388,12 @@ reg_t kGetConfig(EngineState *s, int argc, reg_t *argv) { // Used to enable the debug mode in Torin's Passage (French). // If true, the debug mode is enabled. s->_segMan->strcpy(data, ""); + } else if (setting == "leakdump") { + // An unknown setting in LSL7. Likely used for debugging. + s->_segMan->strcpy(data, ""); + } else if (setting == "startroom") { + // Debug setting in LSL7, specifies the room to start from. + s->_segMan->strcpy(data, ""); } else { error("GetConfig: Unknown configuration setting %s", setting.c_str()); } -- cgit v1.2.3 From 21b6b81f16abc4af90a7e21974d51ad7a984f1ed Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 14 Jun 2012 12:12:30 +0300 Subject: SCI: A separate implementation is needed for syncStringHeap() for SCI3 --- engines/sci/engine/savegame.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 404bea799d..7c41e18bec 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -467,7 +467,7 @@ void Script::syncStringHeap(Common::Serializer &s) { break; } while (1); - } else { + } else if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1){ // Strings in SCI1.1 come after the object instances byte *buf = _heapStart + 4 + READ_SCI11ENDIAN_UINT16(_heapStart + 2) * 2; @@ -477,6 +477,8 @@ void Script::syncStringHeap(Common::Serializer &s) { // Now, sync everything till the end of the buffer s.syncBytes(buf, _heapSize - (buf - _heapStart)); + } else if (getSciVersion() == SCI_VERSION_3) { + warning("TODO: syncStringHeap(): Implement SCI3 variant"); } } -- cgit v1.2.3 From 9c8ff41181955048abd602f1d58639e2082182c7 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 14 Jun 2012 12:14:04 +0300 Subject: SCI: Add known large SCI3 scripts --- engines/sci/engine/script.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 8b26969f4a..5f0118b5b6 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -115,6 +115,13 @@ void Script::init(int script_nr, ResourceManager *resMan) { // scheme. We need an overlaying mechanism, or a mechanism to split script parts // in different segments to handle these. For now, simply stop when such a script // is found. + // + // Known large SCI 3 scripts are: + // Lighthouse: 9, 220, 270, 351, 360, 490, 760, 765, 800 + // LSL7: 240, 511, 550 + // Phantasmagoria 2: none (hooray!) + // RAMA: 70 + // // TODO: Remove this once such a mechanism is in place if (script->size > 65535) error("TODO: SCI script %d is over 64KB - it's %d bytes long. This can't " -- cgit v1.2.3 From 27f2b6e4dd829663f771fec0651b8a1e31514a90 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 14 Jun 2012 12:15:57 +0300 Subject: SCI: Change the script buffer size to be a size_t as well This will be needed in the future to load large SCI3 scripts --- engines/sci/engine/script.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h index 1ebae3b7a8..a180579d2f 100644 --- a/engines/sci/engine/script.h +++ b/engines/sci/engine/script.h @@ -57,7 +57,7 @@ private: int _lockers; /**< Number of classes and objects that require this script */ size_t _scriptSize; size_t _heapSize; - uint16 _bufSize; + size_t _bufSize; const uint16 *_exportTable; /**< Abs. offset of the export table or 0 if not present */ uint16 _numExports; /**< Number of entries in the exports table */ -- cgit v1.2.3 From d2eab05e7d08bd5e4e615ee786e62be64293060a Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 14 Jun 2012 13:38:45 +0100 Subject: TOON: Replace Character _currentPath static buffers with Common::Array. --- engines/toon/character.cpp | 57 ++++++++++++++++++++++------------------------ engines/toon/character.h | 9 ++++---- 2 files changed, 32 insertions(+), 34 deletions(-) diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp index 2a28642f6a..c9073de587 100644 --- a/engines/toon/character.cpp +++ b/engines/toon/character.cpp @@ -56,7 +56,6 @@ Character::Character(ToonEngine *vm) : _vm(vm) { _animScriptId = -1; _animSpecialId = -1; _animSpecialDefaultId = 0; - _currentPathNodeCount = 0; _currentPathNode = 0; _currentWalkStamp = 0; _visible = true; @@ -123,7 +122,7 @@ void Character::setFacing(int32 facing) { _lastWalkTime = _vm->getOldMilli(); } - if (_currentPathNode == 0) + if (_currentPathNode == 0) playStandingAnim(); else playWalkAnim(0, 0); @@ -166,7 +165,7 @@ bool Character::walkTo(int16 newPosX, int16 newPosY) { _vm->getPathFinding()->resetBlockingRects(); // don't allow flux to go at the same position as drew - if (_id == 1 ) { + if (_id == 1) { int16 sizeX = MAX(5, 30 * _vm->getDrew()->getScale() / 1024); int16 sizeY = MAX(2, 20 * _vm->getDrew()->getScale() / 1024); _vm->getPathFinding()->addBlockingEllipse(_vm->getDrew()->getFinalX(), _vm->getDrew()->getFinalY(), sizeX, sizeY); @@ -183,11 +182,9 @@ bool Character::walkTo(int16 newPosX, int16 newPosY) { int32 smoothDx = 0; int32 smoothDy = 0; - for (uint32 a = 0; a < _vm->getPathFinding()->getPathNodeCount(); a++) { - _currentPathX[a] = _vm->getPathFinding()->getPathNodeX(a); - _currentPathY[a] = _vm->getPathFinding()->getPathNodeY(a); - } - _currentPathNodeCount = _vm->getPathFinding()->getPathNodeCount(); + _currentPath.clear(); + for (uint32 a = 0; a < _vm->getPathFinding()->getPathNodeCount(); a++) + _currentPath.push_back(Common::Point(_vm->getPathFinding()->getPathNodeX(a), _vm->getPathFinding()->getPathNodeY(a))); _currentPathNode = 0; stopSpecialAnim(); @@ -202,12 +199,12 @@ bool Character::walkTo(int16 newPosX, int16 newPosY) { int32 localWalkStamp = _currentWalkStamp; if (_blockingWalk) { - while ((_x != newPosX || _y != newPosY) && _currentPathNode < _currentPathNodeCount && !_vm->shouldQuitGame()) { - if (_currentPathNode < _currentPathNodeCount - 4) { - int32 delta = MIN(4, _currentPathNodeCount - _currentPathNode); + while ((_x != newPosX || _y != newPosY) && _currentPathNode < _currentPath.size() && !_vm->shouldQuitGame()) { + if (_currentPathNode < _currentPath.size() - 4) { + int32 delta = MIN(4, _currentPath.size() - _currentPathNode); - int32 dx = _currentPathX[_currentPathNode+delta] - _x; - int32 dy = _currentPathY[_currentPathNode+delta] - _y; + int16 dx = _currentPath[_currentPathNode+delta].x - _x; + int16 dy = _currentPath[_currentPathNode+delta].y - _y; // smooth the facing computation. It prevents some ugly flickering from happening if (!smoothDx && !smoothDy) { @@ -226,9 +223,9 @@ bool Character::walkTo(int16 newPosX, int16 newPosY) { _numPixelToWalk += _speed * (_vm->getSystem()->getMillis() - _lastWalkTime) * _scale / 1024; _lastWalkTime = _vm->getSystem()->getMillis(); - while (_numPixelToWalk >= 1000 && _currentPathNode < _currentPathNodeCount) { - _x = _currentPathX[_currentPathNode]; - _y = _currentPathY[_currentPathNode]; + while (_numPixelToWalk >= 1000 && _currentPathNode < _currentPath.size()) { + _x = _currentPath[_currentPathNode].x; + _y = _currentPath[_currentPathNode].y; _currentPathNode += 1; _numPixelToWalk -= 1000; } @@ -244,7 +241,7 @@ bool Character::walkTo(int16 newPosX, int16 newPosY) { playStandingAnim(); _flags &= ~0x1; _currentPathNode = 0; - _currentPathNodeCount = 0; + _currentPath.clear(); if (_x != localFinalX || _y != localFinalY) { return false; @@ -348,12 +345,12 @@ void Character::stopSpecialAnim() { void Character::update(int32 timeIncrement) { debugC(5, kDebugCharacter, "update(%d)", timeIncrement); - if ((_flags & 0x1) && _currentPathNodeCount > 0) { - if (_currentPathNode < _currentPathNodeCount) { - if (_currentPathNode < _currentPathNodeCount - 10) { - int32 delta = MIN(10, _currentPathNodeCount - _currentPathNode); - int32 dx = _currentPathX[_currentPathNode+delta] - _x; - int32 dy = _currentPathY[_currentPathNode+delta] - _y; + if ((_flags & 0x1) && _currentPath.size() > 0) { + if (_currentPathNode < _currentPath.size()) { + if (_currentPathNode < _currentPath.size() - 10) { + int32 delta = MIN(10, _currentPath.size() - _currentPathNode); + int16 dx = _currentPath[_currentPathNode+delta].x - _x; + int16 dy = _currentPath[_currentPathNode+delta].y - _y; setFacing(getFacingFromDirection(dx, dy)); playWalkAnim(0, 0); } @@ -362,9 +359,9 @@ void Character::update(int32 timeIncrement) { _numPixelToWalk += _speed * (_vm->getSystem()->getMillis() - _lastWalkTime) * _scale / 1024; _lastWalkTime = _vm->getSystem()->getMillis(); - while (_numPixelToWalk > 1000 && _currentPathNode < _currentPathNodeCount) { - _x = _currentPathX[_currentPathNode]; - _y = _currentPathY[_currentPathNode]; + while (_numPixelToWalk > 1000 && _currentPathNode < _currentPath.size()) { + _x = _currentPath[_currentPathNode].x; + _y = _currentPath[_currentPathNode].y; _currentPathNode += 1; _numPixelToWalk -= 1000; } @@ -372,7 +369,7 @@ void Character::update(int32 timeIncrement) { } else { playStandingAnim(); _flags &= ~0x1; - _currentPathNodeCount = 0; + _currentPath.clear(); } } @@ -664,7 +661,7 @@ void Character::stopWalk() { _finalY = _y; _flags &= ~0x1; _currentPathNode = 0; - _currentPathNodeCount = 0; + _currentPath.clear(); } const SpecialCharacterAnimation *Character::getSpecialAnimation(int32 characterId, int32 animationId) { @@ -996,8 +993,8 @@ bool Character::loadShadowAnimation(const Common::String &animName) { } void Character::plotPath(Graphics::Surface& surface) { - for (int i = 0; i < _currentPathNodeCount; i++) { - *(byte *)surface.getBasePtr(_currentPathX[i], _currentPathY[i]) = ( i < _currentPathNode); + for (uint32 i = 0; i < _currentPath.size(); i++) { + *(byte *)surface.getBasePtr(_currentPath[i].x, _currentPath[i].y) = (i < _currentPathNode); } } diff --git a/engines/toon/character.h b/engines/toon/character.h index d2d84a8c9b..d33c314bf7 100644 --- a/engines/toon/character.h +++ b/engines/toon/character.h @@ -23,6 +23,9 @@ #ifndef TOON_CHARACTER_H #define TOON_CHARACTER_H +#include "common/array.h" +#include "common/rect.h" + #include "toon/toon.h" namespace Toon { @@ -137,10 +140,8 @@ protected: Animation *_shadowAnim; Animation *_specialAnim; - int16 _currentPathX[4096]; - int16 _currentPathY[4096]; - int32 _currentPathNodeCount; - int32 _currentPathNode; + Common::Array _currentPath; + uint32 _currentPathNode; int32 _currentWalkStamp; }; -- cgit v1.2.3 From 198c116061d58c19e5a0bd97f47925bb7d585923 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 14 Jun 2012 14:40:33 +0200 Subject: GOB: Fix stupid typo/bug I introduced in 2007 Luckily, it apparently didn't have any visible symptoms... --- engines/gob/mult.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/gob/mult.cpp b/engines/gob/mult.cpp index 06a7130cef..b3d7ea6263 100644 --- a/engines/gob/mult.cpp +++ b/engines/gob/mult.cpp @@ -366,10 +366,11 @@ void Mult::doPalAnim() { palPtr->blue, 0, 0x13); palPtr = _vm->_global->_pPaletteDesc->vgaPal; - for (_counter = 0; _counter < 16; _counter++, palPtr++) + for (_counter = 0; _counter < 16; _counter++, palPtr++) { _vm->_global->_redPalette[_counter] = palPtr->red; _vm->_global->_greenPalette[_counter] = palPtr->green; _vm->_global->_bluePalette[_counter] = palPtr->blue; + } } else _vm->_video->setFullPalette(_vm->_global->_pPaletteDesc); -- cgit v1.2.3 From ccad083ab905b1e708bc9b7b3db501c9f1f028ab Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 14 Jun 2012 15:24:49 +0200 Subject: GOB: Fix a "condition depends on uninitialised value" in Geisha --- engines/gob/palanim.cpp | 93 +++++++++++++------------------------------------ 1 file changed, 24 insertions(+), 69 deletions(-) diff --git a/engines/gob/palanim.cpp b/engines/gob/palanim.cpp index 8a5327c3f1..f90b141725 100644 --- a/engines/gob/palanim.cpp +++ b/engines/gob/palanim.cpp @@ -75,47 +75,28 @@ bool PalAnim::fadeStepColor(int color) { bool PalAnim::fadeStep(int16 oper) { bool stop = true; - byte newRed; - byte newGreen; - byte newBlue; if (oper == 0) { - if (_vm->_global->_setAllPalette) { - if (_vm->_global->_inVM != 0) - error("PalAnim::fadeStep(): _vm->_global->_inVM != 0 not supported"); - - for (int i = 0; i < 256; i++) { - newRed = fadeColor(_vm->_global->_redPalette[i], _toFadeRed[i]); - newGreen = fadeColor(_vm->_global->_greenPalette[i], _toFadeGreen[i]); - newBlue = fadeColor(_vm->_global->_bluePalette[i], _toFadeBlue[i]); - - if ((_vm->_global->_redPalette[i] != newRed) || - (_vm->_global->_greenPalette[i] != newGreen) || - (_vm->_global->_bluePalette[i] != newBlue)) { - - _vm->_video->setPalElem(i, newRed, newGreen, newBlue, 0, 0x13); - - _vm->_global->_redPalette[i] = newRed; - _vm->_global->_greenPalette[i] = newGreen; - _vm->_global->_bluePalette[i] = newBlue; - stop = false; - } - } - } else { - for (int i = 0; i < 16; i++) { - - _vm->_video->setPalElem(i, - fadeColor(_vm->_global->_redPalette[i], _toFadeRed[i]), - fadeColor(_vm->_global->_greenPalette[i], _toFadeGreen[i]), - fadeColor(_vm->_global->_bluePalette[i], _toFadeBlue[i]), - -1, _vm->_global->_videoMode); - - if ((_vm->_global->_redPalette[i] != _toFadeRed[i]) || - (_vm->_global->_greenPalette[i] != _toFadeGreen[i]) || - (_vm->_global->_bluePalette[i] != _toFadeBlue[i])) - stop = false; + int colorCount = _vm->_global->_setAllPalette ? _vm->_global->_colorCount : 256; + + for (int i = 0; i < colorCount; i++) { + byte newRed = fadeColor(_vm->_global->_redPalette [i], _toFadeRed [i]); + byte newGreen = fadeColor(_vm->_global->_greenPalette[i], _toFadeGreen[i]); + byte newBlue = fadeColor(_vm->_global->_bluePalette [i], _toFadeBlue [i]); + + if ((_vm->_global->_redPalette [i] != newRed ) || + (_vm->_global->_greenPalette[i] != newGreen) || + (_vm->_global->_bluePalette [i] != newBlue)) { + + _vm->_video->setPalElem(i, newRed, newGreen, newBlue, 0, 0x13); + + _vm->_global->_redPalette [i] = newRed; + _vm->_global->_greenPalette[i] = newGreen; + _vm->_global->_bluePalette [i] = newBlue; + stop = false; } } + } else if ((oper > 0) && (oper < 4)) stop = fadeStepColor(oper - 1); @@ -124,44 +105,18 @@ bool PalAnim::fadeStep(int16 oper) { void PalAnim::fade(Video::PalDesc *palDesc, int16 fadeV, int16 allColors) { bool stop; - int16 i; if (_vm->shouldQuit()) return; _fadeValue = (fadeV < 0) ? -fadeV : 2; - if (!_vm->_global->_setAllPalette) { - if (!palDesc) { - for (i = 0; i < 16; i++) { - _toFadeRed[i] = 0; - _toFadeGreen[i] = 0; - _toFadeBlue[i] = 0; - } - } else { - for (i = 0; i < 16; i++) { - _toFadeRed[i] = palDesc->vgaPal[i].red; - _toFadeGreen[i] = palDesc->vgaPal[i].green; - _toFadeBlue[i] = palDesc->vgaPal[i].blue; - } - } - } else { - if (_vm->_global->_inVM != 0) - error("PalAnim::fade(): _vm->_global->_inVM != 0 is not supported"); - - if (!palDesc) { - for (i = 0; i < 256; i++) { - _toFadeRed[i] = 0; - _toFadeGreen[i] = 0; - _toFadeBlue[i] = 0; - } - } else { - for (i = 0; i < 256; i++) { - _toFadeRed[i] = palDesc->vgaPal[i].red; - _toFadeGreen[i] = palDesc->vgaPal[i].green; - _toFadeBlue[i] = palDesc->vgaPal[i].blue; - } - } + int colorCount = _vm->_global->_setAllPalette ? _vm->_global->_colorCount : 256; + + for (int i = 0; i < colorCount; i++) { + _toFadeRed [i] = (palDesc == 0) ? 0 : palDesc->vgaPal[i].red; + _toFadeGreen[i] = (palDesc == 0) ? 0 : palDesc->vgaPal[i].green; + _toFadeBlue [i] = (palDesc == 0) ? 0 : palDesc->vgaPal[i].blue; } if (allColors == 0) { -- cgit v1.2.3 From 0e6fb437799ba8f35776c59c02a02d59a99a71cf Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 14 Jun 2012 15:27:37 +0200 Subject: GOB: Remove useless variable --- engines/gob/global.cpp | 1 - engines/gob/global.h | 1 - engines/gob/init_v1.cpp | 2 -- engines/gob/init_v2.cpp | 2 -- 4 files changed, 6 deletions(-) diff --git a/engines/gob/global.cpp b/engines/gob/global.cpp index 1264c09860..87656a5fad 100644 --- a/engines/gob/global.cpp +++ b/engines/gob/global.cpp @@ -111,7 +111,6 @@ Global::Global(GobEngine *vm) : _vm(vm) { _dontSetPalette = false; _debugFlag = 0; - _inVM = 0; _inter_animDataSize = 10; diff --git a/engines/gob/global.h b/engines/gob/global.h index fa2f2c9637..175331dd83 100644 --- a/engines/gob/global.h +++ b/engines/gob/global.h @@ -127,7 +127,6 @@ public: SurfacePtr _primarySurfDesc; int16 _debugFlag; - int16 _inVM; int16 _inter_animDataSize; diff --git a/engines/gob/init_v1.cpp b/engines/gob/init_v1.cpp index 25d521aca6..a8e8cbe2c3 100644 --- a/engines/gob/init_v1.cpp +++ b/engines/gob/init_v1.cpp @@ -41,8 +41,6 @@ void Init_v1::initVideo() { _vm->_global->_mousePresent = 1; - _vm->_global->_inVM = 0; - if ((_vm->_global->_videoMode == 0x13) && !_vm->isEGA()) _vm->_global->_colorCount = 256; diff --git a/engines/gob/init_v2.cpp b/engines/gob/init_v2.cpp index 1289d561ea..c204b04a40 100644 --- a/engines/gob/init_v2.cpp +++ b/engines/gob/init_v2.cpp @@ -45,8 +45,6 @@ void Init_v2::initVideo() { _vm->_global->_mousePresent = 1; - _vm->_global->_inVM = 0; - _vm->_global->_colorCount = 16; if (!_vm->isEGA() && ((_vm->getPlatform() == Common::kPlatformPC) || -- cgit v1.2.3 From 5ae4ed09ea9b0ffd4ef00e55eb1f738103fdeeeb Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 14 Jun 2012 15:33:30 +0200 Subject: GOB: Fix an uninitialised value in Geisha's Penetration --- engines/gob/minigames/geisha/submarine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/gob/minigames/geisha/submarine.cpp b/engines/gob/minigames/geisha/submarine.cpp index d16761cb7c..bf15306e5a 100644 --- a/engines/gob/minigames/geisha/submarine.cpp +++ b/engines/gob/minigames/geisha/submarine.cpp @@ -51,7 +51,7 @@ enum Animation { }; -Submarine::Submarine(const ANIFile &ani) : ANIObject(ani), _state(kStateMove) { +Submarine::Submarine(const ANIFile &ani) : ANIObject(ani), _state(kStateMove), _direction(kDirectionNone) { turn(kDirectionN); } -- cgit v1.2.3 From 4aa0ec7fc4eae0941efb15affe664544c33822ea Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 14 Jun 2012 17:23:01 +0100 Subject: TOON: Change Pathfinding weight buffers to uint16. This should result in a significant saving in RAM usage. Have added warning outputs if the weights exceed the maximum limit. --- engines/toon/path.cpp | 34 +++++++++++++++++++--------------- engines/toon/path.h | 8 ++++---- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp index 735801eebc..7914aed595 100644 --- a/engines/toon/path.cpp +++ b/engines/toon/path.cpp @@ -60,7 +60,7 @@ void PathFindingHeap::clear() { memset(_data, 0, sizeof(HeapDataGrid) * _size); } -void PathFindingHeap::push(int16 x, int16 y, int16 weight) { +void PathFindingHeap::push(int16 x, int16 y, uint16 weight) { debugC(2, kDebugPath, "push(%d, %d, %d)", x, y, weight); if (_count == _size) { @@ -104,7 +104,7 @@ void PathFindingHeap::push(int16 x, int16 y, int16 weight) { } } -void PathFindingHeap::pop(int16 *x, int16 *y, int16 *weight) { +void PathFindingHeap::pop(int16 *x, int16 *y, uint16 *weight) { debugC(2, kDebugPath, "pop(x, y, weight)"); if (!_count) { @@ -170,7 +170,7 @@ void PathFinding::init(Picture *mask) { _heap->unload(); _heap->init(500); delete[] _sq; - _sq = new int32[_width * _height]; + _sq = new uint16[_width * _height]; } bool PathFinding::isLikelyWalkable(int16 x, int16 y) { @@ -304,18 +304,16 @@ bool PathFinding::findPath(int16 x, int16 y, int16 destx, int16 desty) { } // no direct line, we use the standard A* algorithm - memset(_sq , 0, _width * _height * sizeof(int32)); + memset(_sq , 0, _width * _height * sizeof(uint16)); _heap->clear(); int16 curX = x; int16 curY = y; - int16 curWeight = 0; + uint16 curWeight = 0; _sq[curX + curY *_width] = 1; _heap->push(curX, curY, abs(destx - x) + abs(desty - y)); - int16 wei; while (_heap->getCount()) { - wei = 0; _heap->pop(&curX, &curY, &curWeight); int32 curNode = curX + curY * _width; @@ -328,15 +326,23 @@ bool PathFinding::findPath(int16 x, int16 y, int16 destx, int16 desty) { for (int16 px = startX; px <= endX && !next; px++) { for (int16 py = startY; py <= endY && !next; py++) { if (px != curX || py != curY) { - wei = abs(px - curX) + abs(py - curY); + uint16 wei = abs(px - curX) + abs(py - curY); - int32 curPNode = px + py * _width; if (isWalkable(px, py)) { // walkable ? - int32 sum = _sq[curNode] + wei * (1 + (isLikelyWalkable(px, py) ? 5 : 0)); + int32 curPNode = px + py * _width; + uint32 sum = _sq[curNode] + wei * (1 + (isLikelyWalkable(px, py) ? 5 : 0)); + if (sum > (uint32)0xFFFF) { + warning("PathFinding::findPath sum exceeds maximum representable!"); + sum = (uint32)0xFFFF; + } if (_sq[curPNode] > sum || !_sq[curPNode]) { - int32 newWeight = abs(destx - px) + abs(desty - py); _sq[curPNode] = sum; - _heap->push(px, py, _sq[curPNode] + newWeight); + uint32 newWeight = _sq[curPNode] + abs(destx - px) + abs(desty - py); + if (newWeight > (uint32)0xFFFF) { + warning("PathFinding::findPath newWeight exceeds maximum representable!"); + newWeight = (uint16)0xFFFF; + } + _heap->push(px, py, newWeight); if (!newWeight) next = true; // we found it ! } @@ -359,7 +365,7 @@ bool PathFinding::findPath(int16 x, int16 y, int16 destx, int16 desty) { Common::Array retPath; retPath.push_back(Common::Point(curX, curY)); - int32 bestscore = _sq[destx + desty * _width]; + uint16 bestscore = _sq[destx + desty * _width]; bool retVal = false; while (true) { @@ -374,8 +380,6 @@ bool PathFinding::findPath(int16 x, int16 y, int16 destx, int16 desty) { for (int16 px = startX; px <= endX; px++) { for (int16 py = startY; py <= endY; py++) { if (px != curX || py != curY) { - wei = abs(px - curX) + abs(py - curY); - int32 PNode = px + py * _width; if (_sq[PNode] && (isWalkable(px, py))) { if (_sq[PNode] < bestscore) { diff --git a/engines/toon/path.h b/engines/toon/path.h index 2476dc3b8a..59f74ef286 100644 --- a/engines/toon/path.h +++ b/engines/toon/path.h @@ -36,8 +36,8 @@ public: PathFindingHeap(); ~PathFindingHeap(); - void push(int16 x, int16 y, int16 weight); - void pop(int16 *x, int16 *y, int16 *weight); + void push(int16 x, int16 y, uint16 weight); + void pop(int16 *x, int16 *y, uint16 *weight); void init(int32 size); void clear(); void unload(); @@ -46,7 +46,7 @@ public: private: struct HeapDataGrid { int16 _x, _y; - int16 _weight; + uint16 _weight; }; HeapDataGrid *_data; @@ -84,7 +84,7 @@ private: PathFindingHeap *_heap; - int32 *_sq; + uint16 *_sq; int16 _width; int16 _height; -- cgit v1.2.3 From acaf8f762382f1aa886d4a3f5b0b8b662863f01c Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 14 Jun 2012 21:02:44 +0100 Subject: TOON: Fix two latent off-by-one errors in Character Class. These were exposed by assertions from Common::Array usage. --- engines/toon/character.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp index c9073de587..09730626f2 100644 --- a/engines/toon/character.cpp +++ b/engines/toon/character.cpp @@ -201,7 +201,7 @@ bool Character::walkTo(int16 newPosX, int16 newPosY) { if (_blockingWalk) { while ((_x != newPosX || _y != newPosY) && _currentPathNode < _currentPath.size() && !_vm->shouldQuitGame()) { if (_currentPathNode < _currentPath.size() - 4) { - int32 delta = MIN(4, _currentPath.size() - _currentPathNode); + int32 delta = MIN(4, _currentPath.size() - 1 - _currentPathNode); int16 dx = _currentPath[_currentPathNode+delta].x - _x; int16 dy = _currentPath[_currentPathNode+delta].y - _y; @@ -348,7 +348,7 @@ void Character::update(int32 timeIncrement) { if ((_flags & 0x1) && _currentPath.size() > 0) { if (_currentPathNode < _currentPath.size()) { if (_currentPathNode < _currentPath.size() - 10) { - int32 delta = MIN(10, _currentPath.size() - _currentPathNode); + int32 delta = MIN(10, _currentPath.size() - 1 - _currentPathNode); int16 dx = _currentPath[_currentPathNode+delta].x - _x; int16 dy = _currentPath[_currentPathNode+delta].y - _y; setFacing(getFacingFromDirection(dx, dy)); -- cgit v1.2.3 From 3b8b3c4caffc8a19a7ad4c4fa55bad712f0e5fce Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 14 Jun 2012 23:39:33 +0200 Subject: GOB: Fix a failed assert in Litte Red Riding Hood --- engines/gob/inter_v1.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 6fc472a0ac..3652637e32 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -1584,14 +1584,13 @@ void Inter_v1::o1_waitEndPlay(OpFuncParams ¶ms) { } void Inter_v1::o1_playComposition(OpFuncParams ¶ms) { - int16 composition[50]; - int16 dataVar; - int16 freqVal; + int16 dataVar = _vm->_game->_script->readVarIndex(); + int16 freqVal = _vm->_game->_script->readValExpr(); - dataVar = _vm->_game->_script->readVarIndex(); - freqVal = _vm->_game->_script->readValExpr(); + int16 composition[50]; + int maxEntries = MIN(50, (_variables->getSize() - dataVar) / 4); for (int i = 0; i < 50; i++) - composition[i] = (int16) VAR_OFFSET(dataVar + i * 4); + composition[i] = (i < maxEntries) ? ((int16) VAR_OFFSET(dataVar + i * 4)) : -1; _vm->_sound->blasterPlayComposition(composition, freqVal); } -- cgit v1.2.3 From 59b2a84552ae4f64e3e6ddc8b29ecda4f3dd524d Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 15 Jun 2012 00:51:03 +0200 Subject: GOB: Add a proper GameType for Little Red --- engines/gob/detection_tables.h | 32 ++++++++++++++++---------------- engines/gob/gob.cpp | 1 + engines/gob/gob.h | 3 ++- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/engines/gob/detection_tables.h b/engines/gob/detection_tables.h index 77b54a19cd..bd35900473 100644 --- a/engines/gob/detection_tables.h +++ b/engines/gob/detection_tables.h @@ -1615,7 +1615,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, @@ -1629,7 +1629,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, @@ -1643,7 +1643,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, @@ -1657,7 +1657,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, @@ -1671,7 +1671,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, @@ -1689,7 +1689,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesNone, 0, 0, 0 }, @@ -1703,7 +1703,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, @@ -1717,7 +1717,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, @@ -1731,7 +1731,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, @@ -1745,7 +1745,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, @@ -1759,7 +1759,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, @@ -1773,7 +1773,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, @@ -1787,7 +1787,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, @@ -1801,7 +1801,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, @@ -1815,7 +1815,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, @@ -1829,7 +1829,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeLittleRed, kFeaturesAdLib | kFeaturesEGA, 0, 0, 0 }, diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 4e7aa467b5..acd8fcb468 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -438,6 +438,7 @@ bool GobEngine::initGameParts() { break; case kGameTypeWeen: + case kGameTypeLittleRed: case kGameTypeGob2: _init = new Init_v2(this); _video = new Video_v2(this); diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 6277585015..165760e6d5 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -127,7 +127,8 @@ enum GameType { kGameTypeAdi2, kGameTypeAdi4, kGameTypeAdibou2, - kGameTypeAdibou1 + kGameTypeAdibou1, + kGameTypeLittleRed }; enum Features { -- cgit v1.2.3 From f16cc050e97de6339347a650b9a801153dc7ad91 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 15 Jun 2012 00:56:55 +0200 Subject: GOB: Add class Inter_LittleRed This fixes the crash when selecting an animal in the "Languages" screen. Interestingly, the German names of the animals are partially wrong... And for "Das Schmetterling" (sic!), even the recorded speech sample is wrong. --- engines/gob/gob.cpp | 12 +++++++++- engines/gob/inter.h | 11 +++++++++ engines/gob/inter_littlered.cpp | 49 +++++++++++++++++++++++++++++++++++++++++ engines/gob/inter_v2.cpp | 6 ++--- engines/gob/module.mk | 1 + 5 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 engines/gob/inter_littlered.cpp diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index acd8fcb468..a13f6a372f 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -438,7 +438,6 @@ bool GobEngine::initGameParts() { break; case kGameTypeWeen: - case kGameTypeLittleRed: case kGameTypeGob2: _init = new Init_v2(this); _video = new Video_v2(this); @@ -463,6 +462,17 @@ bool GobEngine::initGameParts() { _saveLoad = new SaveLoad_v2(this, _targetName.c_str()); break; + case kGameTypeLittleRed: + _init = new Init_v2(this); + _video = new Video_v2(this); + _inter = new Inter_LittleRed(this); + _mult = new Mult_v2(this); + _draw = new Draw_v2(this); + _map = new Map_v2(this); + _goblin = new Goblin_v2(this); + _scenery = new Scenery_v2(this); + break; + case kGameTypeGob3: _init = new Init_v3(this); _video = new Video_v2(this); diff --git a/engines/gob/inter.h b/engines/gob/inter.h index 1e6f74db4e..907a275e50 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -513,6 +513,17 @@ protected: void oFascin_setWinFlags(); }; +class Inter_LittleRed : public Inter_v2 { +public: + Inter_LittleRed(GobEngine *vm); + virtual ~Inter_LittleRed() {} + +protected: + virtual void setupOpcodesDraw(); + virtual void setupOpcodesFunc(); + virtual void setupOpcodesGob(); +}; + class Inter_v3 : public Inter_v2 { public: Inter_v3(GobEngine *vm); diff --git a/engines/gob/inter_littlered.cpp b/engines/gob/inter_littlered.cpp new file mode 100644 index 0000000000..6a63998216 --- /dev/null +++ b/engines/gob/inter_littlered.cpp @@ -0,0 +1,49 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "gob/gob.h" +#include "gob/inter.h" + +namespace Gob { + +#define OPCODEVER Inter_LittleRed +#define OPCODEDRAW(i, x) _opcodesDraw[i]._OPCODEDRAW(OPCODEVER, x) +#define OPCODEFUNC(i, x) _opcodesFunc[i]._OPCODEFUNC(OPCODEVER, x) +#define OPCODEGOB(i, x) _opcodesGob[i]._OPCODEGOB(OPCODEVER, x) + +Inter_LittleRed::Inter_LittleRed(GobEngine *vm) : Inter_v2(vm) { +} + +void Inter_LittleRed::setupOpcodesDraw() { + Inter_v2::setupOpcodesDraw(); +} + +void Inter_LittleRed::setupOpcodesFunc() { + Inter_v2::setupOpcodesFunc(); +} + +void Inter_LittleRed::setupOpcodesGob() { + OPCODEGOB(500, o2_playProtracker); + OPCODEGOB(501, o2_stopProtracker); +} + +} // End of namespace Gob diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 54f6a1acc1..cb58fe86f7 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1248,7 +1248,7 @@ void Inter_v2::o2_checkData(OpFuncParams ¶ms) { file = "EMAP2011.TOT"; int32 size = -1; - SaveLoad::SaveMode mode = _vm->_saveLoad->getSaveMode(file.c_str()); + SaveLoad::SaveMode mode = _vm->_saveLoad ? _vm->_saveLoad->getSaveMode(file.c_str()) : SaveLoad::kSaveModeNone; if (mode == SaveLoad::kSaveModeNone) { size = _vm->_dataIO->fileSize(file); @@ -1277,7 +1277,7 @@ void Inter_v2::o2_readData(OpFuncParams ¶ms) { debugC(2, kDebugFileIO, "Read from file \"%s\" (%d, %d bytes at %d)", file, dataVar, size, offset); - SaveLoad::SaveMode mode = _vm->_saveLoad->getSaveMode(file); + SaveLoad::SaveMode mode = _vm->_saveLoad ? _vm->_saveLoad->getSaveMode(file) : SaveLoad::kSaveModeNone; if (mode == SaveLoad::kSaveModeSave) { WRITE_VAR(1, 1); @@ -1349,7 +1349,7 @@ void Inter_v2::o2_writeData(OpFuncParams ¶ms) { WRITE_VAR(1, 1); - SaveLoad::SaveMode mode = _vm->_saveLoad->getSaveMode(file); + SaveLoad::SaveMode mode = _vm->_saveLoad ? _vm->_saveLoad->getSaveMode(file) : SaveLoad::kSaveModeNone; if (mode == SaveLoad::kSaveModeSave) { if (!_vm->_saveLoad->save(file, dataVar, size, offset)) { diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 7c5d7de158..20214ea940 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -44,6 +44,7 @@ MODULE_OBJS := \ inter_v2.o \ inter_bargon.o \ inter_fascin.o \ + inter_littlered.o \ inter_inca2.o \ inter_playtoons.o \ inter_v3.o \ -- cgit v1.2.3 From 90999d8f8ca9bc0554dcb353a4ee143299bf8bc3 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 15 Jun 2012 03:03:36 +0200 Subject: AUDIO: Implement a missing Protracker feature When a row has a new period, but no new sample, restart the track's last sample (except when we're doing portamento). --- audio/mods/protracker.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/audio/mods/protracker.cpp b/audio/mods/protracker.cpp index 084b0edf9a..1e18d5adf8 100644 --- a/audio/mods/protracker.cpp +++ b/audio/mods/protracker.cpp @@ -61,6 +61,7 @@ private: struct { byte sample; + byte lastSample; uint16 period; Offset offset; @@ -184,6 +185,7 @@ void ProtrackerStream::updateRow() { _track[track].vibratoPos = 0; } _track[track].sample = note.sample; + _track[track].lastSample = note.sample; _track[track].finetune = _module.sample[note.sample - 1].finetune; _track[track].vol = _module.sample[note.sample - 1].vol; } @@ -194,7 +196,9 @@ void ProtrackerStream::updateRow() { _track[track].period = _module.noteToPeriod(note.note, _track[track].finetune); else _track[track].period = note.period; + _track[track].offset = Offset(0); + _track[track].sample = _track[track].lastSample; } } -- cgit v1.2.3 From a529d960917850d5e7a89293d615e28d9130468a Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 15 Jun 2012 00:38:45 -0400 Subject: SCUMM: Adjust some wiz image ops and flood fill rects Fixes black lines appearing on the field in football/football2002 and some soccer2004 menus. --- engines/scumm/he/script_v100he.cpp | 6 ++++++ engines/scumm/he/script_v90he.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index 3e2053790e..a2eb42214b 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -876,6 +876,7 @@ void ScummEngine_v100he::o100_floodFill() { _floodFillParams.box.top = 0; _floodFillParams.box.right = 639; _floodFillParams.box.bottom = 479; + adjustRect(_floodFillParams.box); break; case 6: _floodFillParams.y = pop(); @@ -886,6 +887,7 @@ void ScummEngine_v100he::o100_floodFill() { _floodFillParams.box.right = pop(); _floodFillParams.box.top = pop(); _floodFillParams.box.left = pop(); + adjustRect(_floodFillParams.box); break; case 20: _floodFillParams.flags = pop(); @@ -1345,6 +1347,7 @@ void ScummEngine_v100he::o100_wizImageOps() { _wizParams.fillColor = pop(); _wizParams.box2.top = _wizParams.box2.bottom = pop(); _wizParams.box2.left = _wizParams.box2.right = pop(); + adjustRect(_wizParams.box2); break; case 135: _wizParams.processFlags |= kWPFDstResNum; @@ -1358,6 +1361,7 @@ void ScummEngine_v100he::o100_wizImageOps() { _wizParams.box2.right = pop(); _wizParams.box2.top = pop(); _wizParams.box2.left = pop(); + adjustRect(_wizParams.box2); break; case 137: _wizParams.processFlags |= kWPFFillColor | kWPFClipBox2; @@ -1365,6 +1369,7 @@ void ScummEngine_v100he::o100_wizImageOps() { _wizParams.fillColor = pop(); _wizParams.box2.top = _wizParams.box2.bottom = pop(); _wizParams.box2.left = _wizParams.box2.right = pop(); + adjustRect(_wizParams.box2); break; case 138: _wizParams.processFlags |= kWPFFillColor | kWPFClipBox2; @@ -1374,6 +1379,7 @@ void ScummEngine_v100he::o100_wizImageOps() { _wizParams.box2.right = pop(); _wizParams.box2.top = pop(); _wizParams.box2.left = pop(); + adjustRect(_wizParams.box2); break; default: error("o100_wizImageOps: Unknown case %d", subOp); diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp index 9e8ac7e2f2..0c3d5b3399 100644 --- a/engines/scumm/he/script_v90he.cpp +++ b/engines/scumm/he/script_v90he.cpp @@ -244,6 +244,7 @@ void ScummEngine_v90he::o90_wizImageOps() { _wizParams.box2.right = pop(); _wizParams.box2.top = pop(); _wizParams.box2.left = pop(); + adjustRect(_wizParams.box2); break; case 134: // HE99+ _wizParams.processFlags |= kWPFFillColor | kWPFClipBox2; @@ -253,6 +254,7 @@ void ScummEngine_v90he::o90_wizImageOps() { _wizParams.box2.right = pop(); _wizParams.box2.top = pop(); _wizParams.box2.left = pop(); + adjustRect(_wizParams.box2); break; case 135: // HE99+ _wizParams.processFlags |= kWPFFillColor | kWPFClipBox2; @@ -260,6 +262,7 @@ void ScummEngine_v90he::o90_wizImageOps() { _wizParams.fillColor = pop(); _wizParams.box2.top = _wizParams.box2.bottom = pop(); _wizParams.box2.left = _wizParams.box2.right = pop(); + adjustRect(_wizParams.box2); break; case 136: // HE99+ _wizParams.processFlags |= kWPFFillColor | kWPFClipBox2; @@ -267,6 +270,7 @@ void ScummEngine_v90he::o90_wizImageOps() { _wizParams.fillColor = pop(); _wizParams.box2.top = _wizParams.box2.bottom = pop(); _wizParams.box2.left = _wizParams.box2.right = pop(); + adjustRect(_wizParams.box2); break; case 137: // HE99+ _wizParams.processFlags |= kWPFDstResNum; @@ -1488,6 +1492,7 @@ void ScummEngine_v90he::o90_floodFill() { _floodFillParams.box.top = 0; _floodFillParams.box.right = 639; _floodFillParams.box.bottom = 479; + adjustRect(_floodFillParams.box); break; case 65: _floodFillParams.y = pop(); @@ -1501,6 +1506,7 @@ void ScummEngine_v90he::o90_floodFill() { _floodFillParams.box.right = pop(); _floodFillParams.box.top = pop(); _floodFillParams.box.left = pop(); + adjustRect(_floodFillParams.box); break; case 255: floodFill(&_floodFillParams, this); -- cgit v1.2.3 From 83e014f2bdf0dc20b37996063c6deb959ffab20d Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 15 Jun 2012 01:09:28 -0400 Subject: SCUMM: Fix rect bounds in getPolygonOverlap() --- engines/scumm/he/script_v90he.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp index 0c3d5b3399..1ea9960a18 100644 --- a/engines/scumm/he/script_v90he.cpp +++ b/engines/scumm/he/script_v90he.cpp @@ -1672,7 +1672,7 @@ void ScummEngine_v90he::o90_getPolygonOverlap() { { Common::Rect r2; _sprite->getSpriteBounds(args2[0], false, r2); - Common::Rect r1(args1[0], args1[1], args1[2], args1[3]); + Common::Rect r1(args1[0], args1[1], args1[2] + 1, args1[3] + 1); if (r2.isValidRect() == false) { push(0); break; @@ -1717,7 +1717,7 @@ void ScummEngine_v90he::o90_getPolygonOverlap() { { Common::Rect r2; _sprite->getSpriteBounds(args2[0], true, r2); - Common::Rect r1(args1[0], args1[1], args1[2], args1[3]); + Common::Rect r1(args1[0], args1[1], args1[2] + 1, args1[3] + 1); if (r2.isValidRect() == false) { push(0); break; -- cgit v1.2.3 From a5c23f73fc5cd082368a110250ea03f26a9c8a50 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 15 Jun 2012 18:58:29 +1000 Subject: NEWS: Add Fixes in HE98 version of Pajama Sam's Lost & Found. --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index acff8b8473..4db976b0d8 100644 --- a/NEWS +++ b/NEWS @@ -53,6 +53,7 @@ For a more comprehensive changelog of the latest experimental code, see: SCUMM: - Added support for the Macintosh version of SPY Fox in Hold the Mustard. - Added a difficulty selection dialog for Loom FM-TOWNS. + - Fixed graphical glitches in HE98 version of Pajama Sam's Lost & Found. iPhone port: - Changed "F5 (menu)" gesture to open up the global main menu instead. -- cgit v1.2.3 From 85e0a90f4adb1e2b811ca7c02ad594ecdcd11bea Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 15 Jun 2012 19:20:03 +1000 Subject: SCUMM: The target and Wii releases of a few HE games are HE101, since they have differce in debugInput opcode too. --- devtools/scumm-md5.txt | 6 +++--- engines/scumm/scumm-md5.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt index 5223d6785d..176f04aaf8 100644 --- a/devtools/scumm-md5.txt +++ b/devtools/scumm-md5.txt @@ -632,9 +632,9 @@ pajama Pajama Sam 1: No Need to Hide When It's Dark Outside a095e33061606d231ff37dca4c64c8ac -1 de All HE 99 - - Joachim Eberhard 898eaa21f79cf8d4f08db856244689ff 66505 en Windows HE 99 Updated - Joachim Eberhard 37aed3f91c1ef959e0bd265f9b13781f -1 us All HE 100 Updated - Kirben - 782393c5934ecd0b536eaf5fd541bd26 -1 en Windows HE 100 Updated - Jonathan 4aa93cb30e485b728504ba3a693f12bf -1 ru Windows HE 100 - - sev - c225bec1b6c0798a2b8c89ac226dc793 -1 en Wii HE 100 - - sanguinehearts + 782393c5934ecd0b536eaf5fd541bd26 -1 en Windows HE 101 Updated - Jonathan + c225bec1b6c0798a2b8c89ac226dc793 -1 en Wii HE 101 - - sanguinehearts f237bf8a5ef9af78b2a6a4f3901da341 18354 en All - Demo - khalek, sev 7f945525abcd48015adf1632637a44a1 -1 fr All - Demo - Kirben @@ -841,7 +841,7 @@ spyfox SPY Fox 1: Dry Cereal 72ac6bc980d5101c2142189d746bd62f -1 ru Windows HE 99 - - sev 3de99ef0523f8ca7958faa3afccd035a -1 us All HE 100 Updated - Kirben 23394c8d29cc63c61313959431a12476 -1 en Windows HE 100 Updated - Jonathan - 50b831f11b8c4b83784cf81f4dcc69ea -1 en Wii HE 100 - - sanguinehearts + 50b831f11b8c4b83784cf81f4dcc69ea -1 en Wii HE 101 - - sanguinehearts 15878e3bee2e1e759184abee98589eaa -1 en iOS HE 100 - - clone2727 53e94115b55dd51d4b8ff0871aa1df1e 20103 en All - Demo - khalek, sev diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 9aac4a082f..0814e3bfe1 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 Jun 5 16:56:40 2012 + This file was generated by the md5table tool on Fri Jun 15 09:16:45 2012 DO NOT EDIT MANUALLY! */ @@ -227,7 +227,7 @@ static const MD5Table md5table[] = { { "4fe6a2e8df3c4536b278fdd2fbcb181e", "pajama3", "", "Mini Game", -1, Common::EN_ANY, Common::kPlatformWindows }, { "5057fb0e99e5aa29df1836329232f101", "freddi2", "HE 80", "", -1, Common::UNK_LANG, Common::kPlatformWindows }, { "507bb360688dc4180fdf0d7597352a69", "freddi", "HE 73", "", 26402, Common::SE_SWE, Common::kPlatformWindows }, - { "50b831f11b8c4b83784cf81f4dcc69ea", "spyfox", "HE 100", "", -1, Common::EN_ANY, Common::kPlatformWii }, + { "50b831f11b8c4b83784cf81f4dcc69ea", "spyfox", "HE 101", "", -1, Common::EN_ANY, Common::kPlatformWii }, { "50fcdc982a25063b78ad46bf389b8e8d", "tentacle", "Floppy", "Floppy", -1, Common::IT_ITA, Common::kPlatformPC }, { "51305e929e330e24a75a0351c8f9975e", "freddi2", "HE 99", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown }, { "513f91a9dbe8d5490b39e56a3ac5bbdf", "pajama2", "HE 98.5", "", -1, Common::NL_NLD, Common::kPlatformUnknown }, @@ -334,7 +334,7 @@ static const MD5Table md5table[] = { { "7766c9487f9d53a8cb0edabda5119c3d", "puttputt", "HE 60", "", 8022, Common::EN_ANY, Common::kPlatformPC }, { "77f5c9cc0986eb729c1a6b4c8823bbae", "zakloom", "FM-TOWNS", "Demo", 7520, Common::EN_ANY, Common::kPlatformFMTowns }, { "780e4a0ae2ff17dc296f4a79543b44f8", "puttmoon", "", "", -1, Common::UNK_LANG, Common::kPlatformPC }, - { "782393c5934ecd0b536eaf5fd541bd26", "pajama", "HE 100", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows }, + { "782393c5934ecd0b536eaf5fd541bd26", "pajama", "HE 101", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows }, { "784b499c98d07260a30952685758636b", "pajama3", "", "Demo", 13911, Common::DE_DEU, Common::kPlatformWindows }, { "78bd5f036ea35a878b74e4f47941f784", "freddi4", "HE 99", "", -1, Common::RU_RUS, Common::kPlatformWindows }, { "78c07ca088526d8d4446a4c2cb501203", "freddi3", "HE 99", "", -1, Common::FR_FRA, Common::kPlatformUnknown }, @@ -494,7 +494,7 @@ static const MD5Table md5table[] = { { "c0039ad982999c92d0de81910d640fa0", "freddi", "HE 71", "", -1, Common::NL_NLD, Common::kPlatformWindows }, { "c13225cb1bbd3bc9fe578301696d8021", "monkey", "SEGA", "", -1, Common::EN_ANY, Common::kPlatformSegaCD }, { "c20848f53c2d48bfacdc840993843765", "freddi2", "HE 80", "Demo", -1, Common::NL_NLD, Common::kPlatformUnknown }, - { "c225bec1b6c0798a2b8c89ac226dc793", "pajama", "HE 100", "", -1, Common::EN_ANY, Common::kPlatformWii }, + { "c225bec1b6c0798a2b8c89ac226dc793", "pajama", "HE 101", "", -1, Common::EN_ANY, Common::kPlatformWii }, { "c24c490373aeb48fbd54caa8e7ae376d", "loom", "No AdLib", "EGA", -1, Common::DE_DEU, Common::kPlatformAtariST }, { "c25755b08a8d0d47695e05f1e2111bfc", "freddi4", "", "Demo", -1, Common::EN_USA, Common::kPlatformUnknown }, { "c30ef068add4277104243c31ce46c12b", "monkey2", "", "", -1, Common::FR_FRA, Common::kPlatformAmiga }, -- cgit v1.2.3 From 425926ed7ebde1fa77f3874498a6f285af75ac08 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 15 Jun 2012 11:33:28 +0300 Subject: SCI: Limit floodfill hack to GK1 Fixes the intro of LSL7 and the inventory screen in PQ4 --- engines/sci/graphics/frameout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index db49497b6b..dff332458a 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -647,7 +647,7 @@ void GfxFrameout::kernelFrameout() { // Since I first wrote the patch, the race has stopped occurring for me though. // I'll leave this for investigation later, when someone can reproduce. //if (it->pictureId == kPlanePlainColored) // FIXME: This is what SSCI does, and fixes the intro of LSL7, but breaks the dialogs in GK1 (adds black boxes) - if (it->pictureId == kPlanePlainColored && it->planeBack) + if (it->pictureId == kPlanePlainColored && (it->planeBack || g_sci->getGameId() != GID_GK1)) _paint32->fillRect(it->planeRect, it->planeBack); _coordAdjuster->pictureSetDisplayArea(it->planeRect); -- cgit v1.2.3 From 577d7e41c9ca2c498dc85e41c373fbdca8d2ed41 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 15 Jun 2012 11:44:54 +0300 Subject: SCI: Change Script::getObject() to accept a reg_t This is needed for upcoming changes to the Script class --- engines/sci/engine/kernel.cpp | 2 +- engines/sci/engine/script.cpp | 14 +++++++------- engines/sci/engine/script.h | 4 ++-- engines/sci/engine/seg_manager.cpp | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index c99bc4fe47..0266414b26 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -377,7 +377,7 @@ uint16 Kernel::findRegType(reg_t reg) { if (reg.offset <= (*(Script *)mobj).getBufSize() && reg.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET && RAW_IS_OBJECT((*(Script *)mobj).getBuf(reg.offset)) ) { - result |= ((Script *)mobj)->getObject(reg.offset) ? SIG_TYPE_OBJECT : SIG_TYPE_REFERENCE; + result |= ((Script *)mobj)->getObject(reg) ? SIG_TYPE_OBJECT : SIG_TYPE_REFERENCE; } else result |= SIG_TYPE_REFERENCE; break; diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 5f0118b5b6..08f7922b1e 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -243,16 +243,16 @@ const byte *Script::getSci3ObjectsPointer() { return ptr; } -Object *Script::getObject(uint16 offset) { - if (_objects.contains(offset)) - return &_objects[offset]; +Object *Script::getObject(reg_t pos) { + if (_objects.contains(pos.offset)) + return &_objects[pos.offset]; else return 0; } -const Object *Script::getObject(uint16 offset) const { - if (_objects.contains(offset)) - return &_objects[offset]; +const Object *Script::getObject(reg_t pos) const { + if (_objects.contains(pos.offset)) + return &_objects[pos.offset]; else return 0; } @@ -746,7 +746,7 @@ Common::Array Script::listAllDeallocatable(SegmentId segId) const { Common::Array Script::listAllOutgoingReferences(reg_t addr) const { Common::Array tmp; if (addr.offset <= _bufSize && addr.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET && RAW_IS_OBJECT(_buf + addr.offset)) { - const Object *obj = getObject(addr.offset); + const Object *obj = getObject(addr); if (obj) { // Note all local variables, if we have a local variable environment if (_localsSegment) diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h index a180579d2f..06a7f089ba 100644 --- a/engines/sci/engine/script.h +++ b/engines/sci/engine/script.h @@ -119,8 +119,8 @@ public: virtual void saveLoadWithSerializer(Common::Serializer &ser); - Object *getObject(uint16 offset); - const Object *getObject(uint16 offset) const; + Object *getObject(reg_t pos); + const Object *getObject(reg_t pos) const; /** * Initializes an object within the segment manager diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index cc127c8dbc..cfa83a7697 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -228,7 +228,7 @@ Object *SegManager::getObject(reg_t pos) const { Script *scr = (Script *)mobj; if (pos.offset <= scr->getBufSize() && pos.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET && RAW_IS_OBJECT(scr->getBuf(pos.offset))) { - obj = scr->getObject(pos.offset); + obj = scr->getObject(pos); } } } -- cgit v1.2.3 From e1ae1108601cce0ad7aeab5f3e017f630f02e7ea Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 15 Jun 2012 11:48:56 +0300 Subject: SCI: Clean up the script initialization code --- engines/sci/engine/script.cpp | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 08f7922b1e..f8c5539325 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -37,17 +37,22 @@ Script::Script() : SegmentObj(SEG_TYPE_SCRIPT) { _buf = NULL; _bufSize = 0; _scriptSize = 0; - _heapSize = 0; - _synonyms = NULL; _heapStart = NULL; + _heapSize = 0; + _exportTable = NULL; + _numExports = 0; + _synonyms = NULL; + _numSynonyms = 0; _localsOffset = 0; _localsSegment = 0; _localsBlock = NULL; _localsCount = 0; + _lockers = 1; + _markedAsDeleted = false; } @@ -65,25 +70,11 @@ void Script::freeScript() { void Script::init(int script_nr, ResourceManager *resMan) { Resource *script = resMan->findResource(ResourceId(kResourceTypeScript, script_nr), 0); - if (!script) error("Script %d not found", script_nr); - _localsOffset = 0; - _localsBlock = NULL; - _localsCount = 0; - - _markedAsDeleted = false; - _nr = script_nr; - _buf = 0; - _heapStart = 0; - - _scriptSize = script->size; - _bufSize = script->size; - _heapSize = 0; - - _lockers = 1; + _bufSize = _scriptSize = script->size; if (getSciVersion() == SCI_VERSION_0_EARLY) { _bufSize += READ_LE_UINT16(script->data) * 2; @@ -163,11 +154,6 @@ void Script::load(ResourceManager *resMan) { memcpy(_heapStart, heap->data, heap->size); } - _exportTable = 0; - _numExports = 0; - _synonyms = 0; - _numSynonyms = 0; - if (getSciVersion() <= SCI_VERSION_1_LATE) { _exportTable = (const uint16 *)findBlockSCI0(SCI_OBJ_EXPORTS); if (_exportTable) { -- cgit v1.2.3 From 9aaefbd53665cd03359ad692d64e3fc437f97202 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 15 Jun 2012 11:53:19 +0300 Subject: SCI: _propertyOffsetsSci3 and classpos should be 32-bit integers These are needed for future handling of large SCI3 script files --- engines/sci/engine/object.cpp | 7 ++++--- engines/sci/engine/object.h | 4 ++-- engines/sci/engine/script.cpp | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/engines/sci/engine/object.cpp b/engines/sci/engine/object.cpp index 78e216cdb5..2a0ed38e61 100644 --- a/engines/sci/engine/object.cpp +++ b/engines/sci/engine/object.cpp @@ -112,7 +112,7 @@ bool Object::relocateSci0Sci21(SegmentId segment, int location, size_t scriptSiz return relocateBlock(_variables, getPos().offset, segment, location, scriptSize); } -bool Object::relocateSci3(SegmentId segment, int location, int offset, size_t scriptSize) { +bool Object::relocateSci3(SegmentId segment, uint32 location, int offset, size_t scriptSize) { assert(_propertyOffsetsSci3); for (uint i = 0; i < _variables.size(); ++i) { @@ -286,7 +286,7 @@ void Object::initSelectorsSci3(const byte *buf) { _variables.resize(properties); uint16 *propertyIds = (uint16 *)malloc(sizeof(uint16) * properties); // uint16 *methodOffsets = (uint16 *)malloc(sizeof(uint16) * 2 * methods); - uint16 *propertyOffsets = (uint16 *)malloc(sizeof(uint16) * properties); + uint32 *propertyOffsets = (uint32 *)malloc(sizeof(uint32) * properties); int propertyCounter = 0; int methodCounter = 0; @@ -314,7 +314,8 @@ void Object::initSelectorsSci3(const byte *buf) { WRITE_SCI11ENDIAN_UINT16(&propertyIds[propertyCounter], groupBaseId + bit); _variables[propertyCounter] = make_reg(0, value); - propertyOffsets[propertyCounter] = (seeker + bit * 2) - buf; + uint32 propertyOffset = (seeker + bit * 2) - buf; + propertyOffsets[propertyCounter] = propertyOffset; ++propertyCounter; } else if (value != 0xffff) { // Method _baseMethod.push_back(groupBaseId + bit); diff --git a/engines/sci/engine/object.h b/engines/sci/engine/object.h index 0ca16b48a2..e8deafa8bd 100644 --- a/engines/sci/engine/object.h +++ b/engines/sci/engine/object.h @@ -223,7 +223,7 @@ public: } bool relocateSci0Sci21(SegmentId segment, int location, size_t scriptSize); - bool relocateSci3(SegmentId segment, int location, int offset, size_t scriptSize); + bool relocateSci3(SegmentId segment, uint32 location, int offset, size_t scriptSize); int propertyOffsetToId(SegManager *segMan, int propertyOffset) const; @@ -238,7 +238,7 @@ private: const byte *_baseObj; /**< base + object offset within base */ const uint16 *_baseVars; /**< Pointer to the varselector area for this object */ Common::Array _baseMethod; /**< Pointer to the method selector area for this object */ - uint16 *_propertyOffsetsSci3; /**< This is used to enable relocation of property valuesa in SCI3 */ + uint32 *_propertyOffsetsSci3; /**< This is used to enable relocation of property valuesa in SCI3 */ Common::Array _variables; uint16 _methodCount; diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index f8c5539325..18e23f36b5 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -546,7 +546,7 @@ void Script::initializeClasses(SegManager *segMan) { uint16 marker; bool isClass = false; - uint16 classpos; + uint32 classpos; int16 species = 0; while (true) { -- cgit v1.2.3 From 23ed0f1dc89a8557692928785bf3da355e36bc8e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 15 Jun 2012 12:04:28 +0300 Subject: SCI: Skip playing of the unsupported robot video 1003 in RAMA --- engines/sci/video/robot_decoder.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp index 95b3c2abc1..8ffcecc339 100644 --- a/engines/sci/video/robot_decoder.cpp +++ b/engines/sci/video/robot_decoder.cpp @@ -87,6 +87,13 @@ RobotDecoder::~RobotDecoder() { } bool RobotDecoder::load(GuiResourceId id) { + // TODO: RAMA's robot 1003 cannot be played (shown at the menu screen) - + // its drawn at odd coordinates. SV can't play it either (along with some + // others), so it must be some new functionality added in RAMA's robot + // videos. Skip it for now. + if (g_sci->getGameId() == GID_RAMA && id == 1003) + return false; + Common::String fileName = Common::String::format("%d.rbt", id); Common::SeekableReadStream *stream = SearchMan.createReadStreamForMember(fileName); -- cgit v1.2.3 From 562a8a980c22eab85144558050e5fa5e425612c4 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 15 Jun 2012 12:53:17 +0300 Subject: SCI: Further cleanup of the script code Merge the init() and load() Script methods and reset the script when necessary --- engines/sci/engine/savegame.cpp | 7 ++----- engines/sci/engine/script.cpp | 32 +++++++++++++------------------- engines/sci/engine/script.h | 3 +-- engines/sci/engine/seg_manager.cpp | 3 +-- 4 files changed, 17 insertions(+), 28 deletions(-) diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 7c41e18bec..cabe5f468a 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -189,7 +189,7 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) { assert(mobj); - // Let the object sync custom data + // Let the object sync custom data. Scripts are loaded at this point. mobj->saveLoadWithSerializer(s); if (type == SEG_TYPE_SCRIPT) { @@ -200,9 +200,6 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) { // Hook the script up in the script->segment map _scriptSegMap[scr->getScriptNumber()] = i; - // Now, load the script itself - scr->load(g_sci->getResMan()); - ObjMap objects = scr->getObjectMap(); for (ObjMap::iterator it = objects.begin(); it != objects.end(); ++it) it->_value.syncBaseObject(scr->getBuf(it->_value.getPos().offset)); @@ -486,7 +483,7 @@ void Script::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsSint32LE(_nr); if (s.isLoading()) - init(_nr, g_sci->getResMan()); + load(_nr, g_sci->getResMan()); s.skip(4, VER(14), VER(22)); // OBSOLETE: Used to be _bufSize s.skip(4, VER(14), VER(22)); // OBSOLETE: Used to be _scriptSize s.skip(4, VER(14), VER(22)); // OBSOLETE: Used to be _heapSize diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 18e23f36b5..7714983120 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -32,12 +32,21 @@ namespace Sci { -Script::Script() : SegmentObj(SEG_TYPE_SCRIPT) { +Script::Script() : SegmentObj(SEG_TYPE_SCRIPT), _buf(NULL) { + freeScript(); +} + +Script::~Script() { + freeScript(); +} + +void Script::freeScript() { _nr = 0; + + free(_buf); _buf = NULL; _bufSize = 0; _scriptSize = 0; - _heapStart = NULL; _heapSize = 0; @@ -52,23 +61,13 @@ Script::Script() : SegmentObj(SEG_TYPE_SCRIPT) { _localsCount = 0; _lockers = 1; - _markedAsDeleted = false; + _objects.clear(); } -Script::~Script() { +void Script::load(int script_nr, ResourceManager *resMan) { freeScript(); -} - -void Script::freeScript() { - free(_buf); - _buf = NULL; - _bufSize = 0; - - _objects.clear(); -} -void Script::init(int script_nr, ResourceManager *resMan) { Resource *script = resMan->findResource(ResourceId(kResourceTypeScript, script_nr), 0); if (!script) error("Script %d not found", script_nr); @@ -118,11 +117,6 @@ void Script::init(int script_nr, ResourceManager *resMan) { error("TODO: SCI script %d is over 64KB - it's %d bytes long. This can't " "be handled at the moment, thus stopping", script_nr, script->size); } -} - -void Script::load(ResourceManager *resMan) { - Resource *script = resMan->findResource(ResourceId(kResourceTypeScript, _nr), 0); - assert(script != 0); uint extraLocalsWorkaround = 0; if (g_sci->getGameId() == GID_FANMADE && _nr == 1 && script->size == 11140) { diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h index 06a7f089ba..4d23ffbba8 100644 --- a/engines/sci/engine/script.h +++ b/engines/sci/engine/script.h @@ -95,8 +95,7 @@ public: ~Script(); void freeScript(); - void init(int script_nr, ResourceManager *resMan); - void load(ResourceManager *resMan); + void load(int script_nr, ResourceManager *resMan); void matchSignatureAndPatch(uint16 scriptNr, byte *scriptData, const uint32 scriptSize); int32 findSignature(const SciScriptSignature *signature, const byte *scriptData, const uint32 scriptSize); diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index cfa83a7697..8f85577fb8 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -977,8 +977,7 @@ int SegManager::instantiateScript(int scriptNum) { scr = allocateScript(scriptNum, &segmentId); } - scr->init(scriptNum, _resMan); - scr->load(_resMan); + scr->load(scriptNum, _resMan); scr->initializeLocals(this); scr->initializeClasses(this); scr->initializeObjects(this, segmentId); -- cgit v1.2.3 From c668431522d834b24c00baf964d2b6b3f3a2bbb8 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Fri, 15 Jun 2012 12:11:01 +0100 Subject: TOON: Simplify code in Animation::drawFrameWithMaskAndScale(). --- engines/toon/anim.cpp | 49 +++++++++++++++++++------------------------------ 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp index 98c667c303..84f6fa375c 100644 --- a/engines/toon/anim.cpp +++ b/engines/toon/anim.cpp @@ -229,37 +229,26 @@ void Animation::drawFrameWithMaskAndScale(Graphics::Surface &surface, int32 fram uint8 *curRow = (uint8 *)surface.pixels; uint8 *curRowMask = mask->getDataPtr(); - if (strstr(_name, "SHADOW")) { - for (int y = yy1; y < yy2; y++) { - for (int x = xx1; x < xx2; x++) { - if (x < 0 || x >= 1280 || y < 0 || y >= 400) - continue; - - uint8 *cur = curRow + x + y * destPitch; - uint8 *curMask = curRowMask + x + y * destPitchMask; - - // find the good c - int32 xs = (x - xx1) * 1024 / scale; - int32 ys = (y - yy1) * 1024 / scale; - uint8 *cc = &c[ys * w + xs]; - if (*cc && ((*curMask) >= zz)) + bool shadowFlag = false; + if (strstr(_name, "SHADOW")) + shadowFlag = true; + + for (int32 y = yy1; y < yy2; y++) { + for (int32 x = xx1; x < xx2; x++) { + if (x < 0 || x >= 1280 || y < 0 || y >= 400) + continue; + + uint8 *cur = curRow + x + y * destPitch; + uint8 *curMask = curRowMask + x + y * destPitchMask; + + // find the good c + int32 xs = (x - xx1) * 1024 / scale; + int32 ys = (y - yy1) * 1024 / scale; + uint8 *cc = &c[ys * w + xs]; + if (*cc && ((*curMask) >= zz)) { + if (shadowFlag) *cur = _vm->getShadowLUT()[*cur]; - } - } - } else { - for (int y = yy1; y < yy2; y++) { - for (int x = xx1; x < xx2; x++) { - if (x < 0 || x >= 1280 || y < 0 || y >= 400) - continue; - - uint8 *cur = curRow + x + y * destPitch; - uint8 *curMask = curRowMask + x + y * destPitchMask; - - // find the good c - int32 xs = (x - xx1) * 1024 / scale; - int32 ys = (y - yy1) * 1024 / scale; - uint8 *cc = &c[ys * w + xs]; - if (*cc && ((*curMask) >= zz)) + else *cur = *cc; } } -- cgit v1.2.3 From 7632246264102d88922fc963284af6250ea12f57 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 15 Jun 2012 13:32:43 +0200 Subject: GOB: Implement Util::getKeyState() for Little Red This makes the bees level playable, removing the "lock-up". Collision detection between Little Red and the bees and butterflies doesn't work yet though, so they're just flying through her. Nevertheless, the game seems to be completable now. --- engines/gob/inter.cpp | 12 +++++++++ engines/gob/inter.h | 9 +++++-- engines/gob/inter_littlered.cpp | 58 +++++++++++++++++++++++++++++++++++++++++ engines/gob/inter_v1.cpp | 16 +++--------- engines/gob/util.cpp | 40 +++++++++++++++++++++++++++- engines/gob/util.h | 8 ++++++ 6 files changed, 128 insertions(+), 15 deletions(-) diff --git a/engines/gob/inter.cpp b/engines/gob/inter.cpp index 9df3c06c74..843c0bff48 100644 --- a/engines/gob/inter.cpp +++ b/engines/gob/inter.cpp @@ -52,6 +52,7 @@ Inter::Inter(GobEngine *vm) : _vm(vm), _varStack(600) { _soundEndTimeKey = 0; _soundStopVal = 0; + _lastBusyWait = 0; _noBusyWait = false; _variables = 0; @@ -452,4 +453,15 @@ uint32 Inter::readValue(uint16 index, uint16 type) { return 0; } +void Inter::handleBusyWait() { + uint32 now = _vm->_util->getTimeKey(); + + if (!_noBusyWait) + if ((now - _lastBusyWait) <= 20) + _vm->_util->longDelay(1); + + _lastBusyWait = now; + _noBusyWait = false; +} + } // End of namespace Gob diff --git a/engines/gob/inter.h b/engines/gob/inter.h index 907a275e50..0625646cdd 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -142,8 +142,9 @@ protected: VariableStack _varStack; - // The busy-wait detection in o1_keyFunc breaks fast scrolling in Ween - bool _noBusyWait; + // Busy-wait detection + bool _noBusyWait; + uint32 _lastBusyWait; GobEngine *_vm; @@ -172,6 +173,8 @@ protected: void storeString(const char *value); uint32 readValue(uint16 index, uint16 type); + + void handleBusyWait(); }; class Inter_v1 : public Inter { @@ -522,6 +525,8 @@ protected: virtual void setupOpcodesDraw(); virtual void setupOpcodesFunc(); virtual void setupOpcodesGob(); + + void oLittleRed_keyFunc(OpFuncParams ¶ms); }; class Inter_v3 : public Inter_v2 { diff --git a/engines/gob/inter_littlered.cpp b/engines/gob/inter_littlered.cpp index 6a63998216..01d372aaeb 100644 --- a/engines/gob/inter_littlered.cpp +++ b/engines/gob/inter_littlered.cpp @@ -22,6 +22,13 @@ #include "gob/gob.h" #include "gob/inter.h" +#include "gob/global.h" +#include "gob/util.h" +#include "gob/draw.h" +#include "gob/game.h" +#include "gob/script.h" +#include "gob/hotspots.h" +#include "gob/sound/sound.h" namespace Gob { @@ -39,6 +46,8 @@ void Inter_LittleRed::setupOpcodesDraw() { void Inter_LittleRed::setupOpcodesFunc() { Inter_v2::setupOpcodesFunc(); + + OPCODEFUNC(0x14, oLittleRed_keyFunc); } void Inter_LittleRed::setupOpcodesGob() { @@ -46,4 +55,53 @@ void Inter_LittleRed::setupOpcodesGob() { OPCODEGOB(501, o2_stopProtracker); } +void Inter_LittleRed::oLittleRed_keyFunc(OpFuncParams ¶ms) { + animPalette(); + _vm->_draw->blitInvalidated(); + + handleBusyWait(); + + int16 cmd = _vm->_game->_script->readInt16(); + int16 key; + uint32 keyState; + + switch (cmd) { + case -1: + break; + + case 0: + _vm->_draw->_showCursor &= ~2; + _vm->_util->longDelay(1); + key = _vm->_game->_hotspots->check(0, 0); + storeKey(key); + + _vm->_util->clearKeyBuf(); + break; + + case 1: + _vm->_util->forceMouseUp(true); + key = _vm->_game->checkKeys(&_vm->_global->_inter_mouseX, + &_vm->_global->_inter_mouseY, &_vm->_game->_mouseButtons, 0); + storeKey(key); + break; + + case 2: + _vm->_util->processInput(true); + keyState = _vm->_util->getKeyState(); + + WRITE_VAR(0, keyState); + _vm->_util->clearKeyBuf(); + break; + + default: + _vm->_sound->speakerOnUpdate(cmd); + if (cmd < 20) { + _vm->_util->delay(cmd); + _noBusyWait = true; + } else + _vm->_util->longDelay(cmd); + break; + } +} + } // End of namespace Gob diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 3652637e32..dc533a210a 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -1189,26 +1189,15 @@ void Inter_v1::o1_palLoad(OpFuncParams ¶ms) { } void Inter_v1::o1_keyFunc(OpFuncParams ¶ms) { - static uint32 lastCalled = 0; - int16 cmd; - int16 key; - uint32 now; - if (!_vm->_vidPlayer->isPlayingLive()) { _vm->_draw->forceBlit(); _vm->_video->retrace(); } - cmd = _vm->_game->_script->readInt16(); animPalette(); _vm->_draw->blitInvalidated(); - now = _vm->_util->getTimeKey(); - if (!_noBusyWait) - if ((now - lastCalled) <= 20) - _vm->_util->longDelay(1); - lastCalled = now; - _noBusyWait = false; + handleBusyWait(); // WORKAROUND for bug #1726130: Ween busy-waits in the intro for a counter // to become 5000. We deliberately slow down busy-waiting, so we shorten @@ -1217,6 +1206,9 @@ void Inter_v1::o1_keyFunc(OpFuncParams ¶ms) { (_vm->_game->_script->pos() == 729) && _vm->isCurrentTot("intro5.tot")) WRITE_VAR(59, 4000); + int16 cmd = _vm->_game->_script->readInt16(); + int16 key; + switch (cmd) { case -1: break; diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index 7f9c6131fd..64dfcf9b12 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -21,7 +21,6 @@ */ #include "common/stream.h" -#include "common/events.h" #include "graphics/palette.h" @@ -45,6 +44,8 @@ Util::Util(GobEngine *vm) : _vm(vm) { _frameRate = 12; _frameWaitTime = 0; _startFrameTime = 0; + + _keyState = 0; } uint32 Util::getTimeKey() { @@ -116,6 +117,8 @@ void Util::processInput(bool scroll) { _mouseButtons = (MouseButtons) (((uint32) _mouseButtons) & ~((uint32) kMouseButtonsRight)); break; case Common::EVENT_KEYDOWN: + keyDown(event); + if (event.kbd.hasFlags(Common::KBD_CTRL)) { if (event.kbd.keycode == Common::KEYCODE_f) _fastMode ^= 1; @@ -132,6 +135,7 @@ void Util::processInput(bool scroll) { addKeyToBuffer(event.kbd); break; case Common::EVENT_KEYUP: + keyUp(event); break; default: break; @@ -576,4 +580,38 @@ void Util::checkJoystick() { _vm->_global->_useJoystick = 0; } +uint32 Util::getKeyState() const { + return _keyState; +} + +void Util::keyDown(const Common::Event &event) { + if (event.kbd.keycode == Common::KEYCODE_UP) + _keyState |= 0x0001; + else if (event.kbd.keycode == Common::KEYCODE_DOWN) + _keyState |= 0x0002; + else if (event.kbd.keycode == Common::KEYCODE_RIGHT) + _keyState |= 0x0004; + else if (event.kbd.keycode == Common::KEYCODE_LEFT) + _keyState |= 0x0008; + else if (event.kbd.keycode == Common::KEYCODE_SPACE) + _keyState |= 0x0020; + else if (event.kbd.keycode == Common::KEYCODE_ESCAPE) + _keyState |= 0x0040; +} + +void Util::keyUp(const Common::Event &event) { + if (event.kbd.keycode == Common::KEYCODE_UP) + _keyState &= ~0x0001; + else if (event.kbd.keycode == Common::KEYCODE_DOWN) + _keyState &= ~0x0002; + else if (event.kbd.keycode == Common::KEYCODE_RIGHT) + _keyState &= ~0x0004; + else if (event.kbd.keycode == Common::KEYCODE_LEFT) + _keyState &= ~0x0008; + else if (event.kbd.keycode == Common::KEYCODE_SPACE) + _keyState &= ~0x0020; + else if (event.kbd.keycode == Common::KEYCODE_ESCAPE) + _keyState &= ~0x0040; +} + } // End of namespace Gob diff --git a/engines/gob/util.h b/engines/gob/util.h index 4228dac768..b26a78ab2c 100644 --- a/engines/gob/util.h +++ b/engines/gob/util.h @@ -25,6 +25,7 @@ #include "common/str.h" #include "common/keyboard.h" +#include "common/events.h" namespace Common { class SeekableReadStream; @@ -110,6 +111,8 @@ public: bool checkKey(int16 &key); bool keyPressed(); + uint32 getKeyState() const; + void getMouseState(int16 *pX, int16 *pY, MouseButtons *pButtons); void setMousePos(int16 x, int16 y); void waitMouseUp(); @@ -155,6 +158,8 @@ protected: int16 _frameWaitTime; uint32 _startFrameTime; + uint32 _keyState; + GobEngine *_vm; bool keyBufferEmpty(); @@ -162,6 +167,9 @@ protected: bool getKeyFromBuffer(Common::KeyState &key); int16 translateKey(const Common::KeyState &key); void checkJoystick(); + + void keyDown(const Common::Event &event); + void keyUp(const Common::Event &event); }; } // End of namespace Gob -- cgit v1.2.3 From 5961609a56a910d81d38389c6ac61d06eca6f029 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 15 Jun 2012 15:09:01 +0200 Subject: GOB: Add a resource size workaround for Little Red This fixes the missing resources in the screen where Little Red has to find the animals' homes for them. --- engines/gob/gob.cpp | 10 ++++++++++ engines/gob/gob.h | 4 ++++ engines/gob/resources.cpp | 12 ++++++++++-- engines/gob/resources.h | 6 +++--- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index a13f6a372f..f3480fed99 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -233,6 +233,10 @@ bool GobEngine::isDemo() const { return (isSCNDemo() || isBATDemo()); } +bool GobEngine::hasResourceSizeWorkaround() const { + return _resourceSizeWorkaround; +} + bool GobEngine::isCurrentTot(const Common::String &tot) const { return _game->_curTotFile.equalsIgnoreCase(tot); } @@ -389,6 +393,8 @@ void GobEngine::pauseGame() { } bool GobEngine::initGameParts() { + _resourceSizeWorkaround = false; + // just detect some devices some of which will be always there if the music is not disabled _noMusic = MidiDriver::getMusicType(MidiDriver::detectDevice(MDT_PCSPK | MDT_MIDI | MDT_ADLIB)) == MT_NULL ? true : false; _saveLoad = 0; @@ -471,6 +477,10 @@ bool GobEngine::initGameParts() { _map = new Map_v2(this); _goblin = new Goblin_v2(this); _scenery = new Scenery_v2(this); + + // WORKAROUND: Little Red Riding Hood has a small resource size glitch in the + // screen where Little Red needs to find the animals' homes. + _resourceSizeWorkaround = true; break; case kGameTypeGob3: diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 165760e6d5..19489e4924 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -200,6 +200,8 @@ public: GobConsole *_console; + bool _resourceSizeWorkaround; + Global *_global; Util *_util; DataIO *_dataIO; @@ -236,6 +238,8 @@ public: bool isTrueColor() const; bool isDemo() const; + bool hasResourceSizeWorkaround() const; + bool isCurrentTot(const Common::String &tot) const; void setTrueColor(bool trueColor); diff --git a/engines/gob/resources.cpp b/engines/gob/resources.cpp index d5497c25be..a84f4ac4b8 100644 --- a/engines/gob/resources.cpp +++ b/engines/gob/resources.cpp @@ -716,7 +716,7 @@ byte *Resources::getIMData(TOTResourceItem &totItem) const { return _imData + offset; } -byte *Resources::getEXTData(EXTResourceItem &extItem, uint32 size) const { +byte *Resources::getEXTData(EXTResourceItem &extItem, uint32 &size) const { Common::SeekableReadStream *stream = _vm->_dataIO->getFile(_extFile); if (!stream) return 0; @@ -726,6 +726,10 @@ byte *Resources::getEXTData(EXTResourceItem &extItem, uint32 size) const { return 0; } + // If that workaround is active, limit the resource size instead of throwing an error + if (_vm->hasResourceSizeWorkaround()) + size = MIN(size, stream->size() - extItem.offset); + byte *data = new byte[extItem.packed ? (size + 2) : size]; if (stream->read(data, size) != size) { delete[] data; @@ -737,7 +741,7 @@ byte *Resources::getEXTData(EXTResourceItem &extItem, uint32 size) const { return data; } -byte *Resources::getEXData(EXTResourceItem &extItem, uint32 size) const { +byte *Resources::getEXData(EXTResourceItem &extItem, uint32 &size) const { Common::SeekableReadStream *stream = _vm->_dataIO->getFile(_exFile); if (!stream) return 0; @@ -747,6 +751,10 @@ byte *Resources::getEXData(EXTResourceItem &extItem, uint32 size) const { return 0; } + // If that workaround is active, limit the resource size instead of throwing an error + if (_vm->hasResourceSizeWorkaround()) + size = MIN(size, stream->size() - extItem.offset); + byte *data = new byte[extItem.packed ? (size + 2) : size]; if (stream->read(data, size) != size) { delete[] data; diff --git a/engines/gob/resources.h b/engines/gob/resources.h index 39155c5176..04b3b9d31e 100644 --- a/engines/gob/resources.h +++ b/engines/gob/resources.h @@ -103,7 +103,7 @@ private: static const int kTOTTextItemSize = 2 + 2; enum ResourceType { - kResourceTOT, + kResourceTOT = 0, kResourceIM, kResourceEXT, kResourceEX @@ -201,8 +201,8 @@ private: byte *getTOTData(TOTResourceItem &totItem) const; byte *getIMData(TOTResourceItem &totItem) const; - byte *getEXTData(EXTResourceItem &extItem, uint32 size) const; - byte *getEXData(EXTResourceItem &extItem, uint32 size) const; + byte *getEXTData(EXTResourceItem &extItem, uint32 &size) const; + byte *getEXData(EXTResourceItem &extItem, uint32 &size) const; }; } // End of namespace Gob -- cgit v1.2.3 From 160732b2f73a5df173c1fa867f82fa2913ec2236 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 15 Jun 2012 21:47:22 +0300 Subject: Revert "SCI: Change Script::getObject() to accept a reg_t" This reverts commit 577d7e41c9ca2c498dc85e41c373fbdca8d2ed41. --- engines/sci/engine/kernel.cpp | 2 +- engines/sci/engine/script.cpp | 14 +++++++------- engines/sci/engine/script.h | 4 ++-- engines/sci/engine/seg_manager.cpp | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 0266414b26..c99bc4fe47 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -377,7 +377,7 @@ uint16 Kernel::findRegType(reg_t reg) { if (reg.offset <= (*(Script *)mobj).getBufSize() && reg.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET && RAW_IS_OBJECT((*(Script *)mobj).getBuf(reg.offset)) ) { - result |= ((Script *)mobj)->getObject(reg) ? SIG_TYPE_OBJECT : SIG_TYPE_REFERENCE; + result |= ((Script *)mobj)->getObject(reg.offset) ? SIG_TYPE_OBJECT : SIG_TYPE_REFERENCE; } else result |= SIG_TYPE_REFERENCE; break; diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 7714983120..0ed9598b41 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -223,16 +223,16 @@ const byte *Script::getSci3ObjectsPointer() { return ptr; } -Object *Script::getObject(reg_t pos) { - if (_objects.contains(pos.offset)) - return &_objects[pos.offset]; +Object *Script::getObject(uint16 offset) { + if (_objects.contains(offset)) + return &_objects[offset]; else return 0; } -const Object *Script::getObject(reg_t pos) const { - if (_objects.contains(pos.offset)) - return &_objects[pos.offset]; +const Object *Script::getObject(uint16 offset) const { + if (_objects.contains(offset)) + return &_objects[offset]; else return 0; } @@ -726,7 +726,7 @@ Common::Array Script::listAllDeallocatable(SegmentId segId) const { Common::Array Script::listAllOutgoingReferences(reg_t addr) const { Common::Array tmp; if (addr.offset <= _bufSize && addr.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET && RAW_IS_OBJECT(_buf + addr.offset)) { - const Object *obj = getObject(addr); + const Object *obj = getObject(addr.offset); if (obj) { // Note all local variables, if we have a local variable environment if (_localsSegment) diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h index 4d23ffbba8..df7f42cc0d 100644 --- a/engines/sci/engine/script.h +++ b/engines/sci/engine/script.h @@ -118,8 +118,8 @@ public: virtual void saveLoadWithSerializer(Common::Serializer &ser); - Object *getObject(reg_t pos); - const Object *getObject(reg_t pos) const; + Object *getObject(uint16 offset); + const Object *getObject(uint16 offset) const; /** * Initializes an object within the segment manager diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index 8f85577fb8..20a8240641 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -228,7 +228,7 @@ Object *SegManager::getObject(reg_t pos) const { Script *scr = (Script *)mobj; if (pos.offset <= scr->getBufSize() && pos.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET && RAW_IS_OBJECT(scr->getBuf(pos.offset))) { - obj = scr->getObject(pos); + obj = scr->getObject(pos.offset); } } } -- cgit v1.2.3 From 5ca22a1104d2e1ca0a7b7f5ac159b5c721e13ead Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 15 Jun 2012 21:52:03 +0300 Subject: SCI: Fix warnings Thanks to DrMcCoy for reporting them --- engines/sci/engine/file.cpp | 2 +- engines/sci/engine/kgraphics32.cpp | 3 ++- engines/sci/engine/script.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp index 3470d23fe2..c44963f457 100644 --- a/engines/sci/engine/file.cpp +++ b/engines/sci/engine/file.cpp @@ -427,7 +427,7 @@ bool VirtualIndexFile::seek(int32 offset, int whence) { _ptr = _buffer + offset; break; case SEEK_END: - assert(_bufferSize - offset >= 0); + assert((int32)_bufferSize - offset >= 0); _ptr = _buffer + (_bufferSize - offset); break; } diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 53cf8ada75..377c05935a 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -241,6 +241,7 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) { //int16 priority = argv[4].toSint16(); // always 0xc8 (200) when fading in/out //uint16 animate = argv[5].toUint16(); // boolean, animate or not while the transition lasts //uint16 refFrame = argv[6].toUint16(); // refFrame, always 0 when fading in/out +#if 0 int16 divisions; // If the game has the pFadeArray selector, another parameter is used here, @@ -252,7 +253,7 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) { } else { divisions = (argc >= 8) ? argv[7].toSint16() : -1; // divisions (transition steps?) } - +#endif if (showStyle > 15) { warning("kSetShowStyle: Illegal style %d for plane %04x:%04x", showStyle, PRINT_REG(planeObj)); return s->r_acc; diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 0ed9598b41..ca7eaad383 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -199,7 +199,7 @@ void Script::load(int script_nr, ResourceManager *resMan) { _localsOffset = 0; if (_localsOffset + _localsCount * 2 + 1 >= (int)_bufSize) { - error("Locals extend beyond end of script: offset %04x, count %d vs size %d", _localsOffset, _localsCount, _bufSize); + error("Locals extend beyond end of script: offset %04x, count %d vs size %d", _localsOffset, _localsCount, (int)_bufSize); //_localsCount = (_bufSize - _localsOffset) >> 1; } } -- cgit v1.2.3 From 041b1447c02616c0f285556bb453e79268da7dce Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 15 Jun 2012 22:02:13 +0300 Subject: SCI: Replace RAW_IS_OBJECT with a method --- engines/sci/engine/kernel.cpp | 2 +- engines/sci/engine/script.cpp | 6 +++++- engines/sci/engine/script.h | 1 + engines/sci/engine/seg_manager.cpp | 2 +- engines/sci/engine/vm.h | 2 -- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index c99bc4fe47..3a33c928e7 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -376,7 +376,7 @@ uint16 Kernel::findRegType(reg_t reg) { case SEG_TYPE_SCRIPT: if (reg.offset <= (*(Script *)mobj).getBufSize() && reg.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET && - RAW_IS_OBJECT((*(Script *)mobj).getBuf(reg.offset)) ) { + (*(Script *)mobj).offsetIsObject(reg.offset)) { result |= ((Script *)mobj)->getObject(reg.offset) ? SIG_TYPE_OBJECT : SIG_TYPE_REFERENCE; } else result |= SIG_TYPE_REFERENCE; diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index ca7eaad383..d09b5ace80 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -725,7 +725,7 @@ Common::Array Script::listAllDeallocatable(SegmentId segId) const { Common::Array Script::listAllOutgoingReferences(reg_t addr) const { Common::Array tmp; - if (addr.offset <= _bufSize && addr.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET && RAW_IS_OBJECT(_buf + addr.offset)) { + if (addr.offset <= _bufSize && addr.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET && offsetIsObject(addr.offset)) { const Object *obj = getObject(addr.offset); if (obj) { // Note all local variables, if we have a local variable environment @@ -761,4 +761,8 @@ Common::Array Script::listObjectReferences() const { return tmp; } +bool Script::offsetIsObject(uint16 offset) const { + return (READ_SCI11ENDIAN_UINT16((const byte *)_buf + offset + SCRIPT_OBJECT_MAGIC_OFFSET) == SCRIPT_OBJECT_MAGIC_NUMBER); +} + } // End of namespace Sci diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h index df7f42cc0d..0c99f13235 100644 --- a/engines/sci/engine/script.h +++ b/engines/sci/engine/script.h @@ -89,6 +89,7 @@ public: void syncLocalsBlock(SegManager *segMan); ObjMap &getObjectMap() { return _objects; } const ObjMap &getObjectMap() const { return _objects; } + bool offsetIsObject(uint16 offset) const; public: Script(); diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index 20a8240641..eaa587e3f9 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -227,7 +227,7 @@ Object *SegManager::getObject(reg_t pos) const { } else if (mobj->getType() == SEG_TYPE_SCRIPT) { Script *scr = (Script *)mobj; if (pos.offset <= scr->getBufSize() && pos.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET - && RAW_IS_OBJECT(scr->getBuf(pos.offset))) { + && scr->offsetIsObject(pos.offset)) { obj = scr->getObject(pos.offset); } } diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index cdd9b9a06e..67b9dd44eb 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -61,8 +61,6 @@ struct Class { reg_t reg; ///< offset; script-relative offset, segment: 0 if not instantiated }; -#define RAW_IS_OBJECT(datablock) (READ_SCI11ENDIAN_UINT16(((const byte *) datablock) + SCRIPT_OBJECT_MAGIC_OFFSET) == SCRIPT_OBJECT_MAGIC_NUMBER) - // A reference to an object's variable. // The object is stored as a reg_t, the variable as an index into _variables struct ObjVarRef { -- cgit v1.2.3 From 8666a0528ff7f01acff97355df1bddf6136869b1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 15 Jun 2012 22:03:42 +0300 Subject: SCI: Also skip a robot video in the Lighthouse demo --- engines/sci/video/robot_decoder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp index 8ffcecc339..ebcfac6054 100644 --- a/engines/sci/video/robot_decoder.cpp +++ b/engines/sci/video/robot_decoder.cpp @@ -93,6 +93,10 @@ bool RobotDecoder::load(GuiResourceId id) { // videos. Skip it for now. if (g_sci->getGameId() == GID_RAMA && id == 1003) return false; + + // TODO: The robot video in the Lighthouse demo gets stuck + if (g_sci->getGameId() == GID_LIGHTHOUSE && id == 16) + return false; Common::String fileName = Common::String::format("%d.rbt", id); Common::SeekableReadStream *stream = SearchMan.createReadStreamForMember(fileName); -- cgit v1.2.3 From a0add53c6003a8ed42324d4bacc7f4745ee25543 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 15 Jun 2012 22:24:35 +0300 Subject: SCI: Change getClassAddress() to only require the caller segment The caller offset is never actually used inside the function --- engines/sci/engine/object.cpp | 4 ++-- engines/sci/engine/script.cpp | 4 ++-- engines/sci/engine/seg_manager.cpp | 4 ++-- engines/sci/engine/seg_manager.h | 2 +- engines/sci/engine/vm.cpp | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/engines/sci/engine/object.cpp b/engines/sci/engine/object.cpp index 2a0ed38e61..de028392ea 100644 --- a/engines/sci/engine/object.cpp +++ b/engines/sci/engine/object.cpp @@ -153,7 +153,7 @@ void Object::initSpecies(SegManager *segMan, reg_t addr) { if (speciesOffset == 0xffff) // -1 setSpeciesSelector(NULL_REG); // no species else - setSpeciesSelector(segMan->getClassAddress(speciesOffset, SCRIPT_GET_LOCK, addr)); + setSpeciesSelector(segMan->getClassAddress(speciesOffset, SCRIPT_GET_LOCK, addr.segment)); } void Object::initSuperClass(SegManager *segMan, reg_t addr) { @@ -162,7 +162,7 @@ void Object::initSuperClass(SegManager *segMan, reg_t addr) { if (superClassOffset == 0xffff) // -1 setSuperClassSelector(NULL_REG); // no superclass else - setSuperClassSelector(segMan->getClassAddress(superClassOffset, SCRIPT_GET_LOCK, addr)); + setSuperClassSelector(segMan->getClassAddress(superClassOffset, SCRIPT_GET_LOCK, addr.segment)); } bool Object::initBaseObject(SegManager *segMan, reg_t addr, bool doInitSuperClass) { diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index d09b5ace80..d018872b43 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -653,7 +653,7 @@ void Script::initializeObjectsSci11(SegManager *segMan, SegmentId segmentId) { // Copy base from species class, as we need its selector IDs obj->setSuperClassSelector( - segMan->getClassAddress(obj->getSuperClassSelector().offset, SCRIPT_GET_LOCK, NULL_REG)); + segMan->getClassAddress(obj->getSuperClassSelector().offset, SCRIPT_GET_LOCK, 0)); // If object is instance, get -propDict- from class and set it for this // object. This is needed for ::isMemberOf() to work. @@ -686,7 +686,7 @@ void Script::initializeObjectsSci3(SegManager *segMan, SegmentId segmentId) { reg_t reg = make_reg(segmentId, seeker - _buf); Object *obj = scriptObjInit(reg); - obj->setSuperClassSelector(segMan->getClassAddress(obj->getSuperClassSelector().offset, SCRIPT_GET_LOCK, NULL_REG)); + obj->setSuperClassSelector(segMan->getClassAddress(obj->getSuperClassSelector().offset, SCRIPT_GET_LOCK, 0)); seeker += READ_SCI11ENDIAN_UINT16(seeker + 2); } diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index eaa587e3f9..ac02022ee7 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -939,7 +939,7 @@ void SegManager::createClassTable() { _resMan->unlockResource(vocab996); } -reg_t SegManager::getClassAddress(int classnr, ScriptLoadType lock, reg_t caller) { +reg_t SegManager::getClassAddress(int classnr, ScriptLoadType lock, uint16 callerSegment) { if (classnr == 0xffff) return NULL_REG; @@ -956,7 +956,7 @@ reg_t SegManager::getClassAddress(int classnr, ScriptLoadType lock, reg_t caller return NULL_REG; } } else - if (caller.segment != the_class->reg.segment) + if (callerSegment != the_class->reg.segment) getScript(the_class->reg.segment)->incrementLockers(); return the_class->reg; diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h index 62e711e686..356a1b04a7 100644 --- a/engines/sci/engine/seg_manager.h +++ b/engines/sci/engine/seg_manager.h @@ -125,7 +125,7 @@ private: public: // TODO: document this - reg_t getClassAddress(int classnr, ScriptLoadType lock, reg_t caller); + reg_t getClassAddress(int classnr, ScriptLoadType lock, uint16 callerSegment); /** * Return a pointer to the specified script. diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 162dce9fcc..7dc397c11e 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -996,7 +996,7 @@ void run_vm(EngineState *s) { case op_class: // 0x28 (40) // Get class address s->r_acc = s->_segMan->getClassAddress((unsigned)opparams[0], SCRIPT_GET_LOCK, - s->xs->addr.pc); + s->xs->addr.pc.segment); break; case 0x29: // (41) @@ -1021,7 +1021,7 @@ void run_vm(EngineState *s) { case op_super: // 0x2b (43) // Send to any class - r_temp = s->_segMan->getClassAddress(opparams[0], SCRIPT_GET_LOAD, s->xs->addr.pc); + r_temp = s->_segMan->getClassAddress(opparams[0], SCRIPT_GET_LOAD, s->xs->addr.pc.segment); if (!r_temp.isPointer()) error("[VM]: Invalid superclass in object"); -- cgit v1.2.3 From 1aa5200bb824119651e19a1809d9c07292da57fe Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 14 Jun 2012 03:33:50 +0200 Subject: GUI: Create an interface for save/load dialogs. --- gui/module.mk | 1 + gui/saveload-dialog.cpp | 380 +++++++++++++++++++++++++++++++++++++++++++++++ gui/saveload-dialog.h | 90 +++++++++++ gui/saveload.cpp | 388 +----------------------------------------------- gui/saveload.h | 4 +- 5 files changed, 475 insertions(+), 388 deletions(-) create mode 100644 gui/saveload-dialog.cpp create mode 100644 gui/saveload-dialog.h diff --git a/gui/module.mk b/gui/module.mk index d272bb0313..a435d8cca7 100644 --- a/gui/module.mk +++ b/gui/module.mk @@ -15,6 +15,7 @@ MODULE_OBJS := \ options.o \ predictivedialog.o \ saveload.o \ + saveload-dialog.o \ themebrowser.o \ ThemeEngine.o \ ThemeEval.o \ diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp new file mode 100644 index 0000000000..b8e64c4d99 --- /dev/null +++ b/gui/saveload-dialog.cpp @@ -0,0 +1,380 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "gui/saveload-dialog.h" +#include "common/translation.h" + +#include "gui/message.h" +#include "gui/gui-manager.h" +#include "gui/ThemeEval.h" + +#include "graphics/scaler.h" + +namespace GUI { + +SaveLoadChooserDialog::SaveLoadChooserDialog(const Common::String &dialogName) + : Dialog(dialogName), _metaEngine(0), _delSupport(false), _metaInfoSupport(false), + _thumbnailSupport(false), _saveDateSupport(false), _playTimeSupport(false) { +} + +SaveLoadChooserDialog::SaveLoadChooserDialog(int x, int y, int w, int h) + : Dialog(x, y, w, h), _metaEngine(0), _delSupport(false), _metaInfoSupport(false), + _thumbnailSupport(false), _saveDateSupport(false), _playTimeSupport(false) { +} + +void SaveLoadChooserDialog::open() { + Dialog::open(); + + // So that quitting ScummVM will not cause the dialog result to say a + // savegame was selected. + setResult(-1); +} + +int SaveLoadChooserDialog::run(const Common::String &target, const MetaEngine *metaEngine) { + _metaEngine = metaEngine; + _target = target; + _delSupport = _metaEngine->hasFeature(MetaEngine::kSupportsDeleteSave); + _metaInfoSupport = _metaEngine->hasFeature(MetaEngine::kSavesSupportMetaInfo); + _thumbnailSupport = _metaInfoSupport && _metaEngine->hasFeature(MetaEngine::kSavesSupportThumbnail); + _saveDateSupport = _metaInfoSupport && _metaEngine->hasFeature(MetaEngine::kSavesSupportCreationDate); + _playTimeSupport = _metaInfoSupport && _metaEngine->hasFeature(MetaEngine::kSavesSupportPlayTime); + + return runIntern(); +} + +// SaveLoadChooserSimple implementation + +enum { + kChooseCmd = 'CHOS', + kDelCmd = 'DEL ' +}; + +SaveLoadChooserSimple::SaveLoadChooserSimple(const String &title, const String &buttonLabel, bool saveMode) + : SaveLoadChooserDialog("SaveLoadChooser"), _list(0), _chooseButton(0), _deleteButton(0), _gfxWidget(0) { + _backgroundType = ThemeEngine::kDialogBackgroundSpecial; + + new StaticTextWidget(this, "SaveLoadChooser.Title", title); + + // Add choice list + _list = new GUI::ListWidget(this, "SaveLoadChooser.List"); + _list->setNumberingMode(GUI::kListNumberingZero); + _list->setEditable(saveMode); + + _gfxWidget = new GUI::GraphicsWidget(this, 0, 0, 10, 10); + + _date = new StaticTextWidget(this, 0, 0, 10, 10, _("No date saved"), Graphics::kTextAlignCenter); + _time = new StaticTextWidget(this, 0, 0, 10, 10, _("No time saved"), Graphics::kTextAlignCenter); + _playtime = new StaticTextWidget(this, 0, 0, 10, 10, _("No playtime saved"), Graphics::kTextAlignCenter); + + // Buttons + new GUI::ButtonWidget(this, "SaveLoadChooser.Cancel", _("Cancel"), 0, kCloseCmd); + _chooseButton = new GUI::ButtonWidget(this, "SaveLoadChooser.Choose", buttonLabel, 0, kChooseCmd); + _chooseButton->setEnabled(false); + + _deleteButton = new GUI::ButtonWidget(this, "SaveLoadChooser.Delete", _("Delete"), 0, kDelCmd); + _deleteButton->setEnabled(false); + + _delSupport = _metaInfoSupport = _thumbnailSupport = false; + + _container = new GUI::ContainerWidget(this, 0, 0, 10, 10); +// _container->setHints(GUI::THEME_HINT_USE_SHADOW); +} + +int SaveLoadChooserSimple::runIntern() { + if (_gfxWidget) + _gfxWidget->setGfx(0); + + _resultString.clear(); + reflowLayout(); + updateSaveList(); + + return Dialog::runModal(); +} + +const Common::String &SaveLoadChooserSimple::getResultString() const { + int selItem = _list->getSelected(); + return (selItem >= 0) ? _list->getSelectedString() : _resultString; +} + +void SaveLoadChooserSimple::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { + int selItem = _list->getSelected(); + + switch (cmd) { + case GUI::kListItemActivatedCmd: + case GUI::kListItemDoubleClickedCmd: + if (selItem >= 0 && _chooseButton->isEnabled()) { + if (_list->isEditable() || !_list->getSelectedString().empty()) { + _list->endEditMode(); + if (!_saveList.empty()) { + setResult(_saveList[selItem].getSaveSlot()); + _resultString = _list->getSelectedString(); + } + close(); + } + } + break; + case kChooseCmd: + _list->endEditMode(); + if (!_saveList.empty()) { + setResult(_saveList[selItem].getSaveSlot()); + _resultString = _list->getSelectedString(); + } + close(); + break; + case GUI::kListSelectionChangedCmd: + updateSelection(true); + break; + case kDelCmd: + if (selItem >= 0 && _delSupport) { + MessageDialog alert(_("Do you really want to delete this savegame?"), + _("Delete"), _("Cancel")); + if (alert.runModal() == GUI::kMessageOK) { + _metaEngine->removeSaveState(_target.c_str(), _saveList[selItem].getSaveSlot()); + + setResult(-1); + _list->setSelected(-1); + + updateSaveList(); + updateSelection(true); + } + } + break; + case kCloseCmd: + setResult(-1); + default: + SaveLoadChooserDialog::handleCommand(sender, cmd, data); + } +} + +void SaveLoadChooserSimple::reflowLayout() { + if (g_gui.xmlEval()->getVar("Globals.SaveLoadChooser.ExtInfo.Visible") == 1 && _thumbnailSupport) { + int16 x, y; + uint16 w, h; + + if (!g_gui.xmlEval()->getWidgetData("SaveLoadChooser.Thumbnail", x, y, w, h)) + error("Error when loading position data for Save/Load Thumbnails"); + + int thumbW = kThumbnailWidth; + int thumbH = kThumbnailHeight2; + int thumbX = x + (w >> 1) - (thumbW >> 1); + int thumbY = y + kLineHeight; + + int textLines = 0; + if (!_saveDateSupport) + textLines++; + if (!_playTimeSupport) + textLines++; + + _container->resize(x, y, w, h - (kLineHeight * textLines)); + _gfxWidget->resize(thumbX, thumbY, thumbW, thumbH); + + int height = thumbY + thumbH + kLineHeight; + + if (_saveDateSupport) { + _date->resize(thumbX, height, kThumbnailWidth, kLineHeight); + height += kLineHeight; + _time->resize(thumbX, height, kThumbnailWidth, kLineHeight); + height += kLineHeight; + } + + if (_playTimeSupport) + _playtime->resize(thumbX, height, kThumbnailWidth, kLineHeight); + + _container->setVisible(true); + _gfxWidget->setVisible(true); + + _date->setVisible(_saveDateSupport); + _time->setVisible(_saveDateSupport); + + _playtime->setVisible(_playTimeSupport); + + _fillR = 0; + _fillG = 0; + _fillB = 0; + updateSelection(false); + } else { + _container->setVisible(false); + _gfxWidget->setVisible(false); + _date->setVisible(false); + _time->setVisible(false); + _playtime->setVisible(false); + } + + SaveLoadChooserDialog::reflowLayout(); +} + +void SaveLoadChooserSimple::updateSelection(bool redraw) { + int selItem = _list->getSelected(); + + bool isDeletable = _delSupport; + bool isWriteProtected = false; + bool startEditMode = _list->isEditable(); + + _gfxWidget->setGfx(-1, -1, _fillR, _fillG, _fillB); + _date->setLabel(_("No date saved")); + _time->setLabel(_("No time saved")); + _playtime->setLabel(_("No playtime saved")); + + if (selItem >= 0 && _metaInfoSupport) { + SaveStateDescriptor desc = _metaEngine->querySaveMetaInfos(_target.c_str(), _saveList[selItem].getSaveSlot()); + + isDeletable = desc.getDeletableFlag() && _delSupport; + isWriteProtected = desc.getWriteProtectedFlag(); + + // Don't allow the user to change the description of write protected games + if (isWriteProtected) + startEditMode = false; + + if (_thumbnailSupport) { + const Graphics::Surface *thumb = desc.getThumbnail(); + if (thumb) { + _gfxWidget->setGfx(thumb); + _gfxWidget->useAlpha(256); + } + } + + if (_saveDateSupport) { + const Common::String &saveDate = desc.getSaveDate(); + if (!saveDate.empty()) + _date->setLabel(_("Date: ") + saveDate); + + const Common::String &saveTime = desc.getSaveTime(); + if (!saveTime.empty()) + _time->setLabel(_("Time: ") + saveTime); + } + + if (_playTimeSupport) { + const Common::String &playTime = desc.getPlayTime(); + if (!playTime.empty()) + _playtime->setLabel(_("Playtime: ") + playTime); + } + } + + + if (_list->isEditable()) { + // Disable the save button if nothing is selected, or if the selected + // game is write protected + _chooseButton->setEnabled(selItem >= 0 && !isWriteProtected); + + if (startEditMode) { + _list->startEditMode(); + + if (_chooseButton->isEnabled() && _list->getSelectedString() == _("Untitled savestate") && + _list->getSelectionColor() == ThemeEngine::kFontColorAlternate) { + _list->setEditString(""); + _list->setEditColor(ThemeEngine::kFontColorNormal); + } + } + } else { + // Disable the load button if nothing is selected, or if an empty + // list item is selected. + _chooseButton->setEnabled(selItem >= 0 && !_list->getSelectedString().empty()); + } + + // Delete will always be disabled if the engine doesn't support it. + _deleteButton->setEnabled(isDeletable && (selItem >= 0) && (!_list->getSelectedString().empty())); + + if (redraw) { + _gfxWidget->draw(); + _date->draw(); + _time->draw(); + _playtime->draw(); + _chooseButton->draw(); + _deleteButton->draw(); + + draw(); + } +} + +void SaveLoadChooserSimple::close() { + _metaEngine = 0; + _target.clear(); + _saveList.clear(); + _list->setList(StringArray()); + + SaveLoadChooserDialog::close(); +} + +void SaveLoadChooserSimple::updateSaveList() { + _saveList = _metaEngine->listSaves(_target.c_str()); + + int curSlot = 0; + int saveSlot = 0; + StringArray saveNames; + ListWidget::ColorList colors; + for (SaveStateList::const_iterator x = _saveList.begin(); x != _saveList.end(); ++x) { + // Handle gaps in the list of save games + saveSlot = x->getSaveSlot(); + if (curSlot < saveSlot) { + while (curSlot < saveSlot) { + SaveStateDescriptor dummySave(curSlot, ""); + _saveList.insert_at(curSlot, dummySave); + saveNames.push_back(dummySave.getDescription()); + colors.push_back(ThemeEngine::kFontColorNormal); + curSlot++; + } + + // Sync the save list iterator + for (x = _saveList.begin(); x != _saveList.end(); ++x) { + if (x->getSaveSlot() == saveSlot) + break; + } + } + + // Show "Untitled savestate" for empty/whitespace savegame descriptions + Common::String description = x->getDescription(); + Common::String trimmedDescription = description; + trimmedDescription.trim(); + if (trimmedDescription.empty()) { + description = _("Untitled savestate"); + colors.push_back(ThemeEngine::kFontColorAlternate); + } else { + colors.push_back(ThemeEngine::kFontColorNormal); + } + + saveNames.push_back(description); + curSlot++; + } + + // Fill the rest of the save slots with empty saves + + int maximumSaveSlots = _metaEngine->getMaximumSaveSlot(); + +#ifdef __DS__ + // Low memory on the DS means too many save slots are impractical, so limit + // the maximum here. + if (maximumSaveSlots > 99) { + maximumSaveSlots = 99; + } +#endif + + Common::String emptyDesc; + for (int i = curSlot; i <= maximumSaveSlots; i++) { + saveNames.push_back(emptyDesc); + SaveStateDescriptor dummySave(i, ""); + _saveList.push_back(dummySave); + colors.push_back(ThemeEngine::kFontColorNormal); + } + + _list->setList(saveNames, &colors); +} + +} // End of namespace GUI diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h new file mode 100644 index 0000000000..7a78e17bae --- /dev/null +++ b/gui/saveload-dialog.h @@ -0,0 +1,90 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef GUI_SAVELOAD_DIALOG_H +#define GUI_SAVELOAD_DIALOG_H + +#include "gui/dialog.h" +#include "gui/widgets/list.h" + +#include "engines/metaengine.h" + +namespace GUI { + +class SaveLoadChooserDialog : protected Dialog { +public: + SaveLoadChooserDialog(const Common::String &dialogName); + SaveLoadChooserDialog(int x, int y, int w, int h); + + virtual void open(); + + int run(const Common::String &target, const MetaEngine *metaEngine); + virtual const Common::String &getResultString() const = 0; + +protected: + virtual int runIntern() = 0; + + const MetaEngine *_metaEngine; + bool _delSupport; + bool _metaInfoSupport; + bool _thumbnailSupport; + bool _saveDateSupport; + bool _playTimeSupport; + Common::String _target; +}; + +class SaveLoadChooserSimple : public SaveLoadChooserDialog { + typedef Common::String String; + typedef Common::Array StringArray; +public: + SaveLoadChooserSimple(const String &title, const String &buttonLabel, bool saveMode); + + virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); + + virtual const Common::String &getResultString() const; + + virtual void reflowLayout(); + + virtual void close(); +private: + virtual int runIntern(); + + GUI::ListWidget *_list; + GUI::ButtonWidget *_chooseButton; + GUI::ButtonWidget *_deleteButton; + GUI::GraphicsWidget *_gfxWidget; + GUI::ContainerWidget *_container; + GUI::StaticTextWidget *_date; + GUI::StaticTextWidget *_time; + GUI::StaticTextWidget *_playtime; + + SaveStateList _saveList; + String _resultString; + + uint8 _fillR, _fillG, _fillB; + + void updateSaveList(); + void updateSelection(bool redraw); +}; + +} // End of namespace GUI + +#endif diff --git a/gui/saveload.cpp b/gui/saveload.cpp index e2f9461ddb..e0e6d6187e 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -20,401 +20,17 @@ */ #include "common/config-manager.h" -#include "common/translation.h" #include "common/system.h" -#include "gui/widgets/list.h" -#include "gui/message.h" #include "gui/saveload.h" -#include "gui/ThemeEval.h" -#include "gui/gui-manager.h" - -#include "graphics/scaler.h" +#include "gui/saveload-dialog.h" #include "engines/metaengine.h" namespace GUI { -enum { - kChooseCmd = 'CHOS', - kDelCmd = 'DEL ' - -}; - -class SaveLoadChooserImpl : GUI::Dialog { - typedef Common::String String; - typedef Common::Array StringArray; -public: - SaveLoadChooserImpl(const String &title, const String &buttonLabel, bool saveMode); - - int run(const String &target, const MetaEngine *metaEngine); - - virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); - - const Common::String &getResultString() const; - - virtual void open(); - - virtual void reflowLayout(); - - virtual void close(); -private: - GUI::ListWidget *_list; - GUI::ButtonWidget *_chooseButton; - GUI::ButtonWidget *_deleteButton; - GUI::GraphicsWidget *_gfxWidget; - GUI::ContainerWidget *_container; - GUI::StaticTextWidget *_date; - GUI::StaticTextWidget *_time; - GUI::StaticTextWidget *_playtime; - - const MetaEngine *_metaEngine; - bool _delSupport; - bool _metaInfoSupport; - bool _thumbnailSupport; - bool _saveDateSupport; - bool _playTimeSupport; - String _target; - SaveStateList _saveList; - String _resultString; - - uint8 _fillR, _fillG, _fillB; - - void updateSaveList(); - void updateSelection(bool redraw); -}; - -SaveLoadChooserImpl::SaveLoadChooserImpl(const String &title, const String &buttonLabel, bool saveMode) - : Dialog("SaveLoadChooser"), _list(0), _chooseButton(0), _deleteButton(0), _gfxWidget(0) { - _delSupport = _metaInfoSupport = _thumbnailSupport = _saveDateSupport = _playTimeSupport = false; - - _backgroundType = ThemeEngine::kDialogBackgroundSpecial; - - new StaticTextWidget(this, "SaveLoadChooser.Title", title); - - // Add choice list - _list = new GUI::ListWidget(this, "SaveLoadChooser.List"); - _list->setNumberingMode(GUI::kListNumberingZero); - _list->setEditable(saveMode); - - _gfxWidget = new GUI::GraphicsWidget(this, 0, 0, 10, 10); - - _date = new StaticTextWidget(this, 0, 0, 10, 10, _("No date saved"), Graphics::kTextAlignCenter); - _time = new StaticTextWidget(this, 0, 0, 10, 10, _("No time saved"), Graphics::kTextAlignCenter); - _playtime = new StaticTextWidget(this, 0, 0, 10, 10, _("No playtime saved"), Graphics::kTextAlignCenter); - - // Buttons - new GUI::ButtonWidget(this, "SaveLoadChooser.Cancel", _("Cancel"), 0, kCloseCmd); - _chooseButton = new GUI::ButtonWidget(this, "SaveLoadChooser.Choose", buttonLabel, 0, kChooseCmd); - _chooseButton->setEnabled(false); - - _deleteButton = new GUI::ButtonWidget(this, "SaveLoadChooser.Delete", _("Delete"), 0, kDelCmd); - _deleteButton->setEnabled(false); - - _delSupport = _metaInfoSupport = _thumbnailSupport = false; - - _container = new GUI::ContainerWidget(this, 0, 0, 10, 10); -// _container->setHints(GUI::THEME_HINT_USE_SHADOW); -} - -int SaveLoadChooserImpl::run(const String &target, const MetaEngine *metaEngine) { - if (_gfxWidget) - _gfxWidget->setGfx(0); - - _metaEngine = metaEngine; - _target = target; - _delSupport = _metaEngine->hasFeature(MetaEngine::kSupportsDeleteSave); - _metaInfoSupport = _metaEngine->hasFeature(MetaEngine::kSavesSupportMetaInfo); - _thumbnailSupport = _metaInfoSupport && _metaEngine->hasFeature(MetaEngine::kSavesSupportThumbnail); - _saveDateSupport = _metaInfoSupport && _metaEngine->hasFeature(MetaEngine::kSavesSupportCreationDate); - _playTimeSupport = _metaInfoSupport && _metaEngine->hasFeature(MetaEngine::kSavesSupportPlayTime); - _resultString.clear(); - reflowLayout(); - updateSaveList(); - - return Dialog::runModal(); -} - -void SaveLoadChooserImpl::open() { - Dialog::open(); - - // So that quitting ScummVM will not cause the dialog result to say a - // savegame was selected. - setResult(-1); -} - -const Common::String &SaveLoadChooserImpl::getResultString() const { - int selItem = _list->getSelected(); - return (selItem >= 0) ? _list->getSelectedString() : _resultString; -} - -void SaveLoadChooserImpl::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { - int selItem = _list->getSelected(); - - switch (cmd) { - case GUI::kListItemActivatedCmd: - case GUI::kListItemDoubleClickedCmd: - if (selItem >= 0 && _chooseButton->isEnabled()) { - if (_list->isEditable() || !_list->getSelectedString().empty()) { - _list->endEditMode(); - if (!_saveList.empty()) { - setResult(_saveList[selItem].getSaveSlot()); - _resultString = _list->getSelectedString(); - } - close(); - } - } - break; - case kChooseCmd: - _list->endEditMode(); - if (!_saveList.empty()) { - setResult(_saveList[selItem].getSaveSlot()); - _resultString = _list->getSelectedString(); - } - close(); - break; - case GUI::kListSelectionChangedCmd: - updateSelection(true); - break; - case kDelCmd: - if (selItem >= 0 && _delSupport) { - MessageDialog alert(_("Do you really want to delete this savegame?"), - _("Delete"), _("Cancel")); - if (alert.runModal() == GUI::kMessageOK) { - _metaEngine->removeSaveState(_target.c_str(), _saveList[selItem].getSaveSlot()); - - setResult(-1); - _list->setSelected(-1); - - updateSaveList(); - updateSelection(true); - } - } - break; - case kCloseCmd: - setResult(-1); - default: - Dialog::handleCommand(sender, cmd, data); - } -} - -void SaveLoadChooserImpl::reflowLayout() { - if (g_gui.xmlEval()->getVar("Globals.SaveLoadChooser.ExtInfo.Visible") == 1 && _thumbnailSupport) { - int16 x, y; - uint16 w, h; - - if (!g_gui.xmlEval()->getWidgetData("SaveLoadChooser.Thumbnail", x, y, w, h)) - error("Error when loading position data for Save/Load Thumbnails"); - - int thumbW = kThumbnailWidth; - int thumbH = kThumbnailHeight2; - int thumbX = x + (w >> 1) - (thumbW >> 1); - int thumbY = y + kLineHeight; - - int textLines = 0; - if (!_saveDateSupport) - textLines++; - if (!_playTimeSupport) - textLines++; - - _container->resize(x, y, w, h - (kLineHeight * textLines)); - _gfxWidget->resize(thumbX, thumbY, thumbW, thumbH); - - int height = thumbY + thumbH + kLineHeight; - - if (_saveDateSupport) { - _date->resize(thumbX, height, kThumbnailWidth, kLineHeight); - height += kLineHeight; - _time->resize(thumbX, height, kThumbnailWidth, kLineHeight); - height += kLineHeight; - } - - if (_playTimeSupport) - _playtime->resize(thumbX, height, kThumbnailWidth, kLineHeight); - - _container->setVisible(true); - _gfxWidget->setVisible(true); - - _date->setVisible(_saveDateSupport); - _time->setVisible(_saveDateSupport); - - _playtime->setVisible(_playTimeSupport); - - _fillR = 0; - _fillG = 0; - _fillB = 0; - updateSelection(false); - } else { - _container->setVisible(false); - _gfxWidget->setVisible(false); - _date->setVisible(false); - _time->setVisible(false); - _playtime->setVisible(false); - } - - Dialog::reflowLayout(); -} - -void SaveLoadChooserImpl::updateSelection(bool redraw) { - int selItem = _list->getSelected(); - - bool isDeletable = _delSupport; - bool isWriteProtected = false; - bool startEditMode = _list->isEditable(); - - _gfxWidget->setGfx(-1, -1, _fillR, _fillG, _fillB); - _date->setLabel(_("No date saved")); - _time->setLabel(_("No time saved")); - _playtime->setLabel(_("No playtime saved")); - - if (selItem >= 0 && _metaInfoSupport) { - SaveStateDescriptor desc = _metaEngine->querySaveMetaInfos(_target.c_str(), _saveList[selItem].getSaveSlot()); - - isDeletable = desc.getDeletableFlag() && _delSupport; - isWriteProtected = desc.getWriteProtectedFlag(); - - // Don't allow the user to change the description of write protected games - if (isWriteProtected) - startEditMode = false; - - if (_thumbnailSupport) { - const Graphics::Surface *thumb = desc.getThumbnail(); - if (thumb) { - _gfxWidget->setGfx(thumb); - _gfxWidget->useAlpha(256); - } - } - - if (_saveDateSupport) { - const Common::String &saveDate = desc.getSaveDate(); - if (!saveDate.empty()) - _date->setLabel(_("Date: ") + saveDate); - - const Common::String &saveTime = desc.getSaveTime(); - if (!saveTime.empty()) - _time->setLabel(_("Time: ") + saveTime); - } - - if (_playTimeSupport) { - const Common::String &playTime = desc.getPlayTime(); - if (!playTime.empty()) - _playtime->setLabel(_("Playtime: ") + playTime); - } - } - - - if (_list->isEditable()) { - // Disable the save button if nothing is selected, or if the selected - // game is write protected - _chooseButton->setEnabled(selItem >= 0 && !isWriteProtected); - - if (startEditMode) { - _list->startEditMode(); - - if (_chooseButton->isEnabled() && _list->getSelectedString() == _("Untitled savestate") && - _list->getSelectionColor() == ThemeEngine::kFontColorAlternate) { - _list->setEditString(""); - _list->setEditColor(ThemeEngine::kFontColorNormal); - } - } - } else { - // Disable the load button if nothing is selected, or if an empty - // list item is selected. - _chooseButton->setEnabled(selItem >= 0 && !_list->getSelectedString().empty()); - } - - // Delete will always be disabled if the engine doesn't support it. - _deleteButton->setEnabled(isDeletable && (selItem >= 0) && (!_list->getSelectedString().empty())); - - if (redraw) { - _gfxWidget->draw(); - _date->draw(); - _time->draw(); - _playtime->draw(); - _chooseButton->draw(); - _deleteButton->draw(); - - draw(); - } -} - -void SaveLoadChooserImpl::close() { - _metaEngine = 0; - _target.clear(); - _saveList.clear(); - _list->setList(StringArray()); - - Dialog::close(); -} - -void SaveLoadChooserImpl::updateSaveList() { - _saveList = _metaEngine->listSaves(_target.c_str()); - - int curSlot = 0; - int saveSlot = 0; - StringArray saveNames; - ListWidget::ColorList colors; - for (SaveStateList::const_iterator x = _saveList.begin(); x != _saveList.end(); ++x) { - // Handle gaps in the list of save games - saveSlot = x->getSaveSlot(); - if (curSlot < saveSlot) { - while (curSlot < saveSlot) { - SaveStateDescriptor dummySave(curSlot, ""); - _saveList.insert_at(curSlot, dummySave); - saveNames.push_back(dummySave.getDescription()); - colors.push_back(ThemeEngine::kFontColorNormal); - curSlot++; - } - - // Sync the save list iterator - for (x = _saveList.begin(); x != _saveList.end(); ++x) { - if (x->getSaveSlot() == saveSlot) - break; - } - } - - // Show "Untitled savestate" for empty/whitespace savegame descriptions - Common::String description = x->getDescription(); - Common::String trimmedDescription = description; - trimmedDescription.trim(); - if (trimmedDescription.empty()) { - description = _("Untitled savestate"); - colors.push_back(ThemeEngine::kFontColorAlternate); - } else { - colors.push_back(ThemeEngine::kFontColorNormal); - } - - saveNames.push_back(description); - curSlot++; - } - - // Fill the rest of the save slots with empty saves - - int maximumSaveSlots = _metaEngine->getMaximumSaveSlot(); - -#ifdef __DS__ - // Low memory on the DS means too many save slots are impractical, so limit - // the maximum here. - if (maximumSaveSlots > 99) { - maximumSaveSlots = 99; - } -#endif - - Common::String emptyDesc; - for (int i = curSlot; i <= maximumSaveSlots; i++) { - saveNames.push_back(emptyDesc); - SaveStateDescriptor dummySave(i, ""); - _saveList.push_back(dummySave); - colors.push_back(ThemeEngine::kFontColorNormal); - } - - _list->setList(saveNames, &colors); -} - -// --- SaveLoadChooser implementation --- - SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode) { - _impl = new SaveLoadChooserImpl(title, buttonLabel, saveMode); + _impl = new SaveLoadChooserSimple(title, buttonLabel, saveMode); } SaveLoadChooser::~SaveLoadChooser() { diff --git a/gui/saveload.h b/gui/saveload.h index a3834ff777..ac61291b62 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -27,12 +27,12 @@ namespace GUI { -class SaveLoadChooserImpl; +class SaveLoadChooserDialog; class SaveLoadChooser { typedef Common::String String; protected: - SaveLoadChooserImpl *_impl; + SaveLoadChooserDialog *_impl; public: SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode); ~SaveLoadChooser(); -- cgit v1.2.3 From b4882ce6bdb8f3a0df0085fa43ed3bbaf5cb47e1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 15 Jun 2012 22:39:57 +0200 Subject: GUI: Implement a new load chooser, which displays a list of thumbnails. --- gui/saveload-dialog.cpp | 192 ++++++++++++++++++++++++++++++++++++++++++++++++ gui/saveload-dialog.h | 46 ++++++++++++ 2 files changed, 238 insertions(+) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index b8e64c4d99..6740fcad13 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -377,4 +377,196 @@ void SaveLoadChooserSimple::updateSaveList() { _list->setList(saveNames, &colors); } +// LoadChooserThumbnailed implementation + +enum { + kNextCmd = 'NEXT', + kPrevCmd = 'PREV' +}; + +LoadChooserThumbnailed::LoadChooserThumbnailed(const Common::String &title) + : SaveLoadChooserDialog("SaveLoadChooser"), _lines(0), _columns(0), _entriesPerPage(0), + _curPage(0), _buttons() { + _backgroundType = ThemeEngine::kDialogBackgroundSpecial; + + new StaticTextWidget(this, "SaveLoadChooser.Title", title); + + // Buttons + new GUI::ButtonWidget(this, "SaveLoadChooser.Delete", _("Cancel"), 0, kCloseCmd); + _nextButton = new GUI::ButtonWidget(this, "SaveLoadChooser.Choose", _("Next"), 0, kNextCmd); + _nextButton->setEnabled(false); + + _prevButton = new GUI::ButtonWidget(this, "SaveLoadChooser.Cancel", _("Prev"), 0, kPrevCmd); + _prevButton->setEnabled(false); +} + +const Common::String &LoadChooserThumbnailed::getResultString() const { + // FIXME: This chooser is only for loading, thus the result is never used + // anyway. But this is still an ugly hack. + return _target; +} + +void LoadChooserThumbnailed::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { + if (cmd <= _entriesPerPage) { + setResult(_saveList[cmd - 1 + _curPage * _entriesPerPage].getSaveSlot()); + close(); + } + + switch (cmd) { + case kNextCmd: + ++_curPage; + updateSaves(); + draw(); + break; + + case kPrevCmd: + --_curPage; + updateSaves(); + draw(); + break; + + case kCloseCmd: + setResult(-1); + default: + SaveLoadChooserDialog::handleCommand(sender, cmd, data); + } +} + +void LoadChooserThumbnailed::handleMouseWheel(int x, int y, int direction) { + if (direction > 0) { + if (_nextButton->isEnabled()) { + ++_curPage; + updateSaves(); + draw(); + } + } else { + if (_prevButton->isEnabled()) { + --_curPage; + updateSaves(); + draw(); + } + } +} + +void LoadChooserThumbnailed::open() { + SaveLoadChooserDialog::open(); + + _curPage = 0; + updateSaves(); +} + +void LoadChooserThumbnailed::reflowLayout() { + SaveLoadChooserDialog::reflowLayout(); + destroyButtons(); + + const uint16 availableWidth = getWidth() - 20; + uint16 availableHeight; + + int16 x, y; + uint16 w; + g_gui.xmlEval()->getWidgetData("SaveLoadChooser.List", x, y, w, availableHeight); + + const int16 buttonWidth = kThumbnailWidth + 6; + const int16 buttonHeight = kThumbnailHeight2 + 6; + + const int16 containerFrameWidthAdd = 10; + const int16 containerFrameHeightAdd = 0; + const int16 containerWidth = buttonWidth + containerFrameWidthAdd; + const int16 containerHeight = buttonHeight + kLineHeight + containerFrameHeightAdd; + + const int16 defaultSpacingHorizontal = 4; + const int16 defaultSpacingVertical = 4; + const int16 slotAreaWidth = containerWidth + defaultSpacingHorizontal; + const int16 slotAreaHeight = containerHeight + defaultSpacingHorizontal; + + const uint oldEntriesPerPage = _entriesPerPage; + _columns = MAX(1, availableWidth / slotAreaWidth); + _lines = MAX(1, availableHeight / slotAreaHeight); + _entriesPerPage = _columns * _lines; + // Recalculate the page number + if (!_saveList.empty() && oldEntriesPerPage != 0) { + _curPage = (_curPage * oldEntriesPerPage) / _entriesPerPage; + } + + const uint addX = _columns > 1 ? (availableWidth % slotAreaWidth) / (_columns - 1) : 0; + const uint addY = _lines > 1 ? (availableHeight % slotAreaHeight) / (_lines - 1) : 0; + + _buttons.reserve(_lines * _columns); + y += defaultSpacingVertical / 2; + for (uint curLine = 0; curLine < _lines; ++curLine, y += slotAreaHeight + addY) { + for (uint curColumn = 0, curX = x + defaultSpacingHorizontal / 2; curColumn < _columns; ++curColumn, curX += slotAreaWidth + addX) { + ContainerWidget *container = new ContainerWidget(this, curX, y, containerWidth, containerHeight); + container->setVisible(false); + + int dstY = y + containerFrameHeightAdd / 2; + int dstX = curX + containerFrameWidthAdd / 2; + + PicButtonWidget *button = new PicButtonWidget(this, dstX, dstY, buttonWidth, buttonHeight, 0, curLine * _columns + curColumn + 1); + button->setVisible(false); + dstY += buttonHeight; + + StaticTextWidget *description = new StaticTextWidget(this, dstX, dstY, buttonWidth, kLineHeight, Common::String(), Graphics::kTextAlignLeft); + description->setVisible(false); + + _buttons.push_back(SlotButton(container, button, description)); + } + } + + if (!_target.empty()) + updateSaves(); +} + +void LoadChooserThumbnailed::close() { + SaveLoadChooserDialog::close(); + hideButtons(); +} + +int LoadChooserThumbnailed::runIntern() { + return SaveLoadChooserDialog::runModal(); +} + +void LoadChooserThumbnailed::destroyButtons() { + for (ButtonArray::iterator i = _buttons.begin(), end = _buttons.end(); i != end; ++i) { + removeWidget(i->container); + removeWidget(i->button); + removeWidget(i->description); + } + + _buttons.clear(); +} + +void LoadChooserThumbnailed::hideButtons() { + for (ButtonArray::iterator i = _buttons.begin(), end = _buttons.end(); i != end; ++i) { + i->button->setGfx(0); + i->setVisible(false); + } + +} + +void LoadChooserThumbnailed::updateSaves() { + hideButtons(); + + _saveList = _metaEngine->listSaves(_target.c_str()); + + for (uint i = _curPage * _entriesPerPage, curNum = 0; i < _saveList.size() && curNum < _entriesPerPage; ++i, ++curNum) { + const uint saveSlot = _saveList[i].getSaveSlot(); + + SaveStateDescriptor desc = _metaEngine->querySaveMetaInfos(_target.c_str(), saveSlot); + SlotButton &curButton = _buttons[curNum]; + curButton.setVisible(true); + curButton.button->setGfx(desc.getThumbnail()); + curButton.description->setLabel(Common::String::format("%d. %s", saveSlot, desc.getDescription().c_str())); + } + + if (_curPage > 0) + _prevButton->setEnabled(true); + else + _prevButton->setEnabled(false); + + if ((_curPage + 1) * _entriesPerPage < _saveList.size()) + _nextButton->setEnabled(true); + else + _nextButton->setEnabled(false); +} + } // End of namespace GUI diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h index 7a78e17bae..b80741d36a 100644 --- a/gui/saveload-dialog.h +++ b/gui/saveload-dialog.h @@ -85,6 +85,52 @@ private: void updateSelection(bool redraw); }; +class LoadChooserThumbnailed : public SaveLoadChooserDialog { +public: + LoadChooserThumbnailed(const Common::String &title); + + virtual const Common::String &getResultString() const; + + virtual void open(); + + virtual void reflowLayout(); + + virtual void close(); +protected: + virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); + virtual void handleMouseWheel(int x, int y, int direction); +private: + virtual int runIntern(); + + uint _columns, _lines; + uint _entriesPerPage; + uint _curPage; + SaveStateList _saveList; + + GUI::ButtonWidget *_nextButton; + GUI::ButtonWidget *_prevButton; + + struct SlotButton { + SlotButton() : container(0), button(0), description(0) {} + SlotButton(ContainerWidget *c, PicButtonWidget *b, StaticTextWidget *d) : container(c), button(b), description(d) {} + + ContainerWidget *container; + PicButtonWidget *button; + StaticTextWidget *description; + + void setVisible(bool state) { + container->setVisible(state); + button->setVisible(state); + description->setVisible(state); + } + }; + typedef Common::Array ButtonArray; + ButtonArray _buttons; + void destroyButtons(); + void hideButtons(); + void updateSaves(); +}; + } // End of namespace GUI #endif -- cgit v1.2.3 From 72ea449431d9db61c45160f7c42d546599e84afe Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 15 Jun 2012 22:47:57 +0200 Subject: GUI: Hook up the new load chooser for > 320x200 and engines which support thumbnails. --- gui/saveload.cpp | 22 +++++++++++++++++----- gui/saveload.h | 6 ++++++ 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/gui/saveload.cpp b/gui/saveload.cpp index e0e6d6187e..becc3f6b4f 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -24,13 +24,14 @@ #include "gui/saveload.h" #include "gui/saveload-dialog.h" +#include "gui/gui-manager.h" #include "engines/metaengine.h" namespace GUI { -SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode) { - _impl = new SaveLoadChooserSimple(title, buttonLabel, saveMode); +SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode) + : _impl(0), _title(title), _buttonLabel(buttonLabel), _saveMode(saveMode) { } SaveLoadChooser::~SaveLoadChooser() { @@ -38,6 +39,19 @@ SaveLoadChooser::~SaveLoadChooser() { _impl = 0; } +void SaveLoadChooser::selectChooser(const MetaEngine &engine) { + delete _impl; + _impl = 0; + + if (!_saveMode && g_gui.getWidth() > 320 && g_gui.getHeight() > 200 + && engine.hasFeature(MetaEngine::kSavesSupportMetaInfo) + && engine.hasFeature(MetaEngine::kSavesSupportThumbnail)) { + _impl = new LoadChooserThumbnailed(_title); + } else { + _impl = new SaveLoadChooserSimple(_title, _buttonLabel, _saveMode); + } +} + Common::String SaveLoadChooser::createDefaultSaveDescription(const int slot) const { #if defined(USE_SAVEGAME_TIMESTAMP) TimeDate curTime; @@ -51,9 +65,6 @@ Common::String SaveLoadChooser::createDefaultSaveDescription(const int slot) con } int SaveLoadChooser::runModalWithCurrentTarget() { - if (!_impl) - return -1; - const Common::String gameId = ConfMan.get("gameid"); const EnginePlugin *plugin = 0; @@ -63,6 +74,7 @@ int SaveLoadChooser::runModalWithCurrentTarget() { } int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target) { + selectChooser(**plugin); if (!_impl) return -1; diff --git a/gui/saveload.h b/gui/saveload.h index ac61291b62..26a8cd1bad 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -33,6 +33,12 @@ class SaveLoadChooser { typedef Common::String String; protected: SaveLoadChooserDialog *_impl; + + const String _title; + const String _buttonLabel; + const bool _saveMode; + + void selectChooser(const MetaEngine &engine); public: SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode); ~SaveLoadChooser(); -- cgit v1.2.3 From 1666d9da824c7e217fba19bcd694cc878b3d65bb Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 16 Jun 2012 01:39:14 +0200 Subject: GOB: Fix mult object collision detection I broke in 2007 This fixes the sidescroller levels (like the bees and butterflies) in Little Red. I really wonder if this breakage had other effects too... --- engines/gob/mult_v2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index 6593565e6a..64b9d19e33 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -1082,7 +1082,7 @@ void Mult_v2::animate() { continue; for (int j = 0; j < numAnims; j++) { - Mult_Object &animObj2 = *_renderObjs[i]; + Mult_Object &animObj2 = *_renderObjs[j]; Mult_AnimData &animData2 = *(animObj2.pAnimData); if (i == j) -- cgit v1.2.3 From 54f7d9c557e1560170256e89ac9c20a1d6be8640 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 16 Jun 2012 01:44:57 +0200 Subject: GOB: Use the full title for Little Red Riding Hood While the other parts in the series are mostly hard-coded, they are small, simple and monotone enough that I might just think about implementing them some day... --- engines/gob/detection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp index 17a2ae3da8..861cc95d41 100644 --- a/engines/gob/detection.cpp +++ b/engines/gob/detection.cpp @@ -50,7 +50,7 @@ static const PlainGameDescriptor gobGames[] = { {"gob2cd", "Gobliins 2 CD"}, {"ween", "Ween: The Prophecy"}, {"bargon", "Bargon Attack"}, - {"littlered", "Little Red Riding Hood"}, + {"littlered", "Once Upon A Time: Little Red Riding Hood"}, {"ajworld", "A.J's World of Discovery"}, {"gob3", "Goblins Quest 3"}, {"gob3cd", "Goblins Quest 3 CD"}, -- cgit v1.2.3 From f917db972e0ae7e4e82a6430010a155cbb3a92c0 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 16 Jun 2012 01:50:31 +0200 Subject: GOB: Shut up Little Red's warning about gob func 1 and 2 Those set some DOS timer interrupt related to sound. Seems to be unnecessary for us. --- engines/gob/inter_littlered.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/gob/inter_littlered.cpp b/engines/gob/inter_littlered.cpp index 01d372aaeb..3a4494598e 100644 --- a/engines/gob/inter_littlered.cpp +++ b/engines/gob/inter_littlered.cpp @@ -51,6 +51,9 @@ void Inter_LittleRed::setupOpcodesFunc() { } void Inter_LittleRed::setupOpcodesGob() { + OPCODEGOB(1, o_gobNOP); // Sets some sound timer interrupt + OPCODEGOB(2, o_gobNOP); // Sets some sound timer interrupt + OPCODEGOB(500, o2_playProtracker); OPCODEGOB(501, o2_stopProtracker); } -- cgit v1.2.3 From 31880186e1c78023e2e552a7fceaa27c3d2d08b1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:18:01 +0200 Subject: BACKENDS: Let copyRectToScreen take a "const void *" instead of "const byte *" as buffer. This removes the need to convert the parameter to copyRectToScreen to "const byte *", which is commonly used in games, which use Graphics::Surface to store their graphics data. --- backends/graphics/graphics.h | 2 +- backends/graphics/null/null-graphics.h | 2 +- backends/graphics/opengl/opengl-graphics.cpp | 4 ++-- backends/graphics/opengl/opengl-graphics.h | 2 +- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 10 ++++++---- backends/graphics/surfacesdl/surfacesdl-graphics.h | 2 +- backends/graphics/wincesdl/wincesdl-graphics.cpp | 5 +++-- backends/graphics/wincesdl/wincesdl-graphics.h | 2 +- backends/modular-backend.cpp | 2 +- backends/modular-backend.h | 2 +- backends/platform/android/android.h | 2 +- backends/platform/android/gfx.cpp | 2 +- backends/platform/dc/dc.h | 2 +- backends/platform/dc/display.cpp | 7 ++++--- backends/platform/ds/arm9/source/osystem_ds.cpp | 2 +- backends/platform/ds/arm9/source/osystem_ds.h | 2 +- backends/platform/iphone/osys_main.h | 2 +- backends/platform/iphone/osys_video.mm | 13 +++++++------ backends/platform/n64/osys_n64.h | 2 +- backends/platform/n64/osys_n64_base.cpp | 15 ++++++++------- backends/platform/ps2/systemps2.cpp | 2 +- backends/platform/ps2/systemps2.h | 2 +- backends/platform/psp/osys_psp.cpp | 4 ++-- backends/platform/psp/osys_psp.h | 2 +- backends/platform/wii/osystem.h | 2 +- backends/platform/wii/osystem_gfx.cpp | 9 +++++---- common/system.h | 2 +- 27 files changed, 56 insertions(+), 49 deletions(-) diff --git a/backends/graphics/graphics.h b/backends/graphics/graphics.h index 0d6fa30418..056e894a46 100644 --- a/backends/graphics/graphics.h +++ b/backends/graphics/graphics.h @@ -60,7 +60,7 @@ public: virtual int16 getWidth() = 0; virtual void setPalette(const byte *colors, uint start, uint num) = 0; virtual void grabPalette(byte *colors, uint start, uint num) = 0; - virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) = 0; + virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) = 0; virtual Graphics::Surface *lockScreen() = 0; virtual void unlockScreen() = 0; virtual void fillScreen(uint32 col) = 0; diff --git a/backends/graphics/null/null-graphics.h b/backends/graphics/null/null-graphics.h index 2f8baae3e8..6ffe2e8286 100644 --- a/backends/graphics/null/null-graphics.h +++ b/backends/graphics/null/null-graphics.h @@ -58,7 +58,7 @@ public: int16 getWidth() { return 0; } void setPalette(const byte *colors, uint start, uint num) {} void grabPalette(byte *colors, uint start, uint num) {} - void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {} + void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) {} Graphics::Surface *lockScreen() { return NULL; } void unlockScreen() {} void fillScreen(uint32 col) {} diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 8449048997..033814a4b5 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -349,14 +349,14 @@ void OpenGLGraphicsManager::grabPalette(byte *colors, uint start, uint num) { memcpy(colors, _gamePalette + start * 3, num * 3); } -void OpenGLGraphicsManager::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { +void OpenGLGraphicsManager::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { assert(x >= 0 && x < _screenData.w); assert(y >= 0 && y < _screenData.h); assert(h > 0 && y + h <= _screenData.h); assert(w > 0 && x + w <= _screenData.w); // Copy buffer data to game screen internal buffer - const byte *src = buf; + const byte *src = (const byte *)buf; byte *dst = (byte *)_screenData.pixels + y * _screenData.pitch + x * _screenData.format.bytesPerPixel; for (int i = 0; i < h; i++) { memcpy(dst, src, w * _screenData.format.bytesPerPixel); diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h index 956722c08f..350ffa5f34 100644 --- a/backends/graphics/opengl/opengl-graphics.h +++ b/backends/graphics/opengl/opengl-graphics.h @@ -84,7 +84,7 @@ protected: virtual void grabPalette(byte *colors, uint start, uint num); public: - virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); + virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); virtual Graphics::Surface *lockScreen(); virtual void unlockScreen(); virtual void fillScreen(uint32 col); diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 652c08dc45..9244135262 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -1227,9 +1227,9 @@ void SurfaceSdlGraphicsManager::setAspectRatioCorrection(bool enable) { } } -void SurfaceSdlGraphicsManager::copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h) { +void SurfaceSdlGraphicsManager::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { assert(_transactionMode == kTransactionNone); - assert(src); + assert(buf); if (_screen == NULL) { warning("SurfaceSdlGraphicsManager::copyRectToScreen: _screen == NULL"); @@ -1252,8 +1252,9 @@ void SurfaceSdlGraphicsManager::copyRectToScreen(const byte *src, int pitch, int #ifdef USE_RGB_COLOR byte *dst = (byte *)_screen->pixels + y * _screen->pitch + x * _screenFormat.bytesPerPixel; if (_videoMode.screenWidth == w && pitch == _screen->pitch) { - memcpy(dst, src, h*pitch); + memcpy(dst, buf, h*pitch); } else { + const byte *src = (const byte *)buf; do { memcpy(dst, src, w * _screenFormat.bytesPerPixel); src += pitch; @@ -1263,8 +1264,9 @@ void SurfaceSdlGraphicsManager::copyRectToScreen(const byte *src, int pitch, int #else byte *dst = (byte *)_screen->pixels + y * _screen->pitch + x; if (_screen->pitch == pitch && pitch == w) { - memcpy(dst, src, h*w); + memcpy(dst, buf, h*w); } else { + const byte *src = (const byte *)buf; do { memcpy(dst, src, w); src += pitch; diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h index 32fb219bcd..f2b2d7b239 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.h +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h @@ -111,7 +111,7 @@ protected: virtual void grabPalette(byte *colors, uint start, uint num); public: - virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); + virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); virtual Graphics::Surface *lockScreen(); virtual void unlockScreen(); virtual void fillScreen(uint32 col); diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp index bb79813f3b..2315c582e2 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.cpp +++ b/backends/graphics/wincesdl/wincesdl-graphics.cpp @@ -1071,15 +1071,16 @@ void WINCESdlGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pit SDL_UnlockSurface(_overlayscreen); } -void WINCESdlGraphicsManager::copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h) { +void WINCESdlGraphicsManager::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { assert(_transactionMode == kTransactionNone); - assert(src); + assert(buf); if (_screen == NULL) return; Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends + const byte *src = (const byte *)buf; /* Clip the coordinates */ if (x < 0) { w += x; diff --git a/backends/graphics/wincesdl/wincesdl-graphics.h b/backends/graphics/wincesdl/wincesdl-graphics.h index 7cff8a16d9..26067f0c02 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.h +++ b/backends/graphics/wincesdl/wincesdl-graphics.h @@ -75,7 +75,7 @@ public: bool showMouse(bool visible); void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // overloaded by CE backend void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); - void copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h); // overloaded by CE backend (FIXME) + void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); // overloaded by CE backend (FIXME) Graphics::Surface *lockScreen(); void unlockScreen(); void blitCursor(); diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp index f133c65ed5..2b4087634d 100644 --- a/backends/modular-backend.cpp +++ b/backends/modular-backend.cpp @@ -124,7 +124,7 @@ PaletteManager *ModularBackend::getPaletteManager() { return _graphicsManager; } -void ModularBackend::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { +void ModularBackend::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { _graphicsManager->copyRectToScreen(buf, pitch, x, y, w, h); } diff --git a/backends/modular-backend.h b/backends/modular-backend.h index 150c12c3c8..fd4aca2e4d 100644 --- a/backends/modular-backend.h +++ b/backends/modular-backend.h @@ -80,7 +80,7 @@ public: virtual int16 getHeight(); virtual int16 getWidth(); virtual PaletteManager *getPaletteManager(); - virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); + virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); virtual Graphics::Surface *lockScreen(); virtual void unlockScreen(); virtual void fillScreen(uint32 col); diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h index 4dad1ee7ed..bf66270a7a 100644 --- a/backends/platform/android/android.h +++ b/backends/platform/android/android.h @@ -244,7 +244,7 @@ protected: virtual void grabPalette(byte *colors, uint start, uint num); public: - virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, + virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); virtual void updateScreen(); virtual Graphics::Surface *lockScreen(); diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index 304031b4ba..a40a9e2ee9 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -421,7 +421,7 @@ void OSystem_Android::grabPalette(byte *colors, uint start, uint num) { pf.colorToRGB(READ_UINT16(p), colors[0], colors[1], colors[2]); } -void OSystem_Android::copyRectToScreen(const byte *buf, int pitch, +void OSystem_Android::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { ENTER("%p, %d, %d, %d, %d, %d", buf, pitch, x, y, w, h); diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index ffe003ea1d..95cb88c44b 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -127,7 +127,7 @@ public: // Draw a bitmap to screen. // The screen will not be updated to reflect the new bitmap - void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); + void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); virtual Graphics::Surface *lockScreen(); virtual void unlockScreen(); diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp index e4e9a94ec8..264b86646c 100644 --- a/backends/platform/dc/display.cpp +++ b/backends/platform/dc/display.cpp @@ -260,7 +260,7 @@ void OSystem_Dreamcast::initSize(uint w, uint h, const Graphics::PixelFormat *fo _devpoll = Timer(); } -void OSystem_Dreamcast::copyRectToScreen(const byte *buf, int pitch, int x, int y, +void OSystem_Dreamcast::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { if (w<1 || h<1) @@ -269,10 +269,11 @@ void OSystem_Dreamcast::copyRectToScreen(const byte *buf, int pitch, int x, int x<<=1; w<<=1; } unsigned char *dst = screen + y*SCREEN_W*2 + x; + const byte *src = (const byte *)buf; do { - memcpy(dst, buf, w); + memcpy(dst, src, w); dst += SCREEN_W*2; - buf += pitch; + src += pitch; } while (--h); _screen_dirty = true; } diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index a6b85f207f..f91342a6ce 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -280,7 +280,7 @@ void OSystem_DS::grabPalette(unsigned char *colors, uint start, uint num) { #define MISALIGNED16(ptr) (((u32) (ptr) & 1) != 0) -void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { +void OSystem_DS::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { if (!_graphicsEnable) return; if (w <= 1) return; if (h < 0) return; diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index 11b0988666..789053e522 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -98,7 +98,7 @@ protected: public: void restoreHardwarePalette(); - virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); + virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); virtual void updateScreen(); virtual void setShakePos(int shakeOffset); diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h index e06c7973ab..da3864e0df 100644 --- a/backends/platform/iphone/osys_main.h +++ b/backends/platform/iphone/osys_main.h @@ -143,7 +143,7 @@ protected: virtual void grabPalette(byte *colors, uint start, uint num); public: - virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); + virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); virtual void updateScreen(); virtual Graphics::Surface *lockScreen(); virtual void unlockScreen(); diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm index ddfa8f5030..387d91ff57 100644 --- a/backends/platform/iphone/osys_video.mm +++ b/backends/platform/iphone/osys_video.mm @@ -161,18 +161,19 @@ void OSystem_IPHONE::grabPalette(byte *colors, uint start, uint num) { } } -void OSystem_IPHONE::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { +void OSystem_IPHONE::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { //printf("copyRectToScreen(%p, %d, %i, %i, %i, %i)\n", buf, pitch, x, y, w, h); //Clip the coordinates + const byte *src = (const byte *)buf; if (x < 0) { w += x; - buf -= x; + src -= x; x = 0; } if (y < 0) { h += y; - buf -= y * pitch; + src -= y * pitch; y = 0; } @@ -193,11 +194,11 @@ void OSystem_IPHONE::copyRectToScreen(const byte *buf, int pitch, int x, int y, byte *dst = (byte *)_framebuffer.getBasePtr(x, y); if (_framebuffer.pitch == pitch && _framebuffer.w == w) { - memcpy(dst, buf, h * pitch); + memcpy(dst, src, h * pitch); } else { do { - memcpy(dst, buf, w * _framebuffer.format.bytesPerPixel); - buf += pitch; + memcpy(dst, src, w * _framebuffer.format.bytesPerPixel); + src += pitch; dst += _framebuffer.pitch; } while (--h); } diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h index b8519eeea6..8e28dc9c98 100644 --- a/backends/platform/n64/osys_n64.h +++ b/backends/platform/n64/osys_n64.h @@ -162,7 +162,7 @@ protected: virtual void grabPalette(byte *colors, uint start, uint num); public: - virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); + virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); virtual void updateScreen(); virtual Graphics::Surface *lockScreen(); virtual void unlockScreen(); diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp index f36f7399e1..d8956404f5 100644 --- a/backends/platform/n64/osys_n64_base.cpp +++ b/backends/platform/n64/osys_n64_base.cpp @@ -442,17 +442,18 @@ void OSystem_N64::setCursorPalette(const byte *colors, uint start, uint num) { _dirtyOffscreen = true; } -void OSystem_N64::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { +void OSystem_N64::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { //Clip the coordinates + const byte *src = (const byte *)buf; if (x < 0) { w += x; - buf -= x; + src -= x; x = 0; } if (y < 0) { h += y; - buf -= y * pitch; + src -= y * pitch; y = 0; } @@ -472,14 +473,14 @@ void OSystem_N64::copyRectToScreen(const byte *buf, int pitch, int x, int y, int do { for (int hor = 0; hor < w; hor++) { - if (dst_pal[hor] != buf[hor]) { - uint16 color = _screenPalette[buf[hor]]; + if (dst_pal[hor] != src[hor]) { + uint16 color = _screenPalette[src[hor]]; dst_hicol[hor] = color; // Save image converted to 16-bit - dst_pal[hor] = buf[hor]; // Save palettized display + dst_pal[hor] = src[hor]; // Save palettized display } } - buf += pitch; + src += pitch; dst_pal += _screenWidth; dst_hicol += _screenWidth; } while (--h); diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp index 668ac93a07..9413c55062 100644 --- a/backends/platform/ps2/systemps2.cpp +++ b/backends/platform/ps2/systemps2.cpp @@ -554,7 +554,7 @@ void OSystem_PS2::grabPalette(byte *colors, uint start, uint num) { _screen->grabPalette(colors, (uint8)start, (uint16)num); } -void OSystem_PS2::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { +void OSystem_PS2::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { _screen->copyScreenRect((const uint8*)buf, pitch, x, y, w, h); } diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h index 7bbe061e42..d167988334 100644 --- a/backends/platform/ps2/systemps2.h +++ b/backends/platform/ps2/systemps2.h @@ -62,7 +62,7 @@ protected: virtual void grabPalette(byte *colors, uint start, uint num); public: - virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); + virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); virtual void setShakePos(int shakeOffset); virtual Graphics::Surface *lockScreen(); virtual void unlockScreen(); diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 958a3a22c6..46e11b1bf7 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -204,11 +204,11 @@ void OSystem_PSP::setCursorPalette(const byte *colors, uint start, uint num) { _cursor.clearKeyColor(); // Do we need this? } -void OSystem_PSP::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { +void OSystem_PSP::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { DEBUG_ENTER_FUNC(); _displayManager.waitUntilRenderFinished(); _pendingUpdate = false; - _screen.copyFromRect(buf, pitch, x, y, w, h); + _screen.copyFromRect((const byte *)buf, pitch, x, y, w, h); } Graphics::Surface *OSystem_PSP::lockScreen() { diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h index c72053f52c..af01b6f6c8 100644 --- a/backends/platform/psp/osys_psp.h +++ b/backends/platform/psp/osys_psp.h @@ -99,7 +99,7 @@ public: void setCursorPalette(const byte *colors, uint start, uint num); // Screen related - void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); + void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); Graphics::Surface *lockScreen(); void unlockScreen(); void updateScreen(); diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index b6784d59e4..75c19e6f1b 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -167,7 +167,7 @@ protected: virtual void grabPalette(byte *colors, uint start, uint num); public: virtual void setCursorPalette(const byte *colors, uint start, uint num); - virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, + virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); virtual void updateScreen(); virtual Graphics::Surface *lockScreen(); diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index a00cea8252..c2b6553bac 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -395,7 +395,7 @@ void OSystem_Wii::setCursorPalette(const byte *colors, uint start, uint num) { _cursorPaletteDirty = true; } -void OSystem_Wii::copyRectToScreen(const byte *buf, int pitch, int x, int y, +void OSystem_Wii::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { assert(x >= 0 && x < _gameWidth); assert(y >= 0 && y < _gameHeight); @@ -407,7 +407,7 @@ void OSystem_Wii::copyRectToScreen(const byte *buf, int pitch, int x, int y, if (!Graphics::crossBlit(_gamePixels + y * _gameWidth * _pfGame.bytesPerPixel + x * _pfGame.bytesPerPixel, - buf, _gameWidth * _pfGame.bytesPerPixel, + (const byte *)buf, _gameWidth * _pfGame.bytesPerPixel, pitch, w, h, _pfGameTexture, _pfGame)) { printf("crossBlit failed\n"); ::abort(); @@ -418,9 +418,10 @@ void OSystem_Wii::copyRectToScreen(const byte *buf, int pitch, int x, int y, if (_gameWidth == pitch && pitch == w) { memcpy(dst, buf, h * w); } else { + const byte *src = (const byte *)buf; do { - memcpy(dst, buf, w); - buf += pitch; + memcpy(dst, src, w); + src += pitch; dst += _gameWidth; } while (--h); } diff --git a/common/system.h b/common/system.h index 94bf7f01eb..f35c09c427 100644 --- a/common/system.h +++ b/common/system.h @@ -657,7 +657,7 @@ public: * @see updateScreen * @see getScreenFormat */ - virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) = 0; + virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) = 0; /** * Lock the active screen framebuffer and return a Graphics::Surface -- cgit v1.2.3 From d4a5615a8bc50c6f5f9221a71135d9b4f5726522 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:32:42 +0200 Subject: CGE: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/cge/vga13h.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp index 186de24036..3800b6643a 100644 --- a/engines/cge/vga13h.cpp +++ b/engines/cge/vga13h.cpp @@ -834,7 +834,7 @@ void Vga::update() { } } - g_system->copyRectToScreen((const byte *)Vga::_page[0]->getBasePtr(0, 0), kScrWidth, 0, 0, kScrWidth, kScrHeight); + g_system->copyRectToScreen(Vga::_page[0]->getBasePtr(0, 0), kScrWidth, 0, 0, kScrWidth, kScrHeight); g_system->updateScreen(); } -- cgit v1.2.3 From 2afc0a5fbc963562b5826965f4498156d1767a62 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:33:12 +0200 Subject: GROOVIE: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/groovie/graphics.cpp | 2 +- engines/groovie/roq.cpp | 2 +- engines/groovie/script.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/groovie/graphics.cpp b/engines/groovie/graphics.cpp index c3ca03750a..73eb574dec 100644 --- a/engines/groovie/graphics.cpp +++ b/engines/groovie/graphics.cpp @@ -94,7 +94,7 @@ void GraphicsMan::mergeFgAndBg() { } void GraphicsMan::updateScreen(Graphics::Surface *source) { - _vm->_system->copyRectToScreen((byte *)source->getBasePtr(0, 0), 640, 0, 80, 640, 320); + _vm->_system->copyRectToScreen(source->getBasePtr(0, 0), 640, 0, 80, 640, 320); change(); } diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index baf42a7679..35d7ecf886 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -160,7 +160,7 @@ bool ROQPlayer::playFrameInternal() { if (_dirty) { // Update the screen - _syst->copyRectToScreen((byte *)_bg->getBasePtr(0, 0), _bg->pitch, 0, (_syst->getHeight() - _bg->h) / 2, _bg->w, _bg->h); + _syst->copyRectToScreen(_bg->getBasePtr(0, 0), _bg->pitch, 0, (_syst->getHeight() - _bg->h) / 2, _bg->w, _bg->h); _syst->updateScreen(); // Clear the dirty flag diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index 68415233f4..cbbdecc3e7 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -373,7 +373,7 @@ bool Script::hotspot(Common::Rect rect, uint16 address, uint8 cursor) { DebugMan.isDebugChannelEnabled(kGroovieDebugAll)) { rect.translate(0, -80); _vm->_graphicsMan->_foreground.frameRect(rect, 250); - _vm->_system->copyRectToScreen((byte *)_vm->_graphicsMan->_foreground.getBasePtr(0, 0), _vm->_graphicsMan->_foreground.pitch, 0, 80, 640, 320); + _vm->_system->copyRectToScreen(_vm->_graphicsMan->_foreground.getBasePtr(0, 0), _vm->_graphicsMan->_foreground.pitch, 0, 80, 640, 320); _vm->_system->updateScreen(); } @@ -1231,7 +1231,7 @@ void Script::o_copyrecttobg() { // 0x37 memcpy(bg + offset, fg + offset, width); offset += 640; } - _vm->_system->copyRectToScreen((byte *)_vm->_graphicsMan->_background.getBasePtr(left, top - 80), 640, left, top, width, height); + _vm->_system->copyRectToScreen(_vm->_graphicsMan->_background.getBasePtr(left, top - 80), 640, left, top, width, height); _vm->_graphicsMan->change(); } -- cgit v1.2.3 From 2e97e043fb8610d1d85bbd3e5e2d7ad4990ef8a0 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:33:53 +0200 Subject: LASTEXPRESS: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/lastexpress/data/animation.cpp | 2 +- engines/lastexpress/graphics.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp index 28d30ec7d1..9d0ed532f2 100644 --- a/engines/lastexpress/data/animation.cpp +++ b/engines/lastexpress/data/animation.cpp @@ -272,7 +272,7 @@ void Animation::play() { draw(s); // XXX: Update the screen - g_system->copyRectToScreen((byte *)s->pixels, s->pitch, 0, 0, s->w, s->h); + g_system->copyRectToScreen(s->pixels, s->pitch, 0, 0, s->w, s->h); // Free the temporary surface s->free(); diff --git a/engines/lastexpress/graphics.cpp b/engines/lastexpress/graphics.cpp index e129457256..753c3a39e4 100644 --- a/engines/lastexpress/graphics.cpp +++ b/engines/lastexpress/graphics.cpp @@ -160,7 +160,7 @@ void GraphicsManager::mergePlanes() { void GraphicsManager::updateScreen() { g_system->fillScreen(0); - g_system->copyRectToScreen((byte *)_screen.getBasePtr(0, 0), 640 * 2, 0, 0, 640, 480); + g_system->copyRectToScreen(_screen.getBasePtr(0, 0), 640 * 2, 0, 0, 640, 480); } } // End of namespace LastExpress -- cgit v1.2.3 From 79dfc7be97c89fcc97332d2e05e22b683e05a7cb Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:34:23 +0200 Subject: MADE: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/made/pmvplayer.cpp | 2 +- engines/made/screen.cpp | 6 +++--- engines/made/screen.h | 2 +- engines/made/screenfx.cpp | 28 ++++++++++++++-------------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp index 6c4749f44d..cf450f7e25 100644 --- a/engines/made/pmvplayer.cpp +++ b/engines/made/pmvplayer.cpp @@ -248,7 +248,7 @@ void PmvPlayer::handleEvents() { } void PmvPlayer::updateScreen() { - _vm->_system->copyRectToScreen((const byte*)_surface->pixels, _surface->pitch, + _vm->_system->copyRectToScreen(_surface->pixels, _surface->pitch, (320 - _surface->w) / 2, (200 - _surface->h) / 2, _surface->w, _surface->h); _vm->_system->updateScreen(); } diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index b49bfff840..ea7d57f82d 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -349,7 +349,7 @@ void Screen::updateSprites() { drawSpriteChannels(_backgroundScreenDrawCtx, 3, 0); drawSpriteChannels(_workScreenDrawCtx, 1, 2); - _vm->_system->copyRectToScreen((const byte*)_workScreen->pixels, _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h); + _vm->_system->copyRectToScreen(_workScreen->pixels, _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h); _vm->_screen->updateScreenAndWait(10); } @@ -775,10 +775,10 @@ void Screen::unlockScreen() { } void Screen::showWorkScreen() { - _vm->_system->copyRectToScreen((const byte*)_workScreen->pixels, _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h); + _vm->_system->copyRectToScreen(_workScreen->pixels, _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h); } -void Screen::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { +void Screen::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) { _vm->_system->copyRectToScreen(buf, pitch, x, y, w, h); } diff --git a/engines/made/screen.h b/engines/made/screen.h index a61ecabdce..266ac3811d 100644 --- a/engines/made/screen.h +++ b/engines/made/screen.h @@ -176,7 +176,7 @@ public: Graphics::Surface *lockScreen(); void unlockScreen(); void showWorkScreen(); - void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); + void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); void updateScreenAndWait(int delay); int16 addToSpriteList(int16 index, int16 xofs, int16 yofs); diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp index 4e0d463b53..de9231a158 100644 --- a/engines/made/screenfx.cpp +++ b/engines/made/screenfx.cpp @@ -293,7 +293,7 @@ void ScreenEffects::vfx00(Graphics::Surface *surface, byte *palette, byte *newPa void ScreenEffects::vfx01(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { startBlendedPalette(palette, newPalette, colorCount, 312); for (int x = 0; x < 320; x += 8) { - _screen->copyRectToScreen((const byte*)surface->getBasePtr(x, 0), surface->pitch, x, 0, 8, 200); + _screen->copyRectToScreen(surface->getBasePtr(x, 0), surface->pitch, x, 0, 8, 200); stepBlendedPalette(); _screen->updateScreenAndWait(25); } @@ -303,7 +303,7 @@ void ScreenEffects::vfx01(Graphics::Surface *surface, byte *palette, byte *newPa void ScreenEffects::vfx02(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { startBlendedPalette(palette, newPalette, colorCount, 312); for (int x = 312; x >= 0; x -= 8) { - _screen->copyRectToScreen((const byte*)surface->getBasePtr(x, 0), surface->pitch, x, 0, 8, 200); + _screen->copyRectToScreen(surface->getBasePtr(x, 0), surface->pitch, x, 0, 8, 200); stepBlendedPalette(); _screen->updateScreenAndWait(25); } @@ -313,7 +313,7 @@ void ScreenEffects::vfx02(Graphics::Surface *surface, byte *palette, byte *newPa void ScreenEffects::vfx03(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { startBlendedPalette(palette, newPalette, colorCount, 190); for (int y = 0; y < 200; y += 10) { - _screen->copyRectToScreen((const byte*)surface->getBasePtr(0, y), surface->pitch, 0, y, 320, 10); + _screen->copyRectToScreen(surface->getBasePtr(0, y), surface->pitch, 0, y, 320, 10); stepBlendedPalette(); _screen->updateScreenAndWait(25); } @@ -323,7 +323,7 @@ void ScreenEffects::vfx03(Graphics::Surface *surface, byte *palette, byte *newPa void ScreenEffects::vfx04(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { startBlendedPalette(palette, newPalette, colorCount, 190); for (int y = 190; y >= 0; y -= 10) { - _screen->copyRectToScreen((const byte*)surface->getBasePtr(0, y), surface->pitch, 0, y, 320, 10); + _screen->copyRectToScreen(surface->getBasePtr(0, y), surface->pitch, 0, y, 320, 10); stepBlendedPalette(); _screen->updateScreenAndWait(25); } @@ -333,8 +333,8 @@ void ScreenEffects::vfx04(Graphics::Surface *surface, byte *palette, byte *newPa void ScreenEffects::vfx05(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { startBlendedPalette(palette, newPalette, colorCount, 90); for (int y = 0; y < 100; y += 10) { - _screen->copyRectToScreen((const byte*)surface->getBasePtr(0, y + 100), surface->pitch, 0, y + 100, 320, 10); - _screen->copyRectToScreen((const byte*)surface->getBasePtr(0, 90 - y), surface->pitch, 0, 90 - y, 320, 10); + _screen->copyRectToScreen(surface->getBasePtr(0, y + 100), surface->pitch, 0, y + 100, 320, 10); + _screen->copyRectToScreen(surface->getBasePtr(0, 90 - y), surface->pitch, 0, 90 - y, 320, 10); stepBlendedPalette(); _screen->updateScreenAndWait(25); } @@ -345,8 +345,8 @@ void ScreenEffects::vfx05(Graphics::Surface *surface, byte *palette, byte *newPa void ScreenEffects::vfx06(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { startBlendedPalette(palette, newPalette, colorCount, 152); for (int x = 0; x < 160; x += 8) { - _screen->copyRectToScreen((const byte*)surface->getBasePtr(x + 160, 0), surface->pitch, x + 160, 0, 8, 200); - _screen->copyRectToScreen((const byte*)surface->getBasePtr(152 - x, 0), surface->pitch, 152 - x, 0, 8, 200); + _screen->copyRectToScreen(surface->getBasePtr(x + 160, 0), surface->pitch, x + 160, 0, 8, 200); + _screen->copyRectToScreen(surface->getBasePtr(152 - x, 0), surface->pitch, 152 - x, 0, 8, 200); stepBlendedPalette(); _screen->updateScreenAndWait(25); } @@ -357,8 +357,8 @@ void ScreenEffects::vfx06(Graphics::Surface *surface, byte *palette, byte *newPa void ScreenEffects::vfx07(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { startBlendedPalette(palette, newPalette, colorCount, 152); for (int x = 152; x >= 0; x -= 8) { - _screen->copyRectToScreen((const byte*)surface->getBasePtr(x + 160, 0), surface->pitch, x + 160, 0, 8, 200); - _screen->copyRectToScreen((const byte*)surface->getBasePtr(152 - x, 0), surface->pitch, 152 - x, 0, 8, 200); + _screen->copyRectToScreen(surface->getBasePtr(x + 160, 0), surface->pitch, x + 160, 0, 8, 200); + _screen->copyRectToScreen(surface->getBasePtr(152 - x, 0), surface->pitch, 152 - x, 0, 8, 200); stepBlendedPalette(); _screen->updateScreenAndWait(25); } @@ -368,7 +368,7 @@ void ScreenEffects::vfx07(Graphics::Surface *surface, byte *palette, byte *newPa // "Screen slide in" right to left void ScreenEffects::vfx08(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { for (int x = 8; x <= 320; x += 8) { - _screen->copyRectToScreen((const byte*)surface->getBasePtr(0, 0), surface->pitch, 320 - x, 0, x, 200); + _screen->copyRectToScreen(surface->getBasePtr(0, 0), surface->pitch, 320 - x, 0, x, 200); _screen->updateScreenAndWait(25); } setPalette(palette); @@ -509,7 +509,7 @@ void ScreenEffects::vfx17(Graphics::Surface *surface, byte *palette, byte *newPa // "Screen slide in" left to right void ScreenEffects::vfx18(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { for (int x = 8; x <= 320; x += 8) { - _screen->copyRectToScreen((const byte*)surface->getBasePtr(320 - x, 0), surface->pitch, 0, 0, x, 200); + _screen->copyRectToScreen(surface->getBasePtr(320 - x, 0), surface->pitch, 0, 0, x, 200); _screen->updateScreenAndWait(25); } @@ -519,7 +519,7 @@ void ScreenEffects::vfx18(Graphics::Surface *surface, byte *palette, byte *newPa // "Screen slide in" top to bottom void ScreenEffects::vfx19(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { for (int y = 4; y <= 200; y += 4) { - _screen->copyRectToScreen((const byte*)surface->getBasePtr(0, 200 - y), surface->pitch, 0, 0, 320, y); + _screen->copyRectToScreen(surface->getBasePtr(0, 200 - y), surface->pitch, 0, 0, 320, y); _screen->updateScreenAndWait(25); } @@ -529,7 +529,7 @@ void ScreenEffects::vfx19(Graphics::Surface *surface, byte *palette, byte *newPa // "Screen slide in" bottom to top void ScreenEffects::vfx20(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { for (int y = 4; y <= 200; y += 4) { - _screen->copyRectToScreen((const byte*)surface->getBasePtr(0, 0), surface->pitch, 0, 200 - y, 320, y); + _screen->copyRectToScreen(surface->getBasePtr(0, 0), surface->pitch, 0, 200 - y, 320, y); _screen->updateScreenAndWait(25); } -- cgit v1.2.3 From d214391431300e3be72dcf4690e996b0558ec6f2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:34:46 +0200 Subject: MOHAWK: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/mohawk/myst_graphics.cpp | 4 ++-- engines/mohawk/riven_graphics.cpp | 8 ++++---- engines/mohawk/video.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/engines/mohawk/myst_graphics.cpp b/engines/mohawk/myst_graphics.cpp index 484e49d529..ae80dd5538 100644 --- a/engines/mohawk/myst_graphics.cpp +++ b/engines/mohawk/myst_graphics.cpp @@ -222,7 +222,7 @@ void MystGraphics::copyImageSectionToScreen(uint16 image, Common::Rect src, Comm simulatePreviousDrawDelay(dest); - _vm->_system->copyRectToScreen((byte *)surface->getBasePtr(src.left, top), surface->pitch, dest.left, dest.top, width, height); + _vm->_system->copyRectToScreen(surface->getBasePtr(src.left, top), surface->pitch, dest.left, dest.top, width, height); } void MystGraphics::copyImageSectionToBackBuffer(uint16 image, Common::Rect src, Common::Rect dest) { @@ -280,7 +280,7 @@ void MystGraphics::copyBackBufferToScreen(Common::Rect r) { simulatePreviousDrawDelay(r); - _vm->_system->copyRectToScreen((byte *)_backBuffer->getBasePtr(r.left, r.top), _backBuffer->pitch, r.left, r.top, r.width(), r.height()); + _vm->_system->copyRectToScreen(_backBuffer->getBasePtr(r.left, r.top), _backBuffer->pitch, r.left, r.top, r.width(), r.height()); } void MystGraphics::runTransition(uint16 type, Common::Rect rect, uint16 steps, uint16 delay) { diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp index 9415e51412..05e66a3924 100644 --- a/engines/mohawk/riven_graphics.cpp +++ b/engines/mohawk/riven_graphics.cpp @@ -115,7 +115,7 @@ void RivenGraphics::updateScreen(Common::Rect updateRect) { // Copy to screen if there's no transition. Otherwise transition. ;) if (_scheduledTransition < 0) - _vm->_system->copyRectToScreen((byte *)_mainScreen->getBasePtr(updateRect.left, updateRect.top), _mainScreen->pitch, updateRect.left, updateRect.top, updateRect.width(), updateRect.height()); + _vm->_system->copyRectToScreen(_mainScreen->getBasePtr(updateRect.left, updateRect.top), _mainScreen->pitch, updateRect.left, updateRect.top, updateRect.width(), updateRect.height()); else runScheduledTransition(); @@ -255,7 +255,7 @@ void RivenGraphics::runScheduledTransition() { } // For now, just copy the image to screen without doing any transition. - _vm->_system->copyRectToScreen((byte *)_mainScreen->pixels, _mainScreen->pitch, 0, 0, _mainScreen->w, _mainScreen->h); + _vm->_system->copyRectToScreen(_mainScreen->pixels, _mainScreen->pitch, 0, 0, _mainScreen->w, _mainScreen->h); _vm->_system->updateScreen(); _scheduledTransition = -1; // Clear scheduled transition @@ -345,7 +345,7 @@ void RivenGraphics::drawInventoryImage(uint16 id, const Common::Rect *rect) { mhkSurface->convertToTrueColor(); Graphics::Surface *surface = mhkSurface->getSurface(); - _vm->_system->copyRectToScreen((byte *)surface->pixels, surface->pitch, rect->left, rect->top, surface->w, surface->h); + _vm->_system->copyRectToScreen(surface->pixels, surface->pitch, rect->left, rect->top, surface->w, surface->h); delete mhkSurface; } @@ -437,7 +437,7 @@ void RivenGraphics::updateCredits() { } // Now flush the new screen - _vm->_system->copyRectToScreen((byte *)_mainScreen->pixels, _mainScreen->pitch, 0, 0, _mainScreen->w, _mainScreen->h); + _vm->_system->copyRectToScreen(_mainScreen->pixels, _mainScreen->pitch, 0, 0, _mainScreen->w, _mainScreen->h); _vm->_system->updateScreen(); } } diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index 15103b2021..18d609c513 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -245,7 +245,7 @@ bool VideoManager::updateMovies() { // Clip the width/height to make sure we stay on the screen (Myst does this a few times) uint16 width = MIN(_videoStreams[i]->getWidth(), _vm->_system->getWidth() - _videoStreams[i].x); uint16 height = MIN(_videoStreams[i]->getHeight(), _vm->_system->getHeight() - _videoStreams[i].y); - _vm->_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, _videoStreams[i].x, _videoStreams[i].y, width, height); + _vm->_system->copyRectToScreen(frame->pixels, frame->pitch, _videoStreams[i].x, _videoStreams[i].y, width, height); // We've drawn something to the screen, make sure we update it updateScreen = true; -- cgit v1.2.3 From ebb5cb7e4c6266e99382792f6c3d65868f5bc5e9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:36:01 +0200 Subject: SAGA: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/saga/introproc_ihnm.cpp | 6 +++--- engines/saga/introproc_saga2.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/saga/introproc_ihnm.cpp b/engines/saga/introproc_ihnm.cpp index 364c4cf306..6015e6757a 100644 --- a/engines/saga/introproc_ihnm.cpp +++ b/engines/saga/introproc_ihnm.cpp @@ -212,7 +212,7 @@ bool Scene::playTitle(int title, int time, int mode) { break; case 2: // display background - _vm->_system->copyRectToScreen((byte *)backBufferSurface->pixels, backBufferSurface->w, 0, 0, + _vm->_system->copyRectToScreen(backBufferSurface->pixels, backBufferSurface->w, 0, 0, backBufferSurface->w, backBufferSurface->h); phase++; startTime = curTime; @@ -247,7 +247,7 @@ bool Scene::playTitle(int title, int time, int mode) { frameTime = curTime; - _vm->_system->copyRectToScreen((byte *)backBufferSurface->pixels, backBufferSurface->w, 0, 0, + _vm->_system->copyRectToScreen(backBufferSurface->pixels, backBufferSurface->w, 0, 0, backBufferSurface->w, backBufferSurface->h); } @@ -274,7 +274,7 @@ bool Scene::playTitle(int title, int time, int mode) { _vm->_anim->endVideo(); memset((byte *)backBufferSurface->pixels, 0, backBufferSurface->w * backBufferSurface->h); - _vm->_system->copyRectToScreen((byte *)backBufferSurface->pixels, backBufferSurface->w, 0, 0, + _vm->_system->copyRectToScreen(backBufferSurface->pixels, backBufferSurface->w, 0, 0, backBufferSurface->w, backBufferSurface->h); return interrupted; diff --git a/engines/saga/introproc_saga2.cpp b/engines/saga/introproc_saga2.cpp index bdf8936a55..b6470370af 100644 --- a/engines/saga/introproc_saga2.cpp +++ b/engines/saga/introproc_saga2.cpp @@ -105,7 +105,7 @@ void Scene::playMovie(const char *filename) { if (smkDecoder->needsUpdate()) { const Graphics::Surface *frame = smkDecoder->decodeNextFrame(); if (frame) { - _vm->_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, x, y, frame->w, frame->h); + _vm->_system->copyRectToScreen(frame->pixels, frame->pitch, x, y, frame->w, frame->h); if (smkDecoder->hasDirtyPalette()) smkDecoder->setSystemPalette(); -- cgit v1.2.3 From 084c1259fc5c185ec66001708f623d03675bf6f5 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:36:17 +0200 Subject: SCI: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/sci/engine/kvideo.cpp | 2 +- engines/sci/graphics/frameout.cpp | 2 +- engines/sci/graphics/maciconbar.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index f176a13721..fa9cc91aed 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -100,7 +100,7 @@ void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) { g_sci->_gfxScreen->scale2x((byte *)frame->pixels, scaleBuffer, videoDecoder->getWidth(), videoDecoder->getHeight(), bytesPerPixel); g_system->copyRectToScreen(scaleBuffer, pitch, x, y, width, height); } else { - g_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, x, y, width, height); + g_system->copyRectToScreen(frame->pixels, frame->pitch, x, y, width, height); } if (videoDecoder->hasDirtyPalette()) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index dff332458a..7a9c7ba281 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -496,7 +496,7 @@ void GfxFrameout::showVideo() { if (videoDecoder->needsUpdate()) { const Graphics::Surface *frame = videoDecoder->decodeNextFrame(); if (frame) { - g_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, x, y, frame->w, frame->h); + g_system->copyRectToScreen(frame->pixels, frame->pitch, x, y, frame->w, frame->h); if (videoDecoder->hasDirtyPalette()) videoDecoder->setSystemPalette(); diff --git a/engines/sci/graphics/maciconbar.cpp b/engines/sci/graphics/maciconbar.cpp index 7ecba5a24d..dfb50b0edb 100644 --- a/engines/sci/graphics/maciconbar.cpp +++ b/engines/sci/graphics/maciconbar.cpp @@ -129,7 +129,7 @@ void GfxMacIconBar::drawIcon(uint16 iconIndex, bool selected) { void GfxMacIconBar::drawEnabledImage(Graphics::Surface *surface, const Common::Rect &rect) { if (surface) - g_system->copyRectToScreen((byte *)surface->pixels, surface->pitch, rect.left, rect.top, rect.width(), rect.height()); + g_system->copyRectToScreen(surface->pixels, surface->pitch, rect.left, rect.top, rect.width(), rect.height()); } void GfxMacIconBar::drawDisabledImage(Graphics::Surface *surface, const Common::Rect &rect) { @@ -153,7 +153,7 @@ void GfxMacIconBar::drawDisabledImage(Graphics::Surface *surface, const Common:: *((byte *)newSurf.getBasePtr(j, i)) = 0; } - g_system->copyRectToScreen((byte *)newSurf.pixels, newSurf.pitch, rect.left, rect.top, rect.width(), rect.height()); + g_system->copyRectToScreen(newSurf.pixels, newSurf.pitch, rect.left, rect.top, rect.width(), rect.height()); newSurf.free(); } -- cgit v1.2.3 From 64790aabc89ff128b7e3938d311a362619c4dd47 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:36:31 +0200 Subject: SCUMM: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/scumm/gfx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index 2cf4a429db..ffff329036 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -755,7 +755,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i memset(blackbuf, 0, 16 * 240); // Prepare a buffer 16px wide and 240px high, to fit on a lateral strip width = 240; // Fix right strip - _system->copyRectToScreen((const byte *)blackbuf, 16, 0, 0, 16, 240); // Fix left strip + _system->copyRectToScreen(blackbuf, 16, 0, 0, 16, 240); // Fix left strip } } @@ -763,7 +763,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i } // Finally blit the whole thing to the screen - _system->copyRectToScreen((const byte *)src, pitch, x, y, width, height); + _system->copyRectToScreen(src, pitch, x, y, width, height); } // CGA -- cgit v1.2.3 From d8aff72402a808082e1000851b0e11dbd5f57786 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:36:47 +0200 Subject: SWORD1: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/sword1/animation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index a70ca960ba..ddafd964eb 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -316,7 +316,7 @@ bool MoviePlayer::playVideo() { if (_decoderType == kVideoDecoderPSX) drawFramePSX(frame); else - _vm->_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, x, y, frame->w, frame->h); + _vm->_system->copyRectToScreen(frame->pixels, frame->pitch, x, y, frame->w, frame->h); } if (_decoder->hasDirtyPalette()) { @@ -501,7 +501,7 @@ void MoviePlayer::drawFramePSX(const Graphics::Surface *frame) { uint16 x = (g_system->getWidth() - scaledFrame.w) / 2; uint16 y = (g_system->getHeight() - scaledFrame.h) / 2; - _vm->_system->copyRectToScreen((byte *)scaledFrame.pixels, scaledFrame.pitch, x, y, scaledFrame.w, scaledFrame.h); + _vm->_system->copyRectToScreen(scaledFrame.pixels, scaledFrame.pitch, x, y, scaledFrame.w, scaledFrame.h); scaledFrame.free(); } -- cgit v1.2.3 From 5f65cf9679b7c01052bb4e7fe46a74a10f84665c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:37:02 +0200 Subject: SWORD25: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/sword25/fmv/movieplayer.cpp | 2 +- engines/sword25/gfx/graphicengine.cpp | 2 +- engines/sword25/gfx/image/renderedimage.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/sword25/fmv/movieplayer.cpp b/engines/sword25/fmv/movieplayer.cpp index 4609565223..9ee13b4b6d 100644 --- a/engines/sword25/fmv/movieplayer.cpp +++ b/engines/sword25/fmv/movieplayer.cpp @@ -132,7 +132,7 @@ void MoviePlayer::update() { const byte *frameData = (const byte *)s->getBasePtr(0, 0); _outputBitmap->setContent(frameData, s->pitch * s->h, 0, s->pitch); #else - g_system->copyRectToScreen((byte *)s->getBasePtr(0, 0), s->pitch, _outX, _outY, MIN(s->w, _backSurface->w), MIN(s->h, _backSurface->h)); + g_system->copyRectToScreen(s->getBasePtr(0, 0), s->pitch, _outX, _outY, MIN(s->w, _backSurface->w), MIN(s->h, _backSurface->h)); g_system->updateScreen(); #endif } diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp index 14ba032107..6f5da32bc4 100644 --- a/engines/sword25/gfx/graphicengine.cpp +++ b/engines/sword25/gfx/graphicengine.cpp @@ -216,7 +216,7 @@ bool GraphicEngine::fill(const Common::Rect *fillRectPtr, uint color) { } } - g_system->copyRectToScreen((byte *)_backSurface.getBasePtr(rect.left, rect.top), _backSurface.pitch, rect.left, rect.top, rect.width(), rect.height()); + g_system->copyRectToScreen(_backSurface.getBasePtr(rect.left, rect.top), _backSurface.pitch, rect.left, rect.top, rect.width(), rect.height()); } return true; diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp index b0d4853e5e..27ee4ef182 100644 --- a/engines/sword25/gfx/image/renderedimage.cpp +++ b/engines/sword25/gfx/image/renderedimage.cpp @@ -430,7 +430,7 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe ino += inoStep; } - g_system->copyRectToScreen((byte *)_backSurface->getBasePtr(posX, posY), _backSurface->pitch, posX, posY, + g_system->copyRectToScreen(_backSurface->getBasePtr(posX, posY), _backSurface->pitch, posX, posY, img->w, img->h); } -- cgit v1.2.3 From 808e41d807cd909d18dadc612bc77d14bae2a18e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:37:25 +0200 Subject: SWORD2: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/sword2/animation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index 90ee7375ab..5e3f8929e9 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -332,7 +332,7 @@ bool MoviePlayer::playVideo() { if (_decoderType == kVideoDecoderPSX) drawFramePSX(frame); else - _vm->_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, x, y, frame->w, frame->h); + _vm->_system->copyRectToScreen(frame->pixels, frame->pitch, x, y, frame->w, frame->h); } if (_decoder->hasDirtyPalette()) { @@ -401,7 +401,7 @@ void MoviePlayer::drawFramePSX(const Graphics::Surface *frame) { uint16 x = (g_system->getWidth() - scaledFrame.w) / 2; uint16 y = (g_system->getHeight() - scaledFrame.h) / 2; - _vm->_system->copyRectToScreen((byte *)scaledFrame.pixels, scaledFrame.pitch, x, y, scaledFrame.w, scaledFrame.h); + _vm->_system->copyRectToScreen(scaledFrame.pixels, scaledFrame.pitch, x, y, scaledFrame.w, scaledFrame.h); scaledFrame.free(); } -- cgit v1.2.3 From f3c66a191f528004ea063025513dcd3a7d2d5d04 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:37:41 +0200 Subject: TEENAGENT: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/teenagent/scene.cpp | 4 ++-- engines/teenagent/teenagent.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp index e8c2dec4fa..038c8ea05e 100644 --- a/engines/teenagent/scene.cpp +++ b/engines/teenagent/scene.cpp @@ -423,7 +423,7 @@ void Scene::init(int id, const Common::Point &pos) { if (now_playing != res->dseg.get_byte(0xDB90)) _engine->music->load(res->dseg.get_byte(0xDB90)); - _system->copyRectToScreen((const byte *)background.pixels, background.pitch, 0, 0, background.w, background.h); + _system->copyRectToScreen(background.pixels, background.pitch, 0, 0, background.w, background.h); setPalette(0); } @@ -654,7 +654,7 @@ bool Scene::render(bool tick_game, bool tick_mark, uint32 delta) { } if (background.pixels && debug_features.feature[DebugFeatures::kShowBack]) { - _system->copyRectToScreen((const byte *)background.pixels, background.pitch, 0, 0, background.w, background.h); + _system->copyRectToScreen(background.pixels, background.pitch, 0, 0, background.w, background.h); } else _system->fillScreen(0); diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp index fb228ef2fc..f06de6f803 100644 --- a/engines/teenagent/teenagent.cpp +++ b/engines/teenagent/teenagent.cpp @@ -389,7 +389,7 @@ bool TeenAgentEngine::showLogo() { return true; } - _system->copyRectToScreen((const byte *)s.pixels, s.w, s.x, s.y, s.w, s.h); + _system->copyRectToScreen(s.pixels, s.w, s.x, s.y, s.w, s.h); _system->updateScreen(); _system->delayMillis(100); -- cgit v1.2.3 From 72f1fb0bed17106fa4d3b437699bc1bc9db62192 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:37:55 +0200 Subject: TOLTECS: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/toltecs/menu.cpp | 6 +++--- engines/toltecs/render.cpp | 4 ++-- engines/toltecs/toltecs.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/toltecs/menu.cpp b/engines/toltecs/menu.cpp index 172ec0a565..415f19ca31 100644 --- a/engines/toltecs/menu.cpp +++ b/engines/toltecs/menu.cpp @@ -81,7 +81,7 @@ int MenuSystem::run() { // Restore original background memcpy(_vm->_screen->_frontScreen, backgroundOrig.getBasePtr(0,0), 640 * 400); - _vm->_system->copyRectToScreen((const byte *)_vm->_screen->_frontScreen, 640, 0, 0, 640, 400); + _vm->_system->copyRectToScreen(_vm->_screen->_frontScreen, 640, 0, 0, 640, 400); _vm->_system->updateScreen(); // Cleanup @@ -103,8 +103,8 @@ void MenuSystem::update() { handleEvents(); if (_needRedraw) { - //_vm->_system->copyRectToScreen((const byte *)_vm->_screen->_frontScreen + 39 * 640 + 60, 640, 60, 39, 520, 247); - _vm->_system->copyRectToScreen((const byte *)_vm->_screen->_frontScreen, 640, 0, 0, 640, 400); + //_vm->_system->copyRectToScreen(_vm->_screen->_frontScreen + 39 * 640 + 60, 640, 60, 39, 520, 247); + _vm->_system->copyRectToScreen(_vm->_screen->_frontScreen, 640, 0, 0, 640, 400); //debug("redraw"); _needRedraw = false; } diff --git a/engines/toltecs/render.cpp b/engines/toltecs/render.cpp index de5e77fb50..3f5356493e 100644 --- a/engines/toltecs/render.cpp +++ b/engines/toltecs/render.cpp @@ -193,7 +193,7 @@ void RenderQueue::update() { if (doFullRefresh) { clear(); - _vm->_system->copyRectToScreen((const byte *)_vm->_screen->_frontScreen, 640, 0, 0, 640, _vm->_cameraHeight); + _vm->_system->copyRectToScreen(_vm->_screen->_frontScreen, 640, 0, 0, 640, _vm->_cameraHeight); } else { updateDirtyRects(); } @@ -301,7 +301,7 @@ void RenderQueue::updateDirtyRects() { int n_rects = 0; Common::Rect *rects = _updateUta->getRectangles(&n_rects, 0, 0, 639, _vm->_cameraHeight - 1); for (int i = 0; i < n_rects; i++) { - _vm->_system->copyRectToScreen((const byte *)_vm->_screen->_frontScreen + rects[i].left + rects[i].top * 640, + _vm->_system->copyRectToScreen(_vm->_screen->_frontScreen + rects[i].left + rects[i].top * 640, 640, rects[i].left, rects[i].top, rects[i].width(), rects[i].height()); } delete[] rects; diff --git a/engines/toltecs/toltecs.cpp b/engines/toltecs/toltecs.cpp index d403e0499b..6d6c37dffd 100644 --- a/engines/toltecs/toltecs.cpp +++ b/engines/toltecs/toltecs.cpp @@ -300,7 +300,7 @@ void ToltecsEngine::drawScreen() { if (_screen->_guiRefresh && _guiHeight > 0 && _cameraHeight > 0) { // Update the GUI when needed and it's visible - _system->copyRectToScreen((const byte *)_screen->_frontScreen + _cameraHeight * 640, + _system->copyRectToScreen(_screen->_frontScreen + _cameraHeight * 640, 640, 0, _cameraHeight, 640, _guiHeight); _screen->_guiRefresh = false; } -- cgit v1.2.3 From 58bf8090cc760cd3c02724ae4479494d3b3a2cc1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:38:16 +0200 Subject: TOON: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/toon/movie.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/toon/movie.cpp b/engines/toon/movie.cpp index 59ad8484d5..8cdf92363f 100644 --- a/engines/toon/movie.cpp +++ b/engines/toon/movie.cpp @@ -116,17 +116,17 @@ bool Movie::playVideo(bool isFirstIntroVideo) { } _vm->getSystem()->unlockScreen(); } else { - _vm->getSystem()->copyRectToScreen((byte *)frame->pixels, frame->pitch, 0, 0, frame->w, frame->h); + _vm->getSystem()->copyRectToScreen(frame->pixels, frame->pitch, 0, 0, frame->w, frame->h); // WORKAROUND: There is an encoding glitch in the first intro video. This hides this using the adjacent pixels. if (isFirstIntroVideo) { int32 currentFrame = _decoder->getCurFrame(); if (currentFrame >= 956 && currentFrame <= 1038) { debugC(1, kDebugMovie, "Triggered workaround for glitch in first intro video..."); - _vm->getSystem()->copyRectToScreen((const byte *)frame->getBasePtr(frame->w-188, 123), frame->pitch, frame->w-188, 124, 188, 1); - _vm->getSystem()->copyRectToScreen((const byte *)frame->getBasePtr(frame->w-188, 126), frame->pitch, frame->w-188, 125, 188, 1); - _vm->getSystem()->copyRectToScreen((const byte *)frame->getBasePtr(0, 125), frame->pitch, 0, 126, 64, 1); - _vm->getSystem()->copyRectToScreen((const byte *)frame->getBasePtr(0, 128), frame->pitch, 0, 127, 64, 1); + _vm->getSystem()->copyRectToScreen(frame->getBasePtr(frame->w-188, 123), frame->pitch, frame->w-188, 124, 188, 1); + _vm->getSystem()->copyRectToScreen(frame->getBasePtr(frame->w-188, 126), frame->pitch, frame->w-188, 125, 188, 1); + _vm->getSystem()->copyRectToScreen(frame->getBasePtr(0, 125), frame->pitch, 0, 126, 64, 1); + _vm->getSystem()->copyRectToScreen(frame->getBasePtr(0, 128), frame->pitch, 0, 127, 64, 1); } } } -- cgit v1.2.3 From a24cb57c9d4d4292da582fafc52be70103a1e369 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 16 Jun 2012 02:58:53 +0200 Subject: GOB: Loop the Little Red title music --- engines/gob/inter.h | 1 + engines/gob/inter_littlered.cpp | 8 ++++++++ engines/gob/sound/sound.cpp | 4 ++++ engines/gob/sound/sound.h | 1 + engines/gob/sound/soundblaster.cpp | 24 +++++++++++++++++++++--- engines/gob/sound/soundblaster.h | 4 ++++ 6 files changed, 39 insertions(+), 3 deletions(-) diff --git a/engines/gob/inter.h b/engines/gob/inter.h index 0625646cdd..63bf3eb1c6 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -527,6 +527,7 @@ protected: virtual void setupOpcodesGob(); void oLittleRed_keyFunc(OpFuncParams ¶ms); + void oLittleRed_playComposition(OpFuncParams ¶ms); }; class Inter_v3 : public Inter_v2 { diff --git a/engines/gob/inter_littlered.cpp b/engines/gob/inter_littlered.cpp index 3a4494598e..729d9f5694 100644 --- a/engines/gob/inter_littlered.cpp +++ b/engines/gob/inter_littlered.cpp @@ -48,6 +48,8 @@ void Inter_LittleRed::setupOpcodesFunc() { Inter_v2::setupOpcodesFunc(); OPCODEFUNC(0x14, oLittleRed_keyFunc); + + OPCODEFUNC(0x3D, oLittleRed_playComposition); } void Inter_LittleRed::setupOpcodesGob() { @@ -107,4 +109,10 @@ void Inter_LittleRed::oLittleRed_keyFunc(OpFuncParams ¶ms) { } } +void Inter_LittleRed::oLittleRed_playComposition(OpFuncParams ¶ms) { + _vm->_sound->blasterRepeatComposition(-1); + + o1_playComposition(params); +} + } // End of namespace Gob diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 9f72d1a98f..170330f281 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -445,6 +445,10 @@ void Sound::blasterPlay(SoundDesc *sndDesc, int16 repCount, _blaster->playSample(*sndDesc, repCount, frequency, fadeLength); } +void Sound::blasterRepeatComposition(int32 repCount) { + _blaster->repeatComposition(repCount);; +} + void Sound::blasterStop(int16 fadeLength, SoundDesc *sndDesc) { if (!_blaster) return; diff --git a/engines/gob/sound/sound.h b/engines/gob/sound/sound.h index 064a249253..6ad0ec5483 100644 --- a/engines/gob/sound/sound.h +++ b/engines/gob/sound/sound.h @@ -63,6 +63,7 @@ public: void blasterPlayComposition(int16 *composition, int16 freqVal, SoundDesc *sndDescs = 0, int8 sndCount = kSoundsCount); void blasterStopComposition(); + void blasterRepeatComposition(int32 repCount); char blasterPlayingSound() const; diff --git a/engines/gob/sound/soundblaster.cpp b/engines/gob/sound/soundblaster.cpp index 4ff555b0e3..915d744494 100644 --- a/engines/gob/sound/soundblaster.cpp +++ b/engines/gob/sound/soundblaster.cpp @@ -31,6 +31,8 @@ SoundBlaster::SoundBlaster(Audio::Mixer &mixer) : SoundMixer(mixer, Audio::Mixer _compositionSamples = 0; _compositionSampleCount = 0; _compositionPos = -1; + + _compositionRepCount = 0; } SoundBlaster::~SoundBlaster() { @@ -79,6 +81,7 @@ void SoundBlaster::nextCompositionPos() { if (_compositionPos == 49) _compositionPos = -1; } + _compositionPos = -1; } @@ -98,6 +101,10 @@ void SoundBlaster::playComposition(int16 *composition, int16 freqVal, nextCompositionPos(); } +void SoundBlaster::repeatComposition(int32 repCount) { + _compositionRepCount = repCount; +} + void SoundBlaster::setSample(SoundDesc &sndDesc, int16 repCount, int16 frequency, int16 fadeLength) { @@ -106,10 +113,21 @@ void SoundBlaster::setSample(SoundDesc &sndDesc, int16 repCount, int16 frequency } void SoundBlaster::checkEndSample() { - if (_compositionPos != -1) + if (_compositionPos != -1) { + nextCompositionPos(); + return; + } + + if (_compositionRepCount != 0) { + if (_compositionRepCount > 0) + _compositionRepCount--; + nextCompositionPos(); - else - SoundMixer::checkEndSample(); + if (_compositionPos != -1) + return; + } + + SoundMixer::checkEndSample(); } void SoundBlaster::endFade() { diff --git a/engines/gob/sound/soundblaster.h b/engines/gob/sound/soundblaster.h index c2704c5482..c740ba2269 100644 --- a/engines/gob/sound/soundblaster.h +++ b/engines/gob/sound/soundblaster.h @@ -46,6 +46,8 @@ public: void stopComposition(); void endComposition(); + void repeatComposition(int32 repCount); + protected: Common::Mutex _mutex; @@ -54,6 +56,8 @@ protected: int16 _composition[50]; int8 _compositionPos; + int32 _compositionRepCount; + SoundDesc *_curSoundDesc; void setSample(SoundDesc &sndDesc, int16 repCount, -- cgit v1.2.3 From 08c0fa91059113e6ed054cf4a84317a6ff8b4d08 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 16 Jun 2012 03:04:35 +0200 Subject: GOB: Remove a superfluous semicolon --- engines/gob/sound/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 170330f281..184e14a2e6 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -446,7 +446,7 @@ void Sound::blasterPlay(SoundDesc *sndDesc, int16 repCount, } void Sound::blasterRepeatComposition(int32 repCount) { - _blaster->repeatComposition(repCount);; + _blaster->repeatComposition(repCount); } void Sound::blasterStop(int16 fadeLength, SoundDesc *sndDesc) { -- cgit v1.2.3 From d27d951d0b079a301ea1c6a3731bc1fc83234cff Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 03:10:43 +0200 Subject: BACKENDS: Make OSystem::setMouseCursor take a "const void *" buffer. This is mainly for consistency with OSystem::copyRectToScreen. --- backends/graphics/graphics.h | 2 +- backends/graphics/null/null-graphics.h | 2 +- backends/graphics/opengl/opengl-graphics.cpp | 2 +- backends/graphics/opengl/opengl-graphics.h | 2 +- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 2 +- backends/graphics/surfacesdl/surfacesdl-graphics.h | 2 +- backends/graphics/wincesdl/wincesdl-graphics.cpp | 2 +- backends/graphics/wincesdl/wincesdl-graphics.h | 2 +- backends/modular-backend.cpp | 2 +- backends/modular-backend.h | 2 +- backends/platform/android/android.h | 2 +- backends/platform/android/gfx.cpp | 4 ++-- backends/platform/dc/dc.h | 2 +- backends/platform/dc/display.cpp | 2 +- backends/platform/ds/arm9/source/osystem_ds.cpp | 2 +- backends/platform/ds/arm9/source/osystem_ds.h | 2 +- backends/platform/iphone/osys_main.h | 2 +- backends/platform/iphone/osys_video.mm | 2 +- backends/platform/n64/osys_n64.h | 2 +- backends/platform/n64/osys_n64_base.cpp | 2 +- backends/platform/ps2/systemps2.cpp | 4 ++-- backends/platform/ps2/systemps2.h | 2 +- backends/platform/psp/osys_psp.cpp | 4 ++-- backends/platform/psp/osys_psp.h | 2 +- backends/platform/wii/osystem.h | 2 +- backends/platform/wii/osystem_gfx.cpp | 12 ++++++------ common/system.h | 2 +- 27 files changed, 35 insertions(+), 35 deletions(-) diff --git a/backends/graphics/graphics.h b/backends/graphics/graphics.h index 056e894a46..9fde5cfaf2 100644 --- a/backends/graphics/graphics.h +++ b/backends/graphics/graphics.h @@ -80,7 +80,7 @@ public: virtual bool showMouse(bool visible) = 0; virtual void warpMouse(int x, int y) = 0; - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) = 0; + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) = 0; virtual void setCursorPalette(const byte *colors, uint start, uint num) = 0; virtual void displayMessageOnOSD(const char *msg) {} diff --git a/backends/graphics/null/null-graphics.h b/backends/graphics/null/null-graphics.h index 6ffe2e8286..30b1946a77 100644 --- a/backends/graphics/null/null-graphics.h +++ b/backends/graphics/null/null-graphics.h @@ -78,7 +78,7 @@ public: bool showMouse(bool visible) { return !visible; } void warpMouse(int x, int y) {} - void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) {} + void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) {} void setCursorPalette(const byte *colors, uint start, uint num) {} }; diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 033814a4b5..ed63916551 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -591,7 +591,7 @@ void OpenGLGraphicsManager::warpMouse(int x, int y) { setInternalMousePosition(scaledX, scaledY); } -void OpenGLGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void OpenGLGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { #ifdef USE_RGB_COLOR if (format) _cursorFormat = *format; diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h index 350ffa5f34..b2f78187dc 100644 --- a/backends/graphics/opengl/opengl-graphics.h +++ b/backends/graphics/opengl/opengl-graphics.h @@ -104,7 +104,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); virtual void setCursorPalette(const byte *colors, uint start, uint num); virtual void displayMessageOnOSD(const char *msg); diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 9244135262..cdbe6293e4 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -1715,7 +1715,7 @@ void SurfaceSdlGraphicsManager::warpMouse(int x, int y) { } } -void SurfaceSdlGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void SurfaceSdlGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { #ifdef USE_RGB_COLOR if (!format) _cursorFormat = Graphics::PixelFormat::createFormatCLUT8(); diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h index f2b2d7b239..f387c213fb 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.h +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h @@ -131,7 +131,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); virtual void setCursorPalette(const byte *colors, uint start, uint num); #ifdef USE_OSD diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp index 2315c582e2..13d52bcd25 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.cpp +++ b/backends/graphics/wincesdl/wincesdl-graphics.cpp @@ -1129,7 +1129,7 @@ void WINCESdlGraphicsManager::copyRectToScreen(const void *buf, int pitch, int x SDL_UnlockSurface(_screen); } -void WINCESdlGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void WINCESdlGraphicsManager::setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { undrawMouse(); if (w == 0 || h == 0) diff --git a/backends/graphics/wincesdl/wincesdl-graphics.h b/backends/graphics/wincesdl/wincesdl-graphics.h index 26067f0c02..33bf7e7880 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.h +++ b/backends/graphics/wincesdl/wincesdl-graphics.h @@ -73,7 +73,7 @@ public: void internDrawMouse(); void undrawMouse(); bool showMouse(bool visible); - void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // overloaded by CE backend + void setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // overloaded by CE backend void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); // overloaded by CE backend (FIXME) Graphics::Surface *lockScreen(); diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp index 2b4087634d..3c26d5afee 100644 --- a/backends/modular-backend.cpp +++ b/backends/modular-backend.cpp @@ -195,7 +195,7 @@ void ModularBackend::warpMouse(int x, int y) { _graphicsManager->warpMouse(x, y); } -void ModularBackend::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void ModularBackend::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { _graphicsManager->setMouseCursor(buf, w, h, hotspotX, hotspotY, keycolor, dontScale, format); } diff --git a/backends/modular-backend.h b/backends/modular-backend.h index fd4aca2e4d..400102428b 100644 --- a/backends/modular-backend.h +++ b/backends/modular-backend.h @@ -100,7 +100,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); virtual void setCursorPalette(const byte *colors, uint start, uint num); //@} diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h index bf66270a7a..ce51baec3d 100644 --- a/backends/platform/android/android.h +++ b/backends/platform/android/android.h @@ -267,7 +267,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index a40a9e2ee9..1241667533 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -685,7 +685,7 @@ bool OSystem_Android::showMouse(bool visible) { return true; } -void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h, +void OSystem_Android::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { @@ -741,7 +741,7 @@ void OSystem_Android::setMouseCursor(const byte *buf, uint w, uint h, byte *tmp = new byte[pitch * h]; // meh, a 16bit cursor without alpha bits... this is so silly - if (!crossBlit(tmp, buf, pitch, w * 2, w, h, + if (!crossBlit(tmp, (const byte *)buf, pitch, w * 2, w, h, _mouse_texture->getPixelFormat(), *format)) { LOGE("crossblit failed"); diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index 95cb88c44b..aa2a3709cb 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -142,7 +142,7 @@ public: void warpMouse(int x, int y); // Set the bitmap that's used when drawing the cursor. - void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); + void setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // Replace the specified range of cursor the palette with new colors. void setCursorPalette(const byte *colors, uint start, uint num); diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp index 264b86646c..35e7b70a82 100644 --- a/backends/platform/dc/display.cpp +++ b/backends/platform/dc/display.cpp @@ -292,7 +292,7 @@ void OSystem_Dreamcast::warpMouse(int x, int y) _ms_cur_y = y; } -void OSystem_Dreamcast::setMouseCursor(const byte *buf, uint w, uint h, +void OSystem_Dreamcast::setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index f91342a6ce..b4bf38c45b 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -580,7 +580,7 @@ bool OSystem_DS::showMouse(bool visible) { void OSystem_DS::warpMouse(int x, int y) { } -void OSystem_DS::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void OSystem_DS::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { if ((w > 0) && (w < 64) && (h > 0) && (h < 64)) { memcpy(_cursorImage, buf, w * h); _cursorW = w; diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index 789053e522..d35b16c8fd 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -114,7 +114,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format); + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, u32 keycolor, bool dontScale, const Graphics::PixelFormat *format); virtual bool pollEvent(Common::Event &event); virtual uint32 getMillis(); diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h index da3864e0df..b15b5e0375 100644 --- a/backends/platform/iphone/osys_main.h +++ b/backends/platform/iphone/osys_main.h @@ -161,7 +161,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 255, bool dontScale = false, const Graphics::PixelFormat *format = NULL); + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor = 255, bool dontScale = false, const Graphics::PixelFormat *format = NULL); virtual void setCursorPalette(const byte *colors, uint start, uint num); virtual bool pollEvent(Common::Event &event); diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm index 387d91ff57..1649956a6c 100644 --- a/backends/platform/iphone/osys_video.mm +++ b/backends/platform/iphone/osys_video.mm @@ -399,7 +399,7 @@ void OSystem_IPHONE::dirtyFullOverlayScreen() { } } -void OSystem_IPHONE::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void OSystem_IPHONE::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { //printf("setMouseCursor(%p, %u, %u, %i, %i, %u, %d, %p)\n", (const void *)buf, w, h, hotspotX, hotspotY, keycolor, dontScale, (const void *)format); const Graphics::PixelFormat pixelFormat = format ? *format : Graphics::PixelFormat::createFormatCLUT8(); diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h index 8e28dc9c98..121f84f93f 100644 --- a/backends/platform/n64/osys_n64.h +++ b/backends/platform/n64/osys_n64.h @@ -182,7 +182,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); virtual void setCursorPalette(const byte *colors, uint start, uint num); virtual bool pollEvent(Common::Event &event); diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp index d8956404f5..b526c68762 100644 --- a/backends/platform/n64/osys_n64_base.cpp +++ b/backends/platform/n64/osys_n64_base.cpp @@ -774,7 +774,7 @@ void OSystem_N64::warpMouse(int x, int y) { _dirtyOffscreen = true; } -void OSystem_N64::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void OSystem_N64::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { if (!w || !h) return; _mouseHotspotX = hotspotX; diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp index 9413c55062..a639725d78 100644 --- a/backends/platform/ps2/systemps2.cpp +++ b/backends/platform/ps2/systemps2.cpp @@ -618,8 +618,8 @@ void OSystem_PS2::warpMouse(int x, int y) { _screen->setMouseXy(x, y); } -void OSystem_PS2::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { - _screen->setMouseOverlay(buf, w, h, hotspot_x, hotspot_y, keycolor); +void OSystem_PS2::setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { + _screen->setMouseOverlay((const byte *)buf, w, h, hotspot_x, hotspot_y, keycolor); } void OSystem_PS2::showOverlay(void) { diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h index d167988334..efbe7d5f93 100644 --- a/backends/platform/ps2/systemps2.h +++ b/backends/platform/ps2/systemps2.h @@ -80,7 +80,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = 0); + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = 0); virtual uint32 getMillis(); virtual void delayMillis(uint msecs); diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 46e11b1bf7..3fe9a7f9c7 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -303,7 +303,7 @@ void OSystem_PSP::warpMouse(int x, int y) { _cursor.setXY(x, y); } -void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void OSystem_PSP::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { DEBUG_ENTER_FUNC(); _displayManager.waitUntilRenderFinished(); _pendingUpdate = false; @@ -320,7 +320,7 @@ void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, _cursor.setSizeAndScummvmPixelFormat(w, h, format); _cursor.setHotspot(hotspotX, hotspotY); _cursor.clearKeyColor(); - _cursor.copyFromArray(buf); + _cursor.copyFromArray((const byte *)buf); } bool OSystem_PSP::pollEvent(Common::Event &event) { diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h index af01b6f6c8..d167c757ae 100644 --- a/backends/platform/psp/osys_psp.h +++ b/backends/platform/psp/osys_psp.h @@ -118,7 +118,7 @@ public: // Mouse related bool showMouse(bool visible); void warpMouse(int x, int y); - void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); + void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // Events and input bool pollEvent(Common::Event &event); diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index 75c19e6f1b..ecd69178bb 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -187,7 +187,7 @@ public: virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index c2b6553bac..741acd4f4a 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -643,7 +643,7 @@ void OSystem_Wii::warpMouse(int x, int y) { _mouseY = y; } -void OSystem_Wii::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, +void OSystem_Wii::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { @@ -686,7 +686,7 @@ void OSystem_Wii::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, tmpBuf = true; if (!tmpBuf) { - gfx_tex_convert(&_texMouse, buf); + gfx_tex_convert(&_texMouse, (const byte *)buf); } else { u8 bpp = _texMouse.bpp >> 3; byte *tmp = (byte *) malloc(tw * th * bpp); @@ -703,7 +703,7 @@ void OSystem_Wii::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, #ifdef USE_RGB_COLOR if (bpp > 1) { - if (!Graphics::crossBlit(tmp, buf, + if (!Graphics::crossBlit(tmp, (const byte *)buf, tw * _pfRGB3444.bytesPerPixel, w * _pfCursor.bytesPerPixel, tw, th, _pfRGB3444, _pfCursor)) { @@ -727,10 +727,10 @@ void OSystem_Wii::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, } else { #endif byte *dst = tmp; - + const byte *src = (const byte *)buf; do { - memcpy(dst, buf, w * bpp); - buf += w * bpp; + memcpy(dst, src, w * bpp); + src += w * bpp; dst += tw * bpp; } while (--h); #ifdef USE_RGB_COLOR diff --git a/common/system.h b/common/system.h index f35c09c427..a6753eac49 100644 --- a/common/system.h +++ b/common/system.h @@ -874,7 +874,7 @@ public: * would be too small to notice otherwise, these are allowed to scale the cursor anyway. * @param format pointer to the pixel format which cursor graphic uses (0 means CLUT8) */ - virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) = 0; + virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) = 0; /** * Replace the specified range of cursor the palette with new colors. -- cgit v1.2.3 From e1e1f01b873f0d8ed09abcda37789deb09ba83c5 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 03:14:07 +0200 Subject: GRAPHICS: Let CursorMan's cursor functions take "const void *" buffers. --- graphics/cursorman.cpp | 6 +++--- graphics/cursorman.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp index 825b5c2e19..c818101645 100644 --- a/graphics/cursorman.cpp +++ b/graphics/cursorman.cpp @@ -55,7 +55,7 @@ bool CursorManager::showMouse(bool visible) { return g_system->showMouse(visible); } -void CursorManager::pushCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void CursorManager::pushCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { Cursor *cur = new Cursor(buf, w, h, hotspotX, hotspotY, keycolor, dontScale, format); cur->_visible = isVisible(); @@ -98,7 +98,7 @@ void CursorManager::popAllCursors() { g_system->showMouse(isVisible()); } -void CursorManager::replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +void CursorManager::replaceCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { if (_cursorStack.empty()) { pushCursor(buf, w, h, hotspotX, hotspotY, keycolor, dontScale, format); @@ -225,7 +225,7 @@ void CursorManager::replaceCursorPalette(const byte *colors, uint start, uint nu } } -CursorManager::Cursor::Cursor(const byte *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { +CursorManager::Cursor::Cursor(const void *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) { #ifdef USE_RGB_COLOR if (!format) _format = Graphics::PixelFormat::createFormatCLUT8(); diff --git a/graphics/cursorman.h b/graphics/cursorman.h index 852109d7e6..66e8d1ba56 100644 --- a/graphics/cursorman.h +++ b/graphics/cursorman.h @@ -71,7 +71,7 @@ public: * useful to push a "dummy" cursor and modify it later. The * cursor will be added to the stack, but not to the backend. */ - void pushCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); + void pushCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); /** * Pop a cursor from the stack, and restore the previous one to the @@ -96,7 +96,7 @@ public: * @param format a pointer to the pixel format which the cursor graphic uses, * CLUT8 will be used if this is NULL or not specified. */ - void replaceCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); + void replaceCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); /** * Pop all of the cursors and cursor palettes from their respective stacks. @@ -181,7 +181,7 @@ private: uint _size; - Cursor(const byte *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); + Cursor(const void *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL); ~Cursor(); }; -- cgit v1.2.3 From 0268f21980491b3fc0c50dab371193d69aae43e4 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 03:17:51 +0200 Subject: DRASCULA: Get rid of casts on CursorManager::replaceCursor calls. --- engines/drascula/interface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp index c08bcea01f..4b8db63bb7 100644 --- a/engines/drascula/interface.cpp +++ b/engines/drascula/interface.cpp @@ -28,10 +28,10 @@ namespace Drascula { void DrasculaEngine::setCursor(int cursor) { switch (cursor) { case kCursorCrosshair: - CursorMan.replaceCursor((const byte *)crosshairCursor, 40, 25, 20, 17, 255); + CursorMan.replaceCursor(crosshairCursor, 40, 25, 20, 17, 255); break; case kCursorCurrentItem: - CursorMan.replaceCursor((const byte *)mouseCursor, OBJWIDTH, OBJHEIGHT, 20, 17, 255); + CursorMan.replaceCursor(mouseCursor, OBJWIDTH, OBJHEIGHT, 20, 17, 255); default: break; } -- cgit v1.2.3 From 1cda4f903b320a1dff9577641b7171e2abaa82c7 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 03:18:40 +0200 Subject: LASTEXPRESS: Get rid of casts on CursorManager::replaceCursor calls. --- engines/lastexpress/data/cursor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/lastexpress/data/cursor.cpp b/engines/lastexpress/data/cursor.cpp index a3e7b773a7..205c46f667 100644 --- a/engines/lastexpress/data/cursor.cpp +++ b/engines/lastexpress/data/cursor.cpp @@ -91,7 +91,7 @@ void Cursor::setStyle(CursorStyle style) { // Reuse the screen pixel format Graphics::PixelFormat pf = g_system->getScreenFormat(); - CursorMan.replaceCursor((const byte *)getCursorImage(style), + CursorMan.replaceCursor(getCursorImage(style), 32, 32, _cursors[style].hotspotX, _cursors[style].hotspotY, 0, false, &pf); } -- cgit v1.2.3 From 57e0381b62790b894bb0f10f01531c629147d645 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 03:18:55 +0200 Subject: MADE: Get rid of casts on CursorManager::replaceCursor calls. --- engines/made/scriptfuncs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index de7b5b70f9..c57778fb71 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -574,7 +574,7 @@ int16 ScriptFunctions::sfLoadMouseCursor(int16 argc, int16 *argv) { PictureResource *flex = _vm->_res->getPicture(argv[2]); if (flex) { Graphics::Surface *surf = flex->getPicture(); - CursorMan.replaceCursor((const byte *)surf->pixels, surf->w, surf->h, argv[1], argv[0], 0); + CursorMan.replaceCursor(surf->pixels, surf->w, surf->h, argv[1], argv[0], 0); _vm->_res->freeResource(flex); } return 0; -- cgit v1.2.3 From 60a6ce70c1e792f14169641a50a9a43c8b65eb10 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 03:19:16 +0200 Subject: MOHAWK: Get rid of casts on CursorManager::replaceCursor calls. --- engines/mohawk/cursors.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp index 47a7d0225b..e73d4ed6a3 100644 --- a/engines/mohawk/cursors.cpp +++ b/engines/mohawk/cursors.cpp @@ -121,11 +121,11 @@ void MystCursorManager::setCursor(uint16 id) { // Myst ME stores some cursors as 24bpp images instead of 8bpp if (surface->format.bytesPerPixel == 1) { - CursorMan.replaceCursor((byte *)surface->pixels, surface->w, surface->h, hotspotX, hotspotY, 0); + CursorMan.replaceCursor(surface->pixels, surface->w, surface->h, hotspotX, hotspotY, 0); CursorMan.replaceCursorPalette(mhkSurface->getPalette(), 0, 256); } else { Graphics::PixelFormat pixelFormat = g_system->getScreenFormat(); - CursorMan.replaceCursor((byte *)surface->pixels, surface->w, surface->h, hotspotX, hotspotY, pixelFormat.RGBToColor(255, 255, 255), false, &pixelFormat); + CursorMan.replaceCursor(surface->pixels, surface->w, surface->h, hotspotX, hotspotY, pixelFormat.RGBToColor(255, 255, 255), false, &pixelFormat); } _vm->_needsUpdate = true; -- cgit v1.2.3 From 7b646e5c62c37b5a593994d1e27a79c62fecd501 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 03:19:34 +0200 Subject: SCI: Get rid of casts on CursorManager::replaceCursor calls. --- engines/sci/graphics/cursor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp index 14ffa69f91..ce77cf6ed3 100644 --- a/engines/sci/graphics/cursor.cpp +++ b/engines/sci/graphics/cursor.cpp @@ -411,7 +411,7 @@ void GfxCursor::refreshPosition() { } } - CursorMan.replaceCursor((const byte *)_cursorSurface, cursorCelInfo->width, cursorCelInfo->height, cursorHotspot.x, cursorHotspot.y, cursorCelInfo->clearKey); + CursorMan.replaceCursor(_cursorSurface, cursorCelInfo->width, cursorCelInfo->height, cursorHotspot.x, cursorHotspot.y, cursorCelInfo->clearKey); } } -- cgit v1.2.3 From 99229fc7ab3a15da8b964443cb58bc00caa5f0a4 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 03:19:51 +0200 Subject: TOLTECS: Get rid of casts on CursorManager::replaceCursor calls. --- engines/toltecs/screen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/toltecs/screen.cpp b/engines/toltecs/screen.cpp index b781490b69..634917a7b1 100644 --- a/engines/toltecs/screen.cpp +++ b/engines/toltecs/screen.cpp @@ -114,7 +114,7 @@ void Screen::loadMouseCursor(uint resIndex) { } } // FIXME: Where's the cursor hotspot? Using 8, 8 seems good enough for now. - CursorMan.replaceCursor((const byte*)mouseCursor, 16, 16, 8, 8, 0); + CursorMan.replaceCursor(mouseCursor, 16, 16, 8, 8, 0); } void Screen::drawGuiImage(int16 x, int16 y, uint resIndex) { -- cgit v1.2.3 From 282b5564dadef2eea814d56e8bf7cbbbe59cf84c Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 16 Jun 2012 04:05:58 +0200 Subject: NEWS: Mention Little Red support --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index 4db976b0d8..74112fa7cd 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ For a more comprehensive changelog of the latest experimental code, see: - Added support for Dreamweb. - Added support for Geisha. - Added support for Gregory and the Hot Air Balloon. + - Added support for Once Upon A Time: Little Red Riding Hood - Added support for Magic Tales: Baba Yaga and the Magic Geese. - Added support for Magic Tales: Imo and the King. - Added support for Magic Tales: Liam Finds a Story. -- cgit v1.2.3 From d860f0f9bf823655844c5fc56a5ac8f94774aa23 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 16 Jun 2012 04:06:08 +0200 Subject: README: Add Little Red to the gob games list --- README | 1 + 1 file changed, 1 insertion(+) diff --git a/README b/README index 1024c6764b..722f3298d3 100644 --- a/README +++ b/README @@ -243,6 +243,7 @@ GOB Games by Coktel Vision: Gobliins 2 [gob2] Goblins 3 [gob3] Lost in Time [lostintime] + Once Upon A Time: Little Red Riding Hood [littlered] The Bizarre Adventures of Woodruff and the Schnibble [woodruff] Urban Runner [urban] -- cgit v1.2.3 From ba07c7678a3c1f03636f408c51bae121f0280c00 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 16 Jun 2012 04:06:21 +0200 Subject: GOB: Add Little Red to the gob games list comment --- engines/gob/gob.h | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 19489e4924..808c941546 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -54,6 +54,7 @@ class StaticTextWidget; * - Urban Runner * - Bambou le sauveur de la jungle * - Geisha + * - Once Upon A Time: Little Red Riding Hood */ namespace Gob { -- cgit v1.2.3 From aec9b9e22a9bff54ae3c39bb796bae0f4b4c2d95 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 04:17:14 +0200 Subject: ALL: Let overlay related methods in OSystem take a void * and use a proper pitch values. This is a first step to get rid of OverlayColor, which is a requirement for proper 4Bpp overlay support. --- backends/graphics/graphics.h | 4 ++-- backends/graphics/null/null-graphics.h | 4 ++-- backends/graphics/opengl/opengl-graphics.cpp | 19 ++++++++++--------- backends/graphics/opengl/opengl-graphics.h | 4 ++-- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 20 ++++++++++++-------- backends/graphics/surfacesdl/surfacesdl-graphics.h | 4 ++-- backends/graphics/wincesdl/wincesdl-graphics.cpp | 12 +++++++----- backends/graphics/wincesdl/wincesdl-graphics.h | 2 +- backends/modular-backend.cpp | 4 ++-- backends/modular-backend.h | 4 ++-- backends/platform/android/android.h | 4 ++-- backends/platform/android/gfx.cpp | 13 ++++++------- backends/platform/dc/dc.h | 4 ++-- backends/platform/dc/display.cpp | 14 ++++++++------ backends/platform/ds/arm9/source/osystem_ds.cpp | 12 ++++++------ backends/platform/ds/arm9/source/osystem_ds.h | 4 ++-- backends/platform/iphone/osys_main.h | 4 ++-- backends/platform/iphone/osys_video.mm | 18 ++++++++++-------- backends/platform/n64/osys_n64.h | 4 ++-- backends/platform/n64/osys_n64_base.cpp | 20 +++++++++++--------- backends/platform/ps2/Gs2dScreen.cpp | 4 ++-- backends/platform/ps2/Gs2dScreen.h | 4 ++-- backends/platform/ps2/systemps2.cpp | 8 ++++---- backends/platform/ps2/systemps2.h | 4 ++-- backends/platform/psp/default_display_client.cpp | 8 ++++---- backends/platform/psp/default_display_client.h | 4 ++-- backends/platform/psp/osys_psp.cpp | 4 ++-- backends/platform/psp/osys_psp.h | 4 ++-- backends/platform/wii/osystem.h | 4 ++-- backends/platform/wii/osystem_gfx.cpp | 20 +++++++++++--------- backends/vkeybd/virtual-keyboard-gui.cpp | 8 ++++---- common/system.h | 12 +++--------- engines/testbed/graphics.cpp | 2 +- graphics/VectorRendererSpec.cpp | 4 ++-- gui/ThemeEngine.cpp | 2 +- 35 files changed, 137 insertions(+), 129 deletions(-) diff --git a/backends/graphics/graphics.h b/backends/graphics/graphics.h index 9fde5cfaf2..24397228e6 100644 --- a/backends/graphics/graphics.h +++ b/backends/graphics/graphics.h @@ -73,8 +73,8 @@ public: virtual void hideOverlay() = 0; virtual Graphics::PixelFormat getOverlayFormat() const = 0; virtual void clearOverlay() = 0; - virtual void grabOverlay(OverlayColor *buf, int pitch) = 0; - virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h)= 0; + virtual void grabOverlay(void *buf, int pitch) = 0; + virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h)= 0; virtual int16 getOverlayHeight() = 0; virtual int16 getOverlayWidth() = 0; diff --git a/backends/graphics/null/null-graphics.h b/backends/graphics/null/null-graphics.h index 30b1946a77..276be7d3fa 100644 --- a/backends/graphics/null/null-graphics.h +++ b/backends/graphics/null/null-graphics.h @@ -71,8 +71,8 @@ public: void hideOverlay() {} Graphics::PixelFormat getOverlayFormat() const { return Graphics::PixelFormat(); } void clearOverlay() {} - void grabOverlay(OverlayColor *buf, int pitch) {} - void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {} + void grabOverlay(void *buf, int pitch) {} + void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) {} int16 getOverlayHeight() { return 0; } int16 getOverlayWidth() { return 0; } diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index ed63916551..dce902d894 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -467,33 +467,35 @@ void OpenGLGraphicsManager::clearOverlay() { _overlayNeedsRedraw = true; } -void OpenGLGraphicsManager::grabOverlay(OverlayColor *buf, int pitch) { - assert(_overlayData.format.bytesPerPixel == sizeof(buf[0])); +void OpenGLGraphicsManager::grabOverlay(void *buf, int pitch) { const byte *src = (byte *)_overlayData.pixels; + byte *dst = (byte *)buf; for (int i = 0; i < _overlayData.h; i++) { // Copy overlay data to buffer - memcpy(buf, src, _overlayData.pitch); - buf += pitch; + memcpy(dst, src, _overlayData.pitch); + dst += pitch; src += _overlayData.pitch; } } -void OpenGLGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { +void OpenGLGraphicsManager::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { assert(_transactionMode == kTransactionNone); if (_overlayTexture == NULL) return; + const byte *src = (const byte *)buf; + // Clip the coordinates if (x < 0) { w += x; - buf -= x; + src -= x * 2; x = 0; } if (y < 0) { h += y; - buf -= y * pitch; + src -= y * pitch; y = 0; } @@ -507,11 +509,10 @@ void OpenGLGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pitch return; // Copy buffer data to internal overlay surface - const byte *src = (const byte *)buf; byte *dst = (byte *)_overlayData.pixels + y * _overlayData.pitch; for (int i = 0; i < h; i++) { memcpy(dst + x * _overlayData.format.bytesPerPixel, src, w * _overlayData.format.bytesPerPixel); - src += pitch * sizeof(buf[0]); + src += pitch; dst += _overlayData.pitch; } diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h index b2f78187dc..9d8d418d11 100644 --- a/backends/graphics/opengl/opengl-graphics.h +++ b/backends/graphics/opengl/opengl-graphics.h @@ -97,8 +97,8 @@ public: virtual void hideOverlay(); virtual Graphics::PixelFormat getOverlayFormat() const; virtual void clearOverlay(); - virtual void grabOverlay(OverlayColor *buf, int pitch); - virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); + virtual void grabOverlay(void *buf, int pitch); + virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h); virtual int16 getOverlayHeight(); virtual int16 getOverlayWidth(); diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index cdbe6293e4..fb964d6951 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -1597,7 +1597,7 @@ void SurfaceSdlGraphicsManager::clearOverlay() { _forceFull = true; } -void SurfaceSdlGraphicsManager::grabOverlay(OverlayColor *buf, int pitch) { +void SurfaceSdlGraphicsManager::grabOverlay(void *buf, int pitch) { assert(_transactionMode == kTransactionNone); if (_overlayscreen == NULL) @@ -1607,31 +1607,35 @@ void SurfaceSdlGraphicsManager::grabOverlay(OverlayColor *buf, int pitch) { error("SDL_LockSurface failed: %s", SDL_GetError()); byte *src = (byte *)_overlayscreen->pixels; + byte *dst = (byte *)buf; int h = _videoMode.overlayHeight; do { - memcpy(buf, src, _videoMode.overlayWidth * 2); + memcpy(dst, src, _videoMode.overlayWidth * 2); src += _overlayscreen->pitch; - buf += pitch; + dst += pitch; } while (--h); SDL_UnlockSurface(_overlayscreen); } -void SurfaceSdlGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { +void SurfaceSdlGraphicsManager::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { assert(_transactionMode == kTransactionNone); if (_overlayscreen == NULL) return; + const byte *src = (const byte *)buf; + // Clip the coordinates if (x < 0) { w += x; - buf -= x; + src -= x * 2; x = 0; } if (y < 0) { - h += y; buf -= y * pitch; + h += y; + src -= y * pitch; y = 0; } @@ -1654,9 +1658,9 @@ void SurfaceSdlGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int p byte *dst = (byte *)_overlayscreen->pixels + y * _overlayscreen->pitch + x * 2; do { - memcpy(dst, buf, w * 2); + memcpy(dst, src, w * 2); dst += _overlayscreen->pitch; - buf += pitch; + src += pitch; } while (--h); SDL_UnlockSurface(_overlayscreen); diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h index f387c213fb..21444cc25d 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.h +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h @@ -124,8 +124,8 @@ public: virtual void hideOverlay(); virtual Graphics::PixelFormat getOverlayFormat() const { return _overlayFormat; } virtual void clearOverlay(); - virtual void grabOverlay(OverlayColor *buf, int pitch); - virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); + virtual void grabOverlay(void *buf, int pitch); + virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h); virtual int16 getOverlayHeight() { return _videoMode.overlayHeight; } virtual int16 getOverlayWidth() { return _videoMode.overlayWidth; } diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp index 13d52bcd25..f075f8cf8a 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.cpp +++ b/backends/graphics/wincesdl/wincesdl-graphics.cpp @@ -1023,22 +1023,24 @@ bool WINCESdlGraphicsManager::saveScreenshot(const char *filename) { return true; } -void WINCESdlGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { +void WINCESdlGraphicsManager::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { assert(_transactionMode == kTransactionNone); if (_overlayscreen == NULL) return; + const byte *src = (const byte *)buf; + // Clip the coordinates if (x < 0) { w += x; - buf -= x; + src -= x * 2; x = 0; } if (y < 0) { h += y; - buf -= y * pitch; + src -= y * pitch; y = 0; } @@ -1063,9 +1065,9 @@ void WINCESdlGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pit byte *dst = (byte *)_overlayscreen->pixels + y * _overlayscreen->pitch + x * 2; do { - memcpy(dst, buf, w * 2); + memcpy(dst, src, w * 2); dst += _overlayscreen->pitch; - buf += pitch; + src += pitch; } while (--h); SDL_UnlockSurface(_overlayscreen); diff --git a/backends/graphics/wincesdl/wincesdl-graphics.h b/backends/graphics/wincesdl/wincesdl-graphics.h index 33bf7e7880..2897ca5f40 100644 --- a/backends/graphics/wincesdl/wincesdl-graphics.h +++ b/backends/graphics/wincesdl/wincesdl-graphics.h @@ -74,7 +74,7 @@ public: void undrawMouse(); bool showMouse(bool visible); void setMouseCursor(const void *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format); // overloaded by CE backend - void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); + void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h); void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h); // overloaded by CE backend (FIXME) Graphics::Surface *lockScreen(); void unlockScreen(); diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp index 3c26d5afee..b46f33a2bc 100644 --- a/backends/modular-backend.cpp +++ b/backends/modular-backend.cpp @@ -171,11 +171,11 @@ void ModularBackend::clearOverlay() { _graphicsManager->clearOverlay(); } -void ModularBackend::grabOverlay(OverlayColor *buf, int pitch) { +void ModularBackend::grabOverlay(void *buf, int pitch) { _graphicsManager->grabOverlay(buf, pitch); } -void ModularBackend::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { +void ModularBackend::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { _graphicsManager->copyRectToOverlay(buf, pitch, x, y, w, h); } diff --git a/backends/modular-backend.h b/backends/modular-backend.h index 400102428b..b43769c716 100644 --- a/backends/modular-backend.h +++ b/backends/modular-backend.h @@ -93,8 +93,8 @@ public: virtual void hideOverlay(); virtual Graphics::PixelFormat getOverlayFormat() const; virtual void clearOverlay(); - virtual void grabOverlay(OverlayColor *buf, int pitch); - virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); + virtual void grabOverlay(void *buf, int pitch); + virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h); virtual int16 getOverlayHeight(); virtual int16 getOverlayWidth(); diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h index ce51baec3d..4b13ca4b0f 100644 --- a/backends/platform/android/android.h +++ b/backends/platform/android/android.h @@ -257,8 +257,8 @@ public: virtual void showOverlay(); virtual void hideOverlay(); virtual void clearOverlay(); - virtual void grabOverlay(OverlayColor *buf, int pitch); - virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, + virtual void grabOverlay(void *buf, int pitch); + virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h); virtual int16 getOverlayHeight(); virtual int16 getOverlayWidth(); diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index 1241667533..44046cb1c1 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -636,7 +636,7 @@ void OSystem_Android::clearOverlay() { _overlay_texture->fillBuffer(0); } -void OSystem_Android::grabOverlay(OverlayColor *buf, int pitch) { +void OSystem_Android::grabOverlay(void *buf, int pitch) { ENTER("%p, %d", buf, pitch); GLTHREADCHECK; @@ -644,25 +644,24 @@ void OSystem_Android::grabOverlay(OverlayColor *buf, int pitch) { const Graphics::Surface *surface = _overlay_texture->surface_const(); assert(surface->format.bytesPerPixel == sizeof(buf[0])); + byte *dst = (byte *)buf; const byte *src = (const byte *)surface->pixels; uint h = surface->h; do { - memcpy(buf, src, surface->w * surface->format.bytesPerPixel); + memcpy(dst, src, surface->w * surface->format.bytesPerPixel); src += surface->pitch; - // This 'pitch' is pixels not bytes - buf += pitch; + dst += pitch; } while (--h); } -void OSystem_Android::copyRectToOverlay(const OverlayColor *buf, int pitch, +void OSystem_Android::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { ENTER("%p, %d, %d, %d, %d, %d", buf, pitch, x, y, w, h); GLTHREADCHECK; - // This 'pitch' is pixels not bytes - _overlay_texture->updateBuffer(x, y, w, h, buf, pitch * sizeof(buf[0])); + _overlay_texture->updateBuffer(x, y, w, h, buf, pitch); } int16 OSystem_Android::getOverlayHeight() { diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index aa2a3709cb..d41839d961 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -172,8 +172,8 @@ public: void showOverlay(); void hideOverlay(); void clearOverlay(); - void grabOverlay(OverlayColor *buf, int pitch); - void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); + void grabOverlay(void *buf, int pitch); + void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h); virtual Graphics::PixelFormat getOverlayFormat() const { return Graphics::createPixelFormat<4444>(); } // Mutex handling diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp index 35e7b70a82..cc5798fc10 100644 --- a/backends/platform/dc/display.cpp +++ b/backends/platform/dc/display.cpp @@ -653,27 +653,29 @@ void OSystem_Dreamcast::clearOverlay() _overlay_dirty = true; } -void OSystem_Dreamcast::grabOverlay(OverlayColor *buf, int pitch) +void OSystem_Dreamcast::grabOverlay(void *buf, int pitch) { int h = OVL_H; unsigned short *src = overlay; + unsigned char *dst = (unsigned char *)buf; do { - memcpy(buf, src, OVL_W*sizeof(int16)); + memcpy(dst, src, OVL_W*sizeof(int16)); src += OVL_W; - buf += pitch; + dst += pitch; } while (--h); } -void OSystem_Dreamcast::copyRectToOverlay(const OverlayColor *buf, int pitch, +void OSystem_Dreamcast::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { if (w<1 || h<1) return; unsigned short *dst = overlay + y*OVL_W + x; + const unsigned char *src = (const unsigned char *)buf; do { - memcpy(dst, buf, w*sizeof(int16)); + memcpy(dst, src, w*sizeof(int16)); dst += OVL_W; - buf += pitch; + src += pitch; } while (--h); _overlay_dirty = true; } diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index b4bf38c45b..5c20deb359 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -509,13 +509,13 @@ void OSystem_DS::clearOverlay() { // consolePrintf("clearovl\n"); } -void OSystem_DS::grabOverlay(OverlayColor *buf, int pitch) { +void OSystem_DS::grabOverlay(void *buf, int pitch) { // consolePrintf("grabovl\n") u16 *start = DS::get16BitBackBuffer(); for (int y = 0; y < 200; y++) { u16 *src = start + (y * 320); - u16 *dest = ((u16 *) (buf)) + (y * pitch); + u16 *dest = (u16 *)((u8 *)buf + (y * pitch)); for (int x = 0; x < 320; x++) { *dest++ = *src++; @@ -524,9 +524,9 @@ void OSystem_DS::grabOverlay(OverlayColor *buf, int pitch) { } -void OSystem_DS::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { +void OSystem_DS::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { u16 *bg = (u16 *) DS::get16BitBackBuffer(); - const u16 *src = (const u16 *) buf; + const u8 *source = (const u8 *)buf; // if (x + w > 256) w = 256 - x; //if (x + h > 256) h = 256 - y; @@ -536,7 +536,7 @@ void OSystem_DS::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, in for (int dy = y; dy < y + h; dy++) { - + const u16 *src = (const u16 *)source; // Slow but save copy: for (int dx = x; dx < x + w; dx++) { @@ -546,7 +546,7 @@ void OSystem_DS::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, in //consolePrintf("%d,", *src); src++; } - src += (pitch - w); + source += pitch; // Fast but broken copy: (why?) /* diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index d35b16c8fd..a6001da764 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -105,8 +105,8 @@ public: virtual void showOverlay(); virtual void hideOverlay(); virtual void clearOverlay(); - virtual void grabOverlay(OverlayColor *buf, int pitch); - virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); + virtual void grabOverlay(void *buf, int pitch); + virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h); virtual int16 getOverlayHeight(); virtual int16 getOverlayWidth(); virtual Graphics::PixelFormat getOverlayFormat() const { return Graphics::createPixelFormat<1555>(); } diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h index b15b5e0375..037125490d 100644 --- a/backends/platform/iphone/osys_main.h +++ b/backends/platform/iphone/osys_main.h @@ -152,8 +152,8 @@ public: virtual void showOverlay(); virtual void hideOverlay(); virtual void clearOverlay(); - virtual void grabOverlay(OverlayColor *buf, int pitch); - virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); + virtual void grabOverlay(void *buf, int pitch); + virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h); virtual int16 getOverlayHeight(); virtual int16 getOverlayWidth(); virtual Graphics::PixelFormat getOverlayFormat() const { return Graphics::createPixelFormat<5551>(); } diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm index 1649956a6c..b01c925024 100644 --- a/backends/platform/iphone/osys_video.mm +++ b/backends/platform/iphone/osys_video.mm @@ -309,31 +309,33 @@ void OSystem_IPHONE::clearOverlay() { dirtyFullOverlayScreen(); } -void OSystem_IPHONE::grabOverlay(OverlayColor *buf, int pitch) { +void OSystem_IPHONE::grabOverlay(void *buf, int pitch) { //printf("grabOverlay()\n"); int h = _videoContext->overlayHeight; + byte *dst = (byte *)buf; const byte *src = (const byte *)_videoContext->overlayTexture.getBasePtr(0, 0); do { - memcpy(buf, src, _videoContext->overlayWidth * sizeof(OverlayColor)); + memcpy(dst, src, _videoContext->overlayWidth * sizeof(OverlayColor)); src += _videoContext->overlayTexture.pitch; - buf += pitch; + dst += pitch; } while (--h); } -void OSystem_IPHONE::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { +void OSystem_IPHONE::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { //printf("copyRectToOverlay(%p, pitch=%i, x=%i, y=%i, w=%i, h=%i)\n", (const void *)buf, pitch, x, y, w, h); + const byte *src = (const byte *)buf; //Clip the coordinates if (x < 0) { w += x; - buf -= x; + src -= x * sizeof(OverlayColor); x = 0; } if (y < 0) { h += y; - buf -= y * pitch; + src -= y * pitch; y = 0; } @@ -352,8 +354,8 @@ void OSystem_IPHONE::copyRectToOverlay(const OverlayColor *buf, int pitch, int x byte *dst = (byte *)_videoContext->overlayTexture.getBasePtr(x, y); do { - memcpy(dst, buf, w * sizeof(OverlayColor)); - buf += pitch; + memcpy(dst, src, w * sizeof(OverlayColor)); + src += pitch; dst += _videoContext->overlayTexture.pitch; } while (--h); } diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h index 121f84f93f..3266180a7b 100644 --- a/backends/platform/n64/osys_n64.h +++ b/backends/platform/n64/osys_n64.h @@ -171,8 +171,8 @@ public: virtual void showOverlay(); virtual void hideOverlay(); virtual void clearOverlay(); - virtual void grabOverlay(OverlayColor *buf, int pitch); - virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); + virtual void grabOverlay(void *buf, int pitch); + virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h); virtual int16 getOverlayHeight(); virtual int16 getOverlayWidth(); virtual Graphics::PixelFormat getOverlayFormat() const { diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp index b526c68762..ed2badb305 100644 --- a/backends/platform/n64/osys_n64_base.cpp +++ b/backends/platform/n64/osys_n64_base.cpp @@ -683,28 +683,30 @@ void OSystem_N64::clearOverlay() { _dirtyOffscreen = true; } -void OSystem_N64::grabOverlay(OverlayColor *buf, int pitch) { +void OSystem_N64::grabOverlay(void *buf, int pitch) { int h = _overlayHeight; OverlayColor *src = _overlayBuffer; + byte *dst = (byte *)buf; do { - memcpy(buf, src, _overlayWidth * sizeof(OverlayColor)); + memcpy(dst, src, _overlayWidth * sizeof(OverlayColor)); src += _overlayWidth; - buf += pitch; + dst += pitch; } while (--h); } -void OSystem_N64::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { +void OSystem_N64::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { + const byte *src = (const byte *)buf; //Clip the coordinates if (x < 0) { w += x; - buf -= x; + src -= x * sizeof(OverlayColor); x = 0; } if (y < 0) { h += y; - buf -= y * pitch; + src -= y * pitch; y = 0; } @@ -723,11 +725,11 @@ void OSystem_N64::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, i OverlayColor *dst = _overlayBuffer + (y * _overlayWidth + x); if (_overlayWidth == pitch && pitch == w) { - memcpy(dst, buf, h * w * sizeof(OverlayColor)); + memcpy(dst, src, h * w * sizeof(OverlayColor)); } else { do { - memcpy(dst, buf, w * sizeof(OverlayColor)); - buf += pitch; + memcpy(dst, src, w * sizeof(OverlayColor)); + src += pitch; dst += _overlayWidth; } while (--h); } diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp index 8df6198c38..f93166ef67 100644 --- a/backends/platform/ps2/Gs2dScreen.cpp +++ b/backends/platform/ps2/Gs2dScreen.cpp @@ -564,7 +564,7 @@ void Gs2dScreen::clearPrintfOverlay(void) { free(tmpBuf); } -void Gs2dScreen::copyOverlayRect(const uint16 *buf, uint16 pitch, uint16 x, uint16 y, uint16 w, uint16 h) { +void Gs2dScreen::copyOverlayRect(const byte *buf, uint16 pitch, uint16 x, uint16 y, uint16 w, uint16 h) { WaitSema(g_DmacSema); // warning("_overlayBuf [dst] = %x", _overlayBuf); @@ -601,7 +601,7 @@ void Gs2dScreen::clearOverlay(void) { SignalSema(g_DmacSema); } -void Gs2dScreen::grabOverlay(uint16 *buf, uint16 pitch) { +void Gs2dScreen::grabOverlay(byte *buf, uint16 pitch) { uint16 *src = _overlayBuf; for (uint32 cnt = 0; cnt < _height; cnt++) { memcpy(buf, src, _width * 2); diff --git a/backends/platform/ps2/Gs2dScreen.h b/backends/platform/ps2/Gs2dScreen.h index 4fbb3fdef8..005dabc809 100644 --- a/backends/platform/ps2/Gs2dScreen.h +++ b/backends/platform/ps2/Gs2dScreen.h @@ -62,8 +62,8 @@ public: void updateScreen(void); void grabPalette(uint8 *pal, uint8 start, uint16 num); //- overlay routines - void copyOverlayRect(const uint16 *buf, uint16 pitch, uint16 x, uint16 y, uint16 w, uint16 h); - void grabOverlay(uint16 *buf, uint16 pitch); + void copyOverlayRect(const byte *buf, uint16 pitch, uint16 x, uint16 y, uint16 w, uint16 h); + void grabOverlay(byte *buf, uint16 pitch); void clearOverlay(void); void showOverlay(void); void hideOverlay(void); diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp index a639725d78..5628658381 100644 --- a/backends/platform/ps2/systemps2.cpp +++ b/backends/platform/ps2/systemps2.cpp @@ -634,12 +634,12 @@ void OSystem_PS2::clearOverlay(void) { _screen->clearOverlay(); } -void OSystem_PS2::grabOverlay(OverlayColor *buf, int pitch) { - _screen->grabOverlay((uint16 *)buf, (uint16)pitch); +void OSystem_PS2::grabOverlay(void *buf, int pitch) { + _screen->grabOverlay((byte *)buf, (uint16)pitch); } -void OSystem_PS2::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { - _screen->copyOverlayRect((const uint16*)buf, (uint16)pitch, (uint16)x, (uint16)y, (uint16)w, (uint16)h); +void OSystem_PS2::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { + _screen->copyOverlayRect((const byte *)buf, (uint16)pitch, (uint16)x, (uint16)y, (uint16)w, (uint16)h); } Graphics::PixelFormat OSystem_PS2::getOverlayFormat(void) const { diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h index efbe7d5f93..99482d4da4 100644 --- a/backends/platform/ps2/systemps2.h +++ b/backends/platform/ps2/systemps2.h @@ -72,8 +72,8 @@ public: virtual void showOverlay(); virtual void hideOverlay(); virtual void clearOverlay(); - virtual void grabOverlay(OverlayColor *buf, int pitch); - virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); + virtual void grabOverlay(void *buf, int pitch); + virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h); virtual int16 getOverlayWidth(void); virtual int16 getOverlayHeight(void); diff --git a/backends/platform/psp/default_display_client.cpp b/backends/platform/psp/default_display_client.cpp index 2ee7ff5b74..bc252144fa 100644 --- a/backends/platform/psp/default_display_client.cpp +++ b/backends/platform/psp/default_display_client.cpp @@ -123,15 +123,15 @@ void Overlay::setSize(uint32 width, uint32 height) { _renderer.setDrawWholeBuffer(); // We need to let the renderer know how much to draw } -void Overlay::copyToArray(OverlayColor *buf, int pitch) { +void Overlay::copyToArray(void *buf, int pitch) { DEBUG_ENTER_FUNC(); - _buffer.copyToArray((byte *)buf, pitch * sizeof(OverlayColor)); // Change to bytes + _buffer.copyToArray((byte *)buf, pitch); // Change to bytes } -void Overlay::copyFromRect(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { +void Overlay::copyFromRect(const void *buf, int pitch, int x, int y, int w, int h) { DEBUG_ENTER_FUNC(); - _buffer.copyFromRect((byte *)buf, pitch * sizeof(OverlayColor), x, y, w, h); // Change to bytes + _buffer.copyFromRect((byte *)buf, pitch, x, y, w, h); // Change to bytes // debug //_buffer.print(0xFF); setDirty(); diff --git a/backends/platform/psp/default_display_client.h b/backends/platform/psp/default_display_client.h index 721a7e6fea..95c52e2352 100644 --- a/backends/platform/psp/default_display_client.h +++ b/backends/platform/psp/default_display_client.h @@ -69,8 +69,8 @@ public: bool allocate(); void setBytesPerPixel(uint32 size); void setSize(uint32 width, uint32 height); - void copyToArray(OverlayColor *buf, int pitch); - void copyFromRect(const OverlayColor *buf, int pitch, int x, int y, int w, int h); + void copyToArray(void *buf, int pitch); + void copyFromRect(const void *buf, int pitch, int x, int y, int w, int h); }; /** diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 3fe9a7f9c7..0032fea072 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -260,12 +260,12 @@ void OSystem_PSP::clearOverlay() { _overlay.clearBuffer(); } -void OSystem_PSP::grabOverlay(OverlayColor *buf, int pitch) { +void OSystem_PSP::grabOverlay(void *buf, int pitch) { DEBUG_ENTER_FUNC(); _overlay.copyToArray(buf, pitch); } -void OSystem_PSP::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { +void OSystem_PSP::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { DEBUG_ENTER_FUNC(); _displayManager.waitUntilRenderFinished(); _pendingUpdate = false; diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h index d167c757ae..2afdabd0fc 100644 --- a/backends/platform/psp/osys_psp.h +++ b/backends/platform/psp/osys_psp.h @@ -109,8 +109,8 @@ public: void showOverlay(); void hideOverlay(); void clearOverlay(); - void grabOverlay(OverlayColor *buf, int pitch); - void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); + void grabOverlay(void *buf, int pitch); + void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h); int16 getOverlayHeight(); int16 getOverlayWidth(); Graphics::PixelFormat getOverlayFormat() const { return Graphics::createPixelFormat<4444>(); } diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index ecd69178bb..f1c8d77533 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -177,8 +177,8 @@ public: virtual void showOverlay(); virtual void hideOverlay(); virtual void clearOverlay(); - virtual void grabOverlay(OverlayColor *buf, int pitch); - virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, + virtual void grabOverlay(void *buf, int pitch); + virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h); virtual int16 getOverlayWidth(); virtual int16 getOverlayHeight(); diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index 741acd4f4a..6b0e31bd7b 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -571,28 +571,30 @@ void OSystem_Wii::clearOverlay() { _overlayDirty = true; } -void OSystem_Wii::grabOverlay(OverlayColor *buf, int pitch) { +void OSystem_Wii::grabOverlay(void *buf, int pitch) { int h = _overlayHeight; OverlayColor *src = _overlayPixels; + byte *dst = (byte *)buf; do { - memcpy(buf, src, _overlayWidth * sizeof(OverlayColor)); + memcpy(dst, src, _overlayWidth * sizeof(OverlayColor)); src += _overlayWidth; - buf += pitch; + dst += pitch; } while (--h); } -void OSystem_Wii::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, +void OSystem_Wii::copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) { + const byte *src = (const byte *)buf; if (x < 0) { w += x; - buf -= x; + src -= x * sizeof(OverlayColor); x = 0; } if (y < 0) { h += y; - buf -= y * pitch; + src -= y * pitch; y = 0; } @@ -607,11 +609,11 @@ void OSystem_Wii::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, OverlayColor *dst = _overlayPixels + (y * _overlayWidth + x); if (_overlayWidth == pitch && pitch == w) { - memcpy(dst, buf, h * w * sizeof(OverlayColor)); + memcpy(dst, src, h * w * sizeof(OverlayColor)); } else { do { - memcpy(dst, buf, w * sizeof(OverlayColor)); - buf += pitch; + memcpy(dst, src, w * sizeof(OverlayColor)); + src += pitch; dst += _overlayWidth; } while (--h); } diff --git a/backends/vkeybd/virtual-keyboard-gui.cpp b/backends/vkeybd/virtual-keyboard-gui.cpp index 42f9707ddc..75de86472f 100644 --- a/backends/vkeybd/virtual-keyboard-gui.cpp +++ b/backends/vkeybd/virtual-keyboard-gui.cpp @@ -161,7 +161,7 @@ void VirtualKeyboardGUI::run() { _system->clearOverlay(); } _overlayBackup.create(_screenW, _screenH, _system->getOverlayFormat()); - _system->grabOverlay((OverlayColor *)_overlayBackup.pixels, _overlayBackup.w); + _system->grabOverlay(_overlayBackup.pixels, _overlayBackup.pitch); setupCursor(); @@ -171,7 +171,7 @@ void VirtualKeyboardGUI::run() { removeCursor(); - _system->copyRectToOverlay((OverlayColor *)_overlayBackup.pixels, _overlayBackup.w, 0, 0, _overlayBackup.w, _overlayBackup.h); + _system->copyRectToOverlay(_overlayBackup.pixels, _overlayBackup.pitch, 0, 0, _overlayBackup.w, _overlayBackup.h); if (!g_gui.isActive()) _system->hideOverlay(); _overlayBackup.free(); @@ -262,7 +262,7 @@ void VirtualKeyboardGUI::screenChanged() { _screenH = newScreenH; _overlayBackup.create(_screenW, _screenH, _system->getOverlayFormat()); - _system->grabOverlay((OverlayColor *)_overlayBackup.pixels, _overlayBackup.w); + _system->grabOverlay(_overlayBackup.pixels, _overlayBackup.pitch); if (!_kbd->checkModeResolutions()) { _displaying = false; @@ -371,7 +371,7 @@ void VirtualKeyboardGUI::redraw() { blit(&surf, &_dispSurface, _dispX - _dirtyRect.left, _dispY - _dirtyRect.top, _dispBackColor); } - _system->copyRectToOverlay((OverlayColor *)surf.pixels, surf.w, + _system->copyRectToOverlay(surf.pixels, surf.pitch, _dirtyRect.left, _dirtyRect.top, surf.w, surf.h); surf.free(); diff --git a/common/system.h b/common/system.h index a6753eac49..7a4fa00dec 100644 --- a/common/system.h +++ b/common/system.h @@ -790,20 +790,14 @@ public: * Copy the content of the overlay into a buffer provided by the caller. * This is only used to implement fake alpha blending. */ - virtual void grabOverlay(OverlayColor *buf, int pitch) = 0; + virtual void grabOverlay(void *buf, int pitch) = 0; /** * Blit a graphics buffer to the overlay. * In a sense, this is the reverse of grabOverlay. * - * @note The pitch parameter actually contains the 'pixel pitch', i.e., - * the number of pixels per scanline, and not as usual the number of bytes - * per scanline. - * - * @todo Change 'pitch' to be byte and not pixel based - * * @param buf the buffer containing the graphics data source - * @param pitch the pixel pitch of the buffer (number of pixels in a scanline) + * @param pitch the pitch of the buffer (number of bytes in a scanline) * @param x the x coordinate of the destination rectangle * @param y the y coordinate of the destination rectangle * @param w the width of the destination rectangle @@ -812,7 +806,7 @@ public: * @see copyRectToScreen * @see grabOverlay */ - virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) = 0; + virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) = 0; /** * Return the height of the overlay. diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp index 36ec726fc7..082694b728 100644 --- a/engines/testbed/graphics.cpp +++ b/engines/testbed/graphics.cpp @@ -935,7 +935,7 @@ TestExitStatus GFXtests::overlayGraphics() { } g_system->showOverlay(); - g_system->copyRectToOverlay(buffer, 100, 270, 175, 100, 50); + g_system->copyRectToOverlay(buffer, 200, 270, 175, 100, 50); g_system->updateScreen(); g_system->delayMillis(1000); diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 7817725664..1ed5a3308a 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -422,8 +422,8 @@ void VectorRendererSpec:: copyFrame(OSystem *sys, const Common::Rect &r) { sys->copyRectToOverlay( - (const OverlayColor *)_activeSurface->getBasePtr(r.left, r.top), - _activeSurface->pitch / _activeSurface->format.bytesPerPixel, + _activeSurface->getBasePtr(r.left, r.top), + _activeSurface->pitch, r.left, r.top, r.width(), r.height() ); } diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 1bf7ad3c85..e37022f5f1 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -429,7 +429,7 @@ bool ThemeEngine::init() { void ThemeEngine::clearAll() { if (_initOk) { _system->clearOverlay(); - _system->grabOverlay((OverlayColor *)_screen.pixels, _screen.w); + _system->grabOverlay(_screen.pixels, _screen.pitch); } } -- cgit v1.2.3 From 555afaa50c45a51e53c88c6cb1d52a66ba367fd5 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 16 Jun 2012 04:21:54 +0200 Subject: NEWS: Ooops, proper alphabetical ordering --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 74112fa7cd..9fde25e3f3 100644 --- a/NEWS +++ b/NEWS @@ -9,11 +9,11 @@ For a more comprehensive changelog of the latest experimental code, see: - Added support for Dreamweb. - Added support for Geisha. - Added support for Gregory and the Hot Air Balloon. - - Added support for Once Upon A Time: Little Red Riding Hood - Added support for Magic Tales: Baba Yaga and the Magic Geese. - Added support for Magic Tales: Imo and the King. - Added support for Magic Tales: Liam Finds a Story. - Added support for Magic Tales: The Little Samurai. + - Added support for Once Upon A Time: Little Red Riding Hood - Added support for Sleeping Cub's Test of Courage. - Added support for Soltys. - Added support for The Princess and the Crab. -- cgit v1.2.3 From 230a0edc2d966e5990115b5669b5236d2d41618e Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 16 Jun 2012 04:29:57 +0200 Subject: AUDIO: gob uses protracker too --- audio/mods/protracker.h | 1 + 1 file changed, 1 insertion(+) diff --git a/audio/mods/protracker.h b/audio/mods/protracker.h index d52322f07e..5f47c4453b 100644 --- a/audio/mods/protracker.h +++ b/audio/mods/protracker.h @@ -25,6 +25,7 @@ * Sound decoder used in engines: * - agos * - parallaction + * - gob */ #ifndef AUDIO_MODS_PROTRACKER_H -- cgit v1.2.3 From 5230a0d61795e2855625a43d60dc3bc2ed83fc3d Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 15 Jun 2012 22:45:44 -0400 Subject: AUDIO: Make sure maxtrax and tfmx are compiled in with dynamic modules --- audio/mods/maxtrax.h | 7 ++----- audio/mods/tfmx.h | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/audio/mods/maxtrax.h b/audio/mods/maxtrax.h index c45a21a255..ffb176c241 100644 --- a/audio/mods/maxtrax.h +++ b/audio/mods/maxtrax.h @@ -20,11 +20,8 @@ * */ -// see if all engines using this class are DISABLED -#if !defined(ENABLE_KYRA) - -// normal Header Guard -#elif !defined(AUDIO_MODS_MAXTRAX_H) +// Only compiled if Kyra is built-in or we're building for dynamic modules +#if !defined(AUDIO_MODS_MAXTRAX_H) && (defined(ENABLE_KYRA) || defined(DYNAMIC_MODULES)) #define AUDIO_MODS_MAXTRAX_H // #define MAXTRAX_HAS_MODULATION diff --git a/audio/mods/tfmx.h b/audio/mods/tfmx.h index 4174fbfb27..ebe1172278 100644 --- a/audio/mods/tfmx.h +++ b/audio/mods/tfmx.h @@ -20,11 +20,8 @@ * */ -// see if all engines using this class are DISABLED -#if !defined(ENABLE_SCUMM) - -// normal Header Guard -#elif !defined(AUDIO_MODS_TFMX_H) +// Only compiled if SCUMM is built-in or we're building for dynamic modules +#if !defined(AUDIO_MODS_TFMX_H) && (defined(ENABLE_SCUMM) || defined(DYNAMIC_MODULES)) #define AUDIO_MODS_TFMX_H #include "audio/mods/paula.h" -- cgit v1.2.3 From 984e0012d9b96a752b40a008aa1689d43d9a9920 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 15 Jun 2012 23:11:28 -0400 Subject: GRAPHICS: Fix colorToARGB's alpha value when no alpha channel is present --- graphics/pixelformat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h index e0cf6ce401..ca4ef11c17 100644 --- a/graphics/pixelformat.h +++ b/graphics/pixelformat.h @@ -97,7 +97,7 @@ struct PixelFormat { } inline void colorToARGB(uint32 color, uint8 &a, uint8 &r, uint8 &g, uint8 &b) const { - a = ((color >> aShift) << aLoss) & 0xFF; + a = (aBits() == 0) ? 0xFF : (((color >> aShift) << aLoss) & 0xFF); r = ((color >> rShift) << rLoss) & 0xFF; g = ((color >> gShift) << gLoss) & 0xFF; b = ((color >> bShift) << bLoss) & 0xFF; -- cgit v1.2.3 From 3d7c6a2710e7d8ba1dfc86afe09f94dbf874b99a Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 16 Jun 2012 15:06:07 +0200 Subject: GOB: Correct the name of A.J.'s World of Discovery --- engines/gob/detection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp index 861cc95d41..18baffa3fa 100644 --- a/engines/gob/detection.cpp +++ b/engines/gob/detection.cpp @@ -51,7 +51,7 @@ static const PlainGameDescriptor gobGames[] = { {"ween", "Ween: The Prophecy"}, {"bargon", "Bargon Attack"}, {"littlered", "Once Upon A Time: Little Red Riding Hood"}, - {"ajworld", "A.J's World of Discovery"}, + {"ajworld", "A.J.'s World of Discovery"}, {"gob3", "Goblins Quest 3"}, {"gob3cd", "Goblins Quest 3 CD"}, {"lit1", "Lost in Time Part 1"}, -- cgit v1.2.3 From 6d01b517550d161b45cbebba077bb9f7bbbc99f2 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 16 Jun 2012 15:08:10 +0200 Subject: GOB: Add a proper GameType for AJ's World --- engines/gob/detection_tables.h | 2 +- engines/gob/gob.cpp | 11 +++++++++++ engines/gob/gob.h | 3 ++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/engines/gob/detection_tables.h b/engines/gob/detection_tables.h index bd35900473..f3dc375fc3 100644 --- a/engines/gob/detection_tables.h +++ b/engines/gob/detection_tables.h @@ -4675,7 +4675,7 @@ static const GOBGameDescription gameDescriptions[] = { ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, - kGameTypeGob2, + kGameTypeAJWorld, kFeaturesAdLib, 0, 0, 0 }, diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index f3480fed99..3d3c43d91c 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -483,6 +483,17 @@ bool GobEngine::initGameParts() { _resourceSizeWorkaround = true; break; + case kGameTypeAJWorld: + _init = new Init_v2(this); + _video = new Video_v2(this); + _inter = new Inter_v2(this); + _mult = new Mult_v2(this); + _draw = new Draw_v2(this); + _map = new Map_v2(this); + _goblin = new Goblin_v2(this); + _scenery = new Scenery_v2(this); + break; + case kGameTypeGob3: _init = new Init_v3(this); _video = new Video_v2(this); diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 808c941546..52f3ba8f2d 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -129,7 +129,8 @@ enum GameType { kGameTypeAdi4, kGameTypeAdibou2, kGameTypeAdibou1, - kGameTypeLittleRed + kGameTypeLittleRed, + kGameTypeAJWorld }; enum Features { -- cgit v1.2.3 From 026ef70b87f4b85476cb6a3d74ffb9170a170718 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 16 Jun 2012 15:23:31 +0200 Subject: GOB: Add a SaveLoad class for AJ's World Only contains a temp sprite handler ("menu.inf") for now. This fixes the graphical glitch after clicking on the cloud. --- engines/gob/gob.cpp | 1 + engines/gob/module.mk | 1 + engines/gob/save/saveload.h | 27 ++++++++++ engines/gob/save/saveload_ajworld.cpp | 94 +++++++++++++++++++++++++++++++++++ 4 files changed, 123 insertions(+) create mode 100644 engines/gob/save/saveload_ajworld.cpp diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 3d3c43d91c..3d8a18ed38 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -492,6 +492,7 @@ bool GobEngine::initGameParts() { _map = new Map_v2(this); _goblin = new Goblin_v2(this); _scenery = new Scenery_v2(this); + _saveLoad = new SaveLoad_AJWorld(this, _targetName.c_str()); break; case kGameTypeGob3: diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 20214ea940..2249f44852 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -94,6 +94,7 @@ MODULE_OBJS := \ save/saveload_v7.o \ save/saveload_geisha.o \ save/saveload_fascin.o \ + save/saveload_ajworld.o \ save/saveload_inca2.o \ save/saveload_playtoons.o \ save/saveconverter.o \ diff --git a/engines/gob/save/saveload.h b/engines/gob/save/saveload.h index 66b3482bac..834484757b 100644 --- a/engines/gob/save/saveload.h +++ b/engines/gob/save/saveload.h @@ -257,6 +257,33 @@ protected: SaveFile *getSaveFile(const char *fileName); }; +/** Save/Load class for A.J.'s World of Discovery. */ +class SaveLoad_AJWorld : public SaveLoad { +public: + SaveLoad_AJWorld(GobEngine *vm, const char *targetName); + virtual ~SaveLoad_AJWorld(); + + SaveMode getSaveMode(const char *fileName) const; + +protected: + struct SaveFile { + const char *sourceName; + SaveMode mode; + SaveHandler *handler; + const char *description; + }; + + static SaveFile _saveFiles[]; + + TempSpriteHandler *_tempSpriteHandler; + + SaveHandler *getHandler(const char *fileName) const; + const char *getDescription(const char *fileName) const; + + const SaveFile *getSaveFile(const char *fileName) const; + SaveFile *getSaveFile(const char *fileName); +}; + /** Save/Load class for Goblins 3 and Lost in Time. */ class SaveLoad_v3 : public SaveLoad { public: diff --git a/engines/gob/save/saveload_ajworld.cpp b/engines/gob/save/saveload_ajworld.cpp new file mode 100644 index 0000000000..727d071b3e --- /dev/null +++ b/engines/gob/save/saveload_ajworld.cpp @@ -0,0 +1,94 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "gob/save/saveload.h" +#include "gob/save/saveconverter.h" +#include "gob/inter.h" +#include "gob/variables.h" + +namespace Gob { + +SaveLoad_AJWorld::SaveFile SaveLoad_AJWorld::_saveFiles[] = { + { "menu.inf", kSaveModeSave, 0, "temporary sprite"} +}; + + +SaveLoad_AJWorld::SaveLoad_AJWorld(GobEngine *vm, const char *targetName) : + SaveLoad(vm) { + + _tempSpriteHandler = new TempSpriteHandler(vm); + + _saveFiles[0].handler = _tempSpriteHandler; +} + +SaveLoad_AJWorld::~SaveLoad_AJWorld() { + delete _tempSpriteHandler; +} + +const SaveLoad_AJWorld::SaveFile *SaveLoad_AJWorld::getSaveFile(const char *fileName) const { + fileName = stripPath(fileName); + + for (int i = 0; i < ARRAYSIZE(_saveFiles); i++) + if (!scumm_stricmp(fileName, _saveFiles[i].sourceName)) + return &_saveFiles[i]; + + return 0; +} + +SaveLoad_AJWorld::SaveFile *SaveLoad_AJWorld::getSaveFile(const char *fileName) { + fileName = stripPath(fileName); + + for (int i = 0; i < ARRAYSIZE(_saveFiles); i++) + if (!scumm_stricmp(fileName, _saveFiles[i].sourceName)) + return &_saveFiles[i]; + + return 0; +} + +SaveHandler *SaveLoad_AJWorld::getHandler(const char *fileName) const { + const SaveFile *saveFile = getSaveFile(fileName); + + if (saveFile) + return saveFile->handler; + + return 0; +} + +const char *SaveLoad_AJWorld::getDescription(const char *fileName) const { + const SaveFile *saveFile = getSaveFile(fileName); + + if (saveFile) + return saveFile->description; + + return 0; +} + +SaveLoad::SaveMode SaveLoad_AJWorld::getSaveMode(const char *fileName) const { + const SaveFile *saveFile = getSaveFile(fileName); + + if (saveFile) + return saveFile->mode; + + return kSaveModeNone; +} + +} // End of namespace Gob -- cgit v1.2.3 From b7ae6a93a983c7feaa7cf029967354bd176b8efc Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 16 Jun 2012 17:20:45 +0200 Subject: GOB: Fix a segfault when quitting AJ's World --- engines/gob/game.cpp | 11 +++++++++++ engines/gob/game.h | 4 ++++ engines/gob/inter.cpp | 3 +++ 3 files changed, 18 insertions(+) diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index 502a440005..0d1953322f 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -167,6 +167,13 @@ bool Environments::has(Resources *resources, uint8 startEnv, int16 except) const return false; } +void Environments::deleted(Variables *variables) { + for (uint i = 0; i < kEnvironmentCount; i++) { + if (_environments[i].variables == variables) + _environments[i].variables = 0; + } +} + bool Environments::clearMedia(uint8 env) { if (env >= kEnvironmentCount) return false; @@ -947,6 +954,10 @@ void Game::switchTotSub(int16 index, int16 function) { _environments.get(_curEnvironment); } +void Game::deletedVars(Variables *variables) { + _environments.deleted(variables); +} + void Game::clearUnusedEnvironment() { if (!_environments.has(_script)) { delete _script; diff --git a/engines/gob/game.h b/engines/gob/game.h index b3057ac262..995baa5629 100644 --- a/engines/gob/game.h +++ b/engines/gob/game.h @@ -52,6 +52,8 @@ public: bool has(Script *script , uint8 startEnv = 0, int16 except = -1) const; bool has(Resources *resources, uint8 startEnv = 0, int16 except = -1) const; + void deleted(Variables *variables); + void clear(); bool setMedia(uint8 env); @@ -169,6 +171,8 @@ public: void totSub(int8 flags, const Common::String &totFile); void switchTotSub(int16 index, int16 function); + void deletedVars(Variables *variables); + bool loadFunctions(const Common::String &tot, uint16 flags); bool callFunction(const Common::String &tot, const Common::String &function, int16 param); diff --git a/engines/gob/inter.cpp b/engines/gob/inter.cpp index 843c0bff48..4460274561 100644 --- a/engines/gob/inter.cpp +++ b/engines/gob/inter.cpp @@ -359,6 +359,9 @@ void Inter::allocateVars(uint32 count) { } void Inter::delocateVars() { + if (_vm->_game) + _vm->_game->deletedVars(_variables); + delete _variables; _variables = 0; } -- cgit v1.2.3 From c825cc41a57b40a9af6ca51a3674b90e5f17e00f Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 17 Jun 2012 02:10:04 +0100 Subject: SAGA: Workaround fix for IHNM pathfinding glitches. This fixes bug #3360396 - "IHNM: Can't use right monitor with ellen". Have done a full playtest of IHNM to ensure this fixes the issue without any other regressions. Thanks to eriktorbjorn for creating this patch. --- engines/saga/actor_path.cpp | 51 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/engines/saga/actor_path.cpp b/engines/saga/actor_path.cpp index 0fb072b201..d0f1cf2b5b 100644 --- a/engines/saga/actor_path.cpp +++ b/engines/saga/actor_path.cpp @@ -23,6 +23,7 @@ #include "saga/saga.h" #include "saga/actor.h" +#include "saga/objectmap.h" #include "saga/scene.h" namespace Saga { @@ -99,6 +100,47 @@ void Actor::findActorPath(ActorData *actor, const Point &fromPoint, const Point _debugPointsCount = 0; #endif + // WORKAROUND for bug #3360396. Path finding in IHNM is a bit buggy + // compared to the original, which occasionally leads to the player + // leaving the room instead of interacting with an object. So far, no + // one has figured out how to fix this properly. As a temporary [*] + // solution, we try to fix this on a case-by-case basis. + // + // The workaround is to assume that the player wants to stay in the + // room, unless he or she explicitly clicked on an exit zone. + // + // [*] And there is nothing more permanent than a temporary solution... + + bool pathFindingWorkaround = false; + + if (_vm->getGameId() == GID_IHNM) { + int chapter = _vm->_scene->currentChapterNumber(); + int scene = _vm->_scene->currentSceneNumber(); + + // Ellen, in the room with the monitors. + if (chapter == 3 && scene == 54) + pathFindingWorkaround = true; + + // Nimdok in the recovery room + if (chapter == 4 && scene == 71) + pathFindingWorkaround = true; + } + + int hitZoneIndex; + const HitZone *hitZone; + bool restrictToRoom = false; + + if (pathFindingWorkaround) { + restrictToRoom = true; + hitZoneIndex = _vm->_scene->_actionMap->hitTest(toPoint); + if (hitZoneIndex != -1) { + hitZone = _vm->_scene->_actionMap->getHitZone(hitZoneIndex); + if (hitZone->getFlags() & kHitZoneExit) { + restrictToRoom = false; + } + } + } + actor->_walkStepsCount = 0; if (fromPoint == toPoint) { actor->addWalkStepPoint(toPoint); @@ -110,6 +152,15 @@ void Actor::findActorPath(ActorData *actor, const Point &fromPoint, const Point if (_vm->_scene->validBGMaskPoint(iteratorPoint)) { maskType = _vm->_scene->getBGMaskType(iteratorPoint); setPathCell(iteratorPoint, _vm->_scene->getDoorState(maskType) ? kPathCellBarrier : kPathCellEmpty); + if (restrictToRoom) { + hitZoneIndex = _vm->_scene->_actionMap->hitTest(iteratorPoint); + if (hitZoneIndex != -1) { + hitZone = _vm->_scene->_actionMap->getHitZone(hitZoneIndex); + if (hitZone->getFlags() & kHitZoneExit) { + setPathCell(iteratorPoint, kPathCellBarrier); + } + } + } } else { setPathCell(iteratorPoint, kPathCellBarrier); } -- cgit v1.2.3 From 06b905a218094458b1028d429956639c4a1cde7e Mon Sep 17 00:00:00 2001 From: Scott Thomas Date: Sun, 17 Jun 2012 16:22:32 +0930 Subject: GROOVIE: Fix 'off-by-one' when searching for ROQs by name --- engines/groovie/resource.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/groovie/resource.cpp b/engines/groovie/resource.cpp index c26f04d6ee..42d76cabfa 100644 --- a/engines/groovie/resource.cpp +++ b/engines/groovie/resource.cpp @@ -242,6 +242,7 @@ uint32 ResMan_v2::getRef(Common::String name, Common::String scriptname) { if (resname.hasPrefix(name.c_str())) { debugC(2, kGroovieDebugResource | kGroovieDebugAll, "Groovie::Resource: Resource %18s matches %s", readname, name.c_str()); found = true; + break; } } -- cgit v1.2.3 From 269ea2f6be551f3159c1e508e28ebd2a609f5ab0 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 9 Jun 2012 17:14:21 +1000 Subject: COMMON: Change pulseEvent to better reflect how it works in Windows --- common/coroutines.cpp | 58 +++++++++++++++------------------------------------ common/coroutines.h | 1 + 2 files changed, 18 insertions(+), 41 deletions(-) diff --git a/common/coroutines.cpp b/common/coroutines.cpp index 241d31e0d7..042b15b5d7 100644 --- a/common/coroutines.cpp +++ b/common/coroutines.cpp @@ -245,6 +245,15 @@ void CoroutineScheduler::schedule() { pProc = pNext; } + + // Disable any events that were pulsed + Common::List::iterator i; + for (i = _events.begin(); i != _events.end(); ++i) { + EVENT *evt = *i; + if (evt->pulsing) { + evt->pulsing = evt->signalled = false; + } + } } void CoroutineScheduler::rescheduleAll() { @@ -678,6 +687,7 @@ uint32 CoroutineScheduler::createEvent(bool bManualReset, bool bInitialState) { evt->pid = ++pidCounter; evt->manualReset = bManualReset; evt->signalled = bInitialState; + evt->pulsing = false; _events.push_back(evt); return evt->pid; @@ -707,49 +717,15 @@ void CoroutineScheduler::pulseEvent(uint32 pidEvent) { EVENT *evt = getEvent(pidEvent); if (!evt) return; - - // Set the event as true + + // Set the event as signalled and pulsing evt->signalled = true; + evt->pulsing = true; - // start dispatching active process list for any processes that are currently waiting - PROCESS *pOriginal = pCurrent; - PROCESS *pNext; - PROCESS *pProc = active->pNext; - while (pProc != NULL) { - pNext = pProc->pNext; - - // Only call processes that are currently waiting (either in waitForSingleObject or - // waitForMultipleObjects) for the given event Pid - for (int i = 0; i < CORO_MAX_PID_WAITING; ++i) { - if (pProc->pidWaiting[i] == pidEvent) { - // Dispatch the process - pCurrent = pProc; - pProc->coroAddr(pProc->state, pProc->param); - - if (!pProc->state || pProc->state->_sleep <= 0) { - // Coroutine finished - pCurrent = pCurrent->pPrevious; - killProcess(pProc); - } else { - pProc->sleepTime = pProc->state->_sleep; - } - - // pCurrent may have been changed - pNext = pCurrent->pNext; - pCurrent = NULL; - - break; - } - } - - pProc = pNext; - } - - // Restore the original current process (if one was active) - pCurrent = pOriginal; - - // Reset the event back to non-signalled - evt->signalled = false; + // If there's an active process, and it's not the first in the queue, then reschedule all + // the other prcoesses in the queue to run again this frame + if (pCurrent && pCurrent != active->pNext) + rescheduleAll(); } } // end of namespace Common diff --git a/common/coroutines.h b/common/coroutines.h index 64eabbf8f4..834c67f6e4 100644 --- a/common/coroutines.h +++ b/common/coroutines.h @@ -316,6 +316,7 @@ struct EVENT { uint32 pid; bool manualReset; bool signalled; + bool pulsing; }; -- cgit v1.2.3 From 3c04d333f2f6a423a67a8d0202ffca29d22da9db Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 16 Jun 2012 02:58:26 +0300 Subject: SCI: Add a check for empty VMD file names --- engines/sci/engine/kvideo.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index f176a13721..fa44a7dc19 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -342,6 +342,12 @@ reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv) { case 6: // Play videoDecoder = new Video::VMDDecoder(g_system->getMixer()); + if (s->_videoState.fileName.empty()) { + // Happens in Lighthouse + warning("kPlayVMD: Empty filename passed"); + return s->r_acc; + } + if (!videoDecoder->loadFile(s->_videoState.fileName)) { warning("Could not open VMD %s", s->_videoState.fileName.c_str()); break; -- cgit v1.2.3 From 2b50824133ced47f1d8fb6407a1e0212a7eeb41c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 18 Jun 2012 05:21:59 +0300 Subject: SCI: Add setter/getter methods to reg_t's No functionality change has been made with this commit. This avoids setting and getting the reg_t members directly, and is the basis of any future work on large SCI3 scripts (larger than 64KB) --- engines/sci/console.cpp | 105 +++++++++++++++-------------- engines/sci/engine/features.cpp | 36 +++++----- engines/sci/engine/file.cpp | 2 +- engines/sci/engine/gc.cpp | 10 +-- engines/sci/engine/gc.h | 2 +- engines/sci/engine/kernel.cpp | 28 ++++---- engines/sci/engine/kevent.cpp | 6 +- engines/sci/engine/kfile.cpp | 4 +- engines/sci/engine/kgraphics.cpp | 16 ++--- engines/sci/engine/kgraphics32.cpp | 2 +- engines/sci/engine/klists.cpp | 18 +++-- engines/sci/engine/kmisc.cpp | 10 +-- engines/sci/engine/kparse.cpp | 2 +- engines/sci/engine/kpathing.cpp | 8 +-- engines/sci/engine/kscripts.cpp | 16 ++--- engines/sci/engine/kstring.cpp | 32 +++++---- engines/sci/engine/kvideo.cpp | 12 ++-- engines/sci/engine/object.cpp | 24 +++---- engines/sci/engine/object.h | 4 +- engines/sci/engine/savegame.cpp | 13 ++-- engines/sci/engine/script.cpp | 42 ++++++------ engines/sci/engine/scriptdebug.cpp | 101 ++++++++++++++-------------- engines/sci/engine/seg_manager.cpp | 133 +++++++++++++++++++------------------ engines/sci/engine/segment.cpp | 50 +++++++------- engines/sci/engine/segment.h | 14 ++-- engines/sci/engine/selector.h | 2 +- engines/sci/engine/vm.cpp | 89 ++++++++++++------------- engines/sci/engine/vm.h | 2 +- engines/sci/engine/vm_types.cpp | 14 ++-- engines/sci/engine/vm_types.h | 47 +++++++++---- engines/sci/graphics/animate.cpp | 2 +- engines/sci/graphics/menu.cpp | 8 +-- engines/sci/graphics/paint16.cpp | 10 +-- engines/sci/resource.cpp | 2 +- engines/sci/sci.cpp | 10 +-- engines/sci/sound/soundcmd.cpp | 6 +- 36 files changed, 457 insertions(+), 425 deletions(-) diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 94ac437a15..7e9f9b1c38 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -1243,7 +1243,7 @@ bool Console::cmdClassTable(int argc, const char **argv) { for (uint i = 0; i < _engine->_gamestate->_segMan->classTableSize(); i++) { Class temp = _engine->_gamestate->_segMan->_classTable[i]; - if (temp.reg.segment) { + if (temp.reg.getSegment()) { const char *className = _engine->_gamestate->_segMan->getObjectName(temp.reg); if (argc == 1 || (argc == 2 && !strcmp(className, argv[1]))) { DebugPrintf(" Class 0x%x (%s) at %04x:%04x (script %d)\n", i, @@ -1688,7 +1688,7 @@ bool Console::cmdSavedBits(int argc, const char **argv) { Common::Array entries = hunks->listAllDeallocatable(id); for (uint i = 0; i < entries.size(); ++i) { - uint16 offset = entries[i].offset; + uint16 offset = entries[i].getOffset(); const Hunk& h = hunks->_table[offset]; if (strcmp(h.type, "SaveBits()") == 0) { byte* memoryPtr = (byte *)h.mem; @@ -1751,12 +1751,12 @@ bool Console::cmdShowSavedBits(int argc, const char **argv) { return true; } - if (memoryHandle.segment != id || !hunks->isValidOffset(memoryHandle.offset)) { + if (memoryHandle.getSegment() != id || !hunks->isValidOffset(memoryHandle.getOffset())) { DebugPrintf("Invalid address.\n"); return true; } - const Hunk& h = hunks->_table[memoryHandle.offset]; + const Hunk& h = hunks->_table[memoryHandle.getOffset()]; if (strcmp(h.type, "SaveBits()") != 0) { DebugPrintf("Invalid address.\n"); @@ -2266,16 +2266,16 @@ bool Console::cmdGCShowReachable(int argc, const char **argv) { return true; } - SegmentObj *mobj = _engine->_gamestate->_segMan->getSegmentObj(addr.segment); + SegmentObj *mobj = _engine->_gamestate->_segMan->getSegmentObj(addr.getSegment()); if (!mobj) { - DebugPrintf("Unknown segment : %x\n", addr.segment); + DebugPrintf("Unknown segment : %x\n", addr.getSegment()); return 1; } DebugPrintf("Reachable from %04x:%04x:\n", PRINT_REG(addr)); const Common::Array tmp = mobj->listAllOutgoingReferences(addr); for (Common::Array::const_iterator it = tmp.begin(); it != tmp.end(); ++it) - if (it->segment) + if (it->getSegment()) g_sci->getSciDebugger()->DebugPrintf(" %04x:%04x\n", PRINT_REG(*it)); return true; @@ -2298,16 +2298,16 @@ bool Console::cmdGCShowFreeable(int argc, const char **argv) { return true; } - SegmentObj *mobj = _engine->_gamestate->_segMan->getSegmentObj(addr.segment); + SegmentObj *mobj = _engine->_gamestate->_segMan->getSegmentObj(addr.getSegment()); if (!mobj) { - DebugPrintf("Unknown segment : %x\n", addr.segment); + DebugPrintf("Unknown segment : %x\n", addr.getSegment()); return true; } - DebugPrintf("Freeable in segment %04x:\n", addr.segment); - const Common::Array tmp = mobj->listAllDeallocatable(addr.segment); + DebugPrintf("Freeable in segment %04x:\n", addr.getSegment()); + const Common::Array tmp = mobj->listAllDeallocatable(addr.getSegment()); for (Common::Array::const_iterator it = tmp.begin(); it != tmp.end(); ++it) - if (it->segment) + if (it->getSegment()) g_sci->getSciDebugger()->DebugPrintf(" %04x:%04x\n", PRINT_REG(*it)); return true; @@ -2331,9 +2331,9 @@ bool Console::cmdGCNormalize(int argc, const char **argv) { return true; } - SegmentObj *mobj = _engine->_gamestate->_segMan->getSegmentObj(addr.segment); + SegmentObj *mobj = _engine->_gamestate->_segMan->getSegmentObj(addr.getSegment()); if (!mobj) { - DebugPrintf("Unknown segment : %x\n", addr.segment); + DebugPrintf("Unknown segment : %x\n", addr.getSegment()); return true; } @@ -2572,12 +2572,12 @@ bool Console::cmdViewReference(int argc, const char **argv) { DebugPrintf("%04x:%04x is of type 0x%x: ", PRINT_REG(reg), type_mask); - if (reg.segment == 0 && reg.offset == 0) { + if (reg.getSegment() == 0 && reg.getOffset() == 0) { DebugPrintf("Null.\n"); return true; } - if (reg_end.segment != reg.segment && reg_end != NULL_REG) { + if (reg_end.getSegment() != reg.getSegment() && reg_end != NULL_REG) { DebugPrintf("Ending segment different from starting segment. Assuming no bound on dump.\n"); reg_end = NULL_REG; } @@ -2613,7 +2613,7 @@ bool Console::cmdViewReference(int argc, const char **argv) { printObject(reg); break; case SIG_TYPE_REFERENCE: { - switch (_engine->_gamestate->_segMan->getSegmentType(reg.segment)) { + switch (_engine->_gamestate->_segMan->getSegmentType(reg.getSegment())) { #ifdef ENABLE_SCI32 case SEG_TYPE_STRING: { DebugPrintf("SCI32 string\n"); @@ -2629,21 +2629,20 @@ bool Console::cmdViewReference(int argc, const char **argv) { } #endif default: { - int size; const SegmentRef block = _engine->_gamestate->_segMan->dereference(reg); - size = block.maxSize; + uint16 size = block.maxSize; DebugPrintf("raw data\n"); - if (reg_end.segment != 0 && size < reg_end.offset - reg.offset) { + if (reg_end.getSegment() != 0 && size < reg_end.getOffset() - reg.getOffset()) { DebugPrintf("Block end out of bounds (size %d). Resetting.\n", size); reg_end = NULL_REG; } - if (reg_end.segment != 0 && (size >= reg_end.offset - reg.offset)) - size = reg_end.offset - reg.offset; + if (reg_end.getSegment() != 0 && (size >= reg_end.getOffset() - reg.getOffset())) + size = reg_end.getOffset() - reg.getOffset(); - if (reg_end.segment != 0) + if (reg_end.getSegment() != 0) DebugPrintf("Block size less than or equal to %d\n", size); if (block.isRaw) @@ -2655,7 +2654,7 @@ bool Console::cmdViewReference(int argc, const char **argv) { break; } case SIG_TYPE_INTEGER: - DebugPrintf("arithmetic value\n %d (%04x)\n", (int16) reg.offset, reg.offset); + DebugPrintf("arithmetic value\n %d (%04x)\n", (int16) reg.getOffset(), reg.getOffset()); break; default: DebugPrintf("unknown type %d.\n", type); @@ -2725,7 +2724,7 @@ bool Console::cmdBacktrace(int argc, const char **argv) { switch (call.type) { case EXEC_STACK_TYPE_CALL: // Normal function if (call.type == EXEC_STACK_TYPE_CALL) - DebugPrintf(" %x: script %d - ", i, (*(Script *)_engine->_gamestate->_segMan->_heap[call.addr.pc.segment]).getScriptNumber()); + DebugPrintf(" %x: script %d - ", i, (*(Script *)_engine->_gamestate->_segMan->_heap[call.addr.pc.getSegment()]).getScriptNumber()); if (call.debugSelector != -1) { DebugPrintf("%s::%s(", objname, _engine->getKernel()->getSelectorName(call.debugSelector).c_str()); } else if (call.debugExportId != -1) { @@ -2917,7 +2916,7 @@ bool Console::cmdDisassemble(int argc, const char **argv) { addr = disassemble(_engine->_gamestate, addr, printBWTag, printBytecode); if (addr.isNull() && prevAddr < farthestTarget) addr = prevAddr + 1; // skip past the ret - } while (addr.offset > 0); + } while (addr.getOffset() > 0); return true; } @@ -2934,10 +2933,10 @@ bool Console::cmdDisassembleAddress(int argc, const char **argv) { } reg_t vpc = NULL_REG; - int opCount = 1; + uint opCount = 1; bool printBWTag = false; bool printBytes = false; - int size; + uint16 size; if (parse_reg_t(_engine->_gamestate, argv[1], &vpc, false)) { DebugPrintf("Invalid address passed.\n"); @@ -2946,7 +2945,7 @@ bool Console::cmdDisassembleAddress(int argc, const char **argv) { } SegmentRef ref = _engine->_gamestate->_segMan->dereference(vpc); - size = ref.maxSize + vpc.offset; // total segment size + size = ref.maxSize + vpc.getOffset(); // total segment size for (int i = 2; i < argc; i++) { if (!scumm_stricmp(argv[i], "bwt")) @@ -2968,7 +2967,7 @@ bool Console::cmdDisassembleAddress(int argc, const char **argv) { do { vpc = disassemble(_engine->_gamestate, vpc, printBWTag, printBytes); - } while ((vpc.offset > 0) && (vpc.offset + 6 < size) && (--opCount)); + } while ((vpc.getOffset() > 0) && (vpc.getOffset() + 6 < size) && (--opCount)); return true; } @@ -3011,7 +3010,7 @@ void Console::printKernelCallsFound(int kernelFuncNum, bool showFoundScripts) { // Now dissassemble each method of the script object for (uint16 i = 0; i < obj->getMethodCount(); i++) { reg_t fptr = obj->getFunction(i); - uint16 offset = fptr.offset; + uint16 offset = fptr.getOffset(); int16 opparams[4]; byte extOpcode; byte opcode; @@ -3699,8 +3698,8 @@ static int parse_reg_t(EngineState *s, const char *str, reg_t *dest, bool mayBeV return 1; // Now lookup the script's segment - dest->segment = s->_segMan->getScriptSegment(script_nr); - if (!dest->segment) { + dest->setSegment(s->_segMan->getScriptSegment(script_nr)); + if (!dest->getSegment()) { return 1; } @@ -3782,19 +3781,19 @@ static int parse_reg_t(EngineState *s, const char *str, reg_t *dest, bool mayBeV offsetStr = colon + 1; Common::String segmentStr(str, colon); - dest->segment = strtol(segmentStr.c_str(), &endptr, 16); + dest->setSegment(strtol(segmentStr.c_str(), &endptr, 16)); if (*endptr) return 1; } else { int val = 0; - dest->segment = 0; + dest->setSegment(0); if (charsCountNumber == charsCount) { // Only numbers in input, assume decimal value val = strtol(str, &endptr, 10); if (*endptr) return 1; // strtol failed? - dest->offset = val; + dest->setOffset(val); return 0; } else { // We also got letters, check if there were only hexadecimal letters and '0x' at the start or 'h' at the end @@ -3802,7 +3801,7 @@ static int parse_reg_t(EngineState *s, const char *str, reg_t *dest, bool mayBeV val = strtol(str, &endptr, 16); if ((*endptr != 'h') && (*endptr != 0)) return 1; - dest->offset = val; + dest->setOffset(val); return 0; } else { // Something else was in input, assume object name @@ -3851,9 +3850,9 @@ static int parse_reg_t(EngineState *s, const char *str, reg_t *dest, bool mayBeV int val = strtol(offsetStr, &endptr, 16); if (relativeOffset) - dest->offset += val; + dest->incOffset(val); else - dest->offset = val; + dest->setOffset(val); if (*endptr) return 1; @@ -3933,15 +3932,15 @@ void Console::printList(List *list) { while (!pos.isNull()) { Node *node; - NodeTable *nt = (NodeTable *)_engine->_gamestate->_segMan->getSegment(pos.segment, SEG_TYPE_NODES); + NodeTable *nt = (NodeTable *)_engine->_gamestate->_segMan->getSegment(pos.getSegment(), SEG_TYPE_NODES); - if (!nt || !nt->isValidEntry(pos.offset)) { + if (!nt || !nt->isValidEntry(pos.getOffset())) { DebugPrintf(" WARNING: %04x:%04x: Doesn't contain list node!\n", PRINT_REG(pos)); return; } - node = &(nt->_table[pos.offset]); + node = &(nt->_table[pos.getOffset()]); DebugPrintf("\t%04x:%04x : %04x:%04x -> %04x:%04x\n", PRINT_REG(pos), PRINT_REG(node->key), PRINT_REG(node->value)); @@ -3960,37 +3959,37 @@ void Console::printList(List *list) { } int Console::printNode(reg_t addr) { - SegmentObj *mobj = _engine->_gamestate->_segMan->getSegment(addr.segment, SEG_TYPE_LISTS); + SegmentObj *mobj = _engine->_gamestate->_segMan->getSegment(addr.getSegment(), SEG_TYPE_LISTS); if (mobj) { ListTable *lt = (ListTable *)mobj; List *list; - if (!lt->isValidEntry(addr.offset)) { + if (!lt->isValidEntry(addr.getOffset())) { DebugPrintf("Address does not contain a list\n"); return 1; } - list = &(lt->_table[addr.offset]); + list = &(lt->_table[addr.getOffset()]); DebugPrintf("%04x:%04x : first x last = (%04x:%04x, %04x:%04x)\n", PRINT_REG(addr), PRINT_REG(list->first), PRINT_REG(list->last)); } else { NodeTable *nt; Node *node; - mobj = _engine->_gamestate->_segMan->getSegment(addr.segment, SEG_TYPE_NODES); + mobj = _engine->_gamestate->_segMan->getSegment(addr.getSegment(), SEG_TYPE_NODES); if (!mobj) { - DebugPrintf("Segment #%04x is not a list or node segment\n", addr.segment); + DebugPrintf("Segment #%04x is not a list or node segment\n", addr.getSegment()); return 1; } nt = (NodeTable *)mobj; - if (!nt->isValidEntry(addr.offset)) { + if (!nt->isValidEntry(addr.getOffset())) { DebugPrintf("Address does not contain a node\n"); return 1; } - node = &(nt->_table[addr.offset]); + node = &(nt->_table[addr.getOffset()]); DebugPrintf("%04x:%04x : prev x next = (%04x:%04x, %04x:%04x); maps %04x:%04x -> %04x:%04x\n", PRINT_REG(addr), PRINT_REG(node->pred), PRINT_REG(node->succ), PRINT_REG(node->key), PRINT_REG(node->value)); @@ -4028,8 +4027,8 @@ int Console::printObject(reg_t pos) { reg_t val = obj->getVariable(i); DebugPrintf("%04x:%04x", PRINT_REG(val)); - if (!val.segment) - DebugPrintf(" (%d)", val.offset); + if (!val.getSegment()) + DebugPrintf(" (%d)", val.getOffset()); const Object *ref = s->_segMan->getObject(val); if (ref) @@ -4042,8 +4041,8 @@ int Console::printObject(reg_t pos) { reg_t fptr = obj->getFunction(i); DebugPrintf(" [%03x] %s = %04x:%04x\n", obj->getFuncSelector(i), _engine->getKernel()->getSelectorName(obj->getFuncSelector(i)).c_str(), PRINT_REG(fptr)); } - if (s->_segMan->_heap[pos.segment]->getType() == SEG_TYPE_SCRIPT) - DebugPrintf("\nOwner script: %d\n", s->_segMan->getScript(pos.segment)->getScriptNumber()); + if (s->_segMan->_heap[pos.getSegment()]->getType() == SEG_TYPE_SCRIPT) + DebugPrintf("\nOwner script: %d\n", s->_segMan->getScript(pos.getSegment())->getScriptNumber()); return 0; } diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp index 8a932232f8..22c0a1479d 100644 --- a/engines/sci/engine/features.cpp +++ b/engines/sci/engine/features.cpp @@ -74,11 +74,11 @@ bool GameFeatures::autoDetectSoundType() { // Look up the script address reg_t addr = getDetectionAddr("Sound", SELECTOR(play)); - if (!addr.segment) + if (!addr.getSegment()) return false; - uint16 offset = addr.offset; - Script *script = _segMan->getScript(addr.segment); + uint16 offset = addr.getOffset(); + Script *script = _segMan->getScript(addr.getSegment()); uint16 intParam = 0xFFFF; bool foundTarget = false; @@ -221,11 +221,11 @@ bool GameFeatures::autoDetectLofsType(Common::String gameSuperClassName, int met // Look up the script address reg_t addr = getDetectionAddr(gameSuperClassName.c_str(), -1, methodNum); - if (!addr.segment) + if (!addr.getSegment()) return false; - uint16 offset = addr.offset; - Script *script = _segMan->getScript(addr.segment); + uint16 offset = addr.getOffset(); + Script *script = _segMan->getScript(addr.getSegment()); while (true) { int16 opparams[4]; @@ -320,11 +320,11 @@ bool GameFeatures::autoDetectGfxFunctionsType(int methodNum) { // Look up the script address reg_t addr = getDetectionAddr("Rm", SELECTOR(overlay), methodNum); - if (!addr.segment) + if (!addr.getSegment()) return false; - uint16 offset = addr.offset; - Script *script = _segMan->getScript(addr.segment); + uint16 offset = addr.getOffset(); + Script *script = _segMan->getScript(addr.getSegment()); while (true) { int16 opparams[4]; @@ -474,11 +474,11 @@ bool GameFeatures::autoDetectSci21KernelType() { // Look up the script address reg_t addr = getDetectionAddr("Sound", SELECTOR(play)); - if (!addr.segment) + if (!addr.getSegment()) return false; - uint16 offset = addr.offset; - Script *script = _segMan->getScript(addr.segment); + uint16 offset = addr.getOffset(); + Script *script = _segMan->getScript(addr.getSegment()); while (true) { int16 opparams[4]; @@ -550,11 +550,11 @@ bool GameFeatures::autoDetectSci21StringFunctionType() { // Look up the script address reg_t addr = getDetectionAddr("Str", SELECTOR(size)); - if (!addr.segment) + if (!addr.getSegment()) return false; - uint16 offset = addr.offset; - Script *script = _segMan->getScript(addr.segment); + uint16 offset = addr.getOffset(); + Script *script = _segMan->getScript(addr.getSegment()); while (true) { int16 opparams[4]; @@ -587,11 +587,11 @@ bool GameFeatures::autoDetectMoveCountType() { // Look up the script address reg_t addr = getDetectionAddr("Motion", SELECTOR(doit)); - if (!addr.segment) + if (!addr.getSegment()) return false; - uint16 offset = addr.offset; - Script *script = _segMan->getScript(addr.segment); + uint16 offset = addr.getOffset(); + Script *script = _segMan->getScript(addr.getSegment()); bool foundTarget = false; while (true) { diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp index c44963f457..0d575f97dd 100644 --- a/engines/sci/engine/file.cpp +++ b/engines/sci/engine/file.cpp @@ -269,7 +269,7 @@ Common::String DirSeeker::getVirtualFilename(uint fileNumber) { reg_t DirSeeker::firstFile(const Common::String &mask, reg_t buffer, SegManager *segMan) { // Verify that we are given a valid buffer - if (!buffer.segment) { + if (!buffer.getSegment()) { error("DirSeeker::firstFile('%s') invoked with invalid buffer", mask.c_str()); return NULL_REG; } diff --git a/engines/sci/engine/gc.cpp b/engines/sci/engine/gc.cpp index 2d71878bda..9a30ff3e17 100644 --- a/engines/sci/engine/gc.cpp +++ b/engines/sci/engine/gc.cpp @@ -47,7 +47,7 @@ const char *segmentTypeNames[] = { #endif void WorklistManager::push(reg_t reg) { - if (!reg.segment) // No numbers + if (!reg.getSegment()) // No numbers return; debugC(kDebugLevelGC, "[GC] Adding %04x:%04x", PRINT_REG(reg)); @@ -69,7 +69,7 @@ static AddrSet *normalizeAddresses(SegManager *segMan, const AddrSet &nonnormal_ for (AddrSet::const_iterator i = nonnormal_map.begin(); i != nonnormal_map.end(); ++i) { reg_t reg = i->_key; - SegmentObj *mobj = segMan->getSegmentObj(reg.segment); + SegmentObj *mobj = segMan->getSegmentObj(reg.getSegment()); if (mobj) { reg = mobj->findCanonicAddress(segMan, reg); @@ -85,11 +85,11 @@ static void processWorkList(SegManager *segMan, WorklistManager &wm, const Commo while (!wm._worklist.empty()) { reg_t reg = wm._worklist.back(); wm._worklist.pop_back(); - if (reg.segment != stackSegment) { // No need to repeat this one + if (reg.getSegment() != stackSegment) { // No need to repeat this one debugC(kDebugLevelGC, "[GC] Checking %04x:%04x", PRINT_REG(reg)); - if (reg.segment < heap.size() && heap[reg.segment]) { + if (reg.getSegment() < heap.size() && heap[reg.getSegment()]) { // Valid heap object? Find its outgoing references! - wm.pushArray(heap[reg.segment]->listAllOutgoingReferences(reg)); + wm.pushArray(heap[reg.getSegment()]->listAllOutgoingReferences(reg)); } } } diff --git a/engines/sci/engine/gc.h b/engines/sci/engine/gc.h index 97aa6513b6..9e02bbd0bd 100644 --- a/engines/sci/engine/gc.h +++ b/engines/sci/engine/gc.h @@ -32,7 +32,7 @@ namespace Sci { struct reg_t_Hash { uint operator()(const reg_t& x) const { - return (x.segment << 3) ^ x.offset ^ (x.offset << 16); + return (x.getSegment() << 3) ^ x.getOffset() ^ (x.getOffset() << 16); } }; diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 3a33c928e7..c8fe47d9fc 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -357,27 +357,27 @@ static uint16 *parseKernelSignature(const char *kernelName, const char *writtenS uint16 Kernel::findRegType(reg_t reg) { // No segment? Must be integer - if (!reg.segment) - return SIG_TYPE_INTEGER | (reg.offset ? 0 : SIG_TYPE_NULL); + if (!reg.getSegment()) + return SIG_TYPE_INTEGER | (reg.getOffset() ? 0 : SIG_TYPE_NULL); - if (reg.segment == 0xFFFF) + if (reg.getSegment() == 0xFFFF) return SIG_TYPE_UNINITIALIZED; // Otherwise it's an object - SegmentObj *mobj = _segMan->getSegmentObj(reg.segment); + SegmentObj *mobj = _segMan->getSegmentObj(reg.getSegment()); if (!mobj) return SIG_TYPE_ERROR; uint16 result = 0; - if (!mobj->isValidOffset(reg.offset)) + if (!mobj->isValidOffset(reg.getOffset())) result |= SIG_IS_INVALID; switch (mobj->getType()) { case SEG_TYPE_SCRIPT: - if (reg.offset <= (*(Script *)mobj).getBufSize() && - reg.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET && - (*(Script *)mobj).offsetIsObject(reg.offset)) { - result |= ((Script *)mobj)->getObject(reg.offset) ? SIG_TYPE_OBJECT : SIG_TYPE_REFERENCE; + if (reg.getOffset() <= (*(Script *)mobj).getBufSize() && + reg.getOffset() >= (uint)-SCRIPT_OBJECT_MAGIC_OFFSET && + (*(Script *)mobj).offsetIsObject(reg.getOffset())) { + result |= ((Script *)mobj)->getObject(reg.getOffset()) ? SIG_TYPE_OBJECT : SIG_TYPE_REFERENCE; } else result |= SIG_TYPE_REFERENCE; break; @@ -608,7 +608,7 @@ void Kernel::mapFunctions() { _kernelFuncs[id].workarounds = kernelMap->workarounds; if (kernelMap->subFunctions) { // Get version for subfunction identification - SciVersion mySubVersion = (SciVersion)kernelMap->function(NULL, 0, NULL).offset; + SciVersion mySubVersion = (SciVersion)kernelMap->function(NULL, 0, NULL).getOffset(); // Now check whats the highest subfunction-id for this version const SciKernelMapSubEntry *kernelSubMap = kernelMap->subFunctions; uint16 subFunctionCount = 0; @@ -885,15 +885,15 @@ Common::String Kernel::lookupText(reg_t address, int index) { char *seeker; Resource *textres; - if (address.segment) + if (address.getSegment()) return _segMan->getString(address); int textlen; int _index = index; - textres = _resMan->findResource(ResourceId(kResourceTypeText, address.offset), 0); + textres = _resMan->findResource(ResourceId(kResourceTypeText, address.getOffset()), 0); if (!textres) { - error("text.%03d not found", address.offset); + error("text.%03d not found", address.getOffset()); return NULL; /* Will probably segfault */ } @@ -907,7 +907,7 @@ Common::String Kernel::lookupText(reg_t address, int index) { if (textlen) return seeker; - error("Index %d out of bounds in text.%03d", _index, address.offset); + error("Index %d out of bounds in text.%03d", _index, address.getOffset()); return NULL; } diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp index df3b3efd57..34477cc23b 100644 --- a/engines/sci/engine/kevent.cpp +++ b/engines/sci/engine/kevent.cpp @@ -157,7 +157,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) { s->r_acc = NULL_REG; } - if ((s->r_acc.offset) && (g_sci->_debugState.stopOnEvent)) { + if ((s->r_acc.getOffset()) && (g_sci->_debugState.stopOnEvent)) { g_sci->_debugState.stopOnEvent = false; // A SCI event occurred, and we have been asked to stop, so open the debug console @@ -248,7 +248,7 @@ reg_t kGlobalToLocal(EngineState *s, int argc, reg_t *argv) { reg_t planeObject = argc > 1 ? argv[1] : NULL_REG; // SCI32 SegManager *segMan = s->_segMan; - if (obj.segment) { + if (obj.getSegment()) { int16 x = readSelectorValue(segMan, obj, SELECTOR(x)); int16 y = readSelectorValue(segMan, obj, SELECTOR(y)); @@ -267,7 +267,7 @@ reg_t kLocalToGlobal(EngineState *s, int argc, reg_t *argv) { reg_t planeObject = argc > 1 ? argv[1] : NULL_REG; // SCI32 SegManager *segMan = s->_segMan; - if (obj.segment) { + if (obj.getSegment()) { int16 x = readSelectorValue(segMan, obj, SELECTOR(x)); int16 y = readSelectorValue(segMan, obj, SELECTOR(y)); diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 7a2f161829..a21e19802d 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -185,7 +185,7 @@ reg_t kCheckFreeSpace(EngineState *s, int argc, reg_t *argv) { reg_t kValidPath(EngineState *s, int argc, reg_t *argv) { Common::String path = s->_segMan->getString(argv[0]); - debug(3, "kValidPath(%s) -> %d", path.c_str(), s->r_acc.offset); + debug(3, "kValidPath(%s) -> %d", path.c_str(), s->r_acc.getOffset()); // Always return true return make_reg(0, 1); @@ -866,7 +866,7 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) { // saving a previously restored game. // We set the current savedgame-id directly and remove the script // code concerning this via script patch. - s->variables[VAR_GLOBAL][0xB3].offset = SAVEGAMEID_OFFICIALRANGE_START + savegameId; + s->variables[VAR_GLOBAL][0xB3].setOffset(SAVEGAMEID_OFFICIALRANGE_START + savegameId); } } else { s->r_acc = TRUE_REG; diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 8bf7be4ca3..8f4d99f7df 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -337,7 +337,7 @@ reg_t kTextSize(EngineState *s, int argc, reg_t *argv) { Common::String sep_str; const char *sep = NULL; - if ((argc > 4) && (argv[4].segment)) { + if ((argc > 4) && (argv[4].getSegment())) { sep_str = s->_segMan->getString(argv[4]); sep = sep_str.c_str(); } @@ -789,7 +789,7 @@ void _k_GenericDrawControl(EngineState *s, reg_t controlObject, bool hilite) { Common::Rect rect; TextAlignment alignment; int16 mode, maxChars, cursorPos, upperPos, listCount, i; - int16 upperOffset, cursorOffset; + uint16 upperOffset, cursorOffset; GuiResourceId viewId; int16 loopNo; int16 celNo; @@ -871,7 +871,7 @@ void _k_GenericDrawControl(EngineState *s, reg_t controlObject, bool hilite) { listCount = 0; listSeeker = textReference; while (s->_segMan->strlen(listSeeker) > 0) { listCount++; - listSeeker.offset += maxChars; + listSeeker.incOffset(maxChars); } // TODO: This is rather convoluted... It would be a lot cleaner @@ -885,11 +885,11 @@ void _k_GenericDrawControl(EngineState *s, reg_t controlObject, bool hilite) { for (i = 0; i < listCount; i++) { listStrings[i] = s->_segMan->getString(listSeeker); listEntries[i] = listStrings[i].c_str(); - if (listSeeker.offset == upperOffset) + if (listSeeker.getOffset() == upperOffset) upperPos = i; - if (listSeeker.offset == cursorOffset) + if (listSeeker.getOffset() == cursorOffset) cursorPos = i; - listSeeker.offset += maxChars; + listSeeker.incOffset(maxChars); } } @@ -1104,7 +1104,7 @@ reg_t kNewWindow(EngineState *s, int argc, reg_t *argv) { rect2 = Common::Rect (argv[5].toSint16(), argv[4].toSint16(), argv[7].toSint16(), argv[6].toSint16()); Common::String title; - if (argv[4 + argextra].segment) { + if (argv[4 + argextra].getSegment()) { title = s->_segMan->getString(argv[4 + argextra]); title = g_sci->strSplit(title.c_str(), NULL); } @@ -1143,7 +1143,7 @@ reg_t kDisplay(EngineState *s, int argc, reg_t *argv) { Common::String text; - if (textp.segment) { + if (textp.getSegment()) { argc--; argv++; text = s->_segMan->getString(textp); } else { diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 377c05935a..413ad1ecb1 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -140,7 +140,7 @@ reg_t kIsOnMe(EngineState *s, int argc, reg_t *argv) { uint16 x = argv[0].toUint16(); uint16 y = argv[1].toUint16(); reg_t targetObject = argv[2]; - uint16 illegalBits = argv[3].offset; + uint16 illegalBits = argv[3].getOffset(); Common::Rect nsRect = g_sci->_gfxCompare->getNSRect(targetObject, true); // we assume that x, y are local coordinates diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp index 5a608af034..15d18eb4bb 100644 --- a/engines/sci/engine/klists.cpp +++ b/engines/sci/engine/klists.cpp @@ -409,10 +409,14 @@ int sort_temp_cmp(const void *p1, const void *p2) { const sort_temp_t *st1 = (const sort_temp_t *)p1; const sort_temp_t *st2 = (const sort_temp_t *)p2; - if (st1->order.segment < st2->order.segment || (st1->order.segment == st2->order.segment && st1->order.offset < st2->order.offset)) + if (st1->order.getSegment() < st2->order.getSegment() || + (st1->order.getSegment() == st2->order.getSegment() && + st1->order.getOffset() < st2->order.getOffset())) return -1; - if (st1->order.segment > st2->order.segment || (st1->order.segment == st2->order.segment && st1->order.offset > st2->order.offset)) + if (st1->order.getSegment() > st2->order.getSegment() || + (st1->order.getSegment() == st2->order.getSegment() && + st1->order.getOffset() > st2->order.getOffset())) return 1; return 0; @@ -665,15 +669,15 @@ reg_t kArray(EngineState *s, int argc, reg_t *argv) { if (argv[2].toUint16() == 3) return kString(s, argc, argv); } else { - if (s->_segMan->getSegmentType(argv[1].segment) == SEG_TYPE_STRING || - s->_segMan->getSegmentType(argv[1].segment) == SEG_TYPE_SCRIPT) { + if (s->_segMan->getSegmentType(argv[1].getSegment()) == SEG_TYPE_STRING || + s->_segMan->getSegmentType(argv[1].getSegment()) == SEG_TYPE_SCRIPT) { return kString(s, argc, argv); } #if 0 if (op == 6) { - if (s->_segMan->getSegmentType(argv[3].segment) == SEG_TYPE_STRING || - s->_segMan->getSegmentType(argv[3].segment) == SEG_TYPE_SCRIPT) { + if (s->_segMan->getSegmentType(argv[3].getSegment()) == SEG_TYPE_STRING || + s->_segMan->getSegmentType(argv[3].getSegment()) == SEG_TYPE_SCRIPT) { return kString(s, argc, argv); } } @@ -792,7 +796,7 @@ reg_t kArray(EngineState *s, int argc, reg_t *argv) { #endif return NULL_REG; } - if (s->_segMan->getSegmentObj(argv[1].segment)->getType() != SEG_TYPE_ARRAY) + if (s->_segMan->getSegmentObj(argv[1].getSegment())->getType() != SEG_TYPE_ARRAY) error("kArray(Dup): Request to duplicate a segment which isn't an array"); reg_t arrayHandle; diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index 2e80764d01..12c830f622 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -128,7 +128,7 @@ reg_t kMemoryInfo(EngineState *s, int argc, reg_t *argv) { // fragmented const uint16 size = 0x7fea; - switch (argv[0].offset) { + switch (argv[0].getOffset()) { case K_MEMORYINFO_LARGEST_HEAP_BLOCK: // In order to prevent "Memory fragmented" dialogs from // popping up in some games, we must return FREE_HEAP - 2 here. @@ -140,7 +140,7 @@ reg_t kMemoryInfo(EngineState *s, int argc, reg_t *argv) { return make_reg(0, size); default: - error("Unknown MemoryInfo operation: %04x", argv[0].offset); + error("Unknown MemoryInfo operation: %04x", argv[0].getOffset()); } return NULL_REG; @@ -304,7 +304,7 @@ reg_t kMemory(EngineState *s, int argc, reg_t *argv) { break; } case K_MEMORY_PEEK : { - if (!argv[1].segment) { + if (!argv[1].getSegment()) { // This occurs in KQ5CD when interacting with certain objects warning("Attempt to peek invalid memory at %04x:%04x", PRINT_REG(argv[1])); return s->r_acc; @@ -334,11 +334,11 @@ reg_t kMemory(EngineState *s, int argc, reg_t *argv) { } if (ref.isRaw) { - if (argv[2].segment) { + if (argv[2].getSegment()) { error("Attempt to poke memory reference %04x:%04x to %04x:%04x", PRINT_REG(argv[2]), PRINT_REG(argv[1])); return s->r_acc; } - WRITE_SCIENDIAN_UINT16(ref.raw, argv[2].offset); // Amiga versions are BE + WRITE_SCIENDIAN_UINT16(ref.raw, argv[2].getOffset()); // Amiga versions are BE } else { if (ref.skipByte) error("Attempt to poke memory at odd offset %04X:%04X", PRINT_REG(argv[1])); diff --git a/engines/sci/engine/kparse.cpp b/engines/sci/engine/kparse.cpp index 59694cb6ee..5e861daaa4 100644 --- a/engines/sci/engine/kparse.cpp +++ b/engines/sci/engine/kparse.cpp @@ -48,7 +48,7 @@ reg_t kSaid(EngineState *s, int argc, reg_t *argv) { const int debug_parser = 0; #endif - if (!heap_said_block.segment) + if (!heap_said_block.getSegment()) return NULL_REG; said_block = (byte *)s->_segMan->derefBulkPtr(heap_said_block, 0); diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index 089b325a7f..002ef1ff07 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -367,7 +367,7 @@ static void draw_input(EngineState *s, reg_t poly_list, Common::Point start, Com draw_point(s, start, 1, width, height); draw_point(s, end, 0, width, height); - if (!poly_list.segment) + if (!poly_list.getSegment()) return; list = s->_segMan->lookupList(poly_list); @@ -423,7 +423,7 @@ static void print_input(EngineState *s, reg_t poly_list, Common::Point start, Co debug("End point: (%i, %i)", end.x, end.y); debug("Optimization level: %i", opt); - if (!poly_list.segment) + if (!poly_list.getSegment()) return; list = s->_segMan->lookupList(poly_list); @@ -1180,7 +1180,7 @@ static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Co PathfindingState *pf_s = new PathfindingState(width, height); // Convert all polygons - if (poly_list.segment) { + if (poly_list.getSegment()) { List *list = s->_segMan->lookupList(poly_list); Node *node = s->_segMan->lookupNode(list->first); @@ -1503,7 +1503,7 @@ reg_t kAvoidPath(EngineState *s, int argc, reg_t *argv) { draw_point(s, start, 1, width, height); draw_point(s, end, 0, width, height); - if (poly_list.segment) { + if (poly_list.getSegment()) { print_input(s, poly_list, start, end, opt); draw_input(s, poly_list, start, end, opt, width, height); } diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index 9b0e490d7e..c9e94a52a4 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -140,7 +140,7 @@ reg_t kClone(EngineState *s, int argc, reg_t *argv) { debugC(kDebugLevelMemory, "Attempting to clone from %04x:%04x", PRINT_REG(parentAddr)); - uint16 infoSelector = parentObj->getInfoSelector().offset; + uint16 infoSelector = parentObj->getInfoSelector().getOffset(); cloneObj = s->_segMan->allocateClone(&cloneAddr); if (!cloneObj) { @@ -169,8 +169,8 @@ reg_t kClone(EngineState *s, int argc, reg_t *argv) { cloneObj->setSpeciesSelector(cloneObj->getPos()); if (parentObj->isClass()) cloneObj->setSuperClassSelector(parentObj->getPos()); - s->_segMan->getScript(parentObj->getPos().segment)->incrementLockers(); - s->_segMan->getScript(cloneObj->getPos().segment)->incrementLockers(); + s->_segMan->getScript(parentObj->getPos().getSegment())->incrementLockers(); + s->_segMan->getScript(cloneObj->getPos().getSegment())->incrementLockers(); return cloneAddr; } @@ -191,7 +191,7 @@ reg_t kDisposeClone(EngineState *s, int argc, reg_t *argv) { // At least kq4early relies on this behavior. The scripts clone "Sound", then set bit 1 manually // and call kDisposeClone later. In that case we may not free it, otherwise we will run into issues // later, because kIsObject would then return false and Sound object wouldn't get checked. - uint16 infoSelector = object->getInfoSelector().offset; + uint16 infoSelector = object->getInfoSelector().getOffset(); if ((infoSelector & 3) == kInfoFlagClone) object->markAsFreed(); @@ -203,7 +203,7 @@ reg_t kScriptID(EngineState *s, int argc, reg_t *argv) { int script = argv[0].toUint16(); uint16 index = (argc > 1) ? argv[1].toUint16() : 0; - if (argv[0].segment) + if (argv[0].getSegment()) return argv[0]; SegmentId scriptSeg = s->_segMan->getScriptSegment(script, SCRIPT_GET_LOAD); @@ -251,12 +251,12 @@ reg_t kScriptID(EngineState *s, int argc, reg_t *argv) { } reg_t kDisposeScript(EngineState *s, int argc, reg_t *argv) { - int script = argv[0].offset; + int script = argv[0].getOffset(); SegmentId id = s->_segMan->getScriptSegment(script); Script *scr = s->_segMan->getScriptIfLoaded(id); if (scr && !scr->isMarkedAsDeleted()) { - if (s->_executionStack.back().addr.pc.segment != id) + if (s->_executionStack.back().addr.pc.getSegment() != id) scr->setLockers(1); } @@ -273,7 +273,7 @@ reg_t kDisposeScript(EngineState *s, int argc, reg_t *argv) { } reg_t kIsObject(EngineState *s, int argc, reg_t *argv) { - if (argv[0].offset == SIGNAL_OFFSET) // Treated specially + if (argv[0].getOffset() == SIGNAL_OFFSET) // Treated specially return NULL_REG; else return make_reg(0, s->_segMan->isHeapObject(argv[0])); diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 33b8c15e9f..8d627efacf 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -33,7 +33,7 @@ namespace Sci { reg_t kStrEnd(EngineState *s, int argc, reg_t *argv) { reg_t address = argv[0]; - address.offset += s->_segMan->strlen(address); + address.incOffset(s->_segMan->strlen(address)); return address; } @@ -123,18 +123,22 @@ reg_t kStrAt(EngineState *s, int argc, reg_t *argv) { oddOffset = !oddOffset; if (!oddOffset) { - value = tmp.offset & 0x00ff; + value = tmp.getOffset() & 0x00ff; if (argc > 2) { /* Request to modify this char */ - tmp.offset &= 0xff00; - tmp.offset |= newvalue; - tmp.segment = 0; + uint16 offset = tmp.toUint16(); + offset &= 0xff00; + offset |= newvalue; + tmp.setOffset(offset); + tmp.setSegment(0); } } else { - value = tmp.offset >> 8; + value = tmp.getOffset() >> 8; if (argc > 2) { /* Request to modify this char */ - tmp.offset &= 0x00ff; - tmp.offset |= newvalue << 8; - tmp.segment = 0; + uint16 offset = tmp.toUint16(); + offset &= 0x00ff; + offset |= newvalue << 8; + tmp.setOffset(offset); + tmp.setSegment(0); } } } @@ -204,7 +208,7 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) { int strLength = 0; /* Used for stuff like "%13s" */ bool unsignedVar = false; - if (position.segment) + if (position.getSegment()) startarg = 2; else { // WORKAROUND: QFG1 VGA Mac calls this without the first parameter (dest). It then @@ -291,7 +295,7 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) { if (extralen < 0) extralen = 0; - if (reg.segment) /* Heap address? */ + if (reg.getSegment()) /* Heap address? */ paramindex++; else paramindex += 2; /* No, text resource address */ @@ -654,7 +658,7 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) { return make_reg(0, s->_segMan->getString(argv[1]).size()); case 2: { // At (return value at an index) // Note that values are put in bytes to avoid sign extension - if (argv[1].segment == s->_segMan->getStringSegmentId()) { + if (argv[1].getSegment() == s->_segMan->getStringSegmentId()) { SciString *string = s->_segMan->lookupString(argv[1]); byte val = string->getRawData()[argv[2].toUint16()]; return make_reg(0, val); @@ -705,7 +709,7 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) { uint32 string2Size = 0; Common::String string; - if (argv[3].segment == s->_segMan->getStringSegmentId()) { + if (argv[3].getSegment() == s->_segMan->getStringSegmentId()) { SciString *sstr; sstr = s->_segMan->lookupString(argv[3]); string2 = sstr->getRawData(); @@ -755,7 +759,7 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) { SciString *dupString = s->_segMan->allocateString(&stringHandle); - if (argv[1].segment == s->_segMan->getStringSegmentId()) { + if (argv[1].getSegment() == s->_segMan->getStringSegmentId()) { *dupString = *s->_segMan->lookupString(argv[1]); } else { dupString->fromString(s->_segMan->getString(argv[1])); diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index fa44a7dc19..8e4cdbcb09 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -135,7 +135,7 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) { Video::VideoDecoder *videoDecoder = 0; - if (argv[0].segment != 0) { + if (argv[0].getSegment() != 0) { Common::String filename = s->_segMan->getString(argv[0]); if (g_sci->getPlatform() == Common::kPlatformMacintosh) { @@ -303,7 +303,7 @@ reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv) { // with subfx 21. The subtleness has to do with creation of temporary // planes and positioning relative to such planes. - uint16 flags = argv[3].offset; + uint16 flags = argv[3].getOffset(); Common::String flagspec; if (argc > 3) { @@ -331,12 +331,12 @@ reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv) { s->_videoState.flags = flags; } - warning("x, y: %d, %d", argv[1].offset, argv[2].offset); - s->_videoState.x = argv[1].offset; - s->_videoState.y = argv[2].offset; + warning("x, y: %d, %d", argv[1].getOffset(), argv[2].getOffset()); + s->_videoState.x = argv[1].getOffset(); + s->_videoState.y = argv[2].getOffset(); if (argc > 4 && flags & 16) - warning("gammaBoost: %d%% between palette entries %d and %d", argv[4].offset, argv[5].offset, argv[6].offset); + warning("gammaBoost: %d%% between palette entries %d and %d", argv[4].getOffset(), argv[5].getOffset(), argv[6].getOffset()); break; } case 6: // Play diff --git a/engines/sci/engine/object.cpp b/engines/sci/engine/object.cpp index de028392ea..b28026b71f 100644 --- a/engines/sci/engine/object.cpp +++ b/engines/sci/engine/object.cpp @@ -44,15 +44,15 @@ static bool relocateBlock(Common::Array &block, int block_location, Segme error("Attempt to relocate odd variable #%d.5e (relative to %04x)\n", idx, block_location); return false; } - block[idx].segment = segment; // Perform relocation + block[idx].setSegment(segment); // Perform relocation if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1) - block[idx].offset += scriptSize; + block[idx].incOffset(scriptSize); return true; } void Object::init(byte *buf, reg_t obj_pos, bool initVariables) { - byte *data = buf + obj_pos.offset; + byte *data = buf + obj_pos.getOffset(); _baseObj = data; _pos = obj_pos; @@ -109,7 +109,7 @@ int Object::locateVarSelector(SegManager *segMan, Selector slc) const { } bool Object::relocateSci0Sci21(SegmentId segment, int location, size_t scriptSize) { - return relocateBlock(_variables, getPos().offset, segment, location, scriptSize); + return relocateBlock(_variables, getPos().getOffset(), segment, location, scriptSize); } bool Object::relocateSci3(SegmentId segment, uint32 location, int offset, size_t scriptSize) { @@ -117,8 +117,8 @@ bool Object::relocateSci3(SegmentId segment, uint32 location, int offset, size_t for (uint i = 0; i < _variables.size(); ++i) { if (location == _propertyOffsetsSci3[i]) { - _variables[i].segment = segment; - _variables[i].offset += offset; + _variables[i].setSegment(segment); + _variables[i].incOffset(offset); return true; } } @@ -148,21 +148,21 @@ int Object::propertyOffsetToId(SegManager *segMan, int propertyOffset) const { } void Object::initSpecies(SegManager *segMan, reg_t addr) { - uint16 speciesOffset = getSpeciesSelector().offset; + uint16 speciesOffset = getSpeciesSelector().getOffset(); if (speciesOffset == 0xffff) // -1 setSpeciesSelector(NULL_REG); // no species else - setSpeciesSelector(segMan->getClassAddress(speciesOffset, SCRIPT_GET_LOCK, addr.segment)); + setSpeciesSelector(segMan->getClassAddress(speciesOffset, SCRIPT_GET_LOCK, addr.getSegment())); } void Object::initSuperClass(SegManager *segMan, reg_t addr) { - uint16 superClassOffset = getSuperClassSelector().offset; + uint16 superClassOffset = getSuperClassSelector().getOffset(); if (superClassOffset == 0xffff) // -1 setSuperClassSelector(NULL_REG); // no superclass else - setSuperClassSelector(segMan->getClassAddress(superClassOffset, SCRIPT_GET_LOCK, addr.segment)); + setSuperClassSelector(segMan->getClassAddress(superClassOffset, SCRIPT_GET_LOCK, addr.getSegment())); } bool Object::initBaseObject(SegManager *segMan, reg_t addr, bool doInitSuperClass) { @@ -187,7 +187,7 @@ bool Object::initBaseObject(SegManager *segMan, reg_t addr, bool doInitSuperClas // The effect is that a number of its method selectors may be // treated as variable selectors, causing unpredictable effects. - int objScript = segMan->getScript(_pos.segment)->getScriptNumber(); + int objScript = segMan->getScript(_pos.getSegment())->getScriptNumber(); // We have to do a little bit of work to get the name of the object // before any relocations are done. @@ -196,7 +196,7 @@ bool Object::initBaseObject(SegManager *segMan, reg_t addr, bool doInitSuperClas if (nameReg.isNull()) { name = ""; } else { - nameReg.segment = _pos.segment; + nameReg.setSegment(_pos.getSegment()); name = segMan->derefString(nameReg); if (!name) name = ""; diff --git a/engines/sci/engine/object.h b/engines/sci/engine/object.h index e8deafa8bd..1ea9ae449a 100644 --- a/engines/sci/engine/object.h +++ b/engines/sci/engine/object.h @@ -168,7 +168,7 @@ public: uint16 offset = (getSciVersion() < SCI_VERSION_1_1) ? _methodCount + 1 + i : i * 2 + 2; if (getSciVersion() == SCI_VERSION_3) offset--; - return make_reg(_pos.segment, _baseMethod[offset]); + return make_reg(_pos.getSegment(), _baseMethod[offset]); } Selector getFuncSelector(uint16 i) const { @@ -198,7 +198,7 @@ public: */ int locateVarSelector(SegManager *segMan, Selector slc) const; - bool isClass() const { return (getInfoSelector().offset & kInfoFlagClass); } + bool isClass() const { return (getInfoSelector().getOffset() & kInfoFlagClass); } const Object *getClass(SegManager *segMan) const; void markAsFreed() { _flags |= OBJECT_FLAG_FREED; } diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index cabe5f468a..ff3f19b53d 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -115,8 +115,9 @@ void syncArray(Common::Serializer &s, Common::Array &arr) { template<> void syncWithSerializer(Common::Serializer &s, reg_t &obj) { - s.syncAsUint16LE(obj.segment); - s.syncAsUint16LE(obj.offset); + // Segment and offset are accessed directly here + s.syncAsUint16LE(obj._segment); + s.syncAsUint16LE(obj._offset); } template<> @@ -202,7 +203,7 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) { ObjMap objects = scr->getObjectMap(); for (ObjMap::iterator it = objects.begin(); it != objects.end(); ++it) - it->_value.syncBaseObject(scr->getBuf(it->_value.getPos().offset)); + it->_value.syncBaseObject(scr->getBuf(it->_value.getPos().getOffset())); } @@ -507,7 +508,7 @@ void Script::saveLoadWithSerializer(Common::Serializer &s) { Object tmp; for (uint i = 0; i < numObjs; ++i) { syncWithSerializer(s, tmp); - _objects[tmp.getPos().offset] = tmp; + _objects[tmp.getPos().getOffset()] = tmp; } } else { ObjMap::iterator it; @@ -816,7 +817,7 @@ bool gamestate_save(EngineState *s, Common::WriteStream *fh, const Common::Strin Resource *script0 = g_sci->getResMan()->findResource(ResourceId(kResourceTypeScript, 0), false); meta.script0Size = script0->size; - meta.gameObjectOffset = g_sci->getGameObject().offset; + meta.gameObjectOffset = g_sci->getGameObject().getOffset(); // Checking here again if (s->executionStackBase) { @@ -867,7 +868,7 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { if (meta.gameObjectOffset > 0 && meta.script0Size > 0) { Resource *script0 = g_sci->getResMan()->findResource(ResourceId(kResourceTypeScript, 0), false); - if (script0->size != meta.script0Size || g_sci->getGameObject().offset != meta.gameObjectOffset) { + if (script0->size != meta.script0Size || g_sci->getGameObject().getOffset() != meta.gameObjectOffset) { //warning("This saved game was created with a different version of the game, unable to load it"); showScummVMDialog("This saved game was created with a different version of the game, unable to load it"); diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index d018872b43..897ceccad3 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -239,14 +239,14 @@ const Object *Script::getObject(uint16 offset) const { Object *Script::scriptObjInit(reg_t obj_pos, bool fullObjectInit) { if (getSciVersion() < SCI_VERSION_1_1 && fullObjectInit) - obj_pos.offset += 8; // magic offset (SCRIPT_OBJECT_MAGIC_OFFSET) + obj_pos.incOffset(8); // magic offset (SCRIPT_OBJECT_MAGIC_OFFSET) - if (obj_pos.offset >= _bufSize) + if (obj_pos.getOffset() >= _bufSize) error("Attempt to initialize object beyond end of script"); // Get the object at the specified position and init it. This will // automatically "allocate" space for it in the _objects map if necessary. - Object *obj = &_objects[obj_pos.offset]; + Object *obj = &_objects[obj_pos.getOffset()]; obj->init(_buf, obj_pos, fullObjectInit); return obj; @@ -269,9 +269,9 @@ static bool relocateBlock(Common::Array &block, int block_location, Segme error("Attempt to relocate odd variable #%d.5e (relative to %04x)\n", idx, block_location); return false; } - block[idx].segment = segment; // Perform relocation + block[idx].setSegment(segment); // Perform relocation if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1) - block[idx].offset += scriptSize; + block[idx].incOffset(scriptSize); return true; } @@ -310,23 +310,23 @@ void Script::relocateSci0Sci21(reg_t block) { heapOffset = _scriptSize; } - if (block.offset >= (uint16)heapSize || - READ_SCI11ENDIAN_UINT16(heap + block.offset) * 2 + block.offset >= (uint16)heapSize) + if (block.getOffset() >= (uint16)heapSize || + READ_SCI11ENDIAN_UINT16(heap + block.getOffset()) * 2 + block.getOffset() >= (uint16)heapSize) error("Relocation block outside of script"); - int count = READ_SCI11ENDIAN_UINT16(heap + block.offset); + int count = READ_SCI11ENDIAN_UINT16(heap + block.getOffset()); int exportIndex = 0; int pos = 0; for (int i = 0; i < count; i++) { - pos = READ_SCI11ENDIAN_UINT16(heap + block.offset + 2 + (exportIndex * 2)) + heapOffset; + pos = READ_SCI11ENDIAN_UINT16(heap + block.getOffset() + 2 + (exportIndex * 2)) + heapOffset; // This occurs in SCI01/SCI1 games where usually one export value is // zero. It seems that in this situation, we should skip the export and // move to the next one, though the total count of valid exports remains // the same if (!pos) { exportIndex++; - pos = READ_SCI11ENDIAN_UINT16(heap + block.offset + 2 + (exportIndex * 2)) + heapOffset; + pos = READ_SCI11ENDIAN_UINT16(heap + block.getOffset() + 2 + (exportIndex * 2)) + heapOffset; if (!pos) error("Script::relocate(): Consecutive zero exports found"); } @@ -335,12 +335,12 @@ void Script::relocateSci0Sci21(reg_t block) { // We only relocate locals and objects here, and ignore relocation of // code blocks. In SCI1.1 and newer versions, only locals and objects // are relocated. - if (!relocateLocal(block.segment, pos)) { + if (!relocateLocal(block.getSegment(), pos)) { // Not a local? It's probably an object or code block. If it's an // object, relocate it. const ObjMap::iterator end = _objects.end(); for (ObjMap::iterator it = _objects.begin(); it != end; ++it) - if (it->_value.relocateSci0Sci21(block.segment, pos, _scriptSize)) + if (it->_value.relocateSci0Sci21(block.getSegment(), pos, _scriptSize)) break; } @@ -357,7 +357,7 @@ void Script::relocateSci3(reg_t block) { const byte *seeker = relocStart; while (seeker < _buf + _bufSize) { // TODO: Find out what UINT16 at (seeker + 8) means - it->_value.relocateSci3(block.segment, + it->_value.relocateSci3(block.getSegment(), READ_SCI11ENDIAN_UINT32(seeker), READ_SCI11ENDIAN_UINT32(seeker + 4), _scriptSize); @@ -466,7 +466,7 @@ bool Script::isValidOffset(uint16 offset) const { } SegmentRef Script::dereference(reg_t pointer) { - if (pointer.offset > _bufSize) { + if (pointer.getOffset() > _bufSize) { error("Script::dereference(): Attempt to dereference invalid pointer %04x:%04x into script segment (script size=%d)", PRINT_REG(pointer), (uint)_bufSize); return SegmentRef(); @@ -474,8 +474,8 @@ SegmentRef Script::dereference(reg_t pointer) { SegmentRef ret; ret.isRaw = true; - ret.maxSize = _bufSize - pointer.offset; - ret.raw = _buf + pointer.offset; + ret.maxSize = _bufSize - pointer.getOffset(); + ret.raw = _buf + pointer.getOffset(); return ret; } @@ -653,7 +653,7 @@ void Script::initializeObjectsSci11(SegManager *segMan, SegmentId segmentId) { // Copy base from species class, as we need its selector IDs obj->setSuperClassSelector( - segMan->getClassAddress(obj->getSuperClassSelector().offset, SCRIPT_GET_LOCK, 0)); + segMan->getClassAddress(obj->getSuperClassSelector().getOffset(), SCRIPT_GET_LOCK, 0)); // If object is instance, get -propDict- from class and set it for this // object. This is needed for ::isMemberOf() to work. @@ -686,7 +686,7 @@ void Script::initializeObjectsSci3(SegManager *segMan, SegmentId segmentId) { reg_t reg = make_reg(segmentId, seeker - _buf); Object *obj = scriptObjInit(reg); - obj->setSuperClassSelector(segMan->getClassAddress(obj->getSuperClassSelector().offset, SCRIPT_GET_LOCK, 0)); + obj->setSuperClassSelector(segMan->getClassAddress(obj->getSuperClassSelector().getOffset(), SCRIPT_GET_LOCK, 0)); seeker += READ_SCI11ENDIAN_UINT16(seeker + 2); } @@ -703,7 +703,7 @@ void Script::initializeObjects(SegManager *segMan, SegmentId segmentId) { } reg_t Script::findCanonicAddress(SegManager *segMan, reg_t addr) const { - addr.offset = 0; + addr.setOffset(0); return addr; } @@ -725,8 +725,8 @@ Common::Array Script::listAllDeallocatable(SegmentId segId) const { Common::Array Script::listAllOutgoingReferences(reg_t addr) const { Common::Array tmp; - if (addr.offset <= _bufSize && addr.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET && offsetIsObject(addr.offset)) { - const Object *obj = getObject(addr.offset); + if (addr.getOffset() <= _bufSize && addr.getOffset() >= (uint)-SCRIPT_OBJECT_MAGIC_OFFSET && offsetIsObject(addr.getOffset())) { + const Object *obj = getObject(addr.getOffset()); if (obj) { // Note all local variables, if we have a local variable environment if (_localsSegment) diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index ef61b2e28a..6242dc4c93 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -69,17 +69,17 @@ const char *opcodeNames[] = { // Disassembles one command from the heap, returns address of next command or 0 if a ret was encountered. reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode) { - SegmentObj *mobj = s->_segMan->getSegment(pos.segment, SEG_TYPE_SCRIPT); + SegmentObj *mobj = s->_segMan->getSegment(pos.getSegment(), SEG_TYPE_SCRIPT); Script *script_entity = NULL; const byte *scr; - int scr_size; - reg_t retval = make_reg(pos.segment, pos.offset + 1); + uint scr_size; + reg_t retval = make_reg(pos.getSegment(), pos.getOffset() + 1); uint16 param_value = 0xffff; // Suppress GCC warning by setting default value, chose value as invalid to getKernelName etc. - int i = 0; + uint i = 0; Kernel *kernel = g_sci->getKernel(); if (!mobj) { - warning("Disassembly failed: Segment %04x non-existant or not a script", pos.segment); + warning("Disassembly failed: Segment %04x non-existant or not a script", pos.getSegment()); return retval; } else script_entity = (Script *)mobj; @@ -87,14 +87,14 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode scr = script_entity->getBuf(); scr_size = script_entity->getBufSize(); - if (pos.offset >= scr_size) { + if (pos.getOffset() >= scr_size) { warning("Trying to disassemble beyond end of script"); return NULL_REG; } int16 opparams[4]; byte opsize; - int bytecount = readPMachineInstruction(scr + pos.offset, opsize, opparams); + uint bytecount = readPMachineInstruction(scr + pos.getOffset(), opsize, opparams); const byte opcode = opsize >> 1; opsize &= 1; // byte if true, word if false @@ -102,13 +102,13 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode debugN("%04x:%04x: ", PRINT_REG(pos)); if (printBytecode) { - if (pos.offset + bytecount > scr_size) { + if (pos.getOffset() + bytecount > scr_size) { warning("Operation arguments extend beyond end of script"); return retval; } for (i = 0; i < bytecount; i++) - debugN("%02x ", scr[pos.offset + i]); + debugN("%02x ", scr[pos.getOffset() + i]); for (i = bytecount; i < 5; i++) debugN(" "); @@ -130,16 +130,16 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode case Script_SByte: case Script_Byte: - param_value = scr[retval.offset]; - debugN(" %02x", scr[retval.offset]); - retval.offset++; + param_value = scr[retval.getOffset()]; + debugN(" %02x", scr[retval.getOffset()]); + retval.incOffset(1); break; case Script_Word: case Script_SWord: - param_value = READ_SCI11ENDIAN_UINT16(&scr[retval.offset]); - debugN(" %04x", READ_SCI11ENDIAN_UINT16(&scr[retval.offset])); - retval.offset += 2; + param_value = READ_SCI11ENDIAN_UINT16(&scr[retval.getOffset()]); + debugN(" %04x", READ_SCI11ENDIAN_UINT16(&scr[retval.getOffset()])); + retval.incOffset(2); break; case Script_SVariable: @@ -149,11 +149,12 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode case Script_Local: case Script_Temp: case Script_Param: - if (opsize) - param_value = scr[retval.offset++]; - else { - param_value = READ_SCI11ENDIAN_UINT16(&scr[retval.offset]); - retval.offset += 2; + if (opsize) { + param_value = scr[retval.getOffset()]; + retval.incOffset(1); + } else { + param_value = READ_SCI11ENDIAN_UINT16(&scr[retval.getOffset()]); + retval.incOffset(2); } if (opcode == op_callk) @@ -166,24 +167,26 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode break; case Script_Offset: - if (opsize) - param_value = scr[retval.offset++]; - else { - param_value = READ_SCI11ENDIAN_UINT16(&scr[retval.offset]); - retval.offset += 2; + if (opsize) { + param_value = scr[retval.getOffset()]; + retval.incOffset(1); + } else { + param_value = READ_SCI11ENDIAN_UINT16(&scr[retval.getOffset()]); + retval.incOffset(2); } debugN(opsize ? " %02x" : " %04x", param_value); break; case Script_SRelative: if (opsize) { - int8 offset = (int8)scr[retval.offset++]; - debugN(" %02x [%04x]", 0xff & offset, 0xffff & (retval.offset + offset)); + int8 offset = (int8)scr[retval.getOffset()]; + retval.incOffset(1); + debugN(" %02x [%04x]", 0xff & offset, 0xffff & (retval.getOffset() + offset)); } else { - int16 offset = (int16)READ_SCI11ENDIAN_UINT16(&scr[retval.offset]); - retval.offset += 2; - debugN(" %04x [%04x]", 0xffff & offset, 0xffff & (retval.offset + offset)); + int16 offset = (int16)READ_SCI11ENDIAN_UINT16(&scr[retval.getOffset()]); + retval.incOffset(2); + debugN(" %04x [%04x]", 0xffff & offset, 0xffff & (retval.getOffset() + offset)); } break; @@ -216,8 +219,8 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode if (pos == s->xs->addr.pc) { // Extra information if debugging the current opcode if (opcode == op_callk) { - int stackframe = (scr[pos.offset + 2] >> 1) + (s->r_rest); - int argc = ((s->xs->sp)[- stackframe - 1]).offset; + int stackframe = (scr[pos.getOffset() + 2] >> 1) + (s->r_rest); + int argc = ((s->xs->sp)[- stackframe - 1]).getOffset(); bool oldScriptHeader = (getSciVersion() == SCI_VERSION_0_EARLY); if (!oldScriptHeader) @@ -233,13 +236,13 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode debugN(")\n"); } else if ((opcode == op_send) || (opcode == op_self)) { int restmod = s->r_rest; - int stackframe = (scr[pos.offset + 1] >> 1) + restmod; + int stackframe = (scr[pos.getOffset() + 1] >> 1) + restmod; reg_t *sb = s->xs->sp; uint16 selector; reg_t fun_ref; while (stackframe > 0) { - int argc = sb[- stackframe + 1].offset; + int argc = sb[- stackframe + 1].getOffset(); const char *name = NULL; reg_t called_obj_addr = s->xs->objp; @@ -248,7 +251,7 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode else if (opcode == op_self) called_obj_addr = s->xs->objp; - selector = sb[- stackframe].offset; + selector = sb[- stackframe].getOffset(); name = s->_segMan->getObjectName(called_obj_addr); @@ -290,20 +293,20 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode } bool isJumpOpcode(EngineState *s, reg_t pos, reg_t& jumpTarget) { - SegmentObj *mobj = s->_segMan->getSegment(pos.segment, SEG_TYPE_SCRIPT); + SegmentObj *mobj = s->_segMan->getSegment(pos.getSegment(), SEG_TYPE_SCRIPT); if (!mobj) return false; Script *script_entity = (Script *)mobj; const byte *scr = script_entity->getBuf(); - int scr_size = script_entity->getScriptSize(); + uint scr_size = script_entity->getScriptSize(); - if (pos.offset >= scr_size) + if (pos.getOffset() >= scr_size) return false; int16 opparams[4]; byte opsize; - int bytecount = readPMachineInstruction(scr + pos.offset, opsize, opparams); + int bytecount = readPMachineInstruction(scr + pos.getOffset(), opsize, opparams); const byte opcode = opsize >> 1; switch (opcode) { @@ -313,7 +316,7 @@ bool isJumpOpcode(EngineState *s, reg_t pos, reg_t& jumpTarget) { { reg_t jmpTarget = pos + bytecount + opparams[0]; // QFG2 has invalid jumps outside the script buffer in script 260 - if (jmpTarget.offset >= scr_size) + if (jmpTarget.getOffset() >= scr_size) return false; jumpTarget = jmpTarget; } @@ -336,16 +339,16 @@ void SciEngine::scriptDebug() { if (_debugState.seeking != kDebugSeekNothing) { const reg_t pc = s->xs->addr.pc; - SegmentObj *mobj = s->_segMan->getSegment(pc.segment, SEG_TYPE_SCRIPT); + SegmentObj *mobj = s->_segMan->getSegment(pc.getSegment(), SEG_TYPE_SCRIPT); if (mobj) { Script *scr = (Script *)mobj; const byte *code_buf = scr->getBuf(); - int code_buf_size = scr->getBufSize(); - int opcode = pc.offset >= code_buf_size ? 0 : code_buf[pc.offset]; + uint16 code_buf_size = scr->getBufSize(); + int opcode = pc.getOffset() >= code_buf_size ? 0 : code_buf[pc.getOffset()]; int op = opcode >> 1; - int paramb1 = pc.offset + 1 >= code_buf_size ? 0 : code_buf[pc.offset + 1]; - int paramf1 = (opcode & 1) ? paramb1 : (pc.offset + 2 >= code_buf_size ? 0 : (int16)READ_SCI11ENDIAN_UINT16(code_buf + pc.offset + 1)); + int paramb1 = pc.getOffset() + 1 >= code_buf_size ? 0 : code_buf[pc.getOffset() + 1]; + int paramf1 = (opcode & 1) ? paramb1 : (pc.getOffset() + 2 >= code_buf_size ? 0 : (int16)READ_SCI11ENDIAN_UINT16(code_buf + pc.getOffset() + 1)); switch (_debugState.seeking) { case kDebugSeekSpecialCallk: @@ -714,7 +717,7 @@ void logKernelCall(const KernelFunction *kernelCall, const KernelSubFunction *ke else if (regType & SIG_IS_INVALID) debugN("INVALID"); else if (regType & SIG_TYPE_INTEGER) - debugN("%d", argv[parmNr].offset); + debugN("%d", argv[parmNr].getOffset()); else { debugN("%04x:%04x", PRINT_REG(argv[parmNr])); switch (regType) { @@ -723,12 +726,12 @@ void logKernelCall(const KernelFunction *kernelCall, const KernelSubFunction *ke break; case SIG_TYPE_REFERENCE: { - SegmentObj *mobj = s->_segMan->getSegmentObj(argv[parmNr].segment); + SegmentObj *mobj = s->_segMan->getSegmentObj(argv[parmNr].getSegment()); switch (mobj->getType()) { case SEG_TYPE_HUNK: { HunkTable *ht = (HunkTable *)mobj; - int index = argv[parmNr].offset; + int index = argv[parmNr].getOffset(); if (ht->isValidEntry(index)) { // NOTE: This ", deleted" isn't as useful as it could // be because it prints the status _after_ the kernel @@ -765,7 +768,7 @@ void logKernelCall(const KernelFunction *kernelCall, const KernelSubFunction *ke if (result.isPointer()) debugN(" = %04x:%04x\n", PRINT_REG(result)); else - debugN(" = %d\n", result.offset); + debugN(" = %d\n", result.getOffset()); } } // End of namespace Sci diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index ac02022ee7..a6c145979f 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -81,7 +81,7 @@ void SegManager::initSysStrings() { if (getSciVersion() <= SCI_VERSION_1_1) { // We need to allocate system strings in one segment, for compatibility reasons allocDynmem(512, "system strings", &_saveDirPtr); - _parserPtr = make_reg(_saveDirPtr.segment, _saveDirPtr.offset + 256); + _parserPtr = make_reg(_saveDirPtr.getSegment(), _saveDirPtr.getOffset() + 256); #ifdef ENABLE_SCI32 } else { SciString *saveDirString = allocateString(&_saveDirPtr); @@ -163,7 +163,7 @@ bool SegManager::isHeapObject(reg_t pos) const { const Object *obj = getObject(pos); if (obj == NULL || (obj && obj->isFreed())) return false; - Script *scr = getScriptIfLoaded(pos.segment); + Script *scr = getScriptIfLoaded(pos.getSegment()); return !(scr && scr->isMarkedAsDeleted()); } @@ -214,21 +214,21 @@ SegmentObj *SegManager::getSegment(SegmentId seg, SegmentType type) const { } Object *SegManager::getObject(reg_t pos) const { - SegmentObj *mobj = getSegmentObj(pos.segment); + SegmentObj *mobj = getSegmentObj(pos.getSegment()); Object *obj = NULL; if (mobj != NULL) { if (mobj->getType() == SEG_TYPE_CLONES) { CloneTable *ct = (CloneTable *)mobj; - if (ct->isValidEntry(pos.offset)) - obj = &(ct->_table[pos.offset]); + if (ct->isValidEntry(pos.getOffset())) + obj = &(ct->_table[pos.getOffset()]); else warning("getObject(): Trying to get an invalid object"); } else if (mobj->getType() == SEG_TYPE_SCRIPT) { Script *scr = (Script *)mobj; - if (pos.offset <= scr->getBufSize() && pos.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET - && scr->offsetIsObject(pos.offset)) { - obj = scr->getObject(pos.offset); + if (pos.getOffset() <= scr->getBufSize() && pos.getOffset() >= (uint)-SCRIPT_OBJECT_MAGIC_OFFSET + && scr->offsetIsObject(pos.getOffset())) { + obj = scr->getObject(pos.getOffset()); } } } @@ -246,7 +246,7 @@ const char *SegManager::getObjectName(reg_t pos) { return ""; const char *name = 0; - if (nameReg.segment) + if (nameReg.getSegment()) name = derefString(nameReg); if (!name) return ""; @@ -272,7 +272,7 @@ reg_t SegManager::findObjectByName(const Common::String &name, int index) { const Script *scr = (const Script *)mobj; const ObjMap &objects = scr->getObjectMap(); for (ObjMap::const_iterator it = objects.begin(); it != objects.end(); ++it) { - objpos.offset = it->_value.getPos().offset; + objpos.setOffset(it->_value.getPos().getOffset()); if (name == getObjectName(objpos)) result.push_back(objpos); } @@ -283,7 +283,7 @@ reg_t SegManager::findObjectByName(const Common::String &name, int index) { if (!ct->isValidEntry(idx)) continue; - objpos.offset = idx; + objpos.setOffset(idx); if (name == getObjectName(objpos)) result.push_back(objpos); } @@ -364,14 +364,14 @@ void SegManager::freeHunkEntry(reg_t addr) { return; } - HunkTable *ht = (HunkTable *)getSegment(addr.segment, SEG_TYPE_HUNK); + HunkTable *ht = (HunkTable *)getSegment(addr.getSegment(), SEG_TYPE_HUNK); if (!ht) { warning("Attempt to free Hunk from address %04x:%04x: Invalid segment type", PRINT_REG(addr)); return; } - ht->freeEntryContents(addr.offset); + ht->freeEntryContents(addr.getOffset()); } reg_t SegManager::allocateHunkEntry(const char *hunk_type, int size) { @@ -398,14 +398,14 @@ reg_t SegManager::allocateHunkEntry(const char *hunk_type, int size) { } byte *SegManager::getHunkPointer(reg_t addr) { - HunkTable *ht = (HunkTable *)getSegment(addr.segment, SEG_TYPE_HUNK); + HunkTable *ht = (HunkTable *)getSegment(addr.getSegment(), SEG_TYPE_HUNK); - if (!ht || !ht->isValidEntry(addr.offset)) { + if (!ht || !ht->isValidEntry(addr.getOffset())) { // Valid SCI behavior, e.g. when loading/quitting return NULL; } - return (byte *)ht->_table[addr.offset].mem; + return (byte *)ht->_table[addr.getOffset()].mem; } Clone *SegManager::allocateClone(reg_t *addr) { @@ -462,35 +462,35 @@ reg_t SegManager::newNode(reg_t value, reg_t key) { } List *SegManager::lookupList(reg_t addr) { - if (getSegmentType(addr.segment) != SEG_TYPE_LISTS) { + if (getSegmentType(addr.getSegment()) != SEG_TYPE_LISTS) { error("Attempt to use non-list %04x:%04x as list", PRINT_REG(addr)); return NULL; } - ListTable *lt = (ListTable *)_heap[addr.segment]; + ListTable *lt = (ListTable *)_heap[addr.getSegment()]; - if (!lt->isValidEntry(addr.offset)) { + if (!lt->isValidEntry(addr.getOffset())) { error("Attempt to use non-list %04x:%04x as list", PRINT_REG(addr)); return NULL; } - return &(lt->_table[addr.offset]); + return &(lt->_table[addr.getOffset()]); } Node *SegManager::lookupNode(reg_t addr, bool stopOnDiscarded) { if (addr.isNull()) return NULL; // Non-error null - SegmentType type = getSegmentType(addr.segment); + SegmentType type = getSegmentType(addr.getSegment()); if (type != SEG_TYPE_NODES) { error("Attempt to use non-node %04x:%04x (type %d) as list node", PRINT_REG(addr), type); return NULL; } - NodeTable *nt = (NodeTable *)_heap[addr.segment]; + NodeTable *nt = (NodeTable *)_heap[addr.getSegment()]; - if (!nt->isValidEntry(addr.offset)) { + if (!nt->isValidEntry(addr.getOffset())) { if (!stopOnDiscarded) return NULL; @@ -498,19 +498,19 @@ Node *SegManager::lookupNode(reg_t addr, bool stopOnDiscarded) { return NULL; } - return &(nt->_table[addr.offset]); + return &(nt->_table[addr.getOffset()]); } SegmentRef SegManager::dereference(reg_t pointer) { SegmentRef ret; - if (!pointer.segment || (pointer.segment >= _heap.size()) || !_heap[pointer.segment]) { + if (!pointer.getSegment() || (pointer.getSegment() >= _heap.size()) || !_heap[pointer.getSegment()]) { // This occurs in KQ5CD when interacting with certain objects warning("SegManager::dereference(): Attempt to dereference invalid pointer %04x:%04x", PRINT_REG(pointer)); return ret; /* Invalid */ } - SegmentObj *mobj = _heap[pointer.segment]; + SegmentObj *mobj = _heap[pointer.getSegment()]; return mobj->dereference(pointer); } @@ -522,7 +522,7 @@ static void *derefPtr(SegManager *segMan, reg_t pointer, int entries, bool wantR if (ret.isRaw != wantRaw) { warning("Dereferencing pointer %04x:%04x (type %d) which is %s, but expected %s", PRINT_REG(pointer), - segMan->getSegmentType(pointer.segment), + segMan->getSegmentType(pointer.getSegment()), ret.isRaw ? "raw" : "not raw", wantRaw ? "raw" : "not raw"); } @@ -565,15 +565,15 @@ static inline char getChar(const SegmentRef &ref, uint offset) { // segment 0xFFFF means that the scripts are using uninitialized temp-variable space // we can safely ignore this, if it isn't one of the first 2 chars. // foreign lsl3 uses kFileIO(readraw) and then immediately uses kReadNumber right at the start - if (val.segment != 0) - if (!((val.segment == 0xFFFF) && (offset > 1))) + if (val.getSegment() != 0) + if (!((val.getSegment() == 0xFFFF) && (offset > 1))) warning("Attempt to read character from non-raw data"); bool oddOffset = offset & 1; if (g_sci->isBE()) oddOffset = !oddOffset; - return (oddOffset ? val.offset >> 8 : val.offset & 0xff); + return (oddOffset ? val.getOffset() >> 8 : val.getOffset() & 0xff); } static inline void setChar(const SegmentRef &ref, uint offset, byte value) { @@ -582,16 +582,16 @@ static inline void setChar(const SegmentRef &ref, uint offset, byte value) { reg_t *val = ref.reg + offset / 2; - val->segment = 0; + val->setSegment(0); bool oddOffset = offset & 1; if (g_sci->isBE()) oddOffset = !oddOffset; if (oddOffset) - val->offset = (val->offset & 0x00ff) | (value << 8); + val->setOffset((val->getOffset() & 0x00ff) | (value << 8)); else - val->offset = (val->offset & 0xff00) | value; + val->setOffset((val->getOffset() & 0xff00) | value); } // TODO: memcpy, strcpy and strncpy could maybe be folded into a single function @@ -829,10 +829,11 @@ byte *SegManager::allocDynmem(int size, const char *descr, reg_t *addr) { } bool SegManager::freeDynmem(reg_t addr) { - if (addr.segment < 1 || addr.segment >= _heap.size() || !_heap[addr.segment] || _heap[addr.segment]->getType() != SEG_TYPE_DYNMEM) + if (addr.getSegment() < 1 || addr.getSegment() >= _heap.size() || + !_heap[addr.getSegment()] || _heap[addr.getSegment()]->getType() != SEG_TYPE_DYNMEM) return false; // error - deallocate(addr.segment); + deallocate(addr.getSegment()); return true; // OK } @@ -854,28 +855,28 @@ SciArray *SegManager::allocateArray(reg_t *addr) { } SciArray *SegManager::lookupArray(reg_t addr) { - if (_heap[addr.segment]->getType() != SEG_TYPE_ARRAY) + if (_heap[addr.getSegment()]->getType() != SEG_TYPE_ARRAY) error("Attempt to use non-array %04x:%04x as array", PRINT_REG(addr)); - ArrayTable *arrayTable = (ArrayTable *)_heap[addr.segment]; + ArrayTable *arrayTable = (ArrayTable *)_heap[addr.getSegment()]; - if (!arrayTable->isValidEntry(addr.offset)) + if (!arrayTable->isValidEntry(addr.getOffset())) error("Attempt to use non-array %04x:%04x as array", PRINT_REG(addr)); - return &(arrayTable->_table[addr.offset]); + return &(arrayTable->_table[addr.getOffset()]); } void SegManager::freeArray(reg_t addr) { - if (_heap[addr.segment]->getType() != SEG_TYPE_ARRAY) + if (_heap[addr.getSegment()]->getType() != SEG_TYPE_ARRAY) error("Attempt to use non-array %04x:%04x as array", PRINT_REG(addr)); - ArrayTable *arrayTable = (ArrayTable *)_heap[addr.segment]; + ArrayTable *arrayTable = (ArrayTable *)_heap[addr.getSegment()]; - if (!arrayTable->isValidEntry(addr.offset)) + if (!arrayTable->isValidEntry(addr.getOffset())) error("Attempt to use non-array %04x:%04x as array", PRINT_REG(addr)); - arrayTable->_table[addr.offset].destroy(); - arrayTable->freeEntry(addr.offset); + arrayTable->_table[addr.getOffset()].destroy(); + arrayTable->freeEntry(addr.getOffset()); } SciString *SegManager::allocateString(reg_t *addr) { @@ -894,28 +895,28 @@ SciString *SegManager::allocateString(reg_t *addr) { } SciString *SegManager::lookupString(reg_t addr) { - if (_heap[addr.segment]->getType() != SEG_TYPE_STRING) + if (_heap[addr.getSegment()]->getType() != SEG_TYPE_STRING) error("lookupString: Attempt to use non-string %04x:%04x as string", PRINT_REG(addr)); - StringTable *stringTable = (StringTable *)_heap[addr.segment]; + StringTable *stringTable = (StringTable *)_heap[addr.getSegment()]; - if (!stringTable->isValidEntry(addr.offset)) + if (!stringTable->isValidEntry(addr.getOffset())) error("lookupString: Attempt to use non-string %04x:%04x as string", PRINT_REG(addr)); - return &(stringTable->_table[addr.offset]); + return &(stringTable->_table[addr.getOffset()]); } void SegManager::freeString(reg_t addr) { - if (_heap[addr.segment]->getType() != SEG_TYPE_STRING) + if (_heap[addr.getSegment()]->getType() != SEG_TYPE_STRING) error("freeString: Attempt to use non-string %04x:%04x as string", PRINT_REG(addr)); - StringTable *stringTable = (StringTable *)_heap[addr.segment]; + StringTable *stringTable = (StringTable *)_heap[addr.getSegment()]; - if (!stringTable->isValidEntry(addr.offset)) + if (!stringTable->isValidEntry(addr.getOffset())) error("freeString: Attempt to use non-string %04x:%04x as string", PRINT_REG(addr)); - stringTable->_table[addr.offset].destroy(); - stringTable->freeEntry(addr.offset); + stringTable->_table[addr.getOffset()].destroy(); + stringTable->freeEntry(addr.getOffset()); } #endif @@ -948,16 +949,16 @@ reg_t SegManager::getClassAddress(int classnr, ScriptLoadType lock, uint16 calle return NULL_REG; } else { Class *the_class = &_classTable[classnr]; - if (!the_class->reg.segment) { + if (!the_class->reg.getSegment()) { getScriptSegment(the_class->script, lock); - if (!the_class->reg.segment) { + if (!the_class->reg.getSegment()) { error("[VM] Trying to instantiate class %x by instantiating script 0x%x (%03d) failed;", classnr, the_class->script, the_class->script); return NULL_REG; } } else - if (callerSegment != the_class->reg.segment) - getScript(the_class->reg.segment)->incrementLockers(); + if (callerSegment != the_class->reg.getSegment()) + getScript(the_class->reg.getSegment())->incrementLockers(); return the_class->reg; } @@ -1002,7 +1003,7 @@ void SegManager::uninstantiateScript(int script_nr) { // Free all classtable references to this script for (uint i = 0; i < classTableSize(); i++) - if (getClass(i).reg.segment == segmentId) + if (getClass(i).reg.getSegment() == segmentId) setClassOffset(i, NULL_REG); if (getSciVersion() < SCI_VERSION_1_1) @@ -1026,18 +1027,18 @@ void SegManager::uninstantiateScriptSci0(int script_nr) { // Make a pass over the object in order to uninstantiate all superclasses do { - reg.offset += objLength; // Step over the last checked object + reg.incOffset(objLength); // Step over the last checked object - objType = READ_SCI11ENDIAN_UINT16(scr->getBuf(reg.offset)); + objType = READ_SCI11ENDIAN_UINT16(scr->getBuf(reg.getOffset())); if (!objType) break; - objLength = READ_SCI11ENDIAN_UINT16(scr->getBuf(reg.offset + 2)); + objLength = READ_SCI11ENDIAN_UINT16(scr->getBuf(reg.getOffset() + 2)); - reg.offset += 4; // Step over header + reg.incOffset(4); // Step over header if ((objType == SCI_OBJ_OBJECT) || (objType == SCI_OBJ_CLASS)) { // object or class? - reg.offset += 8; // magic offset (SCRIPT_OBJECT_MAGIC_OFFSET) - int16 superclass = READ_SCI11ENDIAN_UINT16(scr->getBuf(reg.offset + 2)); + reg.incOffset(8); // magic offset (SCRIPT_OBJECT_MAGIC_OFFSET) + int16 superclass = READ_SCI11ENDIAN_UINT16(scr->getBuf(reg.getOffset() + 2)); if (superclass >= 0) { int superclass_script = getClass(superclass).script; @@ -1051,10 +1052,10 @@ void SegManager::uninstantiateScriptSci0(int script_nr) { // Recurse to assure that the superclass lockers number gets decreased } - reg.offset += SCRIPT_OBJECT_MAGIC_OFFSET; + reg.incOffset(SCRIPT_OBJECT_MAGIC_OFFSET); } // if object or class - reg.offset -= 4; // Step back on header + reg.incOffset(-4); // Step back on header } while (objType != 0); } diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp index 36b7d92c07..a7f147a15a 100644 --- a/engines/sci/engine/segment.cpp +++ b/engines/sci/engine/segment.cpp @@ -93,11 +93,11 @@ Common::Array CloneTable::listAllOutgoingReferences(reg_t addr) const { Common::Array tmp; // assert(addr.segment == _segId); - if (!isValidEntry(addr.offset)) { + if (!isValidEntry(addr.getOffset())) { error("Unexpected request for outgoing references from clone at %04x:%04x", PRINT_REG(addr)); } - const Clone *clone = &(_table[addr.offset]); + const Clone *clone = &(_table[addr.getOffset()]); // Emit all member variables (including references to the 'super' delegate) for (uint i = 0; i < clone->getVarCount(); i++) @@ -112,7 +112,7 @@ Common::Array CloneTable::listAllOutgoingReferences(reg_t addr) const { void CloneTable::freeAtAddress(SegManager *segMan, reg_t addr) { #ifdef GC_DEBUG - Object *victim_obj = &(_table[addr.offset]); + Object *victim_obj = &(_table[addr.getOffset()]); if (!(victim_obj->_flags & OBJECT_FLAG_FREED)) warning("[GC] Clone %04x:%04x not reachable and not freed (freeing now)", PRINT_REG(addr)); @@ -124,7 +124,7 @@ void CloneTable::freeAtAddress(SegManager *segMan, reg_t addr) { #endif #endif - freeEntry(addr.offset); + freeEntry(addr.getOffset()); } @@ -133,15 +133,15 @@ void CloneTable::freeAtAddress(SegManager *segMan, reg_t addr) { SegmentRef LocalVariables::dereference(reg_t pointer) { SegmentRef ret; ret.isRaw = false; // reg_t based data! - ret.maxSize = (_locals.size() - pointer.offset / 2) * 2; + ret.maxSize = (_locals.size() - pointer.getOffset() / 2) * 2; - if (pointer.offset & 1) { + if (pointer.getOffset() & 1) { ret.maxSize -= 1; ret.skipByte = true; } if (ret.maxSize > 0) { - ret.reg = &_locals[pointer.offset / 2]; + ret.reg = &_locals[pointer.getOffset() / 2]; } else { if ((g_sci->getEngineState()->currentRoomNumber() == 160 || g_sci->getEngineState()->currentRoomNumber() == 220) @@ -181,14 +181,14 @@ Common::Array LocalVariables::listAllOutgoingReferences(reg_t addr) const SegmentRef DataStack::dereference(reg_t pointer) { SegmentRef ret; ret.isRaw = false; // reg_t based data! - ret.maxSize = (_capacity - pointer.offset / 2) * 2; + ret.maxSize = (_capacity - pointer.getOffset() / 2) * 2; - if (pointer.offset & 1) { + if (pointer.getOffset() & 1) { ret.maxSize -= 1; ret.skipByte = true; } - ret.reg = &_entries[pointer.offset / 2]; + ret.reg = &_entries[pointer.getOffset() / 2]; return ret; } @@ -204,11 +204,11 @@ Common::Array DataStack::listAllOutgoingReferences(reg_t object) const { Common::Array ListTable::listAllOutgoingReferences(reg_t addr) const { Common::Array tmp; - if (!isValidEntry(addr.offset)) { + if (!isValidEntry(addr.getOffset())) { error("Invalid list referenced for outgoing references: %04x:%04x", PRINT_REG(addr)); } - const List *list = &(_table[addr.offset]); + const List *list = &(_table[addr.getOffset()]); tmp.push_back(list->first); tmp.push_back(list->last); @@ -222,10 +222,10 @@ Common::Array ListTable::listAllOutgoingReferences(reg_t addr) const { Common::Array NodeTable::listAllOutgoingReferences(reg_t addr) const { Common::Array tmp; - if (!isValidEntry(addr.offset)) { + if (!isValidEntry(addr.getOffset())) { error("Invalid node referenced for outgoing references: %04x:%04x", PRINT_REG(addr)); } - const Node *node = &(_table[addr.offset]); + const Node *node = &(_table[addr.getOffset()]); // We need all four here. Can't just stick with 'pred' OR 'succ' because node operations allow us // to walk around from any given node @@ -242,8 +242,8 @@ Common::Array NodeTable::listAllOutgoingReferences(reg_t addr) const { SegmentRef DynMem::dereference(reg_t pointer) { SegmentRef ret; ret.isRaw = true; - ret.maxSize = _size - pointer.offset; - ret.raw = _buf + pointer.offset; + ret.maxSize = _size - pointer.getOffset(); + ret.raw = _buf + pointer.getOffset(); return ret; } @@ -252,27 +252,27 @@ SegmentRef DynMem::dereference(reg_t pointer) { SegmentRef ArrayTable::dereference(reg_t pointer) { SegmentRef ret; ret.isRaw = false; - ret.maxSize = _table[pointer.offset].getSize() * 2; - ret.reg = _table[pointer.offset].getRawData(); + ret.maxSize = _table[pointer.getOffset()].getSize() * 2; + ret.reg = _table[pointer.getOffset()].getRawData(); return ret; } void ArrayTable::freeAtAddress(SegManager *segMan, reg_t sub_addr) { - _table[sub_addr.offset].destroy(); - freeEntry(sub_addr.offset); + _table[sub_addr.getOffset()].destroy(); + freeEntry(sub_addr.getOffset()); } Common::Array ArrayTable::listAllOutgoingReferences(reg_t addr) const { Common::Array tmp; - if (!isValidEntry(addr.offset)) { + if (!isValidEntry(addr.getOffset())) { error("Invalid array referenced for outgoing references: %04x:%04x", PRINT_REG(addr)); } - const SciArray *array = &(_table[addr.offset]); + const SciArray *array = &(_table[addr.getOffset()]); for (uint32 i = 0; i < array->getSize(); i++) { reg_t value = array->getValue(i); - if (value.segment != 0) + if (value.getSegment() != 0) tmp.push_back(value); } @@ -305,8 +305,8 @@ void SciString::fromString(const Common::String &string) { SegmentRef StringTable::dereference(reg_t pointer) { SegmentRef ret; ret.isRaw = true; - ret.maxSize = _table[pointer.offset].getSize(); - ret.raw = (byte *)_table[pointer.offset].getRawData(); + ret.maxSize = _table[pointer.getOffset()].getSize(); + ret.raw = (byte *)_table[pointer.getOffset()].getRawData(); return ret; } diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index 54cf7b98af..0d54b651e1 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -175,7 +175,7 @@ public: } virtual SegmentRef dereference(reg_t pointer); virtual reg_t findCanonicAddress(SegManager *segMan, reg_t addr) const { - return make_reg(addr.segment, 0); + return make_reg(addr.getSegment(), 0); } virtual Common::Array listAllOutgoingReferences(reg_t object) const; @@ -291,7 +291,7 @@ struct NodeTable : public SegmentObjTable { NodeTable() : SegmentObjTable(SEG_TYPE_NODES) {} virtual void freeAtAddress(SegManager *segMan, reg_t sub_addr) { - freeEntry(sub_addr.offset); + freeEntry(sub_addr.getOffset()); } virtual Common::Array listAllOutgoingReferences(reg_t object) const; @@ -304,7 +304,7 @@ struct ListTable : public SegmentObjTable { ListTable() : SegmentObjTable(SEG_TYPE_LISTS) {} virtual void freeAtAddress(SegManager *segMan, reg_t sub_addr) { - freeEntry(sub_addr.offset); + freeEntry(sub_addr.getOffset()); } virtual Common::Array listAllOutgoingReferences(reg_t object) const; @@ -333,7 +333,7 @@ struct HunkTable : public SegmentObjTable { } virtual void freeAtAddress(SegManager *segMan, reg_t sub_addr) { - freeEntry(sub_addr.offset); + freeEntry(sub_addr.getOffset()); } virtual void saveLoadWithSerializer(Common::Serializer &ser); @@ -358,7 +358,7 @@ public: } virtual SegmentRef dereference(reg_t pointer); virtual reg_t findCanonicAddress(SegManager *segMan, reg_t addr) const { - return make_reg(addr.segment, 0); + return make_reg(addr.getSegment(), 0); } virtual Common::Array listAllDeallocatable(SegmentId segId) const { const reg_t r = make_reg(segId, 0); @@ -502,8 +502,8 @@ struct StringTable : public SegmentObjTable { StringTable() : SegmentObjTable(SEG_TYPE_STRING) {} virtual void freeAtAddress(SegManager *segMan, reg_t sub_addr) { - _table[sub_addr.offset].destroy(); - freeEntry(sub_addr.offset); + _table[sub_addr.getOffset()].destroy(); + freeEntry(sub_addr.getOffset()); } void saveLoadWithSerializer(Common::Serializer &ser); diff --git a/engines/sci/engine/selector.h b/engines/sci/engine/selector.h index 2308a6c387..5d3d0752ac 100644 --- a/engines/sci/engine/selector.h +++ b/engines/sci/engine/selector.h @@ -171,7 +171,7 @@ struct SelectorCache { * SelectorCache and mapped in script.cpp. */ reg_t readSelector(SegManager *segMan, reg_t object, Selector selectorId); -#define readSelectorValue(segMan, _obj_, _slc_) (readSelector(segMan, _obj_, _slc_).offset) +#define readSelectorValue(segMan, _obj_, _slc_) (readSelector(segMan, _obj_, _slc_).getOffset()) /** * Writes a selector value to an object. diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 7dc397c11e..89f59eaa14 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -119,7 +119,7 @@ extern const char *opcodeNames[]; // from scriptdebug.cpp static reg_t read_var(EngineState *s, int type, int index) { if (validate_variable(s->variables[type], s->stack_base, type, s->variablesMax[type], index)) { - if (s->variables[type][index].segment == 0xffff) { + if (s->variables[type][index].getSegment() == 0xffff) { switch (type) { case VAR_TEMP: { // Uninitialized read on a temp @@ -195,8 +195,8 @@ static void write_var(EngineState *s, int type, int index, reg_t value) { // this happens at least in sq1/room 44 (slot-machine), because a send is missing parameters, then // those parameters are taken from uninitialized stack and afterwards they are copied back into temps // if we don't remove the segment, we would get false-positive uninitialized reads later - if (type == VAR_TEMP && value.segment == 0xffff) - value.segment = 0; + if (type == VAR_TEMP && value.getSegment() == 0xffff) + value.setSegment(0); s->variables[type][index] = value; @@ -578,16 +578,16 @@ void run_vm(EngineState *s) { int var_type; // See description below int var_number; - g_sci->_debugState.old_pc_offset = s->xs->addr.pc.offset; + g_sci->_debugState.old_pc_offset = s->xs->addr.pc.getOffset(); g_sci->_debugState.old_sp = s->xs->sp; if (s->abortScriptProcessing != kAbortNone) return; // Stop processing if (s->_executionStackPosChanged) { - scr = s->_segMan->getScriptIfLoaded(s->xs->addr.pc.segment); + scr = s->_segMan->getScriptIfLoaded(s->xs->addr.pc.getSegment()); if (!scr) - error("No script in segment %d", s->xs->addr.pc.segment); + error("No script in segment %d", s->xs->addr.pc.getSegment()); s->xs = &(s->_executionStack.back()); s->_executionStackPosChanged = false; @@ -624,13 +624,13 @@ void run_vm(EngineState *s) { s->variablesMax[VAR_TEMP] = s->xs->sp - s->xs->fp; - if (s->xs->addr.pc.offset >= scr->getBufSize()) + if (s->xs->addr.pc.getOffset() >= scr->getBufSize()) error("run_vm(): program counter gone astray, addr: %d, code buffer size: %d", - s->xs->addr.pc.offset, scr->getBufSize()); + s->xs->addr.pc.getOffset(), scr->getBufSize()); // Get opcode byte extOpcode; - s->xs->addr.pc.offset += readPMachineInstruction(scr->getBuf() + s->xs->addr.pc.offset, extOpcode, opparams); + s->xs->addr.pc.incOffset(readPMachineInstruction(scr->getBuf(s->xs->addr.pc.getOffset()), extOpcode, opparams)); const byte opcode = extOpcode >> 1; //debug("%s: %d, %d, %d, %d, acc = %04x:%04x, script %d, local script %d", opcodeNames[opcode], opparams[0], opparams[1], opparams[2], opparams[3], PRINT_REG(s->r_acc), scr->getScriptNumber(), local_script->getScriptNumber()); @@ -705,7 +705,7 @@ void run_vm(EngineState *s) { break; case op_not: // 0x0c (12) - s->r_acc = make_reg(0, !(s->r_acc.offset || s->r_acc.segment)); + s->r_acc = make_reg(0, !(s->r_acc.getOffset() || s->r_acc.getSegment())); // Must allow pointers to be negated, as this is used for checking whether objects exist break; @@ -765,30 +765,30 @@ void run_vm(EngineState *s) { case op_bt: // 0x17 (23) // Branch relative if true - if (s->r_acc.offset || s->r_acc.segment) - s->xs->addr.pc.offset += opparams[0]; + if (s->r_acc.getOffset() || s->r_acc.getSegment()) + s->xs->addr.pc.incOffset(opparams[0]); - if (s->xs->addr.pc.offset >= local_script->getScriptSize()) + if (s->xs->addr.pc.getOffset() >= local_script->getScriptSize()) error("[VM] op_bt: request to jump past the end of script %d (offset %d, script is %d bytes)", - local_script->getScriptNumber(), s->xs->addr.pc.offset, local_script->getScriptSize()); + local_script->getScriptNumber(), s->xs->addr.pc.getOffset(), local_script->getScriptSize()); break; case op_bnt: // 0x18 (24) // Branch relative if not true - if (!(s->r_acc.offset || s->r_acc.segment)) - s->xs->addr.pc.offset += opparams[0]; + if (!(s->r_acc.getOffset() || s->r_acc.getSegment())) + s->xs->addr.pc.incOffset(opparams[0]); - if (s->xs->addr.pc.offset >= local_script->getScriptSize()) + if (s->xs->addr.pc.getOffset() >= local_script->getScriptSize()) error("[VM] op_bnt: request to jump past the end of script %d (offset %d, script is %d bytes)", - local_script->getScriptNumber(), s->xs->addr.pc.offset, local_script->getScriptSize()); + local_script->getScriptNumber(), s->xs->addr.pc.getOffset(), local_script->getScriptSize()); break; case op_jmp: // 0x19 (25) - s->xs->addr.pc.offset += opparams[0]; + s->xs->addr.pc.incOffset(opparams[0]); - if (s->xs->addr.pc.offset >= local_script->getScriptSize()) + if (s->xs->addr.pc.getOffset() >= local_script->getScriptSize()) error("[VM] op_jmp: request to jump past the end of script %d (offset %d, script is %d bytes)", - local_script->getScriptNumber(), s->xs->addr.pc.offset, local_script->getScriptSize()); + local_script->getScriptNumber(), s->xs->addr.pc.getOffset(), local_script->getScriptSize()); break; case op_ldi: // 0x1a (26) @@ -831,13 +831,13 @@ void run_vm(EngineState *s) { int argc = (opparams[1] >> 1) // Given as offset, but we need count + 1 + s->r_rest; StackPtr call_base = s->xs->sp - argc; - s->xs->sp[1].offset += s->r_rest; + s->xs->sp[1].incOffset(s->r_rest); - uint16 localCallOffset = s->xs->addr.pc.offset + opparams[0]; + uint16 localCallOffset = s->xs->addr.pc.getOffset() + opparams[0]; ExecStack xstack(s->xs->objp, s->xs->objp, s->xs->sp, (call_base->requireUint16()) + s->r_rest, call_base, - s->xs->local_segment, make_reg(s->xs->addr.pc.segment, localCallOffset), + s->xs->local_segment, make_reg(s->xs->addr.pc.getSegment(), localCallOffset), NULL_SELECTOR, -1, localCallOffset, s->_executionStack.size() - 1, EXEC_STACK_TYPE_CALL); @@ -894,9 +894,9 @@ void run_vm(EngineState *s) { s_temp = s->xs->sp; s->xs->sp -= temp; - s->xs->sp[0].offset += s->r_rest; + s->xs->sp[0].incOffset(s->r_rest); xs_new = execute_method(s, 0, opparams[0], s_temp, s->xs->objp, - s->xs->sp[0].offset, s->xs->sp); + s->xs->sp[0].getOffset(), s->xs->sp); s->r_rest = 0; // Used up the &rest adjustment if (xs_new) // in case of error, keep old stack s->_executionStackPosChanged = true; @@ -908,11 +908,10 @@ void run_vm(EngineState *s) { s_temp = s->xs->sp; s->xs->sp -= temp; - s->xs->sp[0].offset += s->r_rest; + s->xs->sp[0].incOffset(s->r_rest); xs_new = execute_method(s, opparams[0], opparams[1], s_temp, s->xs->objp, - s->xs->sp[0].offset, s->xs->sp); + s->xs->sp[0].getOffset(), s->xs->sp); s->r_rest = 0; // Used up the &rest adjustment - if (xs_new) // in case of error, keep old stack s->_executionStackPosChanged = true; break; @@ -965,7 +964,7 @@ void run_vm(EngineState *s) { s_temp = s->xs->sp; s->xs->sp -= ((opparams[0] >> 1) + s->r_rest); // Adjust stack - s->xs->sp[1].offset += s->r_rest; + s->xs->sp[1].incOffset(s->r_rest); xs_new = send_selector(s, s->r_acc, s->r_acc, s_temp, (int)(opparams[0] >> 1) + (uint16)s->r_rest, s->xs->sp); @@ -996,7 +995,7 @@ void run_vm(EngineState *s) { case op_class: // 0x28 (40) // Get class address s->r_acc = s->_segMan->getClassAddress((unsigned)opparams[0], SCRIPT_GET_LOCK, - s->xs->addr.pc.segment); + s->xs->addr.pc.getSegment()); break; case 0x29: // (41) @@ -1008,7 +1007,7 @@ void run_vm(EngineState *s) { s_temp = s->xs->sp; s->xs->sp -= ((opparams[0] >> 1) + s->r_rest); // Adjust stack - s->xs->sp[1].offset += s->r_rest; + s->xs->sp[1].incOffset(s->r_rest); xs_new = send_selector(s, s->xs->objp, s->xs->objp, s_temp, (int)(opparams[0] >> 1) + (uint16)s->r_rest, s->xs->sp); @@ -1021,7 +1020,7 @@ void run_vm(EngineState *s) { case op_super: // 0x2b (43) // Send to any class - r_temp = s->_segMan->getClassAddress(opparams[0], SCRIPT_GET_LOAD, s->xs->addr.pc.segment); + r_temp = s->_segMan->getClassAddress(opparams[0], SCRIPT_GET_LOAD, s->xs->addr.pc.getSegment()); if (!r_temp.isPointer()) error("[VM]: Invalid superclass in object"); @@ -1029,7 +1028,7 @@ void run_vm(EngineState *s) { s_temp = s->xs->sp; s->xs->sp -= ((opparams[1] >> 1) + s->r_rest); // Adjust stack - s->xs->sp[1].offset += s->r_rest; + s->xs->sp[1].incOffset(s->r_rest); xs_new = send_selector(s, r_temp, s->xs->objp, s_temp, (int)(opparams[1] >> 1) + (uint16)s->r_rest, s->xs->sp); @@ -1058,14 +1057,14 @@ void run_vm(EngineState *s) { var_number = temp & 0x03; // Get variable type // Get variable block offset - r_temp.segment = s->variablesSegment[var_number]; - r_temp.offset = s->variables[var_number] - s->variablesBase[var_number]; + r_temp.setSegment(s->variablesSegment[var_number]); + r_temp.setOffset(s->variables[var_number] - s->variablesBase[var_number]); if (temp & 0x08) // Add accumulator offset if requested - r_temp.offset += s->r_acc.requireSint16(); + r_temp.incOffset(s->r_acc.requireSint16()); - r_temp.offset += opparams[1]; // Add index - r_temp.offset *= 2; // variables are 16 bit + r_temp.incOffset(opparams[1]); // Add index + r_temp.setOffset(r_temp.getOffset() * 2); // variables are 16 bit // That's the immediate address now s->r_acc = r_temp; break; @@ -1129,28 +1128,28 @@ void run_vm(EngineState *s) { case op_lofsa: // 0x39 (57) case op_lofss: // 0x3a (58) // Load offset to accumulator or push to stack - r_temp.segment = s->xs->addr.pc.segment; + r_temp.setSegment(s->xs->addr.pc.getSegment()); switch (g_sci->_features->detectLofsType()) { case SCI_VERSION_0_EARLY: - r_temp.offset = s->xs->addr.pc.offset + opparams[0]; + r_temp.setOffset(s->xs->addr.pc.getOffset() + opparams[0]); break; case SCI_VERSION_1_MIDDLE: - r_temp.offset = opparams[0]; + r_temp.setOffset(opparams[0]); break; case SCI_VERSION_1_1: - r_temp.offset = opparams[0] + local_script->getScriptSize(); + r_temp.setOffset(opparams[0] + local_script->getScriptSize()); break; case SCI_VERSION_3: // In theory this can break if the variant with a one-byte argument is // used. For now, assume it doesn't happen. - r_temp.offset = local_script->relocateOffsetSci3(s->xs->addr.pc.offset-2); + r_temp.setOffset(local_script->relocateOffsetSci3(s->xs->addr.pc.getOffset() - 2)); break; default: error("Unknown lofs type"); } - if (r_temp.offset >= scr->getBufSize()) + if (r_temp.getOffset() >= scr->getBufSize()) error("VM: lofsa/lofss operation overflowed: %04x:%04x beyond end" " of script (at %04x)", PRINT_REG(r_temp), scr->getBufSize()); diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index 67b9dd44eb..f2d225b1d8 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -116,7 +116,7 @@ struct ExecStack { if (localsSegment_ != 0xFFFF) local_segment = localsSegment_; else - local_segment = pc_.segment; + local_segment = pc_.getSegment(); debugSelector = debugSelector_; debugExportId = debugExportId_; debugLocalCallOffset = debugLocalCallOffset_; diff --git a/engines/sci/engine/vm_types.cpp b/engines/sci/engine/vm_types.cpp index b95fd58129..27015d9be4 100644 --- a/engines/sci/engine/vm_types.cpp +++ b/engines/sci/engine/vm_types.cpp @@ -43,17 +43,17 @@ reg_t reg_t::lookForWorkaround(const reg_t right) const { reg_t reg_t::operator+(const reg_t right) const { if (isPointer() && right.isNumber()) { // Pointer arithmetics. Only some pointer types make sense here - SegmentObj *mobj = g_sci->getEngineState()->_segMan->getSegmentObj(segment); + SegmentObj *mobj = g_sci->getEngineState()->_segMan->getSegmentObj(getSegment()); if (!mobj) - error("[VM]: Attempt to add %d to invalid pointer %04x:%04x", right.offset, PRINT_REG(*this)); + error("[VM]: Attempt to add %d to invalid pointer %04x:%04x", right.getOffset(), PRINT_REG(*this)); switch (mobj->getType()) { case SEG_TYPE_LOCALS: case SEG_TYPE_SCRIPT: case SEG_TYPE_STACK: case SEG_TYPE_DYNMEM: - return make_reg(segment, offset + right.toSint16()); + return make_reg(getSegment(), getOffset() + right.toSint16()); default: return lookForWorkaround(right); } @@ -69,12 +69,12 @@ reg_t reg_t::operator+(const reg_t right) const { } reg_t reg_t::operator-(const reg_t right) const { - if (segment == right.segment) { + if (getSegment() == right.getSegment()) { // We can subtract numbers, or pointers with the same segment, // an operation which will yield a number like in C return make_reg(0, toSint16() - right.toSint16()); } else { - return *this + make_reg(right.segment, -right.offset); + return *this + make_reg(right.getSegment(), -right.toSint16()); } } @@ -174,7 +174,7 @@ reg_t reg_t::operator^(const reg_t right) const { } int reg_t::cmp(const reg_t right, bool treatAsUnsigned) const { - if (segment == right.segment) { // can compare things in the same segment + if (getSegment() == right.getSegment()) { // can compare things in the same segment if (treatAsUnsigned || !isNumber()) return toUint16() - right.toUint16(); else @@ -218,7 +218,7 @@ bool reg_t::pointerComparisonWithInteger(const reg_t right) const { // SQ1, room 28, when throwing water at the Orat // SQ1, room 58, when giving the ID card to the robot // SQ4 CD, at the first game screen, when the narrator is about to speak - return (isPointer() && right.isNumber() && right.offset <= 2000 && getSciVersion() <= SCI_VERSION_1_1); + return (isPointer() && right.isNumber() && right.getOffset() <= 2000 && getSciVersion() <= SCI_VERSION_1_1); } } // End of namespace Sci diff --git a/engines/sci/engine/vm_types.h b/engines/sci/engine/vm_types.h index 7b155a4532..2995ba3c12 100644 --- a/engines/sci/engine/vm_types.h +++ b/engines/sci/engine/vm_types.h @@ -31,43 +31,64 @@ namespace Sci { typedef uint16 SegmentId; struct reg_t { - SegmentId segment; - uint16 offset; + // Segment and offset. These should never be accessed directly + SegmentId _segment; + uint16 _offset; + + inline SegmentId getSegment() const { + return _segment; + } + + inline void setSegment(SegmentId segment) { + _segment = segment; + } + + inline uint16 getOffset() const { + return _offset; + } + + inline void setOffset(uint16 offset) { + _offset = offset; + } + + inline void incOffset(int16 offset) { + setOffset(getOffset() + offset); + } inline bool isNull() const { - return (offset | segment) == 0; + return (_offset | getSegment()) == 0; } inline uint16 toUint16() const { - return offset; + return _offset; } inline int16 toSint16() const { - return (int16)offset; + return (int16)_offset; } bool isNumber() const { - return segment == 0; + return getSegment() == 0; } bool isPointer() const { - return segment != 0 && segment != 0xFFFF; + return getSegment() != 0 && getSegment() != 0xFFFF; } uint16 requireUint16() const; int16 requireSint16() const; inline bool isInitialized() const { - return segment != 0xFFFF; + return getSegment() != 0xFFFF; } // Comparison operators bool operator==(const reg_t &x) const { - return (offset == x.offset) && (segment == x.segment); + return (getOffset() == x.getOffset()) && (getSegment() == x.getSegment()); } bool operator!=(const reg_t &x) const { - return (offset != x.offset) || (segment != x.segment); + return (getOffset() != x.getOffset()) || (getSegment() != x.getSegment()); } bool operator>(const reg_t right) const { @@ -141,12 +162,12 @@ private: static inline reg_t make_reg(SegmentId segment, uint16 offset) { reg_t r; - r.offset = offset; - r.segment = segment; + r.setSegment(segment); + r.setOffset(offset); return r; } -#define PRINT_REG(r) (0xffff) & (unsigned) (r).segment, (unsigned) (r).offset +#define PRINT_REG(r) (0xffff) & (unsigned) (r).getSegment(), (unsigned) (r).getOffset() // Stack pointer type typedef reg_t *StackPtr; diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index 983e697481..ee28c5ca31 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -723,7 +723,7 @@ void GfxAnimate::printAnimateList(Console *con) { const AnimateList::iterator end = _list.end(); for (it = _list.begin(); it != end; ++it) { - Script *scr = _s->_segMan->getScriptIfLoaded(it->object.segment); + Script *scr = _s->_segMan->getScriptIfLoaded(it->object.getSegment()); int16 scriptNo = scr ? scr->getScriptNumber() : -1; con->DebugPrintf("%04x:%04x (%s), script %d, view %d (%d, %d), pal %d, " diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp index 47f34cf99d..bfecc296a2 100644 --- a/engines/sci/graphics/menu.cpp +++ b/engines/sci/graphics/menu.cpp @@ -219,7 +219,7 @@ void GfxMenu::kernelAddEntry(Common::String title, Common::String content, reg_t } } itemEntry->textVmPtr = contentVmPtr; - itemEntry->textVmPtr.offset += beginPos; + itemEntry->textVmPtr.incOffset(beginPos); if (rightAlignedPos) { rightAlignedPos++; @@ -297,13 +297,13 @@ void GfxMenu::kernelSetAttribute(uint16 menuId, uint16 itemId, uint16 attributeI // We assume here that no script ever creates a separatorLine dynamically break; case SCI_MENU_ATTRIBUTE_KEYPRESS: - itemEntry->keyPress = tolower(value.offset); + itemEntry->keyPress = tolower(value.getOffset()); itemEntry->keyModifier = 0; // TODO: Find out how modifier is handled - debug("setAttr keypress %X %X", value.segment, value.offset); + debug("setAttr keypress %X %X", value.getSegment(), value.getOffset()); break; case SCI_MENU_ATTRIBUTE_TAG: - itemEntry->tag = value.offset; + itemEntry->tag = value.getOffset(); break; default: // Happens when loading a game in LSL3 - attribute 1A diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp index c951f3349d..89f3625e2c 100644 --- a/engines/sci/graphics/paint16.cpp +++ b/engines/sci/graphics/paint16.cpp @@ -491,10 +491,10 @@ reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) { // processing codes in argv while (argc > 0) { displayArg = argv[0]; - if (displayArg.segment) - displayArg.offset = 0xFFFF; + if (displayArg.getSegment()) + displayArg.setOffset(0xFFFF); argc--; argv++; - switch (displayArg.offset) { + switch (displayArg.getOffset()) { case SCI_DISPLAY_MOVEPEN: _ports->moveTo(argv[0].toUint16(), argv[1].toUint16()); argc -= 2; argv += 2; @@ -547,9 +547,9 @@ reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) { if (!(g_sci->getGameId() == GID_LONGBOW && g_sci->isDemo()) && !(g_sci->getGameId() == GID_QFG1 && g_sci->isDemo()) && !(g_sci->getGameId() == GID_PQ2)) - error("Unknown kDisplay argument %d", displayArg.offset); + error("Unknown kDisplay argument %d", displayArg.getOffset()); - if (displayArg.offset == SCI_DISPLAY_DUMMY2) { + if (displayArg.getOffset() == SCI_DISPLAY_DUMMY2) { if (!argc) error("No parameter left for kDisplay(115)"); argc--; argv++; diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index f8ddf64551..c9c0d25bc6 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -2590,7 +2590,7 @@ Common::String ResourceManager::findSierraGameId() { if (!heap) return ""; - int16 gameObjectOffset = findGameObject(false).offset; + int16 gameObjectOffset = findGameObject(false).getOffset(); if (!gameObjectOffset) return ""; diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 960016764a..d43a9d06fc 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -453,8 +453,8 @@ static byte patchGameRestoreSaveSci21[] = { }; static void patchGameSaveRestoreCode(SegManager *segMan, reg_t methodAddress, byte id) { - Script *script = segMan->getScript(methodAddress.segment); - byte *patchPtr = const_cast(script->getBuf(methodAddress.offset)); + Script *script = segMan->getScript(methodAddress.getSegment()); + byte *patchPtr = const_cast(script->getBuf(methodAddress.getOffset())); if (getSciVersion() <= SCI_VERSION_1_1) memcpy(patchPtr, patchGameRestoreSave, sizeof(patchGameRestoreSave)); else // SCI2+ @@ -463,8 +463,8 @@ static void patchGameSaveRestoreCode(SegManager *segMan, reg_t methodAddress, by } static void patchGameSaveRestoreCodeSci21(SegManager *segMan, reg_t methodAddress, byte id, bool doRestore) { - Script *script = segMan->getScript(methodAddress.segment); - byte *patchPtr = const_cast(script->getBuf(methodAddress.offset)); + Script *script = segMan->getScript(methodAddress.getSegment()); + byte *patchPtr = const_cast(script->getBuf(methodAddress.getOffset())); memcpy(patchPtr, patchGameRestoreSaveSci21, sizeof(patchGameRestoreSaveSci21)); if (doRestore) patchPtr[2] = 0x78; // push1 @@ -740,7 +740,7 @@ GUI::Debugger *SciEngine::getDebugger() { if (_gamestate) { ExecStack *xs = &(_gamestate->_executionStack.back()); if (xs) { - xs->addr.pc.offset = _debugState.old_pc_offset; + xs->addr.pc.setOffset(_debugState.old_pc_offset); xs->sp = _debugState.old_sp; } } diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp index 05bb90332a..989df7c8a1 100644 --- a/engines/sci/sound/soundcmd.cpp +++ b/engines/sci/sound/soundcmd.cpp @@ -61,7 +61,7 @@ reg_t SoundCommandParser::kDoSoundInit(int argc, reg_t *argv, reg_t acc) { } int SoundCommandParser::getSoundResourceId(reg_t obj) { - int resourceId = obj.segment ? readSelectorValue(_segMan, obj, SELECTOR(number)) : -1; + int resourceId = obj.getSegment() ? readSelectorValue(_segMan, obj, SELECTOR(number)) : -1; // Modify the resourceId for the Windows versions that have an alternate MIDI soundtrack, like SSCI did. if (g_sci && g_sci->_features->useAltWinGMSound()) { // Check if the alternate MIDI song actually exists... @@ -291,7 +291,7 @@ reg_t SoundCommandParser::kDoSoundPause(int argc, reg_t *argv, reg_t acc) { reg_t obj = argv[0]; uint16 value = argc > 1 ? argv[1].toUint16() : 0; - if (!obj.segment) { // pause the whole playlist + if (!obj.getSegment()) { // pause the whole playlist _music->pauseAll(value); } else { // pause a playlist slot MusicEntry *musicSlot = _music->getSlot(obj); @@ -369,7 +369,7 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) { case 5: // SCI1+ (SCI1 late sound scheme), with fade and continue musicSlot->fadeTo = CLIP(argv[1].toUint16(), 0, MUSIC_VOLUME_MAX); // sometimes we get objects in that position, fix it up (ffs. workarounds) - if (!argv[1].segment) + if (!argv[1].getSegment()) musicSlot->fadeStep = volume > musicSlot->fadeTo ? -argv[3].toUint16() : argv[3].toUint16(); else musicSlot->fadeStep = volume > musicSlot->fadeTo ? -5 : 5; -- cgit v1.2.3 From 065e83e44fd16571b251b227c8fb5ffaccbadbed Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 18 Jun 2012 12:20:07 +0300 Subject: SCI: Store script sizes in 32-bit integers Since scripts can be larger than 64KB, and getBufSize() returns a 32-bit integer, adapt variables that store script sizes accordingly --- engines/sci/console.cpp | 4 ++-- engines/sci/engine/scriptdebug.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 7e9f9b1c38..91795117e3 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -2630,7 +2630,7 @@ bool Console::cmdViewReference(int argc, const char **argv) { #endif default: { const SegmentRef block = _engine->_gamestate->_segMan->dereference(reg); - uint16 size = block.maxSize; + uint32 size = block.maxSize; DebugPrintf("raw data\n"); @@ -2936,7 +2936,7 @@ bool Console::cmdDisassembleAddress(int argc, const char **argv) { uint opCount = 1; bool printBWTag = false; bool printBytes = false; - uint16 size; + uint32 size; if (parse_reg_t(_engine->_gamestate, argv[1], &vpc, false)) { DebugPrintf("Invalid address passed.\n"); diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 6242dc4c93..f55884b1c0 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -72,7 +72,7 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode SegmentObj *mobj = s->_segMan->getSegment(pos.getSegment(), SEG_TYPE_SCRIPT); Script *script_entity = NULL; const byte *scr; - uint scr_size; + uint32 scr_size; reg_t retval = make_reg(pos.getSegment(), pos.getOffset() + 1); uint16 param_value = 0xffff; // Suppress GCC warning by setting default value, chose value as invalid to getKernelName etc. uint i = 0; @@ -344,7 +344,7 @@ void SciEngine::scriptDebug() { if (mobj) { Script *scr = (Script *)mobj; const byte *code_buf = scr->getBuf(); - uint16 code_buf_size = scr->getBufSize(); + uint32 code_buf_size = scr->getBufSize(); int opcode = pc.getOffset() >= code_buf_size ? 0 : code_buf[pc.getOffset()]; int op = opcode >> 1; int paramb1 = pc.getOffset() + 1 >= code_buf_size ? 0 : code_buf[pc.getOffset() + 1]; -- cgit v1.2.3 From 892ca3a9c57a948254a2779821a24576f82a77d6 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 18 Jun 2012 17:04:46 +0200 Subject: GOB: Don't loop /all/ sounds in Little Red Just the title music... *cough* --- engines/gob/inter_littlered.cpp | 4 ++-- engines/gob/sound/soundblaster.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/engines/gob/inter_littlered.cpp b/engines/gob/inter_littlered.cpp index 729d9f5694..01aa4c2158 100644 --- a/engines/gob/inter_littlered.cpp +++ b/engines/gob/inter_littlered.cpp @@ -110,9 +110,9 @@ void Inter_LittleRed::oLittleRed_keyFunc(OpFuncParams ¶ms) { } void Inter_LittleRed::oLittleRed_playComposition(OpFuncParams ¶ms) { - _vm->_sound->blasterRepeatComposition(-1); - o1_playComposition(params); + + _vm->_sound->blasterRepeatComposition(-1); } } // End of namespace Gob diff --git a/engines/gob/sound/soundblaster.cpp b/engines/gob/sound/soundblaster.cpp index 915d744494..19c2346448 100644 --- a/engines/gob/sound/soundblaster.cpp +++ b/engines/gob/sound/soundblaster.cpp @@ -49,6 +49,8 @@ void SoundBlaster::stopSound(int16 fadeLength, SoundDesc *sndDesc) { if (sndDesc && (sndDesc != _curSoundDesc)) return; + _compositionRepCount = 0; + if (fadeLength <= 0) _curSoundDesc = 0; @@ -64,6 +66,7 @@ void SoundBlaster::stopComposition() { void SoundBlaster::endComposition() { _compositionPos = -1; + _compositionRepCount = 0; } void SoundBlaster::nextCompositionPos() { -- cgit v1.2.3 From 2e16e7fc4c6983db99ae99be9a420ba4549be35e Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 18 Jun 2012 17:44:04 +0200 Subject: GOB: Add a workaround for the wrong German animal names in Little Red The DOS, Amiga and Atari version of Little Red come with a small screen, accessible through the main menu, that lets children read and listen to animal names in 5 languages: French, German, English, Spanish and Italian. Unfortunately, the German names are partially wrong. This is especially tragic because this is a game for small children and they're supposed to learn something here. So I deem fixing this a very good idea. Just to be sure, someone should probably look over the French, Spanish and Italian words too. --- engines/gob/draw.h | 2 ++ engines/gob/draw_v2.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/engines/gob/draw.h b/engines/gob/draw.h index 24c5550ea5..1359df632f 100644 --- a/engines/gob/draw.h +++ b/engines/gob/draw.h @@ -258,6 +258,8 @@ public: private: uint8 _mayorWorkaroundStatus; + + void fixLittleRedStrings(); }; class Draw_Bargon: public Draw_v2 { diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index d9b7a12639..b637ecbd2b 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -805,6 +805,10 @@ void Draw_v2::spriteOperation(int16 operation) { break; case DRAW_PRINTTEXT: + // WORKAROUND: There's mistakes in Little Red's animal names. + // See this function for details. + fixLittleRedStrings(); + len = strlen(_textToPrint); left = _destSpriteX; @@ -933,4 +937,39 @@ void Draw_v2::spriteOperation(int16 operation) { } } +/* WORKAROUND: Fix wrong German animal names in Once Upon A Time: Little Red Riding Hood. + * + * The DOS, Amiga and Atari version of Little Red come with a small screen, accessible + * through the main menu, that lets children read and listen to animal names in 5 + * languages: French, German, English, Spanish and Italian. + * Unfortunately, the German names are partially wrong. This is especially tragic + * because this is a game for small children and they're supposed to learn something + * here. We fix this. + * + * However, there's also problems with the recorded spoken German names: + * - "Der Rabe" has a far too short "a", sounding more like "Rabbe" + * - The wrong article for "Schmetterling" is very audible + * - In general, the words are way too overpronounced + * These are, of course, way harder to fix. + */ + +static const char *kLittleRedStrings[][2] = { + {"die Heule" , "die Eule"}, + {"das Schmetterling" , "der Schmetterling"}, + {"die Vespe" , "die Wespe"}, + {"das Eich\224rnchen" , "das Eichh\224rnchen"} +}; + +void Draw_v2::fixLittleRedStrings() { + if (!_textToPrint || (_vm->getGameType() != kGameTypeLittleRed)) + return; + + for (int i = 0; i < ARRAYSIZE(kLittleRedStrings); i++) { + if (!strcmp(_textToPrint, kLittleRedStrings[i][0])) { + _textToPrint = kLittleRedStrings[i][1]; + return; + } + } +} + } // End of namespace Gob -- cgit v1.2.3 From ad2b898eb39af8d7edb76788abc3366783d4c99a Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 18 Jun 2012 20:58:15 +0200 Subject: CGE: Remove dead code originally used to load a savegame when starting the game --- engines/cge/cge_main.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index 05a94df606..2620147c4d 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -1507,22 +1507,9 @@ bool CGEEngine::showTitle(const char *name) { _vga->_showQ->clear(); _vga->copyPage(0, 2); - if (_mode == 0) { -// The auto-load of savegame #0 is currently disabled -#if 0 - if (savegameExists(0)) { - // Load the savegame - loadGame(0, NULL, true); // only system vars - _vga->setColors(_vga->_sysPal, 64); - _vga->update(); - if (_flag[3]) { //flag FINIS - _mode++; - _flag[3] = false; - } - } else -#endif - _mode++; - } + // The original was automatically loading the savegame when available + if (_mode == 0) + _mode++; } if (_mode < 2) -- cgit v1.2.3 From 954d56a30fcde8b72c30d8fdfa7ad68945d3ac96 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Mon, 18 Jun 2012 20:21:22 +0100 Subject: PS2: Implement algorithm for day of week for use in tm_wday. --- backends/platform/ps2/ps2time.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/backends/platform/ps2/ps2time.cpp b/backends/platform/ps2/ps2time.cpp index decfc552ec..124c154d06 100644 --- a/backends/platform/ps2/ps2time.cpp +++ b/backends/platform/ps2/ps2time.cpp @@ -105,8 +105,14 @@ void OSystem_PS2::readRtcTime(void) { g_day, g_month, g_year + 2000); } -void OSystem_PS2::getTimeAndDate(TimeDate &t) const { +// Tomohiko Sakamoto's 1993 algorithm for any Gregorian date +static int dayOfWeek(int y, int m, int d) { + static const int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}; + y -= m < 3; + return (y + y/4 - y/100 + y/400 + t[m-1] + d) % 7; +} +void OSystem_PS2::getTimeAndDate(TimeDate &t) const { uint32 currentSecs = g_timeSecs + (msecCount - g_lastTimeCheck) / 1000; if (currentSecs >= SECONDS_PER_DAY) { buildNewDate(+1); @@ -120,9 +126,5 @@ void OSystem_PS2::getTimeAndDate(TimeDate &t) const { t.tm_year = g_year + 100; t.tm_mday = g_day; t.tm_mon = g_month - 1; -#ifdef RELEASE_BUILD - #error getTimeAndDate() is not setting the day of the week -#else - t.tm_wday = 0; // FIXME -#endif + t.tm_wday = dayOfWeek(t.tm_year, t.tm_mon, t.tm_mday); } -- cgit v1.2.3 From 53ee7f52a9e39e90313ada5613dd89d4fdbe3943 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 18 Jun 2012 21:23:39 +0200 Subject: HUGO: Remove dead code --- engines/hugo/file.h | 3 --- engines/hugo/hugo.cpp | 15 +-------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/engines/hugo/file.h b/engines/hugo/file.h index e4aa7f7fec..1438bd2054 100644 --- a/engines/hugo/file.h +++ b/engines/hugo/file.h @@ -123,9 +123,6 @@ protected: private: byte *convertPCC(byte *p, const uint16 y, const uint16 bpl, ImagePtr dataPtr) const; UifHdr *getUIFHeader(const Uif id); - -//Strangerke : Not used? - void printBootText(); }; class FileManager_v1d : public FileManager { diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index f2db630198..9d28e0ac69 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -541,19 +541,6 @@ void HugoEngine::initStatus() { // Initialize every start of new game _status._tick = 0; // Tick count _status._viewState = kViewIdle; // View state - -// Strangerke - Suppress as related to playback -// _status._recordFl = false; // Not record mode -// _status._playbackFl = false; // Not playback mode -// Strangerke - Not used ? -// _status._mmtime = false; // Multimedia timer support -// _status._helpFl = false; // Not calling WinHelp() -// _status._demoFl = false; // Not demo mode -// _status._path[0] = 0; // Path to write files -// _status._screenWidth = 0; // Desktop screen width -// _status._saveTick = 0; // Time of last save -// _status._saveSlot = 0; // Slot to save/restore game -// _status._textBoxFl = false; // Not processing a text box } /** @@ -566,7 +553,7 @@ void HugoEngine::initConfig() { _config._soundFl = true; // Sound state initially on _config._turboFl = false; // Turbo state initially off initPlaylist(_config._playlist); // Initialize default tune playlist - _file->readBootFile(); // Read startup structure + _file->readBootFile(); // Read startup structure } /** -- cgit v1.2.3 From 6e11720e298805904181656b282b217cacc3675a Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 18 Jun 2012 21:27:58 +0200 Subject: HUGO: Missing file in previous commit --- engines/hugo/file.cpp | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp index 5556f5abc0..15ee06c82a 100644 --- a/engines/hugo/file.cpp +++ b/engines/hugo/file.cpp @@ -522,49 +522,6 @@ bool FileManager::restoreGame(const int16 slot) { return true; } -/** - * Read the encrypted text from the boot file and print it - */ -void FileManager::printBootText() { - debugC(1, kDebugFile, "printBootText()"); - - Common::File ofp; - if (!ofp.open(getBootFilename())) { - if (_vm->getPlatform() == Common::kPlatformPC) { - //TODO initialize properly _boot structure - warning("printBootText - Skipping as Dos versions may be a freeware or shareware"); - return; - } else { - Utils::notifyBox(Common::String::format("Missing startup file '%s'", getBootFilename())); - _vm->getGameStatus()._doQuitFl = true; - return; - } - } - - // Allocate space for the text and print it - char *buf = (char *)malloc(_vm->_boot._exitLen + 1); - if (buf) { - // Skip over the boot structure (already read) and read exit text - ofp.seek((long)sizeof(_vm->_boot), SEEK_SET); - if (ofp.read(buf, _vm->_boot._exitLen) != (size_t)_vm->_boot._exitLen) { - Utils::notifyBox(Common::String::format("Error while reading startup file '%s'", getBootFilename())); - _vm->getGameStatus()._doQuitFl = true; - return; - } - - // Decrypt the exit text, using CRYPT substring - int i; - for (i = 0; i < _vm->_boot._exitLen; i++) - buf[i] ^= s_bootCypher[i % s_bootCypherLen]; - - buf[i] = '\0'; - Utils::notifyBox(buf); - } - - free(buf); - ofp.close(); -} - /** * Reads boot file for program environment. Fatal error if not there or * file checksum is bad. De-crypts structure while checking checksum -- cgit v1.2.3 From e8546a46a01ee74f7d9833196246b27fbc5bc473 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 18 Jun 2012 21:30:51 +0200 Subject: HUGO: Remove F9 key handling --- engines/hugo/display.cpp | 2 +- engines/hugo/parser.cpp | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index b86b1f0366..fbe39b3a0c 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -488,7 +488,7 @@ void Screen::userHelp() const { "F5 - Restore game\n" "F6 - Inventory\n" "F8 - Turbo button\n" - "F9 - Boss button\n\n" + "\n" "ESC - Return to game"); } diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp index d18cc2181c..5fdb2026a7 100644 --- a/engines/hugo/parser.cpp +++ b/engines/hugo/parser.cpp @@ -362,9 +362,6 @@ void Parser::keyHandler(Common::Event event) { case Common::KEYCODE_F8: // Turbo mode switchTurbo(); break; - case Common::KEYCODE_F9: // Boss button - warning("STUB: F9 (DOS) - BossKey"); - break; default: // Any other key if (!gameStatus._storyModeFl) { // Keyboard disabled // Add printable keys to ring buffer -- cgit v1.2.3 From f92f9f9faf34d378939761e211649572ec72cd25 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 19 Jun 2012 01:48:21 +0200 Subject: PS2: Small formatting fixes. --- backends/platform/ps2/ps2time.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/platform/ps2/ps2time.cpp b/backends/platform/ps2/ps2time.cpp index 124c154d06..1cddd230a0 100644 --- a/backends/platform/ps2/ps2time.cpp +++ b/backends/platform/ps2/ps2time.cpp @@ -107,9 +107,9 @@ void OSystem_PS2::readRtcTime(void) { // Tomohiko Sakamoto's 1993 algorithm for any Gregorian date static int dayOfWeek(int y, int m, int d) { - static const int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}; + static const int t[] = { 0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4 }; y -= m < 3; - return (y + y/4 - y/100 + y/400 + t[m-1] + d) % 7; + return (y + y / 4 - y / 100 + y / 400 + t[m - 1] + d) % 7; } void OSystem_PS2::getTimeAndDate(TimeDate &t) const { -- cgit v1.2.3 From 221ee34926927693182f835a4404eca17bdb1943 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 20 Jun 2012 04:25:20 +0300 Subject: SCI: Don't attempt to draw line feed characters in SCI32 Fixes junk in the about dialogs in PQ4 --- engines/sci/graphics/text32.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp index 7907809c91..e0f16e7265 100644 --- a/engines/sci/graphics/text32.cpp +++ b/engines/sci/graphics/text32.cpp @@ -165,10 +165,25 @@ reg_t GfxText32::createTextBitmapInternal(Common::String &text, reg_t textObject warning("Invalid alignment %d used in TextBox()", alignment); } + unsigned char curChar; + for (int i = 0; i < charCount; i++) { - unsigned char curChar = txt[i]; - font->drawToBuffer(curChar, curY + offsetY, curX + offsetX, foreColor, dimmed, bitmap, width, height); - curX += font->getCharWidth(curChar); + curChar = txt[i]; + + switch (curChar) { + case 0x0A: + case 0x0D: + case 0: + case 0x9781: // this one is used by SQ4/japanese as line break as well + break; + case 0x7C: + warning("Code processing isn't implemented in SCI32"); + break; + default: + font->drawToBuffer(curChar, curY + offsetY, curX + offsetX, foreColor, dimmed, bitmap, width, height); + curX += font->getCharWidth(curChar); + break; + } } curX = 0; -- cgit v1.2.3 From 80ae9d7d34234e6cf9a7464723691d7b2b72cb26 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 20 Jun 2012 03:31:50 +0200 Subject: GUI: Allow tooltips to be changed after widget creation. --- gui/Tooltip.cpp | 2 +- gui/gui-manager.cpp | 2 +- gui/widget.h | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gui/Tooltip.cpp b/gui/Tooltip.cpp index 85e5856cff..88124e782b 100644 --- a/gui/Tooltip.cpp +++ b/gui/Tooltip.cpp @@ -37,7 +37,7 @@ Tooltip::Tooltip() : } void Tooltip::setup(Dialog *parent, Widget *widget, int x, int y) { - assert(widget->getTooltip()); + assert(widget->hasTooltip()); _maxWidth = g_gui.xmlEval()->getVar("Globals.Tooltip.MaxWidth", 100); _xdelta = g_gui.xmlEval()->getVar("Globals.Tooltip.XDelta", 0); diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index abd781e1a3..a0ef4216aa 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -381,7 +381,7 @@ void GuiManager::runLoop() { if (tooltipCheck && _lastMousePosition.time + kTooltipDelay < _system->getMillis()) { Widget *wdg = activeDialog->findWidget(_lastMousePosition.x, _lastMousePosition.y); - if (wdg && wdg->getTooltip() && !(wdg->getFlags() & WIDGET_PRESSED)) { + if (wdg && wdg->hasTooltip() && !(wdg->getFlags() & WIDGET_PRESSED)) { Tooltip *tooltip = new Tooltip(); tooltip->setup(activeDialog, wdg, _lastMousePosition.x, _lastMousePosition.y); tooltip->runModal(); diff --git a/gui/widget.h b/gui/widget.h index 6de56862c3..d80b2ad7e2 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -88,7 +88,7 @@ protected: uint16 _id; bool _hasFocus; ThemeEngine::WidgetStateInfo _state; - const char *_tooltip; + Common::String _tooltip; private: uint16 _flags; @@ -142,7 +142,9 @@ public: uint8 parseHotkey(const Common::String &label); Common::String cleanupHotkey(const Common::String &label); - const char *getTooltip() const { return _tooltip; } + bool hasTooltip() const { return !_tooltip.empty(); } + const Common::String &getTooltip() const { return _tooltip; } + void setTooltip(const Common::String &tooltip) { _tooltip = tooltip; } protected: void updateState(int oldFlags, int newFlags); -- cgit v1.2.3 From d7db655c5b832691fbaa0d0d175de38f43217dc2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 20 Jun 2012 03:42:32 +0200 Subject: GUI: Show additional meta data in the thumbnail load chooser via tooltip. --- gui/saveload-dialog.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 6740fcad13..5d9d489fec 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -556,6 +556,33 @@ void LoadChooserThumbnailed::updateSaves() { curButton.setVisible(true); curButton.button->setGfx(desc.getThumbnail()); curButton.description->setLabel(Common::String::format("%d. %s", saveSlot, desc.getDescription().c_str())); + + Common::String tooltip(_("Name: ")); + tooltip += desc.getDescription(); + + if (_saveDateSupport) { + const Common::String &saveDate = desc.getSaveDate(); + if (!saveDate.empty()) { + tooltip += "\n"; + tooltip += _("Date: ") + saveDate; + } + + const Common::String &saveTime = desc.getSaveTime(); + if (!saveTime.empty()) { + tooltip += "\n"; + tooltip += _("Time: ") + saveTime; + } + } + + if (_playTimeSupport) { + const Common::String &playTime = desc.getPlayTime(); + if (!playTime.empty()) { + tooltip += "\n"; + tooltip += _("Playtime: ") + playTime; + } + } + + curButton.button->setTooltip(tooltip); } if (_curPage > 0) -- cgit v1.2.3 From ea4260529783f80db0abde70c6b1723cf3c6f720 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 20 Jun 2012 10:55:24 +0300 Subject: SCI: Remove multibyte character processing code from SCI32 There are no Japanese/PC-98 SCI32 games, so this code is not needed --- engines/sci/graphics/text32.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp index e0f16e7265..f14ae2ef0b 100644 --- a/engines/sci/graphics/text32.cpp +++ b/engines/sci/graphics/text32.cpp @@ -165,7 +165,7 @@ reg_t GfxText32::createTextBitmapInternal(Common::String &text, reg_t textObject warning("Invalid alignment %d used in TextBox()", alignment); } - unsigned char curChar; + byte curChar; for (int i = 0; i < charCount; i++) { curChar = txt[i]; @@ -174,7 +174,6 @@ reg_t GfxText32::createTextBitmapInternal(Common::String &text, reg_t textObject case 0x0A: case 0x0D: case 0: - case 0x9781: // this one is used by SQ4/japanese as line break as well break; case 0x7C: warning("Code processing isn't implemented in SCI32"); @@ -317,7 +316,7 @@ void GfxText32::StringWidth(const char *str, GuiResourceId fontId, int16 &textWi } void GfxText32::Width(const char *text, int16 from, int16 len, GuiResourceId fontId, int16 &textWidth, int16 &textHeight, bool restoreFont) { - uint16 curChar; + byte curChar; textWidth = 0; textHeight = 0; GfxFont *font = _cache->getFont(fontId); @@ -329,7 +328,6 @@ void GfxText32::Width(const char *text, int16 from, int16 len, GuiResourceId fon switch (curChar) { case 0x0A: case 0x0D: - case 0x9781: // this one is used by SQ4/japanese as line break as well textHeight = MAX (textHeight, font->getHeight()); break; case 0x7C: -- cgit v1.2.3 From c27741ac3bb356eecb6b3f9abd1e74cb981ffbed Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 20 Jun 2012 12:31:51 +0300 Subject: SCI: Implement kRemapColors(5 - set color intensity) It's finally nighttime in the first murder scene in PQ4 --- engines/sci/engine/kgraphics.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 8f4d99f7df..459766c0a1 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -1237,7 +1237,8 @@ reg_t kRemapColors(EngineState *s, int argc, reg_t *argv) { uint16 percent = argv[2].toUint16(); // 0 - 100 if (argc >= 4) warning("RemapByPercent called with 4 parameters, unknown parameter is %d", argv[3].toUint16()); - g_sci->_gfxPalette->kernelSetIntensity(color, 255, percent, false); + // TODO: It's not correct to set intensity here + //g_sci->_gfxPalette->kernelSetIntensity(color, 255, percent, false); } break; case 3: { // remap to gray @@ -1257,10 +1258,10 @@ reg_t kRemapColors(EngineState *s, int argc, reg_t *argv) { kStub(s, argc, argv); } break; - case 5: { // increment color - //int16 unk1 = argv[1].toSint16(); - //uint16 unk2 = argv[2].toUint16(); - kStub(s, argc, argv); + case 5: { // set color intensity + int16 color = argv[1].toSint16(); + uint16 intensity = argv[2].toUint16(); + g_sci->_gfxPalette->kernelSetIntensity(color, 255, intensity, true); } break; default: -- cgit v1.2.3 From bd3366c2086e32a569eb15522e0c42dee90d50fb Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 20 Jun 2012 12:35:59 +0300 Subject: SCI: Add a warning for kRemapColors(RemapByPercent) --- engines/sci/engine/kgraphics.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 459766c0a1..59dba994b5 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -1237,6 +1237,7 @@ reg_t kRemapColors(EngineState *s, int argc, reg_t *argv) { uint16 percent = argv[2].toUint16(); // 0 - 100 if (argc >= 4) warning("RemapByPercent called with 4 parameters, unknown parameter is %d", argv[3].toUint16()); + warning("kRemapColors: RemapByPercent color %d by %d percent", color, percent); // TODO: It's not correct to set intensity here //g_sci->_gfxPalette->kernelSetIntensity(color, 255, percent, false); } -- cgit v1.2.3 From 5a2e65469f3650dc9785bf27b77d25d285ded4f1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 20 Jun 2012 13:36:29 +0300 Subject: SCI: Change kRemapColors(5) again. Fixes the colors in QFG4 --- engines/sci/engine/kgraphics.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 59dba994b5..0ef268f108 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -1260,9 +1260,16 @@ reg_t kRemapColors(EngineState *s, int argc, reg_t *argv) { } break; case 5: { // set color intensity - int16 color = argv[1].toSint16(); + // TODO: This isn't right, it should be setting a mapping table instead. + // For PQ4, we can emulate this with kernelSetIntensity(). In QFG4, this + // won't do. + //int16 mapping = argv[1].toSint16(); uint16 intensity = argv[2].toUint16(); - g_sci->_gfxPalette->kernelSetIntensity(color, 255, intensity, true); + // HACK for PQ4 + if (g_sci->getGameId() == GID_PQ4) + g_sci->_gfxPalette->kernelSetIntensity(0, 255, intensity, true); + + kStub(s, argc, argv); } break; default: -- cgit v1.2.3 From ac8f282ce1814bd087ca1127afc2f3a4b3cec294 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 20 Jun 2012 17:13:12 +0200 Subject: IPHONE: Replace OverlayColor uses with uint16. --- backends/platform/iphone/osys_video.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/platform/iphone/osys_video.mm b/backends/platform/iphone/osys_video.mm index b01c925024..aa1856490f 100644 --- a/backends/platform/iphone/osys_video.mm +++ b/backends/platform/iphone/osys_video.mm @@ -316,7 +316,7 @@ void OSystem_IPHONE::grabOverlay(void *buf, int pitch) { byte *dst = (byte *)buf; const byte *src = (const byte *)_videoContext->overlayTexture.getBasePtr(0, 0); do { - memcpy(dst, src, _videoContext->overlayWidth * sizeof(OverlayColor)); + memcpy(dst, src, _videoContext->overlayWidth * sizeof(uint16)); src += _videoContext->overlayTexture.pitch; dst += pitch; } while (--h); @@ -329,7 +329,7 @@ void OSystem_IPHONE::copyRectToOverlay(const void *buf, int pitch, int x, int y, //Clip the coordinates if (x < 0) { w += x; - src -= x * sizeof(OverlayColor); + src -= x * sizeof(uint16); x = 0; } @@ -354,7 +354,7 @@ void OSystem_IPHONE::copyRectToOverlay(const void *buf, int pitch, int x, int y, byte *dst = (byte *)_videoContext->overlayTexture.getBasePtr(x, y); do { - memcpy(dst, src, w * sizeof(OverlayColor)); + memcpy(dst, src, w * sizeof(uint16)); src += pitch; dst += _videoContext->overlayTexture.pitch; } while (--h); -- cgit v1.2.3 From 6792f4450b13c1f62acf37673d03f390dfce4e3c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 20 Jun 2012 17:14:51 +0200 Subject: WII: Replace OverlayColor with uint16. --- backends/platform/wii/osystem.h | 2 +- backends/platform/wii/osystem_gfx.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index f1c8d77533..abafa7f642 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -72,7 +72,7 @@ private: bool _overlayVisible; u16 _overlayWidth, _overlayHeight; u32 _overlaySize; - OverlayColor *_overlayPixels; + uint16 *_overlayPixels; gfx_screen_coords_t _coordsOverlay; gfx_tex_t _texOverlay; bool _overlayDirty; diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index 6b0e31bd7b..6fbf51a8d1 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -74,7 +74,7 @@ void OSystem_Wii::initGfx() { #endif _overlaySize = _overlayWidth * _overlayHeight * 2; - _overlayPixels = (OverlayColor *) memalign(32, _overlaySize); + _overlayPixels = (uint16 *) memalign(32, _overlaySize); memset(&_texMouse, 0, sizeof(gfx_tex_t)); memset(&_texOverlay, 0, sizeof(gfx_tex_t)); @@ -573,11 +573,11 @@ void OSystem_Wii::clearOverlay() { void OSystem_Wii::grabOverlay(void *buf, int pitch) { int h = _overlayHeight; - OverlayColor *src = _overlayPixels; + uint16 *src = _overlayPixels; byte *dst = (byte *)buf; do { - memcpy(dst, src, _overlayWidth * sizeof(OverlayColor)); + memcpy(dst, src, _overlayWidth * sizeof(uint16)); src += _overlayWidth; dst += pitch; } while (--h); @@ -588,7 +588,7 @@ void OSystem_Wii::copyRectToOverlay(const void *buf, int pitch, int x, const byte *src = (const byte *)buf; if (x < 0) { w += x; - src -= x * sizeof(OverlayColor); + src -= x * sizeof(uint16); x = 0; } @@ -607,12 +607,12 @@ void OSystem_Wii::copyRectToOverlay(const void *buf, int pitch, int x, if (w <= 0 || h <= 0) return; - OverlayColor *dst = _overlayPixels + (y * _overlayWidth + x); + uint16 *dst = _overlayPixels + (y * _overlayWidth + x); if (_overlayWidth == pitch && pitch == w) { - memcpy(dst, src, h * w * sizeof(OverlayColor)); + memcpy(dst, src, h * w * sizeof(uint16)); } else { do { - memcpy(dst, src, w * sizeof(OverlayColor)); + memcpy(dst, src, w * sizeof(uint16)); src += pitch; dst += _overlayWidth; } while (--h); -- cgit v1.2.3 From 4b32d5de0e83551e18e23a5be575d24585f1d91d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 20 Jun 2012 17:18:19 +0200 Subject: WII: Fix check for whole width updates in copyRectToOverlay. --- backends/platform/wii/osystem_gfx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index 6fbf51a8d1..90e4d98c6b 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -608,8 +608,8 @@ void OSystem_Wii::copyRectToOverlay(const void *buf, int pitch, int x, return; uint16 *dst = _overlayPixels + (y * _overlayWidth + x); - if (_overlayWidth == pitch && pitch == w) { - memcpy(dst, src, h * w * sizeof(uint16)); + if (_overlayWidth == w && pitch == _overlayWidth * sizeof(uint16)) { + memcpy(dst, src, h * pitch); } else { do { memcpy(dst, src, w * sizeof(uint16)); -- cgit v1.2.3 From 36ac1e8b4780bd217c400b3edab62e484b60e388 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 20 Jun 2012 17:20:00 +0200 Subject: PSP: Replace OverlayColor with uint16. --- backends/platform/psp/display_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/platform/psp/display_manager.cpp b/backends/platform/psp/display_manager.cpp index 10a732b1e3..c2ff84c7f5 100644 --- a/backends/platform/psp/display_manager.cpp +++ b/backends/platform/psp/display_manager.cpp @@ -302,7 +302,7 @@ void DisplayManager::init() { // Init overlay since we never change the size _overlay->deallocate(); - _overlay->setBytesPerPixel(sizeof(OverlayColor)); + _overlay->setBytesPerPixel(sizeof(uint16)); _overlay->setSize(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT); _overlay->allocate(); } -- cgit v1.2.3 From 703be9f87cc46e416475d526ba5c412af3d8c282 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 20 Jun 2012 17:21:05 +0200 Subject: N64: Replace OverlayColor with uint16. --- backends/platform/n64/osys_n64.h | 2 +- backends/platform/n64/osys_n64_base.cpp | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h index 3266180a7b..249f72d8fc 100644 --- a/backends/platform/n64/osys_n64.h +++ b/backends/platform/n64/osys_n64.h @@ -81,7 +81,7 @@ protected: uint16 *_offscreen_hic; // Offscreen converted to 16bit surface uint8 *_offscreen_pal; // Offscreen with palette indexes - OverlayColor *_overlayBuffer; // Offscreen for the overlay (16 bit) + uint16 *_overlayBuffer; // Offscreen for the overlay (16 bit) uint16 *_screenPalette; // Array for palette entries (256 colors max) diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp index 8f17171338..cf513eb9f1 100644 --- a/backends/platform/n64/osys_n64_base.cpp +++ b/backends/platform/n64/osys_n64_base.cpp @@ -95,7 +95,7 @@ OSystem_N64::OSystem_N64() { // Allocate memory for offscreen buffers _offscreen_hic = (uint16 *)memalign(8, _screenWidth * _screenHeight * 2); _offscreen_pal = (uint8 *)memalign(8, _screenWidth * _screenHeight); - _overlayBuffer = (uint16 *)memalign(8, _overlayWidth * _overlayHeight * sizeof(OverlayColor)); + _overlayBuffer = (uint16 *)memalign(8, _overlayWidth * _overlayHeight * sizeof(uint16)); _cursor_pal = NULL; _cursor_hic = NULL; @@ -108,7 +108,7 @@ OSystem_N64::OSystem_N64() { // Clean offscreen buffers memset(_offscreen_hic, 0, _screenWidth * _screenHeight * 2); memset(_offscreen_pal, 0, _screenWidth * _screenHeight); - memset(_overlayBuffer, 0, _overlayWidth * _overlayHeight * sizeof(OverlayColor)); + memset(_overlayBuffer, 0, _overlayWidth * _overlayHeight * sizeof(uint16)); // Default graphic mode _graphicMode = OVERS_NTSC_340X240; @@ -667,7 +667,7 @@ void OSystem_N64::hideOverlay() { } void OSystem_N64::clearOverlay() { - memset(_overlayBuffer, 0, _overlayWidth * _overlayHeight * sizeof(OverlayColor)); + memset(_overlayBuffer, 0, _overlayWidth * _overlayHeight * sizeof(uint16)); uint8 skip_lines = (_screenHeight - _gameHeight) / 4; uint8 skip_pixels = (_screenWidth - _gameWidth) / 2; // Center horizontally the image @@ -685,11 +685,11 @@ void OSystem_N64::clearOverlay() { void OSystem_N64::grabOverlay(void *buf, int pitch) { int h = _overlayHeight; - OverlayColor *src = _overlayBuffer; + uint16 *src = _overlayBuffer; byte *dst = (byte *)buf; do { - memcpy(dst, src, _overlayWidth * sizeof(OverlayColor)); + memcpy(dst, src, _overlayWidth * sizeof(uint16)); src += _overlayWidth; dst += pitch; } while (--h); @@ -700,7 +700,7 @@ void OSystem_N64::copyRectToOverlay(const void *buf, int pitch, int x, int y, in //Clip the coordinates if (x < 0) { w += x; - src -= x * sizeof(OverlayColor); + src -= x * sizeof(uint16); x = 0; } @@ -722,13 +722,13 @@ void OSystem_N64::copyRectToOverlay(const void *buf, int pitch, int x, int y, in return; - OverlayColor *dst = _overlayBuffer + (y * _overlayWidth + x); + uint16 *dst = _overlayBuffer + (y * _overlayWidth + x); if (_overlayWidth == pitch && pitch == w) { - memcpy(dst, src, h * w * sizeof(OverlayColor)); + memcpy(dst, src, h * w * sizeof(uint16)); } else { do { - memcpy(dst, src, w * sizeof(OverlayColor)); + memcpy(dst, src, w * sizeof(uint16)); src += pitch; dst += _overlayWidth; } while (--h); -- cgit v1.2.3 From 9701094fcd7709072c0893cba26282781087ea29 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 20 Jun 2012 17:21:50 +0200 Subject: N64: Fix check for whole width updates in copyRectToOverlay. --- backends/platform/n64/osys_n64_base.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp index cf513eb9f1..7d6f8f0b5c 100644 --- a/backends/platform/n64/osys_n64_base.cpp +++ b/backends/platform/n64/osys_n64_base.cpp @@ -724,8 +724,8 @@ void OSystem_N64::copyRectToOverlay(const void *buf, int pitch, int x, int y, in uint16 *dst = _overlayBuffer + (y * _overlayWidth + x); - if (_overlayWidth == pitch && pitch == w) { - memcpy(dst, src, h * w * sizeof(uint16)); + if (_overlayWidth == w && pitch == _overlayWidth * sizeof(uint16)) { + memcpy(dst, src, h * pitch); } else { do { memcpy(dst, src, w * sizeof(uint16)); -- cgit v1.2.3 From 0a26f7084f8df9d0cb65a94a45942796ba5e4d56 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 20 Jun 2012 17:31:10 +0200 Subject: ANDROID: Fix compilation broken with changes to grabOverlay. --- backends/platform/android/gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index 44046cb1c1..cd0fd88484 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -642,7 +642,7 @@ void OSystem_Android::grabOverlay(void *buf, int pitch) { GLTHREADCHECK; const Graphics::Surface *surface = _overlay_texture->surface_const(); - assert(surface->format.bytesPerPixel == sizeof(buf[0])); + assert(surface->format.bytesPerPixel == sizeof(uint16)); byte *dst = (byte *)buf; const byte *src = (const byte *)surface->pixels; -- cgit v1.2.3 From e10e412bba99090b67a99cd7fddd5405172452f1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 21 May 2012 21:21:48 +0300 Subject: COMMON: Allow the savefile manager to create uncompressed saves These are useful in cases where the files can be used in the original interpreters (such as the exported characters from QFG), in order to avoid confusion in cases where the users are unaware that these saves are compressed and are trying to load them in the original interpreters. --- backends/platform/ds/arm9/source/gbampsave.cpp | 2 +- backends/platform/ds/arm9/source/gbampsave.h | 2 +- backends/platform/ps2/savefilemgr.cpp | 4 ++-- backends/platform/ps2/savefilemgr.h | 2 +- backends/saves/default/default-saves.cpp | 4 ++-- backends/saves/default/default-saves.h | 2 +- common/savefile.h | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backends/platform/ds/arm9/source/gbampsave.cpp b/backends/platform/ds/arm9/source/gbampsave.cpp index 03729c5e6e..3192e2d277 100644 --- a/backends/platform/ds/arm9/source/gbampsave.cpp +++ b/backends/platform/ds/arm9/source/gbampsave.cpp @@ -45,7 +45,7 @@ static Common::String getSavePath() { // GBAMP Save File Manager ////////////////////////// -Common::OutSaveFile *GBAMPSaveFileManager::openForSaving(const Common::String &filename) { +Common::OutSaveFile *GBAMPSaveFileManager::openForSaving(const Common::String &filename, bool compress) { Common::String fileSpec = getSavePath(); if (fileSpec.lastChar() != '/') fileSpec += '/'; diff --git a/backends/platform/ds/arm9/source/gbampsave.h b/backends/platform/ds/arm9/source/gbampsave.h index 492054dc52..0d9d9aca8c 100644 --- a/backends/platform/ds/arm9/source/gbampsave.h +++ b/backends/platform/ds/arm9/source/gbampsave.h @@ -27,7 +27,7 @@ class GBAMPSaveFileManager : public Common::SaveFileManager { public: - virtual Common::OutSaveFile *openForSaving(const Common::String &filename); + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true); virtual Common::InSaveFile *openForLoading(const Common::String &filename); virtual bool removeSavefile(const Common::String &filename); diff --git a/backends/platform/ps2/savefilemgr.cpp b/backends/platform/ps2/savefilemgr.cpp index 421edc3e2e..46af42e193 100644 --- a/backends/platform/ps2/savefilemgr.cpp +++ b/backends/platform/ps2/savefilemgr.cpp @@ -145,7 +145,7 @@ Common::InSaveFile *Ps2SaveFileManager::openForLoading(const Common::String &fil return Common::wrapCompressedReadStream(sf); } -Common::OutSaveFile *Ps2SaveFileManager::openForSaving(const Common::String &filename) { +Common::OutSaveFile *Ps2SaveFileManager::openForSaving(const Common::String &filename, bool compress) { Common::FSNode savePath(ConfMan.get("savepath")); // TODO: is this fast? Common::WriteStream *sf; @@ -193,7 +193,7 @@ Common::OutSaveFile *Ps2SaveFileManager::openForSaving(const Common::String &fil } _screen->wantAnim(false); - return Common::wrapCompressedWriteStream(sf); + return compress ? Common::wrapCompressedWriteStream(sf) : sf; } bool Ps2SaveFileManager::removeSavefile(const Common::String &filename) { diff --git a/backends/platform/ps2/savefilemgr.h b/backends/platform/ps2/savefilemgr.h index a25fb063ae..163706eace 100644 --- a/backends/platform/ps2/savefilemgr.h +++ b/backends/platform/ps2/savefilemgr.h @@ -35,7 +35,7 @@ public: virtual ~Ps2SaveFileManager(); virtual Common::InSaveFile *openForLoading(const Common::String &filename); - virtual Common::OutSaveFile *openForSaving(const Common::String &filename); + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true); virtual Common::StringArray listSavefiles(const Common::String &pattern); virtual bool removeSavefile(const Common::String &filename); diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp index 237c50a1ba..64e7e778b6 100644 --- a/backends/saves/default/default-saves.cpp +++ b/backends/saves/default/default-saves.cpp @@ -97,7 +97,7 @@ Common::InSaveFile *DefaultSaveFileManager::openForLoading(const Common::String return Common::wrapCompressedReadStream(sf); } -Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const Common::String &filename) { +Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const Common::String &filename, bool compress) { // Ensure that the savepath is valid. If not, generate an appropriate error. Common::String savePathName = getSavePath(); checkPath(Common::FSNode(savePathName)); @@ -112,7 +112,7 @@ Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const Common::String // Open the file for saving Common::WriteStream *sf = file.createWriteStream(); - return Common::wrapCompressedWriteStream(sf); + return compress ? Common::wrapCompressedWriteStream(sf) : sf; } bool DefaultSaveFileManager::removeSavefile(const Common::String &filename) { diff --git a/backends/saves/default/default-saves.h b/backends/saves/default/default-saves.h index 1ea87efc67..c7fca279bc 100644 --- a/backends/saves/default/default-saves.h +++ b/backends/saves/default/default-saves.h @@ -38,7 +38,7 @@ public: virtual Common::StringArray listSavefiles(const Common::String &pattern); virtual Common::InSaveFile *openForLoading(const Common::String &filename); - virtual Common::OutSaveFile *openForSaving(const Common::String &filename); + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true); virtual bool removeSavefile(const Common::String &filename); protected: diff --git a/common/savefile.h b/common/savefile.h index 03a7b52add..3aa0f423e3 100644 --- a/common/savefile.h +++ b/common/savefile.h @@ -108,7 +108,7 @@ public: * @param name the name of the savefile * @return pointer to an OutSaveFile, or NULL if an error occurred. */ - virtual OutSaveFile *openForSaving(const String &name) = 0; + virtual OutSaveFile *openForSaving(const String &name, bool compress = true) = 0; /** * Open the file with the specified name in the given directory for loading. -- cgit v1.2.3 From 4c4a127ca23ca55ec4f3348b40553ac5f72a3892 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 21 May 2012 23:17:28 +0300 Subject: COMMON: Add documentation regarding the new parameter in openForSaving() --- common/savefile.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/savefile.h b/common/savefile.h index 3aa0f423e3..2f4b8a2d5b 100644 --- a/common/savefile.h +++ b/common/savefile.h @@ -105,7 +105,8 @@ public: /** * Open the savefile with the specified name in the given directory for saving. - * @param name the name of the savefile + * @param name the name of the savefile + * @param compress toggles whether to compress the resulting save file (default) or not. * @return pointer to an OutSaveFile, or NULL if an error occurred. */ virtual OutSaveFile *openForSaving(const String &name, bool compress = true) = 0; -- cgit v1.2.3 From c9ace6426ebd4cac2777f199848dcfa5770b65ca Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 21 Jun 2012 10:35:27 +0300 Subject: COMMON: Add a detailed explanation on when to create uncompressed saves --- common/savefile.h | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/common/savefile.h b/common/savefile.h index 2f4b8a2d5b..abe0df2758 100644 --- a/common/savefile.h +++ b/common/savefile.h @@ -104,9 +104,32 @@ public: virtual String popErrorDesc(); /** - * Open the savefile with the specified name in the given directory for saving. + * Open the savefile with the specified name in the given directory for + * saving. + * + * Saved games are always compressed using ZIP compression on platforms + * where the zlib library is included (i.e. almost all platforms except the + * NDS). Engines are expected to always create compressed saved games. + * A notable exception is when the created saved games are compatible with + * the ones that the original interpreters create, and they are then used + * with later game versions in a game series which are not supported by + * ScummVM. An example is the characters exported in the Quest for Glory + * games: these saved states actually contain simple text strings with + * character attributes, which can then be used with later games in the + * Quest for Glory Series. Currently, ScummVM supports Quest for Glory + * 1, 2 and 3. These exported heroes can also be read by the AGS VGA fan + * made version of Quest for Glory 2 and the SCI32 game Quest for Glory IV, + * none of which is supported by ScummVM yet. Moreover, these heroes can + * also be imported into Quest for Glory V, which is a 3D game and thus + * outside of ScummVM's scope. For these reasons, in such cases engines can + * create uncompressed saved games to help users import them in other games + * not supported by ScummVM. Users only need to know that such saved games + * exported by ScummVM are compatible with later unsupported games, without + * needing to explain how to uncompress them. + * * @param name the name of the savefile - * @param compress toggles whether to compress the resulting save file (default) or not. + * @param compress toggles whether to compress the resulting save file + * (default) or not. * @return pointer to an OutSaveFile, or NULL if an error occurred. */ virtual OutSaveFile *openForSaving(const String &name, bool compress = true) = 0; -- cgit v1.2.3 From eb8230988a413ffff3458f0cfade5a94c95940b1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 21 Jun 2012 12:15:25 +0300 Subject: SCI: Don't compress exported heroes in the Quest for Glory games This allows them to be used by other games in the series not supported by ScummVM (i.e. QFG4, QFG5 and the fanmade AGS version of QFG2) --- engines/sci/engine/file.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp index 0d575f97dd..a0f7ebf4a2 100644 --- a/engines/sci/engine/file.cpp +++ b/engines/sci/engine/file.cpp @@ -57,11 +57,24 @@ namespace Sci { reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool unwrapFilename) { Common::String englishName = g_sci->getSciLanguageString(filename, K_LANG_ENGLISH); + englishName.toLowercase(); + Common::String wrappedName = unwrapFilename ? g_sci->wrapFilename(englishName) : englishName; Common::SeekableReadStream *inFile = 0; Common::WriteStream *outFile = 0; Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager(); + bool isCompressed = true; + const SciGameId gameId = g_sci->getGameId(); + if ((gameId == GID_QFG1 || gameId == GID_QFG1VGA || gameId == GID_QFG2 || gameId == GID_QFG3) + && englishName.hasSuffix(".sav")) { + // QFG Characters are saved via the CharSave object. + // We leave them uncompressed so that they can be imported in later QFG + // games. + // Rooms/Scripts: QFG1: 601, QFG2: 840, QFG3/4: 52 + isCompressed = false; + } + if (mode == _K_FILE_MODE_OPEN_OR_FAIL) { // Try to open file, abort if not possible inFile = saveFileMan->openForLoading(wrappedName); @@ -74,12 +87,12 @@ reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool u debugC(kDebugLevelFile, " -> file_open(_K_FILE_MODE_OPEN_OR_FAIL): failed to open file '%s'", englishName.c_str()); } else if (mode == _K_FILE_MODE_CREATE) { // Create the file, destroying any content it might have had - outFile = saveFileMan->openForSaving(wrappedName); + outFile = saveFileMan->openForSaving(wrappedName, isCompressed); if (!outFile) debugC(kDebugLevelFile, " -> file_open(_K_FILE_MODE_CREATE): failed to create file '%s'", englishName.c_str()); } else if (mode == _K_FILE_MODE_OPEN_OR_CREATE) { // Try to open file, create it if it doesn't exist - outFile = saveFileMan->openForSaving(wrappedName); + outFile = saveFileMan->openForSaving(wrappedName, isCompressed); if (!outFile) debugC(kDebugLevelFile, " -> file_open(_K_FILE_MODE_CREATE): failed to create file '%s'", englishName.c_str()); -- cgit v1.2.3 From 105fb47c89e727e9dccd2798afcab7ce290d43fa Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 21 Jun 2012 12:24:36 +0300 Subject: SCI: Add the graphics undithering game option back for QFG2 --- engines/sci/detection_tables.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 6e66c48ff1..9872973e09 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -2925,7 +2925,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.006", 0, "ccf5dba33e5cab6d5872838c0f8db44c", 500039}, {"resource.007", 0, "4c9fc1587545879295cb9627f56a2cb8", 575056}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, // Quest for Glory 2 - English (supplied by ssburnout in bug report #3049193) // 1.000 5x5.25" (label: INT#10.31.90) @@ -2937,7 +2937,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.003", 0, "0790f67d87642132be515cab05026baa", 972144}, {"resource.004", 0, "2ac1e6fea9aa1f5b91a06693a67b9766", 982830}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, // Quest for Glory 2 - English (supplied by ssburnout in bug report #3049193) // 1.000 9x3.5" (label: INT#10.31.90) @@ -2952,7 +2952,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.006", 0, "5e9deacbdb17198ad844988e04833520", 498593}, {"resource.007", 0, "2ac1e6fea9aa1f5b91a06693a67b9766", 490151}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, // Quest for Glory 2 - English (from FRG) // Executable scanning reports "1.000.072" @@ -2964,7 +2964,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.003", 0, "b192607c42f6960ecdf2ad2e4f90e9bc", 972804}, {"resource.004", 0, "cd2de58e27665d5853530de93fae7cd6", 983617}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, // Quest for Glory 2 - English DOS // Executable scanning reports "1.000.072" @@ -2979,7 +2979,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.006", 0, "b1944bd664ddbd2859cdaa0c4a0d6281", 507489}, {"resource.007", 0, "cd2de58e27665d5853530de93fae7cd6", 490794}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, // Quest for Glory 2 - English DOS Non-Interactive Demo // Executable scanning reports "1.000.046" @@ -2987,7 +2987,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.map", 0, "e75eb86bdd517b3ef709058249986a87", 906}, {"resource.001", 0, "9b098f9e1008abe30e56c93b896494e6", 362123}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, // Quest for Glory 3 - English DOS Non-Interactive Demo (from FRG) // Executable scanning reports "1.001.021", VERSION file reports "1.000, 0.001.059, 6.12.92" -- cgit v1.2.3 From 76f3f1b13621b43781c4a2c505e646d9d52fdab7 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 21 Jun 2012 22:24:22 +0300 Subject: SCI: Fix warnings --- engines/sci/console.cpp | 11 +++-------- engines/sci/engine/kstring.cpp | 10 +++++----- engines/sci/engine/scriptdebug.cpp | 6 +++--- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 91795117e3..b0ed7e6225 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -2630,11 +2630,11 @@ bool Console::cmdViewReference(int argc, const char **argv) { #endif default: { const SegmentRef block = _engine->_gamestate->_segMan->dereference(reg); - uint32 size = block.maxSize; + uint16 size = block.maxSize; DebugPrintf("raw data\n"); - if (reg_end.getSegment() != 0 && size < reg_end.getOffset() - reg.getOffset()) { + if (reg_end.getSegment() != 0 && (size < reg_end.getOffset() - reg.getOffset())) { DebugPrintf("Block end out of bounds (size %d). Resetting.\n", size); reg_end = NULL_REG; } @@ -2936,7 +2936,7 @@ bool Console::cmdDisassembleAddress(int argc, const char **argv) { uint opCount = 1; bool printBWTag = false; bool printBytes = false; - uint32 size; + uint16 size; if (parse_reg_t(_engine->_gamestate, argv[1], &vpc, false)) { DebugPrintf("Invalid address passed.\n"); @@ -2960,11 +2960,6 @@ bool Console::cmdDisassembleAddress(int argc, const char **argv) { } } - if (opCount < 0) { - DebugPrintf("Invalid op_count\n"); - return true; - } - do { vpc = disassemble(_engine->_gamestate, vpc, printBWTag, printBytes); } while ((vpc.getOffset() > 0) && (vpc.getOffset() + 6 < size) && (--opCount)); diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 8d627efacf..9eebf2c88a 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -96,7 +96,7 @@ reg_t kStrAt(EngineState *s, int argc, reg_t *argv) { byte value; byte newvalue = 0; - unsigned int offset = argv[1].toUint16(); + uint16 offset = argv[1].toUint16(); if (argc > 2) newvalue = argv[2].toSint16(); @@ -125,19 +125,19 @@ reg_t kStrAt(EngineState *s, int argc, reg_t *argv) { if (!oddOffset) { value = tmp.getOffset() & 0x00ff; if (argc > 2) { /* Request to modify this char */ - uint16 offset = tmp.toUint16(); + uint16 tmpOffset = tmp.toUint16(); offset &= 0xff00; offset |= newvalue; - tmp.setOffset(offset); + tmp.setOffset(tmpOffset); tmp.setSegment(0); } } else { value = tmp.getOffset() >> 8; if (argc > 2) { /* Request to modify this char */ - uint16 offset = tmp.toUint16(); + uint16 tmpOffset = tmp.toUint16(); offset &= 0x00ff; offset |= newvalue << 8; - tmp.setOffset(offset); + tmp.setOffset(tmpOffset); tmp.setSegment(0); } } diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index f55884b1c0..d8c05ab04b 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -344,11 +344,11 @@ void SciEngine::scriptDebug() { if (mobj) { Script *scr = (Script *)mobj; const byte *code_buf = scr->getBuf(); - uint32 code_buf_size = scr->getBufSize(); + uint16 code_buf_size = scr->getBufSize(); // TODO: change to a 32-bit integer for large SCI3 scripts int opcode = pc.getOffset() >= code_buf_size ? 0 : code_buf[pc.getOffset()]; int op = opcode >> 1; - int paramb1 = pc.getOffset() + 1 >= code_buf_size ? 0 : code_buf[pc.getOffset() + 1]; - int paramf1 = (opcode & 1) ? paramb1 : (pc.getOffset() + 2 >= code_buf_size ? 0 : (int16)READ_SCI11ENDIAN_UINT16(code_buf + pc.getOffset() + 1)); + uint16 paramb1 = pc.getOffset() + 1 >= code_buf_size ? 0 : code_buf[pc.getOffset() + 1]; + uint16 paramf1 = (opcode & 1) ? paramb1 : (pc.getOffset() + 2 >= code_buf_size ? 0 : (int16)READ_SCI11ENDIAN_UINT16(code_buf + pc.getOffset() + 1)); switch (_debugState.seeking) { case kDebugSeekSpecialCallk: -- cgit v1.2.3 From 99b1c736396799260cd715b40a074cf32d104485 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 21 Jun 2012 22:57:00 +0300 Subject: SCI: Fix silly typo Thanks to digitall for spotting this --- engines/sci/engine/kstring.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 9eebf2c88a..c22d7c7b1e 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -126,8 +126,8 @@ reg_t kStrAt(EngineState *s, int argc, reg_t *argv) { value = tmp.getOffset() & 0x00ff; if (argc > 2) { /* Request to modify this char */ uint16 tmpOffset = tmp.toUint16(); - offset &= 0xff00; - offset |= newvalue; + tmpOffset &= 0xff00; + tmpOffset |= newvalue; tmp.setOffset(tmpOffset); tmp.setSegment(0); } @@ -135,8 +135,8 @@ reg_t kStrAt(EngineState *s, int argc, reg_t *argv) { value = tmp.getOffset() >> 8; if (argc > 2) { /* Request to modify this char */ uint16 tmpOffset = tmp.toUint16(); - offset &= 0x00ff; - offset |= newvalue << 8; + tmpOffset &= 0x00ff; + tmpOffset |= newvalue << 8; tmp.setOffset(tmpOffset); tmp.setSegment(0); } -- cgit v1.2.3 From 08124396035e8fd0996c9d347be3d606a58ecd1f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 22 Jun 2012 09:31:51 +0300 Subject: SCI: Simplify the SCI32 coordinate adjustment code --- engines/sci/graphics/frameout.cpp | 57 +++++++++++---------------------------- engines/sci/graphics/frameout.h | 6 ----- 2 files changed, 16 insertions(+), 47 deletions(-) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 7a9c7ba281..0681102863 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -62,8 +62,6 @@ GfxFrameout::GfxFrameout(SegManager *segMan, ResourceManager *resMan, GfxCoordAd : _segMan(segMan), _resMan(resMan), _cache(cache), _screen(screen), _palette(palette), _paint32(paint32) { _coordAdjuster = (GfxCoordAdjuster32 *)coordAdjuster; - _scriptsRunningWidth = 320; - _scriptsRunningHeight = 200; _curScrollText = -1; _showScrollText = false; _maxScrollTexts = 0; @@ -129,12 +127,12 @@ void GfxFrameout::kernelAddPlane(reg_t object) { uint16 tmpRunningHeight = readSelectorValue(_segMan, object, SELECTOR(resY)); // The above can be 0 in SCI3 (e.g. Phantasmagoria 2) - if (tmpRunningWidth > 0 && tmpRunningHeight > 0) { - _scriptsRunningWidth = tmpRunningWidth; - _scriptsRunningHeight = tmpRunningHeight; + if (tmpRunningWidth == 0 && tmpRunningHeight == 0) { + tmpRunningWidth = 320; + tmpRunningHeight = 200; } - _coordAdjuster->setScriptsResolution(_scriptsRunningWidth, _scriptsRunningHeight); + _coordAdjuster->setScriptsResolution(tmpRunningWidth, tmpRunningHeight); } newPlane.object = object; @@ -172,11 +170,8 @@ void GfxFrameout::kernelUpdatePlane(reg_t object) { it->planeRect.bottom = readSelectorValue(_segMan, object, SELECTOR(bottom)); it->planeRect.right = readSelectorValue(_segMan, object, SELECTOR(right)); - Common::Rect screenRect(_screen->getWidth(), _screen->getHeight()); - it->planeRect.top = (it->planeRect.top * screenRect.height()) / _scriptsRunningHeight; - it->planeRect.left = (it->planeRect.left * screenRect.width()) / _scriptsRunningWidth; - it->planeRect.bottom = (it->planeRect.bottom * screenRect.height()) / _scriptsRunningHeight; - it->planeRect.right = (it->planeRect.right * screenRect.width()) / _scriptsRunningWidth; + _coordAdjuster->fromScriptToDisplay(it->planeRect.top, it->planeRect.left); + _coordAdjuster->fromScriptToDisplay(it->planeRect.bottom, it->planeRect.right); // We get negative left in kq7 in scrolling rooms if (it->planeRect.left < 0) { @@ -241,11 +236,9 @@ void GfxFrameout::kernelDeletePlane(reg_t object) { planeRect.bottom = readSelectorValue(_segMan, object, SELECTOR(bottom)); planeRect.right = readSelectorValue(_segMan, object, SELECTOR(right)); - Common::Rect screenRect(_screen->getWidth(), _screen->getHeight()); - planeRect.top = (planeRect.top * screenRect.height()) / _scriptsRunningHeight; - planeRect.left = (planeRect.left * screenRect.width()) / _scriptsRunningWidth; - planeRect.bottom = (planeRect.bottom * screenRect.height()) / _scriptsRunningHeight; - planeRect.right = (planeRect.right * screenRect.width()) / _scriptsRunningWidth; + _coordAdjuster->fromScriptToDisplay(planeRect.top, planeRect.left); + _coordAdjuster->fromScriptToDisplay(planeRect.bottom, planeRect.right); + // Blackout removed plane rect _paint32->fillRect(planeRect, 0); return; @@ -466,23 +459,6 @@ void GfxFrameout::sortPlanes() { Common::sort(_planes.begin(), _planes.end(), planeSortHelper); } -int16 GfxFrameout::upscaleHorizontalCoordinate(int16 coordinate) { - return ((coordinate * _screen->getWidth()) / _scriptsRunningWidth); -} - -int16 GfxFrameout::upscaleVerticalCoordinate(int16 coordinate) { - return ((coordinate * _screen->getHeight()) / _scriptsRunningHeight); -} - -Common::Rect GfxFrameout::upscaleRect(Common::Rect &rect) { - rect.top = (rect.top * _scriptsRunningHeight) / _screen->getHeight(); - rect.left = (rect.left * _scriptsRunningWidth) / _screen->getWidth(); - rect.bottom = (rect.bottom * _scriptsRunningHeight) / _screen->getHeight(); - rect.right = (rect.right * _scriptsRunningWidth) / _screen->getWidth(); - - return rect; -} - void GfxFrameout::showVideo() { bool skipVideo = false; RobotDecoder *videoDecoder = g_sci->_robotDecoder; @@ -665,10 +641,8 @@ void GfxFrameout::kernelFrameout() { if (itemEntry->object.isNull()) { // Picture cel data - itemEntry->x = upscaleHorizontalCoordinate(itemEntry->x); - itemEntry->y = upscaleVerticalCoordinate(itemEntry->y); - itemEntry->picStartX = upscaleHorizontalCoordinate(itemEntry->picStartX); - itemEntry->picStartY = upscaleVerticalCoordinate(itemEntry->picStartY); + _coordAdjuster->fromScriptToDisplay(itemEntry->y, itemEntry->x); + _coordAdjuster->fromScriptToDisplay(itemEntry->picStartY, itemEntry->picStartX); if (!isPictureOutOfView(itemEntry, it->planeRect, it->planeOffsetX, it->planeOffsetY)) drawPicture(itemEntry, it->planeOffsetX, it->planeOffsetY, it->planePictureMirrored); @@ -680,9 +654,9 @@ void GfxFrameout::kernelFrameout() { view->adjustToUpscaledCoordinates(itemEntry->y, itemEntry->x); view->adjustToUpscaledCoordinates(itemEntry->z, dummyX); } else if (getSciVersion() == SCI_VERSION_2_1) { - itemEntry->x = upscaleHorizontalCoordinate(itemEntry->x); - itemEntry->y = upscaleVerticalCoordinate(itemEntry->y); - itemEntry->z = upscaleVerticalCoordinate(itemEntry->z); + _coordAdjuster->fromScriptToDisplay(itemEntry->y, itemEntry->x); + int16 tmpVal = 0; + _coordAdjuster->fromScriptToDisplay(itemEntry->z, tmpVal); } // Adjust according to current scroll position @@ -719,7 +693,8 @@ void GfxFrameout::kernelFrameout() { view->adjustBackUpscaledCoordinates(nsRect.top, nsRect.left); view->adjustBackUpscaledCoordinates(nsRect.bottom, nsRect.right); } else if (getSciVersion() == SCI_VERSION_2_1) { - nsRect = upscaleRect(nsRect); + _coordAdjuster->fromDisplayToScript(nsRect.top, nsRect.left); + _coordAdjuster->fromDisplayToScript(nsRect.bottom, nsRect.right); } if (g_sci->getGameId() == GID_PHANTASMAGORIA2) { diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index 0d80a68f1d..ecaf450d89 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -148,9 +148,6 @@ private: void createPlaneItemList(reg_t planeObject, FrameoutList &itemList); bool isPictureOutOfView(FrameoutEntry *itemEntry, Common::Rect planeRect, int16 planeOffsetX, int16 planeOffsetY); void drawPicture(FrameoutEntry *itemEntry, int16 planeOffsetX, int16 planeOffsetY, bool planePictureMirrored); - int16 upscaleHorizontalCoordinate(int16 coordinate); - int16 upscaleVerticalCoordinate(int16 coordinate); - Common::Rect upscaleRect(Common::Rect &rect); SegManager *_segMan; ResourceManager *_resMan; @@ -169,9 +166,6 @@ private: uint16 _maxScrollTexts; void sortPlanes(); - - uint16 _scriptsRunningWidth; - uint16 _scriptsRunningHeight; }; } // End of namespace Sci -- cgit v1.2.3 From 547fdfe12a3b999473304925bf80ae1afda5f8d6 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 22 Jun 2012 09:43:44 +0300 Subject: SCI: Further cleanup of the frame drawing code --- engines/sci/graphics/frameout.cpp | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 0681102863..265a175e66 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -648,15 +648,14 @@ void GfxFrameout::kernelFrameout() { drawPicture(itemEntry, it->planeOffsetX, it->planeOffsetY, it->planePictureMirrored); } else { GfxView *view = (itemEntry->viewId != 0xFFFF) ? _cache->getView(itemEntry->viewId) : NULL; - + int16 dummyX = 0; + if (view && view->isSci2Hires()) { - int16 dummyX = 0; view->adjustToUpscaledCoordinates(itemEntry->y, itemEntry->x); view->adjustToUpscaledCoordinates(itemEntry->z, dummyX); } else if (getSciVersion() == SCI_VERSION_2_1) { _coordAdjuster->fromScriptToDisplay(itemEntry->y, itemEntry->x); - int16 tmpVal = 0; - _coordAdjuster->fromScriptToDisplay(itemEntry->z, tmpVal); + _coordAdjuster->fromScriptToDisplay(itemEntry->z, dummyX); } // Adjust according to current scroll position @@ -707,17 +706,9 @@ void GfxFrameout::kernelFrameout() { g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect); } - int16 screenHeight = _screen->getHeight(); - int16 screenWidth = _screen->getWidth(); - if (view && view->isSci2Hires()) { - screenHeight = _screen->getDisplayHeight(); - screenWidth = _screen->getDisplayWidth(); - } - - if (itemEntry->celRect.bottom < 0 || itemEntry->celRect.top >= screenHeight) - continue; - - if (itemEntry->celRect.right < 0 || itemEntry->celRect.left >= screenWidth) + // FIXME: When does this happen, and why? + if (itemEntry->celRect.bottom < 0 || itemEntry->celRect.top >= _screen->getDisplayHeight() || + itemEntry->celRect.right < 0 || itemEntry->celRect.left >= _screen->getDisplayWidth()) continue; Common::Rect clipRect, translatedClipRect; -- cgit v1.2.3 From 6fb8009db42ab7d26ab812433be5fa63e3858f4e Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Fri, 22 Jun 2012 13:11:57 +0200 Subject: Disable Alsa Midi in Dingux/OpenDingux port Disabling (useless) Alsa Midi solves a compilation problem on the OpenDingux port --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 5905f408a0..9fe5587e32 100755 --- a/configure +++ b/configure @@ -2237,6 +2237,8 @@ if test -n "$_host"; then CXXFLAGS="$CXXFLAGS -mips32" _backend="dingux" _mt32emu=no + # Disable alsa midi to get the port build on OpenDingux toolchain + _alsa=no _vkeybd=yes _build_hq_scalers=no _keymapper=no -- cgit v1.2.3 From b51eed9031d81175298f43221e1e17576d6545b3 Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Fri, 22 Jun 2012 13:23:29 +0200 Subject: DINGUX: Add png icon in the dingux dist package --- backends/platform/dingux/dingux.mk | 1 + backends/platform/dingux/scummvm.png | Bin 0 -> 2656 bytes 2 files changed, 1 insertion(+) create mode 100644 backends/platform/dingux/scummvm.png diff --git a/backends/platform/dingux/dingux.mk b/backends/platform/dingux/dingux.mk index 882078fe46..e0aca42856 100644 --- a/backends/platform/dingux/dingux.mk +++ b/backends/platform/dingux/dingux.mk @@ -28,3 +28,4 @@ endif $(CP) $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(bundle_name)/ $(CP) $(srcdir)/backends/platform/dingux/scummvm.gpe $(bundle_name)/ $(CP) $(srcdir)/backends/platform/dingux/README.DINGUX $(bundle_name)/ + $(CP) $(srcdir)/backends/platform/dingux/scummvm.png $(bundle_name)/ diff --git a/backends/platform/dingux/scummvm.png b/backends/platform/dingux/scummvm.png new file mode 100644 index 0000000000..128e59efc4 Binary files /dev/null and b/backends/platform/dingux/scummvm.png differ -- cgit v1.2.3 From fd97e5ece3c04e6f049ece8f04d9d49aea3e7841 Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Fri, 22 Jun 2012 13:51:50 +0200 Subject: DINGUX: Update the README file for Dingux Added build instructions and a note on the obsolescence of fixes for the old Dingux toolchain --- backends/platform/dingux/README.DINGUX | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/backends/platform/dingux/README.DINGUX b/backends/platform/dingux/README.DINGUX index 04f0d30844..9e65d4c36d 100644 --- a/backends/platform/dingux/README.DINGUX +++ b/backends/platform/dingux/README.DINGUX @@ -29,10 +29,27 @@ file included into the scummvm directory you copied to the SD card, and then lau Building from binaries ============================== -* ToDO * +It's pretty simple if you are running Linux on an x86/amd64 machine: +1. Download and install the OpenDingux toolchain (http://www.treewalker.org/opendingux/) +2. Download ScummVM sources and uncompress them +3. Create a build directory and run configure specifying the correct library path. Eg. + mkdir build_dingux + LDFLAGS="-L/path-to-toolchain/usr/lib" ../path-to-scummvm-sources/configure --host=dingux --enable-plugins --default-dynamic + make +4. Prepare the distribution directory + make dingux-dist +5. Copy the distribution directory located in dingux-dist/scummvm to your SD card +6. Enjoy Kernel and rootfs WARNINGS ============================== + +*** A WARNING about the WARNING! *** +The info below should no longer be valid relating to the new OpenDingux (http://www.treewalker.org/opendingux/) +toolchain. When using OpenDingux you don't need custom kernels or libraries, +after some checking I will remove the following warnings and keep OpenDingux +as the only supported toolchain. + All the dingux root images (rootfs) i found floating on the net have broken tremor libraries, which make scummvm crash in a bad way. One solution is to replace the libraries in your rootfs by injecting these fixed ones: -- cgit v1.2.3 From ed3d9d26dc4ec3e136fb52fd22db50f93bb02357 Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Fri, 22 Jun 2012 14:08:33 +0200 Subject: CONFIGURE: Set dingux optimization level to -O3 --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 9fe5587e32..ffcd0c1d6c 100755 --- a/configure +++ b/configure @@ -2237,6 +2237,7 @@ if test -n "$_host"; then CXXFLAGS="$CXXFLAGS -mips32" _backend="dingux" _mt32emu=no + _optimization_level=-O3 # Disable alsa midi to get the port build on OpenDingux toolchain _alsa=no _vkeybd=yes -- cgit v1.2.3 From b1e50b4e304b267afda1c48a4edb77b21058ed45 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 21 Jun 2012 22:59:33 +0200 Subject: GOB: _renderFlags & 0x80 means "Do we have windows?" --- engines/gob/draw.h | 2 +- engines/gob/draw_fascin.cpp | 4 ++-- engines/gob/hotspots.cpp | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/engines/gob/draw.h b/engines/gob/draw.h index 1359df632f..0c7f768341 100644 --- a/engines/gob/draw.h +++ b/engines/gob/draw.h @@ -32,7 +32,7 @@ namespace Gob { #define RENDERFLAG_COLLISIONS 0x0004 #define RENDERFLAG_CAPTUREPOP 0x0008 #define RENDERFLAG_USEDELTAS 0x0010 -#define RENDERFLAG_UNKNOWN 0x0080 +#define RENDERFLAG_HASWINDOWS 0x0080 #define RENDERFLAG_NOBLITINVALIDATED 0x0200 #define RENDERFLAG_NOSUBTITLES 0x0400 #define RENDERFLAG_FROMSPLIT 0x0800 diff --git a/engines/gob/draw_fascin.cpp b/engines/gob/draw_fascin.cpp index 69e04f74c9..54cd52b660 100644 --- a/engines/gob/draw_fascin.cpp +++ b/engines/gob/draw_fascin.cpp @@ -747,7 +747,7 @@ int16 Draw_Fascination::openWin(int16 id) { int16 Draw_Fascination::getWinFromCoord(int16 &dx, int16 &dy) { int16 bestMatch = -1; - if ((_renderFlags & 128) == 0) + if (!(_renderFlags & RENDERFLAG_HASWINDOWS)) return -1; for (int i = 0; i < 10; i++) { @@ -790,7 +790,7 @@ int16 Draw_Fascination::handleCurWin() { int8 matchNum = 0; int16 bestMatch = -1; - if ((_vm->_game->_mouseButtons != 1) || ((_renderFlags & 128) == 0)) + if ((_vm->_game->_mouseButtons != 1) || !(_renderFlags & RENDERFLAG_HASWINDOWS)) return 0; for (int i = 0; i < 10; i++) { diff --git a/engines/gob/hotspots.cpp b/engines/gob/hotspots.cpp index 9a89f11923..c0f256c7d4 100644 --- a/engines/gob/hotspots.cpp +++ b/engines/gob/hotspots.cpp @@ -533,8 +533,9 @@ void Hotspots::leave(uint16 index) { } int16 Hotspots::curWindow(int16 &dx, int16 &dy) const { - if ((_vm->_draw->_renderFlags & 0x80)==0) - return(0); + if (!(_vm->_draw->_renderFlags & RENDERFLAG_HASWINDOWS)) + return 0; + for (int i = 0; i < 10; i++) { if (_vm->_draw->_fascinWin[i].id != -1) { if (_vm->_global->_inter_mouseX >= _vm->_draw->_fascinWin[i].left && -- cgit v1.2.3 From 62cf66395736e1cc368b31588472fe9d74221c87 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 21 Jun 2012 23:59:59 +0200 Subject: GOB: Add Surface::drawRect() --- engines/gob/surface.cpp | 28 ++++++++++++++++++++++++++++ engines/gob/surface.h | 1 + 2 files changed, 29 insertions(+) diff --git a/engines/gob/surface.cpp b/engines/gob/surface.cpp index 3af19f891d..3eaf741be2 100644 --- a/engines/gob/surface.cpp +++ b/engines/gob/surface.cpp @@ -695,6 +695,34 @@ void Surface::drawLine(uint16 x0, uint16 y0, uint16 x1, uint16 y1, uint32 color) Graphics::drawLine(x0, y0, x1, y1, color, &plotPixel, this); } +void Surface::drawRect(uint16 left, uint16 top, uint16 right, uint16 bottom, uint32 color) { + // Just in case those are swapped + if (left > right) + SWAP(left, right); + if (top > bottom) + SWAP(top, bottom); + + if ((left >= _width) || (top >= _height)) + // Nothing to do + return; + + // Area to actually draw + const uint16 width = CLIP(right - left + 1, 0, _width - left); + const uint16 height = CLIP(bottom - top + 1, 0, _height - top); + + if ((width == 0) || (height == 0)) + // Nothing to do + return; + + right = left + width - 1; + bottom = top + height - 1; + + drawLine(left , top , left , bottom, color); + drawLine(right, top , right, bottom, color); + drawLine(left , top , right, top , color); + drawLine(left , bottom, right, bottom, color); +} + /* * The original's version of the Bresenham Algorithm was a bit "unclean" * and produced strange edges at 45, 135, 225 and 315 degrees, so using the diff --git a/engines/gob/surface.h b/engines/gob/surface.h index 5376603801..09be8d1a49 100644 --- a/engines/gob/surface.h +++ b/engines/gob/surface.h @@ -158,6 +158,7 @@ public: void putPixel(uint16 x, uint16 y, uint32 color); void drawLine(uint16 x0, uint16 y0, uint16 x1, uint16 y1, uint32 color); + void drawRect(uint16 left, uint16 top, uint16 right, uint16 bottom, uint32 color); void drawCircle(uint16 x0, uint16 y0, uint16 radius, uint32 color, int16 pattern = 0); void blitToScreen(uint16 left, uint16 top, uint16 right, uint16 bottom, uint16 x, uint16 y) const; -- cgit v1.2.3 From 76723f4f0fe89650eb64f6fc4e6475d3242d642d Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 22 Jun 2012 00:04:06 +0200 Subject: GOB: Clean up the Fascination window hotspot code a bit --- engines/gob/hotspots.cpp | 174 ++++++++++++++++++++++++++--------------------- engines/gob/hotspots.h | 4 +- 2 files changed, 100 insertions(+), 78 deletions(-) diff --git a/engines/gob/hotspots.cpp b/engines/gob/hotspots.cpp index c0f256c7d4..140cf2901b 100644 --- a/engines/gob/hotspots.cpp +++ b/engines/gob/hotspots.cpp @@ -532,35 +532,46 @@ void Hotspots::leave(uint16 index) { call(spot.funcLeave); } -int16 Hotspots::curWindow(int16 &dx, int16 &dy) const { +int16 Hotspots::windowCursor(int16 &dx, int16 &dy) const { if (!(_vm->_draw->_renderFlags & RENDERFLAG_HASWINDOWS)) return 0; for (int i = 0; i < 10; i++) { - if (_vm->_draw->_fascinWin[i].id != -1) { - if (_vm->_global->_inter_mouseX >= _vm->_draw->_fascinWin[i].left && - _vm->_global->_inter_mouseX < _vm->_draw->_fascinWin[i].left + _vm->_draw->_fascinWin[i].width && - _vm->_global->_inter_mouseY >= _vm->_draw->_fascinWin[i].top && - _vm->_global->_inter_mouseY < _vm->_draw->_fascinWin[i].top + _vm->_draw->_fascinWin[i].height) { - if (_vm->_draw->_fascinWin[i].id == _vm->_draw->_winCount-1) { - dx = _vm->_draw->_fascinWin[i].left; - dy = _vm->_draw->_fascinWin[i].top; - if (_vm->_global->_inter_mouseX < _vm->_draw->_fascinWin[i].left + 12 && - _vm->_global->_inter_mouseY < _vm->_draw->_fascinWin[i].top + 12 && - (VAR((_vm->_draw->_winVarArrayStatus / 4) + i) & 2)) - // Cursor on 'Close Window' - return(5); - if (_vm->_global->_inter_mouseX >= _vm->_draw->_fascinWin[i].left + _vm->_draw->_fascinWin[i].width - 12 && - _vm->_global->_inter_mouseY < _vm->_draw->_fascinWin[i].top + 12 && - (VAR((_vm->_draw->_winVarArrayStatus / 4) + i) & 4)) - // Cursor on 'Move Window' - return(6); - return(-i); - } - } - } + if (_vm->_draw->_fascinWin[i].id == -1) + // No such windows + continue; + + const int left = _vm->_draw->_fascinWin[i].left; + const int top = _vm->_draw->_fascinWin[i].top; + const int right = _vm->_draw->_fascinWin[i].left + _vm->_draw->_fascinWin[i].width - 1; + const int bottom = _vm->_draw->_fascinWin[i].top + _vm->_draw->_fascinWin[i].height - 1; + + if ((_vm->_global->_inter_mouseX < left) || (_vm->_global->_inter_mouseX > right) || + (_vm->_global->_inter_mouseY < top ) || (_vm->_global->_inter_mouseY > bottom)) + // We're not inside that window + continue; + + if (_vm->_draw->_fascinWin[i].id != (_vm->_draw->_winCount - 1)) + // Only consider the top-most window + continue; + + dx = _vm->_draw->_fascinWin[i].left; + dy = _vm->_draw->_fascinWin[i].top; + + if ((_vm->_global->_inter_mouseX < (left + 12)) && (_vm->_global->_inter_mouseY < (top + 12)) && + (VAR((_vm->_draw->_winVarArrayStatus / 4) + i) & 2)) + // Cursor on 'Close Window' + return 5; + + if ((_vm->_global->_inter_mouseX > (right - 12)) & (_vm->_global->_inter_mouseY < (top + 12)) && + (VAR((_vm->_draw->_winVarArrayStatus / 4) + i) & 4)) + // Cursor on 'Move Window' + return 6; + + return -1; } - return(0); + + return 0; } uint16 Hotspots::checkMouse(Type type, uint16 &id, uint16 &index) const { @@ -1227,13 +1238,13 @@ void Hotspots::evaluateNew(uint16 i, uint16 *ids, InputDesc *inputs, ids[i] = 0; // Type and window - byte type = _vm->_game->_script->readByte(); + byte type = _vm->_game->_script->readByte(); byte windowNum = 0; if ((type & 0x40) != 0) { // Got a window ID - type -= 0x40; + type -= 0x40; windowNum = _vm->_game->_script->readByte(); } @@ -1255,31 +1266,31 @@ void Hotspots::evaluateNew(uint16 i, uint16 *ids, InputDesc *inputs, width = _vm->_game->_script->readUint16(); height = _vm->_game->_script->readUint16(); } + type &= 0x7F; + + // Draw a border around the hotspot if (_vm->_draw->_renderFlags & 64) { - _vm->_draw->_invalidatedTops[0] = 0; - _vm->_draw->_invalidatedLefts[0] = 0; - _vm->_draw->_invalidatedRights[0] = 319; - _vm->_draw->_invalidatedBottoms[0] = 199; - _vm->_draw->_invalidatedCount = 1; + Surface &surface = *_vm->_draw->_spritesArray[_vm->_draw->_destSurface]; + + _vm->_video->dirtyRectsAll(); + if (windowNum == 0) { - _vm->_draw->_spritesArray[_vm->_draw->_destSurface]->drawLine(left + width - 1, top, left + width - 1, top + height - 1, 0); - _vm->_draw->_spritesArray[_vm->_draw->_destSurface]->drawLine(left, top, left, top + height - 1, 0); - _vm->_draw->_spritesArray[_vm->_draw->_destSurface]->drawLine(left, top, left + width - 1, top, 0); - _vm->_draw->_spritesArray[_vm->_draw->_destSurface]->drawLine(left, top + height - 1, left + width - 1, top + height - 1, 0); + // The hotspot is not inside a window, just draw border it + surface.drawRect(left, top, left + width - 1, top + height - 1, 0); + } else { - if ((_vm->_draw->_fascinWin[windowNum].id != -1) && (_vm->_draw->_fascinWin[windowNum].id == _vm->_draw->_winCount - 1)) { - left += _vm->_draw->_fascinWin[windowNum].left; - top += _vm->_draw->_fascinWin[windowNum].top; - _vm->_draw->_spritesArray[_vm->_draw->_destSurface]->drawLine(left + width - 1, top, left + width - 1, top + height - 1, 0); - _vm->_draw->_spritesArray[_vm->_draw->_destSurface]->drawLine(left, top, left, top + height - 1, 0); - _vm->_draw->_spritesArray[_vm->_draw->_destSurface]->drawLine(left, top, left + width - 1, top, 0); - _vm->_draw->_spritesArray[_vm->_draw->_destSurface]->drawLine(left, top + height - 1, left + width - 1, top + height - 1, 0); - left -= _vm->_draw->_fascinWin[windowNum].left; - top -= _vm->_draw->_fascinWin[windowNum].top; + // The hotspot is inside a window, only draw it if it's the topmost window + + if ((_vm->_draw->_fascinWin[windowNum].id != -1) && + (_vm->_draw->_fascinWin[windowNum].id == (_vm->_draw->_winCount - 1))) { + + const uint16 wLeft = left + _vm->_draw->_fascinWin[windowNum].left; + const uint16 wTop = top + _vm->_draw->_fascinWin[windowNum].top; + + surface.drawRect(wLeft, wTop, wLeft + width - 1, wTop + height - 1, 0); } } } - type &= 0x7F; // Apply global drawing offset if ((_vm->_draw->_renderFlags & RENDERFLAG_CAPTUREPOP) && (left != 0xFFFF)) { @@ -1668,38 +1679,19 @@ int16 Hotspots::findCursor(uint16 x, uint16 y) const { int16 deltax = 0; int16 deltay = 0; - if (_vm->getGameType() == kGameTypeFascination) - cursor = curWindow(deltax, deltay); - - if (cursor == 0) { - for (int i = 0; (i < kHotspotCount) && !_hotspots[i].isEnd(); i++) { - const Hotspot &spot = _hotspots[i]; - - if ((spot.getWindow() != 0) || spot.isDisabled()) - // Ignore disabled and non-main-windowed hotspots - continue; + // Fascination uses hard-coded windows + if (_vm->getGameType() == kGameTypeFascination) { + cursor = windowCursor(deltax, deltay); - if (!spot.isIn(x, y)) - // We're not in that hotspot, ignore it - continue; + // We're in a window and in an area that forces a specific cursor + if (cursor > 0) + return cursor; - if (spot.getCursor() == 0) { - // Hotspot doesn't itself specify a cursor... - if (spot.getType() >= kTypeInput1NoLeave) { - // ...but the type has a generic one - cursor = 3; - break; - } else if ((spot.getButton() != kMouseButtonsRight) && (cursor == 0)) - // ...but there's a generic "click" cursor - cursor = 1; - } else if (cursor == 0) - // Hotspot had an attached cursor index - cursor = spot.getCursor(); - } - } else { + // We're somewhere else inside a window if (cursor < 0) { - int16 curType = - cursor * 256; + int16 curType = -cursor * 256; cursor = 0; + for (int i = 0; (i < kHotspotCount) && !_hotspots[i].isEnd(); i++) { const Hotspot &spot = _hotspots[i]; // this check is /really/ Fascination specific. @@ -1713,10 +1705,40 @@ int16 Hotspots::findCursor(uint16 x, uint16 y) const { break; } } + + if (_vm->_draw->_cursorAnimLow[cursor] == -1) + // If the cursor is invalid... there's a generic "click" cursor + cursor = 1; + + return cursor; } - if (_vm->_draw->_cursorAnimLow[cursor] == -1) - // If the cursor is invalid... there's a generic "click" cursor - cursor = 1; + + } + + // Normal, non-window cursor handling + for (int i = 0; (i < kHotspotCount) && !_hotspots[i].isEnd(); i++) { + const Hotspot &spot = _hotspots[i]; + + if ((spot.getWindow() != 0) || spot.isDisabled()) + // Ignore disabled and non-main-windowed hotspots + continue; + + if (!spot.isIn(x, y)) + // We're not in that hotspot, ignore it + continue; + + if (spot.getCursor() == 0) { + // Hotspot doesn't itself specify a cursor... + if (spot.getType() >= kTypeInput1NoLeave) { + // ...but the type has a generic one + cursor = 3; + break; + } else if ((spot.getButton() != kMouseButtonsRight) && (cursor == 0)) + // ...but there's a generic "click" cursor + cursor = 1; + } else if (cursor == 0) + // Hotspot had an attached cursor index + cursor = spot.getCursor(); } return cursor; diff --git a/engines/gob/hotspots.h b/engines/gob/hotspots.h index b348f9cd70..bd7b281c10 100644 --- a/engines/gob/hotspots.h +++ b/engines/gob/hotspots.h @@ -202,8 +202,8 @@ private: /** Handling hotspot leave events. */ void leave(uint16 index); - /** Which window is the mouse cursor currently in? (Fascination) */ - int16 curWindow(int16 &dx, int16 &dy) const; + /** Check whether a specific part of the window forces a certain cursor. */ + int16 windowCursor(int16 &dx, int16 &dy) const; /** Which hotspot is the mouse cursor currently at? */ uint16 checkMouse(Type type, uint16 &id, uint16 &index) const; -- cgit v1.2.3 From ac7fbc4bf2805ffc93cf1714eb4bd3508a57ec7c Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 22 Jun 2012 00:05:20 +0200 Subject: GOB: _renderFlags & 0x40 means the we should draw borders around hotspots Probably a debug-only flag --- engines/gob/draw.h | 1 + engines/gob/hotspots.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/gob/draw.h b/engines/gob/draw.h index 0c7f768341..e7af1f9af3 100644 --- a/engines/gob/draw.h +++ b/engines/gob/draw.h @@ -32,6 +32,7 @@ namespace Gob { #define RENDERFLAG_COLLISIONS 0x0004 #define RENDERFLAG_CAPTUREPOP 0x0008 #define RENDERFLAG_USEDELTAS 0x0010 +#define RENDERFLAG_BORDERHOTSPOTS 0x0040 #define RENDERFLAG_HASWINDOWS 0x0080 #define RENDERFLAG_NOBLITINVALIDATED 0x0200 #define RENDERFLAG_NOSUBTITLES 0x0400 diff --git a/engines/gob/hotspots.cpp b/engines/gob/hotspots.cpp index 140cf2901b..ecab9bb906 100644 --- a/engines/gob/hotspots.cpp +++ b/engines/gob/hotspots.cpp @@ -1269,7 +1269,7 @@ void Hotspots::evaluateNew(uint16 i, uint16 *ids, InputDesc *inputs, type &= 0x7F; // Draw a border around the hotspot - if (_vm->_draw->_renderFlags & 64) { + if (_vm->_draw->_renderFlags & RENDERFLAG_BORDERHOTSPOTS) { Surface &surface = *_vm->_draw->_spritesArray[_vm->_draw->_destSurface]; _vm->_video->dirtyRectsAll(); -- cgit v1.2.3 From 07b17f7116cd8b068bd677d09684664e13626939 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 22 Jun 2012 17:40:01 +0200 Subject: GOB: Reorganize the detection tables The big table with it's 330 entries grew far too messy and unwieldy, so I'm splitting it into several files. One file for each game, with some exceptions: - The Playtoons series - The ADI / Addy 2 series - The ADI / Addy 4 series - The Adibou / Addy Junior series --- engines/gob/detection.cpp | 165 - engines/gob/detection/detection.cpp | 107 + engines/gob/detection/tables.h | 117 + engines/gob/detection/tables_adi2.h | 203 ++ engines/gob/detection/tables_adi4.h | 222 ++ engines/gob/detection/tables_adibou.h | 247 ++ engines/gob/detection/tables_ajworld.h | 46 + engines/gob/detection/tables_bargon.h | 135 + engines/gob/detection/tables_dynasty.h | 146 + engines/gob/detection/tables_fallback.h | 409 +++ engines/gob/detection/tables_fascin.h | 267 ++ engines/gob/detection/tables_geisha.h | 76 + engines/gob/detection/tables_gob1.h | 716 ++++ engines/gob/detection/tables_gob2.h | 641 ++++ engines/gob/detection/tables_gob3.h | 564 ++++ engines/gob/detection/tables_inca2.h | 249 ++ engines/gob/detection/tables_lit.h | 484 +++ engines/gob/detection/tables_littlered.h | 265 ++ engines/gob/detection/tables_playtoons.h | 517 +++ engines/gob/detection/tables_urban.h | 151 + engines/gob/detection/tables_ween.h | 349 ++ engines/gob/detection/tables_woodruff.h | 402 +++ engines/gob/detection_tables.h | 5276 ------------------------------ engines/gob/module.mk | 2 +- 24 files changed, 6314 insertions(+), 5442 deletions(-) delete mode 100644 engines/gob/detection.cpp create mode 100644 engines/gob/detection/detection.cpp create mode 100644 engines/gob/detection/tables.h create mode 100644 engines/gob/detection/tables_adi2.h create mode 100644 engines/gob/detection/tables_adi4.h create mode 100644 engines/gob/detection/tables_adibou.h create mode 100644 engines/gob/detection/tables_ajworld.h create mode 100644 engines/gob/detection/tables_bargon.h create mode 100644 engines/gob/detection/tables_dynasty.h create mode 100644 engines/gob/detection/tables_fallback.h create mode 100644 engines/gob/detection/tables_fascin.h create mode 100644 engines/gob/detection/tables_geisha.h create mode 100644 engines/gob/detection/tables_gob1.h create mode 100644 engines/gob/detection/tables_gob2.h create mode 100644 engines/gob/detection/tables_gob3.h create mode 100644 engines/gob/detection/tables_inca2.h create mode 100644 engines/gob/detection/tables_lit.h create mode 100644 engines/gob/detection/tables_littlered.h create mode 100644 engines/gob/detection/tables_playtoons.h create mode 100644 engines/gob/detection/tables_urban.h create mode 100644 engines/gob/detection/tables_ween.h create mode 100644 engines/gob/detection/tables_woodruff.h delete mode 100644 engines/gob/detection_tables.h diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp deleted file mode 100644 index 18baffa3fa..0000000000 --- a/engines/gob/detection.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#include "base/plugins.h" -#include "engines/advancedDetector.h" -#include "engines/obsolete.h" - -#include "gob/gob.h" - -namespace Gob { - -struct GOBGameDescription { - ADGameDescription desc; - - GameType gameType; - int32 features; - const char *startStkBase; - const char *startTotBase; - uint32 demoIndex; -}; - -} - -using namespace Common; - -static const PlainGameDescriptor gobGames[] = { - {"gob", "Gob engine game"}, - {"gob1", "Gobliiins"}, - {"gob1cd", "Gobliiins CD"}, - {"gob2", "Gobliins 2"}, - {"gob2cd", "Gobliins 2 CD"}, - {"ween", "Ween: The Prophecy"}, - {"bargon", "Bargon Attack"}, - {"littlered", "Once Upon A Time: Little Red Riding Hood"}, - {"ajworld", "A.J.'s World of Discovery"}, - {"gob3", "Goblins Quest 3"}, - {"gob3cd", "Goblins Quest 3 CD"}, - {"lit1", "Lost in Time Part 1"}, - {"lit2", "Lost in Time Part 2"}, - {"lit", "Lost in Time"}, - {"inca2", "Inca II: Wiracocha"}, - {"woodruff", "The Bizarre Adventures of Woodruff and the Schnibble"}, - {"dynasty", "The Last Dynasty"}, - {"urban", "Urban Runner"}, - {"playtoons1", "Playtoons 1 - Uncle Archibald"}, - {"playtoons2", "Playtoons 2 - The Case of the Counterfeit Collaborator"}, - {"playtoons3", "Playtoons 3 - The Secret of the Castle"}, - {"playtoons4", "Playtoons 4 - The Mandarine Prince"}, - {"playtoons5", "Playtoons 5 - The Stone of Wakan"}, - {"playtnck1", "Playtoons Construction Kit 1 - Monsters"}, - {"playtnck2", "Playtoons Construction Kit 2 - Knights"}, - {"playtnck3", "Playtoons Construction Kit 3 - Far West"}, - {"bambou", "Playtoons Limited Edition - Bambou le sauveur de la jungle"}, - {"fascination", "Fascination"}, - {"geisha", "Geisha"}, - {"adi2", "ADI 2"}, - {"adi4", "ADI 4"}, - {"adibou2", "Adibou 2"}, - {"adibou1", "Adibou 1"}, - {0, 0} -}; - -static const Engines::ObsoleteGameID obsoleteGameIDsTable[] = { - {"gob1", "gob", kPlatformUnknown}, - {"gob2", "gob", kPlatformUnknown}, - {0, 0, kPlatformUnknown} -}; - -#include "gob/detection_tables.h" - -class GobMetaEngine : public AdvancedMetaEngine { -public: - GobMetaEngine() : AdvancedMetaEngine(Gob::gameDescriptions, sizeof(Gob::GOBGameDescription), gobGames) { - _singleid = "gob"; - _guioptions = GUIO1(GUIO_NOLAUNCHLOAD); - } - - virtual GameDescriptor findGame(const char *gameid) const { - return Engines::findGameID(gameid, _gameids, obsoleteGameIDsTable); - } - - virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { - return detectGameFilebased(allFiles, Gob::fileBased); - } - - virtual const char *getName() const { - return "Gob"; - } - - virtual const char *getOriginalCopyright() const { - return "Goblins Games (C) Coktel Vision"; - } - - virtual bool hasFeature(MetaEngineFeature f) const; - - virtual Common::Error createInstance(OSystem *syst, Engine **engine) const { - Engines::upgradeTargetIfNecessary(obsoleteGameIDsTable); - return AdvancedMetaEngine::createInstance(syst, engine); - } - virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const; -}; - -bool GobMetaEngine::hasFeature(MetaEngineFeature f) const { - return false; -} - -bool Gob::GobEngine::hasFeature(EngineFeature f) const { - return - (f == kSupportsRTL); -} -bool GobMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const { - const Gob::GOBGameDescription *gd = (const Gob::GOBGameDescription *)desc; - if (gd) { - *engine = new Gob::GobEngine(syst); - ((Gob::GobEngine *)*engine)->initGame(gd); - } - return gd != 0; -} - -#if PLUGIN_ENABLED_DYNAMIC(GOB) - REGISTER_PLUGIN_DYNAMIC(GOB, PLUGIN_TYPE_ENGINE, GobMetaEngine); -#else - REGISTER_PLUGIN_STATIC(GOB, PLUGIN_TYPE_ENGINE, GobMetaEngine); -#endif - -namespace Gob { - -void GobEngine::initGame(const GOBGameDescription *gd) { - if (gd->startTotBase == 0) - _startTot = "intro.tot"; - else - _startTot = gd->startTotBase; - - if (gd->startStkBase == 0) - _startStk = "intro.stk"; - else - _startStk = gd->startStkBase; - - _demoIndex = gd->demoIndex; - - _gameType = gd->gameType; - _features = gd->features; - _language = gd->desc.language; - _platform = gd->desc.platform; -} -} // End of namespace Gob diff --git a/engines/gob/detection/detection.cpp b/engines/gob/detection/detection.cpp new file mode 100644 index 0000000000..bcfd5dacfa --- /dev/null +++ b/engines/gob/detection/detection.cpp @@ -0,0 +1,107 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "base/plugins.h" +#include "engines/advancedDetector.h" +#include "engines/obsolete.h" + +#include "gob/gob.h" + +#include "gob/detection/tables.h" + +class GobMetaEngine : public AdvancedMetaEngine { +public: + GobMetaEngine() : AdvancedMetaEngine(Gob::gameDescriptions, sizeof(Gob::GOBGameDescription), gobGames) { + _singleid = "gob"; + _guioptions = GUIO1(GUIO_NOLAUNCHLOAD); + } + + virtual GameDescriptor findGame(const char *gameid) const { + return Engines::findGameID(gameid, _gameids, obsoleteGameIDsTable); + } + + virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { + return detectGameFilebased(allFiles, Gob::fileBased); + } + + virtual const char *getName() const { + return "Gob"; + } + + virtual const char *getOriginalCopyright() const { + return "Goblins Games (C) Coktel Vision"; + } + + virtual bool hasFeature(MetaEngineFeature f) const; + + virtual Common::Error createInstance(OSystem *syst, Engine **engine) const { + Engines::upgradeTargetIfNecessary(obsoleteGameIDsTable); + return AdvancedMetaEngine::createInstance(syst, engine); + } + virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const; +}; + +bool GobMetaEngine::hasFeature(MetaEngineFeature f) const { + return false; +} + +bool Gob::GobEngine::hasFeature(EngineFeature f) const { + return + (f == kSupportsRTL); +} +bool GobMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const { + const Gob::GOBGameDescription *gd = (const Gob::GOBGameDescription *)desc; + if (gd) { + *engine = new Gob::GobEngine(syst); + ((Gob::GobEngine *)*engine)->initGame(gd); + } + return gd != 0; +} + +#if PLUGIN_ENABLED_DYNAMIC(GOB) + REGISTER_PLUGIN_DYNAMIC(GOB, PLUGIN_TYPE_ENGINE, GobMetaEngine); +#else + REGISTER_PLUGIN_STATIC(GOB, PLUGIN_TYPE_ENGINE, GobMetaEngine); +#endif + +namespace Gob { + +void GobEngine::initGame(const GOBGameDescription *gd) { + if (gd->startTotBase == 0) + _startTot = "intro.tot"; + else + _startTot = gd->startTotBase; + + if (gd->startStkBase == 0) + _startStk = "intro.stk"; + else + _startStk = gd->startStkBase; + + _demoIndex = gd->demoIndex; + + _gameType = gd->gameType; + _features = gd->features; + _language = gd->desc.language; + _platform = gd->desc.platform; +} + +} // End of namespace Gob diff --git a/engines/gob/detection/tables.h b/engines/gob/detection/tables.h new file mode 100644 index 0000000000..5d211ac7d8 --- /dev/null +++ b/engines/gob/detection/tables.h @@ -0,0 +1,117 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_DETECTION_TABLES_H +#define GOB_DETECTION_TABLES_H + +namespace Gob { + +struct GOBGameDescription { + ADGameDescription desc; + + GameType gameType; + int32 features; + const char *startStkBase; + const char *startTotBase; + uint32 demoIndex; +}; + +} + +using namespace Common; + +// Game IDs and proper names +static const PlainGameDescriptor gobGames[] = { + {"gob", "Gob engine game"}, + {"gob1", "Gobliiins"}, + {"gob1cd", "Gobliiins CD"}, + {"gob2", "Gobliins 2"}, + {"gob2cd", "Gobliins 2 CD"}, + {"ween", "Ween: The Prophecy"}, + {"bargon", "Bargon Attack"}, + {"littlered", "Once Upon A Time: Little Red Riding Hood"}, + {"ajworld", "A.J.'s World of Discovery"}, + {"gob3", "Goblins Quest 3"}, + {"gob3cd", "Goblins Quest 3 CD"}, + {"lit1", "Lost in Time Part 1"}, + {"lit2", "Lost in Time Part 2"}, + {"lit", "Lost in Time"}, + {"inca2", "Inca II: Wiracocha"}, + {"woodruff", "The Bizarre Adventures of Woodruff and the Schnibble"}, + {"dynasty", "The Last Dynasty"}, + {"urban", "Urban Runner"}, + {"playtoons1", "Playtoons 1 - Uncle Archibald"}, + {"playtoons2", "Playtoons 2 - The Case of the Counterfeit Collaborator"}, + {"playtoons3", "Playtoons 3 - The Secret of the Castle"}, + {"playtoons4", "Playtoons 4 - The Mandarine Prince"}, + {"playtoons5", "Playtoons 5 - The Stone of Wakan"}, + {"playtnck1", "Playtoons Construction Kit 1 - Monsters"}, + {"playtnck2", "Playtoons Construction Kit 2 - Knights"}, + {"playtnck3", "Playtoons Construction Kit 3 - Far West"}, + {"bambou", "Playtoons Limited Edition - Bambou le sauveur de la jungle"}, + {"fascination", "Fascination"}, + {"geisha", "Geisha"}, + {"adi2", "ADI 2"}, + {"adi4", "ADI 4"}, + {"adibou2", "Adibou 2"}, + {"adibou1", "Adibou 1"}, + {0, 0} +}; + +// Obsolete IDs we don't want anymore +static const Engines::ObsoleteGameID obsoleteGameIDsTable[] = { + {"gob1", "gob", kPlatformUnknown}, + {"gob2", "gob", kPlatformUnknown}, + {0, 0, kPlatformUnknown} +}; + +namespace Gob { + +// Detection tables +static const GOBGameDescription gameDescriptions[] = { + #include "gob/detection/tables_gob1.h" // Gobliiins + #include "gob/detection/tables_gob2.h" // Gobliins 2: The Prince Buffoon + #include "gob/detection/tables_gob3.h" // Goblins 3 / Goblins Quest 3 + #include "gob/detection/tables_ween.h" // Ween: The Prophecy + #include "gob/detection/tables_bargon.h" // Bargon Attack + #include "gob/detection/tables_littlered.h" // Once Upon A Time: Little Red Riding Hood + #include "gob/detection/tables_lit.h" // Lost in Time + #include "gob/detection/tables_fascin.h" // Fascination + #include "gob/detection/tables_geisha.h" // Geisha + #include "gob/detection/tables_inca2.h" // Inca II: Wiracocha + #include "gob/detection/tables_woodruff.h" // (The Bizarre Adventures of) Woodruff and the Schnibble (of Azimuth) + #include "gob/detection/tables_dynasty.h" // The Last Dynasty + #include "gob/detection/tables_urban.h" // Urban Runner + #include "gob/detection/tables_playtoons.h" // The Playtoons series + #include "gob/detection/tables_adi2.h" // The ADI / Addy 2 series + #include "gob/detection/tables_adi4.h" // The ADI / Addy 4 series + #include "gob/detection/tables_adibou.h" // The Adibou / Addy Junior series + #include "gob/detection/tables_ajworld.h" // A.J.'s World of Discovery / ADI Jr. + + { AD_TABLE_END_MARKER, kGameTypeNone, kFeaturesNone, 0, 0, 0} +}; + +// File-based fallback tables +#include "gob/detection/tables_fallback.h" +} + +#endif // GOB_DETECTION_TABLES_H diff --git a/engines/gob/detection/tables_adi2.h b/engines/gob/detection/tables_adi2.h new file mode 100644 index 0000000000..da05a31f40 --- /dev/null +++ b/engines/gob/detection/tables_adi2.h @@ -0,0 +1,203 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for the ADI / Addy 2 series. */ + +#ifndef GOB_DETECTION_TABLES_ADI2_H +#define GOB_DETECTION_TABLES_ADI2_H + +// -- French: Adi -- + +{ + { + "adi2", + "Adi 2.0 for Teachers", + AD_ENTRY1s("adi2.stk", "da6f1fb68bff32260c5eecdf9286a2f5", 1533168), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO0() + }, + kGameTypeAdi2, + kFeaturesNone, + "adi2.stk", "ediintro.tot", 0 +}, +{ // Found in french ADI 2 Francais-Maths CM1. Exact version not specified. + { + "adi2", + "Adi 2", + AD_ENTRY1s("adi2.stk", "23f279615c736dc38320f1348e70c36e", 10817668), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi2, + kFeatures640x480, + "adi2.stk", "ediintro.tot", 0 +}, +{ // Found in french ADI 2 Francais-Maths CE2. Exact version not specified. + { + "adi2", + "Adi 2", + AD_ENTRY1s("adi2.stk", "d4162c4298f9423ecc1fb04965557e90", 11531214), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi2, + kFeatures640x480, + "adi2.stk", "ediintro.tot", 0 +}, +{ + { + "adi2", + "Adi 2.5", + AD_ENTRY1s("adi2.stk", "fcac60e6627f37aee219575b60859de9", 16944268), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi2, + kFeatures640x480, + "adi2.stk", "ediintro.tot", 0 +}, +{ + { + "adi2", + "Adi 2.5", + AD_ENTRY1s("adi2.stk", "072d5e2d7826a7c055865568ebf918bb", 16934596), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi2, + kFeatures640x480, + "adi2.stk", "ediintro.tot", 0 +}, +{ + { + "adi2", + "Adi 2.6", + AD_ENTRY1s("adi2.stk", "2fb940eb8105b12871f6b88c8c4d1615", 16780058), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi2, + kFeatures640x480, + "adi2.stk", "ediintro.tot", 0 +}, + +// -- German: Addy -- + +{ + { + "adi2", + "Adi 2.6", + AD_ENTRY1s("adi2.stk", "fde7d98a67dbf859423b6473796e932a", 18044780), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi2, + kFeatures640x480, + "adi2.stk", "ediintro.tot", 0 +}, +{ + { + "adi2", + "Adi 2.7.1", + AD_ENTRY1s("adi2.stk", "6fa5dffebf5c7243c6af6b8c188ee00a", 19278008), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi2, + kFeatures640x480, + "adi2.stk", "ediintro.tot", 0 +}, + +// -- Spanish: Adi -- + +{ + { + "adi2", + "Adi 2", + AD_ENTRY1s("adi2.stk", "2a40bb48ccbd4e6fb3f7f0fc2f069d80", 17720132), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi2, + kFeatures640x480, + "adi2.stk", "ediintro.tot", 0 +}, + +// -- English: ADI (Amiga) -- + +{ + { + "adi2", + "Adi 2", + AD_ENTRY1s("adi2.stk", "29694c5a649298a42f87ae731d6d6f6d", 311132), + EN_ANY, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO0() + }, + kGameTypeAdi2, + kFeaturesNone, + "adi2.stk", "ediintro.tot", 0 +}, + +// -- Demos -- + +{ + { + "adi2", + "Non-Interactive Demo", + { + {"demo.scn", 0, "8b5ba359fd87d586ad39c1754bf6ea35", 168}, + {"demadi2t.vmd", 0, "08a1b18cfe2015d3b43270da35cc813d", 7250723}, + {"demarch.vmd", 0, "4c4a4616585d40ef3df209e3c3911062", 5622731}, + {"demobou.vmd", 0, "2208b9855775564d15c4a5a559da0aec", 3550511}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeAdi2, + kFeatures640x480 | kFeaturesSCNDemo, + 0, 0, 1 +}, + +#endif // GOB_DETECTION_TABLES_ADI2_H diff --git a/engines/gob/detection/tables_adi4.h b/engines/gob/detection/tables_adi4.h new file mode 100644 index 0000000000..4b967d76d3 --- /dev/null +++ b/engines/gob/detection/tables_adi4.h @@ -0,0 +1,222 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for the ADI / Addy 4 series. */ + +#ifndef GOB_DETECTION_TABLES_ADI4_H +#define GOB_DETECTION_TABLES_ADI4_H + +// -- French: Adi -- + +{ + { + "adi4", + "Adi 4.0", + AD_ENTRY1s("intro.stk", "a3c35d19b2d28ea261d96321d208cb5a", 6021466), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi4, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "adi4", + "Adi 4.0", + AD_ENTRY1s("intro.stk", "44491d85648810bc6fcf84f9b3aa47d5", 5834944), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi4, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "adi4", + "Adi 4.0", + AD_ENTRY1s("intro.stk", "29374c0e3c10b17dd8463b06a55ad093", 6012072), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi4, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "adi4", + "Adi 4.0 Limited Edition", + AD_ENTRY1s("intro.stk", "ebbbc5e28a4adb695535ed989c1b8d66", 5929644), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi4, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "adi4", + "ADI 4.10", + AD_ENTRY1s("intro.stk", "6afc2590856433b9f5295b032f2b205d", 5923112), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi4, + kFeaturesNone, + 0, 0, 0 +}, +{ + { + "adi4", + "ADI 4.11", + AD_ENTRY1s("intro.stk", "6296e4be4e0c270c24d1330881900c7f", 5921234), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi4, + kFeaturesNone, + 0, 0, 0 +}, +{ + { + "adi4", + "ADI 4.21", + AD_ENTRY1s("intro.stk", "c5b9f6222c0b463f51dab47317c5b687", 5950490), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi4, + kFeatures640x480, + 0, 0, 0 +}, + +// -- German: Addy -- + +{ + { + "adi4", + "Addy 4 Grundschule Basis CD", + AD_ENTRY1s("intro.stk", "d2f0fb8909e396328dc85c0e29131ba8", 5847588), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi4, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "adi4", + "Addy 4 Sekundarstufe Basis CD", + AD_ENTRY1s("intro.stk", "367340e59c461b4fa36651cd74e32c4e", 5847378), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi4, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "adi4", + "Addy 4.21", + AD_ENTRY1s("intro.stk", "534f0b674cd4830df94a9c32c4ea7225", 6878034), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi4, + kFeatures640x480, + 0, 0, 0 +}, + +// -- English: ADI -- + +{ + { + "adi4", + "ADI 4.10", + AD_ENTRY1s("intro.stk", "3e3fa9656e37d802027635ace88c4cc5", 5359144), + EN_GRB, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi4, + kFeaturesNone, + 0, 0, 0 +}, + +// -- Demos -- + +{ + { + "adi4", + "Adi 4.0 Interactive Demo", + AD_ENTRY1s("intro.stk", "89ace204dbaac001425c73f394334f6f", 2413102), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi4, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "adi4", + "Adi 4.0 / Adibou 2 Demo", + AD_ENTRY1s("intro.stk", "d41d8cd98f00b204e9800998ecf8427e", 0), + FR_FRA, + kPlatformPC, + ADGF_DEMO, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeAdi4, + kFeatures640x480, + 0, 0, 0 +}, + +#endif // GOB_DETECTION_TABLES_ADI4_H diff --git a/engines/gob/detection/tables_adibou.h b/engines/gob/detection/tables_adibou.h new file mode 100644 index 0000000000..0e652839bb --- /dev/null +++ b/engines/gob/detection/tables_adibou.h @@ -0,0 +1,247 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for Adibou / Addy Junior series. */ + +#ifndef GOB_DETECTION_TABLES_ADIBOU_H +#define GOB_DETECTION_TABLES_ADIBOU_H + +// -- French: Adibou -- + +{ + { + "adibou1", + "ADIBOU 1 Environnement 4-7 ans", + AD_ENTRY1s("intro.stk", "6db110188fcb7c5208d9721b5282682a", 4805104), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAdibou1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "adibou2", + "ADIBOU 2", + AD_ENTRY1s("intro.stk", "94ae7004348dc8bf99c23a9a6ef81827", 956162), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO0() + }, + kGameTypeAdibou2, + kFeaturesNone, + 0, 0, 0 +}, +{ + { + "adibou2", + "Le Jardin Magique d'Adibou", + AD_ENTRY1s("intro.stk", "a8ff86f3cc40dfe5898e0a741217ef27", 956328), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO0() + }, + kGameTypeAdibou2, + kFeaturesNone, + 0, 0, 0 +}, +{ + { + "adibou2", + "ADIBOU Version Decouverte", + AD_ENTRY1s("intro.stk", "558c14327b79ed39214b49d567a75e33", 8737856), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO0() + }, + kGameTypeAdibou2, + kFeaturesNone, + 0, 0, 0 +}, +{ + { + "adibou2", + "ADIBOU 2.10 Environnement", + AD_ENTRY1s("intro.stk", "f2b797819aeedee557e904b0b5ccd82e", 8736454), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO0() + }, + kGameTypeAdibou2, + kFeaturesNone, + 0, 0, 0 +}, +{ + { + "adibou2", + "ADIBOU 2.11 Environnement", + AD_ENTRY1s("intro.stk", "7b1f1f6f6477f54401e95d913f75e333", 8736904), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO0() + }, + kGameTypeAdibou2, + kFeaturesNone, + 0, 0, 0 +}, +{ + { + "adibou2", + "ADIBOU 2.12 Environnement", + AD_ENTRY1s("intro.stk", "1e49c39a4a3ce6032a84b712539c2d63", 8738134), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO0() + }, + kGameTypeAdibou2, + kFeaturesNone, + 0, 0, 0 +}, +{ + { + "adibou2", + "ADIBOU 2.13s Environnement", + AD_ENTRY1s("intro.stk", "092707829555f27706920e4cacf1fada", 8737958), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO0() + }, + kGameTypeAdibou2, + kFeaturesNone, + 0, 0, 0 +}, +{ + { + "adibou2", + "ADIBOO 2.14 Environnement", + AD_ENTRY1s("intro.stk", "ff63637e3cb7f0a457edf79457b1c6b3", 9333874), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO0() + }, + kGameTypeAdibou2, + kFeaturesNone, + 0, 0, 0 +}, + +// -- German: Addy Junior -- + +{ + { + "adibou2", + "ADIBOU 2", + AD_ENTRY1s("intro.stk", "092707829555f27706920e4cacf1fada", 8737958), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO0() + }, + kGameTypeAdibou2, + kFeaturesNone, + 0, 0, 0 +}, + +// -- Italian: Adibù -- +{ + { + "adibou2", + "ADIB\xD9 2", + AD_ENTRY1s("intro.stk", "092707829555f27706920e4cacf1fada", 8737958), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO0() + }, + kGameTypeAdibou2, + kFeaturesNone, + 0, 0, 0 +}, + +// -- Demos -- + +{ + { + "adibou2", + "Non-Interactive Demo", + { + {"demogb.scn", 0, "9291455a908ac0e6aaaca686e532609b", 105}, + {"demogb.vmd", 0, "bc9c1db97db7bec8f566332444fa0090", 14320840}, + {0, 0, 0, 0} + }, + EN_GRB, + kPlatformPC, + ADGF_DEMO, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeAdibou2, + kFeatures640x480 | kFeaturesSCNDemo, + 0, 0, 9 +}, +{ + { + "adibou2", + "Non-Interactive Demo", + { + {"demoall.scn", 0, "c8fd308c037b829800006332b2c32674", 106}, + {"demoall.vmd", 0, "4672b2deacc6fca97484840424b1921b", 14263433}, + {0, 0, 0, 0} + }, + DE_DEU, + kPlatformPC, + ADGF_DEMO, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeAdibou2, + kFeatures640x480 | kFeaturesSCNDemo, + 0, 0, 10 +}, +{ + { + "adibou2", + "Non-Interactive Demo", + { + {"demofra.scn", 0, "d1b2b1618af384ea1120def8b986c02b", 106}, + {"demofra.vmd", 0, "b494cdec1aac7e54c3f2480512d2880e", 14297100}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformPC, + ADGF_DEMO, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeAdibou2, + kFeatures640x480 | kFeaturesSCNDemo, + 0, 0, 11 +}, + +#endif // GOB_DETECTION_TABLES_ADIBOU_H diff --git a/engines/gob/detection/tables_ajworld.h b/engines/gob/detection/tables_ajworld.h new file mode 100644 index 0000000000..c78d11a6ad --- /dev/null +++ b/engines/gob/detection/tables_ajworld.h @@ -0,0 +1,46 @@ + +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for A.J.'s World of Discovery / ADI Jr. */ + +#ifndef GOB_DETECTION_TABLES_AJWORLD_H +#define GOB_DETECTION_TABLES_AJWORLD_H + +// -- DOS VGA Floppy -- + +{ + { + "ajworld", + "", + AD_ENTRY1s("intro.stk", "e453bea7b28a67c930764d945f64d898", 3913628), + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAJWorld, + kFeaturesAdLib, + 0, 0, 0 +}, + +#endif // GOB_DETECTION_TABLES_AJWORLD_H diff --git a/engines/gob/detection/tables_bargon.h b/engines/gob/detection/tables_bargon.h new file mode 100644 index 0000000000..ac90355476 --- /dev/null +++ b/engines/gob/detection/tables_bargon.h @@ -0,0 +1,135 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for Bargon Attack. */ + +#ifndef GOB_DETECTION_TABLES_BARGON_H +#define GOB_DETECTION_TABLES_BARGON_H + +// -- DOS VGA Floppy -- + +{ + { + "bargon", + "", + AD_ENTRY1("intro.stk", "da3c54be18ab73fbdb32db24624a9c23"), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBargon, + kFeaturesNone, + 0, 0, 0 +}, +{ // Supplied by cesardark in bug #1681649 + { + "bargon", + "", + AD_ENTRY1s("intro.stk", "11103b304286c23945560b391fd37e7d", 3181890), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBargon, + kFeaturesNone, + 0, 0, 0 +}, +{ // Supplied by paul66 in bug #1692667 + { + "bargon", + "", + AD_ENTRY1s("intro.stk", "da3c54be18ab73fbdb32db24624a9c23", 3181825), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBargon, + kFeaturesNone, + 0, 0, 0 +}, +{ // Supplied by kizkoool in bugreport #2089734 + { + "bargon", + "", + AD_ENTRY1s("intro.stk", "00f6b4e2ee26e5c40b488e2df5adcf03", 3975580), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBargon, + kFeaturesNone, + 0, 0, 0 +}, +{ // Supplied by glorfindel in bugreport #1722142 + { + "bargon", + "Fanmade", + AD_ENTRY1s("intro.stk", "da3c54be18ab73fbdb32db24624a9c23", 3181825), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBargon, + kFeaturesNone, + 0, 0, 0 +}, + +// -- Amiga -- + +{ // Supplied by pwigren in bugreport #1764174 + { + "bargon", + "", + AD_ENTRY1s("intro.stk", "569d679fe41d49972d34c9fce5930dda", 269825), + EN_ANY, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBargon, + kFeaturesNone, + 0, 0, 0 +}, + +// -- Atari ST -- + +{ // Supplied by Trekky in the forums + { + "bargon", + "", + AD_ENTRY1s("intro.stk", "2f54b330d21f65b04b7c1f8cca76426c", 262109), + FR_FRA, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBargon, + kFeaturesNone, + 0, 0, 0 +}, + +#endif // GOB_DETECTION_TABLES_BARGON_H diff --git a/engines/gob/detection/tables_dynasty.h b/engines/gob/detection/tables_dynasty.h new file mode 100644 index 0000000000..147bf32075 --- /dev/null +++ b/engines/gob/detection/tables_dynasty.h @@ -0,0 +1,146 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for The Last Dynasty. */ + +#ifndef GOB_DETECTION_TABLES_DYNASTY_H +#define GOB_DETECTION_TABLES_DYNASTY_H + +// -- Windows -- + +{ + { + "dynasty", + "", + AD_ENTRY1s("intro.stk", "6190e32404b672f4bbbc39cf76f41fda", 2511470), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeDynasty, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "dynasty", + "", + AD_ENTRY1s("intro.stk", "61e4069c16e27775a6cc6d20f529fb36", 2511300), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeDynasty, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "dynasty", + "", + AD_ENTRY1s("intro.stk", "61e4069c16e27775a6cc6d20f529fb36", 2511300), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeDynasty, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "dynasty", + "", + AD_ENTRY1s("intro.stk", "b3f8472484b7a1df94557b51e7b6fca0", 2322644), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeDynasty, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "dynasty", + "", + AD_ENTRY1s("intro.stk", "bdbdac8919200a5e71ffb9fb0709f704", 2446652), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeDynasty, + kFeatures640x480, + 0, 0, 0 +}, + +// -- Demos -- + +{ + { + "dynasty", + "Demo", + AD_ENTRY1s("intro.stk", "464538a17ed39755d7f1ba9c751af1bd", 1847864), + EN_USA, + kPlatformPC, + ADGF_DEMO, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeDynasty, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "dynasty", + "Demo", + AD_ENTRY1s("lda1.stk", "0e56a899357cbc0bf503260fd2dd634e", 15032774), + UNK_LANG, + kPlatformWindows, + ADGF_DEMO, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeDynasty, + kFeatures640x480, + "lda1.stk", 0, 0 +}, +{ + { + "dynasty", + "Demo", + AD_ENTRY1s("lda1.stk", "8669ea2e9a8239c070dc73958fbc8753", 15567724), + DE_DEU, + kPlatformWindows, + ADGF_DEMO, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeDynasty, + kFeatures640x480, + "lda1.stk", 0, 0 +}, + +#endif // GOB_DETECTION_TABLES_DYNASTY_H diff --git a/engines/gob/detection/tables_fallback.h b/engines/gob/detection/tables_fallback.h new file mode 100644 index 0000000000..d8a5760080 --- /dev/null +++ b/engines/gob/detection/tables_fallback.h @@ -0,0 +1,409 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_DETECTION_TABLES_FALLBACK_H +#define GOB_DETECTION_TABLES_FALLBACK_H + +static const GOBGameDescription fallbackDescs[] = { + { //0 + { + "gob1", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesNone, + 0, 0, 0 + }, + { //1 + { + "gob1cd", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 + }, + { //2 + { + "gob2", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 + }, + { //3 + { + "gob2mac", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 + }, + { //4 + { + "gob2cd", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesCD, + 0, 0, 0 + }, + { //5 + { + "bargon", + "", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBargon, + kFeaturesNone, + 0, 0, 0 + }, + { //6 + { + "gob3", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 + }, + { //7 + { + "gob3cd", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesCD, + 0, 0, 0 + }, + { //8 + { + "woodruff", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 + }, + { //9 + { + "lostintime", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 + }, + { //10 + { + "lostintime", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 + }, + { //11 + { + "lostintime", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesCD, + 0, 0, 0 + }, + { //12 + { + "urban", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeUrban, + kFeatures640x480 | kFeaturesTrueColor, + 0, 0, 0 + }, + { //13 + { + "playtoons1", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + 0, 0, 0 + }, + { //14 + { + "playtoons2", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + 0, 0, 0 + }, + { //15 + { + "playtoons3", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + 0, 0, 0 + }, + { //16 + { + "playtoons4", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + 0, 0, 0 + }, + { //17 + { + "playtoons5", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + 0, 0, 0 + }, + { //18 + { + "playtoons construction kit", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + 0, 0, 0 + }, + { //19 + { + "bambou", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeBambou, + kFeatures640x480, + 0, 0, 0 + }, + { //20 + { + "fascination", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeFascination, + kFeaturesNone, + "disk0.stk", 0, 0 + }, + { //21 + { + "geisha", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGeisha, + kFeaturesEGA, + "disk1.stk", "intro.tot", 0 + }, + { //22 + { + "adi2", + "", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeAdi2, + kFeatures640x480, + "adi2.stk", 0, 0 + }, + { //23 + { + "adi4", + "", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeAdi4, + kFeatures640x480, + "adif41.stk", 0, 0 + }, + { //24 + { + "coktelplayer", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeUrban, + kFeaturesAdLib | kFeatures640x480 | kFeaturesSCNDemo, + "", "", 8 + } +}; + +static const ADFileBasedFallback fileBased[] = { + { &fallbackDescs[ 0].desc, { "intro.stk", "disk1.stk", "disk2.stk", "disk3.stk", "disk4.stk", 0 } }, + { &fallbackDescs[ 1].desc, { "intro.stk", "gob.lic", 0 } }, + { &fallbackDescs[ 2].desc, { "intro.stk", 0 } }, + { &fallbackDescs[ 2].desc, { "intro.stk", "disk2.stk", "disk3.stk", 0 } }, + { &fallbackDescs[ 3].desc, { "intro.stk", "disk2.stk", "disk3.stk", "musmac1.mid", 0 } }, + { &fallbackDescs[ 4].desc, { "intro.stk", "gobnew.lic", 0 } }, + { &fallbackDescs[ 5].desc, { "intro.stk", "scaa.imd", "scba.imd", "scbf.imd", 0 } }, + { &fallbackDescs[ 6].desc, { "intro.stk", "imd.itk", 0 } }, + { &fallbackDescs[ 7].desc, { "intro.stk", "mus_gob3.lic", 0 } }, + { &fallbackDescs[ 8].desc, { "intro.stk", "woodruff.itk", 0 } }, + { &fallbackDescs[ 9].desc, { "intro.stk", "commun1.itk", 0 } }, + { &fallbackDescs[10].desc, { "intro.stk", "commun1.itk", "musmac1.mid", 0 } }, + { &fallbackDescs[11].desc, { "intro.stk", "commun1.itk", "lost.lic", 0 } }, + { &fallbackDescs[12].desc, { "intro.stk", "cd1.itk", "objet1.itk", 0 } }, + { &fallbackDescs[13].desc, { "playtoon.stk", "archi.stk", 0 } }, + { &fallbackDescs[14].desc, { "playtoon.stk", "spirou.stk", 0 } }, + { &fallbackDescs[15].desc, { "playtoon.stk", "chato.stk", 0 } }, + { &fallbackDescs[16].desc, { "playtoon.stk", "manda.stk", 0 } }, + { &fallbackDescs[17].desc, { "playtoon.stk", "wakan.stk", 0 } }, + { &fallbackDescs[18].desc, { "playtoon.stk", "dan.itk" } }, + { &fallbackDescs[19].desc, { "intro.stk", "bambou.itk", 0 } }, + { &fallbackDescs[20].desc, { "disk0.stk", "disk1.stk", "disk2.stk", "disk3.stk", 0 } }, + { &fallbackDescs[21].desc, { "disk1.stk", "disk2.stk", "disk3.stk", 0 } }, + { &fallbackDescs[22].desc, { "adi2.stk", 0 } }, + { &fallbackDescs[23].desc, { "adif41.stk", "adim41.stk", 0 } }, + { &fallbackDescs[24].desc, { "coktelplayer.scn", 0 } }, + { 0, { 0 } } +}; + +#endif // GOB_DETECTION_TABLES_FALLBACK_H diff --git a/engines/gob/detection/tables_fascin.h b/engines/gob/detection/tables_fascin.h new file mode 100644 index 0000000000..1c9cced303 --- /dev/null +++ b/engines/gob/detection/tables_fascin.h @@ -0,0 +1,267 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for Fascination. */ + +#ifndef GOB_DETECTION_TABLES_FASCIN_H +#define GOB_DETECTION_TABLES_FASCIN_H + +// -- DOS VGA Floppy (1 disk) -- + +{ // Supplied by scoriae + { + "fascination", + "VGA", + AD_ENTRY1s("disk0.stk", "c14330d052fe4da5a441ac9d81bc5891", 1061955), + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeFascination, + kFeaturesAdLib, + "disk0.stk", 0, 0 +}, +{ + { + "fascination", + "VGA", + AD_ENTRY1s("disk0.stk", "e8ab4f200a2304849f462dc901705599", 183337), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeFascination, + kFeaturesAdLib, + "disk0.stk", 0, 0 +}, + +// -- DOS VGA Floppy (3 disks) -- + +{ // Supplied by alex86r in bug report #3297633 + { + "fascination", + "VGA 3 disks edition", + AD_ENTRY1s("disk0.stk", "ab3dfdce43917bc806812959d692fc8f", 1061929), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeFascination, + kFeaturesAdLib, + "disk0.stk", 0, 0 +}, +{ + { + "fascination", + "VGA 3 disks edition", + AD_ENTRY1s("disk0.stk", "a50a8495e1b2d67699fb562cb98fc3e2", 1064387), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeFascination, + kFeaturesAdLib, + "disk0.stk", 0, 0 +}, +{ + { + "fascination", + "Hebrew edition (censored)", + AD_ENTRY1s("intro.stk", "d6e45ce548598727e2b5587a99718eba", 1055909), + HE_ISR, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeFascination, + kFeaturesAdLib, + "intro.stk", 0, 0 +}, +{ // Supplied by windlepoons in bug report #2809247 + { + "fascination", + "VGA 3 disks edition", + AD_ENTRY1s("disk0.stk", "3a24e60a035250189643c86a9ceafb97", 1062480), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeFascination, + kFeaturesAdLib, + "disk0.stk", 0, 0 +}, + +// -- DOS VGA CD -- + +{ + { + "fascination", + "CD Version (Censored)", + AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953), + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOSUBTITLES) + }, + kGameTypeFascination, + kFeaturesCD, + "intro.stk", 0, 0 +}, +{ + { + "fascination", + "CD Version (Censored)", + AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOSUBTITLES) + }, + kGameTypeFascination, + kFeaturesCD, + "intro.stk", 0, 0 +}, +{ + { + "fascination", + "CD Version (Censored)", + AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOSUBTITLES) + }, + kGameTypeFascination, + kFeaturesCD, + "intro.stk", 0, 0 +}, +{ + { + "fascination", + "CD Version (Censored)", + AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOSUBTITLES) + }, + kGameTypeFascination, + kFeaturesCD, + "intro.stk", 0, 0 +}, +{ + { + "fascination", + "CD Version (Censored)", + AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOSUBTITLES) + }, + kGameTypeFascination, + kFeaturesCD, + "intro.stk", 0, 0 +}, + +// -- Amiga -- + +{ + { + "fascination", + "", + AD_ENTRY1s("disk0.stk", "68b1c01564f774c0b640075fbad1b695", 189968), + DE_DEU, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeFascination, + kFeaturesNone, + "disk0.stk", 0, 0 +}, +{ + { + "fascination", + "", + AD_ENTRY1s("disk0.stk", "7062117e9c5adfb6bfb2dac3ff74df9e", 189951), + EN_ANY, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeFascination, + kFeaturesNone, + "disk0.stk", 0, 0 +}, +{ + { + "fascination", + "", + AD_ENTRY1s("disk0.stk", "55c154e5a3e8e98afebdcff4b522e1eb", 190005), + FR_FRA, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeFascination, + kFeaturesNone, + "disk0.stk", 0, 0 +}, +{ + { + "fascination", + "", + AD_ENTRY1s("disk0.stk", "7691827fff35df7799f14cfd6be178ad", 189931), + IT_ITA, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeFascination, + kFeaturesNone, + "disk0.stk", 0, 0 +}, + +// -- Atari ST -- + +{ + { + "fascination", + "", + AD_ENTRY1s("disk0.stk", "aff9fcc619f4dd19eae228affd0d34c8", 189964), + EN_ANY, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeFascination, + kFeaturesNone, + "disk0.stk", 0, 0 +}, + +#endif // GOB_DETECTION_TABLES_FASCIN_H diff --git a/engines/gob/detection/tables_geisha.h b/engines/gob/detection/tables_geisha.h new file mode 100644 index 0000000000..331e17e31d --- /dev/null +++ b/engines/gob/detection/tables_geisha.h @@ -0,0 +1,76 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for Geisha. */ + +#ifndef GOB_DETECTION_TABLES_GEISHA_H +#define GOB_DETECTION_TABLES_GEISHA_H + +// -- DOS EGA Floppy -- + +{ + { + "geisha", + "", + AD_ENTRY1s("disk1.stk", "6eebbb98ad90cd3c44549fc2ab30f632", 212153), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGeisha, + kFeaturesEGA | kFeaturesAdLib, + "disk1.stk", "intro.tot", 0 +}, +{ + { + "geisha", + "", + AD_ENTRY1s("disk1.stk", "f4d4d9d20f7ad1f879fc417d47faba89", 336732), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGeisha, + kFeaturesEGA | kFeaturesAdLib, + "disk1.stk", "intro.tot", 0 +}, + +// -- Amiga -- + +{ + { + "geisha", + "", + AD_ENTRY1s("disk1.stk", "e5892f00917c62423e93f5fd9920cf47", 208120), + UNK_LANG, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGeisha, + kFeaturesEGA, + "disk1.stk", "intro.tot", 0 +}, + +#endif // GOB_DETECTION_TABLES_GEISHA_H diff --git a/engines/gob/detection/tables_gob1.h b/engines/gob/detection/tables_gob1.h new file mode 100644 index 0000000000..e6086e990a --- /dev/null +++ b/engines/gob/detection/tables_gob1.h @@ -0,0 +1,716 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for Gobliiins. */ + +#ifndef GOB_DETECTION_TABLES_GOB1_H +#define GOB_DETECTION_TABLES_GOB1_H + +// -- DOS EGA Floppy -- + +{ // Supplied by Florian Zeitz on scummvm-devel + { + "gob1", + "EGA", + AD_ENTRY1("intro.stk", "c65e9cc8ba23a38456242e1f2b1caad4"), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesEGA | kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob1", + "EGA", + AD_ENTRY1("intro.stk", "f9233283a0be2464248d83e14b95f09c"), + RU_RUS, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesEGA | kFeaturesAdLib, + 0, 0, 0 +}, + +// -- DOS VGA Floppy -- + +{ // Supplied by Theruler76 in bug report #1201233 + { + "gob1", + "VGA", + AD_ENTRY1("intro.stk", "26a9118c0770fa5ac93a9626761600b2"), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesNone, + 0, 0, 0 +}, +{ // Supplied by raziel_ in bug report #1891864 + { + "gob1", + "VGA", + AD_ENTRY1s("intro.stk", "e157cb59c6d330ca70d12ab0ef1dd12b", 288972), + EN_GRB, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- DOS VGA CD -- + +{ // Provided by pykman in the forums. + { + "gob1cd", + "Polish", + AD_ENTRY1s("intro.stk", "97d2443948b2e367cf567fe7e101f5f2", 4049267), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, +{ // CD 1.000 version. + { + "gob1cd", + "v1.000", + AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, +{ // CD 1.000 version. + { + "gob1cd", + "v1.000", + AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, +{ // CD 1.000 version. + { + "gob1cd", + "v1.000", + AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, +{ // CD 1.000 version. + { + "gob1cd", + "v1.000", + AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, +{ // CD 1.000 version. + { + "gob1cd", + "v1.000", + AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, +{ // CD 1.02 version. Multilingual + { + "gob1cd", + "v1.02", + AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, +{ // CD 1.02 version. Multilingual + { + "gob1cd", + "v1.02", + AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, +{ // CD 1.02 version. Multilingual + { + "gob1cd", + "v1.02", + AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, +{ // CD 1.02 version. Multilingual + { + "gob1cd", + "v1.02", + AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, +{ // CD 1.02 version. Multilingual + { + "gob1cd", + "v1.02", + AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2810082 + { + "gob1cd", + "v1.02", + AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248), + HU_HUN, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2810082 + { + "gob1cd", + "v1.02", + AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2810082 + { + "gob1cd", + "v1.02", + AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2810082 + { + "gob1cd", + "v1.02", + AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesCD, + 0, 0, 0 +}, + +// -- Mac -- + +{ // Supplied by raina in the forums + { + "gob1", + "", + AD_ENTRY1s("intro.stk", "6d837c6380d8f4d984c9f6cc0026df4f", 192712), + EN_ANY, + kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesNone, + 0, 0, 0 +}, +{ // Supplied by paul66 in bug report #1652352 + { + "gob1", + "", + AD_ENTRY1("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267"), + EN_ANY, + kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by paul66 in bug report #1652352 + { + "gob1", + "", + AD_ENTRY1("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267"), + DE_DEU, + kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by paul66 in bug report #1652352 + { + "gob1", + "", + AD_ENTRY1("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267"), + FR_FRA, + kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by paul66 in bug report #1652352 + { + "gob1", + "", + AD_ENTRY1("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267"), + IT_ITA, + kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by paul66 in bug report #1652352 + { + "gob1", + "", + AD_ENTRY1("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267"), + ES_ESP, + kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- Windows -- + +{ // Supplied by Hkz on #scummvm + { + "gob1", + "", + { + {"intro.stk", 0, "f5f028ee39c456fa51fa63b606583918", 313472}, + {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by Hkz on #scummvm + { + "gob1", + "", + { + {"intro.stk", 0, "f5f028ee39c456fa51fa63b606583918", 313472}, + {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, + {0, 0, 0, 0} + }, + IT_ITA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by Hkz on #scummvm + { + "gob1", + "", + { + {"intro.stk", 0, "f5f028ee39c456fa51fa63b606583918", 313472}, + {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, + {0, 0, 0, 0} + }, + EN_GRB, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by Hkz on #scummvm + { + "gob1", + "", + { + {"intro.stk", 0, "f5f028ee39c456fa51fa63b606583918", 313472}, + {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, + {0, 0, 0, 0} + }, + DE_DEU, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by Hkz on #scummvm + { + "gob1", + "", + { + {"intro.stk", 0, "f5f028ee39c456fa51fa63b606583918", 313472}, + {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, + {0, 0, 0, 0} + }, + ES_ESP, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob1", + "", + { + {"intro.stk", 0, "e157cb59c6d330ca70d12ab0ef1dd12b", 288972}, + {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, + {0, 0, 0, 0} + }, + EN_GRB, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob1", + "", + { + {"intro.stk", 0, "e157cb59c6d330ca70d12ab0ef1dd12b", 288972}, + {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob1", + "", + { + {"intro.stk", 0, "e157cb59c6d330ca70d12ab0ef1dd12b", 288972}, + {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, + {0, 0, 0, 0} + }, + ES_ESP, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob1", + "", + { + {"intro.stk", 0, "e157cb59c6d330ca70d12ab0ef1dd12b", 288972}, + {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, + {0, 0, 0, 0} + }, + IT_ITA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob1", + "", + { + {"intro.stk", 0, "e157cb59c6d330ca70d12ab0ef1dd12b", 288972}, + {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, + {0, 0, 0, 0} + }, + DE_DEU, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Found in french ADI 2.5 Anglais Multimedia 5e + { + "gob1", + "", + AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472), + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Found in french ADI 2.5 Anglais Multimedia 5e + { + "gob1", + "", + AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472), + EN_GRB, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Found in french ADI 2.5 Anglais Multimedia 5e + { + "gob1", + "", + AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472), + DE_DEU, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Found in french ADI 2.5 Anglais Multimedia 5e + { + "gob1", + "", + AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472), + IT_ITA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Found in french ADI 2.5 Anglais Multimedia 5e + { + "gob1", + "", + AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472), + ES_ESP, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- Demos -- + +{ + { + "gob1", + "Demo", + AD_ENTRY1("intro.stk", "972f22c6ff8144a6636423f0354ca549"), + UNK_LANG, + kPlatformAmiga, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesNone, + 0, 0, 0 +}, +{ + { + "gob1", + "Interactive Demo", + AD_ENTRY1("intro.stk", "e72bd1e3828c7dec4c8a3e58c48bdfdb"), + UNK_LANG, + kPlatformPC, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesNone, + 0, 0, 0 +}, +{ + { + "gob1", + "Interactive Demo", + AD_ENTRY1s("intro.stk", "a796096280d5efd48cf8e7dfbe426eb5", 193595), + UNK_LANG, + kPlatformPC, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesNone, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2785958 + { + "gob1", + "Interactive Demo", + AD_ENTRY1s("intro.stk", "35a098571af9a03c04e2303aec7c9249", 116582), + FR_FRA, + kPlatformPC, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesNone, + 0, 0, 0 +}, +{ + { + "gob1", + "", + AD_ENTRY1s("intro.stk", "0e022d3f2481b39e9175d37b2c6ad4c6", 2390121), + FR_FRA, + kPlatformCDi, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob1, + kFeaturesAdLib, + 0, "AVT003.TOT", 0 +}, + +#endif // GOB_DETECTION_TABLES_GOB1_H diff --git a/engines/gob/detection/tables_gob2.h b/engines/gob/detection/tables_gob2.h new file mode 100644 index 0000000000..659e6df063 --- /dev/null +++ b/engines/gob/detection/tables_gob2.h @@ -0,0 +1,641 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for Gobliins 2: The Prince Buffoon. */ + +#ifndef GOB_DETECTION_TABLES_GOB2_H +#define GOB_DETECTION_TABLES_GOB2_H + +// -- DOS VGA Floppy -- + +{ + { + "gob2", + "", + AD_ENTRY1("intro.stk", "b45b984ee8017efd6ea965b9becd4d66"), + EN_GRB, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob2", + "", + AD_ENTRY1("intro.stk", "dedb5d31d8c8050a8cf77abedcc53dae"), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by raziel_ in bug report #1891867 + { + "gob2", + "", + AD_ENTRY1s("intro.stk", "25a99827cd59751a80bed9620fb677a0", 893302), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob2", + "", + AD_ENTRY1s("intro.stk", "a13ecb4f6d8fd881ebbcc02e45cb5475", 837275), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by blackwhiteeagle in bug report #1605235 + { + "gob2", + "", + AD_ENTRY1("intro.stk", "3e4e7db0d201587dd2df4003b2993ef6"), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob2", + "", + AD_ENTRY1("intro.stk", "a13892cdf4badda85a6f6fb47603a128"), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2602017 + { + "gob2", + "", + AD_ENTRY1("intro.stk", "c47faf1d406504e6ffe63243610bb1f4"), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob2", + "", + AD_ENTRY1("intro.stk", "cd3e1df8b273636ee32e34b7064f50e8"), + RU_RUS, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by arcepi in bug report #1659884 + { + "gob2", + "", + AD_ENTRY1s("intro.stk", "5f53c56e3aa2f1e76c2e4f0caa15887f", 829232), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- DOS VGA CD -- + +{ + { + "gob2cd", + "v1.000", + AD_ENTRY1("intro.stk", "9de5fbb41cf97182109e5fecc9d90347"), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by pykman in bug report #3067489 + { + "gob2cd", + "v2.01 Polish", + AD_ENTRY1s("intro.stk", "3025f05482b646c18c2c79c615a3a1df", 5011726), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesCD, + 0, 0, 0 +}, +{ + { + "gob2cd", + "v2.01", + AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"), + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesCD, + 0, 0, 0 +}, +{ + { + "gob2cd", + "v2.01", + AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesCD, + 0, 0, 0 +}, +{ + { + "gob2cd", + "v2.01", + AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesCD, + 0, 0, 0 +}, +{ + { + "gob2cd", + "v2.01", + AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesCD, + 0, 0, 0 +}, +{ + { + "gob2cd", + "v2.01", + AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2810082 + { + "gob2cd", + "v1.02", + AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236), + HU_HUN, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2810082 + { + "gob2cd", + "v1.02", + AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2810082 + { + "gob2cd", + "v1.02", + AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2810082 + { + "gob2cd", + "v1.02", + AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2810082 + { + "gob2cd", + "v1.02", + AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesCD, + 0, 0, 0 +}, + +// -- Windows -- + +{ + { + "gob2", + "", + { + {"intro.stk", 0, "285d7340f98ebad65d465585da12910b", 837286}, + {"musmac1.mid", 0, "834e55205b710d0af5f14a6f2320dd8e", 8661}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob2", + "", + { + {"intro.stk", 0, "25a99827cd59751a80bed9620fb677a0", 893302}, + {"musmac1.mid", 0, "834e55205b710d0af5f14a6f2320dd8e", 8661}, + {0, 0, 0, 0} + }, + EN_USA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob2", + "", + { + {"intro.stk", 0, "25a99827cd59751a80bed9620fb677a0", 893302}, + {"musmac1.mid", 0, "834e55205b710d0af5f14a6f2320dd8e", 8661}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob2", + "", + { + {"intro.stk", 0, "25a99827cd59751a80bed9620fb677a0", 893302}, + {"musmac1.mid", 0, "834e55205b710d0af5f14a6f2320dd8e", 8661}, + {0, 0, 0, 0} + }, + DE_DEU, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob2", + "", + { + {"intro.stk", 0, "6efac0a14c0de4d57dde8592456c8acf", 845172}, + {"musmac1.mid", 0, "834e55205b710d0af5f14a6f2320dd8e", 8661}, + {0, 0, 0, 0} + }, + EN_USA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob2", + "", + { + {"intro.stk", 0, "6efac0a14c0de4d57dde8592456c8acf", 845172}, + {"musmac1.mid", 0, "834e55205b710d0af5f14a6f2320dd8e", 8661}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Found in french ADI 2 Francais-Maths CM1 + { + "gob2", + "", + AD_ENTRY1s("intro.stk", "24489330a1d67ff978211f574822a5a6", 883756), + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Found in french ADI 2.5 Anglais Multimedia 5e + { + "gob2", + "", + AD_ENTRY1s("intro.stk", "285d7340f98ebad65d465585da12910b", 837286), + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- Mac -- + +{ // Supplied by fac76 in bug report #1673397 + { + "gob2", + "", + { + {"intro.stk", 0, "b45b984ee8017efd6ea965b9becd4d66", 828443}, + {"musmac1.mid", 0, "7f96f491448c7a001b32df89cf8d2af2", 1658}, + {0, 0, 0, 0} + }, + UNK_LANG, + kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by koalet in bug report #2478585 + { + "gob2", + "", + { + {"intro.stk", 0, "a13ecb4f6d8fd881ebbcc02e45cb5475", 837275}, + {"musmac1.mid", 0, "7f96f491448c7a001b32df89cf8d2af2", 1658}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- Amiga -- + +{ // Supplied by fac76 in bug report #1883808 + { + "gob2", + "", + AD_ENTRY1s("intro.stk", "eebf2810122cfd17399260cd1468e994", 554014), + EN_ANY, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesNone, + 0, 0, 0 +}, +{ + { + "gob2", + "", + AD_ENTRY1("intro.stk", "d28b9e9b41f31acfa58dcd12406c7b2c"), + DE_DEU, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesNone, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2602057 + { + "gob2", + "", + AD_ENTRY1("intro.stk", "686c88f7302a80b744aae9f8413e853d"), + IT_ITA, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesNone, + 0, 0, 0 +}, +{ // Supplied by aldozx in the forums + { + "gob2", + "", + AD_ENTRY1s("intro.stk", "abc3e786cd78197773954c75815b278b", 554721), + ES_ESP, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesNone, + 0, 0, 0 +}, + +// -- Atari ST -- + +{ // Supplied by bgk in bug report #1706861 + { + "gob2", + "", + AD_ENTRY1s("intro.stk", "4b13c02d1069b86bcfec80f4e474b98b", 554680), + FR_FRA, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesNone, + 0, 0, 0 +}, + +// -- Demos -- + +{ + { + "gob2", + "Non-Interactive Demo", + AD_ENTRY1("intro.stk", "8b1c98ff2ab2e14f47a1b891e9b92217"), + UNK_LANG, + kPlatformPC, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, "usa.tot", 0 +}, +{ + { + "gob2", + "Interactive Demo", + AD_ENTRY1("intro.stk", "cf1c95b2939bd8ff58a25c756cb6125e"), + UNK_LANG, + kPlatformPC, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob2", + "Interactive Demo", + AD_ENTRY1("intro.stk", "4b278c2678ea01383fd5ca114d947eea"), + UNK_LANG, + kPlatformAmiga, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesNone, + 0, 0, 0 +}, +{ // Supplied by polluks in bug report #1895126 + { + "gob2", + "Interactive Demo", + AD_ENTRY1s("intro.stk", "9fa85aea959fa8c582085855fbd99346", 553063), + UNK_LANG, + kPlatformAmiga, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob2, + kFeaturesNone, + 0, 0, 0 +}, + +#endif // GOB_DETECTION_TABLES_GOB2_H diff --git a/engines/gob/detection/tables_gob3.h b/engines/gob/detection/tables_gob3.h new file mode 100644 index 0000000000..22ec69054b --- /dev/null +++ b/engines/gob/detection/tables_gob3.h @@ -0,0 +1,564 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for Goblins 3 / Goblins Quest 3. */ + +#ifndef GOB_DETECTION_TABLES_GOB3_H +#define GOB_DETECTION_TABLES_GOB3_H + +// -- DOS VGA Floppy -- + +{ + { + "gob3", + "", + AD_ENTRY1s("intro.stk", "32b0f57f5ae79a9ae97e8011df38af42", 157084), + EN_GRB, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob3", + "", + AD_ENTRY1s("intro.stk", "904fc32032295baa3efb3a41f17db611", 178582), + HE_ISR, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by raziel_ in bug report #1891869 + { + "gob3", + "", + AD_ENTRY1s("intro.stk", "16b014bf32dbd6ab4c5163c44f56fed1", 445104), + EN_GRB, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob3", + "", + AD_ENTRY1("intro.stk", "1e2f64ec8dfa89f42ee49936a27e66e7"), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by paul66 in bug report #1652352 + { + "gob3", + "", + AD_ENTRY1("intro.stk", "f6d225b25a180606fa5dbe6405c97380"), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob3", + "", + AD_ENTRY1("intro.stk", "e42a4f2337d6549487a80864d7826972"), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by Paranoimia on #scummvm + { + "gob3", + "", + AD_ENTRY1s("intro.stk", "fe8144daece35538085adb59c2d29613", 159402), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob3", + "", + AD_ENTRY1("intro.stk", "4e3af248a48a2321364736afab868527"), + RU_RUS, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob3", + "", + AD_ENTRY1("intro.stk", "8d28ce1591b0e9cc79bf41cad0fc4c9c"), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by SiRoCs in bug report #2098621 + { + "gob3", + "", + AD_ENTRY1s("intro.stk", "d3b72938fbbc8159198088811f9e6d19", 160382), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- Windows -- + +{ + { + "gob3", + "", + { + {"intro.stk", 0, "16b014bf32dbd6ab4c5163c44f56fed1", 445104}, + {"musmac1.mid", 0, "948c546cad3a9de5bff3fe4107c82bf1", 6404}, + {0, 0, 0, 0} + }, + DE_DEU, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob3", + "", + { + {"intro.stk", 0, "16b014bf32dbd6ab4c5163c44f56fed1", 445104}, + {"musmac1.mid", 0, "948c546cad3a9de5bff3fe4107c82bf1", 6404}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob3", + "", + { + {"intro.stk", 0, "16b014bf32dbd6ab4c5163c44f56fed1", 445104}, + {"musmac1.mid", 0, "948c546cad3a9de5bff3fe4107c82bf1", 6404}, + {0, 0, 0, 0} + }, + EN_GRB, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob3", + "", + { + {"intro.stk", 0, "edd7403e5dc2a14459d2665a4c17714d", 209534}, + {"musmac1.mid", 0, "948c546cad3a9de5bff3fe4107c82bf1", 6404}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob3", + "", + { + {"intro.stk", 0, "428e2de130cf3b303c938924539dc50d", 324420}, + {"musmac1.mid", 0, "948c546cad3a9de5bff3fe4107c82bf1", 6404}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob3", + "", + { + {"intro.stk", 0, "428e2de130cf3b303c938924539dc50d", 324420}, + {"musmac1.mid", 0, "948c546cad3a9de5bff3fe4107c82bf1", 6404}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Found in Found in french ADI 2.5 Anglais Multimedia 5e + { + "gob3", + "", + AD_ENTRY1s("intro.stk", "edd7403e5dc2a14459d2665a4c17714d", 209534), + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- Mac -- + +{ // Supplied by fac76 in bug report #1742716 + { + "gob3", + "", + { + {"intro.stk", 0, "32b0f57f5ae79a9ae97e8011df38af42", 157084}, + {"musmac1.mid", 0, "834e55205b710d0af5f14a6f2320dd8e", 8661}, + {0, 0, 0, 0} + }, + EN_GRB, + kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- Amiga -- + +{ + { + "gob3", + "", + AD_ENTRY1("intro.stk", "bd679eafde2084d8011f247e51b5a805"), + EN_GRB, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesNone, + 0, "menu.tot", 0 +}, +{ + { + "gob3", + "", + AD_ENTRY1("intro.stk", "bd679eafde2084d8011f247e51b5a805"), + DE_DEU, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesNone, + 0, "menu.tot", 0 +}, + +// -- DOS VGA CD -- + +{ + { + "gob3cd", + "v1.000", + AD_ENTRY1("intro.stk", "6f2c226c62dd7ab0ab6f850e89d3fc47"), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by pykman in bug report #3067489 + { + "gob3cd", + "v1.02 Polish", + AD_ENTRY1s("intro.stk", "978afddcac81bb95a04757b61f78471c", 619825), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by paul66 and noizert in bug reports #1652352 and #1691230 + { + "gob3cd", + "v1.02", + AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"), + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by paul66 and noizert in bug reports #1652352 and #1691230 + { + "gob3cd", + "v1.02", + AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by paul66 and noizert in bug reports #1652352 and #1691230 + { + "gob3cd", + "v1.02", + AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by paul66 and noizert in bug reports #1652352 and #1691230 + { + "gob3cd", + "v1.02", + AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by paul66 and noizert in bug reports #1652352 and #1691230 + { + "gob3cd", + "v1.02", + AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2810082 + { + "gob3cd", + "v1.02", + AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220), + HU_HUN, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2810082 + { + "gob3cd", + "v1.02", + AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2810082 + { + "gob3cd", + "v1.02", + AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2810082 + { + "gob3cd", + "v1.02", + AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesCD, + 0, 0, 0 +}, + +// -- Demos -- + +{ + { + "gob3", + "Non-interactive Demo", + AD_ENTRY1("intro.stk", "b9b898fccebe02b69c086052d5024a55"), + UNK_LANG, + kPlatformPC, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob3", + "Interactive Demo", + AD_ENTRY1("intro.stk", "7aebd94e49c2c5c518c9e7b74f25de9d"), + FR_FRA, + kPlatformPC, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob3", + "Interactive Demo 2", + AD_ENTRY1("intro.stk", "e5dcbc9f6658ebb1e8fe26bc4da0806d"), + FR_FRA, + kPlatformPC, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "gob3", + "Interactive Demo 3", + AD_ENTRY1s("intro.stk", "9e20ad7b471b01f84db526da34eaf0a2", 395561), + EN_ANY, + kPlatformPC, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGob3, + kFeaturesAdLib, + 0, 0, 0 +}, + +#endif // GOB_DETECTION_TABLES_GOB3_H diff --git a/engines/gob/detection/tables_inca2.h b/engines/gob/detection/tables_inca2.h new file mode 100644 index 0000000000..26989f7d1a --- /dev/null +++ b/engines/gob/detection/tables_inca2.h @@ -0,0 +1,249 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for Inca II: Wiracocha. */ + +#ifndef GOB_DETECTION_TABLES_INCA2_H +#define GOB_DETECTION_TABLES_INCA2_H + +// -- DOS VGA Floppy -- + +{ + { + "inca2", + "", + AD_ENTRY1s("intro.stk", "1fa92b00fe80a20f34ec34a8e2fa869e", 923072), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeInca2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "inca2", + "", + AD_ENTRY1s("intro.stk", "1fa92b00fe80a20f34ec34a8e2fa869e", 923072), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeInca2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "inca2", + "", + AD_ENTRY1s("intro.stk", "1fa92b00fe80a20f34ec34a8e2fa869e", 923072), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeInca2, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- DOS VGA CD -- + +{ + { + "inca2", + "", + AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeInca2, + kFeaturesCD, + 0, 0, 0 +}, +{ + { + "inca2", + "", + AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeInca2, + kFeaturesCD, + 0, 0, 0 +}, +{ + { + "inca2", + "", + AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeInca2, + kFeaturesCD, + 0, 0, 0 +}, +{ + { + "inca2", + "", + AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeInca2, + kFeaturesCD, + 0, 0, 0 +}, +{ + { + "inca2", + "", + AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeInca2, + kFeaturesCD, + 0, 0, 0 +}, + +// -- Windows -- + +{ + { + "inca2", + "", + AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612), + EN_USA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeInca2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "inca2", + "", + AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612), + DE_DEU, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeInca2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "inca2", + "", + AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612), + IT_ITA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeInca2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "inca2", + "", + AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612), + ES_ESP, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeInca2, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "inca2", + "", + AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612), + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeInca2, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- Demos -- + +{ + { + "inca2", + "Non-Interactive Demo", + { + {"cons.imd", 0, "f896ba0c4a1ac7f7260d342655980b49", 17804}, + {"conseil.imd", 0, "aaedd5482d5b271e233e86c5a03cf62e", 33999}, + {"int.imd", 0, "6308222fcefbcb20925f01c1aff70dee", 30871}, + {"inter.imd", 0, "39bd6d3540f3bedcc97293f352c7f3fc", 191719}, + {"machu.imd", 0, "c0bc8211d93b467bfd063b63fe61b85c", 34609}, + {"post.imd", 0, "d75cad0e3fc22cb0c8b6faf597f509b2", 1047709}, + {"posta.imd", 0, "2a5b3fe75681ddf4d21ac724db8111b4", 547250}, + {"postb.imd", 0, "24260ce4e80a4c472352b76637265d09", 868312}, + {"postc.imd", 0, "24accbcc8b83a9c2be4bd82849a2bd29", 415637}, + {"tum.imd", 0, "0993d4810ec9deb3f77c5e92095320fd", 20330}, + {"tumi.imd", 0, "bf53f229480d694de0947fe3366fbec6", 248952}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeInca2, + kFeaturesAdLib | kFeaturesBATDemo, + 0, 0, 7 +}, + +#endif // GOB_DETECTION_TABLES_INCA2_H diff --git a/engines/gob/detection/tables_lit.h b/engines/gob/detection/tables_lit.h new file mode 100644 index 0000000000..019d001f97 --- /dev/null +++ b/engines/gob/detection/tables_lit.h @@ -0,0 +1,484 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for Lost in Time. */ + +#ifndef GOB_DETECTION_TABLES_LIT_H +#define GOB_DETECTION_TABLES_LIT_H + +// -- DOS VGA Floppy (Part I and II) -- + +{ + { + "lit", + "", + AD_ENTRY1s("intro.stk", "7b7f48490dedc8a7cb999388e2fadbe3", 3930674), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "lit", + "", + AD_ENTRY1s("intro.stk", "e0767783ff662ed93665446665693aef", 4371238), + HE_ISR, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by cartman_ on #scummvm + { + "lit", + "", + AD_ENTRY1s("intro.stk", "f1f78b663893b58887add182a77df151", 3944090), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2105220 + { + "lit", + "", + AD_ENTRY1s("intro.stk", "cd322cb3c64ef2ba2f2134aa2122cfe9", 3936700), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "lit", + "", + AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesCD, + 0, 0, 0 +}, +{ + { + "lit", + "", + AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesCD, + 0, 0, 0 +}, +{ + { + "lit", + "", + AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesCD, + 0, 0, 0 +}, +{ + { + "lit", + "", + AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesCD, + 0, 0, 0 +}, +{ + { + "lit", + "", + AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesCD, + 0, 0, 0 +}, +{ + { + "lit", + "", + AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170), + EN_GRB, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by SiRoCs in bug report #2093672 + { + "lit", + "", + AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by SiRoCs in bug report #2093672 + { + "lit", + "", + AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by SiRoCs in bug report #2093672 + { + "lit", + "", + AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by SiRoCs in bug report #2093672 + { + "lit", + "", + AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by SiRoCs in bug report #2093672 + { + "lit", + "", + AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesCD, + 0, 0, 0 +}, +{ // Supplied by SiRoCs in bug report #2093672 + { + "lit", + "", + AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904), + EN_GRB, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesCD, + 0, 0, 0 +}, + +// -- Windows (Part I and II) -- + +{ + { + "lit", + "", + AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4207330), + EN_GRB, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "lit", + "", + AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4207330), + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "lit", + "", + AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4207330), + ES_ESP, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "lit", + "", + AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4219382), + DE_DEU, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "lit", + "", + AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4219382), + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Found in french ADI 2.6 Francais-Maths 4e + { + "lit", + "", + AD_ENTRY1s("intro.stk", "58ee9583a4fb837f02d9a58e5f442656", 3937120), + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- Windows (Part I only) -- +{ + { + "lit1", + "Light install", + { + {"intro.stk", 0, "93c91bc9e783d00033042ae83144d7dd", 72318}, + {"partie2.itk", 0, "78f00bd8eb9e680e6289bba0130b1b33", 664064}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "lit1", + "Full install", + { + {"intro.stk", 0, "93c91bc9e783d00033042ae83144d7dd", 72318}, + {"partie2.itk", 0, "78f00bd8eb9e680e6289bba0130b1b33", 4396644}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- Windows (Part II only) -- + +{ + { + "lit2", + "Light install", + AD_ENTRY1s("intro.stk", "17acbb212e62addbe48dc8f2282c98cb", 72318), + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "lit2", + "Full install", + { + {"intro.stk", 0, "17acbb212e62addbe48dc8f2282c98cb", 72318}, + {"partie4.itk", 0, "6ce4967e0c79d7daeabc6c1d26783d4c", 2612087}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- Mac (Part I and II) -- + +{ // Supplied by koalet in bug report #2479034 + { + "lit", + "", + { + {"intro.stk", 0, "af98bcdc70e1f1c1635577fd726fe7f1", 3937310}, + {"musmac1.mid", 0, "ae7229bb09c6abe4e60a2768b24bc890", 9398}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- Demos -- + +{ + { + "lit", + "Demo", + AD_ENTRY1("demo.stk", "c06f8cc20eb239d4c71f225ce3093edf"), + UNK_LANG, + kPlatformPC, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + "demo.stk", "demo.tot", 0 +}, +{ + { + "lit", + "Non-interactive Demo", + AD_ENTRY1("demo.stk", "2eba8abd9e3878c57307576012dd2fec"), + UNK_LANG, + kPlatformPC, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + "demo.stk", "demo.tot", 0 +}, + +// -- Pirated! Do not re-add nor un-tag! -- + +{ + { + "lit", + "", + AD_ENTRY1s("intro.stk", "3712e7527ba8ce5637d2aadf62783005", 72318), + FR_FRA, + kPlatformPC, + ADGF_PIRATED, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLostInTime, + kFeaturesAdLib, + 0, 0, 0 +}, + +#endif // GOB_DETECTION_TABLES_LIT_H diff --git a/engines/gob/detection/tables_littlered.h b/engines/gob/detection/tables_littlered.h new file mode 100644 index 0000000000..2b41b65a71 --- /dev/null +++ b/engines/gob/detection/tables_littlered.h @@ -0,0 +1,265 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for Once Upon A Time: Little Red Riding Hood. */ + +#ifndef GOB_DETECTION_TABLES_LITTLERED_H +#define GOB_DETECTION_TABLES_LITTLERED_H + +// -- DOS EGA Floppy -- + +{ + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490), + EN_GRB, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, + +// -- Windows -- + +{ + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522), + EN_GRB, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522), + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522), + DE_DEU, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522), + IT_ITA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522), + ES_ESP, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ // Found in french ADI 2 Francais-Maths CM1 + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610), + FR_FRA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ // Found in french ADI 2 Francais-Maths CM1 + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610), + ES_ESP, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ // Found in french ADI 2 Francais-Maths CM1 + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610), + EN_GRB, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ // Found in french ADI 2 Francais-Maths CM1 + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610), + IT_ITA, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ // Found in french ADI 2 Francais-Maths CM1 + { + "littlered", + "", + AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610), + DE_DEU, + kPlatformWindows, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, + +// -- Amiga -- + +{ + { + "littlered", + "", + { + {"intro.stk", 0, "0b72992f5d8b5e6e0330572a5753ea25", 256490}, + {"mod.babayaga", 0, "43484cde74e0860785f8e19f0bc776d1", 60248}, + {0, 0, 0, 0} + }, + UNK_LANG, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesNone, + 0, 0, 0 +}, + +#endif // GOB_DETECTION_TABLES_LITTLERED_H diff --git a/engines/gob/detection/tables_playtoons.h b/engines/gob/detection/tables_playtoons.h new file mode 100644 index 0000000000..4eb5945b04 --- /dev/null +++ b/engines/gob/detection/tables_playtoons.h @@ -0,0 +1,517 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for the Playtoons series. */ + +#ifndef GOB_DETECTION_TABLES_PLAYTOONS_H +#define GOB_DETECTION_TABLES_PLAYTOONS_H + +// -- Playtoons 1: Uncle Archibald -- + +{ + { + "playtoons1", + "", + { + {"playtoon.stk", 0, "8c98e9a11be9bb203a55e8c6e68e519b", 25574338}, + {"archi.stk", 0, "8d44b2a0d4e3139471213f9f0ed21e81", 5524674}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, +{ + { + "playtoons1", + "Pack mes histoires anim\xE9""es", + { + {"playtoon.stk", 0, "55f0293202963854192e39474e214f5f", 30448474}, + {"archi.stk", 0, "8d44b2a0d4e3139471213f9f0ed21e81", 5524674}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, +{ + { + "playtoons1", + "", + { + {"playtoon.stk", 0, "c5ca2a288cdaefca9556cd9ae4b579cf", 25158926}, + {"archi.stk", 0, "8d44b2a0d4e3139471213f9f0ed21e81", 5524674}, + {0, 0, 0, 0} + }, + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, +{ // Supplied by scoriae in the forums + { + "playtoons1", + "", + { + {"playtoon.stk", 0, "9e513e993a5b0e2496add3f50c08764b", 30448506}, + {"archi.stk", 0, "00d8274519dfcf8a0d8ae3099daea0f8", 5532135}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, +{ + { + "playtoons1", + "Non-Interactive Demo", + { + {"play123.scn", 0, "4689a31f543915e488c3bc46ea358add", 258}, + {"archi.vmd", 0, "a410fcc8116bc173f038100f5857191c", 5617210}, + {"chato.vmd", 0, "5a10e39cb66c396f2f9d8fb35e9ac016", 5445937}, + {"genedeb.vmd", 0, "3bb4a45585f88f4d839efdda6a1b582b", 1244228}, + {"generik.vmd", 0, "b46bdd64b063e86927fb2826500ad512", 603242}, + {"genespi.vmd", 0, "b7611916f32a370ae9832962fc17ef72", 758719}, + {"spirou.vmd", 0, "8513dbf7ac51c057b21d371d6b217b47", 2550788}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480 | kFeaturesSCNDemo, + 0, 0, 3 +}, +{ + { + "playtoons1", + "Non-Interactive Demo", + { + {"e.scn", 0, "8a0db733c3f77be86e74e8242e5caa61", 124}, + {"demarchg.vmd", 0, "d14a95da7d8792faf5503f649ffcbc12", 5619415}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480 | kFeaturesSCNDemo, + 0, 0, 4 +}, +{ + { + "playtoons1", + "Non-Interactive Demo", + { + {"i.scn", 0, "8b3294474d39970463663edd22341730", 285}, + {"demarita.vmd", 0, "84c8672b91c7312462603446e224bfec", 5742533}, + {"dembouit.vmd", 0, "7a5fdf0a4dbdfe72e31dd489ea0f8aa2", 3536786}, + {"demo5.vmd", 0, "2abb7b6a26406c984f389f0b24b5e28e", 13290970}, + {"demoita.vmd", 0, "b4c0622d14c8749965cd0f5dfca4cf4b", 1183566}, + {"wooddem3.vmd", 0, "a1700596172c2d4e264760030c3a3d47", 8994250}, + {0, 0, 0, 0} + }, + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480 | kFeaturesSCNDemo, + 0, 0, 5 +}, +{ + { + "playtoons1", + "Non-Interactive Demo", + { + {"s.scn", 0, "1f527010626b5490761f16ba7a6f639a", 251}, + {"demaresp.vmd", 0, "3f860f944056842b35a5fd05416f208e", 5720619}, + {"demboues.vmd", 0, "3a0caa10c98ef92a15942f8274075b43", 3535838}, + {"demo5.vmd", 0, "2abb7b6a26406c984f389f0b24b5e28e", 13290970}, + {"wooddem3.vmd", 0, "a1700596172c2d4e264760030c3a3d47", 8994250}, + {0, 0, 0, 0} + }, + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480 | kFeaturesSCNDemo, + 0, 0, 6 +}, + +// -- Playtoons 2: The Case of the Counterfeit Collaborator (Spirou) -- + +{ + { + "playtoons2", + "", + { + {"playtoon.stk", 0, "4772c96be88a57f0561519e4a1526c62", 24406262}, + {"spirou.stk", 0, "5d9c7644d0c47840169b4d016765cc1a", 9816201}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, +{ + { + "playtoons2", + "", + { + {"playtoon.stk", 0, "55a85036dd93cce93532d8f743d90074", 17467154}, + {"spirou.stk", 0, "e3e1b6148dd72fafc3637f1a8e5764f5", 9812043}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, +{ + { + "playtoons2", + "", + { + {"playtoon.stk", 0, "c5ca2a288cdaefca9556cd9ae4b579cf", 25158926}, + {"spirou.stk", 0, "91080dc148de1bbd6a97321c1a1facf3", 9817086}, + {0, 0, 0, 0} + }, + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, +{ // Supplied by Hkz + { + "playtoons2", + "", + { + {"playtoon.stk", 0, "2572685400852d12759a2fbf09ec88eb", 9698780}, + {"spirou.stk", 0, "d3cfeff920b6343a2ece55088f530dba", 7076608}, + {0, 0, 0, 0} + }, + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, +{ // Supplied by scoriae in the forums + { + "playtoons2", + "", + { + {"playtoon.stk", 0, "9e513e993a5b0e2496add3f50c08764b", 30448506}, + {"spirou.stk", 0, "993737f112ca6a9b33c814273280d832", 9825760}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, + +// -- Playtoons 3: The Secret of the Castle -- + +{ + { + "playtoons3", + "", + { + {"playtoon.stk", 0, "8c98e9a11be9bb203a55e8c6e68e519b", 25574338}, + {"chato.stk", 0, "4fa4ed96a427c344e9f916f9f236598d", 6033793}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, +{ + { + "playtoons3", + "", + { + {"playtoon.stk", 0, "9e513e993a5b0e2496add3f50c08764b", 30448506}, + {"chato.stk", 0, "8fc8d0da5b3e758908d1d7298d497d0b", 6041026}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, +{ + { + "playtoons3", + "Pack mes histoires anim\xE9""es", + { + {"playtoon.stk", 0, "55f0293202963854192e39474e214f5f", 30448474}, + {"chato.stk", 0, "4fa4ed96a427c344e9f916f9f236598d", 6033793}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, +{ + { + "playtoons3", + "", + { + {"playtoon.stk", 0, "c5ca2a288cdaefca9556cd9ae4b579cf", 25158926}, + {"chato.stk", 0, "3c6cb3ac8a5a7cf681a19971a92a748d", 6033791}, + {0, 0, 0, 0} + }, + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, +{ // Supplied by Hkz on #scummvm + { + "playtoons3", + "", + { + {"playtoon.stk", 0, "4772c96be88a57f0561519e4a1526c62", 24406262}, + {"chato.stk", 0, "bdef407387112bfcee90e664865ac3af", 6033867}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, + +// -- Playtoons 4: The Mandarin Prince -- + +{ + { + "playtoons4", + "", + { + {"playtoon.stk", 0, "b7f5afa2dc1b0f75970b7c07d175db1b", 24340406}, + {"manda.stk", 0, "92529e0b927191d9898a34c2892e9a3a", 6485072}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, +{ //Supplied by goodoldgeorg in bug report #2820006 + { + "playtoons4", + "", + { + {"playtoon.stk", 0, "9e513e993a5b0e2496add3f50c08764b", 30448506}, + {"manda.stk", 0, "69a79c9f61b2618e482726f2ff68078d", 6499208}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, + +// -- Playtoons 5: The Stone of Wakan -- + +{ + { + "playtoons5", + "", + { + {"playtoon.stk", 0, "55f0293202963854192e39474e214f5f", 30448474}, + {"wakan.stk", 0, "f493bf82851bc5ba74d57de6b7e88df8", 5520153}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, + +// -- Playtoons Construction Kit 1: Monsters -- + +{ + { + "playtnck1", + "", + { + {"playtoon.stk", 0, "5f9aae29265f1f105ad8ec195dff81de", 68382024}, + {"dan.itk", 0, "906d67b3e438d5e95ec7ea9e781a94f3", 3000320}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, + +// -- Playtoons Construction Kit 2: Knights -- + +{ + { + "playtnck2", + "", + { + {"playtoon.stk", 0, "5f9aae29265f1f105ad8ec195dff81de", 68382024}, + {"dan.itk", 0, "74eeb075bd2cb47b243349730264af01", 3213312}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, + +// -- Playtoons Construction Kit 3: Far West -- + +{ + { + "playtnck3", + "", + { + {"playtoon.stk", 0, "5f9aae29265f1f105ad8ec195dff81de", 68382024}, + {"dan.itk", 0, "9a8f62809eca5a52f429b5b6a8e70f8f", 2861056}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypePlaytoons, + kFeatures640x480, + "intro2.stk", 0, 0 +}, + +// -- Bambou le sauveur de la jungle -- + +{ + { + "bambou", + "", + { + {"intro.stk", 0, "2f8db6963ff8d72a8331627ebda918f4", 3613238}, + {"bambou.itk", 0, "0875914d31126d0749313428f10c7768", 114440192}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeBambou, + kFeatures640x480, + "intro.stk", "intro.tot", 0 +}, + +#endif // GOB_DETECTION_TABLES_PLAYTOONS_H diff --git a/engines/gob/detection/tables_urban.h b/engines/gob/detection/tables_urban.h new file mode 100644 index 0000000000..d24f6a5011 --- /dev/null +++ b/engines/gob/detection/tables_urban.h @@ -0,0 +1,151 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for Urban Runner. */ + +#ifndef GOB_DETECTION_TABLES_URBAN_H +#define GOB_DETECTION_TABLES_URBAN_H + +// -- Windows -- + +{ + { + "urban", + "", + AD_ENTRY1s("intro.stk", "3ab2c542bd9216ae5d02cc6f45701ae1", 1252436), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeUrban, + kFeatures640x480 | kFeaturesTrueColor, + 0, 0, 0 +}, +{ // Supplied by Collector9 in bug report #3228040 + { + "urban", + "", + AD_ENTRY1s("intro.stk", "6ce3d878178932053267237ec4843ce1", 1252518), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeUrban, + kFeatures640x480 | kFeaturesTrueColor, + 0, 0, 0 +}, +{ // Supplied by gamin in the forums + { + "urban", + "", + AD_ENTRY1s("intro.stk", "b991ed1d31c793e560edefdb349882ef", 1276408), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeUrban, + kFeatures640x480 | kFeaturesTrueColor, + 0, 0, 0 +}, +{ // Supplied by jvprat on #scummvm + { + "urban", + "", + AD_ENTRY1s("intro.stk", "4ec3c0864e2b54c5b4ccf9f6ad96528d", 1253328), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeUrban, + kFeatures640x480 | kFeaturesTrueColor, + 0, 0, 0 +}, +{ // Supplied by Alex on the gobsmacked blog + { + "urban", + "", + AD_ENTRY1s("intro.stk", "9ea647085a16dd0fb9ecd84cd8778ec9", 1253436), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeUrban, + kFeatures640x480 | kFeaturesTrueColor, + 0, 0, 0 +}, +{ // Supplied by alex86r in bug report #3297602 + { + "urban", + "", + AD_ENTRY1s("intro.stk", "4e4a3c017fe5475353bf94c455fe3efd", 1253448), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeUrban, + kFeatures640x480 | kFeaturesTrueColor, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2770340 + { + "urban", + "", + AD_ENTRY1s("intro.stk", "4bd31979ea3d77a58a358c09000a85ed", 1253018), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeUrban, + kFeatures640x480 | kFeaturesTrueColor, + 0, 0, 0 +}, + +// -- Demos -- + +{ + { + "urban", + "Non-Interactive Demo", + { + {"wdemo.s24", 0, "14ac9bd51db7a075d69ddb144904b271", 87}, + {"demo.vmd", 0, "65d04715d871c292518b56dd160b0161", 9091237}, + {"urband.vmd", 0, "60343891868c91854dd5c82766c70ecc", 922461}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO1(GUIO_NOASPECT) + }, + kGameTypeUrban, + kFeatures640x480 | kFeaturesTrueColor | kFeaturesSCNDemo, + 0, 0, 2 +}, + +#endif // GOB_DETECTION_TABLES_URBAN_H diff --git a/engines/gob/detection/tables_ween.h b/engines/gob/detection/tables_ween.h new file mode 100644 index 0000000000..a02b931b85 --- /dev/null +++ b/engines/gob/detection/tables_ween.h @@ -0,0 +1,349 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for Ween: The Prophecy. */ + +#ifndef GOB_DETECTION_TABLES_WEEN_H +#define GOB_DETECTION_TABLES_WEEN_H + +// -- DOS VGA Floppy -- + +{ + { + "ween", + "", + AD_ENTRY1("intro.stk", "2bb8878a8042244dd2b96ff682381baa"), + EN_GRB, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "ween", + "", + AD_ENTRY1s("intro.stk", "de92e5c6a8c163007ffceebef6e67f7d", 7117568), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by cybot_tmin in bug report #1667743 + { + "ween", + "", + AD_ENTRY1s("intro.stk", "6d60f9205ecfbd8735da2ee7823a70dc", 7014426), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "ween", + "", + AD_ENTRY1("intro.stk", "4b10525a3782aa7ecd9d833b5c1d308b"), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by cartman_ on #scummvm + { + "ween", + "", + AD_ENTRY1("intro.stk", "63170e71f04faba88673b3f510f9c4c8"), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by glorfindel in bugreport #1722142 + { + "ween", + "", + AD_ENTRY1s("intro.stk", "8b57cd510da8a3bbd99e3a0297a8ebd1", 7018771), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- Amiga -- + +{ // Supplied by vampir_raziel in bug report #1658373 + { + "ween", + "", + { + {"intro.stk", 0, "bfd9d02faf3d8d60a2cf744f95eb48dd", 456570}, + {"ween.ins", 0, "d2cb24292c9ddafcad07e23382027218", 87800}, + {0, 0, 0, 0} + }, + EN_GRB, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesNone, + 0, 0, 0 +}, +{ // Supplied by vampir_raziel in bug report #1658373 + { + "ween", + "", + AD_ENTRY1s("intro.stk", "257fe669705ac4971efdfd5656eef16a", 457719), + FR_FRA, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesNone, + 0, 0, 0 +}, +{ // Supplied by vampir_raziel in bug report #1658373 + { + "ween", + "", + AD_ENTRY1s("intro.stk", "dffd1ab98fe76150d6933329ca6f4cc4", 459458), + FR_FRA, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesNone, + 0, 0, 0 +}, +{ // Supplied by vampir_raziel in bug report #1658373 + { + "ween", + "", + AD_ENTRY1s("intro.stk", "af83debf2cbea21faa591c7b4608fe92", 458192), + DE_DEU, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesNone, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2563539 + { + "ween", + "", + { + {"intro.stk", 0, "dffd1ab98fe76150d6933329ca6f4cc4", 459458}, + {"ween.ins", 0, "d2cb24292c9ddafcad07e23382027218", 87800}, + {0, 0, 0, 0} + }, + IT_ITA, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesNone, + 0, 0, 0 +}, + +// -- Atari ST -- + +{ // Supplied by pwigren in bug report #1764174 + { + "ween", + "", + { + {"intro.stk", 0, "bfd9d02faf3d8d60a2cf744f95eb48dd", 456570}, + {"music__5.snd", 0, "7d1819b9981ecddd53d3aacbc75f1cc8", 13446}, + {0, 0, 0, 0} + }, + EN_GRB, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesNone, + 0, 0, 0 +}, +{ + { + "ween", + "", + AD_ENTRY1("intro.stk", "e6d13fb3b858cb4f78a8780d184d5b2c"), + FR_FRA, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesNone, + 0, 0, 0 +}, + +// -- DOS VGA Floppy -- + +{ + { + "ween", + "", + AD_ENTRY1("intro.stk", "2bb8878a8042244dd2b96ff682381baa"), + EN_GRB, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "ween", + "", + AD_ENTRY1s("intro.stk", "de92e5c6a8c163007ffceebef6e67f7d", 7117568), + EN_USA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by cybot_tmin in bug report #1667743 + { + "ween", + "", + AD_ENTRY1s("intro.stk", "6d60f9205ecfbd8735da2ee7823a70dc", 7014426), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesAdLib, + 0, 0, 0 +}, +{ + { + "ween", + "", + AD_ENTRY1("intro.stk", "4b10525a3782aa7ecd9d833b5c1d308b"), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by cartman_ on #scummvm + { + "ween", + "", + AD_ENTRY1("intro.stk", "63170e71f04faba88673b3f510f9c4c8"), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesAdLib, + 0, 0, 0 +}, +{ // Supplied by glorfindel in bugreport #1722142 + { + "ween", + "", + AD_ENTRY1s("intro.stk", "8b57cd510da8a3bbd99e3a0297a8ebd1", 7018771), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesAdLib, + 0, 0, 0 +}, + +// -- Demos -- + +{ + { + "ween", + "Demo", + AD_ENTRY1("intro.stk", "2e9c2898f6bf206ede801e3b2e7ee428"), + UNK_LANG, + kPlatformPC, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesAdLib, + 0, "show.tot", 0 +}, +{ + { + "ween", + "Demo", + AD_ENTRY1("intro.stk", "15fb91a1b9b09684b28ac75edf66e504"), + EN_USA, + kPlatformPC, + ADGF_DEMO, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeWeen, + kFeaturesAdLib, + 0, "show.tot", 0 +}, + +#endif // GOB_DETECTION_TABLES_WEEN_H diff --git a/engines/gob/detection/tables_woodruff.h b/engines/gob/detection/tables_woodruff.h new file mode 100644 index 0000000000..e369539984 --- /dev/null +++ b/engines/gob/detection/tables_woodruff.h @@ -0,0 +1,402 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for (The Bizarre Adventures of) Woodruff and the Schnibble (of Azimuth). */ + +#ifndef GOB_DETECTION_TABLES_WOODRUFF_H +#define GOB_DETECTION_TABLES_WOODRUFF_H + +// -- Windows CD -- + +{ + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390), + EN_GRB, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108), + EN_GRB, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "5f5f4e0a72c33391e67a47674b120cc6", 20296422), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ // Supplied by jvprat on #scummvm + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ // Supplied by jvprat on #scummvm + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452), + EN_GRB, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ // Supplied by jvprat on #scummvm + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ // Supplied by jvprat on #scummvm + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ // Supplied by jvprat on #scummvm + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ // Supplied by Hkz on #scummvm + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "f4c344023b073782d2fddd9d8b515318", 7069736), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ // Supplied by Hkz on #scummvm + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "f4c344023b073782d2fddd9d8b515318", 7069736), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ // Supplied by Hkz on #scummvm + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "f4c344023b073782d2fddd9d8b515318", 7069736), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ // Supplied by DjDiabolik in bug report #1971294 + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), + EN_GRB, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ // Supplied by DjDiabolik in bug report #1971294 + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ // Supplied by DjDiabolik in bug report #1971294 + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ // Supplied by DjDiabolik in bug report #1971294 + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ // Supplied by DjDiabolik in bug report #1971294 + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, +{ // Supplied by goodoldgeorg in bug report #2098838 + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "08a96bf061af1fa4f75c6a7cc56b60a4", 20734979), + PL_POL, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480, + 0, 0, 0 +}, + +// -- Demos -- + +{ + { + "woodruff", + "Non-Interactive Demo", + { + {"demo.scn", 0, "16bb85fc5f8e519147b60475dbf33962", 89}, + {"wooddem3.vmd", 0, "a1700596172c2d4e264760030c3a3d47", 8994250}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) + }, + kGameTypeWoodruff, + kFeatures640x480 | kFeaturesSCNDemo, + 0, 0, 1 +}, + +#endif // GOB_DETECTION_TABLES_WOODRUFF_H diff --git a/engines/gob/detection_tables.h b/engines/gob/detection_tables.h deleted file mode 100644 index f3dc375fc3..0000000000 --- a/engines/gob/detection_tables.h +++ /dev/null @@ -1,5276 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -namespace Gob { - -static const GOBGameDescription gameDescriptions[] = { - { // Supplied by Florian Zeitz on scummvm-devel - { - "gob1", - "EGA", - AD_ENTRY1("intro.stk", "c65e9cc8ba23a38456242e1f2b1caad4"), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesEGA | kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob1", - "EGA", - AD_ENTRY1("intro.stk", "f9233283a0be2464248d83e14b95f09c"), - RU_RUS, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesEGA | kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by Theruler76 in bug report #1201233 - { - "gob1", - "VGA", - AD_ENTRY1("intro.stk", "26a9118c0770fa5ac93a9626761600b2"), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by raziel_ in bug report #1891864 - { - "gob1", - "VGA", - AD_ENTRY1s("intro.stk", "e157cb59c6d330ca70d12ab0ef1dd12b", 288972), - EN_GRB, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by raina in the forums - { - "gob1", - "", - AD_ENTRY1s("intro.stk", "6d837c6380d8f4d984c9f6cc0026df4f", 192712), - EN_ANY, - kPlatformMacintosh, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by paul66 in bug report #1652352 - { - "gob1", - "", - AD_ENTRY1("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267"), - EN_ANY, - kPlatformMacintosh, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by paul66 in bug report #1652352 - { - "gob1", - "", - AD_ENTRY1("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267"), - DE_DEU, - kPlatformMacintosh, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by paul66 in bug report #1652352 - { - "gob1", - "", - AD_ENTRY1("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267"), - FR_FRA, - kPlatformMacintosh, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by paul66 in bug report #1652352 - { - "gob1", - "", - AD_ENTRY1("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267"), - IT_ITA, - kPlatformMacintosh, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by paul66 in bug report #1652352 - { - "gob1", - "", - AD_ENTRY1("intro.stk", "00a42a7d2d22e6b6ab1b8c673c4ed267"), - ES_ESP, - kPlatformMacintosh, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by Hkz on #scummvm - { - "gob1", - "", - { - {"intro.stk", 0, "f5f028ee39c456fa51fa63b606583918", 313472}, - {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by Hkz on #scummvm - { - "gob1", - "", - { - {"intro.stk", 0, "f5f028ee39c456fa51fa63b606583918", 313472}, - {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, - {0, 0, 0, 0} - }, - IT_ITA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by Hkz on #scummvm - { - "gob1", - "", - { - {"intro.stk", 0, "f5f028ee39c456fa51fa63b606583918", 313472}, - {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, - {0, 0, 0, 0} - }, - EN_GRB, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by Hkz on #scummvm - { - "gob1", - "", - { - {"intro.stk", 0, "f5f028ee39c456fa51fa63b606583918", 313472}, - {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, - {0, 0, 0, 0} - }, - DE_DEU, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by Hkz on #scummvm - { - "gob1", - "", - { - {"intro.stk", 0, "f5f028ee39c456fa51fa63b606583918", 313472}, - {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, - {0, 0, 0, 0} - }, - ES_ESP, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob1", - "", - { - {"intro.stk", 0, "e157cb59c6d330ca70d12ab0ef1dd12b", 288972}, - {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, - {0, 0, 0, 0} - }, - EN_GRB, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob1", - "", - { - {"intro.stk", 0, "e157cb59c6d330ca70d12ab0ef1dd12b", 288972}, - {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob1", - "", - { - {"intro.stk", 0, "e157cb59c6d330ca70d12ab0ef1dd12b", 288972}, - {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, - {0, 0, 0, 0} - }, - ES_ESP, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob1", - "", - { - {"intro.stk", 0, "e157cb59c6d330ca70d12ab0ef1dd12b", 288972}, - {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, - {0, 0, 0, 0} - }, - IT_ITA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob1", - "", - { - {"intro.stk", 0, "e157cb59c6d330ca70d12ab0ef1dd12b", 288972}, - {"musmac1.mid", 0, "4f66903b33df8a20edd4c748809c0b56", 8161}, - {0, 0, 0, 0} - }, - DE_DEU, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Found in Found in french ADI 2.5 Anglais Multimedia 5e - { - "gob1", - "", - AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472), - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Found in Found in french ADI 2.5 Anglais Multimedia 5e - { - "gob1", - "", - AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472), - EN_GRB, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Found in Found in french ADI 2.5 Anglais Multimedia 5e - { - "gob1", - "", - AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472), - DE_DEU, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Found in Found in french ADI 2.5 Anglais Multimedia 5e - { - "gob1", - "", - AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472), - IT_ITA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Found in Found in french ADI 2.5 Anglais Multimedia 5e - { - "gob1", - "", - AD_ENTRY1s("intro.stk", "f5f028ee39c456fa51fa63b606583918", 313472), - ES_ESP, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Provided by pykman in the forums. - { - "gob1cd", - "Polish", - AD_ENTRY1s("intro.stk", "97d2443948b2e367cf567fe7e101f5f2", 4049267), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { // CD 1.000 version. - { - "gob1cd", - "v1.000", - AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { // CD 1.000 version. - { - "gob1cd", - "v1.000", - AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { // CD 1.000 version. - { - "gob1cd", - "v1.000", - AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { // CD 1.000 version. - { - "gob1cd", - "v1.000", - AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { // CD 1.000 version. - { - "gob1cd", - "v1.000", - AD_ENTRY1("intro.stk", "2fbf4b5b82bbaee87eb45d4404c28998"), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { // CD 1.02 version. Multilingual - { - "gob1cd", - "v1.02", - AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { // CD 1.02 version. Multilingual - { - "gob1cd", - "v1.02", - AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { // CD 1.02 version. Multilingual - { - "gob1cd", - "v1.02", - AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { // CD 1.02 version. Multilingual - { - "gob1cd", - "v1.02", - AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { // CD 1.02 version. Multilingual - { - "gob1cd", - "v1.02", - AD_ENTRY1("intro.stk", "8bd873137b6831c896ee8ad217a6a398"), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2810082 - { - "gob1cd", - "v1.02", - AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248), - HU_HUN, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2810082 - { - "gob1cd", - "v1.02", - AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2810082 - { - "gob1cd", - "v1.02", - AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2810082 - { - "gob1cd", - "v1.02", - AD_ENTRY1s("intro.stk", "40d4a53818f4fce3f5997d02c3fafe73", 4049248), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "gob1", - "Demo", - AD_ENTRY1("intro.stk", "972f22c6ff8144a6636423f0354ca549"), - UNK_LANG, - kPlatformAmiga, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "gob1", - "Interactive Demo", - AD_ENTRY1("intro.stk", "e72bd1e3828c7dec4c8a3e58c48bdfdb"), - UNK_LANG, - kPlatformPC, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "gob1", - "Interactive Demo", - AD_ENTRY1s("intro.stk", "a796096280d5efd48cf8e7dfbe426eb5", 193595), - UNK_LANG, - kPlatformPC, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2785958 - { - "gob1", - "Interactive Demo", - AD_ENTRY1s("intro.stk", "35a098571af9a03c04e2303aec7c9249", 116582), - FR_FRA, - kPlatformPC, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "gob1", - "", - AD_ENTRY1s("intro.stk", "0e022d3f2481b39e9175d37b2c6ad4c6", 2390121), - FR_FRA, - kPlatformCDi, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesAdLib, - 0, "AVT003.TOT", 0 - }, - { // Supplied by fac76 in bug report #1883808 - { - "gob2", - "", - AD_ENTRY1s("intro.stk", "eebf2810122cfd17399260cd1468e994", 554014), - EN_ANY, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "gob2", - "", - AD_ENTRY1("intro.stk", "d28b9e9b41f31acfa58dcd12406c7b2c"), - DE_DEU, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2602057 - { - "gob2", - "", - AD_ENTRY1("intro.stk", "686c88f7302a80b744aae9f8413e853d"), - IT_ITA, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by aldozx in the forums - { - "gob2", - "", - AD_ENTRY1s("intro.stk", "abc3e786cd78197773954c75815b278b", 554721), - ES_ESP, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by bgk in bug report #1706861 - { - "gob2", - "", - AD_ENTRY1s("intro.stk", "4b13c02d1069b86bcfec80f4e474b98b", 554680), - FR_FRA, - kPlatformAtariST, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by fac76 in bug report #1673397 - { - "gob2", - "", - { - {"intro.stk", 0, "b45b984ee8017efd6ea965b9becd4d66", 828443}, - {"musmac1.mid", 0, "7f96f491448c7a001b32df89cf8d2af2", 1658}, - {0, 0, 0, 0} - }, - UNK_LANG, - kPlatformMacintosh, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by koalet in bug report #2478585 - { - "gob2", - "", - { - {"intro.stk", 0, "a13ecb4f6d8fd881ebbcc02e45cb5475", 837275}, - {"musmac1.mid", 0, "7f96f491448c7a001b32df89cf8d2af2", 1658}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformMacintosh, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob2", - "", - AD_ENTRY1("intro.stk", "b45b984ee8017efd6ea965b9becd4d66"), - EN_GRB, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob2", - "", - AD_ENTRY1("intro.stk", "dedb5d31d8c8050a8cf77abedcc53dae"), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by raziel_ in bug report #1891867 - { - "gob2", - "", - AD_ENTRY1s("intro.stk", "25a99827cd59751a80bed9620fb677a0", 893302), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob2", - "", - AD_ENTRY1s("intro.stk", "a13ecb4f6d8fd881ebbcc02e45cb5475", 837275), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by blackwhiteeagle in bug report #1605235 - { - "gob2", - "", - AD_ENTRY1("intro.stk", "3e4e7db0d201587dd2df4003b2993ef6"), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob2", - "", - AD_ENTRY1("intro.stk", "a13892cdf4badda85a6f6fb47603a128"), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2602017 - { - "gob2", - "", - AD_ENTRY1("intro.stk", "c47faf1d406504e6ffe63243610bb1f4"), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob2", - "", - AD_ENTRY1("intro.stk", "cd3e1df8b273636ee32e34b7064f50e8"), - RU_RUS, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by arcepi in bug report #1659884 - { - "gob2", - "", - AD_ENTRY1s("intro.stk", "5f53c56e3aa2f1e76c2e4f0caa15887f", 829232), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob2", - "", - { - {"intro.stk", 0, "285d7340f98ebad65d465585da12910b", 837286}, - {"musmac1.mid", 0, "834e55205b710d0af5f14a6f2320dd8e", 8661}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob2", - "", - { - {"intro.stk", 0, "25a99827cd59751a80bed9620fb677a0", 893302}, - {"musmac1.mid", 0, "834e55205b710d0af5f14a6f2320dd8e", 8661}, - {0, 0, 0, 0} - }, - EN_USA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob2", - "", - { - {"intro.stk", 0, "25a99827cd59751a80bed9620fb677a0", 893302}, - {"musmac1.mid", 0, "834e55205b710d0af5f14a6f2320dd8e", 8661}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob2", - "", - { - {"intro.stk", 0, "25a99827cd59751a80bed9620fb677a0", 893302}, - {"musmac1.mid", 0, "834e55205b710d0af5f14a6f2320dd8e", 8661}, - {0, 0, 0, 0} - }, - DE_DEU, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob2", - "", - { - {"intro.stk", 0, "6efac0a14c0de4d57dde8592456c8acf", 845172}, - {"musmac1.mid", 0, "834e55205b710d0af5f14a6f2320dd8e", 8661}, - {0, 0, 0, 0} - }, - EN_USA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob2", - "", - { - {"intro.stk", 0, "6efac0a14c0de4d57dde8592456c8acf", 845172}, - {"musmac1.mid", 0, "834e55205b710d0af5f14a6f2320dd8e", 8661}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Found in french ADI 2 Francais-Maths CM1 - { - "gob2", - "", - AD_ENTRY1s("intro.stk", "24489330a1d67ff978211f574822a5a6", 883756), - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Found in french ADI 2.5 Anglais Multimedia 5e - { - "gob2", - "", - AD_ENTRY1s("intro.stk", "285d7340f98ebad65d465585da12910b", 837286), - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob2cd", - "v1.000", - AD_ENTRY1("intro.stk", "9de5fbb41cf97182109e5fecc9d90347"), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by pykman in bug report #3067489 - { - "gob2cd", - "v2.01 Polish", - AD_ENTRY1s("intro.stk", "3025f05482b646c18c2c79c615a3a1df", 5011726), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "gob2cd", - "v2.01", - AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"), - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "gob2cd", - "v2.01", - AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "gob2cd", - "v2.01", - AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "gob2cd", - "v2.01", - AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "gob2cd", - "v2.01", - AD_ENTRY1("intro.stk", "24a6b32757752ccb1917ce92fd7c2a04"), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2810082 - { - "gob2cd", - "v1.02", - AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236), - HU_HUN, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2810082 - { - "gob2cd", - "v1.02", - AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2810082 - { - "gob2cd", - "v1.02", - AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2810082 - { - "gob2cd", - "v1.02", - AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2810082 - { - "gob2cd", - "v1.02", - AD_ENTRY1s("intro.stk", "5ba85a4769a1ab03a283dd694588d526", 5006236), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "gob2", - "Non-Interactive Demo", - AD_ENTRY1("intro.stk", "8b1c98ff2ab2e14f47a1b891e9b92217"), - UNK_LANG, - kPlatformPC, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, "usa.tot", 0 - }, - { - { - "gob2", - "Interactive Demo", - AD_ENTRY1("intro.stk", "cf1c95b2939bd8ff58a25c756cb6125e"), - UNK_LANG, - kPlatformPC, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob2", - "Interactive Demo", - AD_ENTRY1("intro.stk", "4b278c2678ea01383fd5ca114d947eea"), - UNK_LANG, - kPlatformAmiga, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by polluks in bug report #1895126 - { - "gob2", - "Interactive Demo", - AD_ENTRY1s("intro.stk", "9fa85aea959fa8c582085855fbd99346", 553063), - UNK_LANG, - kPlatformAmiga, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by vampir_raziel in bug report #1658373 - { - "ween", - "", - { - {"intro.stk", 0, "bfd9d02faf3d8d60a2cf744f95eb48dd", 456570}, - {"ween.ins", 0, "d2cb24292c9ddafcad07e23382027218", 87800}, - {0, 0, 0, 0} - }, - EN_GRB, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by vampir_raziel in bug report #1658373 - { - "ween", - "", - AD_ENTRY1s("intro.stk", "257fe669705ac4971efdfd5656eef16a", 457719), - FR_FRA, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by vampir_raziel in bug report #1658373 - { - "ween", - "", - AD_ENTRY1s("intro.stk", "dffd1ab98fe76150d6933329ca6f4cc4", 459458), - FR_FRA, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by vampir_raziel in bug report #1658373 - { - "ween", - "", - AD_ENTRY1s("intro.stk", "af83debf2cbea21faa591c7b4608fe92", 458192), - DE_DEU, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2563539 - { - "ween", - "", - { - {"intro.stk", 0, "dffd1ab98fe76150d6933329ca6f4cc4", 459458}, - {"ween.ins", 0, "d2cb24292c9ddafcad07e23382027218", 87800}, - {0, 0, 0, 0} - }, - IT_ITA, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by pwigren in bug report #1764174 - { - "ween", - "", - { - {"intro.stk", 0, "bfd9d02faf3d8d60a2cf744f95eb48dd", 456570}, - {"music__5.snd", 0, "7d1819b9981ecddd53d3aacbc75f1cc8", 13446}, - {0, 0, 0, 0} - }, - EN_GRB, - kPlatformAtariST, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "ween", - "", - AD_ENTRY1("intro.stk", "e6d13fb3b858cb4f78a8780d184d5b2c"), - FR_FRA, - kPlatformAtariST, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "ween", - "", - AD_ENTRY1("intro.stk", "2bb8878a8042244dd2b96ff682381baa"), - EN_GRB, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "ween", - "", - AD_ENTRY1s("intro.stk", "de92e5c6a8c163007ffceebef6e67f7d", 7117568), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by cybot_tmin in bug report #1667743 - { - "ween", - "", - AD_ENTRY1s("intro.stk", "6d60f9205ecfbd8735da2ee7823a70dc", 7014426), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "ween", - "", - AD_ENTRY1("intro.stk", "4b10525a3782aa7ecd9d833b5c1d308b"), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by cartman_ on #scummvm - { - "ween", - "", - AD_ENTRY1("intro.stk", "63170e71f04faba88673b3f510f9c4c8"), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by glorfindel in bugreport #1722142 - { - "ween", - "", - AD_ENTRY1s("intro.stk", "8b57cd510da8a3bbd99e3a0297a8ebd1", 7018771), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "ween", - "Demo", - AD_ENTRY1("intro.stk", "2e9c2898f6bf206ede801e3b2e7ee428"), - UNK_LANG, - kPlatformPC, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesAdLib, - 0, "show.tot", 0 - }, - { - { - "ween", - "Demo", - AD_ENTRY1("intro.stk", "15fb91a1b9b09684b28ac75edf66e504"), - EN_USA, - kPlatformPC, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeWeen, - kFeaturesAdLib, - 0, "show.tot", 0 - }, - { - { - "bargon", - "", - AD_ENTRY1("intro.stk", "da3c54be18ab73fbdb32db24624a9c23"), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeBargon, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by Trekky in the forums - { - "bargon", - "", - AD_ENTRY1s("intro.stk", "2f54b330d21f65b04b7c1f8cca76426c", 262109), - FR_FRA, - kPlatformAtariST, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeBargon, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by cesardark in bug #1681649 - { - "bargon", - "", - AD_ENTRY1s("intro.stk", "11103b304286c23945560b391fd37e7d", 3181890), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeBargon, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by paul66 in bug #1692667 - { - "bargon", - "", - AD_ENTRY1s("intro.stk", "da3c54be18ab73fbdb32db24624a9c23", 3181825), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeBargon, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by pwigren in bugreport #1764174 - { - "bargon", - "", - AD_ENTRY1s("intro.stk", "569d679fe41d49972d34c9fce5930dda", 269825), - EN_ANY, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeBargon, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by kizkoool in bugreport #2089734 - { - "bargon", - "", - AD_ENTRY1s("intro.stk", "00f6b4e2ee26e5c40b488e2df5adcf03", 3975580), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeBargon, - kFeaturesNone, - 0, 0, 0 - }, - { // Supplied by glorfindel in bugreport #1722142 - { - "bargon", - "Fanmade", - AD_ENTRY1s("intro.stk", "da3c54be18ab73fbdb32db24624a9c23", 3181825), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeBargon, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490), - EN_GRB, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, - { - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, - { - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, - { - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, - { - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "0b72992f5d8b5e6e0330572a5753ea25", 256490), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, - { - { - "littlered", - "", - { - {"intro.stk", 0, "0b72992f5d8b5e6e0330572a5753ea25", 256490}, - {"mod.babayaga", 0, "43484cde74e0860785f8e19f0bc776d1", 60248}, - {0, 0, 0, 0} - }, - UNK_LANG, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522), - EN_GRB, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, - { - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522), - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, - { - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522), - DE_DEU, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, - { - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522), - IT_ITA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, - { - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "113a16877e4f72037d9714be1c2b0221", 1187522), - ES_ESP, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, - { // Found in french ADI 2 Francais-Maths CM1 - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610), - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, - { // Found in french ADI 2 Francais-Maths CM1 - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610), - ES_ESP, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, - { // Found in french ADI 2 Francais-Maths CM1 - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610), - EN_GRB, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, - { // Found in french ADI 2 Francais-Maths CM1 - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610), - IT_ITA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, - { // Found in french ADI 2 Francais-Maths CM1 - { - "littlered", - "", - AD_ENTRY1s("intro.stk", "5c15b37ed27ac2470854e9e09374d50e", 1248610), - DE_DEU, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLittleRed, - kFeaturesAdLib | kFeaturesEGA, - 0, 0, 0 - }, -// This version is not detected on purpose: it's a pirated version. -// Tagged ADGF_PIRATED! Do not re-add nor un-tag! - { - { - "lit", - "", - AD_ENTRY1s("intro.stk", "3712e7527ba8ce5637d2aadf62783005", 72318), - FR_FRA, - kPlatformPC, - ADGF_PIRATED, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "lit", - "", - AD_ENTRY1s("intro.stk", "7b7f48490dedc8a7cb999388e2fadbe3", 3930674), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "lit", - "", - AD_ENTRY1s("intro.stk", "e0767783ff662ed93665446665693aef", 4371238), - HE_ISR, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by cartman_ on #scummvm - { - "lit", - "", - AD_ENTRY1s("intro.stk", "f1f78b663893b58887add182a77df151", 3944090), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2105220 - { - "lit", - "", - AD_ENTRY1s("intro.stk", "cd322cb3c64ef2ba2f2134aa2122cfe9", 3936700), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by koalet in bug report #2479034 - { - "lit", - "", - { - {"intro.stk", 0, "af98bcdc70e1f1c1635577fd726fe7f1", 3937310}, - {"musmac1.mid", 0, "ae7229bb09c6abe4e60a2768b24bc890", 9398}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformMacintosh, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "lit", - "", - AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "lit", - "", - AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "lit", - "", - AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "lit", - "", - AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "lit", - "", - AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "lit", - "", - AD_ENTRY1s("intro.stk", "6263d09e996c1b4e84ef2d650b820e57", 4831170), - EN_GRB, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by SiRoCs in bug report #2093672 - { - "lit", - "", - AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by SiRoCs in bug report #2093672 - { - "lit", - "", - AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by SiRoCs in bug report #2093672 - { - "lit", - "", - AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by SiRoCs in bug report #2093672 - { - "lit", - "", - AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by SiRoCs in bug report #2093672 - { - "lit", - "", - AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by SiRoCs in bug report #2093672 - { - "lit", - "", - AD_ENTRY1s("intro.stk", "795be7011ec31bf5bb8ce4efdb9ee5d3", 4838904), - EN_GRB, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "lit", - "", - AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4207330), - EN_GRB, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "lit", - "", - AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4207330), - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "lit", - "", - AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4207330), - ES_ESP, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "lit", - "", - AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4219382), - DE_DEU, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "lit", - "", - AD_ENTRY1s("intro.stk", "0ddf39cea1ec30ecc8bfe444ebd7b845", 4219382), - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Found in french ADI 2.6 Francais-Maths 4e - { - "lit", - "", - AD_ENTRY1s("intro.stk", "58ee9583a4fb837f02d9a58e5f442656", 3937120), - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "lit1", - "Full install", - { - {"intro.stk", 0, "93c91bc9e783d00033042ae83144d7dd", 72318}, - {"partie2.itk", 0, "78f00bd8eb9e680e6289bba0130b1b33", 4396644}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "lit1", - "Light install", - { - {"intro.stk", 0, "93c91bc9e783d00033042ae83144d7dd", 72318}, - {"partie2.itk", 0, "78f00bd8eb9e680e6289bba0130b1b33", 664064}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "lit2", - "Light install", - AD_ENTRY1s("intro.stk", "17acbb212e62addbe48dc8f2282c98cb", 72318), - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "lit2", - "Full install", - { - {"intro.stk", 0, "17acbb212e62addbe48dc8f2282c98cb", 72318}, - {"partie4.itk", 0, "6ce4967e0c79d7daeabc6c1d26783d4c", 2612087}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "lit", - "Demo", - AD_ENTRY1("demo.stk", "c06f8cc20eb239d4c71f225ce3093edf"), - UNK_LANG, - kPlatformPC, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - "demo.stk", "demo.tot", 0 - }, - { - { - "lit", - "Non-interactive Demo", - AD_ENTRY1("demo.stk", "2eba8abd9e3878c57307576012dd2fec"), - UNK_LANG, - kPlatformPC, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - "demo.stk", "demo.tot", 0 - }, - { // Supplied by scoriae - { - "fascination", - "VGA", - AD_ENTRY1s("disk0.stk", "c14330d052fe4da5a441ac9d81bc5891", 1061955), - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeFascination, - kFeaturesAdLib, - "disk0.stk", 0, 0 - }, - { // Supplied by alex86r in bug report #3297633 - { - "fascination", - "VGA 3 disks edition", - AD_ENTRY1s("disk0.stk", "ab3dfdce43917bc806812959d692fc8f", 1061929), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeFascination, - kFeaturesAdLib, - "disk0.stk", 0, 0 - }, - { - { - "fascination", - "VGA 3 disks edition", - AD_ENTRY1s("disk0.stk", "a50a8495e1b2d67699fb562cb98fc3e2", 1064387), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeFascination, - kFeaturesAdLib, - "disk0.stk", 0, 0 - }, - { - { - "fascination", - "Hebrew edition (censored)", - AD_ENTRY1s("intro.stk", "d6e45ce548598727e2b5587a99718eba", 1055909), - HE_ISR, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeFascination, - kFeaturesAdLib, - "intro.stk", 0, 0 - }, - { // Supplied by windlepoons in bug report #2809247 - { - "fascination", - "VGA 3 disks edition", - AD_ENTRY1s("disk0.stk", "3a24e60a035250189643c86a9ceafb97", 1062480), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeFascination, - kFeaturesAdLib, - "disk0.stk", 0, 0 - }, - { - { - "fascination", - "VGA", - AD_ENTRY1s("disk0.stk", "e8ab4f200a2304849f462dc901705599", 183337), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeFascination, - kFeaturesAdLib, - "disk0.stk", 0, 0 - }, - { - { - "fascination", - "", - AD_ENTRY1s("disk0.stk", "68b1c01564f774c0b640075fbad1b695", 189968), - DE_DEU, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeFascination, - kFeaturesNone, - "disk0.stk", 0, 0 - }, - { - { - "fascination", - "", - AD_ENTRY1s("disk0.stk", "7062117e9c5adfb6bfb2dac3ff74df9e", 189951), - EN_ANY, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeFascination, - kFeaturesNone, - "disk0.stk", 0, 0 - }, - { - { - "fascination", - "", - AD_ENTRY1s("disk0.stk", "55c154e5a3e8e98afebdcff4b522e1eb", 190005), - FR_FRA, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeFascination, - kFeaturesNone, - "disk0.stk", 0, 0 - }, - { - { - "fascination", - "", - AD_ENTRY1s("disk0.stk", "7691827fff35df7799f14cfd6be178ad", 189931), - IT_ITA, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeFascination, - kFeaturesNone, - "disk0.stk", 0, 0 - }, - { - { - "fascination", - "", - AD_ENTRY1s("disk0.stk", "aff9fcc619f4dd19eae228affd0d34c8", 189964), - EN_ANY, - kPlatformAtariST, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeFascination, - kFeaturesNone, - "disk0.stk", 0, 0 - }, - { - { - "fascination", - "CD Version (Censored)", - AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953), - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOSUBTITLES) - }, - kGameTypeFascination, - kFeaturesCD, - "intro.stk", 0, 0 - }, - { - { - "fascination", - "CD Version (Censored)", - AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOSUBTITLES) - }, - kGameTypeFascination, - kFeaturesCD, - "intro.stk", 0, 0 - }, - { - { - "fascination", - "CD Version (Censored)", - AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOSUBTITLES) - }, - kGameTypeFascination, - kFeaturesCD, - "intro.stk", 0, 0 - }, - { - { - "fascination", - "CD Version (Censored)", - AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOSUBTITLES) - }, - kGameTypeFascination, - kFeaturesCD, - "intro.stk", 0, 0 - }, - { - { - "fascination", - "CD Version (Censored)", - AD_ENTRY1s("intro.stk", "9c61e9c22077f72921f07153e37ccf01", 545953), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOSUBTITLES) - }, - kGameTypeFascination, - kFeaturesCD, - "intro.stk", 0, 0 - }, - { - { - "geisha", - "", - AD_ENTRY1s("disk1.stk", "6eebbb98ad90cd3c44549fc2ab30f632", 212153), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGeisha, - kFeaturesEGA | kFeaturesAdLib, - "disk1.stk", "intro.tot", 0 - }, - { - { - "geisha", - "", - AD_ENTRY1s("disk1.stk", "f4d4d9d20f7ad1f879fc417d47faba89", 336732), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGeisha, - kFeaturesEGA | kFeaturesAdLib, - "disk1.stk", "intro.tot", 0 - }, - { - { - "geisha", - "", - AD_ENTRY1s("disk1.stk", "e5892f00917c62423e93f5fd9920cf47", 208120), - UNK_LANG, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGeisha, - kFeaturesEGA, - "disk1.stk", "intro.tot", 0 - }, - { - { - "gob3", - "", - AD_ENTRY1s("intro.stk", "32b0f57f5ae79a9ae97e8011df38af42", 157084), - EN_GRB, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3", - "", - AD_ENTRY1s("intro.stk", "904fc32032295baa3efb3a41f17db611", 178582), - HE_ISR, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by raziel_ in bug report #1891869 - { - "gob3", - "", - AD_ENTRY1s("intro.stk", "16b014bf32dbd6ab4c5163c44f56fed1", 445104), - EN_GRB, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3", - "", - { - {"intro.stk", 0, "16b014bf32dbd6ab4c5163c44f56fed1", 445104}, - {"musmac1.mid", 0, "948c546cad3a9de5bff3fe4107c82bf1", 6404}, - {0, 0, 0, 0} - }, - DE_DEU, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3", - "", - { - {"intro.stk", 0, "16b014bf32dbd6ab4c5163c44f56fed1", 445104}, - {"musmac1.mid", 0, "948c546cad3a9de5bff3fe4107c82bf1", 6404}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3", - "", - { - {"intro.stk", 0, "16b014bf32dbd6ab4c5163c44f56fed1", 445104}, - {"musmac1.mid", 0, "948c546cad3a9de5bff3fe4107c82bf1", 6404}, - {0, 0, 0, 0} - }, - EN_GRB, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by fac76 in bug report #1742716 - { - "gob3", - "", - { - {"intro.stk", 0, "32b0f57f5ae79a9ae97e8011df38af42", 157084}, - {"musmac1.mid", 0, "834e55205b710d0af5f14a6f2320dd8e", 8661}, - {0, 0, 0, 0} - }, - EN_GRB, - kPlatformMacintosh, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3", - "", - AD_ENTRY1("intro.stk", "1e2f64ec8dfa89f42ee49936a27e66e7"), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by paul66 in bug report #1652352 - { - "gob3", - "", - AD_ENTRY1("intro.stk", "f6d225b25a180606fa5dbe6405c97380"), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3", - "", - AD_ENTRY1("intro.stk", "e42a4f2337d6549487a80864d7826972"), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by Paranoimia on #scummvm - { - "gob3", - "", - AD_ENTRY1s("intro.stk", "fe8144daece35538085adb59c2d29613", 159402), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3", - "", - AD_ENTRY1("intro.stk", "4e3af248a48a2321364736afab868527"), - RU_RUS, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3", - "", - AD_ENTRY1("intro.stk", "8d28ce1591b0e9cc79bf41cad0fc4c9c"), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Supplied by SiRoCs in bug report #2098621 - { - "gob3", - "", - AD_ENTRY1s("intro.stk", "d3b72938fbbc8159198088811f9e6d19", 160382), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3", - "", - AD_ENTRY1("intro.stk", "bd679eafde2084d8011f247e51b5a805"), - EN_GRB, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesNone, - 0, "menu.tot", 0 - }, - { - { - "gob3", - "", - AD_ENTRY1("intro.stk", "bd679eafde2084d8011f247e51b5a805"), - DE_DEU, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesNone, - 0, "menu.tot", 0 - }, - { - { - "gob3", - "", - { - {"intro.stk", 0, "edd7403e5dc2a14459d2665a4c17714d", 209534}, - {"musmac1.mid", 0, "948c546cad3a9de5bff3fe4107c82bf1", 6404}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3", - "", - { - {"intro.stk", 0, "428e2de130cf3b303c938924539dc50d", 324420}, - {"musmac1.mid", 0, "948c546cad3a9de5bff3fe4107c82bf1", 6404}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3", - "", - { - {"intro.stk", 0, "428e2de130cf3b303c938924539dc50d", 324420}, - {"musmac1.mid", 0, "948c546cad3a9de5bff3fe4107c82bf1", 6404}, - {0, 0, 0, 0} - }, - EN_ANY, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { // Found in Found in french ADI 2.5 Anglais Multimedia 5e - { - "gob3", - "", - AD_ENTRY1s("intro.stk", "edd7403e5dc2a14459d2665a4c17714d", 209534), - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3cd", - "v1.000", - AD_ENTRY1("intro.stk", "6f2c226c62dd7ab0ab6f850e89d3fc47"), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by pykman in bug report #3067489 - { - "gob3cd", - "v1.02 Polish", - AD_ENTRY1s("intro.stk", "978afddcac81bb95a04757b61f78471c", 619825), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by paul66 and noizert in bug reports #1652352 and #1691230 - { - "gob3cd", - "v1.02", - AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"), - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by paul66 and noizert in bug reports #1652352 and #1691230 - { - "gob3cd", - "v1.02", - AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by paul66 and noizert in bug reports #1652352 and #1691230 - { - "gob3cd", - "v1.02", - AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by paul66 and noizert in bug reports #1652352 and #1691230 - { - "gob3cd", - "v1.02", - AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by paul66 and noizert in bug reports #1652352 and #1691230 - { - "gob3cd", - "v1.02", - AD_ENTRY1("intro.stk", "c3e9132ea9dc0fb866b6d60dcda10261"), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2810082 - { - "gob3cd", - "v1.02", - AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220), - HU_HUN, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2810082 - { - "gob3cd", - "v1.02", - AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2810082 - { - "gob3cd", - "v1.02", - AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesCD, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2810082 - { - "gob3cd", - "v1.02", - AD_ENTRY1s("intro.stk", "bfd7d4c6fedeb2cfcc8baa4d5ddb1f74", 616220), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "gob3", - "Interactive Demo", - AD_ENTRY1("intro.stk", "7aebd94e49c2c5c518c9e7b74f25de9d"), - FR_FRA, - kPlatformPC, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3", - "Interactive Demo 2", - AD_ENTRY1("intro.stk", "e5dcbc9f6658ebb1e8fe26bc4da0806d"), - FR_FRA, - kPlatformPC, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3", - "Interactive Demo 3", - AD_ENTRY1s("intro.stk", "9e20ad7b471b01f84db526da34eaf0a2", 395561), - EN_ANY, - kPlatformPC, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "gob3", - "Non-interactive Demo", - AD_ENTRY1("intro.stk", "b9b898fccebe02b69c086052d5024a55"), - UNK_LANG, - kPlatformPC, - ADGF_DEMO, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "inca2", - "", - AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeInca2, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "inca2", - "", - AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeInca2, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "inca2", - "", - AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeInca2, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "inca2", - "", - AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeInca2, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "inca2", - "", - AD_ENTRY1s("intro.stk", "47c3b452767c4f49ea7b109143e77c30", 916828), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeInca2, - kFeaturesCD, - 0, 0, 0 - }, - { - { - "inca2", - "", - AD_ENTRY1s("intro.stk", "1fa92b00fe80a20f34ec34a8e2fa869e", 923072), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeInca2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "inca2", - "", - AD_ENTRY1s("intro.stk", "1fa92b00fe80a20f34ec34a8e2fa869e", 923072), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeInca2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "inca2", - "", - AD_ENTRY1s("intro.stk", "1fa92b00fe80a20f34ec34a8e2fa869e", 923072), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeInca2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "inca2", - "", - AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612), - EN_USA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeInca2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "inca2", - "", - AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612), - DE_DEU, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeInca2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "inca2", - "", - AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612), - IT_ITA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeInca2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "inca2", - "", - AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612), - ES_ESP, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeInca2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "inca2", - "", - AD_ENTRY1s("intro.stk", "d33011df8758ac64ca3dca77c7719001", 908612), - FR_FRA, - kPlatformWindows, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeInca2, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "inca2", - "Non-Interactive Demo", - { - {"cons.imd", 0, "f896ba0c4a1ac7f7260d342655980b49", 17804}, - {"conseil.imd", 0, "aaedd5482d5b271e233e86c5a03cf62e", 33999}, - {"int.imd", 0, "6308222fcefbcb20925f01c1aff70dee", 30871}, - {"inter.imd", 0, "39bd6d3540f3bedcc97293f352c7f3fc", 191719}, - {"machu.imd", 0, "c0bc8211d93b467bfd063b63fe61b85c", 34609}, - {"post.imd", 0, "d75cad0e3fc22cb0c8b6faf597f509b2", 1047709}, - {"posta.imd", 0, "2a5b3fe75681ddf4d21ac724db8111b4", 547250}, - {"postb.imd", 0, "24260ce4e80a4c472352b76637265d09", 868312}, - {"postc.imd", 0, "24accbcc8b83a9c2be4bd82849a2bd29", 415637}, - {"tum.imd", 0, "0993d4810ec9deb3f77c5e92095320fd", 20330}, - {"tumi.imd", 0, "bf53f229480d694de0947fe3366fbec6", 248952}, - {0, 0, 0, 0} - }, - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeInca2, - kFeaturesAdLib | kFeaturesBATDemo, - 0, 0, 7 - }, - { - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390), - EN_GRB, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "dccf9d31cb720b34d75487408821b77e", 20296390), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108), - EN_GRB, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "b50fee012a5abcd0ac2963e1b4b56bec", 20298108), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "5f5f4e0a72c33391e67a47674b120cc6", 20296422), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { // Supplied by jvprat on #scummvm - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { // Supplied by jvprat on #scummvm - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452), - EN_GRB, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { // Supplied by jvprat on #scummvm - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { // Supplied by jvprat on #scummvm - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { // Supplied by jvprat on #scummvm - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "270529d9b8cce770b1575908a3800b52", 20296452), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { // Supplied by Hkz on #scummvm - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "f4c344023b073782d2fddd9d8b515318", 7069736), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { // Supplied by Hkz on #scummvm - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "f4c344023b073782d2fddd9d8b515318", 7069736), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { // Supplied by Hkz on #scummvm - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "f4c344023b073782d2fddd9d8b515318", 7069736), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { // Supplied by DjDiabolik in bug report #1971294 - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), - EN_GRB, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { // Supplied by DjDiabolik in bug report #1971294 - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { // Supplied by DjDiabolik in bug report #1971294 - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { // Supplied by DjDiabolik in bug report #1971294 - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { // Supplied by DjDiabolik in bug report #1971294 - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2098838 - { - "woodruff", - "", - AD_ENTRY1s("intro.stk", "08a96bf061af1fa4f75c6a7cc56b60a4", 20734979), - PL_POL, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "woodruff", - "Non-Interactive Demo", - { - {"demo.scn", 0, "16bb85fc5f8e519147b60475dbf33962", 89}, - {"wooddem3.vmd", 0, "a1700596172c2d4e264760030c3a3d47", 8994250}, - {0, 0, 0, 0} - }, - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480 | kFeaturesSCNDemo, - 0, 0, 1 - }, - { - { - "dynasty", - "", - AD_ENTRY1s("intro.stk", "6190e32404b672f4bbbc39cf76f41fda", 2511470), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeDynasty, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "dynasty", - "", - AD_ENTRY1s("intro.stk", "61e4069c16e27775a6cc6d20f529fb36", 2511300), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeDynasty, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "dynasty", - "", - AD_ENTRY1s("intro.stk", "61e4069c16e27775a6cc6d20f529fb36", 2511300), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeDynasty, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "dynasty", - "", - AD_ENTRY1s("intro.stk", "b3f8472484b7a1df94557b51e7b6fca0", 2322644), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeDynasty, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "dynasty", - "", - AD_ENTRY1s("intro.stk", "bdbdac8919200a5e71ffb9fb0709f704", 2446652), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeDynasty, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "dynasty", - "Demo", - AD_ENTRY1s("intro.stk", "464538a17ed39755d7f1ba9c751af1bd", 1847864), - EN_USA, - kPlatformPC, - ADGF_DEMO, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeDynasty, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "dynasty", - "Demo", - AD_ENTRY1s("lda1.stk", "0e56a899357cbc0bf503260fd2dd634e", 15032774), - UNK_LANG, - kPlatformWindows, - ADGF_DEMO, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeDynasty, - kFeatures640x480, - "lda1.stk", 0, 0 - }, - { - { - "dynasty", - "Demo", - AD_ENTRY1s("lda1.stk", "8669ea2e9a8239c070dc73958fbc8753", 15567724), - DE_DEU, - kPlatformWindows, - ADGF_DEMO, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeDynasty, - kFeatures640x480, - "lda1.stk", 0, 0 - }, - { - { - "urban", - "", - AD_ENTRY1s("intro.stk", "3ab2c542bd9216ae5d02cc6f45701ae1", 1252436), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeUrban, - kFeatures640x480 | kFeaturesTrueColor, - 0, 0, 0 - }, - { // Supplied by Collector9 in bug report #3228040 - { - "urban", - "", - AD_ENTRY1s("intro.stk", "6ce3d878178932053267237ec4843ce1", 1252518), - EN_USA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeUrban, - kFeatures640x480 | kFeaturesTrueColor, - 0, 0, 0 - }, - { // Supplied by gamin in the forums - { - "urban", - "", - AD_ENTRY1s("intro.stk", "b991ed1d31c793e560edefdb349882ef", 1276408), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeUrban, - kFeatures640x480 | kFeaturesTrueColor, - 0, 0, 0 - }, - { // Supplied by jvprat on #scummvm - { - "urban", - "", - AD_ENTRY1s("intro.stk", "4ec3c0864e2b54c5b4ccf9f6ad96528d", 1253328), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeUrban, - kFeatures640x480 | kFeaturesTrueColor, - 0, 0, 0 - }, - { // Supplied by Alex on the gobsmacked blog - { - "urban", - "", - AD_ENTRY1s("intro.stk", "9ea647085a16dd0fb9ecd84cd8778ec9", 1253436), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeUrban, - kFeatures640x480 | kFeaturesTrueColor, - 0, 0, 0 - }, - { // Supplied by alex86r in bug report #3297602 - { - "urban", - "", - AD_ENTRY1s("intro.stk", "4e4a3c017fe5475353bf94c455fe3efd", 1253448), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeUrban, - kFeatures640x480 | kFeaturesTrueColor, - 0, 0, 0 - }, - { // Supplied by goodoldgeorg in bug report #2770340 - { - "urban", - "", - AD_ENTRY1s("intro.stk", "4bd31979ea3d77a58a358c09000a85ed", 1253018), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeUrban, - kFeatures640x480 | kFeaturesTrueColor, - 0, 0, 0 - }, - { - { - "urban", - "Non-Interactive Demo", - { - {"wdemo.s24", 0, "14ac9bd51db7a075d69ddb144904b271", 87}, - {"demo.vmd", 0, "65d04715d871c292518b56dd160b0161", 9091237}, - {"urband.vmd", 0, "60343891868c91854dd5c82766c70ecc", 922461}, - {0, 0, 0, 0} - }, - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeUrban, - kFeatures640x480 | kFeaturesTrueColor | kFeaturesSCNDemo, - 0, 0, 2 - }, - { - { - "playtoons1", - "", - { - {"playtoon.stk", 0, "8c98e9a11be9bb203a55e8c6e68e519b", 25574338}, - {"archi.stk", 0, "8d44b2a0d4e3139471213f9f0ed21e81", 5524674}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "playtoons1", - "Pack mes histoires anim\xE9""es", - { - {"playtoon.stk", 0, "55f0293202963854192e39474e214f5f", 30448474}, - {"archi.stk", 0, "8d44b2a0d4e3139471213f9f0ed21e81", 5524674}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "playtoons1", - "", - { - {"playtoon.stk", 0, "c5ca2a288cdaefca9556cd9ae4b579cf", 25158926}, - {"archi.stk", 0, "8d44b2a0d4e3139471213f9f0ed21e81", 5524674}, - {0, 0, 0, 0} - }, - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { // Supplied by scoriae in the forums - { - "playtoons1", - "", - { - {"playtoon.stk", 0, "9e513e993a5b0e2496add3f50c08764b", 30448506}, - {"archi.stk", 0, "00d8274519dfcf8a0d8ae3099daea0f8", 5532135}, - {0, 0, 0, 0} - }, - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "playtoons1", - "Non-Interactive Demo", - { - {"play123.scn", 0, "4689a31f543915e488c3bc46ea358add", 258}, - {"archi.vmd", 0, "a410fcc8116bc173f038100f5857191c", 5617210}, - {"chato.vmd", 0, "5a10e39cb66c396f2f9d8fb35e9ac016", 5445937}, - {"genedeb.vmd", 0, "3bb4a45585f88f4d839efdda6a1b582b", 1244228}, - {"generik.vmd", 0, "b46bdd64b063e86927fb2826500ad512", 603242}, - {"genespi.vmd", 0, "b7611916f32a370ae9832962fc17ef72", 758719}, - {"spirou.vmd", 0, "8513dbf7ac51c057b21d371d6b217b47", 2550788}, - {0, 0, 0, 0} - }, - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480 | kFeaturesSCNDemo, - 0, 0, 3 - }, - { - { - "playtoons1", - "Non-Interactive Demo", - { - {"e.scn", 0, "8a0db733c3f77be86e74e8242e5caa61", 124}, - {"demarchg.vmd", 0, "d14a95da7d8792faf5503f649ffcbc12", 5619415}, - {0, 0, 0, 0} - }, - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480 | kFeaturesSCNDemo, - 0, 0, 4 - }, - { - { - "playtoons1", - "Non-Interactive Demo", - { - {"i.scn", 0, "8b3294474d39970463663edd22341730", 285}, - {"demarita.vmd", 0, "84c8672b91c7312462603446e224bfec", 5742533}, - {"dembouit.vmd", 0, "7a5fdf0a4dbdfe72e31dd489ea0f8aa2", 3536786}, - {"demo5.vmd", 0, "2abb7b6a26406c984f389f0b24b5e28e", 13290970}, - {"demoita.vmd", 0, "b4c0622d14c8749965cd0f5dfca4cf4b", 1183566}, - {"wooddem3.vmd", 0, "a1700596172c2d4e264760030c3a3d47", 8994250}, - {0, 0, 0, 0} - }, - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480 | kFeaturesSCNDemo, - 0, 0, 5 - }, - { - { - "playtoons1", - "Non-Interactive Demo", - { - {"s.scn", 0, "1f527010626b5490761f16ba7a6f639a", 251}, - {"demaresp.vmd", 0, "3f860f944056842b35a5fd05416f208e", 5720619}, - {"demboues.vmd", 0, "3a0caa10c98ef92a15942f8274075b43", 3535838}, - {"demo5.vmd", 0, "2abb7b6a26406c984f389f0b24b5e28e", 13290970}, - {"wooddem3.vmd", 0, "a1700596172c2d4e264760030c3a3d47", 8994250}, - {0, 0, 0, 0} - }, - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480 | kFeaturesSCNDemo, - 0, 0, 6 - }, - { - { - "playtoons2", - "", - { - {"playtoon.stk", 0, "4772c96be88a57f0561519e4a1526c62", 24406262}, - {"spirou.stk", 0, "5d9c7644d0c47840169b4d016765cc1a", 9816201}, - {0, 0, 0, 0} - }, - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "playtoons2", - "", - { - {"playtoon.stk", 0, "55a85036dd93cce93532d8f743d90074", 17467154}, - {"spirou.stk", 0, "e3e1b6148dd72fafc3637f1a8e5764f5", 9812043}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "playtoons2", - "", - { - {"playtoon.stk", 0, "c5ca2a288cdaefca9556cd9ae4b579cf", 25158926}, - {"spirou.stk", 0, "91080dc148de1bbd6a97321c1a1facf3", 9817086}, - {0, 0, 0, 0} - }, - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { // Supplied by Hkz - { - "playtoons2", - "", - { - {"playtoon.stk", 0, "2572685400852d12759a2fbf09ec88eb", 9698780}, - {"spirou.stk", 0, "d3cfeff920b6343a2ece55088f530dba", 7076608}, - {0, 0, 0, 0} - }, - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { // Supplied by scoriae in the forums - { - "playtoons2", - "", - { - {"playtoon.stk", 0, "9e513e993a5b0e2496add3f50c08764b", 30448506}, - {"spirou.stk", 0, "993737f112ca6a9b33c814273280d832", 9825760}, - {0, 0, 0, 0} - }, - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "playtoons3", - "", - { - {"playtoon.stk", 0, "8c98e9a11be9bb203a55e8c6e68e519b", 25574338}, - {"chato.stk", 0, "4fa4ed96a427c344e9f916f9f236598d", 6033793}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "playtoons3", - "", - { - {"playtoon.stk", 0, "9e513e993a5b0e2496add3f50c08764b", 30448506}, - {"chato.stk", 0, "8fc8d0da5b3e758908d1d7298d497d0b", 6041026}, - {0, 0, 0, 0} - }, - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "playtoons3", - "Pack mes histoires anim\xE9""es", - { - {"playtoon.stk", 0, "55f0293202963854192e39474e214f5f", 30448474}, - {"chato.stk", 0, "4fa4ed96a427c344e9f916f9f236598d", 6033793}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "playtoons3", - "", - { - {"playtoon.stk", 0, "c5ca2a288cdaefca9556cd9ae4b579cf", 25158926}, - {"chato.stk", 0, "3c6cb3ac8a5a7cf681a19971a92a748d", 6033791}, - {0, 0, 0, 0} - }, - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { // Supplied by Hkz on #scummvm - { - "playtoons3", - "", - { - {"playtoon.stk", 0, "4772c96be88a57f0561519e4a1526c62", 24406262}, - {"chato.stk", 0, "bdef407387112bfcee90e664865ac3af", 6033867}, - {0, 0, 0, 0} - }, - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "playtoons4", - "", - { - {"playtoon.stk", 0, "b7f5afa2dc1b0f75970b7c07d175db1b", 24340406}, - {"manda.stk", 0, "92529e0b927191d9898a34c2892e9a3a", 6485072}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { //Supplied by goodoldgeorg in bug report #2820006 - { - "playtoons4", - "", - { - {"playtoon.stk", 0, "9e513e993a5b0e2496add3f50c08764b", 30448506}, - {"manda.stk", 0, "69a79c9f61b2618e482726f2ff68078d", 6499208}, - {0, 0, 0, 0} - }, - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "playtoons5", - "", - { - {"playtoon.stk", 0, "55f0293202963854192e39474e214f5f", 30448474}, - {"wakan.stk", 0, "f493bf82851bc5ba74d57de6b7e88df8", 5520153}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "bambou", - "", - { - {"intro.stk", 0, "2f8db6963ff8d72a8331627ebda918f4", 3613238}, - {"bambou.itk", 0, "0875914d31126d0749313428f10c7768", 114440192}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeBambou, - kFeatures640x480, - "intro.stk", "intro.tot", 0 - }, - { - { - "playtnck1", - "", - { - {"playtoon.stk", 0, "5f9aae29265f1f105ad8ec195dff81de", 68382024}, - {"dan.itk", 0, "906d67b3e438d5e95ec7ea9e781a94f3", 3000320}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "playtnck2", - "", - { - {"playtoon.stk", 0, "5f9aae29265f1f105ad8ec195dff81de", 68382024}, - {"dan.itk", 0, "74eeb075bd2cb47b243349730264af01", 3213312}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "playtnck3", - "", - { - {"playtoon.stk", 0, "5f9aae29265f1f105ad8ec195dff81de", 68382024}, - {"dan.itk", 0, "9a8f62809eca5a52f429b5b6a8e70f8f", 2861056}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - "intro2.stk", 0, 0 - }, - { - { - "adi2", - "Adi 2.0 for Teachers", - AD_ENTRY1s("adi2.stk", "da6f1fb68bff32260c5eecdf9286a2f5", 1533168), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO0() - }, - kGameTypeAdi2, - kFeaturesNone, - "adi2.stk", "ediintro.tot", 0 - }, - { // Found in french ADI 2 Francais-Maths CM1. Exact version not specified. - { - "adi2", - "Adi 2", - AD_ENTRY1s("adi2.stk", "23f279615c736dc38320f1348e70c36e", 10817668), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi2, - kFeatures640x480, - "adi2.stk", "ediintro.tot", 0 - }, - { // Found in french ADI 2 Francais-Maths CE2. Exact version not specified. - { - "adi2", - "Adi 2", - AD_ENTRY1s("adi2.stk", "d4162c4298f9423ecc1fb04965557e90", 11531214), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi2, - kFeatures640x480, - "adi2.stk", "ediintro.tot", 0 - }, - { - { - "adi2", - "Adi 2", - AD_ENTRY1s("adi2.stk", "29694c5a649298a42f87ae731d6d6f6d", 311132), - EN_ANY, - kPlatformAmiga, - ADGF_NO_FLAGS, - GUIO0() - }, - kGameTypeAdi2, - kFeaturesNone, - "adi2.stk", "ediintro.tot", 0 - }, - { - { - "adi2", - "Adi 2", - AD_ENTRY1s("adi2.stk", "2a40bb48ccbd4e6fb3f7f0fc2f069d80", 17720132), - ES_ESP, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi2, - kFeatures640x480, - "adi2.stk", "ediintro.tot", 0 - }, - { - { - "adi2", - "Adi 2.5", - AD_ENTRY1s("adi2.stk", "fcac60e6627f37aee219575b60859de9", 16944268), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi2, - kFeatures640x480, - "adi2.stk", "ediintro.tot", 0 - }, - { - { - "adi2", - "Adi 2.5", - AD_ENTRY1s("adi2.stk", "072d5e2d7826a7c055865568ebf918bb", 16934596), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi2, - kFeatures640x480, - "adi2.stk", "ediintro.tot", 0 - }, - { - { - "adi2", - "Adi 2.6", - AD_ENTRY1s("adi2.stk", "2fb940eb8105b12871f6b88c8c4d1615", 16780058), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi2, - kFeatures640x480, - "adi2.stk", "ediintro.tot", 0 - }, - { - { - "adi2", - "Adi 2.6", - AD_ENTRY1s("adi2.stk", "fde7d98a67dbf859423b6473796e932a", 18044780), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi2, - kFeatures640x480, - "adi2.stk", "ediintro.tot", 0 - }, - { - { - "adi2", - "Adi 2.7.1", - AD_ENTRY1s("adi2.stk", "6fa5dffebf5c7243c6af6b8c188ee00a", 19278008), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi2, - kFeatures640x480, - "adi2.stk", "ediintro.tot", 0 - }, - { - { - "adi2", - "Non-Interactive Demo", - { - {"demo.scn", 0, "8b5ba359fd87d586ad39c1754bf6ea35", 168}, - {"demadi2t.vmd", 0, "08a1b18cfe2015d3b43270da35cc813d", 7250723}, - {"demarch.vmd", 0, "4c4a4616585d40ef3df209e3c3911062", 5622731}, - {"demobou.vmd", 0, "2208b9855775564d15c4a5a559da0aec", 3550511}, - {0, 0, 0, 0} - }, - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeAdi2, - kFeatures640x480 | kFeaturesSCNDemo, - 0, 0, 1 - }, - { - { - "adi4", - "Addy 4 Grundschule Basis CD", - AD_ENTRY1s("intro.stk", "d2f0fb8909e396328dc85c0e29131ba8", 5847588), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi4, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "adi4", - "Addy 4 Sekundarstufe Basis CD", - AD_ENTRY1s("intro.stk", "367340e59c461b4fa36651cd74e32c4e", 5847378), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi4, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "adi4", - "Adi 4.0", - AD_ENTRY1s("intro.stk", "a3c35d19b2d28ea261d96321d208cb5a", 6021466), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi4, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "adi4", - "Adi 4.0", - AD_ENTRY1s("intro.stk", "44491d85648810bc6fcf84f9b3aa47d5", 5834944), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi4, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "adi4", - "Adi 4.0", - AD_ENTRY1s("intro.stk", "29374c0e3c10b17dd8463b06a55ad093", 6012072), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi4, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "adi4", - "Adi 4.0 Limited Edition", - AD_ENTRY1s("intro.stk", "ebbbc5e28a4adb695535ed989c1b8d66", 5929644), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi4, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "adi4", - "ADI 4.10", - AD_ENTRY1s("intro.stk", "3e3fa9656e37d802027635ace88c4cc5", 5359144), - EN_GRB, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi4, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "adi4", - "ADI 4.10", - AD_ENTRY1s("intro.stk", "6afc2590856433b9f5295b032f2b205d", 5923112), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi4, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "adi4", - "ADI 4.11", - AD_ENTRY1s("intro.stk", "6296e4be4e0c270c24d1330881900c7f", 5921234), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi4, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "adi4", - "Addy 4.21", - AD_ENTRY1s("intro.stk", "534f0b674cd4830df94a9c32c4ea7225", 6878034), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi4, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "adi4", - "ADI 4.21", - AD_ENTRY1s("intro.stk", "c5b9f6222c0b463f51dab47317c5b687", 5950490), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi4, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "adi4", - "Adi 4.0 Interactive Demo", - AD_ENTRY1s("intro.stk", "89ace204dbaac001425c73f394334f6f", 2413102), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi4, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "adi4", - "Adi 4.0 / Adibou 2 Demo", - AD_ENTRY1s("intro.stk", "d41d8cd98f00b204e9800998ecf8427e", 0), - FR_FRA, - kPlatformPC, - ADGF_DEMO, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeAdi4, - kFeatures640x480, - 0, 0, 0 - }, - { - { - "ajworld", - "", - AD_ENTRY1s("intro.stk", "e453bea7b28a67c930764d945f64d898", 3913628), - EN_ANY, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeAJWorld, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "adibou1", - "ADIBOU 1 Environnement 4-7 ans", - AD_ENTRY1s("intro.stk", "6db110188fcb7c5208d9721b5282682a", 4805104), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeAdibou1, - kFeaturesAdLib, - 0, 0, 0 - }, - { - { - "adibou2", - "ADIBOU 2", - AD_ENTRY1s("intro.stk", "94ae7004348dc8bf99c23a9a6ef81827", 956162), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO0() - }, - kGameTypeAdibou2, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "adibou2", - "Le Jardin Magique d'Adibou", - AD_ENTRY1s("intro.stk", "a8ff86f3cc40dfe5898e0a741217ef27", 956328), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO0() - }, - kGameTypeAdibou2, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "adibou2", - "ADIBOU 2", - AD_ENTRY1s("intro.stk", "092707829555f27706920e4cacf1fada", 8737958), - DE_DEU, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO0() - }, - kGameTypeAdibou2, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "adibou2", - "ADIB\xD9 2", - AD_ENTRY1s("intro.stk", "092707829555f27706920e4cacf1fada", 8737958), - IT_ITA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO0() - }, - kGameTypeAdibou2, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "adibou2", - "ADIBOU Version Decouverte", - AD_ENTRY1s("intro.stk", "558c14327b79ed39214b49d567a75e33", 8737856), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO0() - }, - kGameTypeAdibou2, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "adibou2", - "ADIBOU 2.10 Environnement", - AD_ENTRY1s("intro.stk", "f2b797819aeedee557e904b0b5ccd82e", 8736454), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO0() - }, - kGameTypeAdibou2, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "adibou2", - "ADIBOU 2.11 Environnement", - AD_ENTRY1s("intro.stk", "7b1f1f6f6477f54401e95d913f75e333", 8736904), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO0() - }, - kGameTypeAdibou2, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "adibou2", - "ADIBOU 2.12 Environnement", - AD_ENTRY1s("intro.stk", "1e49c39a4a3ce6032a84b712539c2d63", 8738134), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO0() - }, - kGameTypeAdibou2, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "adibou2", - "ADIBOU 2.13s Environnement", - AD_ENTRY1s("intro.stk", "092707829555f27706920e4cacf1fada", 8737958), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO0() - }, - kGameTypeAdibou2, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "adibou2", - "ADIBOO 2.14 Environnement", - AD_ENTRY1s("intro.stk", "ff63637e3cb7f0a457edf79457b1c6b3", 9333874), - FR_FRA, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO0() - }, - kGameTypeAdibou2, - kFeaturesNone, - 0, 0, 0 - }, - { - { - "adibou2", - "Non-Interactive Demo", - { - {"demogb.scn", 0, "9291455a908ac0e6aaaca686e532609b", 105}, - {"demogb.vmd", 0, "bc9c1db97db7bec8f566332444fa0090", 14320840}, - {0, 0, 0, 0} - }, - EN_GRB, - kPlatformPC, - ADGF_DEMO, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeAdibou2, - kFeatures640x480 | kFeaturesSCNDemo, - 0, 0, 9 - }, - { - { - "adibou2", - "Non-Interactive Demo", - { - {"demoall.scn", 0, "c8fd308c037b829800006332b2c32674", 106}, - {"demoall.vmd", 0, "4672b2deacc6fca97484840424b1921b", 14263433}, - {0, 0, 0, 0} - }, - DE_DEU, - kPlatformPC, - ADGF_DEMO, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeAdibou2, - kFeatures640x480 | kFeaturesSCNDemo, - 0, 0, 10 - }, - { - { - "adibou2", - "Non-Interactive Demo", - { - {"demofra.scn", 0, "d1b2b1618af384ea1120def8b986c02b", 106}, - {"demofra.vmd", 0, "b494cdec1aac7e54c3f2480512d2880e", 14297100}, - {0, 0, 0, 0} - }, - FR_FRA, - kPlatformPC, - ADGF_DEMO, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeAdibou2, - kFeatures640x480 | kFeaturesSCNDemo, - 0, 0, 11 - }, - { AD_TABLE_END_MARKER, kGameTypeNone, kFeaturesNone, 0, 0, 0} -}; - -static const GOBGameDescription fallbackDescs[] = { - { //0 - { - "gob1", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesNone, - 0, 0, 0 - }, - { //1 - { - "gob1cd", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob1, - kFeaturesCD, - 0, 0, 0 - }, - { //2 - { - "gob2", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { //3 - { - "gob2mac", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformMacintosh, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesAdLib, - 0, 0, 0 - }, - { //4 - { - "gob2cd", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob2, - kFeaturesCD, - 0, 0, 0 - }, - { //5 - { - "bargon", - "", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeBargon, - kFeaturesNone, - 0, 0, 0 - }, - { //6 - { - "gob3", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesAdLib, - 0, 0, 0 - }, - { //7 - { - "gob3cd", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGob3, - kFeaturesCD, - 0, 0, 0 - }, - { //8 - { - "woodruff", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeWoodruff, - kFeatures640x480, - 0, 0, 0 - }, - { //9 - { - "lostintime", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { //10 - { - "lostintime", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformMacintosh, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesAdLib, - 0, 0, 0 - }, - { //11 - { - "lostintime", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeLostInTime, - kFeaturesCD, - 0, 0, 0 - }, - { //12 - { - "urban", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeUrban, - kFeatures640x480 | kFeaturesTrueColor, - 0, 0, 0 - }, - { //13 - { - "playtoons1", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - 0, 0, 0 - }, - { //14 - { - "playtoons2", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - 0, 0, 0 - }, - { //15 - { - "playtoons3", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - 0, 0, 0 - }, - { //16 - { - "playtoons4", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - 0, 0, 0 - }, - { //17 - { - "playtoons5", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - 0, 0, 0 - }, - { //18 - { - "playtoons construction kit", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypePlaytoons, - kFeatures640x480, - 0, 0, 0 - }, - { //19 - { - "bambou", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeBambou, - kFeatures640x480, - 0, 0, 0 - }, - { //20 - { - "fascination", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeFascination, - kFeaturesNone, - "disk0.stk", 0, 0 - }, - { //21 - { - "geisha", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) - }, - kGameTypeGeisha, - kFeaturesEGA, - "disk1.stk", "intro.tot", 0 - }, - { //22 - { - "adi2", - "", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeAdi2, - kFeatures640x480, - "adi2.stk", 0, 0 - }, - { //23 - { - "adi4", - "", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO3(GUIO_NOSUBTITLES, GUIO_NOSPEECH, GUIO_NOASPECT) - }, - kGameTypeAdi4, - kFeatures640x480, - "adif41.stk", 0, 0 - }, - { //24 - { - "coktelplayer", - "unknown", - AD_ENTRY1(0, 0), - UNK_LANG, - kPlatformPC, - ADGF_NO_FLAGS, - GUIO1(GUIO_NOASPECT) - }, - kGameTypeUrban, - kFeaturesAdLib | kFeatures640x480 | kFeaturesSCNDemo, - "", "", 8 - } -}; - -static const ADFileBasedFallback fileBased[] = { - { &fallbackDescs[ 0].desc, { "intro.stk", "disk1.stk", "disk2.stk", "disk3.stk", "disk4.stk", 0 } }, - { &fallbackDescs[ 1].desc, { "intro.stk", "gob.lic", 0 } }, - { &fallbackDescs[ 2].desc, { "intro.stk", 0 } }, - { &fallbackDescs[ 2].desc, { "intro.stk", "disk2.stk", "disk3.stk", 0 } }, - { &fallbackDescs[ 3].desc, { "intro.stk", "disk2.stk", "disk3.stk", "musmac1.mid", 0 } }, - { &fallbackDescs[ 4].desc, { "intro.stk", "gobnew.lic", 0 } }, - { &fallbackDescs[ 5].desc, { "intro.stk", "scaa.imd", "scba.imd", "scbf.imd", 0 } }, - { &fallbackDescs[ 6].desc, { "intro.stk", "imd.itk", 0 } }, - { &fallbackDescs[ 7].desc, { "intro.stk", "mus_gob3.lic", 0 } }, - { &fallbackDescs[ 8].desc, { "intro.stk", "woodruff.itk", 0 } }, - { &fallbackDescs[ 9].desc, { "intro.stk", "commun1.itk", 0 } }, - { &fallbackDescs[10].desc, { "intro.stk", "commun1.itk", "musmac1.mid", 0 } }, - { &fallbackDescs[11].desc, { "intro.stk", "commun1.itk", "lost.lic", 0 } }, - { &fallbackDescs[12].desc, { "intro.stk", "cd1.itk", "objet1.itk", 0 } }, - { &fallbackDescs[13].desc, { "playtoon.stk", "archi.stk", 0 } }, - { &fallbackDescs[14].desc, { "playtoon.stk", "spirou.stk", 0 } }, - { &fallbackDescs[15].desc, { "playtoon.stk", "chato.stk", 0 } }, - { &fallbackDescs[16].desc, { "playtoon.stk", "manda.stk", 0 } }, - { &fallbackDescs[17].desc, { "playtoon.stk", "wakan.stk", 0 } }, - { &fallbackDescs[18].desc, { "playtoon.stk", "dan.itk" } }, - { &fallbackDescs[19].desc, { "intro.stk", "bambou.itk", 0 } }, - { &fallbackDescs[20].desc, { "disk0.stk", "disk1.stk", "disk2.stk", "disk3.stk", 0 } }, - { &fallbackDescs[21].desc, { "disk1.stk", "disk2.stk", "disk3.stk", 0 } }, - { &fallbackDescs[22].desc, { "adi2.stk", 0 } }, - { &fallbackDescs[23].desc, { "adif41.stk", "adim41.stk", 0 } }, - { &fallbackDescs[24].desc, { "coktelplayer.scn", 0 } }, - { 0, { 0 } } -}; - -} diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 2249f44852..3395046b6c 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -11,7 +11,6 @@ MODULE_OBJS := \ databases.o \ dbase.o \ decfile.o \ - detection.o \ draw.o \ draw_v1.o \ draw_v2.o \ @@ -77,6 +76,7 @@ MODULE_OBJS := \ demos/demoplayer.o \ demos/scnplayer.o \ demos/batplayer.o \ + detection/detection.o \ minigames/geisha/evilfish.o \ minigames/geisha/oko.o \ minigames/geisha/meter.o \ -- cgit v1.2.3 From f76416f00f37d8f09ed2874231e7d396bdcf11bf Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 22 Jun 2012 17:52:23 +0200 Subject: GOB: Add fallback detection entries for Little Red --- engines/gob/detection/tables_fallback.h | 40 ++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/engines/gob/detection/tables_fallback.h b/engines/gob/detection/tables_fallback.h index d8a5760080..e5a5828f2c 100644 --- a/engines/gob/detection/tables_fallback.h +++ b/engines/gob/detection/tables_fallback.h @@ -333,6 +333,34 @@ static const GOBGameDescription fallbackDescs[] = { "disk1.stk", "intro.tot", 0 }, { //22 + { + "littlered", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 + }, + { //23 + { + "littlered", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeLittleRed, + kFeaturesNone, + 0, 0, 0 + }, + { //24 { "adi2", "", @@ -346,7 +374,7 @@ static const GOBGameDescription fallbackDescs[] = { kFeatures640x480, "adi2.stk", 0, 0 }, - { //23 + { //25 { "adi4", "", @@ -360,7 +388,7 @@ static const GOBGameDescription fallbackDescs[] = { kFeatures640x480, "adif41.stk", 0, 0 }, - { //24 + { //26 { "coktelplayer", "unknown", @@ -400,9 +428,11 @@ static const ADFileBasedFallback fileBased[] = { { &fallbackDescs[19].desc, { "intro.stk", "bambou.itk", 0 } }, { &fallbackDescs[20].desc, { "disk0.stk", "disk1.stk", "disk2.stk", "disk3.stk", 0 } }, { &fallbackDescs[21].desc, { "disk1.stk", "disk2.stk", "disk3.stk", 0 } }, - { &fallbackDescs[22].desc, { "adi2.stk", 0 } }, - { &fallbackDescs[23].desc, { "adif41.stk", "adim41.stk", 0 } }, - { &fallbackDescs[24].desc, { "coktelplayer.scn", 0 } }, + { &fallbackDescs[22].desc, { "intro.stk", "stk2.stk", "stk3.stk", 0 } }, + { &fallbackDescs[23].desc, { "intro.stk", "stk2.stk", "stk3.stk", "mod.babayaga", 0 } }, + { &fallbackDescs[24].desc, { "adi2.stk", 0 } }, + { &fallbackDescs[25].desc, { "adif41.stk", "adim41.stk", 0 } }, + { &fallbackDescs[26].desc, { "coktelplayer.scn", 0 } }, { 0, { 0 } } }; -- cgit v1.2.3 From 50d328af3a4115a9c81b25e0b4b241144a42c305 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 22 Jun 2012 17:54:20 +0200 Subject: GOB: Give Geisha and Fascination fallback entries AdLib feature flags --- engines/gob/detection/tables_fallback.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/gob/detection/tables_fallback.h b/engines/gob/detection/tables_fallback.h index e5a5828f2c..2853ee7b4f 100644 --- a/engines/gob/detection/tables_fallback.h +++ b/engines/gob/detection/tables_fallback.h @@ -315,7 +315,7 @@ static const GOBGameDescription fallbackDescs[] = { GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, kGameTypeFascination, - kFeaturesNone, + kFeaturesAdLib, "disk0.stk", 0, 0 }, { //21 @@ -329,7 +329,7 @@ static const GOBGameDescription fallbackDescs[] = { GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) }, kGameTypeGeisha, - kFeaturesEGA, + kFeaturesEGA | kFeaturesAdLib, "disk1.stk", "intro.tot", 0 }, { //22 -- cgit v1.2.3 From 95d9052c8de83737e86b584510efe1961b86ff0a Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 23 Jun 2012 18:24:29 +0200 Subject: GOB: Fix a very stupid mistake in the Gob1 background track selection Thanks to salty-horse for catching that. :) --- engines/gob/sound/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 184e14a2e6..403bd632a1 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -352,7 +352,7 @@ void Sound::adlibPlayBgMusic() { const char *track = 0; if (_vm->getPlatform() == Common::kPlatformWindows) - track = tracksWin[ARRAYSIZE(tracksWin)]; + track = tracksWin[_vm->_util->getRandom(ARRAYSIZE(tracksWin))]; else track = tracksMac[_vm->_util->getRandom(ARRAYSIZE(tracksMac))]; -- cgit v1.2.3 From a6b65b84b040293e1bc6ed24a3ccdf5fde169bec Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 23 Jun 2012 19:30:10 +0200 Subject: SCUMM - Fix bug #3536645, FT Missing Dialogue Line The condition for setting up the scene when encountering Father Torque had been accidentally inverted, so the function was called over and over (presumably causing the scene to stall), insead of just once. I don't know much about INSANE, but sev has confirmed that this is the correct fix. --- engines/scumm/insane/insane_scenes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/scumm/insane/insane_scenes.cpp b/engines/scumm/insane/insane_scenes.cpp index 6db1cb5059..db0b0171bc 100644 --- a/engines/scumm/insane/insane_scenes.cpp +++ b/engines/scumm/insane/insane_scenes.cpp @@ -1386,7 +1386,7 @@ void Insane::postCase12(byte *renderBitmap, int32 codecparam, int32 setupsan12, break; case EN_TORQUE: turnBen(false); - if (_actor[1].y != 300) + if (_actor[1].y == 300) prepareScenePropScene(57, 1, 0); break; default: -- cgit v1.2.3 From f06eb05e8c554a3462a98d18c04d5f5695074b26 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 23 Jun 2012 21:00:25 +0300 Subject: SCI: Implement kPlayVMD subop 23 (set palette range) Fixes the wrong palette during video sequences in GK2 and the demo of RAMA --- engines/sci/engine/kvideo.cpp | 18 ++++++++++++++---- engines/sci/engine/state.cpp | 2 ++ engines/sci/engine/state.h | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index dd2bca1922..2456ba1100 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -32,6 +32,7 @@ #include "common/str.h" #include "common/system.h" #include "common/textconsole.h" +#include "graphics/palette.h" #include "graphics/pixelformat.h" #include "graphics/surface.h" #include "video/video_decoder.h" @@ -86,9 +87,12 @@ void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) { } bool skipVideo = false; + EngineState *s = g_sci->getEngineState(); - if (videoDecoder->hasDirtyPalette()) - videoDecoder->setSystemPalette(); + if (videoDecoder->hasDirtyPalette()) { + byte *palette = (byte *)videoDecoder->getPalette() + s->_vmdPalStart * 3; + g_system->getPaletteManager()->setPalette(palette, s->_vmdPalStart, s->_vmdPalEnd - s->_vmdPalStart); + } while (!g_engine->shouldQuit() && !videoDecoder->endOfVideo() && !skipVideo) { if (videoDecoder->needsUpdate()) { @@ -103,8 +107,10 @@ void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) { g_system->copyRectToScreen(frame->pixels, frame->pitch, x, y, width, height); } - if (videoDecoder->hasDirtyPalette()) - videoDecoder->setSystemPalette(); + if (videoDecoder->hasDirtyPalette()) { + byte *palette = (byte *)videoDecoder->getPalette() + s->_vmdPalStart * 3; + g_system->getPaletteManager()->setPalette(palette, s->_vmdPalStart, s->_vmdPalEnd - s->_vmdPalStart); + } g_system->updateScreen(); } @@ -361,6 +367,10 @@ reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv) { if (reshowCursor) g_sci->_gfxCursor->kernelShow(); break; + case 23: // set video palette range + s->_vmdPalStart = argv[1].toUint16(); + s->_vmdPalEnd = argv[2].toUint16(); + break; case 14: // Takes an additional integer parameter (e.g. 3) case 16: diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp index 237c6b54a6..94a3fe3ae5 100644 --- a/engines/sci/engine/state.cpp +++ b/engines/sci/engine/state.cpp @@ -122,6 +122,8 @@ void EngineState::reset(bool isRestoring) { _videoState.reset(); _syncedAudioOptions = false; + _vmdPalStart = 0; + _vmdPalEnd = 256; } void EngineState::speedThrottler(uint32 neededSleep) { diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index 78a8a5b0a2..9ae6299d83 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -196,6 +196,7 @@ public: byte _memorySegment[kMemorySegmentMax]; VideoState _videoState; + uint16 _vmdPalStart, _vmdPalEnd; bool _syncedAudioOptions; /** -- cgit v1.2.3 From d78ed6f6ad2c27732f1e36759303b0fa9d310190 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 23 Jun 2012 21:04:39 +0300 Subject: SCI: Remove a duplicate sanity check --- engines/sci/engine/kscripts.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index c9e94a52a4..2c115be500 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -226,11 +226,6 @@ reg_t kScriptID(EngineState *s, int argc, reg_t *argv) { return NULL_REG; } - if (index > scr->getExportsNr()) { - error("Dispatch index too big: %d > %d", index, scr->getExportsNr()); - return NULL_REG; - } - uint16 address = scr->validateExportFunc(index, true); // Point to the heap for SCI1.1 - SCI2.1 games -- cgit v1.2.3 From c075aafddb0dba00878f6382a6e277dbaab45e10 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 23 Jun 2012 21:09:03 +0300 Subject: SCI: Add support for the debug opcode "file" in our script dissassembler Also set the correct name for the debug opcode "line" --- engines/sci/engine/scriptdebug.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index d8c05ab04b..04cbf1d97c 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -50,7 +50,7 @@ const char *opcodeNames[] = { "lea", "selfID", "dummy", "pprev", "pToa", "aTop", "pTos", "sTop", "ipToa", "dpToa", "ipTos", "dpTos", "lofsa", "lofss", "push0", - "push1", "push2", "pushSelf", "dummy", "lag", + "push1", "push2", "pushSelf", "line", "lag", "lal", "lat", "lap", "lsg", "lsl", "lst", "lsp", "lagi", "lali", "lati", "lapi", "lsgi", "lsli", "lsti", "lspi", @@ -97,10 +97,19 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode uint bytecount = readPMachineInstruction(scr + pos.getOffset(), opsize, opparams); const byte opcode = opsize >> 1; - opsize &= 1; // byte if true, word if false - debugN("%04x:%04x: ", PRINT_REG(pos)); + if (opcode == op_pushSelf) { // 0x3e (62) + if ((opsize & 1) && g_sci->getGameId() != GID_FANMADE) { + // Debug opcode op_file + debugN("file \"%s\"\n", scr + pos.getOffset() + 1); // +1: op_pushSelf size + retval.incOffset(bytecount - 1); + return retval; + } + } + + opsize &= 1; // byte if true, word if false + if (printBytecode) { if (pos.getOffset() + bytecount > scr_size) { warning("Operation arguments extend beyond end of script"); -- cgit v1.2.3 From c1eb93bc5a9866787f27add5ca1d821e1470a4be Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 23 Jun 2012 21:20:43 +0300 Subject: SCI: Clean up validateExportFunc() and related functions Also renamed some SCI3 related code to indicate when it's SCI3 specific --- engines/sci/engine/script.cpp | 30 +++++++++++++++++++++--------- engines/sci/engine/script.h | 6 +++--- engines/sci/engine/vm.cpp | 23 ++++------------------- 3 files changed, 28 insertions(+), 31 deletions(-) diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 897ceccad3..80aaedfece 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -385,7 +385,7 @@ void Script::setLockers(int lockers) { _lockers = lockers; } -uint16 Script::validateExportFunc(int pubfunct, bool relocate) { +uint16 Script::validateExportFunc(int pubfunct, bool relocateSci3) { bool exportsAreWide = (g_sci->_features->detectLofsType() == SCI_VERSION_1_MIDDLE); if (_numExports <= pubfunct) { @@ -398,15 +398,15 @@ uint16 Script::validateExportFunc(int pubfunct, bool relocate) { uint16 offset; - if (getSciVersion() != SCI_VERSION_3 || !relocate) { + if (getSciVersion() != SCI_VERSION_3) { offset = READ_SCI11ENDIAN_UINT16(_exportTable + pubfunct); } else { - offset = relocateOffsetSci3(pubfunct * 2 + 22); + if (!relocateSci3) + offset = READ_SCI11ENDIAN_UINT16(_exportTable + pubfunct) + getCodeBlockOffsetSci3(); + else + offset = relocateOffsetSci3(pubfunct * 2 + 22); } - if (offset >= _bufSize) - error("Invalid export function pointer"); - // Check if the offset found points to a second export table (e.g. script 912 // in Camelot and script 306 in KQ4). Such offsets are usually small (i.e. < 10), // thus easily distinguished from actual code offsets. @@ -419,11 +419,23 @@ uint16 Script::validateExportFunc(int pubfunct, bool relocate) { if (secondExportTable) { secondExportTable += 3; // skip header plus 2 bytes (secondExportTable is a uint16 pointer) offset = READ_SCI11ENDIAN_UINT16(secondExportTable + pubfunct); - if (offset >= _bufSize) - error("Invalid export function pointer"); } } + if (!offset) { +#ifdef ENABLE_SCI32 + // WORKAROUNDS for invalid (empty) exports + if (g_sci->getGameId() == GID_TORIN && _nr == 64036) { + } else if (g_sci->getGameId() == GID_RAMA && _nr == 64908) { + } else +#endif + error("Request for invalid exported function 0x%x of script %d", pubfunct, _nr); + return NULL; + } + + if (offset >= _bufSize) + error("Invalid export function pointer"); + return offset; } @@ -551,7 +563,7 @@ void Script::initializeClasses(SegManager *segMan) { if (getSciVersion() <= SCI_VERSION_1_LATE && !marker) break; - if (getSciVersion() >= SCI_VERSION_1_1 && marker != 0x1234) + if (getSciVersion() >= SCI_VERSION_1_1 && marker != SCRIPT_OBJECT_MAGIC_NUMBER) break; if (getSciVersion() <= SCI_VERSION_1_LATE) { diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h index 0c99f13235..9747f072c5 100644 --- a/engines/sci/engine/script.h +++ b/engines/sci/engine/script.h @@ -197,11 +197,11 @@ public: * Validate whether the specified public function is exported by * the script in the specified segment. * @param pubfunct Index of the function to validate - * @param relocate Decide whether to relocate this public function or not + * @param relocateSci3 Decide whether to relocate this SCI3 public function or not * @return NULL if the public function is invalid, its * offset into the script's segment otherwise */ - uint16 validateExportFunc(int pubfunct, bool relocate); + uint16 validateExportFunc(int pubfunct, bool relocateSci3); /** * Marks the script as deleted. @@ -249,7 +249,7 @@ public: /** * Gets an offset to the beginning of the code block in a SCI3 script */ - int getCodeBlockOffset() { return READ_SCI11ENDIAN_UINT32(_buf); } + int getCodeBlockOffsetSci3() { return READ_SCI11ENDIAN_UINT32(_buf); } private: /** diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 89f59eaa14..a42606a6a6 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -225,30 +225,15 @@ ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackP scr = s->_segMan->getScript(seg); } - int temp = scr->validateExportFunc(pubfunct, false); - - if (getSciVersion() == SCI_VERSION_3) - temp += scr->getCodeBlockOffset(); - - if (!temp) { -#ifdef ENABLE_SCI32 - if (g_sci->getGameId() == GID_TORIN && script == 64036) { - // Script 64036 in Torin's Passage is empty and contains an invalid - // (empty) export - } else if (g_sci->getGameId() == GID_RAMA && script == 64908) { - // Script 64908 in the demo of RAMA contains an invalid (empty) - // export - } else -#endif - error("Request for invalid exported function 0x%x of script %d", pubfunct, script); + uint32 exportAddr = scr->validateExportFunc(pubfunct, false); + if (!exportAddr) return NULL; - } - + // Check if a breakpoint is set on this method g_sci->checkExportBreakpoint(script, pubfunct); ExecStack xstack(calling_obj, calling_obj, sp, argc, argp, - seg, make_reg(seg, temp), -1, pubfunct, -1, + seg, make_reg(seg, exportAddr), -1, pubfunct, -1, s->_executionStack.size() - 1, EXEC_STACK_TYPE_CALL); s->_executionStack.push_back(xstack); return &(s->_executionStack.back()); -- cgit v1.2.3 From 20b677080881580706652b17dd5a4c3ed3e36c07 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 23 Jun 2012 21:38:46 +0300 Subject: SCI: Change the program counter (PC) to be a 32-bit variable This is needed for future support of large SCI3 scripts. The program counter is isolated and does not interfere with other parts of the VM, plus it does not get stored in saved games, so it's pretty straightforward to convert --- engines/sci/console.cpp | 14 +++++++++---- engines/sci/console.h | 2 +- engines/sci/engine/script.cpp | 4 ++-- engines/sci/engine/script.h | 2 +- engines/sci/engine/scriptdebug.cpp | 4 ++-- engines/sci/engine/vm.cpp | 15 ++++++------- engines/sci/engine/vm.h | 4 ++-- engines/sci/engine/vm_types.h | 43 ++++++++++++++++++++++++++++++++++++++ 8 files changed, 69 insertions(+), 19 deletions(-) diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index b0ed7e6225..40a6fd1415 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -2913,7 +2913,8 @@ bool Console::cmdDisassemble(int argc, const char **argv) { if (jumpTarget > farthestTarget) farthestTarget = jumpTarget; } - addr = disassemble(_engine->_gamestate, addr, printBWTag, printBytecode); + // TODO: Use a true 32-bit reg_t for the position (addr) + addr = disassemble(_engine->_gamestate, make_reg32(addr.getSegment(), addr.getOffset()), printBWTag, printBytecode); if (addr.isNull() && prevAddr < farthestTarget) addr = prevAddr + 1; // skip past the ret } while (addr.getOffset() > 0); @@ -2961,7 +2962,8 @@ bool Console::cmdDisassembleAddress(int argc, const char **argv) { } do { - vpc = disassemble(_engine->_gamestate, vpc, printBWTag, printBytes); + // TODO: Use a true 32-bit reg_t for the position (vpc) + vpc = disassemble(_engine->_gamestate, make_reg32(vpc.getSegment(), vpc.getOffset()), printBWTag, printBytes); } while ((vpc.getOffset() > 0) && (vpc.getOffset() + 6 < size) && (--opCount)); return true; @@ -3652,10 +3654,14 @@ static int parse_reg_t(EngineState *s, const char *str, reg_t *dest, bool mayBeV relativeOffset = true; if (!scumm_strnicmp(str + 1, "PC", 2)) { - *dest = s->_executionStack.back().addr.pc; + // TODO: Handle 32-bit PC addresses + reg32_t pc = s->_executionStack.back().addr.pc; + *dest = make_reg(pc.getSegment(), (uint16)pc.getOffset()); offsetStr = str + 3; } else if (!scumm_strnicmp(str + 1, "P", 1)) { - *dest = s->_executionStack.back().addr.pc; + // TODO: Handle 32-bit PC addresses + reg32_t pc = s->_executionStack.back().addr.pc; + *dest = make_reg(pc.getSegment(), (uint16)pc.getOffset()); offsetStr = str + 2; } else if (!scumm_strnicmp(str + 1, "PREV", 4)) { *dest = s->r_prev; diff --git a/engines/sci/console.h b/engines/sci/console.h index be17fdb728..1c54748842 100644 --- a/engines/sci/console.h +++ b/engines/sci/console.h @@ -33,7 +33,7 @@ namespace Sci { class SciEngine; struct List; -reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode); +reg_t disassemble(EngineState *s, reg32_t pos, bool printBWTag, bool printBytecode); bool isJumpOpcode(EngineState *s, reg_t pos, reg_t& jumpOffset); class Console : public GUI::Debugger { diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 80aaedfece..57334b89aa 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -385,7 +385,7 @@ void Script::setLockers(int lockers) { _lockers = lockers; } -uint16 Script::validateExportFunc(int pubfunct, bool relocateSci3) { +uint32 Script::validateExportFunc(int pubfunct, bool relocateSci3) { bool exportsAreWide = (g_sci->_features->detectLofsType() == SCI_VERSION_1_MIDDLE); if (_numExports <= pubfunct) { @@ -396,7 +396,7 @@ uint16 Script::validateExportFunc(int pubfunct, bool relocateSci3) { if (exportsAreWide) pubfunct *= 2; - uint16 offset; + uint32 offset; if (getSciVersion() != SCI_VERSION_3) { offset = READ_SCI11ENDIAN_UINT16(_exportTable + pubfunct); diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h index 9747f072c5..1fc8caf313 100644 --- a/engines/sci/engine/script.h +++ b/engines/sci/engine/script.h @@ -201,7 +201,7 @@ public: * @return NULL if the public function is invalid, its * offset into the script's segment otherwise */ - uint16 validateExportFunc(int pubfunct, bool relocateSci3); + uint32 validateExportFunc(int pubfunct, bool relocateSci3); /** * Marks the script as deleted. diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 04cbf1d97c..d3abb9ff41 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -68,7 +68,7 @@ const char *opcodeNames[] = { #endif // REDUCE_MEMORY_USAGE // Disassembles one command from the heap, returns address of next command or 0 if a ret was encountered. -reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode) { +reg_t disassemble(EngineState *s, reg32_t pos, bool printBWTag, bool printBytecode) { SegmentObj *mobj = s->_segMan->getSegment(pos.getSegment(), SEG_TYPE_SCRIPT); Script *script_entity = NULL; const byte *scr; @@ -347,7 +347,7 @@ void SciEngine::scriptDebug() { } if (_debugState.seeking != kDebugSeekNothing) { - const reg_t pc = s->xs->addr.pc; + const reg32_t pc = s->xs->addr.pc; SegmentObj *mobj = s->_segMan->getSegment(pc.getSegment(), SEG_TYPE_SCRIPT); if (mobj) { diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index a42606a6a6..5a2a39def2 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -233,7 +233,7 @@ ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackP g_sci->checkExportBreakpoint(script, pubfunct); ExecStack xstack(calling_obj, calling_obj, sp, argc, argp, - seg, make_reg(seg, exportAddr), -1, pubfunct, -1, + seg, make_reg32(seg, exportAddr), -1, pubfunct, -1, s->_executionStack.size() - 1, EXEC_STACK_TYPE_CALL); s->_executionStack.push_back(xstack); return &(s->_executionStack.back()); @@ -289,11 +289,12 @@ ExecStack *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj, StackPt ExecStackType stackType = EXEC_STACK_TYPE_VARSELECTOR; StackPtr curSP = NULL; - reg_t curFP = NULL_REG; + reg32_t curFP = make_reg32(0, 0); if (selectorType == kSelectorMethod) { stackType = EXEC_STACK_TYPE_CALL; curSP = sp; - curFP = funcp; + // TODO: Will this offset suffice for large SCI3 scripts? + curFP = make_reg32(funcp.getSegment(), funcp.getOffset()); sp = CALL_SP_CARRY; // Destroy sp, as it will be carried over } @@ -327,7 +328,7 @@ static void addKernelCallToExecStack(EngineState *s, int kernelCallNr, int argc, // Add stack frame to indicate we're executing a callk. // This is useful in debugger backtraces if this // kernel function calls a script itself. - ExecStack xstack(NULL_REG, NULL_REG, NULL, argc, argv - 1, 0xFFFF, NULL_REG, + ExecStack xstack(NULL_REG, NULL_REG, NULL, argc, argv - 1, 0xFFFF, make_reg32(0, 0), kernelCallNr, -1, -1, s->_executionStack.size() - 1, EXEC_STACK_TYPE_KERNEL); s->_executionStack.push_back(xstack); } @@ -818,11 +819,11 @@ void run_vm(EngineState *s) { StackPtr call_base = s->xs->sp - argc; s->xs->sp[1].incOffset(s->r_rest); - uint16 localCallOffset = s->xs->addr.pc.getOffset() + opparams[0]; + uint32 localCallOffset = s->xs->addr.pc.getOffset() + opparams[0]; ExecStack xstack(s->xs->objp, s->xs->objp, s->xs->sp, (call_base->requireUint16()) + s->r_rest, call_base, - s->xs->local_segment, make_reg(s->xs->addr.pc.getSegment(), localCallOffset), + s->xs->local_segment, make_reg32(s->xs->addr.pc.getSegment(), localCallOffset), NULL_SELECTOR, -1, localCallOffset, s->_executionStack.size() - 1, EXEC_STACK_TYPE_CALL); @@ -1117,7 +1118,7 @@ void run_vm(EngineState *s) { switch (g_sci->_features->detectLofsType()) { case SCI_VERSION_0_EARLY: - r_temp.setOffset(s->xs->addr.pc.getOffset() + opparams[0]); + r_temp.setOffset((uint16)s->xs->addr.pc.getOffset() + opparams[0]); break; case SCI_VERSION_1_MIDDLE: r_temp.setOffset(opparams[0]); diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index f2d225b1d8..a0fd6689df 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -82,7 +82,7 @@ struct ExecStack { union { ObjVarRef varp; // Variable pointer for r/w access - reg_t pc; // Pointer to the initial program counter. Not accurate for the TOS element + reg32_t pc; // Pointer to the initial program counter. Not accurate for the TOS element } addr; StackPtr fp; // Frame pointer @@ -102,7 +102,7 @@ struct ExecStack { reg_t* getVarPointer(SegManager *segMan) const; ExecStack(reg_t objp_, reg_t sendp_, StackPtr sp_, int argc_, StackPtr argp_, - SegmentId localsSegment_, reg_t pc_, Selector debugSelector_, + SegmentId localsSegment_, reg32_t pc_, Selector debugSelector_, int debugExportId_, int debugLocalCallOffset_, int debugOrigin_, ExecStackType type_) { objp = objp_; diff --git a/engines/sci/engine/vm_types.h b/engines/sci/engine/vm_types.h index 2995ba3c12..9a7589e9a7 100644 --- a/engines/sci/engine/vm_types.h +++ b/engines/sci/engine/vm_types.h @@ -169,6 +169,49 @@ static inline reg_t make_reg(SegmentId segment, uint16 offset) { #define PRINT_REG(r) (0xffff) & (unsigned) (r).getSegment(), (unsigned) (r).getOffset() +// A true 32-bit reg_t +struct reg32_t { + // Segment and offset. These should never be accessed directly + SegmentId _segment; + uint32 _offset; + + inline SegmentId getSegment() const { + return _segment; + } + + inline void setSegment(SegmentId segment) { + _segment = segment; + } + + inline uint32 getOffset() const { + return _offset; + } + + inline void setOffset(uint32 offset) { + _offset = offset; + } + + inline void incOffset(int32 offset) { + setOffset(getOffset() + offset); + } + + // Comparison operators + bool operator==(const reg32_t &x) const { + return (getOffset() == x.getOffset()) && (getSegment() == x.getSegment()); + } + + bool operator!=(const reg32_t &x) const { + return (getOffset() != x.getOffset()) || (getSegment() != x.getSegment()); + } +}; + +static inline reg32_t make_reg32(SegmentId segment, uint32 offset) { + reg32_t r; + r.setSegment(segment); + r.setOffset(offset); + return r; +} + // Stack pointer type typedef reg_t *StackPtr; -- cgit v1.2.3 From 478fd0ed2957a766df2860c66fa476aa3665fc8f Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 24 Jun 2012 18:17:47 +0200 Subject: CREATE_PROJECT: Clarify license on imported code License confirmed by personal email by littleboy. This clarification was requested in bug #3527268. --- devtools/create_project/xcode.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index 39470f4e19..9784bb0bf5 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -871,7 +871,9 @@ std::string XCodeProvider::writeProperty(const std::string &variable, Property & std::string XCodeProvider::writeSetting(const std::string &variable, std::string value, std::string comment, int flags, int indent) const { return writeSetting(variable, Setting(value, comment, flags, indent)); } -// Heavily modified (not in a good way) function, imported from QMake XCode project generator (licensed under the QT license) + +// Heavily modified (not in a good way) function, imported from the QMake +// XCode project generator pbuilder_pbx.cpp, writeSettings() (under LGPL 2.1) std::string XCodeProvider::writeSetting(const std::string &variable, const Setting &setting) const { std::string output; const std::string quote = (setting.flags & SettingsNoQuote) ? "" : "\""; -- cgit v1.2.3 From 99de89c974fc24bf58b034842750e522d7d441d4 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 24 Jun 2012 19:52:37 +0300 Subject: SCI: Add a workaround for script bug #3537232 The bug in question is "SCI: SQ4 Floppy DOS title screen skipping too quickly", and is caused by game scripts not waiting between palette calls --- engines/sci/engine/kgraphics.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 0ef268f108..ec8e0dbf1b 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -645,6 +645,20 @@ reg_t kPaletteAnimate(EngineState *s, int argc, reg_t *argv) { if (paletteChanged) g_sci->_gfxPalette->kernelAnimateSet(); + // WORKAROUND: The game scripts in SQ4 floppy count the number of elapsed + // cycles in the intro from the number of successive kAnimate calls during + // the palette cycling effect, while showing the SQ4 logo. This worked in + // older computers because each animate call took awhile to complete. + // Normally, such scripts are handled automatically by our speed throttler, + // however in this case there are no calls to kGameIsRestarting (where the + // speed throttler gets called) between the different palette animation calls. + // Thus, we add a small delay between each animate call to make the whole + // palette animation effect slower and visible, and not have the logo screen + // get skipped because the scripts don't wait between animation steps. Fixes + // bug #3537232. + if (g_sci->getGameId() == GID_SQ4 && !g_sci->isCD() && s->currentRoomNumber() == 1) + g_sci->sleep(10); + return s->r_acc; } -- cgit v1.2.3 From 54fba983476987436a1cea3dda7e2e4b004d8fe2 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Thu, 7 Jun 2012 01:46:32 +0100 Subject: SWORD1: Add warning for untranslated subtitles This should help adding workarounds for those by providing all the needed information (textId and english text). --- engines/sword1/objectman.cpp | 26 ++++++++++++++++++++++---- engines/sword1/objectman.h | 3 +++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/engines/sword1/objectman.cpp b/engines/sword1/objectman.cpp index d0803590a7..d3890cc1fc 100644 --- a/engines/sword1/objectman.cpp +++ b/engines/sword1/objectman.cpp @@ -99,13 +99,27 @@ uint8 ObjectMan::fnCheckForTextLine(uint32 textId) { char *ObjectMan::lockText(uint32 textId) { uint8 lang = SwordEngine::_systemVars.language; + char *text = lockText(textId, lang); + if (text == 0) { + if (lang != BS1_ENGLISH) { + text = lockText(textId, BS1_ENGLISH); + if (text != 0) + warning("Missing translation for textId %u (\"%s\")", textId, text); + unlockText(textId, BS1_ENGLISH); + } + return _missingSubTitleStr; + } + return text; +} + +char *ObjectMan::lockText(uint32 textId, uint8 lang) { char *addr = (char *)_resMan->openFetchRes(_textList[textId / ITM_PER_SEC][lang]); if (addr == 0) - return _missingSubTitleStr; + return NULL; addr += sizeof(Header); if ((textId & ITM_ID) >= _resMan->readUint32(addr)) { warning("ObjectMan::lockText(%d): only %d texts in file", textId & ITM_ID, _resMan->readUint32(addr)); - return _missingSubTitleStr; + return NULL; } uint32 offset = _resMan->readUint32(addr + ((textId & ITM_ID) + 1) * 4); if (offset == 0) { @@ -115,13 +129,17 @@ char *ObjectMan::lockText(uint32 textId) { return const_cast(_translationId2950145[lang]); warning("ObjectMan::lockText(%d): text number has no text lines", textId); - return _missingSubTitleStr; + return NULL; } return addr + offset; } void ObjectMan::unlockText(uint32 textId) { - _resMan->resClose(_textList[textId / ITM_PER_SEC][SwordEngine::_systemVars.language]); + unlockText(textId, SwordEngine::_systemVars.language); +} + +void ObjectMan::unlockText(uint32 textId, uint8 lang) { + _resMan->resClose(_textList[textId / ITM_PER_SEC][lang]); } uint32 ObjectMan::lastTextNumber(int section) { diff --git a/engines/sword1/objectman.h b/engines/sword1/objectman.h index ca3c7c1526..cce360573a 100644 --- a/engines/sword1/objectman.h +++ b/engines/sword1/objectman.h @@ -53,6 +53,9 @@ public: void saveLiveList(uint16 *dest); // for loading/saving void loadLiveList(uint16 *src); private: + char *lockText(uint32 textId, uint8 language); + void unlockText(uint32 textId, uint8 language); + ResMan *_resMan; static const uint32 _objectList[TOTAL_SECTIONS]; //a table of pointers to object files static const uint32 _textList[TOTAL_SECTIONS][7]; //a table of pointers to text files -- cgit v1.2.3 From 865488ffcac6226b72ce0ea9b86d2ef2ba5bd266 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 24 Jun 2012 17:27:16 +0100 Subject: I18N: Update Spanish translation from patch #3537204 --- po/es_ES.po | 154 ++++++++++++++++++++++++++++-------------------------------- 1 file changed, 72 insertions(+), 82 deletions(-) diff --git a/po/es_ES.po b/po/es_ES.po index 366dcf4905..612a19ba4a 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: ScummVM 1.4.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-05-20 22:39+0100\n" -"PO-Revision-Date: 2011-10-23 21:53+0100\n" +"PO-Revision-Date: 2012-06-22 17:44+0100\n" "Last-Translator: Tomás Maidagan\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -77,7 +77,6 @@ msgid "Remap keys" msgstr "Asignar teclas" #: gui/gui-manager.cpp:129 base/main.cpp:307 -#, fuzzy msgid "Toggle FullScreen" msgstr "Activar pantalla completa" @@ -193,9 +192,8 @@ msgid "Platform:" msgstr "Plat.:" #: gui/launcher.cpp:231 -#, fuzzy msgid "Engine" -msgstr "Examinar" +msgstr "Motor" #: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" @@ -604,7 +602,7 @@ msgstr "Renderizado:" #: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" -msgstr "Modos especiales de expansión soportados por algunos juegos" +msgstr "Modos especiales de expansión compatibles con algunos juegos" #: gui/options.cpp:753 #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 @@ -692,8 +690,8 @@ msgstr "SoundFont:" #: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "" -"SoundFont está soportado por algunas tarjetas de sonido, además de " -"Fluidsynth y Timidity" +"SoundFont es compatible con algunas tarjetas de sonido, con Fluidsynth y con " +"Timidity" #: gui/options.cpp:851 msgctxt "lowres" @@ -895,7 +893,7 @@ msgstr "Idioma de la interfaz de ScummVM" #: gui/options.cpp:1347 msgid "You have to restart ScummVM before your changes will take effect." -msgstr "Tienes que reiniciar ScummVM para que los cambios surjan efecto." +msgstr "Tienes que reiniciar ScummVM para aplicar los cambios." #: gui/options.cpp:1360 msgid "Select directory for savegames" @@ -998,7 +996,7 @@ msgstr "Eliminar valor" #: base/main.cpp:209 #, c-format msgid "Engine does not support debug level '%s'" -msgstr "El motor no soporta el nivel de debug '%s'" +msgstr "El motor no es compatible con el nivel de debug '%s'" #: base/main.cpp:287 msgid "Menu" @@ -1037,11 +1035,11 @@ msgstr "No se han encontrado datos de juego" #: common/error.cpp:42 msgid "Game id not supported" -msgstr "ID del juego no soportada" +msgstr "ID del juego no compatible" #: common/error.cpp:44 msgid "Unsupported color mode" -msgstr "Modo de color no soportado" +msgstr "Modo de color no compatible" #: common/error.cpp:47 msgid "Read permission denied" @@ -1164,14 +1162,14 @@ msgstr "" "para obtener más ayuda." #: engines/dialogs.cpp:243 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Lo sentimos, aún no hay ayuda disponible para este juego. Por favor, " -"consulta el archivo README para encontrar información básica e instrucciones " -"para obtener más ayuda." +"Ha habido un fallo al guardar la partida (%s). Por favor, consulta el " +"archivo README para encontrar información básica e instrucciones sobre cómo " +"obtener más ayuda." #: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 @@ -1232,14 +1230,14 @@ msgstr "" "Consulta el archivo README para más detalles." #: engines/engine.cpp:426 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate load failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Lo sentimos, aún no hay ayuda disponible para este juego. Por favor, " -"consulta el archivo README para encontrar información básica e instrucciones " -"para obtener más ayuda." +"Ha habido un fallo al cargar la partida (%s). Por favor, consulta el archivo " +"README para encontrar información básica e instrucciones sobre cómo obtener " +"más ayuda." #: engines/engine.cpp:439 msgid "" @@ -1253,17 +1251,18 @@ msgstr "" #: engines/engine.cpp:442 msgid "Start anyway" -msgstr "Jugar de todos modos" +msgstr "Jugar aun así" #: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" -msgstr "" +msgstr "Usar pantallas de guardar/cargar originales" #: 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 "" +"Utilizar las pantallas de guardar/cargar originales, en vez de las de ScummVM" #: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 msgid "Restore game:" @@ -1274,68 +1273,68 @@ msgid "Restore" msgstr "Cargar" #: engines/dreamweb/detection.cpp:57 -#, fuzzy msgid "Use bright palette mode" -msgstr "Objeto superior derecho" +msgstr "Usar paleta original" #: engines/dreamweb/detection.cpp:58 msgid "Display graphics using the game's bright palette" -msgstr "" +msgstr "Utilizar los niveles de brillo originales del juego" #: engines/sci/detection.cpp:370 msgid "EGA undithering" msgstr "Difuminado EGA" #: engines/sci/detection.cpp:371 -#, fuzzy msgid "Enable undithering in EGA games" -msgstr "Activar difuminado en los juegos EGA compatibles" +msgstr "Activar difuminado en los juegos EGA" #: engines/sci/detection.cpp:380 -#, fuzzy msgid "Prefer digital sound effects" -msgstr "Volumen de los efectos de sonido" +msgstr "Preferir efectos de sonido digitales" #: engines/sci/detection.cpp:381 msgid "Prefer digital sound effects instead of synthesized ones" -msgstr "" +msgstr "Preferir efectos de sonido digitales en vez de los sintetizados" #: engines/sci/detection.cpp:400 msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "" +msgstr "Usar IMF/Yahama FB-01 para la salida 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 "" +"Usa una tarjeta IBM Music o un módulo sintetizador Yahama FB-01 FM para la " +"salida MIDI" #: engines/sci/detection.cpp:411 msgid "Use CD audio" -msgstr "" +msgstr "Usar CD audio" #: engines/sci/detection.cpp:412 msgid "Use CD audio instead of in-game audio, if available" -msgstr "" +msgstr "Usa CD audio en vez del sonido interno del juego, si está disponible" #: engines/sci/detection.cpp:422 msgid "Use Windows cursors" -msgstr "" +msgstr "Usar cursores de Windows" #: engines/sci/detection.cpp:423 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" +"Usar los cursores de Windows (más pequeños y monocromos) en vez de los de DOS" #: engines/sci/detection.cpp:433 -#, fuzzy msgid "Use silver cursors" -msgstr "Cursor normal" +msgstr "Usar cursores plateados" #: engines/sci/detection.cpp:434 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" +"Usar los cursores plateados alternativos, en vez de los dorados normales" #: engines/scumm/dialogs.cpp:175 #, c-format @@ -1457,7 +1456,7 @@ msgstr "Selecciona un nivel de dificultad." #: engines/scumm/dialogs.cpp:655 msgid "Refer to your Loom(TM) manual for help." -msgstr "Mira en el Manual para mayor información." +msgstr "Consulta el manual para obtener más información." #: engines/scumm/dialogs.cpp:658 msgid "Standard" @@ -2088,115 +2087,107 @@ msgstr "Fallo al guardar la partida" #. Malcolm makes a joke. #: engines/kyra/detection.cpp:62 msgid "Studio audience" -msgstr "" +msgstr "Risas del público" #: engines/kyra/detection.cpp:63 msgid "Enable studio audience" -msgstr "" +msgstr "Activa las risas del público" #. I18N: This option allows the user to skip text and cutscenes. #: engines/kyra/detection.cpp:73 msgid "Skip support" -msgstr "" +msgstr "Permitir omisiones" #: engines/kyra/detection.cpp:74 msgid "Allow text and cutscenes to be skipped" -msgstr "" +msgstr "Permite saltarse frases y vídeos" #. I18N: Helium mode makes people sound like they've inhaled Helium. #: engines/kyra/detection.cpp:84 msgid "Helium mode" -msgstr "" +msgstr "Modo helio" #: engines/kyra/detection.cpp:85 -#, fuzzy msgid "Enable helium mode" -msgstr "Activar modo Roland GS" +msgstr "Activa el modo helio" #. 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 "Desplazamiento suave" #: engines/kyra/detection.cpp:100 msgid "Enable smooth scrolling when walking" -msgstr "" +msgstr "Activa el desplazamiento de pantalla suave al caminar" #. 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 "Cursor normal" +msgstr "Cursores flotantes" #: engines/kyra/detection.cpp:113 msgid "Enable floating cursors" -msgstr "" +msgstr "Activar cursores flotantes" #. I18N: HP stands for Hit Points #: engines/kyra/detection.cpp:127 msgid "HP bar graphs" -msgstr "" +msgstr "Barras de energía" #: engines/kyra/detection.cpp:128 msgid "Enable hit point bar graphs" -msgstr "" +msgstr "Activa las barras de energía" #: engines/kyra/lol.cpp:478 msgid "Attack 1" -msgstr "" +msgstr "Ataque 1" #: engines/kyra/lol.cpp:479 msgid "Attack 2" -msgstr "" +msgstr "Ataque 2" #: engines/kyra/lol.cpp:480 msgid "Attack 3" -msgstr "" +msgstr "Ataque 3" #: engines/kyra/lol.cpp:481 msgid "Move Forward" -msgstr "" +msgstr "Avanzar" #: engines/kyra/lol.cpp:482 msgid "Move Back" -msgstr "" +msgstr "Retroceder" #: engines/kyra/lol.cpp:483 msgid "Slide Left" -msgstr "" +msgstr "Deslizarse a la izquierda" #: engines/kyra/lol.cpp:484 -#, fuzzy msgid "Slide Right" -msgstr "Derecha" +msgstr "Deslizarse a la derecha" #: engines/kyra/lol.cpp:485 -#, fuzzy msgid "Turn Left" -msgstr "Apagar" +msgstr "Girar a la izquierda" #: engines/kyra/lol.cpp:486 -#, fuzzy msgid "Turn Right" -msgstr "Derecha" +msgstr "Girar a la derecha" #: engines/kyra/lol.cpp:487 -#, fuzzy msgid "Rest" -msgstr "Cargar" +msgstr "Descansar" #: engines/kyra/lol.cpp:488 -#, fuzzy msgid "Options" -msgstr "~O~pciones" +msgstr "Opciones" #: engines/kyra/lol.cpp:489 -#, fuzzy msgid "Choose Spell" -msgstr "Aceptar" +msgstr "Elegir hechizo" #: engines/kyra/sound_midi.cpp:475 msgid "" @@ -2206,19 +2197,20 @@ msgid "" "General MIDI ones. After all it might happen\n" "that a few tracks will not be correctly played." msgstr "" -"Estás usando un dispositivo General Midi,\n" -"pero el juego solo soporta MIDI Roland MT32.\n" +"Estás usando un dispositivo General Midi, pero el\n" +"juego solo es compatible con MIDI Roland MT32.\n" "Intentamos adaptar los instrumentos Roland MT32\n" "a los de General MIDI, pero es posible que algunas\n" "de las pistas no se reproduzcan correctamente." #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" -msgstr "" +msgstr "Intro de disquete" #: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" msgstr "" +"Usa la introducción de la versión en disquete (solo para la versión CD)" #: engines/sky/compact.cpp:130 msgid "" @@ -2239,7 +2231,7 @@ msgstr "" #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" -msgstr "" +msgstr "El vídeo de PSX '%s' no se puede reproducir en modo paleta" #: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 msgid "DXA cutscenes found but ScummVM has been built without zlib support" @@ -2295,19 +2287,19 @@ msgid "This is the end of the Broken Sword 1 Demo" msgstr "Este es el final de la demo de Broken Sword 1" #: engines/sword2/animation.cpp:435 -#, fuzzy msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" -"Se han encontrado vídeos DXA, pero se ha compilado ScummVM sin soporte zlib" +"Se han encontrado vídeos PSX, pero se ha compilado ScummVM sin soporte de " +"color RGB" #: engines/sword2/sword2.cpp:79 msgid "Show object labels" -msgstr "" +msgstr "Mostrar etiquetas de objetos" #: engines/sword2/sword2.cpp:80 msgid "Show labels for objects on mouse hover" -msgstr "" +msgstr "Muestra las etiquetas de los objetos al pasar el ratón" #: engines/parallaction/saveload.cpp:133 #, c-format @@ -2449,7 +2441,6 @@ msgid "Keymap:" msgstr "Asignación de teclas:" #: backends/keymapper/remap-dialog.cpp:66 -#, fuzzy msgid " (Effective)" msgstr "(Activa)" @@ -2459,7 +2450,7 @@ msgstr "(Activa)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Blocked)" -msgstr "" +msgstr "(Bloqueado)" #: backends/keymapper/remap-dialog.cpp:119 msgid " (Global)" @@ -2563,7 +2554,7 @@ msgstr "Modo Touchpad desactivado." #: backends/platform/maemo/maemo.cpp:205 msgid "Click Mode" -msgstr "" +msgstr "Modo clic" #: backends/platform/maemo/maemo.cpp:211 #: backends/platform/symbian/src/SymbianActions.cpp:42 @@ -2574,9 +2565,8 @@ msgid "Left Click" msgstr "Clic izquierdo" #: backends/platform/maemo/maemo.cpp:214 -#, fuzzy msgid "Middle Click" -msgstr "Objeto izquierdo del medio" +msgstr "Clic central" #: backends/platform/maemo/maemo.cpp:217 #: backends/platform/symbian/src/SymbianActions.cpp:43 @@ -3019,7 +3009,7 @@ msgstr "Bajando el volumen" #: backends/updates/macosx/macosx-updates.mm:65 msgid "Check for Updates..." -msgstr "Comprobando las actualizaciones..." +msgstr "Buscar actualizaciones..." #: backends/platform/bada/form.cpp:269 msgid "Right Click Once" -- cgit v1.2.3 From 314f76503f7ba0fd3f4140cc6670f8c7b7e3aedd Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 24 Jun 2012 17:57:07 +0100 Subject: I18N: Regenerate translations data file --- gui/themes/translations.dat | Bin 312684 -> 314939 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 1463b70212..f4a3a96084 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 0bd7d1d1b4ba23fddfd4dea685125abebf275cb4 Mon Sep 17 00:00:00 2001 From: Simon Sawatzki Date: Sun, 24 Jun 2012 19:12:06 +0200 Subject: I18N: Updated German GUI translation. --- po/de_DE.po | 145 +++++++++++++++++++++++++++++------------------------------- 1 file changed, 69 insertions(+), 76 deletions(-) diff --git a/po/de_DE.po b/po/de_DE.po index e11a3d4fc7..9a4d9acd79 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: ScummVM 1.4.0git\n" +"Project-Id-Version: ScummVM 1.5.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-01-29 21:11+0100\n" +"PO-Revision-Date: 2012-06-07 13:48+0100\n" "Last-Translator: Simon Sawatzki \n" "Language-Team: Simon Sawatzki (Lead), Lothar Serra Mari " " (Contributor)\n" @@ -79,9 +79,8 @@ msgid "Remap keys" msgstr "Tasten neu zuweisen" #: gui/gui-manager.cpp:129 base/main.cpp:307 -#, fuzzy msgid "Toggle FullScreen" -msgstr "Vollbild-/Fenster-Modus" +msgstr "Vollbild EIN/AUS" #: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145 msgid "Choose an action to map" @@ -195,9 +194,8 @@ msgid "Platform:" msgstr "Plattform:" #: gui/launcher.cpp:231 -#, fuzzy msgid "Engine" -msgstr "Betrachte" +msgstr "Engine" #: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" @@ -788,7 +786,7 @@ msgstr "Spr." #: gui/options.cpp:931 msgid "Subs" -msgstr "TXT" +msgstr "Text" #: gui/options.cpp:932 msgctxt "lowres" @@ -1172,18 +1170,16 @@ msgid "" "further assistance." msgstr "" "Leider bietet diese Engine keine Spielhilfe. Bitte lesen Sie die Liesmich-" -"Datei für grundlegende Informationen und Anweisungen dazu, wie man an " -"weitere Hilfe gelangt." +"Datei für grundlegende Informationen und Anweisungen zu weiterer Hilfe." #: engines/dialogs.cpp:243 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Leider bietet diese Engine keine Spielhilfe. Bitte lesen Sie die Liesmich-" -"Datei für grundlegende Informationen und Anweisungen dazu, wie man an " -"weitere Hilfe gelangt." +"Speichern des Spielstands %s fehlgeschlagen! Bitte lesen Sie die Liesmich-" +"Datei für grundlegende Informationen und Anweisungen zu weiterer Hilfe." #: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 @@ -1247,14 +1243,13 @@ msgstr "" "Liesmich-Datei für weitere Informationen." #: engines/engine.cpp:426 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate load failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Leider bietet diese Engine keine Spielhilfe. Bitte lesen Sie die Liesmich-" -"Datei für grundlegende Informationen und Anweisungen dazu, wie man an " -"weitere Hilfe gelangt." +"Laden des Spielstands %s fehlgeschlagen! Bitte lesen Sie die Liesmich-" +"Datei für grundlegende Informationen und Anweisungen zu weiterer Hilfe." #: engines/engine.cpp:439 msgid "" @@ -1274,12 +1269,12 @@ msgstr "Trotzdem starten" #: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" -msgstr "" +msgstr "Originale Spielstand-Menüs" #: 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 "Verwendet die originalen Menüs zum Speichern und Laden statt der von ScummVM." #: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 msgid "Restore game:" @@ -1290,70 +1285,70 @@ msgid "Restore" msgstr "Laden" #: engines/dreamweb/detection.cpp:57 -#, fuzzy msgid "Use bright palette mode" -msgstr "Oberer rechter Gegenstand" +msgstr "Modus für helle Palette verwenden" #: engines/dreamweb/detection.cpp:58 msgid "Display graphics using the game's bright palette" -msgstr "" +msgstr "Zeigt Grafiken über helle Spielpalette an." #: engines/sci/detection.cpp:370 msgid "EGA undithering" msgstr "Antifehlerdiffusion für EGA" #: engines/sci/detection.cpp:371 -#, fuzzy msgid "Enable undithering in EGA games" -msgstr "" -"Aktiviert die Aufhebung der Fehlerdiffusion in EGA-Spielen, die dies " -"unterstützen." +msgstr "Aktiviert die Aufhebung der Fehlerdiffusion in EGA-Spielen." #: engines/sci/detection.cpp:380 -#, fuzzy msgid "Prefer digital sound effects" -msgstr "Lautstärke spezieller Soundeffekte" +msgstr "Digitale Sound-Effekte bevorzugen" #: engines/sci/detection.cpp:381 msgid "Prefer digital sound effects instead of synthesized ones" -msgstr "" +msgstr "Bevorzugt digitale Sound-Effekte statt synthethisierter." #: engines/sci/detection.cpp:400 msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "" +msgstr "IMF/Yahama FB-01 für MIDI-Ausgabe verwenden" #: engines/sci/detection.cpp:401 msgid "" "Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " "output" msgstr "" +"Verwendet eine Music-Feature-Karte von IBM oder ein " +"Yahama-FB-01-FM-Synthetisierungsmodul für die MIDI-Ausgabe." #: engines/sci/detection.cpp:411 msgid "Use CD audio" -msgstr "" +msgstr "CD-Ton verwenden" #: engines/sci/detection.cpp:412 msgid "Use CD audio instead of in-game audio, if available" -msgstr "" +msgstr "Verwendet CD-Ton anstatt des Tons im Spiel, sofern verfügbar." #: engines/sci/detection.cpp:422 msgid "Use Windows cursors" -msgstr "" +msgstr "Windows-Mauszeiger verwenden" #: engines/sci/detection.cpp:423 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" +"Verwendet die Windows-Mauszeiger (kleiner und schwarz-weiß) anstatt der von " +"DOS." #: engines/sci/detection.cpp:433 -#, fuzzy msgid "Use silver cursors" -msgstr "Normaler Mauszeiger" +msgstr "Silberne Mauszeiger verwenden" #: engines/sci/detection.cpp:434 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" +"Verwendet alternativen Satz silberner Mauszeiger anstatt der normalen " +"goldenen." #: engines/scumm/dialogs.cpp:175 #, c-format @@ -2008,8 +2003,9 @@ msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" "but %s is missing. Using AdLib instead." msgstr "" -"Systemeigene MIDI-Ünterstützung erfordert das Roland-Upgrade von LucasArts,\n" -"aber %s fehlt. Stattdessen wird AdLib verwendet." +"Systemeigene MIDI-Ünterstützung erfordert das\n" +"Roland-Upgrade von LucasArts, aber %s\n" +"fehlt. Stattdessen wird AdLib verwendet." #: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 #, c-format @@ -2107,61 +2103,59 @@ msgstr "Konnte Spielstand nicht speichern." #. Malcolm makes a joke. #: engines/kyra/detection.cpp:62 msgid "Studio audience" -msgstr "" +msgstr "Studio-Publikum" #: engines/kyra/detection.cpp:63 msgid "Enable studio audience" -msgstr "" +msgstr "Aktiviert Studio-Publikum." #. I18N: This option allows the user to skip text and cutscenes. #: engines/kyra/detection.cpp:73 msgid "Skip support" -msgstr "" +msgstr "Überspring-Unterstützung" #: engines/kyra/detection.cpp:74 msgid "Allow text and cutscenes to be skipped" -msgstr "" +msgstr "Erlaubt das Überspringen von Textteilen und Zwischensequenzen." #. I18N: Helium mode makes people sound like they've inhaled Helium. #: engines/kyra/detection.cpp:84 msgid "Helium mode" -msgstr "" +msgstr "Helium-Modus" #: engines/kyra/detection.cpp:85 -#, fuzzy msgid "Enable helium mode" -msgstr "Roland-GS-Modus" +msgstr "Aktiviert Helium-Modus." #. 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 "Gleichmäßiges Scrollen" #: engines/kyra/detection.cpp:100 msgid "Enable smooth scrolling when walking" -msgstr "" +msgstr "Aktiviert gleichmäßiges Scrollen beim Gehen." #. 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 "Normaler Mauszeiger" +msgstr "Richtungspfeil-Mauszeiger" #: engines/kyra/detection.cpp:113 msgid "Enable floating cursors" -msgstr "" +msgstr "Aktiviert Richtungspfeil-Mauszeiger." #. I18N: HP stands for Hit Points #: engines/kyra/detection.cpp:127 msgid "HP bar graphs" -msgstr "" +msgstr "Trefferpunkte-Balken" #: engines/kyra/detection.cpp:128 msgid "Enable hit point bar graphs" -msgstr "" +msgstr "Aktiviert grafische Trefferpunkte-Balken." #: engines/kyra/lol.cpp:478 msgid "Attack 1" @@ -2222,17 +2216,18 @@ msgstr "" "Sie scheinen ein General-MIDI-Gerät zu\n" "verwenden, aber das Spiel unterstützt nur\n" "Roland MT-32 MIDI. Es wird versucht, die\n" -"Roland-MT-32-Instrumente denen von General MIDI\n" -"zuzuordnen. Es kann jedoch vorkommen, dass ein\n" -"paar Musikstücke nicht richtig abgespielt werden." +"Roland-MT-32-Instrumente denen von\n" +"General MIDI zuzuordnen. Es kann jedoch\n" +"vorkommen, dass ein paar Musikstücke nicht\n" +"richtig abgespielt werden." #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" -msgstr "" +msgstr "Disketten-Vorspann" #: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" -msgstr "" +msgstr "Verwendet den Vorspann der Diskettenversion (nur bei CD-Version)." #: engines/sky/compact.cpp:130 msgid "" @@ -2256,6 +2251,7 @@ msgstr "" #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" msgstr "" +"PSX-Zwischensequenz \"%s\" kann in Palettenmodus nicht wiedergegeben werden." #: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 msgid "DXA cutscenes found but ScummVM has been built without zlib support" @@ -2282,13 +2278,13 @@ msgid "" "Press OK to convert them now, otherwise you will be asked again the next " "time you start the game.\n" msgstr "" -"ScummVM hat erkannt, dass Sie alte Speicherstände von Baphomets Fluch 1 " +"ScummVM hat erkannt, dass Sie alte Spielstände von Baphomets Fluch 1 " "haben, die umgewandelt werden sollten.\n" -"Das alte Spielstandsformat wird nicht mehr unterstützt, also können Sie " -"diese Speicherstände nicht laden, wenn Sie diese nicht konvertieren.\n" +"Das alte Speicherformat wird nicht mehr unterstützt, also können Sie " +"diese Spielstände unkonvertiert nicht laden.\n" "\n" -"Klicken Sie auf OK, um diese jetzt umzuwandeln, ansonsten werden Sie erneut " -"gefragt, wenn Sie das nächste Mal dieses Spiel starten.\n" +"Klicken Sie auf OK, um diese jetzt umzuwandeln, sonst werden Sie erneut " +"gefragt, wenn Sie nächstes Mal dieses Spiel starten.\n" #: engines/sword1/control.cpp:1232 #, c-format @@ -2312,20 +2308,19 @@ msgid "This is the end of the Broken Sword 1 Demo" msgstr "Das ist das Ende der Demo von Broken Sword 1 (Baphomets Fluch 1)." #: engines/sword2/animation.cpp:435 -#, fuzzy msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" -"DXA-Zwischensequenzen gefunden, aber ScummVM wurde ohne Zlib-Unterstützung " -"erstellt." +"PSX-Zwischensequenzen gefunden, aber ScummVM wurde ohne Unterstützung " +"für RGB-Farben erstellt." #: engines/sword2/sword2.cpp:79 msgid "Show object labels" -msgstr "" +msgstr "Objektnamen zeigen" #: engines/sword2/sword2.cpp:80 msgid "Show labels for objects on mouse hover" -msgstr "" +msgstr "Zeigt Objektbeschriftungen bei Mausberührung an." #: engines/parallaction/saveload.cpp:133 #, c-format @@ -2353,13 +2348,13 @@ msgid "" "\n" "Press OK to convert them now, otherwise you will be asked next time.\n" msgstr "" -"ScummVM hat erkannt, dass Sie alte Speicherstände von Nippon Safes haben, " +"ScummVM hat erkannt, dass Sie alte Spielstände von Nippon Safes haben, " "die umbenannt werden sollten.\n" "Die alten Dateinamen werden nicht mehr unterstützt, also können Sie diese " -"Speicherstände nicht laden, wenn Sie diese nicht konvertieren.\n" +"Spielstände unkonvertiert nicht laden.\n" "\n" -"Klicken Sie auf OK, um diese jetzt umzuwandeln, ansonsten werden Sie erneut " -"gefragt, wenn Sie das nächste Mal dieses Spiel starten.\n" +"Klicken Sie auf OK, um diese jetzt umzuwandeln, sonst werden Sie erneut " +"gefragt, wenn Sie nächstes Mal dieses Spiel starten.\n" #: engines/parallaction/saveload.cpp:326 msgid "ScummVM successfully converted all your savefiles." @@ -2467,9 +2462,8 @@ msgid "Keymap:" msgstr "Tasten-Layout:" #: backends/keymapper/remap-dialog.cpp:66 -#, fuzzy msgid " (Effective)" -msgstr " (Aktiv)" +msgstr " (Aktuell)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Active)" @@ -2477,7 +2471,7 @@ msgstr " (Aktiv)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Blocked)" -msgstr "" +msgstr " (Blockiert)" #: backends/keymapper/remap-dialog.cpp:119 msgid " (Global)" @@ -2581,7 +2575,7 @@ msgstr "Touchpad-Modus ausgeschaltet." #: backends/platform/maemo/maemo.cpp:205 msgid "Click Mode" -msgstr "" +msgstr "Klickmodus" #: backends/platform/maemo/maemo.cpp:211 #: backends/platform/symbian/src/SymbianActions.cpp:42 @@ -2592,9 +2586,8 @@ msgid "Left Click" msgstr "Linksklick" #: backends/platform/maemo/maemo.cpp:214 -#, fuzzy msgid "Middle Click" -msgstr "Mittlerer linker Gegenstand" +msgstr "Mittelklick" #: backends/platform/maemo/maemo.cpp:217 #: backends/platform/symbian/src/SymbianActions.cpp:43 -- cgit v1.2.3 From 97168d52852cae7e525695e3c4d5691801fdf029 Mon Sep 17 00:00:00 2001 From: Simon Sawatzki Date: Sun, 24 Jun 2012 19:13:42 +0200 Subject: DOCS: Updated German README (Liesmich) and NEWS (Neues). Liesmich now based on README SHA1 ID: d860f0f9bf823655844c5fc56a5ac8f94774aa23 Neues now based on NEWS SHA1 ID: 555afaa50c45a51e53c88c6cb1d52a66ba367fd5 --- doc/de/Liesmich | 143 +++++++++++++++++++++++++++++++++++++++++++++----------- doc/de/Neues | 85 ++++++++++++++++++++++++++------- 2 files changed, 183 insertions(+), 45 deletions(-) diff --git a/doc/de/Liesmich b/doc/de/Liesmich index 5d24ec050b..e8ee4ca3f8 100644 --- a/doc/de/Liesmich +++ b/doc/de/Liesmich @@ -56,6 +56,8 @@ Inhaltsverzeichnis: * 7.8 Komprimierte Audio-Dateien verwenden (MP3, Ogg Vorbis, FLAC) * 7.9 Ausgabefrequenzen 8.0) Konfigurationsdatei + * 8.1 Verwendbare Konfigurationsschlüsselwörter + * 8.2 Spielspezifische Optionen bei der grafischen Benutzeroberfläche 9.0) Kompilierung @@ -273,11 +275,16 @@ AGOS-Spiele von Adventuresoft/Horrorsoft: Floyd - Es gibt noch Helden [feeble] GOB-Spiele von Coktel Vision: + Bambou le sauveur de la jungle [bambou] Bargon Attack [bargon] + Fascination [fascination] + Geisha [geisha] Gobliiins [gob1] Gobliins 2 [gob2] Goblins 3 [gob3] Lost in Time [lostintime] + Once Upon A Time: Little Red Riding Hood [littlered] + Urban Runner [urban] Woodruff and the Schnibble of Azimuth [woodruff] Ween: The Prophecy [ween] @@ -310,6 +317,7 @@ Andere Spiele: SCUMM-Spiele von Humongous Entertainment: Backyard Baseball [baseball] Backyard Baseball 2001 [baseball2001] + Backyard Baseball 2003 [baseball2003] Backyard Football [football] Big Thinkers First Grade [thinker1] Big Thinkers Kindergarten [thinkerk] @@ -378,7 +386,6 @@ Wenn Sie über den neusten Stand bezüglich der Kompatibilität des Spiels erfah möchten, besuchen Sie unsere Website und schauen Sie in der Kompatibilitätsliste nach. - Backyard Baseball 2003 [baseball2003] Backyard Football 2002 [football2002] Backyard Soccer [soccer] Backyard Soccer MLS [soccermls] @@ -558,6 +565,15 @@ Zwischensequenzen, aber diese sind von niedrigerer Qualität.) Sie können sie auch in einem Unterverzeichnis namens „video“ ablegen, wenn Ihnen das lieber ist. +Bei PlayStation-Versionen können Sie die Original-Videos von CD ausgeben lassen. +Alle Dateien mit der Endung „STR“ sollten als Raw-Sektoren von der CD ausgelesen +werden (alle 2352 Bytes pro Sektor). Sie können stattdessen auch die weiter +unten erwähnten umgewandelten Zwischensequenzen verwenden, aber dies +funktioniert nicht bei allen Videos in Baphomets Fluch II. Weitere Informationen +finden Sie hier: + + http://wiki.scummvm.org/index.php/HOWTO-PlayStation_Videos + Einige Neuausgaben der Spiele, wie beispielsweise die PlayStation-Version, haben keine Smacker-Videos. Revolution Software hat uns freundlicherweise erlaubt, die Zwischensequenzen umgewandelt auf unserer Website als Download zur Verfügung zu @@ -577,9 +593,11 @@ Ogg-Vorbis-Audio angeboten. Um diese Zwischensequenzen mit Ogg-Vorbis-Audio abspielen zu können, ist eine Version von ScummVM erforderlich, die sowohl mit Unterstützung von libVorbis als auch zlib kompiliert wurde. -Für Baphomets Fluch bieten wir auch ein Untertitel-Paket an. Entpacken Sie es -einfach und folgen Sie den Anweisungen in der liesmich.txt. (Baphomets Fluch II -hat bereits Untertitel; für diese ist keine zusätzliche Arbeit notwendig.) +Für Baphomets Fluch bieten wir außerdem ein Untertitelpaket an. Entpacken Sie es +einfach und folgen Sie den Anweisungen in der liesmich.txt. Das Untertitelpaket +funktioniert momentan nicht bei der Verwendung von PlayStation-Videos. +(Baphomets Fluch II hat bereits Untertitel; für diese ist keine zusätzliche +Arbeit notwendig.) 3.7.2) Zwischensequenzen von Baphomets Fluch I und II im Rückblick: @@ -800,11 +818,11 @@ originale EXE-Datei des Spiels (mickey.exe) sowie die Spieldateien. Für das Spiel gibt es unter ScummVM umfangreiche Mausunterstützung, obwohl es im Originalspiel überhaupt keine Mausunterstützung gab. Menüpunkte können mit der -Maus ausgewählt werden und es ist auch möglich, mittels Maus an andere Orten zu -wechseln. Wenn die Maus über die Kanten des Bildschirms bewegt wird, ändert sich +Maus ausgewählt werden und es ist auch möglich, mittels Maus an andere Orte zu +wechseln. Wenn die Maus über den Rand des Bildschirms bewegt wird, ändert sich die Farbe des Zeigers in Rot, wenn es möglich ist, in diese Richtung zu gehen. -Der Spieler kann dann einfach auf die Kanten des Spielbildschirms klicken, um -den Ort zu wechseln, ähnlich wie in vielen Adventures, was einfacher und viel +Der Spieler kann dann einfach auf den Rand des Spielbildschirms klicken, um den +Ort zu wechseln, ähnlich wie in vielen Adventures, was einfacher und viel unkomplizierter ist, als sich mit dem Menü umherzubewegen. @@ -815,11 +833,11 @@ importieren. Für das Spiel gibt es unter ScummVM umfangreiche Mausunterstützung, obwohl es im Originalspiel überhaupt keine Mausunterstützung gab. Menüpunkte können mit der -Maus ausgewählt werden und es ist auch möglich, mittels Maus an andere Orten zu -wechseln. Wenn die Maus über die Kanten des Bildschirms bewegt wird, ändert sich +Maus ausgewählt werden und es ist auch möglich, mittels Maus an andere Orte zu +wechseln. Wenn die Maus über den Rand des Bildschirms bewegt wird, ändert sich die Farbe des Zeigers in Rot, wenn es möglich ist, in diese Richtung zu gehen. -Der Spieler kann dann einfach auf die Kanten des Spielbildschirms klicken, um -den Ort zu wechseln, ähnlich wie in vielen Adventures, was einfacher und viel +Der Spieler kann dann einfach auf den Rand des Spielbildschirms klicken, um den +Ort zu wechseln, ähnlich wie in vielen Adventures, was einfacher und viel unkomplizierter ist, als sich mit dem Menü umherzubewegen. @@ -903,7 +921,7 @@ Kompatibilitätsseite der Website aufgeführt ist, sehen Sie bitte im Abschnitt - Sprache und Untertitel zusammen führen manchmal dazu, dass die Sprachausgabe vorzeitig abgeschnitten wird. Dies ist eine Beschränkung des Originalspiels. - - Nur die Standardsprache (Englisch) der Spieldaten wird bei den Amiga- und + - Nur die Standard-Sprache (Englisch) der Spieldaten wird bei den Amiga- und Macintosh-Versionen unterstützt. Simon the Sorcerer's Game Pack: @@ -1044,7 +1062,7 @@ gestartet werden -- siehe nächster Abschnitt. --debugflags=FLAGGEN Aktiviert für Engine spezifische Debug-Flaggen (getrennt durch Kommas). -u, --dump-scripts Aktiviert die Skriptausgabe, wenn ein Verzeichnis - namens 'dumps' im aktuellen Verzeichnis existiert. + namens „dumps“ im aktuellen Verzeichnis existiert. --cdrom=ZAHL CD-Laufwerk, von dem CD-Titel wiedergegeben werden sollen (Standard: 0 = erstes Laufwerk) @@ -1436,7 +1454,7 @@ Spielstände werden bei einigen Plattformen standardmäßig im aktuellen Verzeichnis gespeichert und bei anderen in voreingestellten Verzeichnissen. Sehen Sie sich das Beispiel weiter unten in dieser Liesmich-Datei an. -Die folgenden Plattformen haben ein anderes Standardverzeichnis: +Die folgenden Plattformen haben ein anderes Standard-Verzeichnis: Mac OS X: $HOME/Documents/ScummVM Savegames/ @@ -1454,6 +1472,11 @@ Die folgenden Plattformen haben ein anderes Standardverzeichnis: \Profiles\Benutzername\ Application Data\ScummVM\Saved games\ +Hinweis für Anwender von Windows NT4/2000/XP/Vista/7: Das Standard-Verzeichnis +für Spielstände wurde bei ScummVM 1.5.0 geändert. Die Stapelverarbeitungsdatei +migration.bat kann verwendet werden, um die Spielstände vom alten +Standard-Verzeichnis in das neue zu kopieren. + 6.1) Automatische Spielstände: ---- ------------------------- @@ -1797,7 +1820,7 @@ SoundFonts): fluidsynth -m alsa_seq /Pfad/zu/8mbgmsfx.sf2 Wenn einmal TiMidity oder FluidSynth laufen, verwenden Sie den Befehl -„aconnect -o -l“, der bereits in diesem Abschnitt beschrieben wurde. +„aconnect -o -lâ€, der bereits in diesem Abschnitt beschrieben wurde. 7.6.2) Sound-Wiedergabe mittels IRIX-dmedia-Sequenzer: [NUR IN UNIX] @@ -1839,7 +1862,7 @@ Dienstprogramm): Nun können Sie ScummVM starten und TiMidity für Musikausgabe auswählen. Standardmäßig wird das Programm mit dem localhost:7777 verbunden, aber Sie -können Host und Port über die Umgebungsvariable „TIMIDITY_HOST“ ändern. Sie +können Host und Port über die Umgebungsvariable „TIMIDITY_HOST†ändern. Sie können auch eine „Gerätenummer“ über die Umgebungsvariable „SCUMMVM_MIDIPORT“ festlegen. @@ -2117,10 +2140,13 @@ Eine beispielhafte Konfigurationsdatei sieht wie folgt aus: path=C:\amiga_mi2\ music_driver=windows -Erklärung zu nachfolgender Liste: In der nachfolgenden Liste mit -Schlüsselwörtern werden rechts das Schlüsselwort, in der Mitte der Typ der -erwarteten Zuweisung und rechts die Erklärung angezeigt. Der Typ „Bool“ bedeutet -Wahrheitswert. Er kann entweder „true“ (wahr) oder „false“ (falsch) sein. + +8.1) Verwendbare Konfigurationsschlüsselwörter +---- ----------------------------------------- +In der nachfolgenden Liste mit Schlüsselwörtern für die Konfigurationsdatei +werden rechts das Schlüsselwort, in der Mitte der Typ der erwarteten Zuweisung +und rechts die Erklärung angezeigt. Der Typ „Bool“ bedeutet Wahrheitswert. Er +kann entweder „true“ (wahr) oder „false“ (falsch) sein. Die folgenden Schlüsselwörter werden erkannt: @@ -2149,8 +2175,6 @@ Die folgenden Schlüsselwörter werden erkannt: fullscreen Bool Vollbildmodus aspect_ratio Bool Seitenverhältniskorrektur - disable_dithering Bool Entfernung von Fehlerdiffusionsartefakten in - EGA-Spielen gfx_mode Text Grafikmodus (normal, 2x, 3x, 2xsai, super2xsai, supereagle, advmame2x, advmame3x, hq2x, hq3x, tv2x, dotmatrix) @@ -2198,6 +2222,28 @@ Die folgenden Schlüsselwörter werden erkannt: boot_param Zahl Ruft Boot-Skript mit dieser Nummer auf. +Sierra-Spiele, welche die AGI-Engine verwenden, verfügen zusätzlich über +folgendes nicht standardmäßiges Schlüsselwort: + + originalsaveload Bool Falls „true“, werden die originalen Menüs zum + Speichern und Laden statt der + erweiterten von ScummVM verwendet. + +Sierra-Spiele, welche die SCI-Engine verwenden, verfügen zusätzlich über +folgende nicht standardmäßige Schlüsselwörter: + + disable_dithering Bool Entfernung von Fehlerdiffusionsartefakten in + EGA-Spielen + prefer_digitalsfx Bool Falls „true“, werden digitale Sound-Effekte + statt synthetisierter bevorzugt. + originalsaveload Bool Falls „true“, werden die originalen Menüs zum + Speichern und Laden statt der + erweiterten von ScummVM verwendet. + native_fb01 Bool Falls „true“, wird für die MIDI-Ausgabe + der Musiktreiber für eine Music-Feature-Karte + von IBM oder für ein Yahama-FB-01-FM- + Synthetisierungsmodul verwendet. + Baphomets Fluch II verfügt zusätzlich über folgende nicht standardmäßige Schlüsselwörter: @@ -2213,6 +2259,12 @@ Schlüsselwörter: music_mute Bool Falls „true“, wird Musik unterdrückt. sfx_mute Bool Falls „true“, werden Geräusche unterdrückt. +Jones in the Fast Lane verfügt zusätzlich über folgendes nicht standardmäßiges +Schlüsselwort: + + music_mute Bool Falls „true“, wird - sofern verfügbar - CD-Ton + anstatt des Tons im Spiel verwendet. + Die Windows-Version von King's Quest VI verfügt zusätzlich über folgendes nicht standardmäßiges Schlüsselwort: @@ -2223,6 +2275,25 @@ standardmäßiges Schlüsselwort: verwendet - hochskaliert, um zum Rest der hochskalierten Grafiken zu passen. +Lands of Lore: The Throne of Chaos verfügt zusätzlich über folgende nicht +standardmäßige Schlüsselwörter: + + smooth_scrolling Bool Falls „true“, ist das Scrollen gleichmäßiger, + wenn man von einem Bildschirm zum anderen + wechselt. + floating_cursors Bool Falls „true“, verwandelt sich der Mauszeiger in + einen Richtungspfeil, wenn er über den + Bildschirmrand bewegt wird. Durch einen + Mausklick kann der Spieler dann in diese + Richtung gehen. + +Die CD-Version von Space Quest IV verfügt zusätzlich über folgendes nicht +standardmäßiges Schlüsselwort: + + silver_cursors Bool Falls „true“, wird ein alternativer Satz + silberner Mauszeiger verwendet anstatt der + originalen goldenen. + Simon the Sorcerer 1 und 2 verfügen zusätzlich über folgende nicht standardmäßige Schlüsselwörter: @@ -2234,6 +2305,16 @@ Schlüsselwort: walkspeed Zahl Bewegungsgeschwindigkeit (0-4) +The Legend of Kyrandia: Malcolm's Revenge verfügt zusätzlich über folgende nicht +standardmäßige Schlüsselwörter: + + studio_audience Bool Falls „true“, hört man stets Applaus- und + Jubelgeräusche, wenn Malcolm einen Scherz macht. + skip_support Bool Falls „true“, kann der Spieler Textteile und + Zwischensequenzen überspringen. + helium_mode Bool Falls „true“, klingen alle Spielfiguren so, + als hätten sie Helium eingeatmet. + The 7th Guest verfügt zusätzlich über folgendes nicht standardmäßiges Schlüsselwort: @@ -2242,6 +2323,18 @@ Schlüsselwort: im_an_ios [ich bin ein iOS]) +8.2) Spielspezifische Optionen bei der grafischen Benutzeroberfläche +---- --------------------------------------------------------------- +Viele spielspezifische Optionen, die im vorigen Abschnitt aufgeführt wurden, +können über die grafische Benutzeroberfläche angesprochen werden. Falls eine +spielspezifische Option für ein bestimmtes Spiel verfügbar ist, erscheint ein +neuer Reiter mit der Bezeichnung „Engine“, wenn man dieses Spiel hinzufügt oder +dessen Spieloptionen bearbeitet. Falls die spielspezifischen Optionen nicht +angezeigt werden, muss das betreffende Spiel einmal gestartet oder neu zur +Spieleliste hinzugefügt werden. Dadurch wird die Konfiguration von jedem Eintrag +aktualisiert, was die spielspezifischen Optionen zum Vorschein bringt. + + 9.0) Kompilierung: ---- ------------- Für eine aktuelle Ãœbersicht dazu, wie man ScummVM für unterschiedliche @@ -2341,7 +2434,3 @@ Viel Glück und viel Spaß beim Spielen wünscht das ScummVM-Team. http://www.scummvm.org/ ------------------------------------------------------------------------ - - -(Deutscher Text basiert auf README mit SHA1-ID: -d1de75a6ca828ab2fcdbce6352a12337f93fc21c) diff --git a/doc/de/Neues b/doc/de/Neues index 23fe6751c1..7c6699fcb0 100644 --- a/doc/de/Neues +++ b/doc/de/Neues @@ -1,34 +1,89 @@ -Umfangreichere Änderungsaufzeichnungen des neusten experimentellen Codes finden +Umfangreichere Änderungsaufzeichnungen des neusten experimentellen Codes finden Sie auf Englisch unter: https://github.com/scummvm/scummvm/commits/ 1.5.0 (??.??.????) Neue Spiele: + - Unterstützung für Backyard Baseball 2003 hinzugefügt. + - Unterstützung für Blue Force hinzugefügt. + - Unterstützung für Darby der Drache hinzugefügt. + - Unterstützung für Dreamweb hinzugefügt. + - Unterstützung für Geisha hinzugefügt. + - Unterstützung für Gregor und der Heißluftballon hinzugefügt. + - Unterstützung für Magic Tales: Baba Yaga and the Magic Geese hinzugefügt. + - Unterstützung für Magic Tales: Imo and the King hinzugefügt. + - Unterstützung für Magic Tales: Liam Finds a Story hinzugefügt. + - Unterstützung für Magic Tales: The Little Samurai hinzugefügt. + - Unterstützung für Once Upon A Time: Little Red Riding Hood hinzugefügt. + - Unterstützung für Sleeping Cub's Test of Courage hinzugefügt. - Unterstützung für Soltys hinzugefügt. + - Unterstützung für The Princess and the Crab hinzugefügt. + +Allgemein: + - MT-32-Emulationscode auf den neusten Stand des Munt-Projekt-Schnappschusses + gebracht. Die Emulation hat sich drastisch verbessert. + - Unterstützung für TrueType-Schriftarten über FreeType2 in unserer + grafischen Benutzeroberfläche hinzugefügt. Damit einhergehend wurde auch + GNU FreeFont zu unserem modernen Thema hinzugefügt. Beachten Sie, dass + nicht alle Ports hiervon profitieren. + - Baskische Ãœbersetzung hinzugefügt. + - Spiel- und engine-spezifische Optionen in den Engines AGI, DREAMWEB, KYRA, + QUEEN, SKY und SCI hinzugefügt. Es ist nun möglich, diese über den + Engine-Reiter anzusprechen, wenn man ein Spiel hinzufügt oder dessen + Spieloptionen bearbeitet. In den meisten Fällen müssen Sie jedes Spiel + einmal starten oder diese alle in ScummVMs Spieleliste neu hinzufügen, um + den Reiter für spielspezifische Optionen zu erhalten. + - Aussehen von vorhersagendem Eingabedialog verbessert. + - Verschiedene Verbesserungen der grafischen Benutzeroberfläche. SDL-Portierungen: - Unterstützung für OpenGL hinzugefügt. (GSoC-Aufgabe) + Baphomets Fluch 1: + - Falsche Soundeffekte in der DOS-/Windows-Demo korrigiert. + - Unterstützung für PlayStation-Videos hinzugefügt. + + Baphomets Fluch 2: + - Unterstützung für PlayStation-Videos hinzugefügt. + Cine: - Roland-MT-32-Ausgabetreiber integriert. + Gob: + - Absturz in Lost in Time beseitigt. + - AdLib-Abspieler umgeschrieben. Den nun funktionierenden MDY-Abspieler in + Fascination und Geisha aktiviert. + SCUMM: - Unterstützung für die Macintosh-Version von SPY Fox in Hold the Mustard hinzugefügt. - Dialog zur Auswahl des Schwierigkeitsgrads für Loom FM-TOWNS hinzugefügt. + - Grafische Störungen in HE98-Version von Pajama Sam's Lost & Found + beseitigt. - Sword1: - - Falsche Soundeffekte in der DOS-/Windows-Demo korrigiert. + iPhone-Portierung: + - Verhalten von Geste für F5 (Menü) geändert, um stattdessen das Hauptmenü zu + öffnen. + - Unterstützung für spezifische Mauszeigerpaletten hinzugefügt. Hierdurch + wird beispielsweise der rote Zeiger im modernen Thema verwendet. + - Unterstützung für Seitenverhältniskorrektur hinzugefügt. + - Unterstützung für 16 Bits pro Pixel bei Spielen integriert. Windows-Portierung: - - Standardmäßiger Speicherort für Spielstände bei + - Standard-Verzeichnis für Spielstände bei Windows NT4/2000/XP/Vista/7 geändert. + (Die Stapelverarbeitungsdatei migration.bat kann verwendet werden, um die + Spielstände vom alten Standard-Verzeichnis in das neue zu kopieren.) 1.4.1 (27.01.2012) AGOS: - Das Laden von Videos direkt aus InstallShield-Archiven in der Windows-Version von Floyd - Es gibt noch Helden korrigiert. + Baphomets Fluch 2: + - Leichte Grafikverbesserung für PSX-Version. + + BASS: - Unterstützung für verbesserte Musik von James Woodcock hinzugefügt (http://www.jameswoodcock.co.uk/?p=7695). @@ -52,9 +107,6 @@ Sie auf Englisch unter: nicht alle Kanäle zurückgesetzt wurden und somit einige Noten falsch klangen. - Sword2: - - Leichte Grafikverbesserung für PSX-Version. - 1.4.0 (11.11.2011) Neue Spiele: - Unterstützung für Lands of Lore: The Throne of Chaos hinzugefügt. @@ -82,6 +134,12 @@ Sie auf Englisch unter: - Laden und Speichern in der PC-Version von Waxworks repariert. - Musik in den PC-Versionen von Elvira 1 und 2 sowie Waxworks korrigiert. + Baphomets Fluch 1: + - Aufhängen in Windows-Demo beseitigt. + - Absturz beseitigt, wenn Untertitelpaket für Zwischensequenzen in + Macintosh-Version verwendet wird. + + Groovie: - Unterstützung für die iOS-Version von The 7th Guest hinzugefügt. @@ -105,11 +163,6 @@ Sie auf Englisch unter: - Palettenhandhabung in der Amiga-Version von Indiana Jones and the Fate of Atlantis verbessert. - Sword1: - - Aufhängen in Windows-Demo beseitigt. - - Absturz beseitigt, wenn Untertitelpaket für Zwischensequenzen in - Macintosh-Version verwendet wird. - Tinsel: - Löschen von Spielständen aus der Liste der Speicherstände korrigiert (im Startmenü und im ScummVM-Menü innerhalb des Spiels). @@ -189,7 +242,7 @@ Sie auf Englisch unter: Drascula: - Deutsche und französische Untertitel zur Zwischensequenz mit Von Braun - hinzugefügt (3069981: Keine Untertitel in Szene mit “Von Braun“). + hinzugefügt (3069981: Keine Untertitel in Szene mit „Von Braun“). - Französische Ãœbersetzung des Spiels verbessert. - Unterstützung für Rückkehr zur Spieleliste hinzugefügt. @@ -1313,7 +1366,7 @@ Sie auf Englisch unter: - Grafische Benutzeroberfläche für SoundFont-Einstellungen hinzugefügt (werden momentan nur von CoreAudio und FluidSynth-MIDI-Treibern verwendet). - - Der MPEG-Spieler konnte aussetzen, wenn der Ton vorzeitig endet. + - Der MPEG-Abspieler konnte aussetzen, wenn der Ton vorzeitig endet. - Automatische Skalierung der Benutzeroberfläche verbessert, um den vollen Vorteil des Bildschirms auszunutzen. - Fehlerbeseitigungen für GCC 4 @@ -1667,7 +1720,3 @@ Sie auf Englisch unter: 0.0.1 (08.10.2001) - Erste Version - - -(Deutscher Text basiert auf NEWS mit SHA1-ID: -ab2b020ff10b2e5d25cc93757029838c7eac6b41) -- cgit v1.2.3 From 29afa41047bec1eafcd1fb18137b11f04442f1ff Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 24 Jun 2012 18:17:33 +0100 Subject: I18N: Update translations template from source code --- po/ca_ES.po | 94 +++++++++++++++++++++++++++++----------------------------- po/cs_CZ.po | 94 +++++++++++++++++++++++++++++----------------------------- po/da_DA.po | 94 +++++++++++++++++++++++++++++----------------------------- po/de_DE.po | 94 +++++++++++++++++++++++++++++----------------------------- po/es_ES.po | 94 +++++++++++++++++++++++++++++----------------------------- po/eu.po | 94 +++++++++++++++++++++++++++++----------------------------- po/fr_FR.po | 94 +++++++++++++++++++++++++++++----------------------------- po/hu_HU.po | 94 +++++++++++++++++++++++++++++----------------------------- po/it_IT.po | 94 +++++++++++++++++++++++++++++----------------------------- po/nb_NO.po | 94 +++++++++++++++++++++++++++++----------------------------- po/nn_NO.po | 94 +++++++++++++++++++++++++++++----------------------------- po/pl_PL.po | 94 +++++++++++++++++++++++++++++----------------------------- po/pt_BR.po | 94 +++++++++++++++++++++++++++++----------------------------- po/ru_RU.po | 94 +++++++++++++++++++++++++++++----------------------------- po/scummvm.pot | 94 +++++++++++++++++++++++++++++----------------------------- po/se_SE.po | 94 +++++++++++++++++++++++++++++----------------------------- po/uk_UA.po | 94 +++++++++++++++++++++++++++++----------------------------- 17 files changed, 799 insertions(+), 799 deletions(-) diff --git a/po/ca_ES.po b/po/ca_ES.po index 35d5810ed6..d076f96f55 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2011-10-04 20:51+0100\n" "Last-Translator: Jordi Vilalta Prat \n" "Language-Team: Catalan \n" @@ -44,9 +44,9 @@ msgstr "Amunt" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -92,14 +92,14 @@ msgstr "Assigna" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -443,13 +443,13 @@ msgid "Search:" msgstr "Cerca:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Carrega partida:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Carrega" @@ -611,7 +611,7 @@ msgid "Special dithering modes supported by some games" msgstr "Modes de tramat especials suportats per alguns jocs" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Mode pantalla completa" @@ -931,39 +931,39 @@ msgstr "" "El tema que heu seleccionat no suporta l'idioma actual. Si voleu utilitzar " "aquest tema primer haureu de canviar a un altre idioma." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "No hi ha data desada" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "No hi ha hora desada" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "No hi ha temps de joc desat" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Suprimeix" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "Realment voleu suprimir aquesta partida?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "Data: " -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "Hora: " -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "Temps de joc: " -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Partida sense títol" @@ -1134,23 +1134,23 @@ msgstr "~A~juda" msgid "~A~bout" msgstr "~Q~uant a" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "~R~etorna al Llançador" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~R~etorna al Llançador" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Desa la partida:" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1159,7 +1159,7 @@ msgstr "Desa la partida:" msgid "Save" msgstr "Desa" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " @@ -1168,7 +1168,7 @@ msgstr "" "Aquest motor no ofereix ajuda dins el joc. Consulteu el fitxer README per a " "la informació bàsica i les instruccions sobre com obtenir més assistència." -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, fuzzy, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " @@ -1177,17 +1177,17 @@ msgstr "" "Aquest motor no ofereix ajuda dins el joc. Consulteu el fitxer README per a " "la informació bàsica i les instruccions sobre com obtenir més assistència." -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~D~'acord" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~C~ancel·la" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~T~ecles" @@ -1268,11 +1268,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Recupera la partida:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Restaura" @@ -1997,7 +1997,7 @@ msgstr "" "El suport de MIDI natiu requereix l'actualització Roland de LucasArts,\n" "però no s'ha trobat %s. S'utilitzarà AdLib." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2008,7 +2008,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2019,7 +2019,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2030,7 +2030,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2066,17 +2066,17 @@ msgstr "~M~en msgid "~W~ater Effect Enabled" msgstr "~E~fecte de l'aigua activat" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "No s'ha trobat el fitxer d'escena '%s'!" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "No s'ha pogut carregar l'estat del joc del fitxer." -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "No s'ha pogut desar l'estat del joc al fitxer." @@ -2324,15 +2324,15 @@ msgstr "" "No s'ha pogut desar a l'espai %i\n" "\n" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 msgid "Loading game..." msgstr "Carregant la partida..." -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 msgid "Saving game..." msgstr "Desant la partida..." -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2349,11 +2349,11 @@ msgstr "" "Premeu D'Acord per convertir-les ara, en cas contrari se us tornarà a " "demanar la propera vegada.\n" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "ScummVM ha convertit satisfactòriament totes les partides desades." -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2621,21 +2621,21 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal (no escalat)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 msgid "Enabled aspect ratio correction" msgstr "S'ha activat la correcció de la relació d'aspecte" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 msgid "Disabled aspect ratio correction" msgstr "S'ha desactivat la correcció de la relació d'aspecte" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 msgid "Active graphics filter:" msgstr "Filtre de gràfics actiu:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 msgid "Windowed mode" msgstr "Mode de finestra" diff --git a/po/cs_CZ.po b/po/cs_CZ.po index dd13e78f1b..93bfed0261 100644 --- a/po/cs_CZ.po +++ b/po/cs_CZ.po @@ -7,7 +7,7 @@ msgid "" 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" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2012-05-22 21:02+0100\n" "Last-Translator: Zbynìk Schwarz \n" "Language-Team: \n" @@ -48,9 +48,9 @@ msgstr "J #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -95,14 +95,14 @@ msgstr "Mapovat" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -440,13 +440,13 @@ msgid "Search:" msgstr "Hledat:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Nahrát hru:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Nahrát" @@ -606,7 +606,7 @@ msgid "Special dithering modes supported by some games" msgstr "Speciální re¾imy chvìní podporované nìkterými hrami" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Re¾im celé obrazovky" @@ -919,39 +919,39 @@ msgstr "" "Vzhled, který jste zvolili, nepodporuje Vá¹ souèasný jazyk. Pokud chcete " "tento vzhled pou¾ít, musíte nejdøíve pøepnout na jiný jazyk." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "Neulo¾ena ¾ádná data" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "®ádný ulo¾ený èas" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "®ádná ulo¾ená doba hraní" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Smazat" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "Opravdu chcete tuto ulo¾enou hru vymazat" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "Datum:" -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "Èas:" -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "Doba hraní:" -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Bezejmenný ulo¾ený stav" @@ -1121,23 +1121,23 @@ msgstr "~N~ msgid "~A~bout" msgstr "~O~ programu" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "~N~ávrat do Spou¹tìèe" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~N~ávrat do Spou¹tìèe" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Ulo¾it hru:" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1146,7 +1146,7 @@ msgstr "Ulo msgid "Save" msgstr "Ulo¾it" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " @@ -1156,7 +1156,7 @@ msgstr "" "prohlédnìte si README pro základní informace a pro instrukce jak získat " "dal¹í pomoc." -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " @@ -1165,17 +1165,17 @@ msgstr "" "Ulo¾ení stavu hry selhalo (%s)! Prosím pøeètìte si dokumentaci pro základní " "informace a pokyny k získání dal¹í podpory." -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~Z~ru¹it" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~K~lávesy" @@ -1256,11 +1256,11 @@ msgstr "Pou msgid "Use the original save/load screens, instead of the ScummVM ones" 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 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Obnovit hru" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Obnovit" @@ -1982,7 +1982,7 @@ msgstr "" "Pøirozená podpora MIDI vy¾aduje Aktualizaci Roland od LucasArts,\n" "ale %s chybí. Místo toho je pou¾it AdLib." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1993,7 +1993,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2004,7 +2004,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2015,7 +2015,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2051,17 +2051,17 @@ msgstr "~H~lavn msgid "~W~ater Effect Enabled" msgstr "~E~fekt Vody Zapnut" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "Soubor videa '%s' nenalezen'" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "Nelze naèíst stav hry ze souboru." -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "Nelze ulo¾it stav hry do souboru." @@ -2296,15 +2296,15 @@ msgstr "" "Nelze ulo¾it hru do pozice %i\n" "\n" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 msgid "Loading game..." msgstr "Nahrávání hry..." -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 msgid "Saving game..." msgstr "Ukládání hry..." -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2320,11 +2320,11 @@ msgstr "" "\n" "Stisknìte OK, abyste je pøevedli teï, jinak budete po¾ádáni pøí¹tì.\n" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "ScummVM úspì¹nì pøevedl v¹echny Va¹e ulo¾ené pozice. " -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2590,21 +2590,21 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normální (bez zmìny velikosti)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 msgid "Enabled aspect ratio correction" msgstr "Povolena korekce pomìru stran" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 msgid "Disabled aspect ratio correction" msgstr "Zakázána korekce pomìru stran" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 msgid "Active graphics filter:" msgstr "Aktivní grafický filtr:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 msgid "Windowed mode" msgstr "Re¾im do okna" diff --git a/po/da_DA.po b/po/da_DA.po index 76374027ba..50068cae5e 100644 --- a/po/da_DA.po +++ b/po/da_DA.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2011-01-08 22:53+0100\n" "Last-Translator: Steffen Nyeland \n" "Language-Team: Steffen Nyeland \n" @@ -44,9 +44,9 @@ msgstr "G #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -92,14 +92,14 @@ msgstr "Kortl #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -440,13 +440,13 @@ msgid "Search:" msgstr "Søg:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Indlæs spil:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Indlæs" @@ -607,7 +607,7 @@ msgid "Special dithering modes supported by some games" msgstr "Speciel farvereduceringstilstand understøttet a nogle spil" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Fuldskærms tilstand" @@ -919,39 +919,39 @@ msgstr "" "Temaet du valgte understøtter ikke dit aktuelle sprog. Hvis du ønsker at " "bruge dette tema, skal du skifte til et andet sprog først." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "Ingen dato gemt" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "Intet tidspunkt gemt" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "Ingen spilletid gemt" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Slet" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "Vil du virkelig slette denne gemmer?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "Dato:" -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "Tid:" -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "Spilletid:" -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Unavngivet gemmetilstand" @@ -1128,23 +1128,23 @@ msgstr "H~j~ msgid "~A~bout" msgstr "~O~m" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "~R~etur til spiloversigt" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~R~etur til oversigt" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Gemmer:" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1153,31 +1153,31 @@ msgstr "Gemmer:" msgid "Save" msgstr "Gem" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " "further assistance." msgstr "" -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~F~ortryd" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~T~aster" @@ -1245,11 +1245,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Gendan spil:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Gendan" @@ -1980,7 +1980,7 @@ msgid "" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1991,7 +1991,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2002,7 +2002,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2013,7 +2013,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2047,12 +2047,12 @@ msgstr "ScummVM Hovedmenu" msgid "~W~ater Effect Enabled" msgstr "~V~andeffekter aktiveret" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 #, fuzzy msgid "Failed to load game state from file." @@ -2061,7 +2061,7 @@ msgstr "" "\n" "%s" -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 #, fuzzy msgid "Failed to save game state to file." msgstr "" @@ -2296,17 +2296,17 @@ msgid "" "\n" msgstr "" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 #, fuzzy msgid "Loading game..." msgstr "Indlæs spil:" -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 #, fuzzy msgid "Saving game..." msgstr "Gemmer:" -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2316,11 +2316,11 @@ msgid "" "Press OK to convert them now, otherwise you will be asked next time.\n" msgstr "" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "" -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2580,24 +2580,24 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal (ingen skalering)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 #, fuzzy msgid "Enabled aspect ratio correction" msgstr "Skift billedformat korrektion" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 #, fuzzy msgid "Disabled aspect ratio correction" msgstr "Skift billedformat korrektion" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 #, fuzzy msgid "Active graphics filter:" msgstr "Skift mellem grafik filtre" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 #, fuzzy msgid "Windowed mode" diff --git a/po/de_DE.po b/po/de_DE.po index e11a3d4fc7..d3d0c53922 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -7,7 +7,7 @@ msgid "" 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" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2012-01-29 21:11+0100\n" "Last-Translator: Simon Sawatzki \n" "Language-Team: Simon Sawatzki (Lead), Lothar Serra Mari " @@ -46,9 +46,9 @@ msgstr "Pfad hoch" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -94,14 +94,14 @@ msgstr "Zuweisen" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -444,13 +444,13 @@ msgid "Search:" msgstr "Suchen:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Spiel laden:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Laden" @@ -613,7 +613,7 @@ msgstr "" "Spezielle Farbmischungsmethoden werden von manchen Spielen unterstützt." #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Vollbildmodus" @@ -934,39 +934,39 @@ msgid "" "to use this theme you need to switch to another language first." msgstr "" -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "Kein Datum gespeichert" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "Keine Zeit gespeichert" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "Keine Spielzeit gespeichert" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Löschen" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "Diesen Spielstand wirklich löschen?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "Datum: " -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "Zeit: " -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "Spieldauer: " -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Unbenannt" @@ -1140,23 +1140,23 @@ msgstr "~H~ilfe" msgid "~A~bout" msgstr "Übe~r~" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "Zur Spiele~l~iste zurück" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "Zur Spiele~l~iste" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Speichern:" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1165,7 +1165,7 @@ msgstr "Speichern:" msgid "Save" msgstr "Speichern" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " @@ -1175,7 +1175,7 @@ msgstr "" "Datei für grundlegende Informationen und Anweisungen dazu, wie man an " "weitere Hilfe gelangt." -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, fuzzy, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " @@ -1185,17 +1185,17 @@ msgstr "" "Datei für grundlegende Informationen und Anweisungen dazu, wie man an " "weitere Hilfe gelangt." -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~A~bbrechen" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~T~asten" @@ -1281,11 +1281,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Spiel laden:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Laden" @@ -2011,7 +2011,7 @@ msgstr "" "Systemeigene MIDI-Ünterstützung erfordert das Roland-Upgrade von LucasArts,\n" "aber %s fehlt. Stattdessen wird AdLib verwendet." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2022,7 +2022,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2033,7 +2033,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2044,7 +2044,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2081,17 +2081,17 @@ msgstr "Haupt~m~en msgid "~W~ater Effect Enabled" msgstr "~W~assereffekt aktiviert" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "Zwischensequenz \"%s\" nicht gefunden!" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "Konnte Spielstand aus Datei nicht laden." -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "Konnte Spielstand nicht in Datei speichern." @@ -2336,15 +2336,15 @@ msgstr "" "Kann Spiel nicht speichern auf Speicherplatz %i\n" "\n" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 msgid "Loading game..." msgstr "Spiel wird geladen..." -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 msgid "Saving game..." msgstr "Spiel wird gespeichert..." -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2361,11 +2361,11 @@ msgstr "" "Klicken Sie auf OK, um diese jetzt umzuwandeln, ansonsten werden Sie erneut " "gefragt, wenn Sie das nächste Mal dieses Spiel starten.\n" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "ScummVM hat alle Speicherstände erfolgreich umgewandelt." -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2633,21 +2633,21 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal ohn.Skalieren" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 msgid "Enabled aspect ratio correction" msgstr "Seitenverhältniskorrektur an" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 msgid "Disabled aspect ratio correction" msgstr "Seitenverhältniskorrektur aus" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 msgid "Active graphics filter:" msgstr "Aktiver Grafikfilter:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 msgid "Windowed mode" msgstr "Fenstermodus" diff --git a/po/es_ES.po b/po/es_ES.po index 612a19ba4a..9849a1798b 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.4.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2012-06-22 17:44+0100\n" "Last-Translator: Tomás Maidagan\n" "Language-Team: \n" @@ -44,9 +44,9 @@ msgstr "Arriba" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -91,14 +91,14 @@ msgstr "Asignar" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -438,13 +438,13 @@ msgid "Search:" msgstr "Buscar:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Cargar juego:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Cargar" @@ -605,7 +605,7 @@ msgid "Special dithering modes supported by some games" msgstr "Modos especiales de expansión compatibles con algunos juegos" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Pantalla completa" @@ -924,39 +924,39 @@ msgstr "" "El tema seleccionado no es compatible con el idioma actual. Si quieres usar " "este tema debes cambiar a otro idioma primero." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "No hay fecha guardada" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "No hay hora guardada" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "No hay tiempo guardado" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Borrar" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "¿Seguro que quieres borrar esta partida?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "Fecha: " -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "Hora: " -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "Tiempo: " -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Partida sin nombre" @@ -1126,23 +1126,23 @@ msgstr "~A~yuda" msgid "~A~bout" msgstr "Acerca ~d~e" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "~V~olver al lanzador" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~V~olver al lanzador" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Guardar partida" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1151,7 +1151,7 @@ msgstr "Guardar partida" msgid "Save" msgstr "Guardar" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " @@ -1161,7 +1161,7 @@ msgstr "" "consulta el archivo README para encontrar información básica e instrucciones " "para obtener más ayuda." -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " @@ -1171,17 +1171,17 @@ msgstr "" "archivo README para encontrar información básica e instrucciones sobre cómo " "obtener más ayuda." -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~S~í" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~C~ancelar" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~T~eclas" @@ -1264,11 +1264,11 @@ msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" "Utilizar las pantallas de guardar/cargar originales, en vez de las de ScummVM" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Cargar partida:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Cargar" @@ -1992,7 +1992,7 @@ msgstr "" "El soporte MIDI nativo requiere la actualización Roland de LucasArts,\n" "pero %s no está disponible. Se usará AdLib." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2003,7 +2003,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2014,7 +2014,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2025,7 +2025,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2061,17 +2061,17 @@ msgstr "~M~en msgid "~W~ater Effect Enabled" msgstr "Efecto ag~u~a activado" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "No se ha encontrado el vídeo '%s'" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "Fallo al cargar el estado del juego desde el archivo." -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "Fallo al guardar el estado del juego en el archivo." @@ -2310,15 +2310,15 @@ msgstr "" "No se puede guardar en la ranura %i\n" "\n" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 msgid "Loading game..." msgstr "Cargando partida..." -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 msgid "Saving game..." msgstr "Guardando partida..." -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2335,11 +2335,11 @@ msgstr "" "Pulsa Aceptar para actualizarlos, si no lo haces este mensaje volverá a " "aparecer la próxima vez.\n" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "ScummVM ha convertido todas las partidas guardadas correctamente." -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2605,21 +2605,21 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 msgid "Enabled aspect ratio correction" msgstr "Activar la corrección de aspecto" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 msgid "Disabled aspect ratio correction" msgstr "Desactivar la corrección de aspecto" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 msgid "Active graphics filter:" msgstr "Filtro de gráficos activo:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 msgid "Windowed mode" msgstr "Modo ventana" diff --git a/po/eu.po b/po/eu.po index 7df042dc14..fa0d3030b6 100644 --- a/po/eu.po +++ b/po/eu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2011-12-15 14:53+0100\n" "Last-Translator: Mikel Iturbe Urretxa \n" "Language-Team: Librezale \n" @@ -44,9 +44,9 @@ msgstr "Joan gora" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -91,14 +91,14 @@ msgstr "Esleitu" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -438,13 +438,13 @@ msgid "Search:" msgstr "Bilatu:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Jokoa kargatu:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Kargatu" @@ -608,7 +608,7 @@ msgid "Special dithering modes supported by some games" msgstr "Joko batzuk onarturiko lausotze-modu bereziak" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Pantaila osoa" @@ -925,39 +925,39 @@ msgstr "" "Aukeraturiko gaia ez da zure hizkuntzarekin bateragarria. Gai hau erabili " "nahi baduzu, aurretik beste hizkuntza batera pasa behar duzu." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "Ez dago datarik gordeta" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "Ez dago ordurik gordeta" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "Ez dago denborarik gordeta" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Ezabatu" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "Ezabatu partida gorde hau?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "Data:" -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "Ordua" -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "Denbora:" -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Titulurik gabeko partida" @@ -1127,23 +1127,23 @@ msgstr "~L~aguntza" msgid "~A~bout" msgstr "Ho~n~i buruz" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "It~z~uli abiarazlera" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "It~z~uli abiarazlera" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Gorde jokoa:" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1152,7 +1152,7 @@ msgstr "Gorde jokoa:" msgid "Save" msgstr "Gorde" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " @@ -1161,7 +1161,7 @@ msgstr "" "Barkatu, motore honek ez du joko barruan laguntzarik eskaintzen. Jo ezazu " "README-ra oinarrizko informaziorako eta laguntza gehiago nola jaso jakiteko." -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " @@ -1170,17 +1170,17 @@ msgstr "" "Jokoaren egoera gordetzeak huts egin du (%s)! Jo ezazu README-ra oinarrizko " "informaziorako eta laguntza gehiago nola jaso jakiteko." -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~A~dos" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~U~tzi" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~T~eklak" @@ -1261,11 +1261,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Jokoa kargatu:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Kargatu" @@ -1989,7 +1989,7 @@ msgstr "" "MIDI euskarri natiboak LucasArts-en Roland eguneraketa behar du,\n" "baina %s ez dago eskuragarri. AdLib erabiliko da." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2000,7 +2000,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2011,7 +2011,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2022,7 +2022,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2058,17 +2058,17 @@ msgstr "Menu ~n~agusia" msgid "~W~ater Effect Enabled" msgstr "~U~r-efektua gaituta" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "'%s' bideo fitxategia ez da aurkitu!" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "Ezin izan da fitxategitik jokoa kargatu." -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "Ezin izan da jokoa fitxategira gorde." @@ -2308,15 +2308,15 @@ msgstr "" "Ezin da partida gorde %i zirrikituan\n" "\n" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 msgid "Loading game..." msgstr "Jokoa kargatzen..." -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 msgid "Saving game..." msgstr "Jokoa gordetzen..." -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2333,11 +2333,11 @@ msgstr "" "Sakatu Ados orain konbertitzeko, bestela berriz galdetuko dizut jokoa berriz " "martxan jartzen duzunean.\n" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "ScummVM-k ondo konbertitu ditu zure gordetako partida guztiak." -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2603,21 +2603,21 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normala" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 msgid "Enabled aspect ratio correction" msgstr "Formatu-ratio zuzenketa gaituta" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 msgid "Disabled aspect ratio correction" msgstr "Formatu-ratio zuzenketa desgaituta" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 msgid "Active graphics filter:" msgstr "Filtro grafiko aktiboa:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 msgid "Windowed mode" msgstr "Leiho modua" diff --git a/po/fr_FR.po b/po/fr_FR.po index 6270ab3f73..be7ddddbed 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2011-10-23 14:52+0100\n" "Last-Translator: Thierry Crozat \n" "Language-Team: French \n" @@ -45,9 +45,9 @@ msgstr "Remonter" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -92,14 +92,14 @@ msgstr "Affecter" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -441,13 +441,13 @@ msgid "Search:" msgstr "Filtre:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Charger le jeu:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Charger" @@ -609,7 +609,7 @@ msgid "Special dithering modes supported by some games" msgstr "Mode spécial de tramage supporté par certains jeux" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Plein écran" @@ -931,39 +931,39 @@ msgstr "" "Le thème que vous avez sélectioné ne support pas la langue française. Si " "vous voulez l'utiliser vous devez d'abord changer de langue." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "Date inconnue" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "Heure inconnue" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "Durée de jeu inconnue" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Supprimer" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "Voulez-vous vraiment supprimer cette sauvegarde?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "Date: " -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "Heure: " -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "Durée de jeu: " -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Sauvegarde sans nom" @@ -1135,23 +1135,23 @@ msgstr "~A~ide" msgid "~A~bout" msgstr "À ~P~ropos" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "Retour au ~L~anceur" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "Retour au ~L~anceur" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Sauvegarde:" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1160,7 +1160,7 @@ msgstr "Sauvegarde:" msgid "Save" msgstr "Sauver" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " @@ -1170,7 +1170,7 @@ msgstr "" "fichier README pour les informations de base et les instructions pour " "obtenir de l'aide supplémentaire." -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, fuzzy, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " @@ -1180,17 +1180,17 @@ msgstr "" "fichier README pour les informations de base et les instructions pour " "obtenir de l'aide supplémentaire." -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~A~nnuler" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~T~ouches" @@ -1272,11 +1272,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Charger le jeu:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Charger" @@ -2000,7 +2000,7 @@ msgstr "" "Support MIDI natif requière la mise à jour Roland de LucasArt,\n" "mais %s manque. Utilise AdLib à la place." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2011,7 +2011,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2022,7 +2022,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2033,7 +2033,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2070,17 +2070,17 @@ msgstr "~M~enu Principal" msgid "~W~ater Effect Enabled" msgstr "~E~ffets de l'Eau Activés" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "Fichier de séquence '%s' non trouvé!" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "Échec du chargement de l'état du jeu depuis le disque." -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "Échec de l'enregistrement de l'état du jeu sur le disque." @@ -2322,15 +2322,15 @@ msgstr "" "Erreur lors de la sauvegarde dans l'emplacement %i\n" "\n" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 msgid "Loading game..." msgstr "Chargement en cours..." -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 msgid "Saving game..." msgstr "Sauvegarde en cours..." -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2347,11 +2347,11 @@ msgstr "" "Appuyer sur OK pour les convertir maintenant, sinon le même message " "s'affichera la prochaine fois que vous démarrerez le jeu.\n" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "ScummVM a converti avec succès vos anciennes sauvegardes." -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2616,21 +2616,21 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 msgid "Enabled aspect ratio correction" msgstr "Activer la correction du rapport d'aspect" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 msgid "Disabled aspect ratio correction" msgstr "Désactiver la correction du rapport d'aspect" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 msgid "Active graphics filter:" msgstr "Mode graphique actif:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 msgid "Windowed mode" msgstr "Mode Fenêtre" diff --git a/po/hu_HU.po b/po/hu_HU.po index 321e5b7e70..e1eb2fb15f 100644 --- a/po/hu_HU.po +++ b/po/hu_HU.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2012-04-18 08:20+0100\n" "Last-Translator: Gruby \n" "Language-Team: Hungarian\n" @@ -48,9 +48,9 @@ msgstr "Feljebb" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -95,14 +95,14 @@ msgstr "Kioszt #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -441,13 +441,13 @@ msgid "Search:" msgstr "Keresés:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Játék betöltése:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Betöltés" @@ -608,7 +608,7 @@ msgid "Special dithering modes supported by some games" msgstr "Néhány játék támogatja a speciális árnyalási módokat" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Teljesképernyõs mód:" @@ -919,39 +919,39 @@ msgstr "" "A kiválasztott téma nem támogatja a nyelvedet. Ha használni akarod ezt a " "témát, elõszõr válts át egy másik nyelvre." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "Dátum nincs mentve" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "Idõ nincs mentve" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "Játékidõ nincs mentve" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Töröl" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "Biztos hogy törölni akarod ezt a játékállást?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "Dátum:" -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "Idõ:" -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "Játékidõ:" -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Névtelen játékállás" @@ -1121,23 +1121,23 @@ msgstr "S msgid "~A~bout" msgstr "Névjegy" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "Visszatérés az indítóba" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "Visszatérés az indítóba" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Játék mentése:" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1146,7 +1146,7 @@ msgstr "J msgid "Save" msgstr "Mentés" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " @@ -1155,7 +1155,7 @@ msgstr "" "Sajnálom, a motor jelenleg nem tartalmaz játék közbeni súgót. Olvassd el a " "README-t az alap információkról, és hogy hogyan segíthetsz a késõbbiekben." -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " @@ -1164,17 +1164,17 @@ msgstr "" "(%s) játékmentés nem sikerült!. Olvassd el a README-t az alap " "információkról, és hogy hogyan segíthetsz a késõbbiekben." -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "Mégse" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "Billentyük" @@ -1255,11 +1255,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Játékmenet visszaállítása:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Visszaállítás" @@ -1983,7 +1983,7 @@ msgstr "" "Native MIDI támogatáshoz kell a Roland Upgrade a LucasArts-tól,\n" "a %s hiányzik. AdLib-ot használok helyette." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1994,7 +1994,7 @@ msgstr "" "\n" "%s fájlba nem sikerült" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2005,7 +2005,7 @@ msgstr "" "\n" "%s fájlból nem sikerült" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2016,7 +2016,7 @@ msgstr "" "\n" "%s fájlba elkészült" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2052,17 +2052,17 @@ msgstr "F msgid "~W~ater Effect Enabled" msgstr "Vízeffektus engedélyezve" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "'%s' átvezetõ fájl nem található" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "Játékállás betöltése fájlból nem sikerült." -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "Játékállás mentése fájlba nem sikerült." @@ -2301,15 +2301,15 @@ msgstr "" "Játékállás nem menthetõ %i slotba\n" "\n" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 msgid "Loading game..." msgstr "Játék betöltés..." -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 msgid "Saving game..." msgstr "Játék mentés..." -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2325,11 +2325,11 @@ msgstr "" "Nyomj OK-t az átalakításhoz, vagy rákérdezzek ha legközelebb elindítod a " "játékot.\n" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "ScummVM konvertálta az összes játékállásodat." -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2593,21 +2593,21 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normál (nincs átméretezés)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 msgid "Enabled aspect ratio correction" msgstr "Méretarány korrekció engedélyezve" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 msgid "Disabled aspect ratio correction" msgstr "Méretarány korrekció letiltva" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 msgid "Active graphics filter:" msgstr "Aktív grafikus szûrõk:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 msgid "Windowed mode" msgstr "Ablakos mód" diff --git a/po/it_IT.po b/po/it_IT.po index bee74f5a68..dc33811e28 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2011-10-08 17:29+0100\n" "Last-Translator: Matteo 'Maff' Angelino \n" "Language-Team: Italian\n" @@ -44,9 +44,9 @@ msgstr "Su" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -92,14 +92,14 @@ msgstr "Mappa" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -439,13 +439,13 @@ msgid "Search:" msgstr "Cerca:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Carica gioco:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Carica" @@ -609,7 +609,7 @@ msgid "Special dithering modes supported by some games" msgstr "Modalità di resa grafica speciali supportate da alcuni giochi" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Modalità a schermo intero" @@ -926,39 +926,39 @@ msgstr "" "Il tema che hai selezionato non supporta la lingua attuale. Se vuoi " "utilizzare questo tema devi prima cambiare la lingua." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "Nessuna data salvata" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "Nessun orario salvato" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "Nessun tempo salvato" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Elimina" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "Sei sicuro di voler eliminare questo salvataggio?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "Data: " -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "Ora: " -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "Tempo di gioco: " -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Salvataggio senza titolo" @@ -1129,23 +1129,23 @@ msgstr "~A~iuto" msgid "~A~bout" msgstr "~I~nfo" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "~T~orna a elenco giochi" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~V~ai a elenco giochi" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Salva gioco:" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1154,7 +1154,7 @@ msgstr "Salva gioco:" msgid "Save" msgstr "Salva" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " @@ -1164,7 +1164,7 @@ msgstr "" "gioco. Si prega di consultare il file README per le informazioni di base e " "per le istruzioni su come ottenere ulteriore assistenza." -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, fuzzy, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " @@ -1174,17 +1174,17 @@ msgstr "" "gioco. Si prega di consultare il file README per le informazioni di base e " "per le istruzioni su come ottenere ulteriore assistenza." -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~A~nnulla" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~T~asti" @@ -1266,11 +1266,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Ripristina gioco:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Ripristina" @@ -1994,7 +1994,7 @@ msgstr "" "Il supporto nativo MIDI richiede il Roland Upgrade della LucasArts,\n" "ma %s non è presente. Verrà usato AdLib." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2005,7 +2005,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2016,7 +2016,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2027,7 +2027,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2064,17 +2064,17 @@ msgstr "~M~enu principale" msgid "~W~ater Effect Enabled" msgstr "~E~ffetto acqua attivo" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "File della scena di intermezzo '%s' non trovato!" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "Impossibile caricare il gioco dal file." -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "Impossibile salvare il gioco nel file." @@ -2322,15 +2322,15 @@ msgstr "" "Impossibile salvare nella posizione %i\n" "\n" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 msgid "Loading game..." msgstr "Caricamento..." -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 msgid "Saving game..." msgstr "Salvataggio..." -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2347,11 +2347,11 @@ msgstr "" "Premi OK per convertirli adesso, altrimenti ti verrà richiesto la prossima " "volta.\n" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "ScummVM ha convertito con successo tutti i tuoi salvataggi." -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2619,21 +2619,21 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normale (no ridim.)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 msgid "Enabled aspect ratio correction" msgstr "Correzione proporzioni attivata" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 msgid "Disabled aspect ratio correction" msgstr "Correzione proporzioni disattivata" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 msgid "Active graphics filter:" msgstr "Filtro grafico attivo:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 msgid "Windowed mode" msgstr "Modalità finestra" diff --git a/po/nb_NO.po b/po/nb_NO.po index cdc102f394..9dfc58331c 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2011-04-25 22:56+0100\n" "Last-Translator: Einar Johan T. Sømåen \n" "Language-Team: somaen \n" @@ -48,9 +48,9 @@ msgstr "G #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -96,14 +96,14 @@ msgstr "Koble" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -444,13 +444,13 @@ msgid "Search:" msgstr "Søk:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Åpne spill:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Åpne" @@ -611,7 +611,7 @@ msgid "Special dithering modes supported by some games" msgstr "Spesiel dithering-modus støttet av enkelte spill" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Fullskjermsmodus" @@ -923,39 +923,39 @@ msgstr "" "Temaet du valgte støtter ikke det aktive språket. Hvis du vil bruke dette " "temaet, må du bytte til et annet språk først." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "Ingen dato lagret" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "Ingen tid lagret" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "Ingen spilltid lagret" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Slett" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "Vil du virkelig slette dette lagrede spillet?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "Dato: " -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "Tid: " -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "Spilltid: " -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Ikke navngitt spilltilstand" @@ -1125,23 +1125,23 @@ msgstr "~H~jelp" msgid "~A~bout" msgstr "~O~m" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "~T~ilbake til oppstarter" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~T~ilbake til oppstarter" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Lagret spill:" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1150,31 +1150,31 @@ msgstr "Lagret spill:" msgid "Save" msgstr "Lagre" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " "further assistance." msgstr "" -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~A~vbryt" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~T~aster" @@ -1242,11 +1242,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Gjennopprett spill:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Gjenopprett" @@ -1977,7 +1977,7 @@ msgid "" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1988,7 +1988,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1999,7 +1999,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2010,7 +2010,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2047,12 +2047,12 @@ msgstr "ScummVM Hovedmeny" msgid "~W~ater Effect Enabled" msgstr "~V~anneffekt aktivert" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 #, fuzzy msgid "Failed to load game state from file." @@ -2061,7 +2061,7 @@ msgstr "" "\n" "%s" -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 #, fuzzy msgid "Failed to save game state to file." msgstr "" @@ -2296,17 +2296,17 @@ msgid "" "\n" msgstr "" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 #, fuzzy msgid "Loading game..." msgstr "Åpne spill:" -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 #, fuzzy msgid "Saving game..." msgstr "Lagret spill:" -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2316,11 +2316,11 @@ msgid "" "Press OK to convert them now, otherwise you will be asked next time.\n" msgstr "" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "" -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2580,24 +2580,24 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal (ingen skalering)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 #, fuzzy msgid "Enabled aspect ratio correction" msgstr "Veksle aspekt-rate korrigering" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 #, fuzzy msgid "Disabled aspect ratio correction" msgstr "Veksle aspekt-rate korrigering" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 #, fuzzy msgid "Active graphics filter:" msgstr "Bytt grafikkfiltre" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 #, fuzzy msgid "Windowed mode" diff --git a/po/nn_NO.po b/po/nn_NO.po index a5b01a7c52..fe0c1d1106 100644 --- a/po/nn_NO.po +++ b/po/nn_NO.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2011-04-25 23:07+0100\n" "Last-Translator: Einar Johan T. Sømåen \n" "Language-Team: somaen \n" @@ -48,9 +48,9 @@ msgstr "G #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -96,14 +96,14 @@ msgstr "Kople" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -444,13 +444,13 @@ msgid "Search:" msgstr "Søk:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Åpne spel:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Åpne" @@ -610,7 +610,7 @@ msgid "Special dithering modes supported by some games" msgstr "Spesielle dithering-modus som støttast av nokre spel" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Fullskjermsmodus" @@ -920,39 +920,39 @@ msgstr "" "Temaet du har valt støttar ikkje det aktive språket. Om du vil nytte dette " "temaet må du bytte til eit anna språk først." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "Ingen dato lagra" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "Inga tid lagra" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "Inga speletid lagra" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Slett" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "Vil du verkeleg slette det lagra spelet?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "Dato: " -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "Tid: " -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "Speletid: " -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Ikkje navngjeven speltilstand" @@ -1123,25 +1123,25 @@ msgstr "~H~jelp" msgid "~A~bout" msgstr "~O~m" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 #, fuzzy msgid "~R~eturn to Launcher" msgstr "~T~ilbake til oppstarter" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 #, fuzzy msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~T~ilbake til oppstarter" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Lagra spel:" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1150,31 +1150,31 @@ msgstr "Lagra spel:" msgid "Save" msgstr "Lagre" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " "further assistance." msgstr "" -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~A~vbryt" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~T~astar" @@ -1242,11 +1242,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Gjenopprett spel:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Gjenopprett" @@ -1975,7 +1975,7 @@ msgid "" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1983,7 +1983,7 @@ msgid "" "%s" msgstr "" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1991,7 +1991,7 @@ msgid "" "%s" msgstr "" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1999,7 +1999,7 @@ msgid "" "%s" msgstr "" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2036,17 +2036,17 @@ msgstr "ScummVM Hovudmeny" msgid "~W~ater Effect Enabled" msgstr "~V~anneffekt aktivert" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "" -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "" @@ -2270,17 +2270,17 @@ msgid "" "\n" msgstr "" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 #, fuzzy msgid "Loading game..." msgstr "Åpne spel:" -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 #, fuzzy msgid "Saving game..." msgstr "Lagra spel:" -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2290,11 +2290,11 @@ msgid "" "Press OK to convert them now, otherwise you will be asked next time.\n" msgstr "" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "" -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2552,24 +2552,24 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal (inga skalering)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 #, fuzzy msgid "Enabled aspect ratio correction" msgstr "Veksle aspekt-korrigering" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 #, fuzzy msgid "Disabled aspect ratio correction" msgstr "Veksle aspekt-korrigering" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 #, fuzzy msgid "Active graphics filter:" msgstr "Veksle grafikkfiltre" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 #, fuzzy msgid "Windowed mode" diff --git a/po/pl_PL.po b/po/pl_PL.po index 94929760cc..da089c5026 100644 --- a/po/pl_PL.po +++ b/po/pl_PL.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2011-10-24 21:14+0100\n" "Last-Translator: Micha³ Zi±bkowski \n" "Language-Team: Grajpopolsku.pl \n" @@ -48,9 +48,9 @@ msgstr "W g #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -96,14 +96,14 @@ msgstr "Przypisz" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -442,13 +442,13 @@ msgid "Search:" msgstr "Szukaj" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Wczytaj grê:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Wczytaj" @@ -607,7 +607,7 @@ msgid "Special dithering modes supported by some games" msgstr "Specjalne tryby ditheringu wspierane przez niektóre gry" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Pe³ny ekran" @@ -922,39 +922,39 @@ msgstr "" "Wybrany styl nie obs³uguje obecnego jêzyka. Je¶li chcesz go u¿ywaæ, zmieñ " "najpierw swój jêzyk." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "Brak daty" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "Brak godziny" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "Brak czasu gry" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Skasuj" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "Na pewno chcesz skasowaæ ten zapis?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "Data: " -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "Czas: " -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "Czas gry: " -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Zapis bez nazwy" @@ -1124,23 +1124,23 @@ msgstr "~P~omoc" msgid "~A~bout" msgstr "~I~nformacje" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "~P~owrót do launchera" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~P~owrót do launchera" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Zapis:" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1149,7 +1149,7 @@ msgstr "Zapis:" msgid "Save" msgstr "Zapisz" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " @@ -1159,7 +1159,7 @@ msgstr "" "uzyskaæ podstawowe informacje oraz dowiedzieæ jak szukaæ dalszej pomocy, " "sprawd¼ plik README." -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, fuzzy, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " @@ -1169,17 +1169,17 @@ msgstr "" "uzyskaæ podstawowe informacje oraz dowiedzieæ jak szukaæ dalszej pomocy, " "sprawd¼ plik README." -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~A~nuluj" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~K~lawisze" @@ -1257,11 +1257,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Wznów grê:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Wznów" @@ -1986,7 +1986,7 @@ msgstr "" "Natywne wsparcie MIDI wymaga aktualizacji Rolanda od LucasArts,\n" "ale brakuje %s. Prze³±czam na tryb AdLib." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1997,7 +1997,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2008,7 +2008,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2019,7 +2019,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2055,17 +2055,17 @@ msgstr "~M~enu g msgid "~W~ater Effect Enabled" msgstr "~E~fekty wody w³±czone" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "Nie znaleziono pliku przerywnika '%s'!" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "Nie uda³o siê wczytaæ stanu gry z pliku." -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "Nie uda³o siê zapisaæ stanu gry do pliku." @@ -2312,15 +2312,15 @@ msgstr "" "Nie mo¿na zapisaæ w slocie %i\n" "\n" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 msgid "Loading game..." msgstr "Wczytywanie stanu gry..." -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 msgid "Saving game..." msgstr "Zapisywanie stanu gry..." -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2336,11 +2336,11 @@ msgstr "" "Naci¶nij OK, ¿eby je teraz przekonwertowaæ. W przeciwnym wypadku zostaniesz " "zapytany ponownie przy nastêpnym w³±czeniu gry.\n" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "ScummVM pomy¶lnie przekonwertowa³ wszystkie twoje zapisy." -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2608,21 +2608,21 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Zwyk³y (bez skalowania)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 msgid "Enabled aspect ratio correction" msgstr "W³±czono korekcjê formatu obrazu" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 msgid "Disabled aspect ratio correction" msgstr "Wy³±czono korekcjê formatu obrazu" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 msgid "Active graphics filter:" msgstr "Aktywny filtr graficzny:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 msgid "Windowed mode" msgstr "Okno" diff --git a/po/pt_BR.po b/po/pt_BR.po index 2c3a530b30..cb0c50a7c8 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2011-10-21 21:30-0300\n" "Last-Translator: Saulo Benigno \n" "Language-Team: ScummBR (www.scummbr.com) \n" @@ -48,9 +48,9 @@ msgstr "Acima" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -96,14 +96,14 @@ msgstr "Mapear" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -443,13 +443,13 @@ msgid "Search:" msgstr "Pesquisar:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Carregar jogo:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Carregar" @@ -615,7 +615,7 @@ msgid "Special dithering modes supported by some games" msgstr "Modos especiais de dithering suportados por alguns jogos" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Modo Tela Cheia" @@ -931,39 +931,39 @@ msgstr "" "O tema que você selecionou não suporta seu idioma atual. Se você quiser usar " "este tema você precisa mudar para outro idioma." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "Sem data salva" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "Sem hora salva" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "Sem tempo de jogo salvo" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Excluir" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "Você realmente quer excluir este jogo salvo?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "Data:" -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "Hora:" -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "Tempo de jogo:" -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Não-titulado arquivo de save" @@ -1136,23 +1136,23 @@ msgstr "~A~juda" msgid "~A~bout" msgstr "So~b~re" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "~V~oltar ao menu" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~V~oltar ao menu" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Salvar jogo:" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1161,7 +1161,7 @@ msgstr "Salvar jogo:" msgid "Save" msgstr "Salvar" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " @@ -1171,7 +1171,7 @@ msgstr "" "Por favor, consulte o README para obter informações básicas, e para obter " "instruções sobre como obter assistência adicional." -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, fuzzy, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " @@ -1181,17 +1181,17 @@ msgstr "" "Por favor, consulte o README para obter informações básicas, e para obter " "instruções sobre como obter assistência adicional." -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~C~ancelar" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~T~eclas" @@ -1273,11 +1273,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Restaurar jogo:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Restaurar" @@ -2003,7 +2003,7 @@ msgstr "" "LucasArts,\n" "mas %s está faltando. Utilizando AdLib ao invés." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2014,7 +2014,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2025,7 +2025,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2036,7 +2036,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2073,12 +2073,12 @@ msgstr "~M~enu Principal ScummVM" msgid "~W~ater Effect Enabled" msgstr "Modo ~E~feitos de água ativado" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "Arquivo de vídeo '%s' não encontrado!" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "" @@ -2086,7 +2086,7 @@ msgstr "" "\n" "%s" -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "" "Falha ao salvar o estado do jogo para o arquivo:\n" @@ -2337,15 +2337,15 @@ msgstr "" "Não é possível salvar o jogo na posição %i\n" "\n" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 msgid "Loading game..." msgstr "Carregando jogo..." -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 msgid "Saving game..." msgstr "Salvando jogo..." -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2362,11 +2362,11 @@ msgstr "" "Pressione OK para convertê-los agora, caso contrário você será solicitado na " "próxima vez.\n" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "ScummVM converteu com êxito todos os seus jogos salvos." -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2634,21 +2634,21 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normal (sem escala)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 msgid "Enabled aspect ratio correction" msgstr "Correção de proporção habilitada" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 msgid "Disabled aspect ratio correction" msgstr "Correção de proporção desabilitada" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 msgid "Active graphics filter:" msgstr "Ativa os filtros gráficos" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 msgid "Windowed mode" msgstr "Modo janela" diff --git a/po/ru_RU.po b/po/ru_RU.po index dbeb07298e..5d5f8dabf4 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2012-02-16 13:09+0200+0200\n" "Last-Translator: Eugene Sandulenko \n" "Language-Team: Russian\n" @@ -46,9 +46,9 @@ msgstr " #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -93,14 +93,14 @@ msgstr " #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -440,13 +440,13 @@ msgid "Search:" msgstr "¿ÞØáÚ:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "·ÐÓàã×Øâì ØÓàã:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "·ÐÓàã×Øâì" @@ -606,7 +606,7 @@ msgid "Special dithering modes supported by some games" msgstr "ÁßÕæØÐÛìÝëÕ àÕÖØÜë àÕÝÔÕàØÝÓÐ, ßÞÔÔÕàÖØÒÐÕÜëÕ ÝÕÚÞâÞàëÜØ ØÓàÐÜØ" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "¿ÞÛÝÞíÚàÐÝÝëÙ àÕÖØÜ" @@ -925,39 +925,39 @@ msgstr "" "ÂÕÜÐ, ÒëÑàÐÝÝÐï ÒÐÜØ, ÝÕ ßÞÔÔÕàÖØÒÐÕâ ÒëÑàÐÝÝëÙ ï×ëÚ. µáÛØ Òë åÞâØâÕ " "ØáßÞÛì×ÞÒÐâì íâã âÕÜã, ÒÐÜ ÝÕÞÑåÞÔØÜÞ áÝÐçÐÛÐ ßÕàÕÚÛîçØâìáï ÝÐ ÔàãÓÞÙ ï×ëÚ." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "´ÐâÐ ÝÕ ×ÐßØáÐÝÐ" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "²àÕÜï ÝÕ ×ÐßØáÐÝÞ" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "²àÕÜï ØÓàë ÝÕ ×ÐßØáÐÝÞ" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "ÃÔÐÛØâì" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "²ë ÔÕÙáâÒØâÕÛìÝÞ åÞâØâÕ ãÔÐÛØâì íâÞ áÞåàÐÝÕÝØÕ?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "´ÐâÐ: " -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "²àÕÜï: " -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "²àÕÜï ØÓàë: " -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "ÁÞåàÐÝÕÝØÕ ÑÕ× ØÜÕÝØ" @@ -1128,23 +1128,23 @@ msgstr "~ msgid "~A~bout" msgstr "¾ ßàÞ~Ó~àÐÜÜÕ" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "~²~ëÙâØ Ò ÓÛÐÒÝÞÕ ÜÕÝî" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~²~ ÓÛÐÒÝÞÕ ÜÕÝî" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "ÁÞåàÐÝØâì ØÓàã:" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1153,7 +1153,7 @@ msgstr " msgid "Save" msgstr "ÁÞåàÐÝØâì" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " @@ -1163,7 +1163,7 @@ msgstr "" "¿ÞÖÐÛãÙáâÐ, ÞÑàÐâØâÕáì Ò äÐÙÛ README ×Ð ÑÐ×ÞÒÞÙ ØÝäÞàÜÐæØÕÙ, Ð âÐÚÖÕ " "ØÝáâàãÚæØïÜØ Þ âÞÜ, ÚÐÚ ßÞÛãçØâì ÔÐÛìÝÕÙèãî ßÞÜÞéì." -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, fuzzy, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " @@ -1173,17 +1173,17 @@ msgstr "" "¿ÞÖÐÛãÙáâÐ, ÞÑàÐâØâÕáì Ò äÐÙÛ README ×Ð ÑÐ×ÞÒÞÙ ØÝäÞàÜÐæØÕÙ, Ð âÐÚÖÕ " "ØÝáâàãÚæØïÜØ Þ âÞÜ, ÚÐÚ ßÞÛãçØâì ÔÐÛìÝÕÙèãî ßÞÜÞéì." -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "¾~â~ÜÕÝÐ" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~º~ÛÐÒØèØ" @@ -1266,11 +1266,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "²ÞááâÐÝÞÒØâì ØÓàã:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "²ÞááâÒÝÞÒØâì" @@ -1996,7 +1996,7 @@ msgstr "" "ÀÕÖØÜ \"àÞÔÝÞÓÞ\" MIDI âàÕÑãÕâ ÞÑÝÞÒÛÕÝØÕ Roland Upgrade Þâ\n" "LucasArts, ÝÞ ÝÕ åÒÐâÐÕâ %s. ¿ÕàÕÚÛîçÐîáì ÝÐ AdLib." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2007,7 +2007,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2018,7 +2018,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2029,7 +2029,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2065,17 +2065,17 @@ msgstr " msgid "~W~ater Effect Enabled" msgstr "ÍääÕÚâë ÒÞÔë ÒÚÛîçÕÝë" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "ÄÐÙÛ ×ÐáâÐÒÚØ '%s' ÝÕ ÝÐÙÔÕÝ!" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "½Õ ãÔÐÛÞáì ×ÐÓàã×Øâì áÞåàÐÝñÝÝãî ØÓàã Ø× äÐÙÛÐ." -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "½Õ ãÔÐÛÞáì áÞåàÐÝØâì ØÓàã Ò äÐÙÛ." @@ -2315,15 +2315,15 @@ msgstr "" "½Õ ÜÞÓã áÞåàÐÝØâì ØÓàã Ò ßÞ×ØæØî %i\n" "\n" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 msgid "Loading game..." msgstr "·ÐÓàãÖÐî ØÓàã..." -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 msgid "Saving game..." msgstr "ÁÞåàÐÝïî ØÓàã..." -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2339,11 +2339,11 @@ msgstr "" "½ÐÖÜØâÕ ¾º, çâÞÑë ßÕàÕØÜÕÝÞÒÐâì Øå áÕÙçÐá, Ò ßàÞâØÒÝÞÜ áÛãçÐÕ íâÞ ÖÕ " "áÞÞÑéÕÝØÕ ßÞïÒØâáï ßàØ áÛÕÔãîéÕÜ ×ÐßãáÚÕ ØÓàë.\n" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "ScummVM ãáßÕèÝÞ ßàÕÞÑàÐ×ÞÒÐÛ ÒáÕ ÒÐèØ áÞåàÐÝÕÝØï ØÓà." -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2609,21 +2609,21 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "±Õ× ãÒÕÛØçÕÝØï" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 msgid "Enabled aspect ratio correction" msgstr "ºÞààÕÚæØï áÞÞâÝÞèÕÝØï áâÞàÞÝ ÒÚÛîçÕÝÐ" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 msgid "Disabled aspect ratio correction" msgstr "ºÞààÕÚæØï áÞÞâÝÞèÕÝØï áâÞàÞÝ ÒëÚÛîçÕÝÐ" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 msgid "Active graphics filter:" msgstr "°ÚâØÒÝëÙ ÓàÐäØçÕáÚØÙ äØÛìâà:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 msgid "Windowed mode" msgstr "¾ÚÞÝÝëÙ àÕÖØÜ" diff --git a/po/scummvm.pot b/po/scummvm.pot index 33ab8552db..86067a3083 100644 --- a/po/scummvm.pot +++ b/po/scummvm.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -44,9 +44,9 @@ msgstr "" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -91,14 +91,14 @@ msgstr "" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -434,13 +434,13 @@ msgid "Search:" msgstr "" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "" @@ -598,7 +598,7 @@ msgid "Special dithering modes supported by some games" msgstr "" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "" @@ -903,39 +903,39 @@ msgid "" "to use this theme you need to switch to another language first." msgstr "" -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "" -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "" -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "" -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "" @@ -1105,23 +1105,23 @@ msgstr "" msgid "~A~bout" msgstr "" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1130,31 +1130,31 @@ msgstr "" msgid "Save" msgstr "" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " "further assistance." msgstr "" -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "" @@ -1220,11 +1220,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "" @@ -1942,7 +1942,7 @@ msgid "" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1950,7 +1950,7 @@ msgid "" "%s" msgstr "" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1958,7 +1958,7 @@ msgid "" "%s" msgstr "" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -1966,7 +1966,7 @@ msgid "" "%s" msgstr "" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -1999,17 +1999,17 @@ msgstr "" msgid "~W~ater Effect Enabled" msgstr "" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "" -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "" @@ -2224,15 +2224,15 @@ msgid "" "\n" msgstr "" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 msgid "Loading game..." msgstr "" -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 msgid "Saving game..." msgstr "" -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2242,11 +2242,11 @@ msgid "" "Press OK to convert them now, otherwise you will be asked next time.\n" msgstr "" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "" -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2500,21 +2500,21 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 msgid "Enabled aspect ratio correction" msgstr "" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 msgid "Disabled aspect ratio correction" msgstr "" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 msgid "Active graphics filter:" msgstr "" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 msgid "Windowed mode" msgstr "" diff --git a/po/se_SE.po b/po/se_SE.po index 592fbcdd58..a1f9c91b44 100644 --- a/po/se_SE.po +++ b/po/se_SE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2011-11-27 19:00+0100\n" "Last-Translator: Hampus Flink \n" "Language-Team: \n" @@ -48,9 +48,9 @@ msgstr "Upp #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -96,14 +96,14 @@ msgstr "St #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -444,13 +444,13 @@ msgid "Search:" msgstr "Sök:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Ladda spel:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Ladda" @@ -611,7 +611,7 @@ msgid "Special dithering modes supported by some games" msgstr "Speciella gitterlägen stödda av vissa spel" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "Fullskärmsläge" @@ -926,39 +926,39 @@ msgstr "" "Temat du valde stöder inte ditt språk. Om du vill använda det här temat " "måste först byta till ett annat språk." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "Inget datum sparat" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "Ingen tid sparad" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "Ingen speltid sparad" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Radera" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "Vill du verkligen radera den här spardatan?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "Datum:" -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "Tid:" -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "Speltid:" -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Namnlös spardata" @@ -1129,23 +1129,23 @@ msgstr "~H~j msgid "~A~bout" msgstr "O~m~..." -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "Åte~r~vänd till launcher" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "Åte~r~vänd till launcher" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Spara spelet:" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1154,7 +1154,7 @@ msgstr "Spara spelet:" msgid "Save" msgstr "Spara" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " @@ -1164,7 +1164,7 @@ msgstr "" "hänvisa till README-filen för information och instruktioner för att få " "ytterligare assistens." -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, fuzzy, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " @@ -1174,17 +1174,17 @@ msgstr "" "hänvisa till README-filen för information och instruktioner för att få " "ytterligare assistens." -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "A~v~bryt" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~T~angenter" @@ -1266,11 +1266,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Återställ spel:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Återställ" @@ -1995,7 +1995,7 @@ msgstr "" "Stöd för Native MIDI kräver Roland-uppdateringen från LucasArts,\n" "men %s saknas. Använder AdLib istället." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2006,7 +2006,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2017,7 +2017,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2028,7 +2028,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2064,17 +2064,17 @@ msgstr "Huvud~m~eny" msgid "~W~ater Effect Enabled" msgstr "~V~atteneffekt aktiverad" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "Filmscensfilen '%s' hittades ej!" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "Kunde inte läsa spardata från filen" -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "Kunde inte skriva spardata till filen." @@ -2312,15 +2312,15 @@ msgstr "" "Kan inte spara data i position %i\n" "\n" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 msgid "Loading game..." msgstr "Laddar speldata..." -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 msgid "Saving game..." msgstr "Sparar speldata..." -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2337,11 +2337,11 @@ msgstr "" "Tryck \"OK\" för att konvertera dem nu, annars kommer du tillfrågas igen " "nästa gång du startar spelet.\n" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "ScummVM lyckades konvertera alla dina spardata." -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2609,21 +2609,21 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "Normalt (ingen skalning)" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 msgid "Enabled aspect ratio correction" msgstr "Korrektion av bildförhållande på" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 msgid "Disabled aspect ratio correction" msgstr "Korrektion av bildförhållande av" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 msgid "Active graphics filter:" msgstr "Aktivt grafikfilter:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 msgid "Windowed mode" msgstr "Fönsterläge" diff --git a/po/uk_UA.po b/po/uk_UA.po index 3d8ec456a6..cbcf7f670c 100644 --- a/po/uk_UA.po +++ b/po/uk_UA.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-05-20 22:39+0100\n" +"POT-Creation-Date: 2012-06-24 18:06+0100\n" "PO-Revision-Date: 2012-02-16 13:09+0200\n" "Last-Translator: Eugene Sandulenko\n" "Language-Team: Ukrainian\n" @@ -46,9 +46,9 @@ msgstr " #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 #: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 @@ -93,14 +93,14 @@ msgstr " #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 #: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:551 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 #: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 #: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 #: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 #: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 #: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 #: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:281 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -441,13 +441,13 @@ msgid "Search:" msgstr "¿ÞèãÚ:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:216 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "·ÐÒÐÝâÐÖØâØ Óàã:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 #: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:216 backends/platform/wince/CEActionsPocket.cpp:267 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "·ÐÒÐÝâÐÖØâØ" @@ -607,7 +607,7 @@ msgid "Special dithering modes supported by some games" msgstr "ÁßÕæöÐÛìÝö àÕÖØÜØ àÐáâàãÒÐÝÝï, ïÚö ßöÔâàØÜãîâì ÔÕïÚö öÓàØ" #: gui/options.cpp:753 -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2248 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 msgid "Fullscreen mode" msgstr "¿ÞÒÝÞÕÚàÐÝÝØÙ àÕÖØÜ" @@ -924,39 +924,39 @@ msgstr "" "²ØÑàÐÝÐ âÕÜÐ ÝÕ ßöÔâàØÜãô ßÞâÞçÝã ÜÞÒã. ÏÚéÞ ÒØ åÞçÕâÕ ÒØÚÞàØáâÞÒãÒÐâØ æî " "âÕÜã, ßÞâàöÑÝÞ Ò ßÕàèã çÕàÓã ×ÜöÝØâØ ÜÞÒã." -#: gui/saveload.cpp:58 gui/saveload.cpp:239 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "´Ðâã ÝÕ ×ÐßØáÐÝÞ" -#: gui/saveload.cpp:59 gui/saveload.cpp:240 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "ÇÐá ÝÕ ×ÐßØáÐÝÞ" -#: gui/saveload.cpp:60 gui/saveload.cpp:241 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "ÇÐá ÓàØ ÝÕ ×ÐßØáÐÝÞ" -#: gui/saveload.cpp:67 gui/saveload.cpp:155 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "²ØÔÐÛØâØ" -#: gui/saveload.cpp:154 +#: gui/saveload.cpp:172 msgid "Do you really want to delete this savegame?" msgstr "²Ø ÔöÙáÝÞ åÞçÕâÕ ÒØÔÐÛØâØ æÕ ×ÑÕàÕÖÕÝÝï?" -#: gui/saveload.cpp:264 +#: gui/saveload.cpp:282 msgid "Date: " msgstr "´ÐâÐ: " -#: gui/saveload.cpp:268 +#: gui/saveload.cpp:286 msgid "Time: " msgstr "ÇÐá: " -#: gui/saveload.cpp:274 +#: gui/saveload.cpp:292 msgid "Playtime: " msgstr "ÇÐá ÓàØ: " -#: gui/saveload.cpp:287 gui/saveload.cpp:354 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "·ÑÕàÕÖÕÝÝï ÑÕ× öÜÕÝö" @@ -1126,23 +1126,23 @@ msgstr "~ msgid "~A~bout" msgstr "¿àÞ ßàÞ~Ó~àÐÜã" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "~¿~ÞÒÕà. Ò ÓÞÛÞÒÝÕ ÜÕÝî" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:184 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~¿~ÞÒÕà.Ò ÓÞÛÞÒÝÕ ÜÕÝî" -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/cruise/menu.cpp:214 engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "·ÑÕàÕÓâØ Óàã: " -#: engines/dialogs.cpp:116 engines/agi/saveload.cpp:805 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:214 -#: engines/sci/engine/kfile.cpp:567 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1151,7 +1151,7 @@ msgstr " msgid "Save" msgstr "·ÐßØáÐâØ" -#: engines/dialogs.cpp:146 +#: engines/dialogs.cpp:144 msgid "" "Sorry, this engine does not currently provide in-game help. Please consult " "the README for basic information, and for instructions on how to obtain " @@ -1161,7 +1161,7 @@ msgstr "" "README ÔÛï ÞáÝÞÒÝÞ÷ öÝÞàÜÐæö÷, Ð âÐÚÞÖ öÝáâàãÚæöÙ, ïÚ ÞâàØÜÐâØ ßÞÔÐÛìèã " "ÔÞßÞÜÞÓã." -#: engines/dialogs.cpp:243 +#: engines/dialogs.cpp:228 #, fuzzy, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " @@ -1171,17 +1171,17 @@ msgstr "" "README ÔÛï ÞáÝÞÒÝÞ÷ öÝÞàÜÐæö÷, Ð âÐÚÞÖ öÝáâàãÚæöÙ, ïÚ ÞâàØÜÐâØ ßÞÔÐÛìèã " "ÔÞßÞÜÞÓã." -#: engines/dialogs.cpp:321 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:322 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "²ö~Ô~ÜöÝÐ" -#: engines/dialogs.cpp:325 +#: engines/dialogs.cpp:305 msgid "~K~eys" msgstr "~º~ÛÐÒöèö" @@ -1263,11 +1263,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "²öÔÝÞÒØâØ Óàã:" -#: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "²öÔÝÞÒØâØ" @@ -1991,7 +1991,7 @@ msgstr "" "ÀÕÖØÜ \"àöÔÝÞÓÞ\" MIDI ßÞâàÕÑãô ßÞÝÞÒÛÕÝÝï Roland Upgrade ÒöÔ\n" "LucasArts, ßàÞâÕ %s ÒöÔáãâÝöÙ. ¿ÕàÕÜØÚÐîáì ÝÐ AdLib." -#: engines/scumm/scumm.cpp:2271 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2002,7 +2002,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2013,7 +2013,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2290 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2024,7 +2024,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2505 +#: engines/scumm/scumm.cpp:2512 msgid "" "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " @@ -2060,17 +2060,17 @@ msgstr " msgid "~W~ater Effect Enabled" msgstr "µäÕÚâØ ÒÞÔØ ãÒöÜÚÝÕÝÞ" -#: engines/agos/animation.cpp:550 +#: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" msgstr "ÄÐÙÛ ×ÐáâÐÒÚØ '%s' ÝÕ ×ÝÐÙÔÕÝÞ!" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "½Õ ÒÔÐÛÞáï ×ÐÒÐÝâÐÖØâØ áâÐÝ ÓàØ × äÐÙÛã." -#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "½Õ ÒÔÐÛÞáï ×ÑÕàÕÓâØ áâÐÝ ÓàØ ã äÐÙÛ." @@ -2307,15 +2307,15 @@ msgstr "" "½Õ ÜÞÖã ×ÑÕàÕÓâØ Óàã ã áÛÞâ %i\n" "\n" -#: engines/parallaction/saveload.cpp:211 +#: engines/parallaction/saveload.cpp:204 msgid "Loading game..." msgstr "·ÐÒÐÝâÐÖãî Óàã..." -#: engines/parallaction/saveload.cpp:226 +#: engines/parallaction/saveload.cpp:219 msgid "Saving game..." msgstr "·ÑÕàÕÖãî Óàã..." -#: engines/parallaction/saveload.cpp:279 +#: engines/parallaction/saveload.cpp:272 msgid "" "ScummVM found that you have old savefiles for Nippon Safes that should be " "renamed.\n" @@ -2331,11 +2331,11 @@ msgstr "" "½ÐâØáÝöâì ¾º, éÞÑ ßÕàÕÒÕáâØ ÷å ×ÐàÐ×, öÝÐÚèÕ ãÕ ßÞÒöÔÞÜÛÕÝÝï ×'ïÒØâìáï ßàØ " "ÝÐáâãßÝÞÜã ×ÐßãáÚã ÓàØ.\n" -#: engines/parallaction/saveload.cpp:326 +#: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." msgstr "ScummVM ãáßöèÝÞ ßÕàÕÒöÒ ãáö ²Ðèö ×ÑÕàÕÖÕÝÝï." -#: engines/parallaction/saveload.cpp:328 +#: engines/parallaction/saveload.cpp:321 msgid "" "ScummVM printed some warnings in your console window and can't guarantee all " "your files have been converted.\n" @@ -2601,21 +2601,21 @@ msgctxt "lowres" msgid "Normal (no scaling)" msgstr "±Õ× ×ÑöÛìèÕÝÝï" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2147 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 msgid "Enabled aspect ratio correction" msgstr "ºÞàÕÚæöî áßöÒÒöÔÝÞèÕÝÝï áâÞàöÝ ãÒöÜÚÝÕÝÞ" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2153 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 msgid "Disabled aspect ratio correction" msgstr "ºÞàÕÚæöî áßöÒÒöÔÝÞèÕÝÝï áâÞàöÝ ÒØÜÚÝÕÝÞ" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2208 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 msgid "Active graphics filter:" msgstr "¿ÞâÞçÝØÙ ÓàÐäöçÝØÙ äöÛìâà:" -#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2250 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 msgid "Windowed mode" msgstr "²öÚÞÝÝØÙ àÕÖØÜ" -- cgit v1.2.3 From c4df905e0c1856bd3a06b8b7a90d2d5929ee6300 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 24 Jun 2012 21:23:27 +0200 Subject: CGE: Fix bug #3537529 --- engines/cge/cge.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp index 875ac34cd0..8ddb9be140 100644 --- a/engines/cge/cge.cpp +++ b/engines/cge/cge.cpp @@ -134,7 +134,6 @@ void CGEEngine::init() { _soundOk = 1; _sprTv = NULL; _gameCase2Cpt = 0; - _offUseCount = 0; _startGameSlot = ConfMan.hasKey("save_slot") ? ConfMan.getInt("save_slot") : -1; } -- cgit v1.2.3 From d2c510b8866d7901e126efbe8d96498587994939 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 24 Jun 2012 22:34:49 +0100 Subject: AUDIO: Update Mixer class doxygen comment on balance to be consistent. --- audio/mixer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/mixer.h b/audio/mixer.h index e38e052bef..a0060f2e1a 100644 --- a/audio/mixer.h +++ b/audio/mixer.h @@ -97,7 +97,7 @@ public: * @param stream the actual AudioStream to be played * @param id a unique id assigned to this stream * @param volume the volume with which to play the sound, ranging from 0 to 255 - * @param balance the balance with which to play the sound, ranging from -128 to 127 + * @param balance the balance with which to play the sound, ranging from -127 to 127 (full left to full right), 0 is balanced, -128 is invalid * @param autofreeStream a flag indicating whether the stream should be * freed after playback finished * @param permanent a flag indicating whether a plain stopAll call should -- cgit v1.2.3 From 150011b843e865d99322417e45ba53d6a64ff34b Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 24 Jun 2012 23:49:03 +0200 Subject: CGE: Fix FX stereo --- engines/cge/sound.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engines/cge/sound.cpp b/engines/cge/sound.cpp index 7f74794474..b378898955 100644 --- a/engines/cge/sound.cpp +++ b/engines/cge/sound.cpp @@ -91,6 +91,12 @@ void Sound::sndDigiStart(SmpInfo *PSmpInfo) { // Start the new sound _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, Audio::makeLoopingAudioStream(_audioStream, (uint)PSmpInfo->_counter)); + + // CGE pan: + // 8 = Center + // Less = Left + // More = Right + _vm->_mixer->setChannelBalance(_soundHandle, (int8)CLIP(((PSmpInfo->_span - 8) * 16), -127, 127)); } void Sound::stop() { -- cgit v1.2.3 From c7fd284e4a96686b3dde288c047db8b68a96a408 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 25 Jun 2012 00:44:59 +0200 Subject: CGE: Fix bug 3537530 - ALTering dice --- engines/cge/events.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp index 095aac2412..c8baf4ed61 100644 --- a/engines/cge/events.cpp +++ b/engines/cge/events.cpp @@ -55,7 +55,7 @@ Sprite *Keyboard::setClient(Sprite *spr) { bool Keyboard::getKey(Common::Event &event) { Common::KeyCode keycode = event.kbd.keycode; - if ((keycode == Common::KEYCODE_LALT) || (keycode == Common::KEYCODE_RALT)) + if (((keycode == Common::KEYCODE_LALT) || (keycode == Common::KEYCODE_RALT)) && event.type == Common::EVENT_KEYDOWN) _keyAlt = true; else _keyAlt = false; -- cgit v1.2.3 From 20a781c02047cc8e2908e77707115db09a9aa59f Mon Sep 17 00:00:00 2001 From: sylvaintv Date: Mon, 25 Jun 2012 00:49:33 +0200 Subject: TOON: Fix bug #3533291 - Crash in Russian Version The Russian-localized version of an animation contained an empty frame, added a check to skip the rendering. Bug #3533291: "TOON: Russian Version Crash at Voice Scanner" --- engines/toon/anim.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp index 84f6fa375c..a4eb1f210c 100644 --- a/engines/toon/anim.cpp +++ b/engines/toon/anim.cpp @@ -146,6 +146,9 @@ void Animation::drawFrame(Graphics::Surface &surface, int32 frame, int32 xx, int if (_frames[frame]._ref != -1) frame = _frames[frame]._ref; + if (!_frames[frame]._data) + return; + int32 rectX = _frames[frame]._x2 - _frames[frame]._x1; int32 rectY = _frames[frame]._y2 - _frames[frame]._y1; int32 offsX = 0; -- cgit v1.2.3 From 7b44c20eb114515a1117df7f930ed98af0528db4 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 25 Jun 2012 19:59:46 +0200 Subject: BADA: Implement weekday querying in getTimeAndDate. This furthermore makes the returned time be the wall time instead of UTC. Thanks to Chris Warren-Smith for testing and improving a patch based on pull request #248. --- backends/platform/bada/system.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/backends/platform/bada/system.cpp b/backends/platform/bada/system.cpp index 816a6755fc..3f862c2571 100644 --- a/backends/platform/bada/system.cpp +++ b/backends/platform/bada/system.cpp @@ -21,6 +21,7 @@ */ #include +#include #include "common/config-manager.h" #include "common/file.h" @@ -42,7 +43,9 @@ using namespace Osp::Base; using namespace Osp::Base::Runtime; +using namespace Osp::Locales; using namespace Osp::Ui::Controls; +using namespace Osp::System; #define DEFAULT_CONFIG_FILE "/Home/scummvm.ini" #define RESOURCE_PATH "/Res" @@ -305,7 +308,7 @@ void BadaSystem::initBackend() { ConfMan.registerDefault("aspect_ratio", false); ConfMan.setBool("confirm_exit", false); - Osp::System::SystemTime::GetTicks(_epoch); + SystemTime::GetTicks(_epoch); if (E_SUCCESS != initModules()) { AppLog("initModules failed"); @@ -372,7 +375,7 @@ bool BadaSystem::pollEvent(Common::Event &event) { uint32 BadaSystem::getMillis() { long long result, ticks = 0; - Osp::System::SystemTime::GetTicks(ticks); + SystemTime::GetTicks(ticks); result = ticks - _epoch; return result; } @@ -392,18 +395,18 @@ void BadaSystem::updateScreen() { void BadaSystem::getTimeAndDate(TimeDate &td) const { DateTime currentTime; - if (E_SUCCESS == Osp::System::SystemTime::GetCurrentTime(currentTime)) { + if (E_SUCCESS == SystemTime::GetCurrentTime(WALL_TIME, currentTime)) { td.tm_sec = currentTime.GetSecond(); td.tm_min = currentTime.GetMinute(); td.tm_hour = currentTime.GetHour(); td.tm_mday = currentTime.GetDay(); td.tm_mon = currentTime.GetMonth(); td.tm_year = currentTime.GetYear(); -#ifdef RELEASE_BUILD - #error getTimeAndDate() is not setting the day of the week -#else - td.tm_wday = 0; // FIXME -#endif + + Calendar *calendar = Calendar::CreateInstanceN(CALENDAR_GREGORIAN); + calendar->SetTime(currentTime); + td.tm_wday = calendar->GetTimeField(TIME_FIELD_DAY_OF_WEEK) - 1; + delete calendar; } } -- cgit v1.2.3 From 16adcb5145ce293af120b7cc828a08166da310e2 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 25 Jun 2012 22:32:00 +0300 Subject: COMMON: Simplify the documentation in openForSaving() The new more concise description is courtesy of wjp. --- common/savefile.h | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/common/savefile.h b/common/savefile.h index abe0df2758..da787289ee 100644 --- a/common/savefile.h +++ b/common/savefile.h @@ -107,25 +107,13 @@ public: * Open the savefile with the specified name in the given directory for * saving. * - * Saved games are always compressed using ZIP compression on platforms - * where the zlib library is included (i.e. almost all platforms except the - * NDS). Engines are expected to always create compressed saved games. - * A notable exception is when the created saved games are compatible with - * the ones that the original interpreters create, and they are then used - * with later game versions in a game series which are not supported by - * ScummVM. An example is the characters exported in the Quest for Glory - * games: these saved states actually contain simple text strings with - * character attributes, which can then be used with later games in the - * Quest for Glory Series. Currently, ScummVM supports Quest for Glory - * 1, 2 and 3. These exported heroes can also be read by the AGS VGA fan - * made version of Quest for Glory 2 and the SCI32 game Quest for Glory IV, - * none of which is supported by ScummVM yet. Moreover, these heroes can - * also be imported into Quest for Glory V, which is a 3D game and thus - * outside of ScummVM's scope. For these reasons, in such cases engines can - * create uncompressed saved games to help users import them in other games - * not supported by ScummVM. Users only need to know that such saved games - * exported by ScummVM are compatible with later unsupported games, without - * needing to explain how to uncompress them. + * Saved games are compressed by default, and engines are expected to + * always write compressed saves. + * + * A notable exception is if uncompressed files are needed for + * compatibility with games not supported by ScummVM, such as character + * exports from the Quest for Glory series. QfG5 is a 3D game and won't be + * supported by ScummVM. * * @param name the name of the savefile * @param compress toggles whether to compress the resulting save file -- cgit v1.2.3 From 659d0cfcc39721001f607e4ca51b8eb477708404 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 25 Jun 2012 22:39:28 +0300 Subject: COMMON: Also adapt openForSaving() in the DC and N64 backends --- backends/platform/dc/vmsave.cpp | 5 +++-- backends/platform/n64/framfs_save_manager.h | 4 ++-- backends/platform/n64/pakfs_save_manager.h | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/backends/platform/dc/vmsave.cpp b/backends/platform/dc/vmsave.cpp index e06dd7fa43..ba3b787942 100644 --- a/backends/platform/dc/vmsave.cpp +++ b/backends/platform/dc/vmsave.cpp @@ -316,8 +316,9 @@ public: class VMSaveManager : public Common::SaveFileManager { public: - virtual Common::OutSaveFile *openForSaving(const Common::String &filename) { - return Common::wrapCompressedWriteStream(new OutVMSave(filename.c_str())); + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true) { + OutVMSave *s = new OutVMSave(filename.c_str()); + return compress ? Common::wrapCompressedWriteStream(s) : s; } virtual Common::InSaveFile *openForLoading(const Common::String &filename) { diff --git a/backends/platform/n64/framfs_save_manager.h b/backends/platform/n64/framfs_save_manager.h index da553e423a..0a88c8666b 100644 --- a/backends/platform/n64/framfs_save_manager.h +++ b/backends/platform/n64/framfs_save_manager.h @@ -100,10 +100,10 @@ public: class FRAMSaveManager : public Common::SaveFileManager { public: - virtual Common::OutSaveFile *openForSaving(const Common::String &filename) { + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true) { OutFRAMSave *s = new OutFRAMSave(filename.c_str()); if (!s->err()) { - return Common::wrapCompressedWriteStream(s); + return compress ? Common::wrapCompressedWriteStream(s) : s; } else { delete s; return 0; diff --git a/backends/platform/n64/pakfs_save_manager.h b/backends/platform/n64/pakfs_save_manager.h index e0fcbc1e2d..6e67fb0f5f 100644 --- a/backends/platform/n64/pakfs_save_manager.h +++ b/backends/platform/n64/pakfs_save_manager.h @@ -101,10 +101,10 @@ public: class PAKSaveManager : public Common::SaveFileManager { public: - virtual Common::OutSaveFile *openForSaving(const Common::String &filename) { + virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true) { OutPAKSave *s = new OutPAKSave(filename.c_str()); if (!s->err()) { - return Common::wrapCompressedWriteStream(s); + return compress ? Common::wrapCompressedWriteStream(s) : s; } else { delete s; return NULL; -- cgit v1.2.3 From 80388527ea891bc9c44cd11ff31afefb253d3eaa Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 25 Jun 2012 23:33:17 +0200 Subject: CGE: Fix SPR files with extra 0x1A or missing ending CRLF. Fix bug #3537527 --- engines/cge/fileio.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/engines/cge/fileio.cpp b/engines/cge/fileio.cpp index c50db4e929..f23105d823 100644 --- a/engines/cge/fileio.cpp +++ b/engines/cge/fileio.cpp @@ -201,9 +201,28 @@ EncryptedStream::EncryptedStream(CGEEngine *vm, const char *name) : _vm(vm) { _error = true; _vm->_resman->seek(kp->_pos); - byte *dataBuffer = (byte *)malloc(kp->_size); - _vm->_resman->read(dataBuffer, kp->_size); - _readStream = new Common::MemoryReadStream(dataBuffer, kp->_size, DisposeAfterUse::YES); + byte *dataBuffer; + int bufSize; + + if ((strlen(name) > 4) && (scumm_stricmp(name + strlen(name) - 4, ".SPR") == 0)) { + // SPR files have some inconsistencies. Some have extra 0x1A at the end, some others + // do not have a carriage return at the end of the last line + // Therefore, we remove this ending 0x1A and add extra new lines. + // This fixes bug #3537527 + dataBuffer = (byte *)malloc(kp->_size + 2); + _vm->_resman->read(dataBuffer, kp->_size); + if (dataBuffer[kp->_size - 1] == 0x1A) + dataBuffer[kp->_size - 1] = '\n'; + dataBuffer[kp->_size] = '\n'; + dataBuffer[kp->_size + 1] = '\n'; + bufSize = kp->_size + 2; + } else { + dataBuffer = (byte *)malloc(kp->_size); + _vm->_resman->read(dataBuffer, kp->_size); + bufSize = kp->_size; + } + + _readStream = new Common::MemoryReadStream(dataBuffer, bufSize, DisposeAfterUse::YES); } uint32 EncryptedStream::read(void *dataPtr, uint32 dataSize) { -- cgit v1.2.3 From f8b8bd8c9b4c64d4a898b3742cebb959bca5d4fc Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 25 Jun 2012 22:44:52 +0100 Subject: I18N: Update Hungarian translation from patch #3537638 --- gui/themes/translations.dat | Bin 314939 -> 318276 bytes po/hu_HU.po | 75 +++++++++++++++++++++----------------------- 2 files changed, 35 insertions(+), 40 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index f4a3a96084..12ad3d4352 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ diff --git a/po/hu_HU.po b/po/hu_HU.po index e1eb2fb15f..c868806a8a 100644 --- a/po/hu_HU.po +++ b/po/hu_HU.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-06-24 18:06+0100\n" -"PO-Revision-Date: 2012-04-18 08:20+0100\n" -"Last-Translator: Gruby \n" +"PO-Revision-Date: 2012-06-25 06:21+0100\n" +"Last-Translator: George Kormendi \n" "Language-Team: Hungarian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-2\n" @@ -194,9 +194,8 @@ msgid "Platform:" msgstr "Platform:" #: gui/launcher.cpp:231 -#, fuzzy msgid "Engine" -msgstr "Vizsgál" +msgstr "Motor" #: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" @@ -1248,12 +1247,12 @@ msgstr "Ind #: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" -msgstr "" +msgstr "Eredeti ment/tölt képernyõk használata" #: 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 "Az eredeti mentés/betöltés képernyõ használata a ScummVM képek helyett" #: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" @@ -1264,68 +1263,66 @@ msgid "Restore" msgstr "Visszaállítás" #: engines/dreamweb/detection.cpp:57 -#, fuzzy msgid "Use bright palette mode" -msgstr "Jobb felsõ tárgy" +msgstr "Fényes paletta mód használata" #: engines/dreamweb/detection.cpp:58 msgid "Display graphics using the game's bright palette" -msgstr "" +msgstr "Grafikus megjelenítésre használja a játék fényes palettáját" #: engines/sci/detection.cpp:370 msgid "EGA undithering" msgstr "EGA szinjavítás" #: engines/sci/detection.cpp:371 -#, fuzzy msgid "Enable undithering in EGA games" -msgstr "EGA színjavítás támogatott EGA játékokban" +msgstr "Undithering engedélyezése EGA játékokban" #: engines/sci/detection.cpp:380 -#, fuzzy msgid "Prefer digital sound effects" -msgstr "Speciális hangeffektusok hangereje" +msgstr "Digitális hangeffektusok elõnyben" #: engines/sci/detection.cpp:381 msgid "Prefer digital sound effects instead of synthesized ones" -msgstr "" +msgstr "Digitális hanghatások elõnyben a szintetizáltakkal szemben" #: engines/sci/detection.cpp:400 msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "" +msgstr "IMF/Yahama FB-01 használata MIDI kimentre" #: engines/sci/detection.cpp:401 msgid "" "Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " "output" msgstr "" +"IBM Music Feature kártya vagy Yahama FB-01 FM szintetizátor modul használata " +"MIDI kimenetre" #: engines/sci/detection.cpp:411 msgid "Use CD audio" -msgstr "" +msgstr "CD audió használata" #: engines/sci/detection.cpp:412 msgid "Use CD audio instead of in-game audio, if available" -msgstr "" +msgstr "CD audió használata a játékban lévõvel szemben, ha elérhetõ" #: engines/sci/detection.cpp:422 msgid "Use Windows cursors" -msgstr "" +msgstr "Windows kurzorok használata" #: engines/sci/detection.cpp:423 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" -msgstr "" +msgstr "Windows kurzorok használata (kisebb és monokróm) a DOS-osok helyett " #: engines/sci/detection.cpp:433 -#, fuzzy msgid "Use silver cursors" -msgstr "Szabvány kurzor" +msgstr "Ezüst kurzor használata" #: engines/sci/detection.cpp:434 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" -msgstr "" +msgstr "Alternatív ezüst kurzorszett használata, a normál arany helyett" #: engines/scumm/dialogs.cpp:175 #, c-format @@ -2078,61 +2075,59 @@ msgstr "J #. Malcolm makes a joke. #: engines/kyra/detection.cpp:62 msgid "Studio audience" -msgstr "" +msgstr "Stúdió közönség" #: engines/kyra/detection.cpp:63 msgid "Enable studio audience" -msgstr "" +msgstr "Stúdió közönség engedélyezése" #. I18N: This option allows the user to skip text and cutscenes. #: engines/kyra/detection.cpp:73 msgid "Skip support" -msgstr "" +msgstr "Átugrás támogatás" #: engines/kyra/detection.cpp:74 msgid "Allow text and cutscenes to be skipped" -msgstr "" +msgstr "Szöveg és átvezetõk átugrásának támogatása" #. I18N: Helium mode makes people sound like they've inhaled Helium. #: engines/kyra/detection.cpp:84 msgid "Helium mode" -msgstr "" +msgstr "Helium mód" #: engines/kyra/detection.cpp:85 -#, fuzzy msgid "Enable helium mode" -msgstr "Roland GS Mód engedélyezve" +msgstr "Helium mód engedélyezve" #. 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 "Finom görgetés" #: engines/kyra/detection.cpp:100 msgid "Enable smooth scrolling when walking" -msgstr "" +msgstr "Finom görgetés engedélyezése járás közben" #. 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 "Szabvány kurzor" +msgstr "Lebegõ kurzor" #: engines/kyra/detection.cpp:113 msgid "Enable floating cursors" -msgstr "" +msgstr "Lebegõ kurzor engedélyezése" #. I18N: HP stands for Hit Points #: engines/kyra/detection.cpp:127 msgid "HP bar graphs" -msgstr "" +msgstr "HP sáv grafika" #: engines/kyra/detection.cpp:128 msgid "Enable hit point bar graphs" -msgstr "" +msgstr "Hit point sáv grafika engedélyezése" #: engines/kyra/lol.cpp:478 msgid "Attack 1" @@ -2198,11 +2193,11 @@ msgstr "" #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" -msgstr "" +msgstr "Floppy intro" #: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" -msgstr "" +msgstr "A floppy verzió intro használata (csak CD verziónál)" #: engines/sky/compact.cpp:130 msgid "" @@ -2286,11 +2281,11 @@ msgstr "" #: engines/sword2/sword2.cpp:79 msgid "Show object labels" -msgstr "" +msgstr "Tárgycimke látható" #: engines/sword2/sword2.cpp:80 msgid "Show labels for objects on mouse hover" -msgstr "" +msgstr "Tárgycimke látható ha az egér felette van" #: engines/parallaction/saveload.cpp:133 #, c-format -- cgit v1.2.3 From 7e66cbd468a5b89eaf170d5e0fb3bb312365628c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 26 Jun 2012 11:12:37 +0300 Subject: SCI: Rename a parameter in validateExportFunc() This ensures that it won't be confused with a function with the same name --- engines/sci/engine/script.cpp | 4 ++-- engines/sci/engine/script.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 57334b89aa..d4143dcceb 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -385,7 +385,7 @@ void Script::setLockers(int lockers) { _lockers = lockers; } -uint32 Script::validateExportFunc(int pubfunct, bool relocateSci3) { +uint32 Script::validateExportFunc(int pubfunct, bool relocSci3) { bool exportsAreWide = (g_sci->_features->detectLofsType() == SCI_VERSION_1_MIDDLE); if (_numExports <= pubfunct) { @@ -401,7 +401,7 @@ uint32 Script::validateExportFunc(int pubfunct, bool relocateSci3) { if (getSciVersion() != SCI_VERSION_3) { offset = READ_SCI11ENDIAN_UINT16(_exportTable + pubfunct); } else { - if (!relocateSci3) + if (!relocSci3) offset = READ_SCI11ENDIAN_UINT16(_exportTable + pubfunct) + getCodeBlockOffsetSci3(); else offset = relocateOffsetSci3(pubfunct * 2 + 22); diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h index 1fc8caf313..0b499203c2 100644 --- a/engines/sci/engine/script.h +++ b/engines/sci/engine/script.h @@ -197,11 +197,11 @@ public: * Validate whether the specified public function is exported by * the script in the specified segment. * @param pubfunct Index of the function to validate - * @param relocateSci3 Decide whether to relocate this SCI3 public function or not + * @param relocSci3 Decide whether to relocate this SCI3 public function or not * @return NULL if the public function is invalid, its * offset into the script's segment otherwise */ - uint32 validateExportFunc(int pubfunct, bool relocateSci3); + uint32 validateExportFunc(int pubfunct, bool relocSci3); /** * Marks the script as deleted. -- cgit v1.2.3 From 152b340a9ac502434e99da79e880625626209adc Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 26 Jun 2012 13:22:05 +0300 Subject: SCI: Remove a music fading hack used for the intro of Longbow --- engines/sci/sound/soundcmd.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp index 989df7c8a1..cbb5cab4fe 100644 --- a/engines/sci/sound/soundcmd.cpp +++ b/engines/sci/sound/soundcmd.cpp @@ -368,6 +368,11 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) { case 4: // SCI01+ case 5: // SCI1+ (SCI1 late sound scheme), with fade and continue musicSlot->fadeTo = CLIP(argv[1].toUint16(), 0, MUSIC_VOLUME_MAX); + // Check if the song is already at the requested volume. If it is, don't + // perform any fading. Happens for example during the intro of Longbow. + if (musicSlot->fadeTo == musicSlot->volume) + return acc; + // sometimes we get objects in that position, fix it up (ffs. workarounds) if (!argv[1].getSegment()) musicSlot->fadeStep = volume > musicSlot->fadeTo ? -argv[3].toUint16() : argv[3].toUint16(); @@ -497,12 +502,7 @@ void SoundCommandParser::processUpdateCues(reg_t obj) { // fireworks). // It is also needed in other games, e.g. LSL6 when talking to the // receptionist (bug #3192166). - if (g_sci->getGameId() == GID_LONGBOW && g_sci->getEngineState()->currentRoomNumber() == 95) { - // HACK: Don't set a signal here in the intro of Longbow, as that makes some dialog - // boxes disappear too soon (bug #3044844). - } else { - writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET); - } + writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET); if (_soundVersion <= SCI_VERSION_0_LATE) { processStopSound(obj, false); } else { -- cgit v1.2.3 From c2aabea6faa6fc4a056000aa55859526b0c72034 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Tue, 26 Jun 2012 21:05:01 +0100 Subject: DRASCULA: Add Spanish subtitles for von Braun cutscene This finally solves bug #3069981 DRASCULA: no subtitles in scene with "von Braun". Thanks go to Tomás Maidagan for providing these subtitles. --- devtools/create_drascula/staticdata.h | 8 ++++---- dists/engine-data/drascula.dat | Bin 218771 -> 219267 bytes 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/devtools/create_drascula/staticdata.h b/devtools/create_drascula/staticdata.h index 21b9a82622..e0e4f9da10 100644 --- a/devtools/create_drascula/staticdata.h +++ b/devtools/create_drascula/staticdata.h @@ -6031,10 +6031,10 @@ const char *_texthis[NUM_LANGS][NUM_TEXTHIS] = { }, { "", - "", - "", - "", - "" + "Hace mucho tiempo, parece ser que Drascula mato a la mujer de Von Braun, asi que, con la intencion de enfrentarse al conde, Von Braun empezo a investigar todo lo que pudo sobre vampiros.", + "Cuando creyo estar preparado, subio al castillo y tuvo un enfrentamiento muy violento con Drascula.", + "Nadie sabe que paso exactamente. Aunque Von Braun perdio, Drascula no pudo matarlo.", + "Von Braun se sintio humillado por su derrota, huyo del castillo y no ha tenido valor para enfrentarse de nuevo a Drascula." }, { "", diff --git a/dists/engine-data/drascula.dat b/dists/engine-data/drascula.dat index 0938ef4a9a..e2b046a527 100644 Binary files a/dists/engine-data/drascula.dat and b/dists/engine-data/drascula.dat differ -- cgit v1.2.3 From 7705c13cc41ba9b4c82d2f061cc42a84f004719e Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Tue, 26 Jun 2012 21:19:16 +0100 Subject: SWORD1: Add workaround for missing subtitles in the demo --- engines/sword1/objectman.cpp | 217 ++++++++++++++++++++++++++++++++++++++++++- engines/sword1/objectman.h | 16 ++++ 2 files changed, 231 insertions(+), 2 deletions(-) diff --git a/engines/sword1/objectman.cpp b/engines/sword1/objectman.cpp index d3890cc1fc..f3c83c1656 100644 --- a/engines/sword1/objectman.cpp +++ b/engines/sword1/objectman.cpp @@ -107,6 +107,7 @@ char *ObjectMan::lockText(uint32 textId) { warning("Missing translation for textId %u (\"%s\")", textId, text); unlockText(textId, BS1_ENGLISH); } + return _missingSubTitleStr; } return text; @@ -118,6 +119,42 @@ char *ObjectMan::lockText(uint32 textId, uint8 lang) { return NULL; addr += sizeof(Header); if ((textId & ITM_ID) >= _resMan->readUint32(addr)) { + // Workaround for missing sentences in some langages in the demo. + switch(textId) { + case 8455194: + return const_cast(_translationId8455194[lang]); + case 8455195: + return const_cast(_translationId8455195[lang]); + case 8455196: + return const_cast(_translationId8455196[lang]); + case 8455197: + return const_cast(_translationId8455197[lang]); + case 8455198: + return const_cast(_translationId8455198[lang]); + case 8455199: + return const_cast(_translationId8455199[lang]); + case 8455200: + return const_cast(_translationId8455200[lang]); + case 8455201: + return const_cast(_translationId8455201[lang]); + case 8455202: + return const_cast(_translationId8455202[lang]); + case 8455203: + return const_cast(_translationId8455203[lang]); + case 8455204: + return const_cast(_translationId8455204[lang]); + case 8455205: + return const_cast(_translationId8455205[lang]); + case 6488080: + return const_cast(_translationId6488080[lang]); + case 6488081: + return const_cast(_translationId6488081[lang]); + case 6488082: + return const_cast(_translationId6488082[lang]); + case 6488083: + return const_cast(_translationId6488083[lang]); + } + warning("ObjectMan::lockText(%d): only %d texts in file", textId & ITM_ID, _resMan->readUint32(addr)); return NULL; } @@ -127,7 +164,7 @@ char *ObjectMan::lockText(uint32 textId, uint8 lang) { // We use the hardcoded text in this case. if (textId == 2950145) return const_cast(_translationId2950145[lang]); - + warning("ObjectMan::lockText(%d): text number has no text lines", textId); return NULL; } @@ -204,7 +241,183 @@ const char *const ObjectMan::_translationId2950145[7] = { "Eh?", // Italian "\277Eh?", // Spanish "Ano?", // Czech - " " // Portuguese + NULL // Portuguese +}; + +// Missing translation for textId 8455194 (in the demo). +const char *const ObjectMan::_translationId8455194[7] = { + NULL, // "Who was the guy you were supposed to meet?", // English (not needed) + "Qui \351tait l'homme que vous deviez rencontrer?", // French + "Wer war der Typ, den Du treffen wolltest?", // German + "Chi dovevi incontrare?", // Italian + "\277Qui\351n era el hombre con el que ten\355as que encontrarte?", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 8455195 (in the demo). +const char *const ObjectMan::_translationId8455195[7] = { + NULL, // "His name was Plantard. I didn't know him, but he called me last night.", // English (not needed) + "Son nom \351tait Plantard. Je ne le connaissais pas, mais il m'avait t\351l\351phon\351 la veille.", // French + "Sein Name war Plantard. Ich kannte ihn nicht, aber er hat mich letzte Nacht angerufen.", // German + "Si chiamava Plantard. Mi ha chiamato ieri sera, ma non lo conoscevo.", // Italian + "Su nombre era Plantard. Yo no lo conoc\355a pero \351l me llam\363 ayer por la noche.", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 8455196 (in the demo). +const char *const ObjectMan::_translationId8455196[7] = { + NULL, // "He said he had a story which would interest me.", // English (not needed) + "Il a dit qu'il avait une histoire qui devrait m'int\351resser.", // French + "Er sagte, er h\344tte eine Story, die mich interessieren w\374rde.", // German + "Mi disse che aveva una storia che mi poteva interessare.", // Italian + "Dijo que ten\355a una historia que me interesar\355a.", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 8455197 (in the demo). +const char *const ObjectMan::_translationId8455197[7] = { + NULL, // "He asked me to meet him at the caf\351.", // English (not needed) + "Il m'a demand\351 de le rencontrer au caf\351.", // French + "Er fragte mich, ob wir uns im Caf\351 treffen k\366nnten.", // German + "Mi chiese di incontrarci al bar.", // Italian + "Me pidi\363 que nos encontr\341ramos en el caf\351.", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 8455198 (in the demo). +const char *const ObjectMan::_translationId8455198[7] = { + NULL, // "I guess I'll never know what he wanted to tell me...", // English (not needed) + "Je suppose que je ne saurai jamais ce qu'il voulait me dire...", // French + "Ich werde wohl nie erfahren, was er mir sagen wollte...", // German + "Penso che non sapr\362 mai che cosa voleva dirmi...", // Italian + "Supongo que nunca sabr\351 qu\351 me quer\355a contar...", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 8455199 (in the demo). +const char *const ObjectMan::_translationId8455199[7] = { + NULL, // "Not unless you have Rosso's gift for psychic interrogation.", // English (not needed) + "Non, \340 moins d'avoir les dons de Rosso pour les interrogatoires psychiques.", // French + "Es sei denn, Du h\344ttest Rosso's Gabe der parapsychologischen Befragung.", // German + "A meno che tu non riesca a fare interrogatori telepatici come Rosso.", // Italian + "A no ser que tengas el don de Rosso para la interrogaci\363n ps\355quica.", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 8455200 (in the demo). +const char *const ObjectMan::_translationId8455200[7] = { + NULL, // "How did Plantard get your name?", // English (not needed) + "Comment Plantard a-t-il obtenu votre nom?", // French + "Woher hat Plantard Deinen Namen?", // German + "Come ha fatto Plantard a sapere il tuo nome?", // Italian + "\277C\363mo consigui\363 Plantard tu nombre?", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 8455201 (in the demo). +const char *const ObjectMan::_translationId8455201[7] = { + NULL, // "Through the newspaper - La Libert\351.", // English (not needed) + "Par mon journal... La Libert\351.", // French + "\334ber die Zeitung - La Libert\351.", // German + "Tramite il giornale La Libert\351.", // Italian + "Por el peri\363dico - La Libert\351.", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 8455202 (in the demo). +const char *const ObjectMan::_translationId8455202[7] = { + NULL, // "I'd written an article linking two unsolved murders, one in Italy, the other in Japan.", // English (not needed) + "J'ai \351crit un article o\371 je faisais le lien entre deux meurtres inexpliqu\351s, en Italie et au japon.", // French + "Ich habe einen Artikel geschrieben, in dem ich zwei ungel\366ste Morde miteinander in Verbindung bringe, einen in Italien, einen anderen in Japan.", // German + "Ho scritto un articolo che metteva in collegamento due omicidi insoluti in Italia e Giappone.", // Italian + "Yo hab\355a escrito un art\355culo conectando dos asesinatos sin resolver, uno en Italia, el otro en Jap\363n.", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 8455203 (in the demo). +const char *const ObjectMan::_translationId8455203[7] = { + NULL, // "The cases were remarkably similar...", // English (not needed) + "Les affaires \351taient quasiment identiques...", // French + "Die F\344lle sind sich bemerkenswert \344hnlich...", // German + "I casi erano sorprendentemente uguali...", // Italian + "Los casos eran incre\355blemente parecidos...", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 8455204 (in the demo). +const char *const ObjectMan::_translationId8455204[7] = { + NULL, // "...a wealthy victim, no apparent motive, and a costumed killer.", // English (not needed) + "...une victime riche, pas de motif apparent, et un tueur d\351guis\351.", // French + "...ein wohlhabendes Opfer, kein offensichtliches Motiv, und ein verkleideter Killer.", // German + "...una vittima ricca, nessun motivo apparente e un assassino in costume.", // Italian + "...una v\355ctima rica, sin motivo aparente, y un asesino disfrazado.", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 8455205 (in the demo). +const char *const ObjectMan::_translationId8455205[7] = { + NULL, // "Plantard said he could supply me with more information.", // English (not needed) + "Plantard m'a dit qu'il pourrait me fournir des renseignements.", // French + "Plantard sagte, er k\366nne mir weitere Informationen beschaffen.", // German + "Plantard mi disse che mi avrebbe fornito ulteriori informazioni.", // Italian + "Plantard dijo que \351l me pod\355a proporcionar m\341s informaci\363n.", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 6488080 (in the demo). +const char *const ObjectMan::_translationId6488080[7] = { + NULL, // "I wasn't going to head off all over Paris until I'd investigated some more.", // English (not needed) + "Je ferais mieux d'enqu\351ter un peu par ici avant d'aller me promener ailleurs.", // French + "Ich durchquere nicht ganz Paris, bevor ich etwas mehr herausgefunden habe.", // German + "Non mi sarei incamminato per tutta Parigi prima di ulteriori indagini.", // Italian + "No iba a ponerme a recorrer Par\355s sin haber investigado un poco m\341s.", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 6488081 (in the demo). +const char *const ObjectMan::_translationId6488081[7] = { + NULL, // "I wasn't sure what I was going to do when I caught up with that clown...", // English (not needed) + "Je ne savais pas ce que je ferais quand je rattraperais le clown...", // French + "Ich wu\337te nicht, worauf ich mich einlie\337, als ich dem Clown nachjagte...", // German + "Non sapevo cosa avrei fatto una volta raggiunto quel clown...", // Italian + "No sab\355a muy bien qu\351 es lo que har\355a cuando alcanzara al payaso...", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 6488082 (in the demo). +const char *const ObjectMan::_translationId6488082[7] = { + NULL, // "...but before I knew it, I was drawn into a desperate race between two ruthless enemies.", // English (not needed) + "...mais avant de m'en rendre compte je me retrouvais happ\351 dans une course effr\351n\351e entre deux ennemis impitoyables.", // French + "... doch bevor ich mich versah, war ich inmitten eines Wettlaufs von zwei r\374cksichtslosen Feinden.", // German + "... ma prima che me ne rendessi conto, fui trascinato in una corsa disperata con due spietati nemici.", // Italian + "...pero sin darme cuenta, acab\351 en medio de una desesperada carrera entre dos despiadados enemigos.", // Spanish + NULL, // Czech + NULL // Portuguese +}; + +// Missing translation for textId 6488083 (in the demo). +const char *const ObjectMan::_translationId6488083[7] = { + NULL, // "The goal: the mysterious power of the Broken Sword.", // English (not needed) + "Le but: les pouvoirs myst\351rieux de l'\351p\351e bris\351e.", // French + "Das Ziel: die geheimnisvolle Macht des zerbrochenen Schwertes.", // German + "Obiettivo: il misterioso potere della Spada spezzata.", // Italian + "El objetivo: el misterioso poder de la Espada Rota.", // Spanish + NULL, // Czech + NULL // Portuguese }; } // End of namespace Sword1 diff --git a/engines/sword1/objectman.h b/engines/sword1/objectman.h index cce360573a..197b437c15 100644 --- a/engines/sword1/objectman.h +++ b/engines/sword1/objectman.h @@ -63,6 +63,22 @@ private: uint8 *_cptData[TOTAL_SECTIONS]; static char _missingSubTitleStr[]; static const char *const _translationId2950145[7]; //translation for textId 2950145 (missing from cluster file for some langages) + static const char *const _translationId8455194[7]; //translation for textId 8455194 (missing in the demo) + static const char *const _translationId8455195[7]; //translation for textId 8455195 (missing in the demo) + static const char *const _translationId8455196[7]; //translation for textId 8455196 (missing in the demo) + static const char *const _translationId8455197[7]; //translation for textId 8455197 (missing in the demo) + static const char *const _translationId8455198[7]; //translation for textId 8455198 (missing in the demo) + static const char *const _translationId8455199[7]; //translation for textId 8455199 (missing in the demo) + static const char *const _translationId8455200[7]; //translation for textId 8455200 (missing in the demo) + static const char *const _translationId8455201[7]; //translation for textId 8455201 (missing in the demo) + static const char *const _translationId8455202[7]; //translation for textId 8455202 (missing in the demo) + static const char *const _translationId8455203[7]; //translation for textId 8455203 (missing in the demo) + static const char *const _translationId8455204[7]; //translation for textId 8455204 (missing in the demo) + static const char *const _translationId8455205[7]; //translation for textId 8455205 (missing in the demo) + static const char *const _translationId6488080[7]; //translation for textId 6488081 (missing in the demo) + static const char *const _translationId6488081[7]; //translation for textId 6488081 (missing in the demo) + static const char *const _translationId6488082[7]; //translation for textId 6488082 (missing in the demo) + static const char *const _translationId6488083[7]; //translation for textId 6488083 (missing in the demo) }; } // End of namespace Sword1 -- cgit v1.2.3 From 57e84b9632fdd403d72773ace94b7c3f101aaa87 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Tue, 26 Jun 2012 21:31:12 +0100 Subject: SWORD1: Add source of the translations for the missing subtitles This adds a few comment to explain were the translations come from for the missing subtitle workaround (and give credits were they are due). --- engines/sword1/objectman.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/engines/sword1/objectman.cpp b/engines/sword1/objectman.cpp index f3c83c1656..5d1864d58d 100644 --- a/engines/sword1/objectman.cpp +++ b/engines/sword1/objectman.cpp @@ -244,6 +244,9 @@ const char *const ObjectMan::_translationId2950145[7] = { NULL // Portuguese }; +// The translations for the next texts are missing in the demo but are present +// in the full game. The translations were therefore extracted from the full game. + // Missing translation for textId 8455194 (in the demo). const char *const ObjectMan::_translationId8455194[7] = { NULL, // "Who was the guy you were supposed to meet?", // English (not needed) @@ -387,6 +390,13 @@ const char *const ObjectMan::_translationId6488080[7] = { NULL // Portuguese }; +// The next three sentences are specific to the demo and only the english text is present. +// The translations were provided by: +// French: Thierry Crozat +// German: Simon Sawatzki +// Italian: Matteo Angelino +// Spanish: Tomás Maidagan + // Missing translation for textId 6488081 (in the demo). const char *const ObjectMan::_translationId6488081[7] = { NULL, // "I wasn't sure what I was going to do when I caught up with that clown...", // English (not needed) -- cgit v1.2.3 From 90d78e31a7b91195f3c382cc8da9bfbd90b5f73d Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Tue, 26 Jun 2012 21:40:51 +0100 Subject: NEWS: Mention fix for missing subtitles in Drascula and BS1 --- NEWS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NEWS b/NEWS index 9fde25e3f3..e4ea5f3f49 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,7 @@ For a more comprehensive changelog of the latest experimental code, see: Broken Sword 1: - Fixed incorrect sound effects in the DOS/Windows demo. - Added support for PlayStation videos. + - Fixed missing subtitles in the demo. Broken Sword 2: - Added support for PlayStation videos. @@ -46,6 +47,10 @@ For a more comprehensive changelog of the latest experimental code, see: Cine: - Implemented Roland MT-32 output driver. + Drascula: + - Added Spanish subtitles in the Von Braun cutscene (#3069981: no subtitles + in scene with "von Braun"). + Gob: - Fixed a crash in Lost in Time - Rewrote the AdLib player. Enabled the now working MDY player in -- cgit v1.2.3 From 8b30750f821b16c1bb0f6e505aefe41375661a32 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 27 Jun 2012 01:13:36 +0200 Subject: CGE: Remove dead code used to display copyright in DOS prompt --- engines/cge/vga13h.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp index 3800b6643a..e178795b7c 100644 --- a/engines/cge/vga13h.cpp +++ b/engines/cge/vga13h.cpp @@ -637,15 +637,6 @@ Vga::Vga(CGEEngine *vm) : _frmCnt(0), _msg(NULL), _name(NULL), _setPal(false), _ _page[idx]->create(320, 200, Graphics::PixelFormat::createFormatCLUT8()); } -#if 0 - // This part was used to display credits at the beginning of the game - for (int i = 10; i < 20; i++) { - char *text = _text->getText(i); - if (text) { - debugN(1, "%s\n", text); - } - } -#endif _oldColors = (Dac *)malloc(sizeof(Dac) * kPalCount); _newColors = (Dac *)malloc(sizeof(Dac) * kPalCount); getColors(_oldColors); -- cgit v1.2.3 From f32c9a7735352784a501bf70a71137478cf9946f Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 27 Jun 2012 01:14:37 +0200 Subject: CGE: Fix bug 3538039 - level buttons not pressed --- engines/cge/cge_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index 2620147c4d..bef4f610eb 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -1312,7 +1312,7 @@ void CGEEngine::runGame() { _sceneLight->_flags._tran = true; _vga->_showQ->append(_sceneLight); - _sceneLight->_flags._hide = true; + _sceneLight->_flags._hide = false; const Seq pocSeq[] = { { 0, 0, 0, 0, 20 }, -- cgit v1.2.3 From 76915424962c1288cbd8859bf1a4d401f2769cbd Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 27 Jun 2012 04:05:12 +0200 Subject: DETECTOR: Rename SizeMD5(Map) to ADFileProperties(Map) --- engines/advancedDetector.cpp | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp index ac06e74e0a..272032d66a 100644 --- a/engines/advancedDetector.cpp +++ b/engines/advancedDetector.cpp @@ -308,14 +308,21 @@ Common::Error AdvancedMetaEngine::createInstance(OSystem *syst, Engine **engine) return Common::kNoError; } -struct SizeMD5 { - int size; +/** + * A record describing the properties of a file. Used on the existing + * files while detecting a game. + */ +struct ADFileProperties { + int32 size; Common::String md5; }; -typedef Common::HashMap SizeMD5Map; +/** + * A map of all relevant existing files in a game directory while detecting. + */ +typedef Common::HashMap ADFilePropertiesMap; -static void reportUnknown(const Common::FSNode &path, const SizeMD5Map &filesSizeMD5) { +static void reportUnknown(const Common::FSNode &path, const ADFilePropertiesMap &filesProps) { // TODO: This message should be cleaned up / made more specific. // For example, we should specify at least which engine triggered this. // @@ -327,7 +334,7 @@ static void reportUnknown(const Common::FSNode &path, const SizeMD5Map &filesSiz report += _("of the game you tried to add and its version/language/etc.:"); report += "\n"; - for (SizeMD5Map::const_iterator file = filesSizeMD5.begin(); file != filesSizeMD5.end(); ++file) + for (ADFilePropertiesMap::const_iterator file = filesProps.begin(); file != filesProps.end(); ++file) report += Common::String::format(" {\"%s\", 0, \"%s\", %d},\n", file->_key.c_str(), file->_value.md5.c_str(), file->_value.size); report += "\n"; @@ -376,7 +383,7 @@ void AdvancedMetaEngine::composeFileHashMap(FileMap &allFiles, const Common::FSL } ADGameDescList AdvancedMetaEngine::detectGame(const Common::FSNode &parent, const FileMap &allFiles, Common::Language language, Common::Platform platform, const Common::String &extra) const { - SizeMD5Map filesSizeMD5; + ADFilePropertiesMap filesProps; const ADGameFileDescription *fileDesc; const ADGameDescription *g; @@ -391,9 +398,9 @@ ADGameDescList AdvancedMetaEngine::detectGame(const Common::FSNode &parent, cons for (fileDesc = g->filesDescriptions; fileDesc->fileName; fileDesc++) { Common::String fname = fileDesc->fileName; - SizeMD5 tmp; + ADFileProperties tmp; - if (filesSizeMD5.contains(fname)) + if (filesProps.contains(fname)) continue; // FIXME/TODO: We don't handle the case that a file is listed as a regular @@ -406,7 +413,7 @@ ADGameDescList AdvancedMetaEngine::detectGame(const Common::FSNode &parent, cons tmp.md5 = macResMan.computeResForkMD5AsString(_md5Bytes); tmp.size = macResMan.getResForkDataSize(); debug(3, "> '%s': '%s'", fname.c_str(), tmp.md5.c_str()); - filesSizeMD5[fname] = tmp; + filesProps[fname] = tmp; } } else { if (allFiles.contains(fname)) { @@ -422,7 +429,7 @@ ADGameDescList AdvancedMetaEngine::detectGame(const Common::FSNode &parent, cons } debug(3, "> '%s': '%s'", fname.c_str(), tmp.md5.c_str()); - filesSizeMD5[fname] = tmp; + filesProps[fname] = tmp; } } } @@ -456,19 +463,19 @@ ADGameDescList AdvancedMetaEngine::detectGame(const Common::FSNode &parent, cons for (fileDesc = g->filesDescriptions; fileDesc->fileName; fileDesc++) { Common::String tstr = fileDesc->fileName; - if (!filesSizeMD5.contains(tstr)) { + if (!filesProps.contains(tstr)) { fileMissing = true; allFilesPresent = false; break; } - if (fileDesc->md5 != NULL && fileDesc->md5 != filesSizeMD5[tstr].md5) { - debug(3, "MD5 Mismatch. Skipping (%s) (%s)", fileDesc->md5, filesSizeMD5[tstr].md5.c_str()); + if (fileDesc->md5 != NULL && fileDesc->md5 != filesProps[tstr].md5) { + debug(3, "MD5 Mismatch. Skipping (%s) (%s)", fileDesc->md5, filesProps[tstr].md5.c_str()); fileMissing = true; break; } - if (fileDesc->fileSize != -1 && fileDesc->fileSize != filesSizeMD5[tstr].size) { + if (fileDesc->fileSize != -1 && fileDesc->fileSize != filesProps[tstr].size) { debug(3, "Size Mismatch. Skipping"); fileMissing = true; break; @@ -514,8 +521,8 @@ ADGameDescList AdvancedMetaEngine::detectGame(const Common::FSNode &parent, cons // We didn't find a match if (matched.empty()) { - if (!filesSizeMD5.empty() && gotAnyMatchesWithAllFiles) { - reportUnknown(parent, filesSizeMD5); + if (!filesProps.empty() && gotAnyMatchesWithAllFiles) { + reportUnknown(parent, filesProps); } // Filename based fallback -- cgit v1.2.3 From 5ca480aa2e5ffdb0e8fc753aff06e676358dfcfc Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 27 Jun 2012 04:07:32 +0200 Subject: DETECTOR: Move ADFileProperties(Map) into advancedDetector.h --- engines/advancedDetector.cpp | 15 --------------- engines/advancedDetector.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp index 272032d66a..248b8cc432 100644 --- a/engines/advancedDetector.cpp +++ b/engines/advancedDetector.cpp @@ -22,7 +22,6 @@ #include "common/debug.h" #include "common/util.h" -#include "common/hash-str.h" #include "common/file.h" #include "common/macresman.h" #include "common/md5.h" @@ -308,20 +307,6 @@ Common::Error AdvancedMetaEngine::createInstance(OSystem *syst, Engine **engine) return Common::kNoError; } -/** - * A record describing the properties of a file. Used on the existing - * files while detecting a game. - */ -struct ADFileProperties { - int32 size; - Common::String md5; -}; - -/** - * A map of all relevant existing files in a game directory while detecting. - */ -typedef Common::HashMap ADFilePropertiesMap; - static void reportUnknown(const Common::FSNode &path, const ADFilePropertiesMap &filesProps) { // TODO: This message should be cleaned up / made more specific. // For example, we should specify at least which engine triggered this. diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h index 45a9f183e8..0c3f53f0c5 100644 --- a/engines/advancedDetector.h +++ b/engines/advancedDetector.h @@ -26,6 +26,8 @@ #include "engines/metaengine.h" #include "engines/engine.h" +#include "common/hash-str.h" + #include "common/gui_options.h" // FIXME: Temporary hack? namespace Common { @@ -45,6 +47,20 @@ struct ADGameFileDescription { int32 fileSize; ///< Size of the described file. Set to -1 to ignore. }; +/** + * A record describing the properties of a file. Used on the existing + * files while detecting a game. + */ +struct ADFileProperties { + int32 size; + Common::String md5; +}; + +/** + * A map of all relevant existing files in a game directory while detecting. + */ +typedef Common::HashMap ADFilePropertiesMap; + /** * A shortcut to produce an empty ADGameFileDescription record. Used to mark * the end of a list of these. -- cgit v1.2.3 From 63e13c5d2c48c0a9aba72a0f63dc4aa515972da5 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 27 Jun 2012 04:25:38 +0200 Subject: DETECTOR: Move size reading and MD5 creating into a new method getFileProperties() --- engines/advancedDetector.cpp | 59 +++++++++++++++++++++++--------------------- engines/advancedDetector.h | 3 +++ 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp index 248b8cc432..af011bee4d 100644 --- a/engines/advancedDetector.cpp +++ b/engines/advancedDetector.cpp @@ -367,6 +367,34 @@ void AdvancedMetaEngine::composeFileHashMap(FileMap &allFiles, const Common::FSL } } +bool AdvancedMetaEngine::getFileProperties(const Common::FSNode &parent, const FileMap &allFiles, const ADGameDescription &game, const Common::String fname, ADFileProperties &fileProps) const { + // FIXME/TODO: We don't handle the case that a file is listed as a regular + // file and as one with resource fork. + + if (game.flags & ADGF_MACRESFORK) { + Common::MacResManager macResMan; + + if (!macResMan.open(parent, fname)) + return false; + + fileProps.md5 = macResMan.computeResForkMD5AsString(_md5Bytes); + fileProps.size = macResMan.getResForkDataSize(); + return true; + } + + if (!allFiles.contains(fname)) + return false; + + Common::File testFile; + + if (!testFile.open(allFiles[fname])) + return false; + + fileProps.size = (int32)testFile.size(); + fileProps.md5 = Common::computeStreamMD5AsString(testFile, _md5Bytes); + return true; +} + ADGameDescList AdvancedMetaEngine::detectGame(const Common::FSNode &parent, const FileMap &allFiles, Common::Language language, Common::Platform platform, const Common::String &extra) const { ADFilePropertiesMap filesProps; @@ -388,34 +416,9 @@ ADGameDescList AdvancedMetaEngine::detectGame(const Common::FSNode &parent, cons if (filesProps.contains(fname)) continue; - // FIXME/TODO: We don't handle the case that a file is listed as a regular - // file and as one with resource fork. - - if (g->flags & ADGF_MACRESFORK) { - Common::MacResManager macResMan; - - if (macResMan.open(parent, fname)) { - tmp.md5 = macResMan.computeResForkMD5AsString(_md5Bytes); - tmp.size = macResMan.getResForkDataSize(); - debug(3, "> '%s': '%s'", fname.c_str(), tmp.md5.c_str()); - filesProps[fname] = tmp; - } - } else { - if (allFiles.contains(fname)) { - debug(3, "+ %s", fname.c_str()); - - Common::File testFile; - - if (testFile.open(allFiles[fname])) { - tmp.size = (int32)testFile.size(); - tmp.md5 = Common::computeStreamMD5AsString(testFile, _md5Bytes); - } else { - tmp.size = -1; - } - - debug(3, "> '%s': '%s'", fname.c_str(), tmp.md5.c_str()); - filesProps[fname] = tmp; - } + if (getFileProperties(parent, allFiles, *g, fname, tmp)) { + debug(3, "> '%s': '%s'", fname.c_str(), tmp.md5.c_str()); + filesProps[fname] = tmp; } } } diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h index 0c3f53f0c5..91cb54c396 100644 --- a/engines/advancedDetector.h +++ b/engines/advancedDetector.h @@ -314,6 +314,9 @@ protected: * Includes nifty stuff like removing trailing dots and ignoring case. */ void composeFileHashMap(FileMap &allFiles, const Common::FSList &fslist, int depth) const; + + /** Get the properties (size and MD5) of this file. */ + bool getFileProperties(const Common::FSNode &parent, const FileMap &allFiles, const ADGameDescription &game, const Common::String fname, ADFileProperties &fileProps) const; }; #endif -- cgit v1.2.3 From 2c760cb15e27de29ef9262cb6e2a102d8dbe3935 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 27 Jun 2012 04:42:36 +0200 Subject: DETECTOR: Make detectGameFilebased() return a list of MD5s and file sizes Since we need a FSNode parent for Mac resource forks, we need to change signature of detectGameFilebased(), too. --- engines/advancedDetector.cpp | 12 +++++++++++- engines/advancedDetector.h | 4 +++- engines/cge/detection.cpp | 2 +- engines/gob/detection/detection.cpp | 2 +- engines/mohawk/detection.cpp | 2 +- engines/toon/detection.cpp | 2 +- engines/touche/detection.cpp | 2 +- 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp index af011bee4d..727134fad8 100644 --- a/engines/advancedDetector.cpp +++ b/engines/advancedDetector.cpp @@ -519,7 +519,7 @@ ADGameDescList AdvancedMetaEngine::detectGame(const Common::FSNode &parent, cons return matched; } -const ADGameDescription *AdvancedMetaEngine::detectGameFilebased(const FileMap &allFiles, const ADFileBasedFallback *fileBasedFallback) const { +const ADGameDescription *AdvancedMetaEngine::detectGameFilebased(const FileMap &allFiles, const Common::FSList &fslist, const ADFileBasedFallback *fileBasedFallback, ADFilePropertiesMap *filesProps) const { const ADFileBasedFallback *ptr; const char* const* filenames; @@ -549,6 +549,16 @@ const ADGameDescription *AdvancedMetaEngine::detectGameFilebased(const FileMap & maxNumMatchedFiles = numMatchedFiles; debug(4, "and overridden"); + + if (filesProps) { + for (filenames = ptr->filenames; *filenames; ++filenames) { + ADFileProperties tmp; + + if (getFileProperties(fslist.begin()->getParent(), allFiles, *agdesc, *filenames, tmp)) + (*filesProps)[*filenames] = tmp; + } + } + } } } diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h index 91cb54c396..3e18a6aa18 100644 --- a/engines/advancedDetector.h +++ b/engines/advancedDetector.h @@ -302,9 +302,11 @@ protected: * In case of a tie, the entry coming first in the list is chosen. * * @param allFiles a map describing all present files + * @param fslist a list of nodes for all present files * @param fileBasedFallback a list of ADFileBasedFallback records, zero-terminated + * @param filesProps if not 0, return a map of properties for all detected files here */ - const ADGameDescription *detectGameFilebased(const FileMap &allFiles, const ADFileBasedFallback *fileBasedFallback) const; + const ADGameDescription *detectGameFilebased(const FileMap &allFiles, const Common::FSList &fslist, const ADFileBasedFallback *fileBasedFallback, ADFilePropertiesMap *filesProps = 0) const; // TODO void updateGameDescriptor(GameDescriptor &desc, const ADGameDescription *realDesc) const; diff --git a/engines/cge/detection.cpp b/engines/cge/detection.cpp index f723ec8fbd..eda4edd520 100644 --- a/engines/cge/detection.cpp +++ b/engines/cge/detection.cpp @@ -108,7 +108,7 @@ public: } virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { - return detectGameFilebased(allFiles, CGE::fileBasedFallback); + return detectGameFilebased(allFiles, fslist, CGE::fileBasedFallback); } virtual const char *getName() const { diff --git a/engines/gob/detection/detection.cpp b/engines/gob/detection/detection.cpp index bcfd5dacfa..9400001636 100644 --- a/engines/gob/detection/detection.cpp +++ b/engines/gob/detection/detection.cpp @@ -40,7 +40,7 @@ public: } virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { - return detectGameFilebased(allFiles, Gob::fileBased); + return detectGameFilebased(allFiles, fslist, Gob::fileBased); } virtual const char *getName() const { diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp index f0c657897d..5664929948 100644 --- a/engines/mohawk/detection.cpp +++ b/engines/mohawk/detection.cpp @@ -167,7 +167,7 @@ public: } virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { - return detectGameFilebased(allFiles, Mohawk::fileBased); + return detectGameFilebased(allFiles, fslist, Mohawk::fileBased); } virtual const char *getName() const { diff --git a/engines/toon/detection.cpp b/engines/toon/detection.cpp index 8234934972..9c50c20ef8 100644 --- a/engines/toon/detection.cpp +++ b/engines/toon/detection.cpp @@ -133,7 +133,7 @@ public: } virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { - return detectGameFilebased(allFiles, Toon::fileBasedFallback); + return detectGameFilebased(allFiles, fslist, Toon::fileBasedFallback); } virtual const char *getName() const { diff --git a/engines/touche/detection.cpp b/engines/touche/detection.cpp index 35dd54776f..2566597e6c 100644 --- a/engines/touche/detection.cpp +++ b/engines/touche/detection.cpp @@ -135,7 +135,7 @@ public: } virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { - const ADGameDescription *matchedDesc = detectGameFilebased(allFiles, Touche::fileBasedFallback); + const ADGameDescription *matchedDesc = detectGameFilebased(allFiles, fslist, Touche::fileBasedFallback); if (matchedDesc) { // We got a match Common::String report = Common::String::format(_("Your game version has been detected using " -- cgit v1.2.3 From 9e7ece4ebe06bb66d1408189b44ba2aa9d0d6f42 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 27 Jun 2012 04:48:57 +0200 Subject: DETECTOR: Make reportUnknown() available for AdvancedMetaEngine classes to use --- engines/advancedDetector.cpp | 2 +- engines/advancedDetector.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp index 727134fad8..9beba6ce4a 100644 --- a/engines/advancedDetector.cpp +++ b/engines/advancedDetector.cpp @@ -307,7 +307,7 @@ Common::Error AdvancedMetaEngine::createInstance(OSystem *syst, Engine **engine) return Common::kNoError; } -static void reportUnknown(const Common::FSNode &path, const ADFilePropertiesMap &filesProps) { +void AdvancedMetaEngine::reportUnknown(const Common::FSNode &path, const ADFilePropertiesMap &filesProps) const { // TODO: This message should be cleaned up / made more specific. // For example, we should specify at least which engine triggered this. // diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h index 3e18a6aa18..8c19d03691 100644 --- a/engines/advancedDetector.h +++ b/engines/advancedDetector.h @@ -308,6 +308,12 @@ protected: */ const ADGameDescription *detectGameFilebased(const FileMap &allFiles, const Common::FSList &fslist, const ADFileBasedFallback *fileBasedFallback, ADFilePropertiesMap *filesProps = 0) const; + /** + * Log and print a report that we found an unknown game variant, together with the file + * names, sizes and MD5 sums. + */ + void reportUnknown(const Common::FSNode &path, const ADFilePropertiesMap &filesProps) const; + // TODO void updateGameDescriptor(GameDescriptor &desc, const ADGameDescription *realDesc) const; -- cgit v1.2.3 From 02375fa1e62aef578117e98c864d83939cac7229 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 27 Jun 2012 04:53:39 +0200 Subject: GOB: Report unknown game variant when using the file based fallback detector --- engines/gob/detection/detection.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/engines/gob/detection/detection.cpp b/engines/gob/detection/detection.cpp index 9400001636..14da54637b 100644 --- a/engines/gob/detection/detection.cpp +++ b/engines/gob/detection/detection.cpp @@ -40,7 +40,14 @@ public: } virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { - return detectGameFilebased(allFiles, fslist, Gob::fileBased); + ADFilePropertiesMap filesProps; + + const ADGameDescription *game = detectGameFilebased(allFiles, fslist, Gob::fileBased, &filesProps); + if (!game) + return 0; + + reportUnknown(fslist.begin()->getParent(), filesProps); + return game; } virtual const char *getName() const { -- cgit v1.2.3 From 18fc453b97e4b67e5e4bd6522c8b8dd05d289910 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 27 Jun 2012 04:56:19 +0200 Subject: TOUCHE: Report unknown game variant when using the file based fallback detector Given the message Touche prints when it found a game, printing the MD5 sums of the files was probably what it expected the AdvancedDetector would do in the filebase fallback detector. This may have been true in the past, but it's not what it does anymore, rendering the message pointless. This fixes it by calling the now accessable reportUnknown method. --- engines/touche/detection.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/engines/touche/detection.cpp b/engines/touche/detection.cpp index 2566597e6c..e4bbe0c4c1 100644 --- a/engines/touche/detection.cpp +++ b/engines/touche/detection.cpp @@ -135,19 +135,13 @@ public: } virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { - const ADGameDescription *matchedDesc = detectGameFilebased(allFiles, fslist, Touche::fileBasedFallback); - - if (matchedDesc) { // We got a match - Common::String report = Common::String::format(_("Your game version has been detected using " - "filename matching as a variant of %s."), matchedDesc->gameid); - report += "\n"; - report += _("If this is an original and unmodified version, please report any"); - report += "\n"; - report += _("information previously printed by ScummVM to the team."); - report += "\n"; - g_system->logMessage(LogMessageType::kInfo, report.c_str()); - } + ADFilePropertiesMap filesProps; + + const ADGameDescription *matchedDesc = detectGameFilebased(allFiles, fslist, Touche::fileBasedFallback, &filesProps); + if (!matchedDesc) + return 0; + reportUnknown(fslist.begin()->getParent(), filesProps); return matchedDesc; } -- cgit v1.2.3 From ee14ef5348a38dd578e1f17f22c897f8ed9607a0 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 27 Jun 2012 22:12:37 +0200 Subject: CGE: Add ending message to tell the user he finished the game. Fix bug #3538396 --- engines/cge/cge.cpp | 12 ++++++++++++ engines/cge/cge.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp index 8ddb9be140..09fce6323c 100644 --- a/engines/cge/cge.cpp +++ b/engines/cge/cge.cpp @@ -30,6 +30,8 @@ #include "common/fs.h" #include "engines/advancedDetector.h" #include "engines/util.h" +#include "gui/message.h" + #include "cge/cge.h" #include "cge/vga13h.h" #include "cge/cge_main.h" @@ -195,6 +197,16 @@ Common::Error CGEEngine::run() { // Run the game cge_main(); + // If game is finished, display ending message + if (_flag[3]) { + Common::String msg = Common::String(_text->getText(kSayTheEnd)); + if (msg.size() != 0) { + g_system->delayMillis(10); + GUI::MessageDialog dialog(msg, "OK"); + dialog.runModal(); + } + } + // Remove game objects deinit(); diff --git a/engines/cge/cge.h b/engines/cge/cge.h index 4ebc836ee0..a5c6a62e34 100644 --- a/engines/cge/cge.h +++ b/engines/cge/cge.h @@ -78,6 +78,8 @@ class Talk; #define kMapZCnt 20 #define kMapTop 80 +#define kSayTheEnd 41 + // our engine debug channels enum { kCGEDebugBitmap = 1 << 0, -- cgit v1.2.3 From 12b8534e2f56451cd9c142cd3c7725bbde4f9f10 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 28 Jun 2012 03:27:34 +0300 Subject: SCI: Fix the detection entry for the Spanish version of KQ6 There is no Spanish CD version of KQ6, only floppy. This also seems to fix the bug with the puzzle in the cliffs of wisdom (room 300) --- engines/sci/detection_tables.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 9872973e09..7c51c03b06 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -1447,6 +1447,16 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // King's Quest 6 - Spanish DOS Floppy (from jvprat) + // Executable scanning reports "1.cfs.158", VERSION file reports "1.000.000, July 5, 1994" + // SCI interpreter version 1.001.055 + {"kq6", "", { + {"resource.map", 0, "a73a5ab04b8f60c4b75b946a4dccea5a", 8953}, + {"resource.000", 0, "4da3ad5868a775549a7cc4f72770a58e", 8537260}, + {"resource.msg", 0, "41eed2d3893e1ca6c3695deba4e9d2e8", 267102}, + AD_LISTEND}, + Common::ES_ESP, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // King's Quest 6 - English DOS CD (from the King's Quest Collection) // Executable scanning reports "1.cfs.158", VERSION file reports "1.034 9/11/94 - KQ6 version 1.000.00G" // SCI interpreter version 1.001.054 @@ -1465,16 +1475,6 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformWindows, ADGF_CD, GUIO5(GUIO_NOASPECT, GAMEOPTION_KQ6_WINDOWS_CURSORS, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - // King's Quest 6 - Spanish DOS CD (from jvprat) - // Executable scanning reports "1.cfs.158", VERSION file reports "1.000.000, July 5, 1994" - // SCI interpreter version 1.001.055 - {"kq6", "CD", { - {"resource.map", 0, "a73a5ab04b8f60c4b75b946a4dccea5a", 8953}, - {"resource.000", 0, "4da3ad5868a775549a7cc4f72770a58e", 8537260}, - {"resource.msg", 0, "41eed2d3893e1ca6c3695deba4e9d2e8", 267102}, - AD_LISTEND}, - Common::ES_ESP, Common::kPlatformPC, ADGF_CD, GUIO3(GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - // King's Quest 6 - English Macintosh Floppy // VERSION file reports "1.0" {"kq6", "", { -- cgit v1.2.3 From cc7768869690261d0f6ee3fddc8f0800307813bb Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 28 Jun 2012 03:29:34 +0300 Subject: SCI: Remove an incorrect error check in validateExportFunc() --- engines/sci/engine/script.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index d4143dcceb..037f4ab700 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -422,16 +422,9 @@ uint32 Script::validateExportFunc(int pubfunct, bool relocSci3) { } } - if (!offset) { -#ifdef ENABLE_SCI32 - // WORKAROUNDS for invalid (empty) exports - if (g_sci->getGameId() == GID_TORIN && _nr == 64036) { - } else if (g_sci->getGameId() == GID_RAMA && _nr == 64908) { - } else -#endif - error("Request for invalid exported function 0x%x of script %d", pubfunct, _nr); - return NULL; - } + // Note that it's perfectly normal to return a zero offset, especially in + // SCI1.1 and newer games. Examples include script 64036 in Torin's Passage, + // script 64908 in the demo of RAMA and script 1013 in KQ6 floppy. if (offset >= _bufSize) error("Invalid export function pointer"); -- cgit v1.2.3 From 848575b8264e99eeab2dd0f24dda986909048b93 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 28 Jun 2012 03:27:34 +0300 Subject: SCI: Fix bug #3538418 in SQ4CD Add a script patch for another speech/subtitles script, which handles the babble icon shown in the quit/death dialogs (e.g. the two guys from Andromeda in the quit dialog). Now, these dialogs have speech both in the speech and the speech + subtitles modes --- engines/sci/engine/script_patches.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp index 69eb377684..659c13b13e 100644 --- a/engines/sci/engine/script_patches.cpp +++ b/engines/sci/engine/script_patches.cpp @@ -978,7 +978,27 @@ const uint16 sq4CdPatchTextOptionsButton[] = { PATCH_END }; -// Patch 2: Add the ability to toggle among the three available options, +// Patch 2: Adjust a check in babbleIcon::init, which handles the babble icon +// (e.g. the two guys from Andromeda) shown when dying/quitting. +// Fixes bug #3538418. +const byte sq4CdSignatureBabbleIcon[] = { + 7, + 0x89, 0x5a, // lsg 5a + 0x35, 0x02, // ldi 02 + 0x1a, // eq? + 0x31, 0x26, // bnt 26 [02a7] + 0 +}; + +const uint16 sq4CdPatchBabbleIcon[] = { + 0x89, 0x5a, // lsg 5a + 0x35, 0x01, // ldi 01 + 0x1a, // eq? + 0x2f, 0x26, // bt 26 [02a7] + PATCH_END +}; + +// Patch 3: Add the ability to toggle among the three available options, // when the text options button is clicked: "Speech", "Text" and "Both". // Refer to the patch above for additional details. // iconTextSwitch::doit (called when the text options button is clicked) @@ -1030,6 +1050,7 @@ const SciScriptSignature sq4Signatures[] = { { 298, "Floppy: endless flight", 1, PATCH_MAGICDWORD(0x67, 0x08, 0x63, 0x44), -3, sq4FloppySignatureEndlessFlight, sq4FloppyPatchEndlessFlight }, { 298, "Floppy (German): endless flight", 1, PATCH_MAGICDWORD(0x67, 0x08, 0x63, 0x4c), -3, sq4FloppySignatureEndlessFlightGerman, sq4FloppyPatchEndlessFlight }, { 818, "CD: Speech and subtitles option", 1, PATCH_MAGICDWORD(0x89, 0x5a, 0x3c, 0x35), 0, sq4CdSignatureTextOptions, sq4CdPatchTextOptions }, + { 0, "CD: Babble icon speech and subtitles fix", 1, PATCH_MAGICDWORD(0x89, 0x5a, 0x35, 0x02), 0, sq4CdSignatureBabbleIcon, sq4CdPatchBabbleIcon }, { 818, "CD: Speech and subtitles option button", 1, PATCH_MAGICDWORD(0x35, 0x01, 0xa1, 0x53), 0, sq4CdSignatureTextOptionsButton, sq4CdPatchTextOptionsButton }, SCI_SIGNATUREENTRY_TERMINATOR }; -- cgit v1.2.3 From 647bc59f992e77fa65dfa7e1e000b85a9ea55c2a Mon Sep 17 00:00:00 2001 From: Strangerke Date: Thu, 28 Jun 2012 07:19:54 +0200 Subject: CGE: Rename variable --- engines/cge/cge.cpp | 2 +- engines/cge/cge.h | 2 +- engines/cge/cge_main.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp index 09fce6323c..2f5acfa4a4 100644 --- a/engines/cge/cge.cpp +++ b/engines/cge/cge.cpp @@ -124,7 +124,7 @@ void CGEEngine::init() { _maxScene = 0; _dark = false; _game = false; - _finis = false; + _endGame = false; _now = 1; _lev = -1; _recentStep = -2; diff --git a/engines/cge/cge.h b/engines/cge/cge.h index a5c6a62e34..c5be78236a 100644 --- a/engines/cge/cge.h +++ b/engines/cge/cge.h @@ -159,7 +159,7 @@ public: bool _flag[4]; bool _dark; bool _game; - bool _finis; + bool _endGame; int _now; int _lev; int _mode; diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index bef4f610eb..dd1c78d92e 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -706,7 +706,7 @@ void CGEEngine::qGame() { saveGame(0, Common::String("Automatic Savegame")); _vga->sunset(); - _finis = true; + _endGame = true; } void CGEEngine::switchScene(int newScene) { @@ -1403,14 +1403,14 @@ void CGEEngine::runGame() { _keyboard->setClient(_sys); // main loop - while (!_finis && !_quitFlag) { - if (_flag[3]) + while (!_endGame && !_quitFlag) { + if (_flag[3]) // Flag FINIS _commandHandler->addCallback(kCmdExec, -1, 0, kQGame); mainLoop(); } // If finishing game due to closing ScummVM window, explicitly save the game - if (!_finis && canSaveGameStateCurrently()) + if (!_endGame && canSaveGameStateCurrently()) qGame(); _keyboard->setClient(NULL); -- cgit v1.2.3 From d73ed91051f9155f77162c50b99ca9efbb7d3b46 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Thu, 28 Jun 2012 07:25:56 +0200 Subject: CGE: Remove unused Demo text id --- engines/cge/cge.cpp | 1 - engines/cge/cge.h | 1 - engines/cge/cge_main.cpp | 4 ++-- engines/cge/cge_main.h | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp index 2f5acfa4a4..6cc0c45963 100644 --- a/engines/cge/cge.cpp +++ b/engines/cge/cge.cpp @@ -52,7 +52,6 @@ CGEEngine::CGEEngine(OSystem *syst, const ADGameDescription *gameDescription) DebugMan.addDebugChannel(kCGEDebugEngine, "engine", "CGE Engine debug channel"); _startupMode = 1; - _demoText = kDemo; _oldLev = 0; _pocPtr = 0; _bitmapPalette = NULL; diff --git a/engines/cge/cge.h b/engines/cge/cge.h index c5be78236a..0e8c5a05bb 100644 --- a/engines/cge/cge.h +++ b/engines/cge/cge.h @@ -149,7 +149,6 @@ public: const ADGameDescription *_gameDescription; int _startupMode; - int _demoText; int _oldLev; int _pocPtr; bool _music; diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index dd1c78d92e..fbe37e58a0 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -150,11 +150,11 @@ void CGEEngine::sndSetVolume() { void CGEEngine::syncHeader(Common::Serializer &s) { debugC(1, kCGEDebugEngine, "CGEEngine::syncHeader(s)"); - int i; + int i = kDemo; s.syncAsUint16LE(_now); s.syncAsUint16LE(_oldLev); - s.syncAsUint16LE(_demoText); + s.syncAsUint16LE(i); // unused Demo string id for (i = 0; i < 5; i++) s.syncAsUint16LE(_game); s.syncAsSint16LE(i); // unused VGA::Mono variable diff --git a/engines/cge/cge_main.h b/engines/cge/cge_main.h index 87199ee524..b98fec531d 100644 --- a/engines/cge/cge_main.h +++ b/engines/cge/cge_main.h @@ -78,7 +78,7 @@ namespace CGE { #define kScrHeight 200 #define kWorldHeight (kScrHeight - kPanHeight) #define kStackSize 2048 -#define kSavegameCheckSum (1956 + _now + _oldLev + _game + _music + _demoText) +#define kSavegameCheckSum (1956 + _now + _oldLev + _game + _music + kDemo) #define kSavegame0Name ("{{INIT}}" kSvgExt) #define kSavegameStrSize 11 #define kGameFrameDelay (1000 / 50) -- cgit v1.2.3 From 78b8ca5c7fd7296d88c381695534844879673b75 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 21 Jun 2012 02:21:21 +0100 Subject: TOON: Replace remaining int32 x,y,w and h coordinates with int16. --- engines/toon/anim.cpp | 107 ++++++++++++++++++++++----------------------- engines/toon/anim.h | 58 ++++++++++++------------ engines/toon/character.cpp | 24 +++++----- engines/toon/font.cpp | 46 +++++++++---------- engines/toon/font.h | 6 +-- engines/toon/hotspot.cpp | 4 +- engines/toon/hotspot.h | 4 +- engines/toon/picture.cpp | 60 ++++++++++++------------- engines/toon/picture.h | 24 +++++----- engines/toon/toon.cpp | 19 ++++---- 10 files changed, 172 insertions(+), 180 deletions(-) diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp index a4eb1f210c..8097b1844d 100644 --- a/engines/toon/anim.cpp +++ b/engines/toon/anim.cpp @@ -132,7 +132,7 @@ Common::Rect Animation::getRect() { return Common::Rect(_x1, _y1, _x2, _y2); } -void Animation::drawFrame(Graphics::Surface &surface, int32 frame, int32 xx, int32 yy) { +void Animation::drawFrame(Graphics::Surface &surface, int32 frame, int16 xx, int16 yy) { debugC(3, kDebugAnim, "drawFrame(surface, %d, %d, %d)", frame, xx, yy); if (frame < 0) frame = 0; @@ -149,10 +149,10 @@ void Animation::drawFrame(Graphics::Surface &surface, int32 frame, int32 xx, int if (!_frames[frame]._data) return; - int32 rectX = _frames[frame]._x2 - _frames[frame]._x1; - int32 rectY = _frames[frame]._y2 - _frames[frame]._y1; - int32 offsX = 0; - int32 offsY = 0; + int16 rectX = _frames[frame]._x2 - _frames[frame]._x1; + int16 rectY = _frames[frame]._y2 - _frames[frame]._y1; + int16 offsX = 0; + int16 offsY = 0; _vm->addDirtyRect(xx + _x1 + _frames[frame]._x1, yy + _y1 + _frames[frame]._y1, xx + rectX + _x1 + _frames[frame]._x1 , yy + rectY + _y1 + _frames[frame]._y1); @@ -189,10 +189,10 @@ void Animation::drawFrame(Graphics::Surface &surface, int32 frame, int32 xx, int int32 destPitch = surface.pitch; uint8 *srcRow = _frames[frame]._data + offsX + (_frames[frame]._x2 - _frames[frame]._x1) * offsY; uint8 *curRow = (uint8 *)surface.pixels + (yy + _frames[frame]._y1 + _y1 + offsY) * destPitch + (xx + _x1 + _frames[frame]._x1 + offsX); - for (int32 y = 0; y < rectY; y++) { + for (int16 y = 0; y < rectY; y++) { uint8 *cur = curRow; uint8 *c = srcRow + y * (_frames[frame]._x2 - _frames[frame]._x1); - for (int32 x = 0; x < rectX; x++) { + for (int16 x = 0; x < rectX; x++) { if (*c) *cur = *c; c++; @@ -202,27 +202,27 @@ void Animation::drawFrame(Graphics::Surface &surface, int32 frame, int32 xx, int } } -void Animation::drawFrameWithMask(Graphics::Surface &surface, int32 frame, int32 xx, int32 yy, int32 zz, Picture *mask) { +void Animation::drawFrameWithMask(Graphics::Surface &surface, int32 frame, int16 xx, int16 yy, int32 zz, Picture *mask) { debugC(1, kDebugAnim, "drawFrameWithMask(surface, %d, %d, %d, %d, mask)", frame, xx, yy, zz); warning("STUB: drawFrameWithMask()"); } -void Animation::drawFrameWithMaskAndScale(Graphics::Surface &surface, int32 frame, int32 xx, int32 yy, int32 zz, Picture *mask, int32 scale) { +void Animation::drawFrameWithMaskAndScale(Graphics::Surface &surface, int32 frame, int16 xx, int16 yy, int32 zz, Picture *mask, int32 scale) { debugC(5, kDebugAnim, "drawFrameWithMaskAndScale(surface, %d, %d, %d, %d, mask, %d)", frame, xx, yy, zz, scale); if (_frames[frame]._ref != -1) frame = _frames[frame]._ref; - int32 rectX = _frames[frame]._x2 - _frames[frame]._x1; - int32 rectY = _frames[frame]._y2 - _frames[frame]._y1; + int16 rectX = _frames[frame]._x2 - _frames[frame]._x1; + int16 rectY = _frames[frame]._y2 - _frames[frame]._y1; - int32 finalWidth = rectX * scale / 1024; - int32 finalHeight = rectY * scale / 1024; + int16 finalWidth = rectX * scale / 1024; + int16 finalHeight = rectY * scale / 1024; // compute final x1, y1, x2, y2 - int32 xx1 = xx + _x1 + _frames[frame]._x1 * scale / 1024; - int32 yy1 = yy + _y1 + _frames[frame]._y1 * scale / 1024; - int32 xx2 = xx1 + finalWidth; - int32 yy2 = yy1 + finalHeight; - int32 w = _frames[frame]._x2 - _frames[frame]._x1; + int16 xx1 = xx + _x1 + _frames[frame]._x1 * scale / 1024; + int16 yy1 = yy + _y1 + _frames[frame]._y1 * scale / 1024; + int16 xx2 = xx1 + finalWidth; + int16 yy2 = yy1 + finalHeight; + int16 w = _frames[frame]._x2 - _frames[frame]._x1; _vm->addDirtyRect(xx1, yy1, xx2, yy2); @@ -236,8 +236,8 @@ void Animation::drawFrameWithMaskAndScale(Graphics::Surface &surface, int32 fram if (strstr(_name, "SHADOW")) shadowFlag = true; - for (int32 y = yy1; y < yy2; y++) { - for (int32 x = xx1; x < xx2; x++) { + for (int16 y = yy1; y < yy2; y++) { + for (int16 x = xx1; x < xx2; x++) { if (x < 0 || x >= 1280 || y < 0 || y >= 400) continue; @@ -245,8 +245,8 @@ void Animation::drawFrameWithMaskAndScale(Graphics::Surface &surface, int32 fram uint8 *curMask = curRowMask + x + y * destPitchMask; // find the good c - int32 xs = (x - xx1) * 1024 / scale; - int32 ys = (y - yy1) * 1024 / scale; + int16 xs = (x - xx1) * 1024 / scale; + int16 ys = (y - yy1) * 1024 / scale; uint8 *cc = &c[ys * w + xs]; if (*cc && ((*curMask) >= zz)) { if (shadowFlag) @@ -275,7 +275,7 @@ Common::Rect Animation::getFrameRect(int32 frame) { return Common::Rect(_frames[frame]._x1, _frames[frame]._y1, _frames[frame]._x2, _frames[frame]._y2); } -int32 Animation::getFrameWidth(int32 frame) { +int16 Animation::getFrameWidth(int32 frame) { debugC(4, kDebugAnim, "getFrameWidth(%d)", frame); if ((frame < 0) || (frame >= _numFrames)) return 0; @@ -286,7 +286,7 @@ int32 Animation::getFrameWidth(int32 frame) { return _frames[frame]._x2 - _frames[frame]._x1; } -int32 Animation::getFrameHeight(int32 frame) { +int16 Animation::getFrameHeight(int32 frame) { debugC(4, kDebugAnim, "getFrameHeight(%d)", frame); if (frame < 0 || frame >= _numFrames) return 0; @@ -297,15 +297,15 @@ int32 Animation::getFrameHeight(int32 frame) { return _frames[frame]._y2 - _frames[frame]._y1; } -int32 Animation::getWidth() const { +int16 Animation::getWidth() const { return _x2 - _x1; } -int32 Animation::getHeight() const { +int16 Animation::getHeight() const { return _y2 - _y1; } -void Animation::drawFontFrame(Graphics::Surface &surface, int32 frame, int32 xx, int32 yy, byte *colorMap) { +void Animation::drawFontFrame(Graphics::Surface &surface, int32 frame, int16 xx, int16 yy, byte *colorMap) { debugC(4, kDebugAnim, "drawFontFrame(surface, %d, %d, %d, colorMap)", frame, xx, yy); if (frame < 0) frame = 0; @@ -319,8 +319,8 @@ void Animation::drawFontFrame(Graphics::Surface &surface, int32 frame, int32 xx, if (_frames[frame]._ref != -1) frame = _frames[frame]._ref; - int32 rectX = _frames[frame]._x2 - _frames[frame]._x1; - int32 rectY = _frames[frame]._y2 - _frames[frame]._y1; + int16 rectX = _frames[frame]._x2 - _frames[frame]._x1; + int16 rectY = _frames[frame]._y2 - _frames[frame]._y1; if ((xx + _x1 + _frames[frame]._x1 < 0) || (yy + _y1 + _frames[frame]._y1 < 0)) return; @@ -340,9 +340,9 @@ void Animation::drawFontFrame(Graphics::Surface &surface, int32 frame, int32 xx, int32 destPitch = surface.pitch; uint8 *c = _frames[frame]._data; uint8 *curRow = (uint8 *)surface.pixels + (yy + _frames[frame]._y1 + _y1) * destPitch + (xx + _x1 + _frames[frame]._x1); - for (int32 y = 0; y < rectY; y++) { + for (int16 y = 0; y < rectY; y++) { unsigned char *cur = curRow; - for (int32 x = 0; x < rectX; x++) { + for (int16 x = 0; x < rectX; x++) { if (*c && *c < 4) *cur = colorMap[*c]; c++; @@ -352,7 +352,7 @@ void Animation::drawFontFrame(Graphics::Surface &surface, int32 frame, int32 xx, } } -void Animation::drawFrameOnPicture(int32 frame, int32 xx, int32 yy) { +void Animation::drawFrameOnPicture(int32 frame, int16 xx, int16 yy) { debugC(1, kDebugAnim, "drawFrameOnPicture(%d, %d, %d)", frame, xx, yy); if (frame < 0) frame = 0; @@ -366,8 +366,8 @@ void Animation::drawFrameOnPicture(int32 frame, int32 xx, int32 yy) { if (_frames[frame]._ref != -1) frame = _frames[frame]._ref; - int32 rectX = _frames[frame]._x2 - _frames[frame]._x1; - int32 rectY = _frames[frame]._y2 - _frames[frame]._y1; + int16 rectX = _frames[frame]._x2 - _frames[frame]._x1; + int16 rectY = _frames[frame]._y2 - _frames[frame]._y1; Picture *pic = _vm->getPicture(); @@ -389,9 +389,9 @@ void Animation::drawFrameOnPicture(int32 frame, int32 xx, int32 yy) { int32 destPitch = pic->getWidth(); uint8 *c = _frames[frame]._data; uint8 *curRow = (uint8 *)pic->getDataPtr() + (yy + _frames[frame]._y1 + _y1) * destPitch + (xx + _x1 + _frames[frame]._x1); - for (int32 y = 0; y < rectY; y++) { + for (int16 y = 0; y < rectY; y++) { unsigned char *cur = curRow; - for (int32 x = 0; x < rectX; x++) { + for (int16 x = 0; x < rectX; x++) { if (*c) *cur = *c; c++; @@ -458,8 +458,8 @@ void AnimationInstance::render() { if (frame >= _animation->_numFrames) frame = _animation->_numFrames - 1; - int32 x = _x; - int32 y = _y; + int16 x = _x; + int16 y = _y; if (_alignBottom) { int32 offsetX = (_animation->_x2 - _animation->_x1) / 2 * (_scale - 1024); @@ -513,7 +513,7 @@ void AnimationInstance::setAnimationRange(int32 rangeStart, int rangeEnd) { _currentFrame = _rangeEnd; } -void AnimationInstance::setPosition(int32 x, int32 y, int32 z, bool relative) { +void AnimationInstance::setPosition(int16 x, int16 y, int32 z, bool relative) { debugC(5, kDebugAnim, "setPosition(%d, %d, %d, %d)", x, y, z, (relative) ? 1 : 0); if (relative || !_animation) { _x = x; @@ -526,7 +526,7 @@ void AnimationInstance::setPosition(int32 x, int32 y, int32 z, bool relative) { } } -void AnimationInstance::moveRelative(int32 dx, int32 dy, int32 dz) { +void AnimationInstance::moveRelative(int16 dx, int16 dy, int32 dz) { debugC(1, kDebugAnim, "moveRelative(%d, %d, %d)", dx, dy, dz); _x += dx; _y += dy; @@ -571,13 +571,13 @@ void AnimationInstance::setUseMask(bool useMask) { _useMask = useMask; } -void AnimationInstance::getRect(int32 *x1, int32 *y1, int32 *x2, int32 *y2) const { +void AnimationInstance::getRect(int16 *x1, int16 *y1, int16 *x2, int16 *y2) const { debugC(5, kDebugAnim, "getRect(%d, %d, %d, %d)", *x1, *y1, *x2, *y2); - int32 rectX = _animation->_frames[_currentFrame]._x2 - _animation->_frames[_currentFrame]._x1; - int32 rectY = _animation->_frames[_currentFrame]._y2 - _animation->_frames[_currentFrame]._y1; + int16 rectX = _animation->_frames[_currentFrame]._x2 - _animation->_frames[_currentFrame]._x1; + int16 rectY = _animation->_frames[_currentFrame]._y2 - _animation->_frames[_currentFrame]._y1; - int32 finalWidth = rectX * _scale / 1024; - int32 finalHeight = rectY * _scale / 1024; + int16 finalWidth = rectX * _scale / 1024; + int16 finalHeight = rectY * _scale / 1024; // compute final x1, y1, x2, y2 *x1 = _x + _animation->_x1 + _animation->_frames[_currentFrame]._x1 * _scale / 1024; @@ -586,7 +586,7 @@ void AnimationInstance::getRect(int32 *x1, int32 *y1, int32 *x2, int32 *y2) cons *y2 = *y1 + finalHeight; } -void AnimationInstance::setX(int32 x, bool relative) { +void AnimationInstance::setX(int16 x, bool relative) { debugC(1, kDebugAnim, "setX(%d, %d)", x, (relative) ? 1 : 0); if (relative || !_animation) _x = x; @@ -594,7 +594,7 @@ void AnimationInstance::setX(int32 x, bool relative) { _x = x - _animation->_x1; } -void AnimationInstance::setY(int32 y, bool relative) { +void AnimationInstance::setY(int16 y, bool relative) { debugC(1, kDebugAnim, "setY(%d, %d)", y, (relative) ? 1 : 0); if (relative || !_animation) _y = y; @@ -617,11 +617,11 @@ int32 AnimationInstance::getLayerZ() const { return _layerZ; } -int32 AnimationInstance::getX2() const { +int16 AnimationInstance::getX2() const { return _x + _animation->_x1; } -int32 AnimationInstance::getY2() const { +int16 AnimationInstance::getY2() const { return _y + _animation->_y1; } @@ -650,6 +650,7 @@ void AnimationInstance::save(Common::WriteStream *stream) { stream->writeSint32LE(_visible); stream->writeSint32LE(_useMask); } + void AnimationInstance::load(Common::ReadStream *stream) { _currentFrame = stream->readSint32LE(); _currentTime = stream->readSint32LE(); @@ -698,14 +699,13 @@ void AnimationManager::updateInstance(AnimationInstance* instance) { } void AnimationManager::addInstance(AnimationInstance *instance) { - // if the instance already exists, we skip the add for (uint32 i = 0; i < _instances.size(); i++) { if (_instances[i] == instance) return; } - int found = -1; + int32 found = -1; // here we now do an ordered insert (closer to the original game) for (uint32 i = 0; i < _instances.size(); i++) { @@ -715,11 +715,10 @@ void AnimationManager::addInstance(AnimationInstance *instance) { } } - if ( found == -1 ) { + if (found == -1) _instances.push_back(instance); - } else { + else _instances.insert_at(found, instance); - } } void AnimationManager::removeInstance(AnimationInstance *instance) { diff --git a/engines/toon/anim.h b/engines/toon/anim.h index eb8dcbd600..cd550b2621 100644 --- a/engines/toon/anim.h +++ b/engines/toon/anim.h @@ -36,10 +36,10 @@ class Picture; class ToonEngine; struct AnimationFrame { - int32 _x1; - int32 _y1; - int32 _x2; - int32 _y2; + int16 _x1; + int16 _y1; + int16 _x2; + int16 _y2; int32 _ref; uint8 *_data; }; @@ -49,10 +49,10 @@ public: Animation(ToonEngine *vm); ~Animation(); - int32 _x1; - int32 _y1; - int32 _x2; - int32 _y2; + int16 _x1; + int16 _y1; + int16 _x2; + int16 _y2; int32 _numFrames; int32 _fps; AnimationFrame *_frames; @@ -61,18 +61,18 @@ public: char _name[32]; bool loadAnimation(const Common::String &file); - void drawFrame(Graphics::Surface &surface, int32 frame, int32 x, int32 y); - void drawFontFrame(Graphics::Surface &surface, int32 frame, int32 x, int32 y, byte *colorMap); - void drawFrameOnPicture(int32 frame, int32 x, int32 y); - void drawFrameWithMask(Graphics::Surface &surface, int32 frame, int32 xx, int32 yy, int32 zz, Picture *mask); - void drawFrameWithMaskAndScale(Graphics::Surface &surface, int32 frame, int32 xx, int32 yy, int32 zz, Picture *mask, int32 scale); + void drawFrame(Graphics::Surface &surface, int32 frame, int16 x, int16 y); + void drawFontFrame(Graphics::Surface &surface, int32 frame, int16 x, int16 y, byte *colorMap); + void drawFrameOnPicture(int32 frame, int16 x, int16 y); + void drawFrameWithMask(Graphics::Surface &surface, int32 frame, int16 xx, int16 yy, int32 zz, Picture *mask); + void drawFrameWithMaskAndScale(Graphics::Surface &surface, int32 frame, int16 xx, int16 yy, int32 zz, Picture *mask, int32 scale); void drawStrip(int32 offset = 0); void applyPalette(int32 offset, int32 srcOffset, int32 numEntries); Common::Rect getFrameRect(int32 frame); - int32 getFrameWidth(int32 frame); - int32 getFrameHeight(int32 frame); - int32 getWidth() const; - int32 getHeight() const; + int16 getFrameWidth(int32 frame); + int16 getFrameHeight(int32 frame); + int16 getWidth() const; + int16 getHeight() const; Common::Rect getRect(); protected: ToonEngine *_vm; @@ -92,25 +92,25 @@ public: void renderOnPicture(); void setAnimation(Animation *animation, bool setRange = true); void playAnimation(); - void setAnimationRange(int32 rangeStart, int rangeEnd); + void setAnimationRange(int32 rangeStart, int32 rangeEnd); void setFps(int32 fps); void setLooping(bool enable); void stopAnimation(); void setFrame(int32 position); void forceFrame(int32 position); - void setPosition(int32 x, int32 y, int32 z, bool relative = false); + void setPosition(int16 x, int16 y, int32 z, bool relative = false); Animation *getAnimation() const { return _animation; } void setScale(int32 scale, bool align = false); void setVisible(bool visible); bool getVisible() const { return _visible; } void setUseMask(bool useMask); - void moveRelative(int32 dx, int32 dy, int32 dz); - void getRect(int32 *x1, int32 *y1, int32 *x2, int32 *y2) const; - int32 getX() const { return _x; } - int32 getY() const { return _y; } + void moveRelative(int16 dx, int16 dy, int32 dz); + void getRect(int16 *x1, int16 *y1, int16 *x2, int16 *y2) const; + int16 getX() const { return _x; } + int16 getY() const { return _y; } int32 getZ() const { return _z; } - int32 getX2() const; - int32 getY2() const; + int16 getX2() const; + int16 getY2() const; int32 getZ2() const; int32 getFrame() const { return _currentFrame; } void reset(); @@ -120,8 +120,8 @@ public: void setId(int32 id) { _id = id; } int32 getId() const { return _id; } - void setX(int32 x, bool relative = false); - void setY(int32 y, bool relative = false); + void setX(int16 x, bool relative = false); + void setY(int16 y, bool relative = false); void setZ(int32 z, bool relative = false); void setLayerZ(int32 layer); int32 getLayerZ() const; @@ -133,8 +133,8 @@ protected: int32 _currentTime; int32 _fps; Animation *_animation; - int32 _x; - int32 _y; + int16 _x; + int16 _y; int32 _z; int32 _layerZ; int32 _rangeStart; diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp index 09730626f2..e19656f2c8 100644 --- a/engines/toon/character.cpp +++ b/engines/toon/character.cpp @@ -534,35 +534,33 @@ int32 Character::getFacingFromDirection(int16 dx, int16 dy) { dx = -dx; int32 facingEntry = 0; - int32 ydiff = dy; + int16 ydiff = dy; if (ydiff < 0) { ++facingEntry; ydiff = -ydiff; } - facingEntry <<= 1; + facingEntry *= 2; - int32 xdiff = dx; + int16 xdiff = dx; if (xdiff < 0) { ++facingEntry; xdiff = -xdiff; } - facingEntry <<= 1; + facingEntry *= 2; if (xdiff >= ydiff) { - int32 temp = ydiff; + // Swap xdiff and ydiff + int16 temp = ydiff; ydiff = xdiff; xdiff = temp; - } else { - facingEntry += 1; - } - - facingEntry <<= 1; + } else + facingEntry++; - int32 temp = (ydiff + 1) >> 1; + facingEntry *= 2; - if (xdiff < temp) - facingEntry += 1; + if (xdiff < ((ydiff + 1) / 2)) + facingEntry++; return facingTable[facingEntry]; } diff --git a/engines/toon/font.cpp b/engines/toon/font.cpp index d58663a00c..1e851ff4ae 100644 --- a/engines/toon/font.cpp +++ b/engines/toon/font.cpp @@ -65,10 +65,10 @@ byte FontRenderer::textToFont(byte c) { return map_textToFont[c - 0x80]; } -void FontRenderer::renderText(int32 x, int32 y, const Common::String &origText, int32 mode) { +void FontRenderer::renderText(int16 x, int16 y, const Common::String &origText, int32 mode) { debugC(5, kDebugFont, "renderText(%d, %d, %s, %d)", x, y, origText.c_str(), mode); - int32 xx, yy; + int16 xx, yy; computeSize(origText, &xx, &yy); if (mode & 2) { @@ -83,8 +83,8 @@ void FontRenderer::renderText(int32 x, int32 y, const Common::String &origText, _vm->addDirtyRect(x, y, x + xx, y + yy); - int32 curX = x; - int32 curY = y; + int16 curX = x; + int16 curY = y; int32 height = 0; const byte *text = (const byte *)origText.c_str(); @@ -98,20 +98,20 @@ void FontRenderer::renderText(int32 x, int32 y, const Common::String &origText, curChar = textToFont(curChar); _currentFont->drawFontFrame(_vm->getMainSurface(), curChar, curX, curY, _currentFontColor); curX = curX + _currentFont->getFrameWidth(curChar) - 1; - height = MAX(height, _currentFont->getFrameHeight(curChar)); + height = MAX(height, _currentFont->getFrameHeight(curChar)); } text++; } } -void FontRenderer::computeSize(const Common::String &origText, int32 *retX, int32 *retY) { +void FontRenderer::computeSize(const Common::String &origText, int16 *retX, int16 *retY) { debugC(4, kDebugFont, "computeSize(%s, retX, retY)", origText.c_str()); - int32 lineWidth = 0; - int32 lineHeight = 0; - int32 totalHeight = 0; - int32 totalWidth = 0; - int32 lastLineHeight = 0; + int16 lineWidth = 0; + int16 lineHeight = 0; + int16 totalHeight = 0; + int16 totalWidth = 0; + int16 lastLineHeight = 0; const byte *text = (const byte *)origText.c_str(); while (*text) { @@ -127,8 +127,8 @@ void FontRenderer::computeSize(const Common::String &origText, int32 *retX, int3 lastLineHeight = 0; } else { curChar = textToFont(curChar); - int32 charWidth = _currentFont->getFrameWidth(curChar) - 1; - int32 charHeight = _currentFont->getFrameHeight(curChar); + int16 charWidth = _currentFont->getFrameWidth(curChar) - 1; + int16 charHeight = _currentFont->getFrameHeight(curChar); lineWidth += charWidth; lineHeight = MAX(lineHeight, charHeight); @@ -137,7 +137,7 @@ void FontRenderer::computeSize(const Common::String &origText, int32 *retX, int3 // assume we only need to take the lower bound into // consideration. Common::Rect charRect = _currentFont->getFrameRect(curChar); - lastLineHeight = MAX(lastLineHeight, charRect.bottom); + lastLineHeight = MAX(lastLineHeight, charRect.bottom); } text++; } @@ -189,7 +189,7 @@ void FontRenderer::setFontColor(int32 fontColor1, int32 fontColor2, int32 fontCo _currentFontColor[3] = fontColor3; } -void FontRenderer::renderMultiLineText(int32 x, int32 y, const Common::String &origText, int32 mode) { +void FontRenderer::renderMultiLineText(int16 x, int16 y, const Common::String &origText, int32 mode) { debugC(5, kDebugFont, "renderMultiLineText(%d, %d, %s, %d)", x, y, origText.c_str(), mode); // divide the text in several lines @@ -204,10 +204,10 @@ void FontRenderer::renderMultiLineText(int32 x, int32 y, const Common::String &o byte *it = text; - int32 maxWidth = 0; - int32 curWidth = 0; + int16 maxWidth = 0; + int16 curWidth = 0; - while (1) { + while (true) { byte *lastLine = it; byte *lastSpace = it; int32 lastSpaceX = 0; @@ -223,7 +223,7 @@ void FontRenderer::renderMultiLineText(int32 x, int32 y, const Common::String &o curChar = textToFont(curChar); int width = _currentFont->getFrameWidth(curChar); - curWidth += MAX(width - 2, 0); + curWidth += MAX(width - 2, 0); it++; curLetterNr++; } @@ -260,8 +260,8 @@ void FontRenderer::renderMultiLineText(int32 x, int32 y, const Common::String &o //numLines++; // get font height (assumed to be constant) - int32 height = _currentFont->getHeight(); - int textSize = (height - 2) * numLines; + int16 height = _currentFont->getHeight(); + int32 textSize = (height - 2) * numLines; y = y - textSize; if (y < 30) y = 30; @@ -278,8 +278,8 @@ void FontRenderer::renderMultiLineText(int32 x, int32 y, const Common::String &o x = TOON_SCREEN_WIDTH - (maxWidth / 2) - 30; // we have good coordinates now, we can render the multi line - int32 curX = x; - int32 curY = y; + int16 curX = x; + int16 curY = y; for (int32 i = 0; i < numLines; i++) { const byte *line = lines[i]; diff --git a/engines/toon/font.h b/engines/toon/font.h index 349d9d1ee7..2a46ad3559 100644 --- a/engines/toon/font.h +++ b/engines/toon/font.h @@ -33,9 +33,9 @@ public: ~FontRenderer(); void setFont(Animation *font); - void computeSize(const Common::String &origText, int32 *retX, int32 *retY); - void renderText(int32 x, int32 y, const Common::String &origText, int32 mode); - void renderMultiLineText(int32 x, int32 y, const Common::String &origText, int32 mode); + void computeSize(const Common::String &origText, int16 *retX, int16 *retY); + void renderText(int16 x, int16 y, const Common::String &origText, int32 mode); + void renderMultiLineText(int16 x, int16 y, const Common::String &origText, int32 mode); void setFontColorByCharacter(int32 characterId); void setFontColor(int32 fontColor1, int32 fontColor2, int32 fontColor3); protected: diff --git a/engines/toon/hotspot.cpp b/engines/toon/hotspot.cpp index ce2cdf1bb9..8b8f0ab577 100644 --- a/engines/toon/hotspot.cpp +++ b/engines/toon/hotspot.cpp @@ -57,7 +57,7 @@ void Hotspots::save(Common::WriteStream *Stream) { } } -int32 Hotspots::FindBasedOnCorner(int32 x, int32 y) { +int32 Hotspots::FindBasedOnCorner(int16 x, int16 y) { debugC(1, kDebugHotspot, "FindBasedOnCorner(%d, %d)", x, y); for (int32 i = 0; i < _numItems; i++) { @@ -73,7 +73,7 @@ int32 Hotspots::FindBasedOnCorner(int32 x, int32 y) { return -1; } -int32 Hotspots::Find(int32 x, int32 y) { +int32 Hotspots::Find(int16 x, int16 y) { debugC(6, kDebugHotspot, "Find(%d, %d)", x, y); int32 priority = -1; diff --git a/engines/toon/hotspot.h b/engines/toon/hotspot.h index 70e80046e1..3852e2e42e 100644 --- a/engines/toon/hotspot.h +++ b/engines/toon/hotspot.h @@ -51,8 +51,8 @@ public: ~Hotspots(); bool LoadRif(const Common::String &rifName, const Common::String &additionalRifName); - int32 Find(int32 x, int32 y); - int32 FindBasedOnCorner(int32 x, int32 y); + int32 Find(int16 x, int16 y); + int32 FindBasedOnCorner(int16 x, int16 y); HotspotData *Get(int32 id); int32 getCount() const { return _numItems; } diff --git a/engines/toon/picture.cpp b/engines/toon/picture.cpp index ff136e5acb..204b0fe576 100644 --- a/engines/toon/picture.cpp +++ b/engines/toon/picture.cpp @@ -150,7 +150,7 @@ void Picture::setupPalette() { _vm->setPaletteEntries(_palette, 1, 128); } -void Picture::drawMask(Graphics::Surface &surface, int32 x, int32 y, int32 dx, int32 dy) { +void Picture::drawMask(Graphics::Surface &surface, int16 x, int16 y, int16 dx, int16 dy) { debugC(1, kDebugPicture, "drawMask(surface, %d, %d, %d, %d)", x, y, dx, dy); for (int32 i = 0; i < 128; i++) { @@ -161,8 +161,8 @@ void Picture::drawMask(Graphics::Surface &surface, int32 x, int32 y, int32 dx, i _vm->setPaletteEntries(color, i, 1); } - int32 rx = MIN(_width, surface.w - x); - int32 ry = MIN(_height, surface.h - y); + int16 rx = MIN(_width, surface.w - x); + int16 ry = MIN(_height, surface.h - y); if (rx < 0 || ry < 0) return; @@ -172,10 +172,10 @@ void Picture::drawMask(Graphics::Surface &surface, int32 x, int32 y, int32 dx, i uint8 *c = _data + _width * dy + dx; uint8 *curRow = (uint8 *)surface.pixels + y * destPitch + x; - for (int32 yy = 0; yy < ry; yy++) { + for (int16 yy = 0; yy < ry; yy++) { uint8 *curSrc = c; uint8 *cur = curRow; - for (int32 xx = 0; xx < rx; xx++) { + for (int16 xx = 0; xx < rx; xx++) { //*cur = (*curSrc >> 5) * 8; // & 0x1f; *cur = (*curSrc & 0x1f) ? 127 : 0; @@ -187,10 +187,9 @@ void Picture::drawMask(Graphics::Surface &surface, int32 x, int32 y, int32 dx, i } } -void Picture::drawWithRectList(Graphics::Surface& surface, int32 x, int32 y, int32 dx, int32 dy, Common::Array& rectArray) { - - int32 rx = MIN(_width, surface.w - x); - int32 ry = MIN(_height, surface.h - y); +void Picture::drawWithRectList(Graphics::Surface& surface, int16 x, int16 y, int16 dx, int16 dy, Common::Array& rectArray) { + int16 rx = MIN(_width, surface.w - x); + int16 ry = MIN(_height, surface.h - y); if (rx < 0 || ry < 0) return; @@ -202,16 +201,16 @@ void Picture::drawWithRectList(Graphics::Surface& surface, int32 x, int32 y, int Common::Rect rect = rectArray[i]; - int32 fillRx = MIN(rx, rect.right - rect.left); - int32 fillRy = MIN(ry, rect.bottom - rect.top); + int16 fillRx = MIN(rx, rect.right - rect.left); + int16 fillRy = MIN(ry, rect.bottom - rect.top); uint8 *c = _data + _width * (dy + rect.top) + (dx + rect.left); uint8 *curRow = (uint8 *)surface.pixels + (y + rect.top) * destPitch + (x + rect.left); - for (int32 yy = 0; yy < fillRy; yy++) { + for (int16 yy = 0; yy < fillRy; yy++) { uint8 *curSrc = c; uint8 *cur = curRow; - for (int32 xx = 0; xx < fillRx; xx++) { + for (int16 xx = 0; xx < fillRx; xx++) { *cur = *curSrc; curSrc++; cur++; @@ -222,11 +221,11 @@ void Picture::drawWithRectList(Graphics::Surface& surface, int32 x, int32 y, int } } -void Picture::draw(Graphics::Surface &surface, int32 x, int32 y, int32 dx, int32 dy) { +void Picture::draw(Graphics::Surface &surface, int16 x, int16 y, int16 dx, int16 dy) { debugC(6, kDebugPicture, "draw(surface, %d, %d, %d, %d)", x, y, dx, dy); - int32 rx = MIN(_width, surface.w - x); - int32 ry = MIN(_height, surface.h - y); + int16 rx = MIN(_width, surface.w - x); + int16 ry = MIN(_height, surface.h - y); if (rx < 0 || ry < 0) return; @@ -236,10 +235,10 @@ void Picture::draw(Graphics::Surface &surface, int32 x, int32 y, int32 dx, int32 uint8 *c = _data + _width * dy + dx; uint8 *curRow = (uint8 *)surface.pixels + y * destPitch + x; - for (int32 yy = 0; yy < ry; yy++) { + for (int16 yy = 0; yy < ry; yy++) { uint8 *curSrc = c; uint8 *cur = curRow; - for (int32 xx = 0; xx < rx; xx++) { + for (int16 xx = 0; xx < rx; xx++) { *cur = *curSrc; curSrc++; cur++; @@ -249,7 +248,7 @@ void Picture::draw(Graphics::Surface &surface, int32 x, int32 y, int32 dx, int32 } } -uint8 Picture::getData(int32 x, int32 y) { +uint8 Picture::getData(int16 x, int16 y) { debugC(6, kDebugPicture, "getData(%d, %d)", x, y); if (!_data) @@ -259,7 +258,7 @@ uint8 Picture::getData(int32 x, int32 y) { } // use original work from johndoe -void Picture::floodFillNotWalkableOnMask(int32 x, int32 y) { +void Picture::floodFillNotWalkableOnMask(int16 x, int16 y) { debugC(1, kDebugPicture, "floodFillNotWalkableOnMask(%d, %d)", x, y); // Stack-based floodFill algorithm based on // http://student.kuleuven.be/~m0216922/CG/files/floodfill.cpp @@ -292,10 +291,10 @@ void Picture::floodFillNotWalkableOnMask(int32 x, int32 y) { } } -void Picture::drawLineOnMask(int32 x, int32 y, int32 x2, int32 y2, bool walkable) { +void Picture::drawLineOnMask(int16 x, int16 y, int16 x2, int16 y2, bool walkable) { debugC(1, kDebugPicture, "drawLineOnMask(%d, %d, %d, %d, %d)", x, y, x2, y2, (walkable) ? 1 : 0); - static int32 lastX = 0; - static int32 lastY = 0; + static int16 lastX = 0; + static int16 lastY = 0; if (x == -1) { x = lastX; @@ -303,12 +302,12 @@ void Picture::drawLineOnMask(int32 x, int32 y, int32 x2, int32 y2, bool walkable } uint32 bx = x << 16; - int32 dx = x2 - x; + int16 dx = x2 - x; uint32 by = y << 16; - int32 dy = y2 - y; - uint32 adx = abs(dx); - uint32 ady = abs(dy); - int32 t = 0; + int16 dy = y2 - y; + uint16 adx = abs(dx); + uint16 ady = abs(dy); + int16 t = 0; if (adx <= ady) t = ady; else @@ -317,9 +316,7 @@ void Picture::drawLineOnMask(int32 x, int32 y, int32 x2, int32 y2, bool walkable int32 cdx = (dx << 16) / t; int32 cdy = (dy << 16) / t; - int32 i = t; - while (i) { - + for (int16 i = t; i > 0; i--) { int32 rx = bx >> 16; int32 ry = by >> 16; @@ -337,7 +334,6 @@ void Picture::drawLineOnMask(int32 x, int32 y, int32 x2, int32 y2, bool walkable bx += cdx; by += cdy; - i--; } } } // End of namespace Toon diff --git a/engines/toon/picture.h b/engines/toon/picture.h index 460c5b58a2..5e79612a39 100644 --- a/engines/toon/picture.h +++ b/engines/toon/picture.h @@ -33,25 +33,27 @@ namespace Toon { class ToonEngine; -class Picture { +class Picture { public: Picture(ToonEngine *vm); ~Picture(); + bool loadPicture(const Common::String &file); void setupPalette(); - void draw(Graphics::Surface &surface, int32 x, int32 y, int32 dx, int32 dy); - void drawWithRectList(Graphics::Surface& surface, int32 x, int32 y, int32 dx, int32 dy, Common::Array& rectArray); - void drawMask(Graphics::Surface &surface, int32 x, int32 y, int32 dx, int32 dy); - void drawLineOnMask(int32 x, int32 y, int32 x2, int32 y2, bool walkable); - void floodFillNotWalkableOnMask(int32 x, int32 y); - uint8 getData(int32 x, int32 y); + void draw(Graphics::Surface &surface, int16 x, int16 y, int16 dx, int16 dy); + void drawWithRectList(Graphics::Surface& surface, int16 x, int16 y, int16 dx, int16 dy, Common::Array& rectArray); + void drawMask(Graphics::Surface &surface, int16 x, int16 y, int16 dx, int16 dy); + void drawLineOnMask(int16 x, int16 y, int16 x2, int16 y2, bool walkable); + void floodFillNotWalkableOnMask(int16 x, int16 y); + uint8 getData(int16 x, int16 y); uint8 *getDataPtr() { return _data; } - int32 getWidth() const { return _width; } - int32 getHeight() const { return _height; } + int16 getWidth() const { return _width; } + int16 getHeight() const { return _height; } + protected: - int32 _width; - int32 _height; + int16 _width; + int16 _height; uint8 *_data; uint8 *_palette; // need to be copied at 3-387 int32 _paletteEntries; diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 416daa1fe8..0956b965a7 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -1588,12 +1588,12 @@ void ToonEngine::clickEvent() { } void ToonEngine::selectHotspot() { - int32 x1 = 0; - int32 x2 = 0; - int32 y1 = 0; - int32 y2 = 0; + int16 x1 = 0; + int16 x2 = 0; + int16 y1 = 0; + int16 y2 = 0; - int32 mouseX = _mouseX; + int16 mouseX = _mouseX; if (_gameState->_inCutaway) mouseX += TOON_BACKBUFFER_WIDTH; @@ -1693,7 +1693,6 @@ void ToonEngine::selectHotspot() { } void ToonEngine::exitScene() { - fadeOut(5); // disable all scene animation @@ -2831,7 +2830,6 @@ void ToonEngine::playSoundWrong() { } void ToonEngine::getTextPosition(int32 characterId, int32 *retX, int32 *retY) { - if (characterId < 0) characterId = 0; @@ -2852,8 +2850,8 @@ void ToonEngine::getTextPosition(int32 characterId, int32 *retX, int32 *retY) { } } else if (characterId == 1) { // flux - int32 x = _flux->getX(); - int32 y = _flux->getY(); + int16 x = _flux->getX(); + int16 y = _flux->getY(); if (x >= _gameState->_currentScrollValue && x <= _gameState->_currentScrollValue + TOON_SCREEN_WIDTH) { if (!_gameState->_inCutaway) { *retX = x; @@ -2885,7 +2883,7 @@ void ToonEngine::getTextPosition(int32 characterId, int32 *retX, int32 *retY) { if (character && !_gameState->_inCutaway) { if (character->getAnimationInstance()) { if (character->getX() >= _gameState->_currentScrollValue && character->getX() <= _gameState->_currentScrollValue + TOON_SCREEN_WIDTH) { - int32 x1, y1, x2, y2; + int16 x1, y1, x2, y2; character->getAnimationInstance()->getRect(&x1, &y1, &x2, &y2); *retX = (x1 + x2) / 2; *retY = y1; @@ -2896,7 +2894,6 @@ void ToonEngine::getTextPosition(int32 characterId, int32 *retX, int32 *retY) { } Character *ToonEngine::getCharacterById(int32 charId) { - for (int32 i = 0; i < 8; i++) { if (_characters[i] && _characters[i]->getId() == charId) return _characters[i]; -- cgit v1.2.3 From 0b5b58829cbb76a2da1c4de19dd51e30fc2c5a3d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 29 Jun 2012 14:57:54 +0200 Subject: GUI: Don't distribute vertical space between buttons in the thumbnail load chooser. --- gui/saveload-dialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 5d9d489fec..8537937c0f 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -489,11 +489,11 @@ void LoadChooserThumbnailed::reflowLayout() { } const uint addX = _columns > 1 ? (availableWidth % slotAreaWidth) / (_columns - 1) : 0; - const uint addY = _lines > 1 ? (availableHeight % slotAreaHeight) / (_lines - 1) : 0; + //const uint addY = _lines > 1 ? (availableHeight % slotAreaHeight) / (_lines - 1) : 0; _buttons.reserve(_lines * _columns); y += defaultSpacingVertical / 2; - for (uint curLine = 0; curLine < _lines; ++curLine, y += slotAreaHeight + addY) { + for (uint curLine = 0; curLine < _lines; ++curLine, y += slotAreaHeight/* + addY*/) { for (uint curColumn = 0, curX = x + defaultSpacingHorizontal / 2; curColumn < _columns; ++curColumn, curX += slotAreaWidth + addX) { ContainerWidget *container = new ContainerWidget(this, curX, y, containerWidth, containerHeight); container->setVisible(false); -- cgit v1.2.3 From 0db0b650e215847005676755363565879c2a7b94 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 29 Jun 2012 14:58:33 +0200 Subject: GUI: Fix copy&paste error affecting vertical spacing in thumbnail load chooser. --- gui/saveload-dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 8537937c0f..1d8a9872aa 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -477,7 +477,7 @@ void LoadChooserThumbnailed::reflowLayout() { const int16 defaultSpacingHorizontal = 4; const int16 defaultSpacingVertical = 4; const int16 slotAreaWidth = containerWidth + defaultSpacingHorizontal; - const int16 slotAreaHeight = containerHeight + defaultSpacingHorizontal; + const int16 slotAreaHeight = containerHeight + defaultSpacingVertical; const uint oldEntriesPerPage = _entriesPerPage; _columns = MAX(1, availableWidth / slotAreaWidth); -- cgit v1.2.3 From 7860c5bfc93055f1ebcbf037876cd2abd42818c5 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 29 Jun 2012 15:00:56 +0200 Subject: GUI: Only update save list when the dialog opens in thumbnail load chooser. --- gui/saveload-dialog.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 1d8a9872aa..25c722eec1 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -452,6 +452,7 @@ void LoadChooserThumbnailed::open() { SaveLoadChooserDialog::open(); _curPage = 0; + _saveList = _metaEngine->listSaves(_target.c_str()); updateSaves(); } @@ -546,8 +547,6 @@ void LoadChooserThumbnailed::hideButtons() { void LoadChooserThumbnailed::updateSaves() { hideButtons(); - _saveList = _metaEngine->listSaves(_target.c_str()); - for (uint i = _curPage * _entriesPerPage, curNum = 0; i < _saveList.size() && curNum < _entriesPerPage; ++i, ++curNum) { const uint saveSlot = _saveList[i].getSaveSlot(); -- cgit v1.2.3 From d3e5763276826d3f469fd93077c2f1ef6ef61314 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 29 Jun 2012 15:52:56 +0200 Subject: GUI: Allow the user to switch between list and thumbnail based load chooser. --- gui/ThemeEngine.cpp | 2 + gui/ThemeEngine.h | 4 +- gui/saveload-dialog.cpp | 78 +++++++++++++++++++-- gui/saveload-dialog.h | 18 ++++- gui/saveload.cpp | 13 +++- gui/themes/default.inc | 18 +++++ gui/themes/scummclassic.zip | Bin 93390 -> 93928 bytes gui/themes/scummclassic/THEMERC | 2 +- gui/themes/scummclassic/classic_layout.stx | 9 +++ gui/themes/scummclassic/classic_layout_lowres.stx | 9 +++ gui/themes/scummmodern.zip | Bin 1449870 -> 1452236 bytes gui/themes/scummmodern/THEMERC | 2 +- gui/themes/scummmodern/grid.bmp | Bin 0 -> 822 bytes gui/themes/scummmodern/list.bmp | Bin 0 -> 822 bytes gui/themes/scummmodern/scummmodern_gfx.stx | 2 + gui/themes/scummmodern/scummmodern_layout.stx | 9 +++ .../scummmodern/scummmodern_layout_lowres.stx | 9 +++ 17 files changed, 163 insertions(+), 12 deletions(-) create mode 100644 gui/themes/scummmodern/grid.bmp create mode 100644 gui/themes/scummmodern/list.bmp diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 1bf7ad3c85..6f34e8dc70 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -48,6 +48,8 @@ const char * const ThemeEngine::kImageLogoSmall = "logo_small.bmp"; const char * const ThemeEngine::kImageSearch = "search.bmp"; const char * const ThemeEngine::kImageEraser = "eraser.bmp"; const char * const ThemeEngine::kImageDelbtn = "delbtn.bmp"; +const char * const ThemeEngine::kImageList = "list.bmp"; +const char * const ThemeEngine::kImageGrid = "grid.bmp"; struct TextDrawData { const Graphics::Font *_fontPtr; diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index 21711e2955..cd388b7f65 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -35,7 +35,7 @@ #include "graphics/pixelformat.h" -#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.13" +#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.14" class OSystem; @@ -232,6 +232,8 @@ public: static const char *const kImageSearch; ///< Search tool image used in the launcher static const char *const kImageEraser; ///< Clear input image used in the launcher static const char *const kImageDelbtn; ///< Delete characters in the predictive dialog + static const char *const kImageList; ///< List image used in save/load chooser selection + static const char *const kImageGrid; ///< Grid image used in save/load chooser selection /** * Graphics mode enumeration. diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 25c722eec1..45bf1c49fc 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -30,14 +30,23 @@ namespace GUI { -SaveLoadChooserDialog::SaveLoadChooserDialog(const Common::String &dialogName) +enum { + kListSwitchCmd = 'LIST', + kGridSwitchCmd = 'GRID' +}; + +SaveLoadChooserDialog::SaveLoadChooserDialog(const Common::String &dialogName, const bool saveMode) : Dialog(dialogName), _metaEngine(0), _delSupport(false), _metaInfoSupport(false), - _thumbnailSupport(false), _saveDateSupport(false), _playTimeSupport(false) { + _thumbnailSupport(false), _saveDateSupport(false), _playTimeSupport(false), _saveMode(saveMode), + _listButton(0), _gridButton(0) { + addChooserButtons(); } -SaveLoadChooserDialog::SaveLoadChooserDialog(int x, int y, int w, int h) +SaveLoadChooserDialog::SaveLoadChooserDialog(int x, int y, int w, int h, const bool saveMode) : Dialog(x, y, w, h), _metaEngine(0), _delSupport(false), _metaInfoSupport(false), - _thumbnailSupport(false), _saveDateSupport(false), _playTimeSupport(false) { + _thumbnailSupport(false), _saveDateSupport(false), _playTimeSupport(false), _saveMode(saveMode), + _listButton(0), _gridButton(0) { + addChooserButtons(); } void SaveLoadChooserDialog::open() { @@ -60,6 +69,63 @@ int SaveLoadChooserDialog::run(const Common::String &target, const MetaEngine *m return runIntern(); } +void SaveLoadChooserDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { + switch (cmd) { + case kListSwitchCmd: + setResult(kSwitchToList); + close(); + break; + + case kGridSwitchCmd: + setResult(kSwitchToGrid); + close(); + break; + + default: + break; + } + + return Dialog::handleCommand(sender, cmd, data); +} + +void SaveLoadChooserDialog::addChooserButtons() { + if (_listButton) { + removeWidget(_listButton); + delete _listButton; + } + + if (_gridButton) { + removeWidget(_gridButton); + delete _gridButton; + } + + _listButton = createSwitchButton("SaveLoadChooser.ListSwitch", "L", _("List view"), ThemeEngine::kImageList, kListSwitchCmd); + _gridButton = createSwitchButton("SaveLoadChooser.GridSwitch", "G", _("Grid view"), ThemeEngine::kImageGrid, kGridSwitchCmd); + if (!_metaInfoSupport || !_thumbnailSupport || _saveMode) + _gridButton->setEnabled(false); +} + +void SaveLoadChooserDialog::reflowLayout() { + addChooserButtons(); + + Dialog::reflowLayout(); +} + +GUI::ButtonWidget *SaveLoadChooserDialog::createSwitchButton(const Common::String &name, const char *desc, const char *tooltip, const char *image, uint32 cmd) { + ButtonWidget *button; + +#ifndef DISABLE_FANCY_THEMES + if (g_gui.xmlEval()->getVar("Globals.ShowChooserPics") == 1 && g_gui.theme()->supportsImages()) { + button = new PicButtonWidget(this, name, tooltip, cmd); + ((PicButtonWidget *)button)->useThemeTransparency(true); + ((PicButtonWidget *)button)->setGfx(g_gui.theme()->getImageSurface(image)); + } else +#endif + button = new ButtonWidget(this, name, desc, tooltip, cmd); + + return button; +} + // SaveLoadChooserSimple implementation enum { @@ -68,7 +134,7 @@ enum { }; SaveLoadChooserSimple::SaveLoadChooserSimple(const String &title, const String &buttonLabel, bool saveMode) - : SaveLoadChooserDialog("SaveLoadChooser"), _list(0), _chooseButton(0), _deleteButton(0), _gfxWidget(0) { + : SaveLoadChooserDialog("SaveLoadChooser", saveMode), _list(0), _chooseButton(0), _deleteButton(0), _gfxWidget(0) { _backgroundType = ThemeEngine::kDialogBackgroundSpecial; new StaticTextWidget(this, "SaveLoadChooser.Title", title); @@ -385,7 +451,7 @@ enum { }; LoadChooserThumbnailed::LoadChooserThumbnailed(const Common::String &title) - : SaveLoadChooserDialog("SaveLoadChooser"), _lines(0), _columns(0), _entriesPerPage(0), + : SaveLoadChooserDialog("SaveLoadChooser", false), _lines(0), _columns(0), _entriesPerPage(0), _curPage(0), _buttons() { _backgroundType = ThemeEngine::kDialogBackgroundSpecial; diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h index b80741d36a..7921f5798a 100644 --- a/gui/saveload-dialog.h +++ b/gui/saveload-dialog.h @@ -29,19 +29,27 @@ namespace GUI { +#define kSwitchToList -2 +#define kSwitchToGrid -3 + class SaveLoadChooserDialog : protected Dialog { public: - SaveLoadChooserDialog(const Common::String &dialogName); - SaveLoadChooserDialog(int x, int y, int w, int h); + SaveLoadChooserDialog(const Common::String &dialogName, const bool saveMode); + SaveLoadChooserDialog(int x, int y, int w, int h, const bool saveMode); virtual void open(); + virtual void reflowLayout(); + + virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); + int run(const Common::String &target, const MetaEngine *metaEngine); virtual const Common::String &getResultString() const = 0; protected: virtual int runIntern() = 0; + const bool _saveMode; const MetaEngine *_metaEngine; bool _delSupport; bool _metaInfoSupport; @@ -49,6 +57,12 @@ protected: bool _saveDateSupport; bool _playTimeSupport; Common::String _target; + + GUI::ButtonWidget *_listButton; + GUI::ButtonWidget *_gridButton; + + void addChooserButtons(); + GUI::ButtonWidget *createSwitchButton(const Common::String &name, const char *desc, const char *tooltip, const char *image, uint32 cmd = 0); }; class SaveLoadChooserSimple : public SaveLoadChooserDialog { diff --git a/gui/saveload.cpp b/gui/saveload.cpp index becc3f6b4f..f544f0e6a0 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -83,7 +83,18 @@ int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, con String oldDomain = ConfMan.getActiveDomainName(); ConfMan.setActiveDomain(target); - int ret = _impl->run(target, &(**plugin)); + int ret; + do { + ret = _impl->run(target, &(**plugin)); + + if (ret == kSwitchToList) { + delete _impl; + _impl = new SaveLoadChooserSimple(_title, _buttonLabel, _saveMode); + } else if (ret == kSwitchToGrid) { + delete _impl; + _impl = new LoadChooserThumbnailed(_title); + } + } while (ret < -1); // Revert to the old active domain ConfMan.setActiveDomain(oldDomain); diff --git a/gui/themes/default.inc b/gui/themes/default.inc index 86d0061e1b..331289ddf7 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -619,6 +619,7 @@ " " " " " " +" " " " " " " " @@ -1362,6 +1363,14 @@ " " " " " " +" " +" " " " " " " " " " +" " " " " " " " @@ -2305,6 +2315,14 @@ "/> " " " " " +" " +" " " " " + @@ -804,6 +805,14 @@ /> + + + @@ -807,6 +808,14 @@ + + + + diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx index 087a844a1b..30f8f3c323 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -38,6 +38,7 @@ + @@ -818,6 +819,14 @@ /> + + + @@ -806,6 +807,14 @@ + + container); + delete i->container; removeWidget(i->button); + delete i->button; removeWidget(i->description); + delete i->description; } _buttons.clear(); -- cgit v1.2.3 From e2056bdfd93ba247c819ec3fd2f0b487dde05709 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 29 Jun 2012 16:09:28 +0200 Subject: GUI: Remember last save/load chooser selection. --- base/commandLine.cpp | 2 ++ gui/saveload.cpp | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 6fd020cb15..5ad23313dc 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -237,6 +237,8 @@ void registerDefaults() { ConfMan.registerDefault("record_temp_file_name", "record.tmp"); ConfMan.registerDefault("record_time_file_name", "record.time"); + ConfMan.registerDefault("gui_saveload_chooser", "grid"); + } // diff --git a/gui/saveload.cpp b/gui/saveload.cpp index f544f0e6a0..9ae27f31be 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -43,9 +43,12 @@ void SaveLoadChooser::selectChooser(const MetaEngine &engine) { delete _impl; _impl = 0; + Common::String userConfig = ConfMan.get("gui_saveload_chooser", Common::ConfigManager::kApplicationDomain); + if (!_saveMode && g_gui.getWidth() > 320 && g_gui.getHeight() > 200 && engine.hasFeature(MetaEngine::kSavesSupportMetaInfo) - && engine.hasFeature(MetaEngine::kSavesSupportThumbnail)) { + && engine.hasFeature(MetaEngine::kSavesSupportThumbnail) + && userConfig.equalsIgnoreCase("grid")) { _impl = new LoadChooserThumbnailed(_title); } else { _impl = new SaveLoadChooserSimple(_title, _buttonLabel, _saveMode); @@ -90,9 +93,11 @@ int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, con if (ret == kSwitchToList) { delete _impl; _impl = new SaveLoadChooserSimple(_title, _buttonLabel, _saveMode); + ConfMan.set("gui_saveload_chooser", "list", Common::ConfigManager::kApplicationDomain); } else if (ret == kSwitchToGrid) { delete _impl; _impl = new LoadChooserThumbnailed(_title); + ConfMan.set("gui_saveload_chooser", "grid", Common::ConfigManager::kApplicationDomain); } } while (ret < -1); -- cgit v1.2.3 From c1426f783d91976d221c059c37b606411445d438 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 29 Jun 2012 16:15:46 +0200 Subject: GUI: Use a black rect when no thumbnail is available in the thumbnail load chooser. --- gui/saveload-dialog.cpp | 7 ++++++- gui/widget.cpp | 13 +++++++++++++ gui/widget.h | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 1a6083bf9e..12b34e49fb 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -622,7 +622,12 @@ void LoadChooserThumbnailed::updateSaves() { SaveStateDescriptor desc = _metaEngine->querySaveMetaInfos(_target.c_str(), saveSlot); SlotButton &curButton = _buttons[curNum]; curButton.setVisible(true); - curButton.button->setGfx(desc.getThumbnail()); + const Graphics::Surface *thumbnail = desc.getThumbnail(); + if (thumbnail) { + curButton.button->setGfx(desc.getThumbnail()); + } else { + curButton.button->setGfx(kThumbnailWidth, kThumbnailHeight2, 0, 0, 0); + } curButton.description->setLabel(Common::String::format("%d. %s", saveSlot, desc.getDescription().c_str())); Common::String tooltip(_("Name: ")); diff --git a/gui/widget.cpp b/gui/widget.cpp index 1b68e36ea8..3c26f1135b 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -414,6 +414,19 @@ void PicButtonWidget::setGfx(const Graphics::Surface *gfx) { _gfx->copyFrom(*gfx); } +void PicButtonWidget::setGfx(int w, int h, int r, int g, int b) { + if (w == -1) + w = _w; + if (h == -1) + h = _h; + + const Graphics::PixelFormat &requiredFormat = g_gui.theme()->getPixelFormat(); + + _gfx->free(); + _gfx->create(w, h, requiredFormat); + _gfx->fillRect(Common::Rect(0, 0, w, h), _gfx->format.RGBToColor(r, g, b)); +} + void PicButtonWidget::drawWidget() { g_gui.theme()->drawButton(Common::Rect(_x, _y, _x+_w, _y+_h), "", _state, getFlags()); diff --git a/gui/widget.h b/gui/widget.h index d80b2ad7e2..bcc9a3f6d3 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -222,6 +222,7 @@ public: ~PicButtonWidget(); void setGfx(const Graphics::Surface *gfx); + void setGfx(int w, int h, int r, int g, int b); void useAlpha(int alpha) { _alpha = alpha; } void useThemeTransparency(bool enable) { _transparency = enable; } -- cgit v1.2.3 From 10bfb82d3b7ba31b7b8f57560ff55b010dd7de3e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 29 Jun 2012 16:16:36 +0200 Subject: GUI: Use a slightly bigger vertical spacing in the thumbnail load chooser. --- gui/saveload-dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 12b34e49fb..0a94fede51 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -542,7 +542,7 @@ void LoadChooserThumbnailed::reflowLayout() { const int16 containerHeight = buttonHeight + kLineHeight + containerFrameHeightAdd; const int16 defaultSpacingHorizontal = 4; - const int16 defaultSpacingVertical = 4; + const int16 defaultSpacingVertical = 8; const int16 slotAreaWidth = containerWidth + defaultSpacingHorizontal; const int16 slotAreaHeight = containerHeight + defaultSpacingVertical; -- cgit v1.2.3 From 100ff974cb38304890afa96f43259b55464bd888 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Fri, 29 Jun 2012 22:13:19 +0100 Subject: TOON: Correct mismatched method definition against prototype. Fixes bug #3539018 - "Toon: AmigaOS4 Compiler error in anim.cpp" --- engines/toon/anim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp index 8097b1844d..1c85a8d798 100644 --- a/engines/toon/anim.cpp +++ b/engines/toon/anim.cpp @@ -501,7 +501,7 @@ void AnimationInstance::setAnimation(Animation *animation, bool setRange) { } } -void AnimationInstance::setAnimationRange(int32 rangeStart, int rangeEnd) { +void AnimationInstance::setAnimationRange(int32 rangeStart, int32 rangeEnd) { debugC(5, kDebugAnim, "setAnimationRange(%d, %d)", rangeStart, rangeEnd); _rangeStart = rangeStart; _rangeEnd = rangeEnd; -- cgit v1.2.3 From 4789e0f02665a8cc8cf0b814d65e71d38f88a5f1 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Fri, 29 Jun 2012 23:37:11 +0100 Subject: LURE: Fix engine crash in copy protection screen. Fixes bug #3539031 - "LURE: Crash at Copy Protection Screen". Previously, the code didn't prevent keyboard events with modifiers being used. Since the ascii values for these were outside the 0-9 numeric range, this resulted in an invalid frame number being used and thus the engine aborted at an asertion. --- engines/lure/surface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp index 4d63647af5..7af9d665de 100644 --- a/engines/lure/surface.cpp +++ b/engines/lure/surface.cpp @@ -1349,7 +1349,7 @@ bool CopyProtectionDialog::show() { while (!engine.shouldQuit()) { while (events.pollEvent() && (_charIndex < 4)) { - if (events.type() == Common::EVENT_KEYDOWN) { + if (events.type() == Common::EVENT_KEYDOWN && !(events.event().kbd.flags & Common::KBD_NON_STICKY)) { if ((events.event().kbd.keycode == Common::KEYCODE_BACKSPACE) && (_charIndex > 0)) { // Remove the last number typed --_charIndex; -- cgit v1.2.3 From 7efdf21e85dea6d103bbf8929a585025b79869ca Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 30 Jun 2012 12:18:47 +0100 Subject: I18N: Update Swedish translation from patch #3538686 --- po/se_SE.po | 120 +++++++++++++++++++++++++++--------------------------------- 1 file changed, 54 insertions(+), 66 deletions(-) diff --git a/po/se_SE.po b/po/se_SE.po index a1f9c91b44..fe896842a2 100644 --- a/po/se_SE.po +++ b/po/se_SE.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: ScummVM 1.3.0svn\n" +"Project-Id-Version: ScummVM 1.5.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-06-24 18:06+0100\n" -"PO-Revision-Date: 2011-11-27 19:00+0100\n" +"PO-Revision-Date: 2012-06-28 15:47+0100\n" "Last-Translator: Hampus Flink \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -81,7 +81,6 @@ msgid "Remap keys" msgstr "Ställ in tangenter" #: gui/gui-manager.cpp:129 base/main.cpp:307 -#, fuzzy msgid "Toggle FullScreen" msgstr "Fullskärmsläge" @@ -197,9 +196,8 @@ msgid "Platform:" msgstr "Plattform:" #: gui/launcher.cpp:231 -#, fuzzy msgid "Engine" -msgstr "Undersök" +msgstr "Motor" #: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" @@ -1165,14 +1163,11 @@ msgstr "" "ytterligare assistens." #: engines/dialogs.cpp:228 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." -msgstr "" -"Tyvärr stöder för tillfället inte den här motorn hjälp-funktionen. Var god " -"hänvisa till README-filen för information och instruktioner för att få " -"ytterligare assistens." +msgstr "Spar" #: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 @@ -1233,14 +1228,13 @@ msgstr "" "Se README-filen för detaljer." #: engines/engine.cpp:426 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate load failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Tyvärr stöder för tillfället inte den här motorn hjälp-funktionen. Var god " -"hänvisa till README-filen för information och instruktioner för att få " -"ytterligare assistens." +"Kunde inte ladda spardata (%s)! Hänvisa till README-filen för grundläggande " +"information och instruktioner för ytterligare assistans." #: engines/engine.cpp:439 msgid "" @@ -1259,12 +1253,12 @@ msgstr "Starta #: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" -msgstr "" +msgstr "Använd originalskärmar för spara/ladda" #: 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 "Använder originalskärmarna för spara/ladda istället för ScummVM:s" #: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" @@ -1275,68 +1269,68 @@ msgid "Restore" msgstr "Återställ" #: engines/dreamweb/detection.cpp:57 -#, fuzzy msgid "Use bright palette mode" -msgstr "Övre högra föremålet" +msgstr "Använd ljus palett-läge" #: engines/dreamweb/detection.cpp:58 msgid "Display graphics using the game's bright palette" -msgstr "" +msgstr "Visa grafik med spelets ljusa palett" #: engines/sci/detection.cpp:370 msgid "EGA undithering" msgstr "EGA anti-gitter" #: engines/sci/detection.cpp:371 -#, fuzzy msgid "Enable undithering in EGA games" -msgstr "Aktiverar anti-gitter i EGA spel som stöder det" +msgstr "Aktivera anti-gitter i EGA-spel" #: engines/sci/detection.cpp:380 -#, fuzzy msgid "Prefer digital sound effects" -msgstr "Volym för specialeffekter" +msgstr "Föredra digitala ljudeffekter" #: engines/sci/detection.cpp:381 msgid "Prefer digital sound effects instead of synthesized ones" -msgstr "" +msgstr "Föredra digitala ljudeffekter istället för syntetiserade" #: engines/sci/detection.cpp:400 msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "" +msgstr "Använd IMF/Yahama FB-01 för MIDI-uppspelning" #: engines/sci/detection.cpp:401 msgid "" "Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " "output" msgstr "" +"Använd ett IMB Music Feature-kort eller en Yamaha FB-01 FM synthmodul för " +"MIDI-uppspelning" #: engines/sci/detection.cpp:411 msgid "Use CD audio" -msgstr "" +msgstr "Använd CD-ljud" #: engines/sci/detection.cpp:412 msgid "Use CD audio instead of in-game audio, if available" -msgstr "" +msgstr "Använd CD-ljud istället för spelets ljud, om tillgängligt" #: engines/sci/detection.cpp:422 msgid "Use Windows cursors" -msgstr "" +msgstr "Använd Windows muspekare" #: engines/sci/detection.cpp:423 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" +"Använd Windows muspekare (mindre och svartvit) istället för DOS-pekaren" #: engines/sci/detection.cpp:433 -#, fuzzy msgid "Use silver cursors" -msgstr "Vanlig pekare" +msgstr "Använd silverpekare" #: engines/sci/detection.cpp:434 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" +"Använd de alternativa silverpekarna istället för de normala guldpekarna" #: engines/scumm/dialogs.cpp:175 #, c-format @@ -1454,24 +1448,23 @@ msgstr "Tal & text" #: engines/scumm/dialogs.cpp:653 msgid "Select a Proficiency Level." -msgstr "" +msgstr "Välj en skicklighetsnivå." #: engines/scumm/dialogs.cpp:655 msgid "Refer to your Loom(TM) manual for help." -msgstr "" +msgstr "Hänvisa till din Loom(TM)-manual för hjälp." #: engines/scumm/dialogs.cpp:658 -#, fuzzy msgid "Standard" -msgstr "Standard (16 bpp)" +msgstr "Standard" #: engines/scumm/dialogs.cpp:659 msgid "Practice" -msgstr "" +msgstr "Övning" #: engines/scumm/dialogs.cpp:660 msgid "Expert" -msgstr "" +msgstr "Expert" #: engines/scumm/help.cpp:73 msgid "Common keyboard commands:" @@ -2002,7 +1995,7 @@ msgid "" "\n" "%s" msgstr "" -"Kunde inte skriva spardata till file:\n" +"Kunde inte skriva spardata till filen:\n" "\n" "%s" @@ -2013,7 +2006,7 @@ msgid "" "\n" "%s" msgstr "" -"Kunde inte läsa spardata från file:\n" +"Kunde inte läsa spardata från filen:\n" "\n" "%s" @@ -2024,7 +2017,7 @@ msgid "" "\n" "%s" msgstr "" -"Sparade framgångsrikt spardata i file\n" +"Sparade framgångsrikt spardata i filen:\n" "\n" "%s" @@ -2090,61 +2083,59 @@ msgstr "Kunde inte spara spelet." #. Malcolm makes a joke. #: engines/kyra/detection.cpp:62 msgid "Studio audience" -msgstr "" +msgstr "Studiopublik" #: engines/kyra/detection.cpp:63 msgid "Enable studio audience" -msgstr "" +msgstr "Aktivera studiopublik" #. I18N: This option allows the user to skip text and cutscenes. #: engines/kyra/detection.cpp:73 msgid "Skip support" -msgstr "" +msgstr "Skipp-stöd" #: engines/kyra/detection.cpp:74 msgid "Allow text and cutscenes to be skipped" -msgstr "" +msgstr "Tillåter skippning av text och filmscener" #. I18N: Helium mode makes people sound like they've inhaled Helium. #: engines/kyra/detection.cpp:84 msgid "Helium mode" -msgstr "" +msgstr "Helium-läge" #: engines/kyra/detection.cpp:85 -#, fuzzy msgid "Enable helium mode" -msgstr "Aktivera Roland GS-läge" +msgstr "Aktivera heliumläge" #. 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 "Mjuk rullning" #: engines/kyra/detection.cpp:100 msgid "Enable smooth scrolling when walking" -msgstr "" +msgstr "Aktivera mjuk skärmrullning vid gångfart" #. 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 "Vanlig pekare" +msgstr "Flytande pekare" #: engines/kyra/detection.cpp:113 msgid "Enable floating cursors" -msgstr "" +msgstr "Aktivera flytande pekare" #. I18N: HP stands for Hit Points #: engines/kyra/detection.cpp:127 msgid "HP bar graphs" -msgstr "" +msgstr "Livmätare" #: engines/kyra/detection.cpp:128 msgid "Enable hit point bar graphs" -msgstr "" +msgstr "Aktivera livmätare" #: engines/kyra/lol.cpp:478 msgid "Attack 1" @@ -2210,11 +2201,11 @@ msgstr "" #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" -msgstr "" +msgstr "Diskettintro" #: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" -msgstr "" +msgstr "Använd diskettversionens intro (endast CD-version)" #: engines/sky/compact.cpp:130 msgid "" @@ -2235,7 +2226,7 @@ msgstr "" #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" -msgstr "" +msgstr "PSX-filmscenen '%s' kan inte visas i palettläget" #: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 msgid "DXA cutscenes found but ScummVM has been built without zlib support" @@ -2290,18 +2281,17 @@ msgid "This is the end of the Broken Sword 1 Demo" msgstr "Här slutar Broken Sword 1 demon" #: engines/sword2/animation.cpp:435 -#, fuzzy msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" -msgstr "DXA filmscener hittades men ScummVM har byggts utan stöd för zlib" +msgstr "PSX-filmscener hittades men ScummVM har byggts utan stöd för RGB-färg" #: engines/sword2/sword2.cpp:79 msgid "Show object labels" -msgstr "" +msgstr "Visa etiketter" #: engines/sword2/sword2.cpp:80 msgid "Show labels for objects on mouse hover" -msgstr "" +msgstr "Visar etiketter för objekten som musen pekar på" #: engines/parallaction/saveload.cpp:133 #, c-format @@ -2443,9 +2433,8 @@ msgid "Keymap:" msgstr "Tangenter:" #: backends/keymapper/remap-dialog.cpp:66 -#, fuzzy msgid " (Effective)" -msgstr "(Aktiv)" +msgstr "(Effektiv)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Active)" @@ -2453,7 +2442,7 @@ msgstr "(Aktiv)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Blocked)" -msgstr "" +msgstr "(Blockerad)" #: backends/keymapper/remap-dialog.cpp:119 msgid " (Global)" @@ -2557,7 +2546,7 @@ msgstr "Touchpad-l #: backends/platform/maemo/maemo.cpp:205 msgid "Click Mode" -msgstr "" +msgstr "Klickläge" #: backends/platform/maemo/maemo.cpp:211 #: backends/platform/symbian/src/SymbianActions.cpp:42 @@ -2568,9 +2557,8 @@ msgid "Left Click" msgstr "Vänsterklick" #: backends/platform/maemo/maemo.cpp:214 -#, fuzzy msgid "Middle Click" -msgstr "Mellersta vänstra föremålet" +msgstr "Mittenklick" #: backends/platform/maemo/maemo.cpp:217 #: backends/platform/symbian/src/SymbianActions.cpp:43 -- cgit v1.2.3 From 5bbac72839c82d49863cda0508e44606eeb13ba3 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 30 Jun 2012 12:19:54 +0100 Subject: I18N: Update Italian translation The update was sent by Matteo by email. --- po/it_IT.po | 157 ++++++++++++++++++++++++++++-------------------------------- 1 file changed, 72 insertions(+), 85 deletions(-) diff --git a/po/it_IT.po b/po/it_IT.po index dc33811e28..26bf3773f9 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-06-24 18:06+0100\n" -"PO-Revision-Date: 2011-10-08 17:29+0100\n" +"PO-Revision-Date: 2012-06-29 14:33+0100\n" "Last-Translator: Matteo 'Maff' Angelino \n" "Language-Team: Italian\n" "MIME-Version: 1.0\n" @@ -77,7 +77,6 @@ msgid "Remap keys" msgstr "Riprogramma tasti" #: gui/gui-manager.cpp:129 base/main.cpp:307 -#, fuzzy msgid "Toggle FullScreen" msgstr "Attiva / disattiva schermo intero" @@ -192,9 +191,8 @@ msgid "Platform:" msgstr "Piattaf.:" #: gui/launcher.cpp:231 -#, fuzzy msgid "Engine" -msgstr "Esamina" +msgstr "Motore" #: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" @@ -1165,14 +1163,14 @@ msgstr "" "per le istruzioni su come ottenere ulteriore assistenza." #: engines/dialogs.cpp:228 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Siamo spiacenti, ma l'attuale motore non prevede aiuto all'interno del " -"gioco. Si prega di consultare il file README per le informazioni di base e " -"per le istruzioni su come ottenere ulteriore assistenza." +"Salvataggio fallito (%s)! Si prega di consultare il file README per le " +"informazioni di base e per le istruzioni su come ottenere ulteriore " +"assistenza." #: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 @@ -1233,14 +1231,14 @@ msgstr "" "Vedi il file README per i dettagli." #: engines/engine.cpp:426 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate load failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Siamo spiacenti, ma l'attuale motore non prevede aiuto all'interno del " -"gioco. Si prega di consultare il file README per le informazioni di base e " -"per le istruzioni su come ottenere ulteriore assistenza." +"Caricamento salvataggio fallito (%s)! Si prega di consultare il file README " +"per le informazioni di base e per le istruzioni su come ottenere ulteriore " +"assistenza." #: engines/engine.cpp:439 msgid "" @@ -1259,12 +1257,14 @@ msgstr "Avvia comunque" #: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" -msgstr "" +msgstr "Usa schermate di salvataggio originali" #: 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 "" +"Usa le schermate originali di salvataggio e caricamento, al posto di quelle " +"di ScummVM" #: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" @@ -1275,68 +1275,69 @@ msgid "Restore" msgstr "Ripristina" #: engines/dreamweb/detection.cpp:57 -#, fuzzy msgid "Use bright palette mode" -msgstr "Oggetto in alto a destra" +msgstr "Usa modalità colori brillanti" #: engines/dreamweb/detection.cpp:58 msgid "Display graphics using the game's bright palette" -msgstr "" +msgstr "Visualizza la grafica con i colori brillanti del gioco" #: engines/sci/detection.cpp:370 msgid "EGA undithering" msgstr "Undithering EGA" #: engines/sci/detection.cpp:371 -#, fuzzy msgid "Enable undithering in EGA games" -msgstr "Attiva undithering nei giochi EGA che lo supportano" +msgstr "Attiva undithering nei giochi EGA" #: engines/sci/detection.cpp:380 -#, fuzzy msgid "Prefer digital sound effects" -msgstr "Volume degli effetti sonori" +msgstr "Scegli effetti sonori digitali" #: engines/sci/detection.cpp:381 msgid "Prefer digital sound effects instead of synthesized ones" -msgstr "" +msgstr "Scegli gli effetti sonori digitali al posto di quelli sintetizzati" #: engines/sci/detection.cpp:400 msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "" +msgstr "Usa IMF/Yahama FB-01 per output 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 "" +"Usa una scheda IBM Music Feature o un modulo synth Yamaha FB-01 FM per " +"l'output MIDI" #: engines/sci/detection.cpp:411 msgid "Use CD audio" -msgstr "" +msgstr "Usa audio da CD" #: engines/sci/detection.cpp:412 msgid "Use CD audio instead of in-game audio, if available" msgstr "" +"Usa l'audio da CD al posto di quello incorporato nel gioco, se disponibile" #: engines/sci/detection.cpp:422 msgid "Use Windows cursors" -msgstr "" +msgstr "Usa cursori di Windows" #: engines/sci/detection.cpp:423 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" +"Usa i cursori di Windows (più piccoli e monocromatici) al posto di quelli DOS" #: engines/sci/detection.cpp:433 -#, fuzzy msgid "Use silver cursors" -msgstr "Cursore normale" +msgstr "Usa cursori d'argento" #: engines/sci/detection.cpp:434 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" +"Usa il set alternativo di cursori d'argento al posto di quelli normali d'oro" #: engines/scumm/dialogs.cpp:175 #, c-format @@ -1362,12 +1363,12 @@ msgstr "Gioco in pausa. Premere SPAZIO per continuare." #. Will react to J as 'Yes' #: engines/scumm/dialogs.cpp:182 msgid "Are you sure you want to restart? (Y/N)" -msgstr "Sei sicuro di voler riavviare? (Y/N)" +msgstr "Sei sicuro di voler riavviare? (S/N)S" #. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment #: engines/scumm/dialogs.cpp:184 msgid "Are you sure you want to quit? (Y/N)" -msgstr "Sei sicuro di voler uscire? (Y/N)" +msgstr "Sei sicuro di voler uscire? (S/N)S" #: engines/scumm/dialogs.cpp:189 msgid "Play" @@ -2090,115 +2091,107 @@ msgstr "Impossibile salvare il gioco" #. Malcolm makes a joke. #: engines/kyra/detection.cpp:62 msgid "Studio audience" -msgstr "" +msgstr "Reazioni del pubblico" #: engines/kyra/detection.cpp:63 msgid "Enable studio audience" -msgstr "" +msgstr "Attiva le reazioni del pubblico" #. I18N: This option allows the user to skip text and cutscenes. #: engines/kyra/detection.cpp:73 msgid "Skip support" -msgstr "" +msgstr "Interruzione del parlato" #: engines/kyra/detection.cpp:74 msgid "Allow text and cutscenes to be skipped" -msgstr "" +msgstr "Permette di saltare i dialoghi e le scene di intermezzo" #. I18N: Helium mode makes people sound like they've inhaled Helium. #: engines/kyra/detection.cpp:84 msgid "Helium mode" -msgstr "" +msgstr "Modalità elio" #: engines/kyra/detection.cpp:85 -#, fuzzy msgid "Enable helium mode" -msgstr "Attiva la modalità Roland GS" +msgstr "Attiva la modalità elio" #. 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 "Scorrimento morbido" #: engines/kyra/detection.cpp:100 msgid "Enable smooth scrolling when walking" -msgstr "" +msgstr "Attiva lo scorrimento morbido durante gli spostamenti" #. 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 "Cursore normale" +msgstr "Cursori fluttuanti" #: engines/kyra/detection.cpp:113 msgid "Enable floating cursors" -msgstr "" +msgstr "Attiva cursori fluttuanti" #. I18N: HP stands for Hit Points #: engines/kyra/detection.cpp:127 msgid "HP bar graphs" -msgstr "" +msgstr "Barre HP" #: engines/kyra/detection.cpp:128 msgid "Enable hit point bar graphs" -msgstr "" +msgstr "Attiva le barre di Hit Point" #: engines/kyra/lol.cpp:478 msgid "Attack 1" -msgstr "" +msgstr "Attacco 1" #: engines/kyra/lol.cpp:479 msgid "Attack 2" -msgstr "" +msgstr "Attacco 2" #: engines/kyra/lol.cpp:480 msgid "Attack 3" -msgstr "" +msgstr "Attacco 3" #: engines/kyra/lol.cpp:481 msgid "Move Forward" -msgstr "" +msgstr "Vai avanti" #: engines/kyra/lol.cpp:482 msgid "Move Back" -msgstr "" +msgstr "Vai indietro" #: engines/kyra/lol.cpp:483 msgid "Slide Left" -msgstr "" +msgstr "Scorri a sinistra" #: engines/kyra/lol.cpp:484 -#, fuzzy msgid "Slide Right" -msgstr "Destra" +msgstr "Scorri a destra" #: engines/kyra/lol.cpp:485 -#, fuzzy msgid "Turn Left" -msgstr "Spegni" +msgstr "Gira a sinistra" #: engines/kyra/lol.cpp:486 -#, fuzzy msgid "Turn Right" -msgstr "Cursore a destra" +msgstr "Gira a destra" #: engines/kyra/lol.cpp:487 -#, fuzzy msgid "Rest" -msgstr "Ripristina" +msgstr "Riposa" #: engines/kyra/lol.cpp:488 -#, fuzzy msgid "Options" -msgstr "~O~pzioni" +msgstr "Opzioni" #: engines/kyra/lol.cpp:489 -#, fuzzy msgid "Choose Spell" -msgstr "Scegli" +msgstr "Scegli incantesimo" #: engines/kyra/sound_midi.cpp:475 msgid "" @@ -2216,11 +2209,11 @@ msgstr "" #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" -msgstr "" +msgstr "Intro floppy" #: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" -msgstr "" +msgstr "Usa la versione floppy dell'intro (solo versione CD)" #: engines/sky/compact.cpp:130 msgid "" @@ -2242,6 +2235,7 @@ msgstr "" #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" msgstr "" +"La scena PSX di intermezzo '%s' non può essere eseguita in modalità tavolozza" #: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 msgid "DXA cutscenes found but ScummVM has been built without zlib support" @@ -2298,20 +2292,19 @@ msgid "This is the end of the Broken Sword 1 Demo" msgstr "Questa è la fine della demo di Broken Sword 1" #: engines/sword2/animation.cpp:435 -#, fuzzy msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" -"Sono state trovare scene di intermezzo DXA ma ScummVM è stato compilato " -"senza il supporto zlib" +"Sono state trovare scene di intermezzo PSX ma ScummVM è stato compilato " +"senza il supporto colori RGB" #: engines/sword2/sword2.cpp:79 msgid "Show object labels" -msgstr "" +msgstr "Mostra etichette oggetti" #: engines/sword2/sword2.cpp:80 msgid "Show labels for objects on mouse hover" -msgstr "" +msgstr "Mostra etichette per gli oggetti al passaggio del mouse" #: engines/parallaction/saveload.cpp:133 #, c-format @@ -2453,9 +2446,8 @@ msgid "Keymap:" msgstr "Mappa tasti:" #: backends/keymapper/remap-dialog.cpp:66 -#, fuzzy msgid " (Effective)" -msgstr " (Attivo)" +msgstr " (Efficace)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Active)" @@ -2463,7 +2455,7 @@ msgstr " (Attivo)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Blocked)" -msgstr "" +msgstr " (Bloccato)" #: backends/keymapper/remap-dialog.cpp:119 msgid " (Global)" @@ -2567,7 +2559,7 @@ msgstr "Modalit #: backends/platform/maemo/maemo.cpp:205 msgid "Click Mode" -msgstr "" +msgstr "Modalità clic" #: backends/platform/maemo/maemo.cpp:211 #: backends/platform/symbian/src/SymbianActions.cpp:42 @@ -2578,9 +2570,8 @@ msgid "Left Click" msgstr "Clic sinistro" #: backends/platform/maemo/maemo.cpp:214 -#, fuzzy msgid "Middle Click" -msgstr "Oggetto al centro a sinistra" +msgstr "Clic centrale" #: backends/platform/maemo/maemo.cpp:217 #: backends/platform/symbian/src/SymbianActions.cpp:43 @@ -3025,40 +3016,36 @@ msgid "Check for Updates..." msgstr "Cerca aggiornamenti..." #: backends/platform/bada/form.cpp:269 -#, fuzzy msgid "Right Click Once" -msgstr "Clic destro" +msgstr "Un clic destro" #: backends/platform/bada/form.cpp:277 -#, fuzzy msgid "Move Only" -msgstr "Solo voci" +msgstr "Muovi soltanto" #: backends/platform/bada/form.cpp:291 msgid "Escape Key" -msgstr "" +msgstr "Tasto Esc" #: backends/platform/bada/form.cpp:296 -#, fuzzy msgid "Game Menu" -msgstr "Gioco" +msgstr "Menu di gioco" #: backends/platform/bada/form.cpp:301 -#, fuzzy msgid "Show Keypad" -msgstr "Mostra tastiera" +msgstr "Mostra tastierino numerico" #: backends/platform/bada/form.cpp:309 msgid "Control Mouse" -msgstr "" +msgstr "Controllo mouse" #: backends/events/maemosdl/maemosdl-events.cpp:192 msgid "Clicking Enabled" -msgstr "" +msgstr "Clic attivato" #: backends/events/maemosdl/maemosdl-events.cpp:192 msgid "Clicking Disabled" -msgstr "" +msgstr "Clic disattivato" #~ msgid "Hercules Green" #~ msgstr "Hercules verde" -- cgit v1.2.3 From 33c67caed16e0f99677fe0f4938660800e021a64 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 30 Jun 2012 12:20:17 +0100 Subject: I18N: Regenerate translation data file --- gui/themes/translations.dat | Bin 318276 -> 322471 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 12ad3d4352..c2e8339701 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 335ba979a2e3aab9c1856bf84a18b60ab91de687 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 30 Jun 2012 20:47:29 +0100 Subject: LURE: Fix engine crash in copy protection screen with AZERTY keyboard Fixes bug #3539031 - "LURE: Crash at Copy Protection Screen". This reverts the previous fix which only worked for QWERTY keyboards and made the issue worse for AZERTY keyboards. It now uses the ASCII code instead of the keycode for the sanity check. --- engines/lure/surface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp index 7af9d665de..0f13d87fbc 100644 --- a/engines/lure/surface.cpp +++ b/engines/lure/surface.cpp @@ -1349,7 +1349,7 @@ bool CopyProtectionDialog::show() { while (!engine.shouldQuit()) { while (events.pollEvent() && (_charIndex < 4)) { - if (events.type() == Common::EVENT_KEYDOWN && !(events.event().kbd.flags & Common::KBD_NON_STICKY)) { + if (events.type() == Common::EVENT_KEYDOWN) { if ((events.event().kbd.keycode == Common::KEYCODE_BACKSPACE) && (_charIndex > 0)) { // Remove the last number typed --_charIndex; @@ -1360,8 +1360,8 @@ bool CopyProtectionDialog::show() { (*tmpHotspot)->copyTo(&screen.screen()); screen.update(); - } else if ((events.event().kbd.keycode >= Common::KEYCODE_0) && - (events.event().kbd.keycode <= Common::KEYCODE_9)) { + } else if ((events.event().kbd.ascii >= '0') && + (events.event().kbd.ascii <= '9')) { HotspotsList::iterator tmpHotspot = _hotspots.begin(); for (int i = 0; i < _charIndex + 3; i++) ++tmpHotspot; -- cgit v1.2.3 From c19df60092bac7fde7e492dbf9b5002a17f935c8 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 1 Jul 2012 00:40:07 +0100 Subject: I18N: Update German translation One of the string was left untranslated in the last update. This adds the translation for that string (provided by Lightkey). --- gui/themes/translations.dat | Bin 322471 -> 322629 bytes po/de_DE.po | 2 ++ 2 files changed, 2 insertions(+) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index c2e8339701..4812633011 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ diff --git a/po/de_DE.po b/po/de_DE.po index 3d9a0ca38c..d68dcb2d8e 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -931,6 +931,8 @@ msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." msgstr "" +"Das ausgewählte Thema unterstützt nicht die aktuelle Sprache. Wenn Sie dieses " +"Thema benutzen wollen, müssen Sie erst zu einer anderen Sprache wechseln." #: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" -- cgit v1.2.3 From 50136f43c7de4889444d9de19ff5d99f2cc04bf7 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 1 Jul 2012 01:03:49 +0100 Subject: COMMON: Expand a bit the KeyState documentation This follows a bug that was found in the Lure engine where keycode was used in a place where it should have used ascii. --- common/keyboard.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/keyboard.h b/common/keyboard.h index e6db086598..f9e94e6656 100644 --- a/common/keyboard.h +++ b/common/keyboard.h @@ -248,7 +248,10 @@ struct KeyState { * ASCII-value of the pressed key (if any). * This depends on modifiers, i.e. pressing the 'A' key results in * different values here depending on the status of shift, alt and - * caps lock. + * caps lock. This should be used rather than keycode for text input + * to avoid keyboard layout issues. For example you cannot assume that + * KEYCODE_0 without a modifier will be '0' (on AZERTY keyboards it is + * not). */ uint16 ascii; -- cgit v1.2.3 From d335b78003f3d28d1c9c9aeddf6a46ad1c5f4888 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 1 Jul 2012 06:20:53 +0100 Subject: DREAMWEB: Fix minor regression with Ryan's watch. Using Ryan's watch within the game, the watch time always started at 19.30 from point of use, which did not seem correct. Checking with the original CD and Floppy interpreters under DOSBox showed they used the current system time, so this was incorrect. Bisection shows that this regression was introduced by commit 57e940f67896e0f085de23088754fe1682cd49db i.e. "DREAMWEB: Move all saved variables to a GameVars struct" and was probably a side effect of a minor call ordering change in the equivalent of setupInitialVars() with respect to the getTime() call. However, to ensure no further regressions, it was easier to fix this by replacing the initial value setting by a getTime() call. --- engines/dreamweb/stubs.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 4515939ebc..f235f7c2fd 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -2920,9 +2920,7 @@ void DreamWebEngine::setupInitialVars() { _vars._progressPoints = 0; _vars._watchOn = 0; _vars._shadesOn = 0; - _vars._secondCount = 0; - _vars._minuteCount = 30; - _vars._hourCount = 19; + getTime(); _vars._zoomOn = 1; _vars._location = 0; _vars._exPos = 0; -- cgit v1.2.3 From 1c389e55105d40468ff9415a3d2b3ca31ef602b8 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 1 Jul 2012 15:43:20 +0200 Subject: GUI: Only use grid load dialog for 640x400 or bigger. Formerly it was enabled for everything above 320x200, but resolutions below 640x400 feature not enough space. --- gui/saveload.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 9ae27f31be..9cc8935f03 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -45,7 +45,7 @@ void SaveLoadChooser::selectChooser(const MetaEngine &engine) { Common::String userConfig = ConfMan.get("gui_saveload_chooser", Common::ConfigManager::kApplicationDomain); - if (!_saveMode && g_gui.getWidth() > 320 && g_gui.getHeight() > 200 + if (!_saveMode && g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400 && engine.hasFeature(MetaEngine::kSavesSupportMetaInfo) && engine.hasFeature(MetaEngine::kSavesSupportThumbnail) && userConfig.equalsIgnoreCase("grid")) { -- cgit v1.2.3 From 236db5ed87acf603898243734e2c5273c23568cb Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 1 Jul 2012 15:58:42 +0200 Subject: GUI: Automatically switch to list based save/load chooser when changing resolution below 640x400. --- gui/saveload-dialog.cpp | 41 ++++++++++++++++++++++++++++++++++++++++- gui/saveload-dialog.h | 11 +++++++++++ gui/saveload.cpp | 2 -- 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 0a94fede51..3a778b2fa4 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -21,6 +21,7 @@ #include "gui/saveload-dialog.h" #include "common/translation.h" +#include "common/config-manager.h" #include "gui/message.h" #include "gui/gui-manager.h" @@ -73,11 +74,17 @@ void SaveLoadChooserDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd switch (cmd) { case kListSwitchCmd: setResult(kSwitchToList); + // We save the requested dialog type here to avoid the setting to be + // overwritten when our reflowLayout logic selects a different dialog + // type. + ConfMan.set("gui_saveload_chooser", "list", Common::ConfigManager::kApplicationDomain); close(); break; case kGridSwitchCmd: setResult(kSwitchToGrid); + // See above. + ConfMan.set("gui_saveload_chooser", "grid", Common::ConfigManager::kApplicationDomain); close(); break; @@ -101,13 +108,45 @@ void SaveLoadChooserDialog::addChooserButtons() { _listButton = createSwitchButton("SaveLoadChooser.ListSwitch", "L", _("List view"), ThemeEngine::kImageList, kListSwitchCmd); _gridButton = createSwitchButton("SaveLoadChooser.GridSwitch", "G", _("Grid view"), ThemeEngine::kImageGrid, kGridSwitchCmd); - if (!_metaInfoSupport || !_thumbnailSupport || _saveMode) + if (!_metaInfoSupport || !_thumbnailSupport || _saveMode || !(g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400)) _gridButton->setEnabled(false); } void SaveLoadChooserDialog::reflowLayout() { addChooserButtons(); + const SaveLoadChooserType currentType = getType(); + SaveLoadChooserType requestedType; + + const Common::String &userConfig = ConfMan.get("gui_saveload_chooser", Common::ConfigManager::kApplicationDomain); + if (!_saveMode && g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400 + && _metaEngine->hasFeature(MetaEngine::kSavesSupportMetaInfo) + && _metaEngine->hasFeature(MetaEngine::kSavesSupportThumbnail) + && userConfig.equalsIgnoreCase("grid")) { + // In case we are 640x400 or higher, this dialog is not in save mode, + // the user requested the grid dialog and the engines supports it we + // try to set it up. + requestedType = kSaveLoadDialogGrid; + } else { + // In all other cases we want to use the list dialog. + requestedType = kSaveLoadDialogList; + } + + // Change the dialog type if there is any need for it. + if (requestedType != currentType) { + switch (requestedType) { + case kSaveLoadDialogGrid: + setResult(kSwitchToGrid); + break; + + case kSaveLoadDialogList: + setResult(kSwitchToList); + break; + } + + close(); + } + Dialog::reflowLayout(); } diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h index 7921f5798a..75b1dc41e0 100644 --- a/gui/saveload-dialog.h +++ b/gui/saveload-dialog.h @@ -32,6 +32,11 @@ namespace GUI { #define kSwitchToList -2 #define kSwitchToGrid -3 +enum SaveLoadChooserType { + kSaveLoadDialogList = 0, + kSaveLoadDialogGrid = 1 +}; + class SaveLoadChooserDialog : protected Dialog { public: SaveLoadChooserDialog(const Common::String &dialogName, const bool saveMode); @@ -43,6 +48,8 @@ public: virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); + virtual SaveLoadChooserType getType() const = 0; + int run(const Common::String &target, const MetaEngine *metaEngine); virtual const Common::String &getResultString() const = 0; @@ -77,6 +84,8 @@ public: virtual void reflowLayout(); + virtual SaveLoadChooserType getType() const { return kSaveLoadDialogList; } + virtual void close(); private: virtual int runIntern(); @@ -109,6 +118,8 @@ public: virtual void reflowLayout(); + virtual SaveLoadChooserType getType() const { return kSaveLoadDialogGrid; } + virtual void close(); protected: virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 9cc8935f03..7f3dd6d5d8 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -93,11 +93,9 @@ int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, con if (ret == kSwitchToList) { delete _impl; _impl = new SaveLoadChooserSimple(_title, _buttonLabel, _saveMode); - ConfMan.set("gui_saveload_chooser", "list", Common::ConfigManager::kApplicationDomain); } else if (ret == kSwitchToGrid) { delete _impl; _impl = new LoadChooserThumbnailed(_title); - ConfMan.set("gui_saveload_chooser", "grid", Common::ConfigManager::kApplicationDomain); } } while (ret < -1); -- cgit v1.2.3 From bd3d5fb8ffed3938c68a723d5c5bfbb6b56fb0ec Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 1 Jul 2012 16:07:48 +0200 Subject: GUI: Clean up save load chooser selection code. --- gui/saveload-dialog.cpp | 47 ++++++++++++++++++++--------------------------- gui/saveload-dialog.h | 5 +++-- gui/saveload.cpp | 30 ++++++++++++++---------------- 3 files changed, 37 insertions(+), 45 deletions(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 3a778b2fa4..dce09aaec8 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -31,6 +31,22 @@ namespace GUI { +SaveLoadChooserType getRequestedSaveLoadDialog(const bool saveMode, const MetaEngine &metaEngine) { + const Common::String &userConfig = ConfMan.get("gui_saveload_chooser", Common::ConfigManager::kApplicationDomain); + if (!saveMode && g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400 + && metaEngine.hasFeature(MetaEngine::kSavesSupportMetaInfo) + && metaEngine.hasFeature(MetaEngine::kSavesSupportThumbnail) + && userConfig.equalsIgnoreCase("grid")) { + // In case we are 640x400 or higher, this dialog is not in save mode, + // the user requested the grid dialog and the engines supports it we + // try to set it up. + return kSaveLoadDialogGrid; + } else { + // In all other cases we want to use the list dialog. + return kSaveLoadDialogList; + } +} + enum { kListSwitchCmd = 'LIST', kGridSwitchCmd = 'GRID' @@ -73,7 +89,7 @@ int SaveLoadChooserDialog::run(const Common::String &target, const MetaEngine *m void SaveLoadChooserDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kListSwitchCmd: - setResult(kSwitchToList); + setResult(kSwitchSaveLoadDialog); // We save the requested dialog type here to avoid the setting to be // overwritten when our reflowLayout logic selects a different dialog // type. @@ -82,7 +98,7 @@ void SaveLoadChooserDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd break; case kGridSwitchCmd: - setResult(kSwitchToGrid); + setResult(kSwitchSaveLoadDialog); // See above. ConfMan.set("gui_saveload_chooser", "grid", Common::ConfigManager::kApplicationDomain); close(); @@ -116,34 +132,11 @@ void SaveLoadChooserDialog::reflowLayout() { addChooserButtons(); const SaveLoadChooserType currentType = getType(); - SaveLoadChooserType requestedType; - - const Common::String &userConfig = ConfMan.get("gui_saveload_chooser", Common::ConfigManager::kApplicationDomain); - if (!_saveMode && g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400 - && _metaEngine->hasFeature(MetaEngine::kSavesSupportMetaInfo) - && _metaEngine->hasFeature(MetaEngine::kSavesSupportThumbnail) - && userConfig.equalsIgnoreCase("grid")) { - // In case we are 640x400 or higher, this dialog is not in save mode, - // the user requested the grid dialog and the engines supports it we - // try to set it up. - requestedType = kSaveLoadDialogGrid; - } else { - // In all other cases we want to use the list dialog. - requestedType = kSaveLoadDialogList; - } + const SaveLoadChooserType requestedType = getRequestedSaveLoadDialog(_saveMode, *_metaEngine); // Change the dialog type if there is any need for it. if (requestedType != currentType) { - switch (requestedType) { - case kSaveLoadDialogGrid: - setResult(kSwitchToGrid); - break; - - case kSaveLoadDialogList: - setResult(kSwitchToList); - break; - } - + setResult(kSwitchSaveLoadDialog); close(); } diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h index 75b1dc41e0..68512ad9a5 100644 --- a/gui/saveload-dialog.h +++ b/gui/saveload-dialog.h @@ -29,14 +29,15 @@ namespace GUI { -#define kSwitchToList -2 -#define kSwitchToGrid -3 +#define kSwitchSaveLoadDialog -2 enum SaveLoadChooserType { kSaveLoadDialogList = 0, kSaveLoadDialogGrid = 1 }; +SaveLoadChooserType getRequestedSaveLoadDialog(const bool saveMode, const MetaEngine &metaEngine); + class SaveLoadChooserDialog : protected Dialog { public: SaveLoadChooserDialog(const Common::String &dialogName, const bool saveMode); diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 7f3dd6d5d8..12e62122fe 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -40,18 +40,20 @@ SaveLoadChooser::~SaveLoadChooser() { } void SaveLoadChooser::selectChooser(const MetaEngine &engine) { - delete _impl; - _impl = 0; + const SaveLoadChooserType requestedType = getRequestedSaveLoadDialog(_saveMode, engine); + if (!_impl || _impl->getType() != requestedType) { + delete _impl; + _impl = 0; - Common::String userConfig = ConfMan.get("gui_saveload_chooser", Common::ConfigManager::kApplicationDomain); + switch (requestedType) { + case kSaveLoadDialogGrid: + _impl = new LoadChooserThumbnailed(_title); + break; - if (!_saveMode && g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400 - && engine.hasFeature(MetaEngine::kSavesSupportMetaInfo) - && engine.hasFeature(MetaEngine::kSavesSupportThumbnail) - && userConfig.equalsIgnoreCase("grid")) { - _impl = new LoadChooserThumbnailed(_title); - } else { - _impl = new SaveLoadChooserSimple(_title, _buttonLabel, _saveMode); + case kSaveLoadDialogList: + _impl = new SaveLoadChooserSimple(_title, _buttonLabel, _saveMode); + break; + } } } @@ -90,12 +92,8 @@ int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, con do { ret = _impl->run(target, &(**plugin)); - if (ret == kSwitchToList) { - delete _impl; - _impl = new SaveLoadChooserSimple(_title, _buttonLabel, _saveMode); - } else if (ret == kSwitchToGrid) { - delete _impl; - _impl = new LoadChooserThumbnailed(_title); + if (ret == kSwitchSaveLoadDialog) { + selectChooser(**plugin); } } while (ret < -1); -- cgit v1.2.3 From 3256081b2b1c604b1367ba3b5fc3fea8bd76d842 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 1 Jul 2012 16:47:40 +0200 Subject: GUI: Add page display to grid based load chooser. --- gui/ThemeEngine.h | 2 +- gui/saveload-dialog.cpp | 12 ++++++++++++ gui/saveload-dialog.h | 2 ++ gui/themes/default.inc | 9 +++++++++ gui/themes/scummclassic.zip | Bin 93928 -> 94215 bytes gui/themes/scummclassic/THEMERC | 2 +- gui/themes/scummclassic/classic_layout.stx | 15 ++++++++++++--- gui/themes/scummclassic/classic_layout_lowres.stx | 2 ++ gui/themes/scummmodern.zip | Bin 1452236 -> 1452523 bytes gui/themes/scummmodern/THEMERC | 2 +- gui/themes/scummmodern/scummmodern_layout.stx | 15 ++++++++++++--- .../scummmodern/scummmodern_layout_lowres.stx | 2 ++ 12 files changed, 54 insertions(+), 9 deletions(-) diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index cd388b7f65..de4a92be16 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -35,7 +35,7 @@ #include "graphics/pixelformat.h" -#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.14" +#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.15" class OSystem; diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index dce09aaec8..3d542b1dc8 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -496,6 +496,10 @@ LoadChooserThumbnailed::LoadChooserThumbnailed(const Common::String &title) _prevButton = new GUI::ButtonWidget(this, "SaveLoadChooser.Cancel", _("Prev"), 0, kPrevCmd); _prevButton->setEnabled(false); + + // Page display + _pageDisplay = new GUI::StaticTextWidget(this, "SaveLoadChooser.PageDisplay", Common::String()); + _pageDisplay->setAlign(Graphics::kTextAlignRight); } const Common::String &LoadChooserThumbnailed::getResultString() const { @@ -555,6 +559,11 @@ void LoadChooserThumbnailed::open() { } void LoadChooserThumbnailed::reflowLayout() { + removeWidget(_pageDisplay); + if (g_gui.xmlEval()->getVar("Globals.ShowChooserPageDisplay") == 1) { + _pageDisplay->init(); + } + SaveLoadChooserDialog::reflowLayout(); destroyButtons(); @@ -690,6 +699,9 @@ void LoadChooserThumbnailed::updateSaves() { curButton.button->setTooltip(tooltip); } + const uint numPages = _saveList.size() / _entriesPerPage + 1; + _pageDisplay->setLabel(Common::String::format("%u/%u", _curPage + 1, numPages)); + if (_curPage > 0) _prevButton->setEnabled(true); else diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h index 68512ad9a5..63dbf4182e 100644 --- a/gui/saveload-dialog.h +++ b/gui/saveload-dialog.h @@ -136,6 +136,8 @@ private: GUI::ButtonWidget *_nextButton; GUI::ButtonWidget *_prevButton; + GUI::StaticTextWidget *_pageDisplay; + struct SlotButton { SlotButton() : container(0), button(0), description(0) {} SlotButton(ContainerWidget *c, PicButtonWidget *b, StaticTextWidget *d) : container(c), button(b), description(d) {} diff --git a/gui/themes/default.inc b/gui/themes/default.inc index 331289ddf7..dc8d5c1a0e 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -620,6 +620,7 @@ " " " " " " +" " " " " " " " @@ -1574,6 +1575,7 @@ " " " " " " +" " " " " " " " @@ -2304,9 +2306,16 @@ " " " " " " +" " " " +" " +" " +" " " " " " " + + @@ -794,9 +796,16 @@ - + + + + + + + diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip index 977a6960e6..a861e8e0df 100644 Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ diff --git a/gui/themes/scummmodern/THEMERC b/gui/themes/scummmodern/THEMERC index e9a2d542c4..c4381c2061 100644 --- a/gui/themes/scummmodern/THEMERC +++ b/gui/themes/scummmodern/THEMERC @@ -1 +1 @@ -[SCUMMVM_STX0.8.14:ScummVM Modern Theme:No Author] +[SCUMMVM_STX0.8.15:ScummVM Modern Theme:No Author] diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx index 30f8f3c323..e27de3fe9b 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -38,7 +38,9 @@ + + @@ -808,9 +810,16 @@ - + + + + + + + -- cgit v1.2.3 From 049e61b4459fd6fdbcf29c5d0e29d35755de82e3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 1 Jul 2012 17:17:04 +0200 Subject: GUI: Fix small memory leak in grid based load chooser. --- gui/saveload-dialog.cpp | 5 +++++ gui/saveload-dialog.h | 1 + 2 files changed, 6 insertions(+) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 3d542b1dc8..d7fa9c686a 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -502,6 +502,11 @@ LoadChooserThumbnailed::LoadChooserThumbnailed(const Common::String &title) _pageDisplay->setAlign(Graphics::kTextAlignRight); } +LoadChooserThumbnailed::~LoadChooserThumbnailed() { + removeWidget(_pageDisplay); + delete _pageDisplay; +} + const Common::String &LoadChooserThumbnailed::getResultString() const { // FIXME: This chooser is only for loading, thus the result is never used // anyway. But this is still an ugly hack. diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h index 63dbf4182e..e169dbf613 100644 --- a/gui/saveload-dialog.h +++ b/gui/saveload-dialog.h @@ -112,6 +112,7 @@ private: class LoadChooserThumbnailed : public SaveLoadChooserDialog { public: LoadChooserThumbnailed(const Common::String &title); + ~LoadChooserThumbnailed(); virtual const Common::String &getResultString() const; -- cgit v1.2.3 From 44935117f493b2e256b5a2c701b63cef57d872af Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 2 Jul 2012 11:37:55 +0300 Subject: SCI: Fix a workaround for an uninitialized variable in SQ4CD This makes sure that the workaround works for subclassed objects as well, such as "theProfessor" talker. Fixes bug #3539350 - "SCI: SQ4 CD - Crash in sewer when text and speech enabled" --- engines/sci/engine/workarounds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index ecb1e4c2d5..15fca0322c 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -162,7 +162,7 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = { { GID_SQ1, -1, 703, 0, "", "export 1", -1, 0, { WORKAROUND_FAKE, 0 } }, // sub that's called from several objects while on sarien battle cruiser { GID_SQ1, -1, 703, 0, "firePulsar", "changeState", 0x18a, 0, { WORKAROUND_FAKE, 0 } }, // export 1, but called locally (when shooting at aliens) { GID_SQ4, -1, 398, 0, "showBox", "changeState", -1, 0, { WORKAROUND_FAKE, 0 } }, // CD: called when rummaging in Software Excess bargain bin - { GID_SQ4, -1, 928, 0, "Narrator", "startText", -1, 1000, { WORKAROUND_FAKE, 1 } }, // CD: method returns this to the caller + { GID_SQ4, -1, 928, -1, "Narrator", "startText", -1, 1000, { WORKAROUND_FAKE, 1 } }, // CD: happens in the options dialog and in-game when speech and subtitles are used simultaneously { GID_SQ5, 201, 201, 0, "buttonPanel", "doVerb", -1, 0, { WORKAROUND_FAKE, 1 } }, // when looking at the orange or red button - bug #3038563 { GID_SQ6, -1, 0, 0, "SQ6", "init", -1, 2, { WORKAROUND_FAKE, 0 } }, // Demo and full version: called when the game starts (demo: room 0, full: room 100) { GID_SQ6, 100, 64950, 0, "View", "handleEvent", -1, 0, { WORKAROUND_FAKE, 0 } }, // called when pressing "Start game" in the main menu -- cgit v1.2.3 From f6e4312665614d7b5b626f997194fbbcb00ddbb0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 2 Jul 2012 12:48:02 +0300 Subject: SCI: Add a hack for a bug in the script handling code When resetting the segment manager, sometimes the locals block for a script is placed in a segment smaller than the script itself. This shouldn't be happening, but it isn't fatal, however it should be resolved in a proper manner --- engines/sci/engine/seg_manager.cpp | 41 ++++++++++++++++++++------------------ engines/sci/engine/seg_manager.h | 8 -------- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index a6c145979f..d425e170ce 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -143,16 +143,34 @@ Script *SegManager::allocateScript(int script_nr, SegmentId *segid) { } void SegManager::deallocate(SegmentId seg) { - if (!check(seg)) - error("SegManager::deallocate(): invalid segment ID"); + if (seg < 1 || (uint)seg >= _heap.size()) + error("Attempt to deallocate an invalid segment ID"); SegmentObj *mobj = _heap[seg]; + if (!mobj) + error("Attempt to deallocate an already freed segment"); if (mobj->getType() == SEG_TYPE_SCRIPT) { Script *scr = (Script *)mobj; _scriptSegMap.erase(scr->getScriptNumber()); - if (scr->getLocalsSegment()) - deallocate(scr->getLocalsSegment()); + if (scr->getLocalsSegment()) { + // HACK: Check if the locals segment has already been deallocated. + // This happens sometimes in SQ4CD when resetting the segment + // manager: the locals for script 808 are somehow stored in a + // smaller segment than the script itself, so by the time the script + // is about to be freed, the locals block has already been freed. + // This isn't fatal, but it shouldn't be happening at all. + // FIXME: Check why this happens. Perhaps there's a bug in the + // script handling code? + if (!_heap[scr->getLocalsSegment()]) { + warning("SegManager::deallocate(): The locals block of script " + "%d has already been deallocated. Script segment: %d, " + "locals segment: %d", scr->getScriptNumber(), seg, + scr->getLocalsSegment()); + } else { + deallocate(scr->getLocalsSegment()); + } + } } delete mobj; @@ -307,21 +325,6 @@ reg_t SegManager::findObjectByName(const Common::String &name, int index) { return result[index]; } -// validate the seg -// return: -// false - invalid seg -// true - valid seg -bool SegManager::check(SegmentId seg) { - if (seg < 1 || (uint)seg >= _heap.size()) { - return false; - } - if (!_heap[seg]) { - warning("SegManager: seg %x is removed from memory, but not removed from hash_map", seg); - return false; - } - return true; -} - // return the seg if script_id is valid and in the map, else 0 SegmentId SegManager::getScriptSegment(int script_id) const { return _scriptSegMap.getVal(script_id, 0); diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h index 356a1b04a7..074d3f6b0a 100644 --- a/engines/sci/engine/seg_manager.h +++ b/engines/sci/engine/seg_manager.h @@ -471,14 +471,6 @@ private: void createClassTable(); SegmentId findFreeSegment() const; - - /** - * Check segment validity - * @param[in] seg The segment to validate - * @return false if 'seg' is an invalid segment, true if - * 'seg' is a valid segment - */ - bool check(SegmentId seg); }; } // End of namespace Sci -- cgit v1.2.3 From b091c0bd090f075e6e0b796785c400dbe9d2b8ac Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 3 Jul 2012 00:00:38 +0200 Subject: SCI: Remove unnecessary const-cast --- engines/sci/engine/kvideo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index 2456ba1100..61d2f935f7 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -90,7 +90,7 @@ void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) { EngineState *s = g_sci->getEngineState(); if (videoDecoder->hasDirtyPalette()) { - byte *palette = (byte *)videoDecoder->getPalette() + s->_vmdPalStart * 3; + const byte *palette = videoDecoder->getPalette() + s->_vmdPalStart * 3; g_system->getPaletteManager()->setPalette(palette, s->_vmdPalStart, s->_vmdPalEnd - s->_vmdPalStart); } @@ -108,7 +108,7 @@ void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) { } if (videoDecoder->hasDirtyPalette()) { - byte *palette = (byte *)videoDecoder->getPalette() + s->_vmdPalStart * 3; + const byte *palette = videoDecoder->getPalette() + s->_vmdPalStart * 3; g_system->getPaletteManager()->setPalette(palette, s->_vmdPalStart, s->_vmdPalEnd - s->_vmdPalStart); } -- cgit v1.2.3 From c80429008f135c236544846920f488680fa7c200 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 3 Jul 2012 03:33:42 +0300 Subject: SCI: Remove an unnecessary warning and related FIXME comments It's perfectly normal behavior to have locals with a smaller segment ID than the ID of their respective script, e.g. when scripts are uninstantiated and then instantiated again --- engines/sci/engine/seg_manager.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index d425e170ce..951fc7c363 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -154,22 +154,15 @@ void SegManager::deallocate(SegmentId seg) { Script *scr = (Script *)mobj; _scriptSegMap.erase(scr->getScriptNumber()); if (scr->getLocalsSegment()) { - // HACK: Check if the locals segment has already been deallocated. - // This happens sometimes in SQ4CD when resetting the segment - // manager: the locals for script 808 are somehow stored in a - // smaller segment than the script itself, so by the time the script - // is about to be freed, the locals block has already been freed. - // This isn't fatal, but it shouldn't be happening at all. - // FIXME: Check why this happens. Perhaps there's a bug in the - // script handling code? - if (!_heap[scr->getLocalsSegment()]) { - warning("SegManager::deallocate(): The locals block of script " - "%d has already been deallocated. Script segment: %d, " - "locals segment: %d", scr->getScriptNumber(), seg, - scr->getLocalsSegment()); - } else { + // Check if the locals segment has already been deallocated. + // If the locals block has been stored in a segment with an ID + // smaller than the segment ID of the script itself, it will be + // already freed at this point. This can happen when scripts are + // uninstantiated and instantiated again: they retain their own + // segment ID, but are allocated a new locals segment, which can + // have an ID smaller than the segment of the script itself. + if (_heap[scr->getLocalsSegment()]) deallocate(scr->getLocalsSegment()); - } } } -- cgit v1.2.3 From 9184a40fcc2263fae7bc67777346f592d50a39eb Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 3 Jul 2012 03:46:27 +0300 Subject: SCI: Fix incorrect game options for SQ4CD --- engines/sci/detection_tables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 7c51c03b06..07b4733cfd 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -3536,7 +3536,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.map", 0, "ed90a8e3ccc53af6633ff6ab58392bae", 7054}, {"resource.000", 0, "63247e3901ab8963d4eece73747832e0", 5157378}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformPC, ADGF_CD, GUIO1(GAMEOPTION_SQ4_SILVER_CURSORS) }, + Common::EN_ANY, Common::kPlatformPC, ADGF_CD, GUIO5(GUIO_MIDIGM, GAMEOPTION_SQ4_SILVER_CURSORS, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, // Space Quest 4 - English Windows CD (from the Space Quest Collection) // Executable scanning reports "1.001.064", VERSION file reports "1.0" -- cgit v1.2.3 From 5a47afea9ed5d0cca89ca01d48be937dcba02bbd Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 3 Jul 2012 18:11:41 +0300 Subject: SCI: Move kGetWindowsOption together with the other misc kernel functions --- engines/sci/engine/kgraphics32.cpp | 12 ------------ engines/sci/engine/kmisc.cpp | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 413ad1ecb1..14ea409a58 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -197,18 +197,6 @@ reg_t kDisposeTextBitmap(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } -reg_t kGetWindowsOption(EngineState *s, int argc, reg_t *argv) { - uint16 windowsOption = argv[0].toUint16(); - switch (windowsOption) { - case 0: - // Title bar on/off in Phantasmagoria, we return 0 (off) - return NULL_REG; - default: - warning("GetWindowsOption: Unknown option %d", windowsOption); - return NULL_REG; - } -} - reg_t kWinHelp(EngineState *s, int argc, reg_t *argv) { switch (argv[0].toUint16()) { case 1: diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index 12c830f622..8b7fc4ffec 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -419,6 +419,18 @@ reg_t kGetSierraProfileInt(EngineState *s, int argc, reg_t *argv) { return argv[2]; } +reg_t kGetWindowsOption(EngineState *s, int argc, reg_t *argv) { + uint16 windowsOption = argv[0].toUint16(); + switch (windowsOption) { + case 0: + // Title bar on/off in Phantasmagoria, we return 0 (off) + return NULL_REG; + default: + warning("GetWindowsOption: Unknown option %d", windowsOption); + return NULL_REG; + } +} + #endif // kIconBar is really a subop of kMacPlatform for SCI1.1 Mac -- cgit v1.2.3 From f9d2871eb4c1fa9e11e051dfd65d85bc892f8bc1 Mon Sep 17 00:00:00 2001 From: Ori Avtalion Date: Tue, 3 Jul 2012 18:27:48 +0300 Subject: JANITORIAL: Remove extra semicolons --- engines/dreamweb/dreamweb.h | 4 ++-- engines/kyra/eobcommon.h | 6 +++--- engines/tsage/ringworld2/ringworld2_speakers.h | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index 48d44c0380..1f6deb8566 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -152,8 +152,8 @@ public: uint8 modifyChar(uint8 c) const; Common::String modifyFileName(const char *); - const Common::String& getDatafilePrefix() { return _datafilePrefix; }; - const Common::String& getSpeechDirName() { return _speechDirName; }; + const Common::String& getDatafilePrefix() { return _datafilePrefix; } + const Common::String& getSpeechDirName() { return _speechDirName; } private: void keyPressed(uint16 ascii); diff --git a/engines/kyra/eobcommon.h b/engines/kyra/eobcommon.h index 050fe2b794..f60e755dd7 100644 --- a/engines/kyra/eobcommon.h +++ b/engines/kyra/eobcommon.h @@ -263,7 +263,7 @@ protected: // Main Menu, Intro, Finale virtual int mainMenu() = 0; - virtual void seq_xdeath() {}; + virtual void seq_xdeath() {} virtual void seq_playFinale() = 0; bool _playFinale; @@ -921,8 +921,8 @@ protected: void usePotion(int charIndex, int weaponSlot); void useWand(int charIndex, int weaponSlot); - virtual void turnUndeadAuto() {}; - virtual void turnUndeadAutoHit() {}; + virtual void turnUndeadAuto() {} + virtual void turnUndeadAutoHit() {} void castSpell(int spell, int weaponSlot); void removeCharacterEffect(int spell, int charIndex, int showWarning); diff --git a/engines/tsage/ringworld2/ringworld2_speakers.h b/engines/tsage/ringworld2/ringworld2_speakers.h index e336564c5f..fa2946d56c 100644 --- a/engines/tsage/ringworld2/ringworld2_speakers.h +++ b/engines/tsage/ringworld2/ringworld2_speakers.h @@ -504,14 +504,14 @@ public: class SpeakerSoldier300 : public SpeakerSoldier { public: - SpeakerSoldier300() : SpeakerSoldier(60) {}; + SpeakerSoldier300() : SpeakerSoldier(60) {} virtual Common::String getClassName() { return "SpeakerSoldier300"; } virtual void proc15(); }; class SpeakerSoldier1625 : public SpeakerSoldier { public: - SpeakerSoldier1625() : SpeakerSoldier(5) {}; + SpeakerSoldier1625() : SpeakerSoldier(5) {} virtual Common::String getClassName() { return "SpeakerSoldier1625"; } }; @@ -585,7 +585,7 @@ public: class SpeakerWebbster3240 : public SpeakerWebbster { public: - SpeakerWebbster3240() : SpeakerWebbster(10) {}; + SpeakerWebbster3240() : SpeakerWebbster(10) {} virtual Common::String getClassName() { return "SpeakerWebbster3240"; } virtual void proc15(); @@ -593,7 +593,7 @@ public: class SpeakerWebbster3375 : public SpeakerWebbster { public: - SpeakerWebbster3375() : SpeakerWebbster(60) {}; + SpeakerWebbster3375() : SpeakerWebbster(60) {} virtual Common::String getClassName() { return "SpeakerWebbster3375"; } virtual void proc15(); @@ -601,7 +601,7 @@ public: class SpeakerWebbster3385 : public SpeakerWebbster { public: - SpeakerWebbster3385() : SpeakerWebbster(60) {}; + SpeakerWebbster3385() : SpeakerWebbster(60) {} virtual Common::String getClassName() { return "SpeakerWebbster3385"; } virtual void proc15(); @@ -609,7 +609,7 @@ public: class SpeakerWebbster3395 : public SpeakerWebbster { public: - SpeakerWebbster3395() : SpeakerWebbster(60) {}; + SpeakerWebbster3395() : SpeakerWebbster(60) {} virtual Common::String getClassName() { return "SpeakerWebbster3395"; } virtual void proc15(); @@ -617,7 +617,7 @@ public: class SpeakerWebbster3400 : public SpeakerWebbster { public: - SpeakerWebbster3400() : SpeakerWebbster(27) {}; + SpeakerWebbster3400() : SpeakerWebbster(27) {} virtual Common::String getClassName() { return "SpeakerWebbster3400"; } virtual void proc15(); -- cgit v1.2.3 From b2ba37a039715e64dba8b534cc23d72624469f34 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 17:44:07 +0200 Subject: KYRA: Get rid of unused private class members. Thanks to salty-horse for pointing at these. --- engines/kyra/screen.cpp | 6 +++--- engines/kyra/screen.h | 3 +-- engines/kyra/screen_lol.cpp | 2 +- engines/kyra/screen_lol.h | 2 -- engines/kyra/sound_intern.h | 1 - engines/kyra/sound_towns.cpp | 2 +- 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 4fd5985a09..04d805737f 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -141,7 +141,7 @@ bool Screen::init() { if (!font) error("Could not load any SJIS font, neither the original nor ScummVM's 'SJIS.FNT'"); - _fonts[FID_SJIS_FNT] = new SJISFont(this, font, _sjisInvisibleColor, _use16ColorMode, !_use16ColorMode); + _fonts[FID_SJIS_FNT] = new SJISFont(font, _sjisInvisibleColor, _use16ColorMode, !_use16ColorMode); } } @@ -3595,8 +3595,8 @@ void AMIGAFont::unload() { memset(_chars, 0, sizeof(_chars)); } -SJISFont::SJISFont(Screen *s, Graphics::FontSJIS *font, const uint8 invisColor, bool is16Color, bool outlineSize) - : _colorMap(0), _font(font), _invisColor(invisColor), _is16Color(is16Color), _screen(s) { +SJISFont::SJISFont(Graphics::FontSJIS *font, const uint8 invisColor, bool is16Color, bool outlineSize) + : _colorMap(0), _font(font), _invisColor(invisColor), _is16Color(is16Color) { assert(_font); _font->setDrawingMode(outlineSize ? Graphics::FontSJIS::kOutlineMode : Graphics::FontSJIS::kDefaultMode); diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h index b064c72bb0..60bfeb3241 100644 --- a/engines/kyra/screen.h +++ b/engines/kyra/screen.h @@ -213,7 +213,7 @@ private: */ class SJISFont : public Font { public: - SJISFont(Screen *s, Graphics::FontSJIS *font, const uint8 invisColor, bool is16Color, bool outlineSize); + SJISFont(Graphics::FontSJIS *font, const uint8 invisColor, bool is16Color, bool outlineSize); ~SJISFont() { unload(); } bool usesOverlay() const { return true; } @@ -233,7 +233,6 @@ private: const uint8 _invisColor; const bool _is16Color; - const Screen *_screen; int _sjisWidth, _asciiWidth; int _fontHeight; }; diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp index 08b232f400..3726b1f4b9 100644 --- a/engines/kyra/screen_lol.cpp +++ b/engines/kyra/screen_lol.cpp @@ -31,7 +31,7 @@ namespace Kyra { -Screen_LoL::Screen_LoL(LoLEngine *vm, OSystem *system) : Screen_v2(vm, system, vm->gameFlags().use16ColorMode ? _screenDimTable16C : _screenDimTable256C, _screenDimTableCount), _vm(vm) { +Screen_LoL::Screen_LoL(LoLEngine *vm, OSystem *system) : Screen_v2(vm, system, vm->gameFlags().use16ColorMode ? _screenDimTable16C : _screenDimTable256C, _screenDimTableCount) { _paletteOverlay1 = new uint8[0x100]; _paletteOverlay2 = new uint8[0x100]; _grayOverlay = new uint8[0x100]; diff --git a/engines/kyra/screen_lol.h b/engines/kyra/screen_lol.h index 3bba9f8b70..09496705bb 100644 --- a/engines/kyra/screen_lol.h +++ b/engines/kyra/screen_lol.h @@ -89,8 +89,6 @@ public: static void convertPC98Gfx(uint8 *data, int w, int h, int pitch); private: - LoLEngine *_vm; - static const ScreenDim _screenDimTable256C[]; static const ScreenDim _screenDimTable16C[]; static const int _screenDimTableCount; diff --git a/engines/kyra/sound_intern.h b/engines/kyra/sound_intern.h index 427bef66e2..827a487685 100644 --- a/engines/kyra/sound_intern.h +++ b/engines/kyra/sound_intern.h @@ -130,7 +130,6 @@ private: void fadeOutSoundEffects(); int _lastTrack; - Audio::AudioStream *_currentSFX; Audio::SoundHandle _sfxHandle; uint8 *_musicTrackData; diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index 2f996de1ac..4b25db33f2 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -34,7 +34,7 @@ namespace Kyra { SoundTowns::SoundTowns(KyraEngine_v1 *vm, Audio::Mixer *mixer) - : Sound(vm, mixer), _lastTrack(-1), _currentSFX(0), _musicTrackData(0), _sfxFileData(0), _cdaPlaying(0), + : Sound(vm, mixer), _lastTrack(-1), _musicTrackData(0), _sfxFileData(0), _cdaPlaying(0), _sfxFileIndex((uint)-1), _musicFadeTable(0), _sfxWDTable(0), _sfxBTTable(0), _sfxChannel(0x46) { _driver = new TownsEuphonyDriver(_mixer); -- cgit v1.2.3 From 2678bcda981d7772beece5eaae3293e3e0f1c2a8 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 17:53:00 +0200 Subject: BACKENDS: Remove unused member in DefaultTimerManager. Thanks to salty-horse for pointing this out. --- backends/timer/default/default-timer.cpp | 1 - backends/timer/default/default-timer.h | 1 - 2 files changed, 2 deletions(-) diff --git a/backends/timer/default/default-timer.cpp b/backends/timer/default/default-timer.cpp index 8681102cd0..9cd803f148 100644 --- a/backends/timer/default/default-timer.cpp +++ b/backends/timer/default/default-timer.cpp @@ -59,7 +59,6 @@ void insertPrioQueue(TimerSlot *head, TimerSlot *newSlot) { DefaultTimerManager::DefaultTimerManager() : - _timerHandler(0), _head(0) { _head = new TimerSlot(); diff --git a/backends/timer/default/default-timer.h b/backends/timer/default/default-timer.h index e5a9dada79..5884979da0 100644 --- a/backends/timer/default/default-timer.h +++ b/backends/timer/default/default-timer.h @@ -34,7 +34,6 @@ private: typedef Common::HashMap TimerSlotMap; Common::Mutex _mutex; - void *_timerHandler; TimerSlot *_head; TimerSlotMap _callbacks; -- cgit v1.2.3 From 48e6b80253355a91fbd72d0d0f38b43f5c2340f2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:26:27 +0200 Subject: SAGA: Slight cleanup in querySaveMetaInfos implementation. Saves are writable and deletable by default, there is no need to mark them explicitly as such. --- engines/saga/detection.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp index d39ec34cc8..9c178559f2 100644 --- a/engines/saga/detection.cpp +++ b/engines/saga/detection.cpp @@ -252,9 +252,6 @@ SaveStateDescriptor SagaMetaEngine::querySaveMetaInfos(const char *target, int s debug(0, "Save is for: %s", title); } - desc.setDeletableFlag(true); - desc.setWriteProtectedFlag(false); - if (version >= 6) { Graphics::Surface *const thumbnail = Graphics::loadThumbnail(*in); desc.setThumbnail(thumbnail); -- cgit v1.2.3 From e242b91db0401c2a5c7af4202ab185a895fded31 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:27:49 +0200 Subject: SCUMM: Slight cleanup in querySaveMetaInfos. --- engines/scumm/detection.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index ebf1a2675c..87305921c9 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -1266,7 +1266,6 @@ SaveStateDescriptor ScummMetaEngine::querySaveMetaInfos(const char *target, int Graphics::Surface *thumbnail = ScummEngine::loadThumbnailFromSlot(target, slot); SaveStateDescriptor desc(slot, saveDesc); - desc.setDeletableFlag(true); desc.setThumbnail(thumbnail); SaveStateMetaInfos infos; -- cgit v1.2.3 From afa94697dcf21c3c96360f5dd54dd2a016d69e85 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:33:44 +0200 Subject: CGE: Slight cleanup in querySaveMetaInfos. --- engines/cge/detection.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/engines/cge/detection.cpp b/engines/cge/detection.cpp index f723ec8fbd..d16b682501 100644 --- a/engines/cge/detection.cpp +++ b/engines/cge/detection.cpp @@ -217,8 +217,6 @@ SaveStateDescriptor CGEMetaEngine::querySaveMetaInfos(const char *target, int sl } else { // Create the return descriptor SaveStateDescriptor desc(slot, header.saveName); - desc.setDeletableFlag(true); - desc.setWriteProtectedFlag(false); desc.setThumbnail(header.thumbnail); desc.setSaveDate(header.saveYear, header.saveMonth, header.saveDay); desc.setSaveTime(header.saveHour, header.saveMinutes); -- cgit v1.2.3 From bc3c80714b768ef11459738ad10bc7cd79afb854 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:33:56 +0200 Subject: CRUISE: Slight cleanup in querySaveMetaInfos. --- engines/cruise/detection.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp index b2e267ca49..cbe17ea4d3 100644 --- a/engines/cruise/detection.cpp +++ b/engines/cruise/detection.cpp @@ -303,8 +303,6 @@ SaveStateDescriptor CruiseMetaEngine::querySaveMetaInfos(const char *target, int // Create the return descriptor SaveStateDescriptor desc(slot, header.saveName); - desc.setDeletableFlag(true); - desc.setWriteProtectedFlag(false); desc.setThumbnail(header.thumbnail); return desc; -- cgit v1.2.3 From a51358535824564934e22b84ca37f2ae66649f24 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:34:12 +0200 Subject: DRACI: Slight cleanup in querySaveMetaInfos. --- engines/draci/detection.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/engines/draci/detection.cpp b/engines/draci/detection.cpp index de76eb83e0..61705a1e59 100644 --- a/engines/draci/detection.cpp +++ b/engines/draci/detection.cpp @@ -161,8 +161,6 @@ SaveStateDescriptor DraciMetaEngine::querySaveMetaInfos(const char *target, int // Create the return descriptor SaveStateDescriptor desc(slot, header.saveName); - desc.setDeletableFlag(true); - desc.setWriteProtectedFlag(false); desc.setThumbnail(header.thumbnail); int day = (header.date >> 24) & 0xFF; -- cgit v1.2.3 From e66b9d4487b71cba26741882e94248d8259b5fcb Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:34:30 +0200 Subject: DREAMWEB: Slight cleanup in querySaveMetaInfos. --- engines/dreamweb/detection.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/engines/dreamweb/detection.cpp b/engines/dreamweb/detection.cpp index 6468281ac2..f2e2f42216 100644 --- a/engines/dreamweb/detection.cpp +++ b/engines/dreamweb/detection.cpp @@ -172,8 +172,6 @@ SaveStateDescriptor DreamWebMetaEngine::querySaveMetaInfos(const char *target, i saveName += (char)in->readByte(); SaveStateDescriptor desc(slot, saveName); - desc.setDeletableFlag(true); - desc.setWriteProtectedFlag(false); // Check if there is a ScummVM data block if (header.len(6) == SCUMMVM_BLOCK_MAGIC_SIZE) { -- cgit v1.2.3 From 31f339880d94d85e6168a4ee152512a730396ddd Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:34:41 +0200 Subject: GROOVIE: Slight cleanup in querySaveMetaInfos. --- engines/groovie/saveload.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/engines/groovie/saveload.cpp b/engines/groovie/saveload.cpp index 14e7a09cb2..1a92c02e0e 100644 --- a/engines/groovie/saveload.cpp +++ b/engines/groovie/saveload.cpp @@ -103,8 +103,6 @@ Common::InSaveFile *SaveLoad::openForLoading(const Common::String &target, int s if (descriptor) { // Initialize the SaveStateDescriptor descriptor->setSaveSlot(slot); - descriptor->setDeletableFlag(true); - descriptor->setWriteProtectedFlag(false); // TODO: Add extra information //setSaveDate(int year, int month, int day) -- cgit v1.2.3 From 3b14ff33caeff827c2a4e82dc61c6a61d83c8d94 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:34:58 +0200 Subject: HUGO: Slight cleanup in querySaveMetaInfos. --- engines/hugo/detection.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/engines/hugo/detection.cpp b/engines/hugo/detection.cpp index 90708163f5..bb5944acc8 100644 --- a/engines/hugo/detection.cpp +++ b/engines/hugo/detection.cpp @@ -244,9 +244,6 @@ SaveStateDescriptor HugoMetaEngine::querySaveMetaInfos(const char *target, int s Graphics::Surface *const thumbnail = Graphics::loadThumbnail(*file); desc.setThumbnail(thumbnail); - desc.setDeletableFlag(true); - desc.setWriteProtectedFlag(false); - uint32 saveDate = file->readUint32BE(); uint16 saveTime = file->readUint16BE(); -- cgit v1.2.3 From 05bd736d163f7e18ce27cd483a7e0f35adf1dce9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:35:43 +0200 Subject: SCI: Slight cleanup in querySaveMetaInfos. --- engines/sci/detection.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 78df3065b2..8a74bc817c 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -762,9 +762,6 @@ SaveStateDescriptor SciMetaEngine::querySaveMetaInfos(const char *target, int sl Graphics::Surface *const thumbnail = Graphics::loadThumbnail(*in); desc.setThumbnail(thumbnail); - desc.setDeletableFlag(true); - desc.setWriteProtectedFlag(false); - int day = (meta.saveDate >> 24) & 0xFF; int month = (meta.saveDate >> 16) & 0xFF; int year = meta.saveDate & 0xFFFF; -- cgit v1.2.3 From 89b8f6bb56e62f04e36778cfbd0abbebb94c4771 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:36:28 +0200 Subject: SWORD1: Slight cleanup in querySaveMetaInfos. --- engines/sword1/detection.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp index 087dcd09d8..5662e4672b 100644 --- a/engines/sword1/detection.cpp +++ b/engines/sword1/detection.cpp @@ -268,9 +268,6 @@ SaveStateDescriptor SwordMetaEngine::querySaveMetaInfos(const char *target, int SaveStateDescriptor desc(slot, name); - desc.setDeletableFlag(true); - desc.setWriteProtectedFlag(false); - if (versionSave < 2) // These older version of the savegames used a flag to signal presence of thumbnail in->skip(1); -- cgit v1.2.3 From 72e1e5a31c723a1167568f4c3c952931815f3ff8 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:36:41 +0200 Subject: TEENAGENT: Slight cleanup in querySaveMetaInfos. --- engines/teenagent/detection.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/engines/teenagent/detection.cpp b/engines/teenagent/detection.cpp index dad876dd97..f516ee06c1 100644 --- a/engines/teenagent/detection.cpp +++ b/engines/teenagent/detection.cpp @@ -174,7 +174,6 @@ public: return SaveStateDescriptor(slot, desc); SaveStateDescriptor ssd(slot, desc); - ssd.setDeletableFlag(true); //checking for the thumbnail if (Graphics::Surface *const thumb = Graphics::loadThumbnail(*in)) -- cgit v1.2.3 From 69723c82bc41ea9f7a440bf3a8cb5869ceb4b206 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:36:56 +0200 Subject: TOLTECTS: Slight cleanup in querySaveMetaInfos. --- engines/toltecs/detection.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/engines/toltecs/detection.cpp b/engines/toltecs/detection.cpp index c532bbbf09..c1a57638c2 100644 --- a/engines/toltecs/detection.cpp +++ b/engines/toltecs/detection.cpp @@ -273,8 +273,6 @@ SaveStateDescriptor ToltecsMetaEngine::querySaveMetaInfos(const char *target, in if (error == Toltecs::ToltecsEngine::kRSHENoError) { SaveStateDescriptor desc(slot, header.description); - desc.setDeletableFlag(true); - desc.setWriteProtectedFlag(false); desc.setThumbnail(header.thumbnail); if (header.version > 0) { -- cgit v1.2.3 From b9ac34272d6c04473b4acfc08fbf383912f22465 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:37:12 +0200 Subject: TOON: Slight cleanup in querySaveMetaInfos. --- engines/toon/detection.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/engines/toon/detection.cpp b/engines/toon/detection.cpp index 8234934972..0cafee1475 100644 --- a/engines/toon/detection.cpp +++ b/engines/toon/detection.cpp @@ -234,9 +234,6 @@ SaveStateDescriptor ToonMetaEngine::querySaveMetaInfos(const char *target, int s Graphics::Surface *const thumbnail = Graphics::loadThumbnail(*file); desc.setThumbnail(thumbnail); - desc.setDeletableFlag(true); - desc.setWriteProtectedFlag(false); - uint32 saveDate = file->readUint32BE(); uint16 saveTime = file->readUint16BE(); -- cgit v1.2.3 From 79e24035273cbf17f2518460c014ecb45ed6ea90 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:37:24 +0200 Subject: TSAGE: Slight cleanup in querySaveMetaInfos. --- engines/tsage/detection.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/engines/tsage/detection.cpp b/engines/tsage/detection.cpp index 0c458f5c35..bcadfdc201 100644 --- a/engines/tsage/detection.cpp +++ b/engines/tsage/detection.cpp @@ -164,8 +164,6 @@ public: // Create the return descriptor SaveStateDescriptor desc(slot, header.saveName); - desc.setDeletableFlag(true); - desc.setWriteProtectedFlag(false); desc.setThumbnail(header.thumbnail); desc.setSaveDate(header.saveYear, header.saveMonth, header.saveDay); desc.setSaveTime(header.saveHour, header.saveMinutes); -- cgit v1.2.3 From 0a51805a8ceaeaeeaa57eb224e1adc821fd359f2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jul 2012 18:40:40 +0200 Subject: ENGINES: Mention defaults for writable and deletable settings in SaveStateDescriptor docs. --- engines/savestate.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engines/savestate.h b/engines/savestate.h index 6cbdb22edf..c233554657 100644 --- a/engines/savestate.h +++ b/engines/savestate.h @@ -40,6 +40,8 @@ struct Surface; * * Further possibilites are a thumbnail, play time, creation date, * creation time, delete protected, write protection. + * + * Saves are writable and deletable by default. */ class SaveStateDescriptor { public: -- cgit v1.2.3 From cc02255740a42177c4ce7a8af892ba7f05cf6fae Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 3 Jul 2012 21:43:04 +0100 Subject: CGE: Fix for missing inventory selection by numeric keys. This fixes bug #3539671. --- engines/cge/events.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp index c8baf4ed61..99855e1aa6 100644 --- a/engines/cge/events.cpp +++ b/engines/cge/events.cpp @@ -112,6 +112,16 @@ bool Keyboard::getKey(Common::Event &event) { _vm->_commandHandler->addCommand(kCmdLevel, -1, keycode - '0', NULL); return false; } + // Fallthrough intended + case Common::KEYCODE_5: + case Common::KEYCODE_6: + case Common::KEYCODE_7: + case Common::KEYCODE_8: + if (event.type == Common::EVENT_KEYDOWN && !(event.kbd.flags & Common::KBD_ALT) && keycode != '0') { + _vm->selectPocket(keycode - '1'); + return false; + } + break; default: break; } -- cgit v1.2.3 From 4201d4ead031629446c6227712d98a8a56a23ca9 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 3 Jul 2012 23:55:48 +0200 Subject: CGE: Use keycode instead of ascii value --- engines/cge/events.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp index 99855e1aa6..98a39a947b 100644 --- a/engines/cge/events.cpp +++ b/engines/cge/events.cpp @@ -109,7 +109,7 @@ bool Keyboard::getKey(Common::Event &event) { case Common::KEYCODE_3: case Common::KEYCODE_4: if (event.kbd.flags & Common::KBD_ALT) { - _vm->_commandHandler->addCommand(kCmdLevel, -1, keycode - '0', NULL); + _vm->_commandHandler->addCommand(kCmdLevel, -1, keycode - Common::KEYCODE_0, NULL); return false; } // Fallthrough intended @@ -117,8 +117,8 @@ bool Keyboard::getKey(Common::Event &event) { case Common::KEYCODE_6: case Common::KEYCODE_7: case Common::KEYCODE_8: - if (event.type == Common::EVENT_KEYDOWN && !(event.kbd.flags & Common::KBD_ALT) && keycode != '0') { - _vm->selectPocket(keycode - '1'); + if (event.type == Common::EVENT_KEYDOWN && !(event.kbd.flags & Common::KBD_ALT) && keycode != Common::KEYCODE_0) { + _vm->selectPocket(keycode - Common::KEYCODE_1); return false; } break; -- cgit v1.2.3 From 72c59baf247e09c7b40afd1c48221827ef1d64df Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jul 2012 00:57:59 +0300 Subject: SCI: Merge and simplify the code that sets the kernel functions --- engines/sci/engine/kernel.cpp | 125 ++++++++++++++++++++----------------- engines/sci/engine/kernel.h | 18 +----- engines/sci/engine/kernel_tables.h | 4 +- 3 files changed, 69 insertions(+), 78 deletions(-) diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index c8fe47d9fc..924641cdbe 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -757,13 +757,26 @@ bool Kernel::debugSetFunction(const char *kernelName, int logging, int breakpoin return true; } -void Kernel::setDefaultKernelNames(GameFeatures *features) { - _kernelNames = Common::StringArray(s_defaultKernelNames, ARRAYSIZE(s_defaultKernelNames)); +#ifdef ENABLE_SCI32 +enum { + kKernelEntriesSci2 = 0x8b, + kKernelEntriesGk2Demo = 0xa0, + kKernelEntriesSci21 = 0x9d, + kKernelEntriesSci3 = 0xa1 +}; +#endif + +void Kernel::loadKernelNames(GameFeatures *features) { + _kernelNames.clear(); - // Some (later) SCI versions replaced CanBeHere by CantBeHere - // If vocab.999 exists, the kernel function is still named CanBeHere - if (_selectorCache.cantBeHere != -1) - _kernelNames[0x4d] = "CantBeHere"; + if (getSciVersion() <= SCI_VERSION_1_1) { + _kernelNames = Common::StringArray(s_defaultKernelNames, ARRAYSIZE(s_defaultKernelNames)); + + // Some (later) SCI versions replaced CanBeHere by CantBeHere + // If vocab.999 exists, the kernel function is still named CanBeHere + if (_selectorCache.cantBeHere != -1) + _kernelNames[0x4d] = "CantBeHere"; + } switch (getSciVersion()) { case SCI_VERSION_0_EARLY: @@ -817,66 +830,60 @@ void Kernel::setDefaultKernelNames(GameFeatures *features) { _kernelNames[0x7c] = "Message"; break; - default: - // Use default table for the other versions - break; - } -} - #ifdef ENABLE_SCI32 + case SCI_VERSION_2: + _kernelNames = Common::StringArray(sci2_default_knames, kKernelEntriesSci2); + break; -enum { - kKernelEntriesSci2 = 0x8b, - kKernelEntriesGk2Demo = 0xa0, - kKernelEntriesSci21 = 0x9d, - kKernelEntriesSci3 = 0xa1 -}; - -void Kernel::setKernelNamesSci2() { - _kernelNames = Common::StringArray(sci2_default_knames, kKernelEntriesSci2); -} + case SCI_VERSION_2_1: + if (features->detectSci21KernelType() == SCI_VERSION_2) { + // Some late SCI2.1 games use a modified SCI2 kernel table instead of + // the SCI2.1 kernel table. We detect which version to use based on + // how kDoSound is called from Sound::play(). + // Known games that use this: + // GK2 demo + // KQ7 1.4 + // PQ4 SWAT demo + // LSL6 + // PQ4CD + // QFG4CD + + // This is interesting because they all have the same interpreter + // version (2.100.002), yet they would not be compatible with other + // games of the same interpreter. + + _kernelNames = Common::StringArray(sci2_default_knames, kKernelEntriesGk2Demo); + // OnMe is IsOnMe here, but they should be compatible + _kernelNames[0x23] = "Robot"; // Graph in SCI2 + _kernelNames[0x2e] = "Priority"; // DisposeTextBitmap in SCI2 + } else { + // Normal SCI2.1 kernel table + _kernelNames = Common::StringArray(sci21_default_knames, kKernelEntriesSci21); + } + break; -void Kernel::setKernelNamesSci21(GameFeatures *features) { - // Some SCI games use a modified SCI2 kernel table instead of the - // SCI2.1 kernel table. We detect which version to use based on - // how kDoSound is called from Sound::play(). - // Known games that use this: - // GK2 demo - // KQ7 1.4 - // PQ4 SWAT demo - // LSL6 - // PQ4CD - // QFG4CD - - // This is interesting because they all have the same interpreter - // version (2.100.002), yet they would not be compatible with other - // games of the same interpreter. - - if (getSciVersion() != SCI_VERSION_3 && features->detectSci21KernelType() == SCI_VERSION_2) { - _kernelNames = Common::StringArray(sci2_default_knames, kKernelEntriesGk2Demo); - // OnMe is IsOnMe here, but they should be compatible - _kernelNames[0x23] = "Robot"; // Graph in SCI2 - _kernelNames[0x2e] = "Priority"; // DisposeTextBitmap in SCI2 - } else if (getSciVersion() != SCI_VERSION_3) { - _kernelNames = Common::StringArray(sci21_default_knames, kKernelEntriesSci21); - } else if (getSciVersion() == SCI_VERSION_3) { + case SCI_VERSION_3: _kernelNames = Common::StringArray(sci21_default_knames, kKernelEntriesSci3); - } -} -#endif - -void Kernel::loadKernelNames(GameFeatures *features) { - _kernelNames.clear(); + // In SCI3, some kernel functions have been removed, and others have been added + _kernelNames[0x18] = "Dummy"; // AddMagnify in SCI2.1 + _kernelNames[0x19] = "Dummy"; // DeleteMagnify in SCI2.1 + _kernelNames[0x30] = "Dummy"; // SetScroll in SCI2.1 + _kernelNames[0x39] = "Dummy"; // ShowMovie in SCI2.1 + _kernelNames[0x4c] = "Dummy"; // ScrollWindow in SCI2.1 + _kernelNames[0x56] = "Dummy"; // VibrateMouse in SCI2.1 (only used in QFG4 floppy) + _kernelNames[0x64] = "Dummy"; // AvoidPath in SCI2.1 + _kernelNames[0x66] = "Dummy"; // MergePoly in SCI2.1 + _kernelNames[0x8d] = "MessageBox"; // Dummy in SCI2.1 + _kernelNames[0x9b] = "Minimize"; // Dummy in SCI2.1 -#ifdef ENABLE_SCI32 - if (getSciVersion() >= SCI_VERSION_2_1) - setKernelNamesSci21(features); - else if (getSciVersion() == SCI_VERSION_2) - setKernelNamesSci2(); - else + break; #endif - setDefaultKernelNames(features); + + default: + // Use default table for the other versions + break; + } mapFunctions(); } diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 677b790f93..c3fcdd06e7 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -223,23 +223,6 @@ public: bool debugSetFunction(const char *kernelName, int logging, int breakpoint); private: - /** - * Sets the default kernel function names, based on the SCI version used. - */ - void setDefaultKernelNames(GameFeatures *features); - -#ifdef ENABLE_SCI32 - /** - * Sets the default kernel function names to the SCI2 kernel functions. - */ - void setKernelNamesSci2(); - - /** - * Sets the default kernel function names to the SCI2.1 kernel functions. - */ - void setKernelNamesSci21(GameFeatures *features); -#endif - /** * Loads the kernel selector names. */ @@ -556,6 +539,7 @@ reg_t kFileIOWriteByte(EngineState *s, int argc, reg_t *argv); reg_t kFileIOReadWord(EngineState *s, int argc, reg_t *argv); reg_t kFileIOWriteWord(EngineState *s, int argc, reg_t *argv); reg_t kFileIOCreateSaveSlot(EngineState *s, int argc, reg_t *argv); +reg_t kFileIOIsValidDirectory(EngineState *s, int argc, reg_t *argv); #endif //@} diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 6965a5da45..322d82ea08 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -1099,7 +1099,7 @@ static const char *const sci21_default_knames[] = { /*0x8a*/ "LoadChunk", /*0x8b*/ "SetPalStyleRange", /*0x8c*/ "AddPicAt", - /*0x8d*/ "MessageBox", // SCI3, was Dummy in SCI2.1 + /*0x8d*/ "Dummy", // MessageBox in SCI3 /*0x8e*/ "NewRoom", // debug function /*0x8f*/ "Dummy", /*0x90*/ "Priority", @@ -1113,7 +1113,7 @@ static const char *const sci21_default_knames[] = { /*0x98*/ "GetWindowsOption", // Windows only /*0x99*/ "WinDLL", // Windows only /*0x9a*/ "Dummy", - /*0x9b*/ "Minimize", // SCI3, was Dummy in SCI2.1 + /*0x9b*/ "Dummy", // Minimize in SCI3 /*0x9c*/ "DeletePic", // == SCI3 only =============== /*0x9d*/ "Dummy", -- cgit v1.2.3 From e0a3cfd21c607afd0fe9781b5d0a7d8407393d3f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jul 2012 00:59:55 +0300 Subject: SCI: FileIO subop 19 checks for directory validity This is used in Torin's Passage and LSL7 when autosaving --- engines/sci/engine/kernel_tables.h | 2 +- engines/sci/engine/kfile.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 322d82ea08..69baa1cf47 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -240,7 +240,7 @@ static const SciKernelMapSubEntry kFileIO_subops[] = { { 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 + { SIG_SCI32, 19, MAP_CALL(FileIOIsValidDirectory), "r", NULL }, // for Torin / Torin demo #endif SCI_SUBOPENTRY_TERMINATOR }; diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index a21e19802d..786276221c 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -688,6 +688,13 @@ reg_t kFileIOCreateSaveSlot(EngineState *s, int argc, reg_t *argv) { return TRUE_REG; // slot creation was successful } +reg_t kFileIOIsValidDirectory(EngineState *s, int argc, reg_t *argv) { + // Used in Torin's Passage and LSL7 to determine if the directory passed as + // a parameter (usually the save directory) is valid. We always return true + // here. + return TRUE_REG; +} + #endif // ---- Save operations ------------------------------------------------------- @@ -1002,7 +1009,7 @@ reg_t kAutoSave(EngineState *s, int argc, reg_t *argv) { // the elapsed time from the timer object) // This function has to return something other than 0 to proceed - return s->r_acc; + return TRUE_REG; } #endif -- cgit v1.2.3 From 43224076e785e615d3ab3a5de53c3aff659a64f2 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jul 2012 01:00:54 +0300 Subject: SCI: Handle the autosave call of Torin's Passage --- engines/sci/engine/kernel_tables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 69baa1cf47..126e972bd2 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -248,7 +248,7 @@ static const SciKernelMapSubEntry kFileIO_subops[] = { #ifdef ENABLE_SCI32 static const SciKernelMapSubEntry kSave_subops[] = { - { SIG_SCI32, 0, MAP_CALL(SaveGame), "[r0]i[r0](r)", NULL }, + { SIG_SCI32, 0, MAP_CALL(SaveGame), "[r0]i[r0](r0)", NULL }, { SIG_SCI32, 1, MAP_CALL(RestoreGame), "[r0]i[r0]", NULL }, { SIG_SCI32, 2, MAP_CALL(GetSaveDir), "(r*)", NULL }, { SIG_SCI32, 3, MAP_CALL(CheckSaveGame), ".*", NULL }, -- cgit v1.2.3 From d757b5b94a0b180ce8e2e59617898a322f8ee0d5 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jul 2012 01:01:35 +0300 Subject: SCI: Update some version checks in kernelFrameout() to work with SCI3 too --- engines/sci/graphics/frameout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 265a175e66..5703579b1e 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -653,7 +653,7 @@ void GfxFrameout::kernelFrameout() { if (view && view->isSci2Hires()) { view->adjustToUpscaledCoordinates(itemEntry->y, itemEntry->x); view->adjustToUpscaledCoordinates(itemEntry->z, dummyX); - } else if (getSciVersion() == SCI_VERSION_2_1) { + } else if (getSciVersion() >= SCI_VERSION_2_1) { _coordAdjuster->fromScriptToDisplay(itemEntry->y, itemEntry->x); _coordAdjuster->fromScriptToDisplay(itemEntry->z, dummyX); } @@ -691,7 +691,7 @@ void GfxFrameout::kernelFrameout() { if (view && view->isSci2Hires()) { view->adjustBackUpscaledCoordinates(nsRect.top, nsRect.left); view->adjustBackUpscaledCoordinates(nsRect.bottom, nsRect.right); - } else if (getSciVersion() == SCI_VERSION_2_1) { + } else if (getSciVersion() >= SCI_VERSION_2_1) { _coordAdjuster->fromDisplayToScript(nsRect.top, nsRect.left); _coordAdjuster->fromDisplayToScript(nsRect.bottom, nsRect.right); } -- cgit v1.2.3 From a0ad504059470b9ac8f5d4025d7bcec1621e1933 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jul 2012 01:06:58 +0300 Subject: SCI: Update some kernel table related comments --- engines/sci/engine/kernel.cpp | 2 +- engines/sci/engine/kernel_tables.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 924641cdbe..46051ef145 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -837,7 +837,7 @@ void Kernel::loadKernelNames(GameFeatures *features) { case SCI_VERSION_2_1: if (features->detectSci21KernelType() == SCI_VERSION_2) { - // Some late SCI2.1 games use a modified SCI2 kernel table instead of + // Some early SCI2.1 games use a modified SCI2 kernel table instead of // the SCI2.1 kernel table. We detect which version to use based on // how kDoSound is called from Sound::play(). // Known games that use this: diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 126e972bd2..114cd58c95 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -828,7 +828,7 @@ static const char *const sci2_default_knames[] = { /*0x20*/ "AddMagnify", /*0x21*/ "DeleteMagnify", /*0x22*/ "IsHiRes", - /*0x23*/ "Graph", + /*0x23*/ "Graph", // Robot in early SCI2.1 games with a SCI2 kernel table /*0x24*/ "InvertRect", // only in SCI2, not used in any SCI2 game /*0x25*/ "TextSize", /*0x26*/ "Message", @@ -839,7 +839,7 @@ static const char *const sci2_default_knames[] = { /*0x2b*/ "EditText", /*0x2c*/ "InputText", // unused function /*0x2d*/ "CreateTextBitmap", - /*0x2e*/ "DisposeTextBitmap", + /*0x2e*/ "DisposeTextBitmap", // Priority in early SCI2.1 games with a SCI2 kernel table /*0x2f*/ "GetEvent", /*0x30*/ "GlobalToLocal", /*0x31*/ "LocalToGlobal", -- cgit v1.2.3 From 8884d7735c652de035f83889ef62ac4177a05996 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 4 Jul 2012 00:23:46 +0200 Subject: GOB: Give the Geisha detection entries proper languages --- engines/gob/detection/tables_geisha.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/engines/gob/detection/tables_geisha.h b/engines/gob/detection/tables_geisha.h index 331e17e31d..83aa543668 100644 --- a/engines/gob/detection/tables_geisha.h +++ b/engines/gob/detection/tables_geisha.h @@ -32,7 +32,21 @@ "geisha", "", AD_ENTRY1s("disk1.stk", "6eebbb98ad90cd3c44549fc2ab30f632", 212153), - UNK_LANG, + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGeisha, + kFeaturesEGA | kFeaturesAdLib, + "disk1.stk", "intro.tot", 0 +}, +{ + { + "geisha", + "", + AD_ENTRY1s("disk1.stk", "6eebbb98ad90cd3c44549fc2ab30f632", 212153), + DE_DEU, kPlatformPC, ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) @@ -63,7 +77,7 @@ "geisha", "", AD_ENTRY1s("disk1.stk", "e5892f00917c62423e93f5fd9920cf47", 208120), - UNK_LANG, + EN_ANY, kPlatformAmiga, ADGF_NO_FLAGS, GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) -- cgit v1.2.3 From 1657b173cc58cea02d99f27abff5e336c52c6d0f Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 4 Jul 2012 00:26:37 +0200 Subject: GOB: Add a French DOS version of Geisha As supplied by misterhands in bug report #3539797. --- engines/gob/detection/tables_geisha.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/engines/gob/detection/tables_geisha.h b/engines/gob/detection/tables_geisha.h index 83aa543668..d05659d9e5 100644 --- a/engines/gob/detection/tables_geisha.h +++ b/engines/gob/detection/tables_geisha.h @@ -55,6 +55,20 @@ kFeaturesEGA | kFeaturesAdLib, "disk1.stk", "intro.tot", 0 }, +{ // Supplied by misterhands in bug report #3539797 + { + "geisha", + "", + AD_ENTRY1s("disk1.stk", "0c4c16090921664f50baefdfd24d7f5d", 211889), + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGeisha, + kFeaturesEGA | kFeaturesAdLib, + "disk1.stk", "intro.tot", 0 +}, { { "geisha", -- cgit v1.2.3 From ff0ab5b5814fd790595d72786bdac2b61937abed Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 4 Jul 2012 00:37:28 +0200 Subject: GOB: Don't print a warning when oGeisha_checkData() doesn't find fin.tot Geisha looks if fin.tot exists to check if it needs to open disk3.stk. This is completely normal, so don't print a warning. --- engines/gob/inter_geisha.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/engines/gob/inter_geisha.cpp b/engines/gob/inter_geisha.cpp index 8a4d4246b6..8d05cefa66 100644 --- a/engines/gob/inter_geisha.cpp +++ b/engines/gob/inter_geisha.cpp @@ -200,8 +200,12 @@ void Inter_Geisha::oGeisha_checkData(OpFuncParams ¶ms) { if (mode == SaveLoad::kSaveModeNone) { exists = _vm->_dataIO->hasFile(file); - if (!exists) - warning("File \"%s\" not found", file.c_str()); + if (!exists) { + // NOTE: Geisha looks if fin.tot exists to check if it needs to open disk3.stk. + // This is completely normal, so don't print a warning. + if (file != "fin.tot") + warning("File \"%s\" not found", file.c_str()); + } } else if (mode == SaveLoad::kSaveModeSave) exists = _vm->_saveLoad->getSize(file.c_str()) >= 0; -- cgit v1.2.3 From d74d211479660eee0d9c63f10ddd1191340fdb02 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jul 2012 02:14:57 +0300 Subject: SCI: Mark the SetScroll and SetHotRectangles kernel functions as unused --- engines/sci/engine/kernel_tables.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 114cd58c95..04b221d2b0 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -520,7 +520,6 @@ static SciKernelMapEntry s_kernelMap[] = { // SCI2 unmapped functions - TODO! - // SetScroll - called by script 64909, Styler::doit() // PalCycle - called by Game::newRoom. Related to RemapColors. // SCI2 Empty functions @@ -561,6 +560,11 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_DUMMY(InputText), SIG_EVERYWHERE, "(.*)", NULL, NULL }, { MAP_DUMMY(TextWidth), SIG_EVERYWHERE, "(.*)", NULL, NULL }, { MAP_DUMMY(PointSize), SIG_EVERYWHERE, "(.*)", NULL, NULL }, + // SetScroll is called by script 64909, Styler::doit(), but it doesn't seem to + // be used at all (plus, it was then changed to a dummy function in SCI3). + // Since this is most likely unused, and we got no test case, error out when + // it is called in order to find an actual call to it. + { MAP_DUMMY(SetScroll), SIG_EVERYWHERE, "(.*)", NULL, NULL }, // SCI2.1 Kernel Functions { MAP_CALL(CD), SIG_EVERYWHERE, "(.*)", NULL, NULL }, @@ -620,6 +624,8 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_DUMMY(WinDLL), SIG_EVERYWHERE, "(.*)", NULL, NULL }, { MAP_DUMMY(DeletePic), SIG_EVERYWHERE, "(.*)", NULL, NULL }, { MAP_DUMMY(GetSierraProfileString), SIG_EVERYWHERE, "(.*)", NULL, NULL }, + // SetHotRectangles is used by Phantasmagoria 1, script 64981 (a debug script) + { MAP_DUMMY(SetHotRectangles), SIG_EVERYWHERE, "(.*)", NULL, NULL }, // Unused / debug functions in the in-between SCI2.1 interpreters { MAP_DUMMY(PreloadResource), SIG_EVERYWHERE, "(.*)", NULL, NULL }, @@ -633,7 +639,6 @@ static SciKernelMapEntry s_kernelMap[] = { // SetPalStyleRange - 2 integer parameters, start and end. All styles from start-end // (inclusive) are set to 0 // MorphOn - used by SQ6, script 900, the datacorder reprogramming puzzle (from room 270) - // SetHotRectangles - used by Phantasmagoria 1 // SCI3 Kernel Functions { MAP_CALL(PlayDuck), SIG_EVERYWHERE, "(.*)", NULL, NULL }, -- cgit v1.2.3 From dc1a097e508fc4cd323314fd5dde4dfe648f7c64 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jul 2012 02:15:39 +0300 Subject: SCI: Make the debug message in kSetShowStyle more verbose --- engines/sci/engine/kgraphics32.cpp | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 14ea409a58..072d4df021 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -224,12 +224,12 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) { // tables inside graphics/transitions.cpp uint16 showStyle = argv[0].toUint16(); // 0 - 15 reg_t planeObj = argv[1]; // the affected plane - //uint16 seconds = argv[2].toUint16(); // seconds that the transition lasts - //uint16 backColor = argv[3].toUint16(); // target back color(?). When fading out, it's 0x0000. When fading in, it's 0xffff - //int16 priority = argv[4].toSint16(); // always 0xc8 (200) when fading in/out - //uint16 animate = argv[5].toUint16(); // boolean, animate or not while the transition lasts - //uint16 refFrame = argv[6].toUint16(); // refFrame, always 0 when fading in/out -#if 0 + Common::String planeObjName = s->_segMan->getObjectName(planeObj); + uint16 seconds = argv[2].toUint16(); // seconds that the transition lasts + uint16 backColor = argv[3].toUint16(); // target back color(?). When fading out, it's 0x0000. When fading in, it's 0xffff + int16 priority = argv[4].toSint16(); // always 0xc8 (200) when fading in/out + uint16 animate = argv[5].toUint16(); // boolean, animate or not while the transition lasts + uint16 refFrame = argv[6].toUint16(); // refFrame, always 0 when fading in/out int16 divisions; // If the game has the pFadeArray selector, another parameter is used here, @@ -241,7 +241,7 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) { } else { divisions = (argc >= 8) ? argv[7].toSint16() : -1; // divisions (transition steps?) } -#endif + if (showStyle > 15) { warning("kSetShowStyle: Illegal style %d for plane %04x:%04x", showStyle, PRINT_REG(planeObj)); return s->r_acc; @@ -257,18 +257,29 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) { // TODO: Check if the plane is in the list of planes to draw + Common::String effectName = "unknown"; + switch (showStyle) { - //case 0: // no transition, perhaps? (like in the previous SCI versions) + case 0: // no transition / show + effectName = "show"; + break; case 13: // fade out + effectName = "fade out"; // TODO + break; case 14: // fade in + effectName = "fade in"; // TODO + break; default: - // TODO: This is all a stub/skeleton, thus we're invoking kStub() for now - kStub(s, argc, argv); + // TODO break; } + warning("kSetShowStyle: effect %d (%s) - plane: %04x:%04x (%s), sec: %d, " + "back: %d, prio: %d, animate: %d, ref frame: %d, divisions: %d", + showStyle, effectName.c_str(), PRINT_REG(planeObj), planeObjName.c_str(), + seconds, backColor, priority, animate, refFrame, divisions); return s->r_acc; } -- cgit v1.2.3 From 5d3e22ae4f5fcf6c7717eb9e50767b3fbb5a10f8 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jul 2012 02:17:27 +0300 Subject: SCI: Some cleanup of the warnings in the SCI32 plane manipulation code --- engines/sci/graphics/frameout.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 5703579b1e..450460023c 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -326,8 +326,10 @@ void GfxFrameout::deletePlaneLine(reg_t object, reg_t hunkId) { void GfxFrameout::kernelAddScreenItem(reg_t object) { // Ignore invalid items - if (!_segMan->isObject(object)) + if (!_segMan->isObject(object)) { + warning("kernelAddScreenItem: Attempt to add an invalid object (%04x:%04x)", PRINT_REG(object)); return; + } FrameoutEntry *itemEntry = new FrameoutEntry(); memset(itemEntry, 0, sizeof(FrameoutEntry)); @@ -341,8 +343,10 @@ void GfxFrameout::kernelAddScreenItem(reg_t object) { void GfxFrameout::kernelUpdateScreenItem(reg_t object) { // Ignore invalid items - if (!_segMan->isObject(object)) + if (!_segMan->isObject(object)) { + warning("kernelUpdateScreenItem: Attempt to update an invalid object (%04x:%04x)", PRINT_REG(object)); return; + } FrameoutEntry *itemEntry = findScreenItem(object); if (!itemEntry) { @@ -372,10 +376,9 @@ void GfxFrameout::kernelUpdateScreenItem(reg_t object) { void GfxFrameout::kernelDeleteScreenItem(reg_t object) { FrameoutEntry *itemEntry = findScreenItem(object); - if (!itemEntry) { - warning("kernelDeleteScreenItem: invalid object %04x:%04x", PRINT_REG(object)); + // If the item could not be found, it may already have been deleted + if (!itemEntry) return; - } _screenItems.remove(itemEntry); delete itemEntry; -- cgit v1.2.3 From 243ea1fa290a919d5f0a07094782465f0ba08d7e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jul 2012 02:20:39 +0300 Subject: SCI: Add a check for invalid clip rectangles Happens in QFG4, when starting a battle --- engines/sci/graphics/frameout.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 450460023c..5b857fe3d8 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -722,6 +722,9 @@ void GfxFrameout::kernelFrameout() { translatedClipRect = clipRect; translatedClipRect.translate(it->upscaledPlaneRect.left, it->upscaledPlaneRect.top); } else { + // QFG4 passes invalid rectangles when a battle is starting + if (!clipRect.isValidRect()) + continue; clipRect.clip(it->planeClipRect); translatedClipRect = clipRect; translatedClipRect.translate(it->planeRect.left, it->planeRect.top); -- cgit v1.2.3 From 7e2cf139a97764bcd45252f6d54f0247b2d4939b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 4 Jul 2012 01:59:32 +0200 Subject: KYRA: Improve wording about possibly incorrect MT32->GM mapping. --- engines/kyra/sound_midi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/kyra/sound_midi.cpp b/engines/kyra/sound_midi.cpp index 0004395f6f..70cc304192 100644 --- a/engines/kyra/sound_midi.cpp +++ b/engines/kyra/sound_midi.cpp @@ -475,8 +475,8 @@ SoundMidiPC::SoundMidiPC(KyraEngine_v1 *vm, Audio::Mixer *mixer, MidiDriver *dri ::GUI::MessageDialog dialog(_("You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" - "General MIDI ones. After all it might happen\n" - "that a few tracks will not be correctly played.")); + "General MIDI ones. It is still possible that\n" + "some tracks sound incorrect.")); dialog.runModal(); } } -- cgit v1.2.3 From 55d322346832d41c42bb058bdc263d755e0f598b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 4 Jul 2012 02:01:47 +0200 Subject: SCI: Fix spelling of Yamaha. Thanks to somaen for noticing. --- engines/sci/detection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 8a74bc817c..58ac5f1fa6 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -397,8 +397,8 @@ static const ADExtraGuiOptionsMap optionsList[] = { { GAMEOPTION_FB01_MIDI, { - _s("Use IMF/Yahama FB-01 for MIDI output"), - _s("Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI output"), + _s("Use IMF/Yamaha FB-01 for MIDI output"), + _s("Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI output"), "native_fb01", false } -- cgit v1.2.3 From 604c6bde91a9f1fb71d18f8fdcc172fc738ff9ef Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 4 Jul 2012 02:02:02 +0200 Subject: DOCS: Fix spelling of Yamaha. --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 722f3298d3..8d4ca4bc22 100644 --- a/README +++ b/README @@ -2084,7 +2084,7 @@ Sierra games using the SCI engine add the following non-standard keywords: originalsaveload bool If true, the original save/load screens are used instead of the enhanced ScummVM ones native_fb01 bool If true, the music driver for an IBM Music - Feature card or a Yahama FB-01 FM synth module + Feature card or a Yamaha FB-01 FM synth module is used for MIDI output Broken Sword II adds the following non-standard keywords: -- cgit v1.2.3 From 190efefdd259eedc10d8d8ea4e113392daff12af Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan SømaÌŠen Date: Wed, 4 Jul 2012 02:20:42 +0200 Subject: I18N: Update the Norwegian (BokmaÌŠl)-translation --- po/nb_NO.po | 1039 ++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 567 insertions(+), 472 deletions(-) diff --git a/po/nb_NO.po b/po/nb_NO.po index 9dfc58331c..0975877d65 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-06-24 18:06+0100\n" -"PO-Revision-Date: 2011-04-25 22:56+0100\n" -"Last-Translator: Einar Johan T. Sømåen \n" +"PO-Revision-Date: 2012-07-04 02:19+0100\n" +"Last-Translator: Einar Johan Sømåen \n" "Language-Team: somaen \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" @@ -37,7 +37,8 @@ msgstr "Tilgjengelige motorer:" msgid "Go up" msgstr "Gå tilbake" -#: gui/browser.cpp:66 gui/browser.cpp:68 +#: gui/browser.cpp:66 +#: gui/browser.cpp:68 msgid "Go to previous directory level" msgstr "Gå til forrige mappenivå" @@ -46,24 +47,37 @@ msgctxt "lowres" msgid "Go up" msgstr "Gå tilbake" -#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 +#: gui/browser.cpp:69 +#: gui/chooser.cpp:45 +#: gui/KeysDialog.cpp:43 +#: gui/launcher.cpp:345 +#: gui/massadd.cpp:94 +#: gui/options.cpp:1228 +#: gui/saveload.cpp:64 +#: gui/saveload.cpp:173 +#: gui/themebrowser.cpp:54 +#: engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 +#: engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" msgstr "Avbryt" -#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55 +#: gui/browser.cpp:70 +#: gui/chooser.cpp:46 +#: gui/themebrowser.cpp:55 msgid "Choose" msgstr "Velg" -#: gui/gui-manager.cpp:115 engines/scumm/help.cpp:125 -#: engines/scumm/help.cpp:140 engines/scumm/help.cpp:165 -#: engines/scumm/help.cpp:191 engines/scumm/help.cpp:209 +#: gui/gui-manager.cpp:115 +#: engines/scumm/help.cpp:125 +#: engines/scumm/help.cpp:140 +#: engines/scumm/help.cpp:165 +#: engines/scumm/help.cpp:191 +#: engines/scumm/help.cpp:209 #: backends/keymapper/remap-dialog.cpp:52 msgid "Close" msgstr "Lukk" @@ -72,20 +86,23 @@ msgstr "Lukk" msgid "Mouse click" msgstr "Musklikk" -#: gui/gui-manager.cpp:122 base/main.cpp:300 +#: gui/gui-manager.cpp:122 +#: base/main.cpp:300 msgid "Display keyboard" msgstr "Vis tastatur" -#: gui/gui-manager.cpp:126 base/main.cpp:304 +#: gui/gui-manager.cpp:126 +#: base/main.cpp:304 msgid "Remap keys" msgstr "Omkoble taster" -#: gui/gui-manager.cpp:129 base/main.cpp:307 -#, fuzzy +#: gui/gui-manager.cpp:129 +#: base/main.cpp:307 msgid "Toggle FullScreen" msgstr "Veksle fullskjerm" -#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145 +#: gui/KeysDialog.h:36 +#: gui/KeysDialog.cpp:145 msgid "Choose an action to map" msgstr "Velg en handling for kobling" @@ -93,17 +110,31 @@ msgstr "Velg en handling for kobling" msgid "Map" msgstr "Koble" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 -#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 +#: gui/KeysDialog.cpp:42 +#: gui/launcher.cpp:346 +#: gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 +#: gui/massadd.cpp:91 +#: gui/options.cpp:1229 +#: engines/engine.cpp:361 +#: engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 +#: engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 +#: engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 +#: engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 +#: engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 +#: engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 +#: engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 +#: engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 +#: engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -113,12 +144,16 @@ msgstr "OK" msgid "Select an action and click 'Map'" msgstr "Velg en handling, og trykk 'Koble'" -#: gui/KeysDialog.cpp:80 gui/KeysDialog.cpp:102 gui/KeysDialog.cpp:141 +#: gui/KeysDialog.cpp:80 +#: gui/KeysDialog.cpp:102 +#: gui/KeysDialog.cpp:141 #, c-format msgid "Associated key : %s" msgstr "Koblet tast : %s" -#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143 +#: gui/KeysDialog.cpp:82 +#: gui/KeysDialog.cpp:104 +#: gui/KeysDialog.cpp:143 #, c-format msgid "Associated key : none" msgstr "Koblet tast: ingen" @@ -139,13 +174,11 @@ msgstr "Spill" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 -msgid "" -"Short game identifier used for referring to savegames and running the game " -"from the command line" -msgstr "" -"Kort spill-identifikator, brukt for å referere til lagrede spill, og å kjøre " -"spillet fra kommandolinjen" +#: gui/launcher.cpp:191 +#: gui/launcher.cpp:193 +#: gui/launcher.cpp:194 +msgid "Short game identifier used for referring to savegames and running the game from the command line" +msgstr "Kort spill-identifikator, brukt for å referere til lagrede spill, og å kjøre spillet fra kommandolinjen" #: gui/launcher.cpp:193 msgctxt "lowres" @@ -156,7 +189,9 @@ msgstr "ID:" msgid "Name:" msgstr "Navn:" -#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 +#: gui/launcher.cpp:198 +#: gui/launcher.cpp:200 +#: gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Full spilltittel" @@ -169,16 +204,17 @@ msgstr "Navn:" msgid "Language:" msgstr "Språk:" -#: gui/launcher.cpp:204 gui/launcher.cpp:205 -msgid "" -"Language of the game. This will not turn your Spanish game version into " -"English" -msgstr "" -"Spillets språk. Dette vil ikke gjøre din spanske spillversjon om til engelsk " -"versjon" +#: gui/launcher.cpp:204 +#: gui/launcher.cpp:205 +msgid "Language of the game. This will not turn your Spanish game version into English" +msgstr "Spillets språk. Dette vil ikke gjøre din spanske spillversjon om til engelsk versjon" -#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 -#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 +#: gui/launcher.cpp:206 +#: gui/launcher.cpp:220 +#: gui/options.cpp:80 +#: gui/options.cpp:730 +#: gui/options.cpp:743 +#: gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" @@ -187,7 +223,9 @@ msgstr "" msgid "Platform:" msgstr "Plattform:" -#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 +#: gui/launcher.cpp:216 +#: gui/launcher.cpp:218 +#: gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Plattform spillet opprinnelig ble designet for" @@ -197,15 +235,18 @@ msgid "Platform:" msgstr "Plattform:" #: gui/launcher.cpp:231 -#, fuzzy msgid "Engine" -msgstr "Undersøk" +msgstr "Motor" -#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 +#: gui/launcher.cpp:239 +#: gui/options.cpp:1062 +#: gui/options.cpp:1079 msgid "Graphics" msgstr "Grafikk" -#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 +#: gui/launcher.cpp:239 +#: gui/options.cpp:1062 +#: gui/options.cpp:1079 msgid "GFX" msgstr "GFX" @@ -218,7 +259,8 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Overstyr globale grafikkinstillinger" -#: gui/launcher.cpp:251 gui/options.cpp:1085 +#: gui/launcher.cpp:251 +#: gui/options.cpp:1085 msgid "Audio" msgstr "Lyd" @@ -231,11 +273,13 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Overstyr globale lydinstillinger" -#: gui/launcher.cpp:265 gui/options.cpp:1090 +#: gui/launcher.cpp:265 +#: gui/options.cpp:1090 msgid "Volume" msgstr "Volum" -#: gui/launcher.cpp:267 gui/options.cpp:1092 +#: gui/launcher.cpp:267 +#: gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Volum" @@ -249,7 +293,8 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Overstyr globale voluminstillinger" -#: gui/launcher.cpp:280 gui/options.cpp:1100 +#: gui/launcher.cpp:280 +#: gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" @@ -262,7 +307,8 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Overstyr globale MIDI-instillinger" -#: gui/launcher.cpp:294 gui/options.cpp:1106 +#: gui/launcher.cpp:294 +#: gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" @@ -275,11 +321,13 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Overstyr globale MT-32-instillinger" -#: gui/launcher.cpp:308 gui/options.cpp:1113 +#: gui/launcher.cpp:308 +#: gui/options.cpp:1113 msgid "Paths" msgstr "Sti" -#: gui/launcher.cpp:310 gui/options.cpp:1115 +#: gui/launcher.cpp:310 +#: gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Sti" @@ -293,54 +341,80 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Spillsti:" -#: gui/launcher.cpp:324 gui/options.cpp:1139 +#: gui/launcher.cpp:324 +#: gui/options.cpp:1139 msgid "Extra Path:" msgstr "Ekstrasti:" -#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 +#: gui/launcher.cpp:324 +#: gui/launcher.cpp:326 +#: gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Bestemmer sti til ytterligere data brukt av spillet" -#: gui/launcher.cpp:326 gui/options.cpp:1141 +#: gui/launcher.cpp:326 +#: gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Ekstrasti:" -#: gui/launcher.cpp:333 gui/options.cpp:1123 +#: gui/launcher.cpp:333 +#: gui/options.cpp:1123 msgid "Save Path:" msgstr "Lagringssti:" -#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 -#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 +#: gui/launcher.cpp:333 +#: gui/launcher.cpp:335 +#: gui/launcher.cpp:336 +#: gui/options.cpp:1123 +#: gui/options.cpp:1125 +#: gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Bestemmer sti til lagrede spill" -#: gui/launcher.cpp:335 gui/options.cpp:1125 +#: gui/launcher.cpp:335 +#: gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Lagringssti:" -#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 -#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 -#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 -#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 -#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/launcher.cpp:354 +#: gui/launcher.cpp:453 +#: gui/launcher.cpp:511 +#: gui/launcher.cpp:565 +#: gui/options.cpp:1134 +#: gui/options.cpp:1142 +#: gui/options.cpp:1151 +#: gui/options.cpp:1258 +#: gui/options.cpp:1264 +#: gui/options.cpp:1272 +#: gui/options.cpp:1302 +#: gui/options.cpp:1308 +#: gui/options.cpp:1315 +#: gui/options.cpp:1408 +#: gui/options.cpp:1411 #: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Ingen" -#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 -#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 +#: gui/launcher.cpp:359 +#: gui/launcher.cpp:459 +#: gui/launcher.cpp:569 +#: gui/options.cpp:1252 +#: gui/options.cpp:1296 +#: gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standard" -#: gui/launcher.cpp:504 gui/options.cpp:1417 +#: gui/launcher.cpp:504 +#: gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Velg SoundFont" -#: gui/launcher.cpp:523 gui/launcher.cpp:677 +#: gui/launcher.cpp:523 +#: gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Velg mappe med spilldata" @@ -356,11 +430,13 @@ msgstr "Velg mappe for lagrede spill" msgid "This game ID is already taken. Please choose another one." msgstr "Denne spill-IDen er allerede i bruk. Vennligst velg en annen." -#: gui/launcher.cpp:621 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 +#: engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~A~vslutt" -#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 +#: backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Avslutt ScummVM" @@ -368,7 +444,8 @@ msgstr "Avslutt ScummVM" msgid "A~b~out..." msgstr "~O~m..." -#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 +#: backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "Om ScummVM" @@ -396,11 +473,13 @@ msgstr "~ msgid "Load savegame for selected game" msgstr "Åpne lagret spill for det valgte spillet" -#: gui/launcher.cpp:633 gui/launcher.cpp:1120 +#: gui/launcher.cpp:633 +#: gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~L~egg til spill..." -#: gui/launcher.cpp:633 gui/launcher.cpp:640 +#: gui/launcher.cpp:633 +#: gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Hold Shift for å legge til flere" @@ -408,7 +487,8 @@ msgstr "Hold Shift for msgid "~E~dit Game..." msgstr "~R~ediger spill..." -#: gui/launcher.cpp:635 gui/launcher.cpp:642 +#: gui/launcher.cpp:635 +#: gui/launcher.cpp:642 msgid "Change game options" msgstr "Endre spillinstillinger" @@ -416,11 +496,13 @@ msgstr "Endre spillinstillinger" msgid "~R~emove Game" msgstr "~F~jern spill" -#: gui/launcher.cpp:637 gui/launcher.cpp:644 +#: gui/launcher.cpp:637 +#: gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Fjern spill fra listen. Spilldataene forblir intakte" -#: gui/launcher.cpp:640 gui/launcher.cpp:1120 +#: gui/launcher.cpp:640 +#: gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~L~egg til spill..." @@ -439,31 +521,36 @@ msgstr "~F~jern spill" msgid "Search in game list" msgstr "Søk i spilliste" -#: gui/launcher.cpp:656 gui/launcher.cpp:1167 +#: gui/launcher.cpp:656 +#: gui/launcher.cpp:1167 msgid "Search:" msgstr "Søk:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 +#: gui/launcher.cpp:680 +#: engines/dialogs.cpp:114 +#: engines/mohawk/myst.cpp:255 +#: engines/mohawk/riven.cpp:716 +#: engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Åpne spill:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 +#: gui/launcher.cpp:680 +#: engines/dialogs.cpp:114 +#: engines/scumm/dialogs.cpp:188 +#: engines/mohawk/myst.cpp:255 +#: engines/mohawk/riven.cpp:716 +#: engines/cruise/menu.cpp:214 +#: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Åpne" #: gui/launcher.cpp:788 -msgid "" -"Do you really want to run the mass game detector? This could potentially add " -"a huge number of games." -msgstr "" -"Vil du virkelig kjøre flerspill-finneren? Dette kan potensielt legge til et " -"stort antall spill." +msgid "Do you really want to run the mass game detector? This could potentially add a huge number of games." +msgstr "Vil du virkelig kjøre flerspill-finneren? Dette kan potensielt legge til et stort antall spill." -#: gui/launcher.cpp:789 gui/launcher.cpp:937 +#: gui/launcher.cpp:789 +#: gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -471,7 +558,8 @@ msgstr "" msgid "Yes" msgstr "Ja" -#: gui/launcher.cpp:789 gui/launcher.cpp:937 +#: gui/launcher.cpp:789 +#: gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -501,8 +589,7 @@ msgstr "Dette spillet st #: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" -msgstr "" -"ScummVM kunne ikke finne noen motor som kunne kjøre det valgte spillet!" +msgstr "ScummVM kunne ikke finne noen motor som kunne kjøre det valgte spillet!" #: gui/launcher.cpp:1119 msgctxt "lowres" @@ -513,7 +600,8 @@ msgstr "Legg til flere..." msgid "Mass Add..." msgstr "Legg til flere..." -#: gui/massadd.cpp:78 gui/massadd.cpp:81 +#: gui/massadd.cpp:78 +#: gui/massadd.cpp:81 msgid "... progress ..." msgstr "... fremdrift ..." @@ -524,7 +612,7 @@ msgstr "S #: gui/massadd.cpp:261 #, c-format msgid "Discovered %d new games, ignored %d previously added games." -msgstr "" +msgstr "Fant %d nye spill, ignorerte %d spill som har blitt lagt til tidligere." #: gui/massadd.cpp:265 #, c-format @@ -532,9 +620,9 @@ msgid "Scanned %d directories ..." msgstr "Sjekket %d mapper ..." #: gui/massadd.cpp:268 -#, fuzzy, c-format +#, c-format msgid "Discovered %d new games, ignored %d previously added games ..." -msgstr "Fant %d nye spill ..." +msgstr "Fant %d nye spill, ignorerte %d spill som har blitt lagt til tidligere..." #: gui/options.cpp:78 msgid "Never" @@ -576,27 +664,30 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 -#: gui/options.cpp:644 gui/options.cpp:852 +#: gui/options.cpp:248 +#: gui/options.cpp:474 +#: gui/options.cpp:575 +#: gui/options.cpp:644 +#: gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Ingen" #: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" -msgstr "" +msgstr "Klarte ikke å aktivere enkelte av endringene i grafikkinstillinger:" #: gui/options.cpp:394 msgid "the video mode could not be changed." -msgstr "" +msgstr "videomodusen kunne ikke endres." #: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" -msgstr "" +msgstr "fullskjermsinnstillingen kunne ikke endres" #: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" -msgstr "" +msgstr "aspektrate-innstillingen kunne ikke endres" #: gui/options.cpp:727 msgid "Graphics mode:" @@ -606,7 +697,8 @@ msgstr "Grafikkmodus:" msgid "Render mode:" msgstr "Tegnemodus:" -#: gui/options.cpp:741 gui/options.cpp:742 +#: gui/options.cpp:741 +#: gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Spesiel dithering-modus støttet av enkelte spill" @@ -632,11 +724,14 @@ msgstr "Foretrukket enhet:" msgid "Music Device:" msgstr "Musikkenhet:" -#: gui/options.cpp:764 gui/options.cpp:766 +#: gui/options.cpp:764 +#: gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "Velger foretrukket lydenhet eller lydkort-emulator" -#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 +#: gui/options.cpp:764 +#: gui/options.cpp:766 +#: gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Velger ut-lydenhet eller lydkortemulator" @@ -654,7 +749,8 @@ msgstr "Musikkenhet:" msgid "AdLib emulator:" msgstr "AdLib-emulator:" -#: gui/options.cpp:793 gui/options.cpp:794 +#: gui/options.cpp:793 +#: gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib brukes til musikk i mange spill" @@ -662,13 +758,10 @@ msgstr "AdLib brukes til musikk i mange spill" msgid "Output rate:" msgstr "Utrate:" -#: gui/options.cpp:804 gui/options.cpp:805 -msgid "" -"Higher value specifies better sound quality but may be not supported by your " -"soundcard" -msgstr "" -"Høyere verdier gir bedre lydkvalitet, men støttes kanskje ikke av ditt " -"lydkort " +#: gui/options.cpp:804 +#: gui/options.cpp:805 +msgid "Higher value specifies better sound quality but may be not supported by your soundcard" +msgstr "Høyere verdier gir bedre lydkvalitet, men støttes kanskje ikke av ditt lydkort " #: gui/options.cpp:815 msgid "GM Device:" @@ -682,7 +775,8 @@ msgstr "Velger standard lydenhet for General MIDI-utdata" msgid "Don't use General MIDI music" msgstr "Ikke bruk General MIDI-musikk" -#: gui/options.cpp:837 gui/options.cpp:899 +#: gui/options.cpp:837 +#: gui/options.cpp:899 msgid "Use first available device" msgstr "Bruk første tilgjengelige enhet" @@ -690,7 +784,9 @@ msgstr "Bruk f msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 +#: gui/options.cpp:849 +#: gui/options.cpp:851 +#: gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "SoundFont støttes ikke av enkelte lydkort, FluidSynth og Timidity" @@ -723,13 +819,10 @@ msgstr "Velger standard lydenhet for Roland MT-32/LAPC1/CM32I/CM64-avspilling" msgid "True Roland MT-32 (disable GM emulation)" msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)" -#: gui/options.cpp:875 gui/options.cpp:877 -msgid "" -"Check if you want to use your real hardware Roland-compatible sound device " -"connected to your computer" -msgstr "" -"Velg hvis du har et ekte Roland-kompatible lydkort tilkoblet maskinen, og " -"vil bruke dette." +#: gui/options.cpp:875 +#: gui/options.cpp:877 +msgid "Check if you want to use your real hardware Roland-compatible sound device connected to your computer" +msgstr "Velg hvis du har et ekte Roland-kompatible lydkort tilkoblet maskinen, og vil bruke dette." #: gui/options.cpp:877 msgctxt "lowres" @@ -752,11 +845,13 @@ msgstr "Ikke bruk Roland MT-32-musikk" msgid "Text and Speech:" msgstr "Tekst og Tale:" -#: gui/options.cpp:920 gui/options.cpp:930 +#: gui/options.cpp:920 +#: gui/options.cpp:930 msgid "Speech" msgstr "Tale" -#: gui/options.cpp:921 gui/options.cpp:931 +#: gui/options.cpp:921 +#: gui/options.cpp:931 msgid "Subtitles" msgstr "Undertekster" @@ -812,7 +907,9 @@ msgstr "Demp alle" msgid "SFX volume:" msgstr "Lydeffektvolum:" -#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 +#: gui/options.cpp:962 +#: gui/options.cpp:964 +#: gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Volum for spesielle lydeffekter" @@ -839,7 +936,9 @@ msgctxt "lowres" msgid "Theme Path:" msgstr "Temasti:" -#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 +#: gui/options.cpp:1139 +#: gui/options.cpp:1141 +#: gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Velger sti for ytterligere data brukt av alle spill eller ScummVM" @@ -891,9 +990,8 @@ msgid "Language of ScummVM GUI" msgstr "Språk i ScummVM-GUIet" #: gui/options.cpp:1347 -#, fuzzy msgid "You have to restart ScummVM before your changes will take effect." -msgstr "Du må omstarte ScummVM for at endringene skal skje. " +msgstr "Du må starte ScummVM på nytt for at endringene skal tre i kraft. " #: gui/options.cpp:1360 msgid "Select directory for savegames" @@ -916,26 +1014,26 @@ msgid "Select directory for plugins" msgstr "Velg mappe for plugins" #: gui/options.cpp:1450 -msgid "" -"The theme you selected does not support your current language. If you want " -"to use this theme you need to switch to another language first." -msgstr "" -"Temaet du valgte støtter ikke det aktive språket. Hvis du vil bruke dette " -"temaet, må du bytte til et annet språk først." +msgid "The theme you selected does not support your current language. If you want to use this theme you need to switch to another language first." +msgstr "Temaet du valgte støtter ikke det aktive språket. Hvis du vil bruke dette temaet, må du bytte til et annet språk først." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload.cpp:59 +#: gui/saveload.cpp:257 msgid "No date saved" msgstr "Ingen dato lagret" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload.cpp:60 +#: gui/saveload.cpp:258 msgid "No time saved" msgstr "Ingen tid lagret" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload.cpp:61 +#: gui/saveload.cpp:259 msgid "No playtime saved" msgstr "Ingen spilltid lagret" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload.cpp:68 +#: gui/saveload.cpp:173 msgid "Delete" msgstr "Slett" @@ -955,7 +1053,8 @@ msgstr "Tid: " msgid "Playtime: " msgstr "Spilltid: " -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload.cpp:305 +#: gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Ikke navngitt spilltilstand" @@ -988,7 +1087,10 @@ msgstr "Antialiased Tegner (16bpp)" msgid "Antialiased (16bpp)" msgstr "Antialiased (16bpp)" -#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 +#: gui/widget.cpp:322 +#: gui/widget.cpp:324 +#: gui/widget.cpp:330 +#: gui/widget.cpp:332 msgid "Clear value" msgstr "Tøm verdi" @@ -1001,13 +1103,15 @@ msgstr "Motoren st msgid "Menu" msgstr "Meny" -#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 +#: backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Hopp over" -#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 +#: backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pause" @@ -1082,7 +1186,7 @@ msgstr "Spillmotor-plugin st #: common/error.cpp:71 msgid "User canceled" -msgstr "" +msgstr "Brukeren avbrøt" #: common/error.cpp:75 msgid "Unknown error" @@ -1091,15 +1195,15 @@ msgstr "Ukjent feil" #: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." -msgstr "" +msgstr "Spillet i '%s' ser ut til å være ukjent." #: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" -msgstr "" +msgstr "Vennligst rapporter de følgende dataene til ScummVM-teamet sammen med navnet" #: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" -msgstr "" +msgstr "på spillet du forsøkte å legge til, og dets versjon/språk/etc.:" #: engines/dialogs.cpp:84 msgid "~R~esume" @@ -1125,22 +1229,28 @@ msgstr "~H~jelp" msgid "~A~bout" msgstr "~O~m" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 +#: engines/dialogs.cpp:104 +#: engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "~T~ilbake til oppstarter" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:106 +#: engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~T~ilbake til oppstarter" -#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/dialogs.cpp:115 +#: engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:728 msgid "Save game:" msgstr "Lagret spill:" -#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/dialogs.cpp:115 +#: engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 +#: engines/cruise/menu.cpp:212 #: engines/sci/engine/kfile.cpp:728 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 @@ -1151,25 +1261,22 @@ msgid "Save" msgstr "Lagre" #: engines/dialogs.cpp:144 -msgid "" -"Sorry, this engine does not currently provide in-game help. Please consult " -"the README for basic information, and for instructions on how to obtain " -"further assistance." -msgstr "" +msgid "Sorry, this engine does not currently provide in-game help. Please consult the README for basic information, and for instructions on how to obtain further assistance." +msgstr "Beklager, men denne motoren støtter for øyeblikket ikke hjelp i spillet. Vennligst se i README-filen for grunnleggende informasjon, og for instruksjoner om hvordan du kan få ytterligere hjelp." #: engines/dialogs.cpp:228 #, c-format -msgid "" -"Gamestate save failed (%s)! Please consult the README for basic information, " -"and for instructions on how to obtain further assistance." -msgstr "" +msgid "Gamestate save failed (%s)! Please consult the README for basic information, and for instructions on how to obtain further assistance." +msgstr "Lagring av spilltilstand feilet (%s)! Vennligst konsulter README-filen for grunnleggende informasjon og instruksjon om hvordan du får ytterligere hjelp." -#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 +#: engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 +#: engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~A~vbryt" @@ -1180,21 +1287,19 @@ msgstr "~T~aster" #: engines/engine.cpp:235 msgid "Could not initialize color format." -msgstr "" +msgstr "Kunne ikke initalisere fargeformat." #: engines/engine.cpp:243 -#, fuzzy msgid "Could not switch to video mode: '" -msgstr "Nåværende videomodus:" +msgstr "Kunne ikke veksle til videomodus: '" #: engines/engine.cpp:252 -#, fuzzy msgid "Could not apply aspect ratio setting." -msgstr "Veksle aspekt-rate korrigering" +msgstr "Kunne ikke aktivere aspektrate-innstilling." #: engines/engine.cpp:257 msgid "Could not apply fullscreen setting." -msgstr "" +msgstr "Kunne ikke aktivere fullskjermsinnstilling." #: engines/engine.cpp:357 msgid "" @@ -1204,6 +1309,11 @@ msgid "" "the data files to your hard disk instead.\n" "See the README file for details." msgstr "" +"Du ser ut til å spille dette spillet direkte fra\n" +"CDen. Dette er kjent for å skape problemer,\n" +"og det er derfor anbefalt at du kopierer\n" +"datafilene til harddisken din istedet.\n" +"Se README-filen for detaljer." #: engines/engine.cpp:368 msgid "" @@ -1216,108 +1326,99 @@ msgstr "" #: engines/engine.cpp:426 #, c-format -msgid "" -"Gamestate load failed (%s)! Please consult the README for basic information, " -"and for instructions on how to obtain further assistance." +msgid "Gamestate load failed (%s)! Please consult the README for basic information, and for instructions on how to obtain further assistance." msgstr "" #: engines/engine.cpp:439 -msgid "" -"WARNING: The game you are about to start is not yet fully supported by " -"ScummVM. As such, it is likely to be unstable, and any saves you make might " -"not work in future versions of ScummVM." -msgstr "" +msgid "WARNING: The game you are about to start is not yet fully supported by ScummVM. As such, it is likely to be unstable, and any saves you make might not work in future versions of ScummVM." +msgstr "ADVARSEL: Spillet du prøver å starte er ikke fullstendig støttet av ScummVM. Derfor er det sannsynlig at det vil være ustabilt, og det er ikke sikkert at lagrede spill vil fortsette å fungere i fremtidige versjoner av ScummVM." #: engines/engine.cpp:442 msgid "Start anyway" -msgstr "" +msgstr "Start allikevel" -#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/agi/detection.cpp:145 +#: engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" -msgstr "" +msgstr "Bruk originale lagre/laste-skjermer" -#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48 +#: 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 "Bruk de originale lagre/laste-skjermene, istedenfor ScummVM-variantene" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 +#: engines/sci/engine/kfile.cpp:824 msgid "Restore game:" msgstr "Gjennopprett spill:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 +#: engines/sci/engine/kfile.cpp:824 msgid "Restore" msgstr "Gjenopprett" #: engines/dreamweb/detection.cpp:57 -#, fuzzy msgid "Use bright palette mode" -msgstr "Øvre høyre gjenstand" +msgstr "Bruk lys palettmodus" #: engines/dreamweb/detection.cpp:58 msgid "Display graphics using the game's bright palette" -msgstr "" +msgstr "Vis grafikk med spillets lyse palett" #: engines/sci/detection.cpp:370 msgid "EGA undithering" msgstr "EGA av-dithering" #: engines/sci/detection.cpp:371 -#, fuzzy msgid "Enable undithering in EGA games" -msgstr "Slår av dithering i EGA-spill som støtter det." +msgstr "Aktiver av-dithering i EGA-spill" #: engines/sci/detection.cpp:380 -#, fuzzy msgid "Prefer digital sound effects" -msgstr "Volum for spesielle lydeffekter" +msgstr "Foretrekk digitale lydeffekter" #: engines/sci/detection.cpp:381 msgid "Prefer digital sound effects instead of synthesized ones" -msgstr "" +msgstr "Foretrekk digitale lydeffekter fremfor syntetiske" #: engines/sci/detection.cpp:400 msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "" +msgstr "Bruk IMF/Yahama-FB-01 for MIDI-output" #: engines/sci/detection.cpp:401 -msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " -"output" +msgid "Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI output" msgstr "" #: engines/sci/detection.cpp:411 msgid "Use CD audio" -msgstr "" +msgstr "Bruk CD-lyd" #: engines/sci/detection.cpp:412 msgid "Use CD audio instead of in-game audio, if available" -msgstr "" +msgstr "Bruk CD-lyd istedenfor spillets lyd, hvis tilgjengelig" #: engines/sci/detection.cpp:422 msgid "Use Windows cursors" -msgstr "" +msgstr "Bruk Windows-muspekere" #: engines/sci/detection.cpp:423 -msgid "" -"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" -msgstr "" +msgid "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "Bruk Windows-muspekerene (mindre, og monokrome) isteden" #: engines/sci/detection.cpp:433 -#, fuzzy msgid "Use silver cursors" -msgstr "Vanlig muspeker" +msgstr "Bruk sølvmuspekere" #: engines/sci/detection.cpp:434 -msgid "" -"Use the alternate set of silver cursors, instead of the normal golden ones" -msgstr "" +msgid "Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "Bruk det alternative settet med sølvmuspekere, istedenfor de normale gylne." #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." -msgstr "" +msgstr "Sett inn disk %c, og trykk Tast for å fortsette." #: engines/scumm/dialogs.cpp:176 #, c-format @@ -1331,27 +1432,26 @@ msgstr "" #: engines/scumm/dialogs.cpp:178 msgid "Game Paused. Press SPACE to Continue." -msgstr "" +msgstr "Spill pauset. Trykk på MELLOMROMstasten for å fortsette." #. I18N: You may specify 'Yes' symbol at the end of the line, like this: #. "Moechten Sie wirklich neu starten? (J/N)J" #. Will react to J as 'Yes' #: engines/scumm/dialogs.cpp:182 -#, fuzzy msgid "Are you sure you want to restart? (Y/N)" -msgstr " Er du sikker på at du vil avslutte ?" +msgstr "Er du sikker på at du vil avslutte? (Y/N)" #. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment #: engines/scumm/dialogs.cpp:184 -#, fuzzy msgid "Are you sure you want to quit? (Y/N)" -msgstr " Er du sikker på at du vil avslutte ?" +msgstr "Er du sikker på at du vil avslutte? (Y/N)" #: engines/scumm/dialogs.cpp:189 msgid "Play" -msgstr "" +msgstr "Spill" -#: engines/scumm/dialogs.cpp:191 engines/scumm/help.cpp:82 +#: engines/scumm/dialogs.cpp:191 +#: engines/scumm/help.cpp:82 #: engines/scumm/help.cpp:84 #: backends/platform/symbian/src/SymbianActions.cpp:52 #: backends/platform/wince/CEActionsPocket.cpp:44 @@ -1366,38 +1466,37 @@ msgstr "" #: engines/scumm/dialogs.cpp:194 msgid "You must enter a name" -msgstr "" +msgstr "Du må skrive inn et navn" #: engines/scumm/dialogs.cpp:195 msgid "The game was NOT saved (disk full?)" -msgstr "" +msgstr "Spillet ble IKKE lagret (full disk?)" #: engines/scumm/dialogs.cpp:196 msgid "The game was NOT loaded" -msgstr "" +msgstr "Spillet ble IKKE lastet" #: engines/scumm/dialogs.cpp:197 #, c-format msgid "Saving '%s'" -msgstr "" +msgstr "Lagrer '%s'" #: engines/scumm/dialogs.cpp:198 #, c-format msgid "Loading '%s'" -msgstr "" +msgstr "Laster '%s'" #: engines/scumm/dialogs.cpp:199 msgid "Name your SAVE game" -msgstr "" +msgstr "Gi det LAGREDE spillet ditt et navn" #: engines/scumm/dialogs.cpp:200 -#, fuzzy msgid "Select a game to LOAD" -msgstr "Velg et tema" +msgstr "Velg et spill for LASTING" #: engines/scumm/dialogs.cpp:201 msgid "Game title)" -msgstr "" +msgstr "Spilltittel)" #. I18N: Previous page button #: engines/scumm/dialogs.cpp:287 @@ -1415,25 +1514,21 @@ msgid "~C~lose" msgstr "~L~ukk" #: engines/scumm/dialogs.cpp:597 -#, fuzzy msgid "Speech Only" -msgstr "Tale" +msgstr "Kun tale" #: engines/scumm/dialogs.cpp:598 -#, fuzzy msgid "Speech and Subtitles" -msgstr "Undertekster" +msgstr "Tale og undertekster" #: engines/scumm/dialogs.cpp:599 -#, fuzzy msgid "Subtitles Only" -msgstr "Undertekster" +msgstr "Kun undertekster" #: engines/scumm/dialogs.cpp:607 -#, fuzzy msgctxt "lowres" msgid "Speech & Subs" -msgstr "Tale" +msgstr "Tekst & Tale" #: engines/scumm/dialogs.cpp:653 msgid "Select a Proficiency Level." @@ -1441,20 +1536,19 @@ msgstr "" #: engines/scumm/dialogs.cpp:655 msgid "Refer to your Loom(TM) manual for help." -msgstr "" +msgstr "Referer til Loom(TM)-håndboka di for hjelp." #: engines/scumm/dialogs.cpp:658 -#, fuzzy msgid "Standard" -msgstr "Standard (16bpp)" +msgstr "Standard" #: engines/scumm/dialogs.cpp:659 msgid "Practice" -msgstr "" +msgstr "Trening" #: engines/scumm/dialogs.cpp:660 msgid "Expert" -msgstr "" +msgstr "Ekspert" #: engines/scumm/help.cpp:73 msgid "Common keyboard commands:" @@ -1484,11 +1578,16 @@ msgstr "Space" msgid "Pause game" msgstr "Pause spill" -#: engines/scumm/help.cpp:79 engines/scumm/help.cpp:84 -#: engines/scumm/help.cpp:95 engines/scumm/help.cpp:96 -#: engines/scumm/help.cpp:97 engines/scumm/help.cpp:98 -#: engines/scumm/help.cpp:99 engines/scumm/help.cpp:100 -#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102 +#: engines/scumm/help.cpp:79 +#: engines/scumm/help.cpp:84 +#: engines/scumm/help.cpp:95 +#: engines/scumm/help.cpp:96 +#: engines/scumm/help.cpp:97 +#: engines/scumm/help.cpp:98 +#: engines/scumm/help.cpp:99 +#: engines/scumm/help.cpp:100 +#: engines/scumm/help.cpp:101 +#: engines/scumm/help.cpp:102 msgid "Ctrl" msgstr "Ctrl" @@ -1496,9 +1595,12 @@ msgstr "Ctrl" msgid "Load game state 1-10" msgstr "Åpne spilltilstand 1-10" -#: engines/scumm/help.cpp:80 engines/scumm/help.cpp:84 -#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:100 -#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102 +#: engines/scumm/help.cpp:80 +#: engines/scumm/help.cpp:84 +#: engines/scumm/help.cpp:86 +#: engines/scumm/help.cpp:100 +#: engines/scumm/help.cpp:101 +#: engines/scumm/help.cpp:102 msgid "Alt" msgstr "Alt" @@ -1506,7 +1608,8 @@ msgstr "Alt" msgid "Save game state 1-10" msgstr "Lagre spilltilstand 1-10" -#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:89 +#: engines/scumm/help.cpp:86 +#: engines/scumm/help.cpp:89 msgid "Enter" msgstr "Enter" @@ -1587,9 +1690,8 @@ msgid " since they may cause crashes" msgstr " de kan forårsake kræsj, eller" #: engines/scumm/help.cpp:110 -#, fuzzy msgid " or incorrect game behavior." -msgstr " feilaktig spilloppførsel." +msgstr " eller feilaktig spilloppførsel." #: engines/scumm/help.cpp:114 msgid "Spinning drafts on the keyboard:" @@ -1599,24 +1701,30 @@ msgstr "Spinne drafts p msgid "Main game controls:" msgstr "Hovedkontroller for spill:" -#: engines/scumm/help.cpp:121 engines/scumm/help.cpp:136 +#: engines/scumm/help.cpp:121 +#: engines/scumm/help.cpp:136 #: engines/scumm/help.cpp:161 msgid "Push" msgstr "Dytt" -#: engines/scumm/help.cpp:122 engines/scumm/help.cpp:137 +#: engines/scumm/help.cpp:122 +#: engines/scumm/help.cpp:137 #: engines/scumm/help.cpp:162 msgid "Pull" msgstr "Dra" -#: engines/scumm/help.cpp:123 engines/scumm/help.cpp:138 -#: engines/scumm/help.cpp:163 engines/scumm/help.cpp:197 +#: engines/scumm/help.cpp:123 +#: engines/scumm/help.cpp:138 +#: engines/scumm/help.cpp:163 +#: engines/scumm/help.cpp:197 #: engines/scumm/help.cpp:207 msgid "Give" msgstr "Gi" -#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139 -#: engines/scumm/help.cpp:164 engines/scumm/help.cpp:190 +#: engines/scumm/help.cpp:124 +#: engines/scumm/help.cpp:139 +#: engines/scumm/help.cpp:164 +#: engines/scumm/help.cpp:190 #: engines/scumm/help.cpp:208 msgid "Open" msgstr "Åpne" @@ -1629,43 +1737,54 @@ msgstr "G msgid "Get" msgstr "Få" -#: engines/scumm/help.cpp:128 engines/scumm/help.cpp:152 -#: engines/scumm/help.cpp:170 engines/scumm/help.cpp:198 -#: engines/scumm/help.cpp:213 engines/scumm/help.cpp:224 +#: engines/scumm/help.cpp:128 +#: engines/scumm/help.cpp:152 +#: engines/scumm/help.cpp:170 +#: engines/scumm/help.cpp:198 +#: engines/scumm/help.cpp:213 +#: engines/scumm/help.cpp:224 #: engines/scumm/help.cpp:250 msgid "Use" msgstr "Bruk" -#: engines/scumm/help.cpp:129 engines/scumm/help.cpp:141 +#: engines/scumm/help.cpp:129 +#: engines/scumm/help.cpp:141 msgid "Read" msgstr "Les" -#: engines/scumm/help.cpp:130 engines/scumm/help.cpp:147 +#: engines/scumm/help.cpp:130 +#: engines/scumm/help.cpp:147 msgid "New kid" msgstr "Bytt unge" -#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:153 +#: engines/scumm/help.cpp:131 +#: engines/scumm/help.cpp:153 #: engines/scumm/help.cpp:171 msgid "Turn on" msgstr "Slå på" -#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:154 +#: engines/scumm/help.cpp:132 +#: engines/scumm/help.cpp:154 #: engines/scumm/help.cpp:172 msgid "Turn off" msgstr "Slå av" -#: engines/scumm/help.cpp:142 engines/scumm/help.cpp:167 +#: engines/scumm/help.cpp:142 +#: engines/scumm/help.cpp:167 #: engines/scumm/help.cpp:194 msgid "Walk to" msgstr "Gå til" -#: engines/scumm/help.cpp:143 engines/scumm/help.cpp:168 -#: engines/scumm/help.cpp:195 engines/scumm/help.cpp:210 +#: engines/scumm/help.cpp:143 +#: engines/scumm/help.cpp:168 +#: engines/scumm/help.cpp:195 +#: engines/scumm/help.cpp:210 #: engines/scumm/help.cpp:227 msgid "Pick up" msgstr "Plukk opp" -#: engines/scumm/help.cpp:144 engines/scumm/help.cpp:169 +#: engines/scumm/help.cpp:144 +#: engines/scumm/help.cpp:169 msgid "What is" msgstr "Hva er" @@ -1689,11 +1808,13 @@ msgstr "Fiks" msgid "Switch" msgstr "Bytt" -#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:228 +#: engines/scumm/help.cpp:166 +#: engines/scumm/help.cpp:228 msgid "Look" msgstr "Kikk" -#: engines/scumm/help.cpp:173 engines/scumm/help.cpp:223 +#: engines/scumm/help.cpp:173 +#: engines/scumm/help.cpp:223 msgid "Talk" msgstr "Snakk" @@ -1738,20 +1859,24 @@ msgstr "spill H p msgid "play C major on distaff" msgstr "spill C dur på distaffen" -#: engines/scumm/help.cpp:192 engines/scumm/help.cpp:214 +#: engines/scumm/help.cpp:192 +#: engines/scumm/help.cpp:214 msgid "puSh" msgstr "Dytt" -#: engines/scumm/help.cpp:193 engines/scumm/help.cpp:215 +#: engines/scumm/help.cpp:193 +#: engines/scumm/help.cpp:215 msgid "pull (Yank)" msgstr "Dra" -#: engines/scumm/help.cpp:196 engines/scumm/help.cpp:212 +#: engines/scumm/help.cpp:196 +#: engines/scumm/help.cpp:212 #: engines/scumm/help.cpp:248 msgid "Talk to" msgstr "Snakk til" -#: engines/scumm/help.cpp:199 engines/scumm/help.cpp:211 +#: engines/scumm/help.cpp:199 +#: engines/scumm/help.cpp:211 msgid "Look at" msgstr "Se på" @@ -1783,8 +1908,10 @@ msgstr "Merk neste dialog" msgid "Walk" msgstr "Gå" -#: engines/scumm/help.cpp:225 engines/scumm/help.cpp:234 -#: engines/scumm/help.cpp:241 engines/scumm/help.cpp:249 +#: engines/scumm/help.cpp:225 +#: engines/scumm/help.cpp:234 +#: engines/scumm/help.cpp:241 +#: engines/scumm/help.cpp:249 msgid "Inventory" msgstr "Inventar" @@ -1812,7 +1939,8 @@ msgstr "Sl msgid "Kick" msgstr "Spark" -#: engines/scumm/help.cpp:239 engines/scumm/help.cpp:247 +#: engines/scumm/help.cpp:239 +#: engines/scumm/help.cpp:247 msgid "Examine" msgstr "Undersøk" @@ -1833,31 +1961,38 @@ msgstr "Lagre / msgid "Other game controls:" msgstr "Andre spillkontroller" -#: engines/scumm/help.cpp:257 engines/scumm/help.cpp:267 +#: engines/scumm/help.cpp:257 +#: engines/scumm/help.cpp:267 msgid "Inventory:" msgstr "Inventar:" -#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:274 +#: engines/scumm/help.cpp:258 +#: engines/scumm/help.cpp:274 msgid "Scroll list up" msgstr "Bla liste opp" -#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275 +#: engines/scumm/help.cpp:259 +#: engines/scumm/help.cpp:275 msgid "Scroll list down" msgstr "Bla liste ned" -#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:268 +#: engines/scumm/help.cpp:260 +#: engines/scumm/help.cpp:268 msgid "Upper left item" msgstr "Øvre venstre gjenstand" -#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:270 +#: engines/scumm/help.cpp:261 +#: engines/scumm/help.cpp:270 msgid "Lower left item" msgstr "Nedre venstre gjenstand" -#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271 +#: engines/scumm/help.cpp:262 +#: engines/scumm/help.cpp:271 msgid "Upper right item" msgstr "Øvre høyre gjenstand" -#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:273 +#: engines/scumm/help.cpp:263 +#: engines/scumm/help.cpp:273 msgid "Lower right item" msgstr "Nedre høyre gjenstand" @@ -1869,7 +2004,8 @@ msgstr "Midtre venstre gjenstand" msgid "Middle right item" msgstr "Midtre høyre gjenstand" -#: engines/scumm/help.cpp:279 engines/scumm/help.cpp:284 +#: engines/scumm/help.cpp:279 +#: engines/scumm/help.cpp:284 msgid "Switching characters:" msgstr "Bytte av karakterer:" @@ -1885,7 +2021,8 @@ msgstr "Tredje unge" msgid "Fighting controls (numpad):" msgstr "Kampkontroller (talltastatur)" -#: engines/scumm/help.cpp:295 engines/scumm/help.cpp:296 +#: engines/scumm/help.cpp:295 +#: engines/scumm/help.cpp:296 #: engines/scumm/help.cpp:297 msgid "Step back" msgstr "Bakoversteg" @@ -1977,7 +2114,8 @@ msgid "" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 +#: engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1988,7 +2126,8 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 +#: engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1999,7 +2138,8 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 +#: engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2011,17 +2151,12 @@ msgstr "" "%s" #: engines/scumm/scumm.cpp:2512 -msgid "" -"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " -"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " -"directory inside the Tentacle game directory." -msgstr "" -"Vanligvis, ville Maniac Mansion ha startet nå. Men ScummVM støtter ikke det " -"ennå. Så, for å spille Maniac Mansion, gå til 'Legg til spill' i ScummVM-" -"hovedmenyen og velg 'Maniac'-undermappa i Tentacle-mappa." +msgid "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' directory inside the Tentacle game directory." +msgstr "Vanligvis, ville Maniac Mansion ha startet nå. Men ScummVM støtter ikke det ennå. Så, for å spille Maniac Mansion, gå til 'Legg til spill' i ScummVM-hovedmenyen og velg 'Maniac'-undermappa i Tentacle-mappa." #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171 +#: engines/mohawk/dialogs.cpp:92 +#: engines/mohawk/dialogs.cpp:171 msgid "~Z~ip Mode Activated" msgstr "~Z~ipmodus aktivert" @@ -2032,16 +2167,15 @@ msgstr "~O~verganger aktivert" #. I18N: Drop book page #: engines/mohawk/dialogs.cpp:95 msgid "~D~rop Page" -msgstr "" +msgstr "~D~ropp Side" #: engines/mohawk/dialogs.cpp:99 msgid "~S~how Map" -msgstr "" +msgstr "Vi~s~ Kart" #: engines/mohawk/dialogs.cpp:105 -#, fuzzy msgid "~M~ain Menu" -msgstr "ScummVM Hovedmeny" +msgstr "Hoved~m~eny" #: engines/mohawk/dialogs.cpp:172 msgid "~W~ater Effect Enabled" @@ -2052,48 +2186,34 @@ msgstr "~V~anneffekt aktivert" msgid "Cutscene file '%s' not found!" msgstr "" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 +#: engines/gob/inter_playtoons.cpp:256 +#: engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 -#, fuzzy msgid "Failed to load game state from file." -msgstr "" -"Klarte ikke åpne spilltilstand fra fil:\n" -"\n" -"%s" +msgstr "Klarte ikke åpne spilltilstand fra fil." -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 -#, fuzzy +#: engines/gob/inter_v2.cpp:1357 +#: engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." -msgstr "" -"Klarte ikke lagre spilltilstand til fil:\n" -"\n" -"%s" +msgstr "Klarte ikke lagre spilltilstand fra fil." #: engines/gob/inter_v5.cpp:107 -#, fuzzy msgid "Failed to delete file." -msgstr "" -"Klarte ikke lagre spilltilstand til fil:\n" -"\n" -"%s" +msgstr "Klarte ikke å slette fil." #: engines/groovie/script.cpp:420 -#, fuzzy msgid "Failed to save game" -msgstr "" -"Klarte ikke lagre spilltilstand til fil:\n" -"\n" -"%s" +msgstr "Klarte ikke å lagre spill." #. I18N: Studio audience adds an applause and cheering sounds whenever #. Malcolm makes a joke. #: engines/kyra/detection.cpp:62 msgid "Studio audience" -msgstr "" +msgstr "Studiopublikum" #: engines/kyra/detection.cpp:63 msgid "Enable studio audience" -msgstr "" +msgstr "Aktiver studiopublikum" #. I18N: This option allows the user to skip text and cutscenes. #: engines/kyra/detection.cpp:73 @@ -2102,39 +2222,37 @@ msgstr "" #: engines/kyra/detection.cpp:74 msgid "Allow text and cutscenes to be skipped" -msgstr "" +msgstr "Tillat å hoppe over tekst og kutt-scener" #. I18N: Helium mode makes people sound like they've inhaled Helium. #: engines/kyra/detection.cpp:84 msgid "Helium mode" -msgstr "" +msgstr "Helium-modus" #: engines/kyra/detection.cpp:85 -#, fuzzy msgid "Enable helium mode" -msgstr "Aktiver Roland GS-modus" +msgstr "Aktiver helium-modus" #. 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 "Myk scrolling" #: engines/kyra/detection.cpp:100 msgid "Enable smooth scrolling when walking" -msgstr "" +msgstr "Aktiver myk scrolling når man går" #. 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 "Vanlig muspeker" +msgstr "Flytende muspekere" #: engines/kyra/detection.cpp:113 msgid "Enable floating cursors" -msgstr "" +msgstr "Aktiver flytende muspekere" #. I18N: HP stands for Hit Points #: engines/kyra/detection.cpp:127 @@ -2147,52 +2265,47 @@ msgstr "" #: engines/kyra/lol.cpp:478 msgid "Attack 1" -msgstr "" +msgstr "Angrep 1" #: engines/kyra/lol.cpp:479 msgid "Attack 2" -msgstr "" +msgstr "Angrep 2" #: engines/kyra/lol.cpp:480 msgid "Attack 3" -msgstr "" +msgstr "Angrep 3" #: engines/kyra/lol.cpp:481 msgid "Move Forward" -msgstr "" +msgstr "Beveg Fremover" #: engines/kyra/lol.cpp:482 msgid "Move Back" -msgstr "" +msgstr "Beveg Bakover" #: engines/kyra/lol.cpp:483 msgid "Slide Left" -msgstr "" +msgstr "Skli mot Venstre" #: engines/kyra/lol.cpp:484 -#, fuzzy msgid "Slide Right" -msgstr "Høyre" +msgstr "Skli mot Høyre" #: engines/kyra/lol.cpp:485 -#, fuzzy msgid "Turn Left" -msgstr "Slå av" +msgstr "Svin til Venstre" #: engines/kyra/lol.cpp:486 -#, fuzzy msgid "Turn Right" -msgstr "Peker høyre" +msgstr "Sving til Høyre" #: engines/kyra/lol.cpp:487 -#, fuzzy msgid "Rest" -msgstr "Gjenopprett" +msgstr "Hvil" #: engines/kyra/lol.cpp:488 -#, fuzzy msgid "Options" -msgstr "~V~alg" +msgstr "Valg" #: engines/kyra/lol.cpp:489 #, fuzzy @@ -2207,20 +2320,29 @@ msgid "" "General MIDI ones. After all it might happen\n" "that a few tracks will not be correctly played." msgstr "" +"Du ser ut til å bruke en General MIDI-enhet,\n" +"men spillet ditt støtter bare Roland MT32-MIDI.\n" +"Vi forsøker å koble Roland MT32-instrumentene til\n" +"General MIDI-instrumentene. Allikevel, kan det\n" +"skje at enkelte spor ikke vil spilles riktig." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +#: engines/queen/queen.cpp:59 +#: engines/sky/detection.cpp:44 msgid "Floppy intro" -msgstr "" +msgstr "Diskett-intro" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +#: engines/queen/queen.cpp:60 +#: engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" -msgstr "" +msgstr "Bruk diskettversjonens intro (Kun for CD-versjon)" #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" "Please download it from www.scummvm.org" msgstr "" +"Fant ikke filen \"sky.cpt\"!\n" +"Vennligst last den ned fra www.scummvm.org" #: engines/sky/compact.cpp:141 msgid "" @@ -2233,29 +2355,33 @@ msgstr "" msgid "PSX stream cutscene '%s' cannot be played in paletted mode" msgstr "" -#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 +#: engines/sword1/animation.cpp:560 +#: engines/sword2/animation.cpp:455 msgid "DXA cutscenes found but ScummVM has been built without zlib support" msgstr "" -#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465 +#: engines/sword1/animation.cpp:570 +#: engines/sword2/animation.cpp:465 msgid "MPEG2 cutscenes are no longer supported" msgstr "" -#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473 +#: engines/sword1/animation.cpp:576 +#: engines/sword2/animation.cpp:473 #, c-format msgid "Cutscene '%s' not found" msgstr "" #: engines/sword1/control.cpp:863 msgid "" -"ScummVM found that you have old savefiles for Broken Sword 1 that should be " -"converted.\n" -"The old save game format is no longer supported, so you will not be able to " -"load your games if you don't convert them.\n" +"ScummVM found that you have old savefiles for Broken Sword 1 that should be converted.\n" +"The old save game format is no longer supported, so you will not be able to load your games if you don't convert them.\n" "\n" -"Press OK to convert them now, otherwise you will be asked again the next " -"time you start the game.\n" +"Press OK to convert them now, otherwise you will be asked again the next time you start the game.\n" msgstr "" +"ScummVM oppdaget at du har gamle lagrede spill for Broken Sword 1 som bør konverteres.\n" +"Det gamle formatet for lagrede spill støttes ikke lengre, så du vil ikke være i stand til å laste de lagrede spillene,\n" +"med mindre du konverterer dem.\n" +"Trykk OK for å konvertere dem nå, ellers vil du bli spurt igjen neste gang du starter spillet." #: engines/sword1/control.cpp:1232 #, c-format @@ -2266,19 +2392,18 @@ msgstr "" #: engines/sword1/control.cpp:1235 msgid "Keep the old one" -msgstr "" +msgstr "Behold den gamle" #: engines/sword1/control.cpp:1235 msgid "Keep the new one" -msgstr "" +msgstr "Behold den nye" #: engines/sword1/logic.cpp:1633 msgid "This is the end of the Broken Sword 1 Demo" -msgstr "" +msgstr "Dette er slutten på Broken Sword 1-demoen" #: engines/sword2/animation.cpp:435 -msgid "" -"PSX cutscenes found but ScummVM has been built without RGB color support" +msgid "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" #: engines/sword2/sword2.cpp:79 @@ -2297,36 +2422,38 @@ msgid "" msgstr "" #: engines/parallaction/saveload.cpp:204 -#, fuzzy msgid "Loading game..." -msgstr "Åpne spill:" +msgstr "Laster spill..." #: engines/parallaction/saveload.cpp:219 -#, fuzzy msgid "Saving game..." -msgstr "Lagret spill:" +msgstr "Lagrer spill..." #: engines/parallaction/saveload.cpp:272 msgid "" -"ScummVM found that you have old savefiles for Nippon Safes that should be " -"renamed.\n" -"The old names are no longer supported, so you will not be able to load your " -"games if you don't convert them.\n" +"ScummVM found that you have old savefiles for Nippon Safes that should be renamed.\n" +"The old names are no longer supported, so you will not be able to load your games if you don't convert them.\n" "\n" "Press OK to convert them now, otherwise you will be asked next time.\n" msgstr "" +"ScummVM oppdaget at du har gamle lagrede spill for Nippon Safes som bør omdøpes.\n" +"De gamle navnene støttes ikke lengre, så du vil ikke være i stand til å laste de lagrede spillene,\n" +"med mindre du konverterer dem.\n" +"Trykk OK for å konvertere dem nå, ellers vil du bli spurt igjen neste gang du starter spillet." #: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." -msgstr "" +msgstr "ScummVM konverterte alle de lagrede spillene dine uten problemer." #: engines/parallaction/saveload.cpp:321 msgid "" -"ScummVM printed some warnings in your console window and can't guarantee all " -"your files have been converted.\n" +"ScummVM printed some warnings in your console window and can't guarantee all your files have been converted.\n" "\n" "Please report to the team." msgstr "" +"ScummVM skrev ut noen advarsler i konsollvinduet ditt og kan ikke garantere at alle filene dine har blitt konvertert.\n" +"\n" +"Vennligst rapporter dette til teamet." #: audio/fmopl.cpp:49 msgid "MAME OPL emulator" @@ -2338,36 +2465,30 @@ msgstr "DOSBox OPL emulator" #: audio/mididrv.cpp:209 #, c-format -msgid "" -"The selected audio device '%s' was not found (e.g. might be turned off or " -"disconnected)." -msgstr "" +msgid "The selected audio device '%s' was not found (e.g. might be turned off or disconnected)." +msgstr "Den valgte lydenheten '%s' ble ikke funnet (den kan f.eks. være avslått eller frakoblet)." -#: audio/mididrv.cpp:209 audio/mididrv.cpp:221 audio/mididrv.cpp:257 +#: audio/mididrv.cpp:209 +#: audio/mididrv.cpp:221 +#: audio/mididrv.cpp:257 #: audio/mididrv.cpp:272 msgid "Attempting to fall back to the next available device..." -msgstr "" +msgstr "Forsøker å falle tilbake på den neste tilgjengelige enheten..." #: audio/mididrv.cpp:221 #, c-format -msgid "" -"The selected audio device '%s' cannot be used. See log file for more " -"information." -msgstr "" +msgid "The selected audio device '%s' cannot be used. See log file for more information." +msgstr "Den valgte lydenheten '%s' kan ikke brukes. Se logg-filen for mer informasjon." #: audio/mididrv.cpp:257 #, c-format -msgid "" -"The preferred audio device '%s' was not found (e.g. might be turned off or " -"disconnected)." -msgstr "" +msgid "The preferred audio device '%s' was not found (e.g. might be turned off or disconnected)." +msgstr "Den foretrukne lydenheten '%s' ble ikke funnet (den kan f.eks. være avslått eller frakoblet)." #: audio/mididrv.cpp:272 #, c-format -msgid "" -"The preferred audio device '%s' cannot be used. See log file for more " -"information." -msgstr "" +msgid "The preferred audio device '%s' cannot be used. See log file for more information." +msgstr "Den foretrukne lydenheten '%s' kan ikke brukes. Se i logg-filen for mer informasjon." #: audio/null.h:43 msgid "No music" @@ -2390,7 +2511,6 @@ msgid "C64 Audio Emulator" msgstr "C64 Lydemulator" #: audio/softsynth/mt32.cpp:293 -#, fuzzy msgid "Initializing MT-32 Emulator" msgstr "Initialiserer MT-32-Emulator" @@ -2421,7 +2541,7 @@ msgstr " (Aktiv)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Blocked)" -msgstr "" +msgstr " (Blokkert)" #: backends/keymapper/remap-dialog.cpp:119 msgid " (Global)" @@ -2508,14 +2628,12 @@ msgid "Disable power off" msgstr "Deaktiver strømsparing" #: backends/platform/iphone/osys_events.cpp:300 -#, fuzzy msgid "Mouse-click-and-drag mode enabled." -msgstr "Touchpad-modus aktivert." +msgstr "Mus-klikk-og-dra-modus aktivert." #: backends/platform/iphone/osys_events.cpp:302 -#, fuzzy msgid "Mouse-click-and-drag mode disabled." -msgstr "Touchpad-modus deaktivert." +msgstr "Mus-klikk-og-dra-modus-deaktivert." #: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." @@ -2527,7 +2645,7 @@ msgstr "Touchpad-modus deaktivert." #: backends/platform/maemo/maemo.cpp:205 msgid "Click Mode" -msgstr "" +msgstr "Klikkmodus" #: backends/platform/maemo/maemo.cpp:211 #: backends/platform/symbian/src/SymbianActions.cpp:42 @@ -2538,9 +2656,8 @@ msgid "Left Click" msgstr "Venstreklikk" #: backends/platform/maemo/maemo.cpp:214 -#, fuzzy msgid "Middle Click" -msgstr "Midtre venstre gjenstand" +msgstr "Midtklikk" #: backends/platform/maemo/maemo.cpp:217 #: backends/platform/symbian/src/SymbianActions.cpp:43 @@ -2550,7 +2667,6 @@ msgid "Right Click" msgstr "Høyreklikk" #: backends/platform/sdl/macosx/appmenu_osx.mm:78 -#, fuzzy msgid "Hide ScummVM" msgstr "Skjul ScummVM" @@ -2582,26 +2698,22 @@ msgstr "Normal (ingen skalering)" #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 -#, fuzzy msgid "Enabled aspect ratio correction" -msgstr "Veksle aspekt-rate korrigering" +msgstr "Aspekt-rate korrigering aktivert" #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 -#, fuzzy msgid "Disabled aspect ratio correction" -msgstr "Veksle aspekt-rate korrigering" +msgstr "Aspekt-rate korrigering deaktivert" #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 -#, fuzzy msgid "Active graphics filter:" -msgstr "Bytt grafikkfiltre" +msgstr "Aktivt grafikkfilter:" #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 -#, fuzzy msgid "Windowed mode" -msgstr "Tegnemodus:" +msgstr "Vindusmodus" #: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" @@ -2616,21 +2728,20 @@ msgid "OpenGL Original" msgstr "OpenGL Original" #: backends/graphics/openglsdl/openglsdl-graphics.cpp:415 -#, fuzzy msgid "Current display mode" -msgstr "Nåværende videomodus:" +msgstr "Nåværende videomodus" #: backends/graphics/openglsdl/openglsdl-graphics.cpp:428 msgid "Current scale" -msgstr "" +msgstr "Nåværende skala" #: backends/graphics/openglsdl/openglsdl-graphics.cpp:558 msgid "Active filter mode: Linear" -msgstr "" +msgstr "Aktiv filtermodus: Linjær" #: backends/graphics/openglsdl/openglsdl-graphics.cpp:560 msgid "Active filter mode: Nearest" -msgstr "" +msgstr "Aktiv filtermodus: Nærmeste" #: backends/platform/symbian/src/SymbianActions.cpp:38 #: backends/platform/wince/CEActionsSmartphone.cpp:39 @@ -2714,7 +2825,7 @@ msgstr "Horisontal underscan:" #: backends/platform/wii/options.cpp:66 msgid "Vertical underscan:" -msgstr "Vertikal underscan" +msgstr "Vertikal underscan:" #: backends/platform/wii/options.cpp:71 msgid "Input" @@ -2732,11 +2843,13 @@ msgstr "GC Pad-aksellerasjon:" msgid "DVD" msgstr "DVD" -#: backends/platform/wii/options.cpp:89 backends/platform/wii/options.cpp:101 +#: backends/platform/wii/options.cpp:89 +#: backends/platform/wii/options.cpp:101 msgid "Status:" msgstr "Status:" -#: backends/platform/wii/options.cpp:90 backends/platform/wii/options.cpp:102 +#: backends/platform/wii/options.cpp:90 +#: backends/platform/wii/options.cpp:102 msgid "Unknown" msgstr "Ukjent" @@ -2813,17 +2926,15 @@ msgid "Network down" msgstr "Nettverket er nede" #: backends/platform/wii/options.cpp:178 -#, fuzzy msgid "Initializing network" msgstr "Initialiserer nettverk" #: backends/platform/wii/options.cpp:182 -#, fuzzy msgid "Timeout while initializing network" msgstr "Timeout under initialisering av nettverk" #: backends/platform/wii/options.cpp:186 -#, fuzzy, c-format +#, c-format msgid "Network not initialized (%d)" msgstr "Nettverk ikke initialisert (%d)" @@ -2916,8 +3027,7 @@ msgstr "Koble handling til h #: backends/platform/wince/wince-sdl.cpp:519 msgid "You must map a key to the 'Right Click' action to play this game" -msgstr "" -"Du må koble en tast til handlingen 'Høyreklikk' for å spille dette spillet" +msgstr "Du må koble en tast til handlingen 'Høyreklikk' for å spille dette spillet" #: backends/platform/wince/wince-sdl.cpp:528 msgid "Map hide toolbar action" @@ -2925,9 +3035,7 @@ msgstr "Koble skjul-verkt #: backends/platform/wince/wince-sdl.cpp:532 msgid "You must map a key to the 'Hide toolbar' action to play this game" -msgstr "" -"Du må koble en tast til 'Skjul verktøylinje'-handlingen for å spille dette " -"spillet" +msgstr "Du må koble en tast til 'Skjul verktøylinje'-handlingen for å spille dette spillet" #: backends/platform/wince/wince-sdl.cpp:541 msgid "Map Zoom Up action (optional)" @@ -2938,90 +3046,78 @@ msgid "Map Zoom Down action (optional)" msgstr "Koble handlingen Zoom Ned (valgfritt)" #: backends/platform/wince/wince-sdl.cpp:552 -msgid "" -"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory" -msgstr "" -"Ikke glem å koble en tast til handlingen 'Skjul verktøylinje' for å se hele " -"inventaret" +msgid "Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory" +msgstr "Ikke glem å koble en tast til handlingen 'Skjul verktøylinje' for å se hele inventaret" #: backends/events/default/default-events.cpp:191 -#, fuzzy msgid "Do you really want to return to the Launcher?" -msgstr "Vil du virkelig slette dette lagrede spillet?" +msgstr "Vil du virkelig returnere til oppstarteren?" #: backends/events/default/default-events.cpp:191 -#, fuzzy msgid "Launcher" -msgstr "Slå" +msgstr "Oppstarter" #: backends/events/default/default-events.cpp:213 -#, fuzzy msgid "Do you really want to quit?" -msgstr "Vil du avslutte?" +msgstr "Vil du virkelig avslutte?" #: backends/events/gph/gph-events.cpp:338 #: backends/events/gph/gph-events.cpp:381 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" -msgstr "" +msgstr "Touchskjerm 'Tapmodus' - Venstreklikk" #: backends/events/gph/gph-events.cpp:340 #: backends/events/gph/gph-events.cpp:383 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" -msgstr "" +msgstr "Touchskjerm 'Tapmodus' - Høyreklikk" #: backends/events/gph/gph-events.cpp:342 #: backends/events/gph/gph-events.cpp:385 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" -msgstr "" +msgstr "Touchskjerm 'Tapmodus' - Sveve (Ingen Klikk)" #: backends/events/gph/gph-events.cpp:362 -#, fuzzy msgid "Maximum Volume" -msgstr "Volum" +msgstr "Maksimalt Volum" #: backends/events/gph/gph-events.cpp:364 msgid "Increasing Volume" -msgstr "" +msgstr "Øker volum" #: backends/events/gph/gph-events.cpp:370 -#, fuzzy msgid "Minimal Volume" -msgstr "Volum" +msgstr "Minimalt Volum" #: backends/events/gph/gph-events.cpp:372 msgid "Decreasing Volume" -msgstr "" +msgstr "Senker volum" #: backends/updates/macosx/macosx-updates.mm:65 msgid "Check for Updates..." -msgstr "" +msgstr "Sjekk for oppdateringer..." #: backends/platform/bada/form.cpp:269 -#, fuzzy msgid "Right Click Once" -msgstr "Høyreklikk" +msgstr "Høyreklikk én gang" #: backends/platform/bada/form.cpp:277 -#, fuzzy msgid "Move Only" -msgstr "Tale" +msgstr "Kun Beveg" #: backends/platform/bada/form.cpp:291 msgid "Escape Key" -msgstr "" +msgstr "ESC-tast" #: backends/platform/bada/form.cpp:296 -#, fuzzy msgid "Game Menu" -msgstr "Spill" +msgstr "Spillmeny" #: backends/platform/bada/form.cpp:301 -#, fuzzy msgid "Show Keypad" -msgstr "Vis tastatur" +msgstr "Vis talltastatur" #: backends/platform/bada/form.cpp:309 msgid "Control Mouse" @@ -3029,31 +3125,30 @@ msgstr "" #: backends/events/maemosdl/maemosdl-events.cpp:192 msgid "Clicking Enabled" -msgstr "" +msgstr "Klikking aktivert" #: backends/events/maemosdl/maemosdl-events.cpp:192 msgid "Clicking Disabled" -msgstr "" +msgstr "Klikking deaktivert" #~ msgid "Hercules Green" #~ msgstr "Hercules Grønn" #~ msgid "Hercules Amber" #~ msgstr "Hercules Oransje" - #~ msgctxt "lowres" + #~ msgid "Hercules Green" #~ msgstr "Hercules Grønn" - #~ msgctxt "lowres" + #~ msgid "Hercules Amber" #~ msgstr "Hercules Oransje" -#, fuzzy #~ msgid "Save game failed!" #~ msgstr "Lagret spill:" - #~ msgctxt "lowres" + #~ msgid "Add Game..." #~ msgstr "Legg til spill..." -- cgit v1.2.3 From 097c61955189c8dc598acb6bb328074950d7fa62 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan SømaÌŠen Date: Wed, 4 Jul 2012 02:27:39 +0200 Subject: CREDITS: Drop my middle initial to stay within the size-limit for AUTHORS, and add handle. --- AUTHORS | 4 ++-- devtools/credits.pl | 4 ++-- gui/credits.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/AUTHORS b/AUTHORS index 9f71be9467..387c602b84 100644 --- a/AUTHORS +++ b/AUTHORS @@ -418,10 +418,10 @@ Other contributions Matteo Angelino Norwegian (Bokmaal): - Einar Johan T. Somaae + Einar Johan Somaaen Norwegian (Nynorsk): - Einar Johan T. Somaae + Einar Johan Somaaen Polish: GrajPoPolsku.pl Team diff --git a/devtools/credits.pl b/devtools/credits.pl index b3a506125f..411ec3c10d 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -942,10 +942,10 @@ begin_credits("Credits"); add_person("Matteo Angelino", "Maff", ""); end_section(); begin_section("Norwegian (Bokmål)"); - add_person("Einar Johan T. Sømåen", "", ""); + add_person("Einar Johan Sømåen", "somaen", ""); end_section(); begin_section("Norwegian (Nynorsk)"); - add_person("Einar Johan T. Sømåen", "", ""); + add_person("Einar Johan Sømåen", "somaen", ""); end_section(); begin_section("Polish"); add_person("GrajPoPolsku.pl Team", "", ""); diff --git a/gui/credits.h b/gui/credits.h index ecfe280d20..7226864543 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -486,10 +486,10 @@ static const char *credits[] = { "C0""Matteo Angelino", "", "C1""Norwegian (Bokm\345l)", -"C0""Einar Johan T. S\370m\345en", +"C0""Einar Johan S\370m\345en", "", "C1""Norwegian (Nynorsk)", -"C0""Einar Johan T. S\370m\345en", +"C0""Einar Johan S\370m\345en", "", "C1""Polish", "C0""GrajPoPolsku.pl Team", -- cgit v1.2.3 From efb1d96d98e7bc856522772bbcdb266e11e26a29 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Wed, 4 Jul 2012 02:13:40 +0100 Subject: TEENAGENT: Fix erroneous files in savegame listing. This was achieved by making the detection pattern stricter to avoid matching the dat file or other extraneous files in the savegame path. This fixes bug #3539774 "TEENAGENT : teenagent.dat considered as a savegame". Also did some minor formatting and string function usage cleanup. --- engines/teenagent/detection.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/engines/teenagent/detection.cpp b/engines/teenagent/detection.cpp index f516ee06c1..2de6f49c44 100644 --- a/engines/teenagent/detection.cpp +++ b/engines/teenagent/detection.cpp @@ -80,7 +80,7 @@ static const ADGameDescription teenAgentGameDescriptions[] = { }; enum { - MAX_SAVES = 20 + MAX_SAVES = 20 }; class TeenAgentMetaEngine : public AdvancedMetaEngine { @@ -123,16 +123,15 @@ public: virtual SaveStateList listSaves(const char *target) const { Common::String pattern = target; - pattern += ".*"; + pattern += ".??"; Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles(pattern); Common::sort(filenames.begin(), filenames.end()); SaveStateList saveList; for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) { - int slot; - const char *ext = strrchr(file->c_str(), '.'); - if (ext && (slot = atoi(ext + 1)) >= 0 && slot < MAX_SAVES) { + int slot = atoi(file->c_str() + file->size() - 2); + if (slot >= 0 && slot < MAX_SAVES) { Common::ScopedPtr in(g_system->getSavefileManager()->openForLoading(*file)); if (!in) continue; -- cgit v1.2.3 From d61c5ae529e99c641edbde152f8f264073a9cdce Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jul 2012 11:55:09 +0300 Subject: SCI: make g_base_opcode_formats and SciOpcodes a bit more readable --- engines/sci/engine/kernel_tables.h | 56 ++++++++++++++++++++++++-------------- engines/sci/engine/vm.h | 4 +++ 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 04b221d2b0..c4443c92d3 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -1132,57 +1132,73 @@ static const char *const sci21_default_knames[] = { // Base set of opcode formats. They're copied and adjusted slightly in // script_adjust_opcode_format depending on SCI version. static const opcode_format g_base_opcode_formats[128][4] = { - /*00*/ + // 00 - 03 / bnot, add, sub, mul {Script_None}, {Script_None}, {Script_None}, {Script_None}, - /*04*/ + // 04 - 07 / div, mod, shr, shl {Script_None}, {Script_None}, {Script_None}, {Script_None}, - /*08*/ + // 08 - 0B / xor, and, or, neg {Script_None}, {Script_None}, {Script_None}, {Script_None}, - /*0C*/ + // 0C - 0F / not, eq, ne, gt {Script_None}, {Script_None}, {Script_None}, {Script_None}, - /*10*/ + // 10 - 13 / ge, lt, le, ugt {Script_None}, {Script_None}, {Script_None}, {Script_None}, - /*14*/ + // 14 - 17 / uge, ult, ule, bt {Script_None}, {Script_None}, {Script_None}, {Script_SRelative}, - /*18*/ + // 18 - 1B / bnt, jmp, ldi, push {Script_SRelative}, {Script_SRelative}, {Script_SVariable}, {Script_None}, - /*1C*/ + // 1C - 1F / pushi, toss, dup, link {Script_SVariable}, {Script_None}, {Script_None}, {Script_Variable}, - /*20*/ + // 20 - 23 / call, callk, callb, calle {Script_SRelative, Script_Byte}, {Script_Variable, Script_Byte}, {Script_Variable, Script_Byte}, {Script_Variable, Script_SVariable, Script_Byte}, - /*24 (24=ret)*/ + // 24 - 27 / ret, send, dummy, dummy {Script_End}, {Script_Byte}, {Script_Invalid}, {Script_Invalid}, - /*28*/ + // 28 - 2B / class, dummy, self, super {Script_Variable}, {Script_Invalid}, {Script_Byte}, {Script_Variable, Script_Byte}, - /*2C*/ + // 2C - 2F / rest, lea, selfID, dummy {Script_SVariable}, {Script_SVariable, Script_Variable}, {Script_None}, {Script_Invalid}, - /*30*/ + // 30 - 33 / pprev, pToa, aTop, pTos {Script_None}, {Script_Property}, {Script_Property}, {Script_Property}, - /*34*/ + // 34 - 37 / sTop, ipToa, dpToa, ipTos {Script_Property}, {Script_Property}, {Script_Property}, {Script_Property}, - /*38*/ + // 38 - 3B / dpTos, lofsa, lofss, push0 {Script_Property}, {Script_SRelative}, {Script_SRelative}, {Script_None}, - /*3C*/ + // 3C - 3F / push1, push2, pushSelf, line {Script_None}, {Script_None}, {Script_None}, {Script_Word}, - /*40-4F*/ + // ------------------------------------------------------------------------ + // 40 - 43 / lag, lal, lat, lap {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, + // 44 - 47 / lsg, lsl, lst, lsp {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, + // 48 - 4B / lagi, lali, lati, lapi {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, + // 4C - 4F / lsgi, lsli, lsti, lspi {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, - /*50-5F*/ + // ------------------------------------------------------------------------ + // 50 - 53 / sag, sal, sat, sap {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, + // 54 - 57 / ssg, ssl, sst, ssp {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, + // 58 - 5B / sagi, sali, sati, sapi {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, + // 5C - 5F / ssgi, ssli, ssti, sspi {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, - /*60-6F*/ + // ------------------------------------------------------------------------ + // 60 - 63 / plusag, plusal, plusat, plusap {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, + // 64 - 67 / plussg, plussl, plusst, plussp {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, + // 68 - 6B / plusagi, plusali, plusati, plusapi {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, + // 6C - 6F / plussgi, plussli, plussti, plusspi {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, - /*70-7F*/ + // ------------------------------------------------------------------------ + // 70 - 73 / minusag, minusal, minusat, minusap {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, + // 74 - 77 / minussg, minussl, minusst, minussp {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, + // 78 - 7B / minusagi, minusali, minusati, minusapi {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param}, + // 7C - 7F / minussgi, minussli, minussti, minusspi {Script_Global}, {Script_Local}, {Script_Temp}, {Script_Param} }; #undef END diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index a0fd6689df..8b38faa013 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -202,6 +202,7 @@ enum SciOpcodes { op_push2 = 0x3d, // 061 op_pushSelf = 0x3e, // 062 op_line = 0x3f, // 063 + // op_lag = 0x40, // 064 op_lal = 0x41, // 065 op_lat = 0x42, // 066 @@ -218,6 +219,7 @@ enum SciOpcodes { op_lsli = 0x4d, // 077 op_lsti = 0x4e, // 078 op_lspi = 0x4f, // 079 + // op_sag = 0x50, // 080 op_sal = 0x51, // 081 op_sat = 0x52, // 082 @@ -234,6 +236,7 @@ enum SciOpcodes { op_ssli = 0x5d, // 093 op_ssti = 0x5e, // 094 op_sspi = 0x5f, // 095 + // op_plusag = 0x60, // 096 op_plusal = 0x61, // 097 op_plusat = 0x62, // 098 @@ -250,6 +253,7 @@ enum SciOpcodes { op_plussli = 0x6d, // 109 op_plussti = 0x6e, // 110 op_plusspi = 0x6f, // 111 + // op_minusag = 0x70, // 112 op_minusal = 0x71, // 113 op_minusat = 0x72, // 114 -- cgit v1.2.3 From e9261cbdd11082dcc46cd60dc60a92c9c10e987c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 5 Jul 2012 00:46:28 +0200 Subject: WIN32: Also embed scummclassic.zip in the executable. This is required to have proper translation support with the classic theme without having an external scummclassic.zip. --- dists/scummvm.rc | 1 + dists/scummvm.rc.in | 1 + 2 files changed, 2 insertions(+) diff --git a/dists/scummvm.rc b/dists/scummvm.rc index e5d28d089a..6f24b8797d 100644 --- a/dists/scummvm.rc +++ b/dists/scummvm.rc @@ -14,6 +14,7 @@ IDI_COUNT ICON DISCARDABLE "icons/count.ico" ID_GDF_XML DATA "dists/win32/scummvm.gdf.xml" +scummclassic.zip FILE "gui/themes/scummclassic.zip" scummmodern.zip FILE "gui/themes/scummmodern.zip" #ifdef USE_TRANSLATION translations.dat FILE "gui/themes/translations.dat" diff --git a/dists/scummvm.rc.in b/dists/scummvm.rc.in index 6969e0b2a7..a874b98514 100644 --- a/dists/scummvm.rc.in +++ b/dists/scummvm.rc.in @@ -14,6 +14,7 @@ IDI_COUNT ICON DISCARDABLE "icons/count.ico" ID_GDF_XML DATA "dists/win32/scummvm.gdf.xml" +scummclassic.zip FILE "gui/themes/scummclassic.zip" scummmodern.zip FILE "gui/themes/scummmodern.zip" #ifdef USE_TRANSLATION translations.dat FILE "gui/themes/translations.dat" -- cgit v1.2.3 From fb215929efaefdf0b75521caab8a86e93181c5b2 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 5 Jul 2012 13:42:00 +0300 Subject: SCI: Some updates to SCI32 kernel graphics functions - Added a stub for kSetScroll, which sets the target picture immediately for now - Added an initial stub of kPalCycle (doesn't work correctly yet) - Adjusted the signatures of kUpdateLine and kDeleteLine for LSL6 - Unmapped kSetHotRectangles again, with updated information on how it is used in Phantasmagoria --- engines/sci/engine/kernel.h | 2 + engines/sci/engine/kernel_tables.h | 16 +++---- engines/sci/engine/kgraphics32.cpp | 90 ++++++++++++++++++++++++++++++++++++++ engines/sci/engine/state.cpp | 3 ++ engines/sci/engine/state.h | 2 + engines/sci/graphics/frameout.cpp | 8 ++++ 6 files changed, 113 insertions(+), 8 deletions(-) diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index c3fcdd06e7..441ea2624f 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -436,6 +436,8 @@ reg_t kObjectIntersect(EngineState *s, int argc, reg_t *argv); reg_t kEditText(EngineState *s, int argc, reg_t *argv); reg_t kMakeSaveCatName(EngineState *s, int argc, reg_t *argv); reg_t kMakeSaveFileName(EngineState *s, int argc, reg_t *argv); +reg_t kSetScroll(EngineState *s, int argc, reg_t *argv); +reg_t kPalCycle(EngineState *s, int argc, reg_t *argv); // SCI2.1 Kernel Functions reg_t kText(EngineState *s, int argc, reg_t *argv); diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index c4443c92d3..825ec90fa9 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -517,10 +517,8 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(EditText), SIG_EVERYWHERE, "o", NULL, NULL }, { MAP_CALL(MakeSaveCatName), SIG_EVERYWHERE, "rr", NULL, NULL }, { MAP_CALL(MakeSaveFileName), SIG_EVERYWHERE, "rri", NULL, NULL }, - - // SCI2 unmapped functions - TODO! - - // PalCycle - called by Game::newRoom. Related to RemapColors. + { MAP_CALL(SetScroll), SIG_EVERYWHERE, "oiiiii(i)", NULL, NULL }, + { MAP_CALL(PalCycle), SIG_EVERYWHERE, "i(.*)", NULL, NULL }, // SCI2 Empty functions @@ -587,8 +585,8 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(Font), SIG_EVERYWHERE, "i(.*)", NULL, NULL }, { MAP_CALL(Bitmap), SIG_EVERYWHERE, "(.*)", NULL, NULL }, { MAP_CALL(AddLine), SIG_EVERYWHERE, "oiiiiiiiii", NULL, NULL }, - { MAP_CALL(UpdateLine), SIG_EVERYWHERE, "roiiiiiiiii", NULL, NULL }, - { MAP_CALL(DeleteLine), SIG_EVERYWHERE, "ro", NULL, NULL }, + { MAP_CALL(UpdateLine), SIG_EVERYWHERE, "[r0]oiiiiiiiii", NULL, NULL }, + { MAP_CALL(DeleteLine), SIG_EVERYWHERE, "[r0]o", NULL, NULL }, // SCI2.1 Empty Functions @@ -624,8 +622,6 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_DUMMY(WinDLL), SIG_EVERYWHERE, "(.*)", NULL, NULL }, { MAP_DUMMY(DeletePic), SIG_EVERYWHERE, "(.*)", NULL, NULL }, { MAP_DUMMY(GetSierraProfileString), SIG_EVERYWHERE, "(.*)", NULL, NULL }, - // SetHotRectangles is used by Phantasmagoria 1, script 64981 (a debug script) - { MAP_DUMMY(SetHotRectangles), SIG_EVERYWHERE, "(.*)", NULL, NULL }, // Unused / debug functions in the in-between SCI2.1 interpreters { MAP_DUMMY(PreloadResource), SIG_EVERYWHERE, "(.*)", NULL, NULL }, @@ -635,6 +631,10 @@ static SciKernelMapEntry s_kernelMap[] = { // SCI2.1 unmapped functions - TODO! + // SetHotRectangles - used by Phantasmagoria 1, script 64981 (used in the chase scene) + // The idea, if I understand correctly, is that the engine generates events + // of a special HotRect type continuously when the mouse is on that rectangle + // MovePlaneItems - used by SQ6 to scroll through the inventory via the up/down buttons // SetPalStyleRange - 2 integer parameters, start and end. All styles from start-end // (inclusive) are set to 0 diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 072d4df021..16e54a5429 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -637,6 +637,96 @@ reg_t kDeleteLine(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } +reg_t kSetScroll(EngineState *s, int argc, reg_t *argv) { + // Called in the intro of LSL6 hires (room 110) + // The end effect of this is the same as the old screen scroll transition + + // 7 parameters + reg_t planeObject = argv[0]; + //int16 x = argv[1].toSint16(); + //int16 y = argv[2].toSint16(); + uint16 pictureId = argv[3].toUint16(); + // param 4: int (0 in LSL6, probably scroll direction? The picture in LSL6 scrolls down) + // param 5: int (first call is 1, then the subsequent one is 0 in LSL6) + // param 6: optional int (0 in LSL6) + + // Set the new picture directly for now + //writeSelectorValue(s->_segMan, planeObject, SELECTOR(left), x); + //writeSelectorValue(s->_segMan, planeObject, SELECTOR(top), y); + writeSelectorValue(s->_segMan, planeObject, SELECTOR(picture), pictureId); + // and update our draw list + g_sci->_gfxFrameout->kernelUpdatePlane(planeObject); + + // TODO + return kStub(s, argc, argv); +} + +reg_t kPalCycle(EngineState *s, int argc, reg_t *argv) { + // Examples: GK1 room 480 (Bayou ritual), LSL6 room 100 (title screen) + + switch (argv[0].toUint16()) { + case 0: { // Palette animation initialization + // 3 or 4 extra params + // Case 1 sends fromColor and speed again, so we don't need them here. + // Only toColor is stored + //uint16 fromColor = argv[1].toUint16(); + s->_palCycleToColor = argv[2].toUint16(); + //uint16 speed = argv[3].toUint16(); + + // Invalidate the picture, so that the palette steps calls (case 1 + // below) can update its palette without it being overwritten by the + // view/picture palettes. + g_sci->_gfxScreen->_picNotValid = 1; + + // TODO: The fourth optional parameter is an unknown integer, and is 0 by default + if (argc == 5) { + // When this variant is used, picNotValid doesn't seem to be set + // (e.g. GK1 room 480). In this case, the animation step calls are + // not made, so perhaps this signifies the palette cycling steps + // to make. + // GK1 sets this to 6 (6 palette steps?) + g_sci->_gfxScreen->_picNotValid = 0; + } + kStub(s, argc, argv); + } + break; + case 1: { // Palette animation step + // This is the same as the old kPaletteAnimate call, with 1 set of colors. + // The end color is set up during initialization in case 0 above. + + // 1 or 2 extra params + uint16 fromColor = argv[1].toUint16(); + uint16 speed = (argc == 2) ? 1 : argv[2].toUint16(); + // TODO: For some reason, this doesn't set the color correctly + // (e.g. LSL6 intro, room 100, Sierra logo) + if (g_sci->_gfxPalette->kernelAnimate(fromColor, s->_palCycleToColor, speed)) + g_sci->_gfxPalette->kernelAnimateSet(); + } + // No kStub() call here, as this gets called loads of times, like kPaletteAnimate + break; + // case 2 hasn't been encountered + // case 3 hasn't been encountered + case 4: // reset any palette cycling and make the picture valid again + // Gets called when changing rooms and after palette cycling animations finish + // 0 or 1 extra params + if (argc == 1) { + g_sci->_gfxScreen->_picNotValid = 0; + // TODO: This also seems to perform more steps + } else { + // The variant with the 1 extra param resets remapping to base + // TODO + } + kStub(s, argc, argv); + break; + default: + // TODO + kStub(s, argc, argv); + break; + } + + return s->r_acc; +} + #endif } // End of namespace Sci diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp index 94a3fe3ae5..0f0c8dcd66 100644 --- a/engines/sci/engine/state.cpp +++ b/engines/sci/engine/state.cpp @@ -122,8 +122,11 @@ void EngineState::reset(bool isRestoring) { _videoState.reset(); _syncedAudioOptions = false; + _vmdPalStart = 0; _vmdPalEnd = 256; + + _palCycleToColor = 255; } void EngineState::speedThrottler(uint32 neededSleep) { diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index 9ae6299d83..81090876c7 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -199,6 +199,8 @@ public: uint16 _vmdPalStart, _vmdPalEnd; bool _syncedAudioOptions; + uint16 _palCycleToColor; + /** * Resets the engine state. */ diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 5b857fe3d8..31ad7a50aa 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -294,6 +294,10 @@ reg_t GfxFrameout::addPlaneLine(reg_t object, Common::Point startPoint, Common:: } void GfxFrameout::updatePlaneLine(reg_t object, reg_t hunkId, Common::Point startPoint, Common::Point endPoint, byte color, byte priority, byte control) { + // Check if we're asked to update a line that was never added + if (object.isNull()) + return; + for (PlaneList::iterator it = _planes.begin(); it != _planes.end(); ++it) { if (it->object == object) { for (PlaneLineList::iterator it2 = it->lines.begin(); it2 != it->lines.end(); ++it2) { @@ -311,6 +315,10 @@ void GfxFrameout::updatePlaneLine(reg_t object, reg_t hunkId, Common::Point star } void GfxFrameout::deletePlaneLine(reg_t object, reg_t hunkId) { + // Check if we're asked to delete a line that was never added (happens during the intro of LSL6) + if (object.isNull()) + return; + for (PlaneList::iterator it = _planes.begin(); it != _planes.end(); ++it) { if (it->object == object) { for (PlaneLineList::iterator it2 = it->lines.begin(); it2 != it->lines.end(); ++it2) { -- cgit v1.2.3 From 4ced5ccf306450bc4b0bd6afd66b5bc7bec1e814 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 5 Jul 2012 13:58:04 +0300 Subject: SCI: Handle calls from MessageState::outputString() to arrays This happens during the intro of LSL6 hires (room 110) --- engines/sci/engine/message.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp index cddd01e10c..a92d572d35 100644 --- a/engines/sci/engine/message.cpp +++ b/engines/sci/engine/message.cpp @@ -400,11 +400,21 @@ Common::String MessageState::processString(const char *s) { void MessageState::outputString(reg_t buf, const Common::String &str) { #ifdef ENABLE_SCI32 if (getSciVersion() >= SCI_VERSION_2) { - SciString *sciString = _segMan->lookupString(buf); - sciString->setSize(str.size() + 1); - for (uint32 i = 0; i < str.size(); i++) - sciString->setValue(i, str.c_str()[i]); - sciString->setValue(str.size(), 0); + if (_segMan->getSegmentType(buf.getSegment()) == SEG_TYPE_STRING) { + SciString *sciString = _segMan->lookupString(buf); + sciString->setSize(str.size() + 1); + for (uint32 i = 0; i < str.size(); i++) + sciString->setValue(i, str.c_str()[i]); + sciString->setValue(str.size(), 0); + } else if (_segMan->getSegmentType(buf.getSegment()) == SEG_TYPE_ARRAY) { + // Happens in the intro of LSL6, we are asked to write the string + // into an array + SciArray *sciString = _segMan->lookupArray(buf); + sciString->setSize(str.size() + 1); + for (uint32 i = 0; i < str.size(); i++) + sciString->setValue(i, make_reg(0, str.c_str()[i])); + sciString->setValue(str.size(), NULL_REG); + } } else { #endif SegmentRef buffer_r = _segMan->dereference(buf); -- cgit v1.2.3 From 112f03390d308af60d9c5f5e9f29c30988d2e968 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 5 Jul 2012 14:05:26 +0300 Subject: SCI: Fix typo --- engines/sci/graphics/frameout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 31ad7a50aa..20b8a241aa 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -295,7 +295,7 @@ reg_t GfxFrameout::addPlaneLine(reg_t object, Common::Point startPoint, Common:: void GfxFrameout::updatePlaneLine(reg_t object, reg_t hunkId, Common::Point startPoint, Common::Point endPoint, byte color, byte priority, byte control) { // Check if we're asked to update a line that was never added - if (object.isNull()) + if (hunkId.isNull()) return; for (PlaneList::iterator it = _planes.begin(); it != _planes.end(); ++it) { @@ -316,7 +316,7 @@ void GfxFrameout::updatePlaneLine(reg_t object, reg_t hunkId, Common::Point star void GfxFrameout::deletePlaneLine(reg_t object, reg_t hunkId) { // Check if we're asked to delete a line that was never added (happens during the intro of LSL6) - if (object.isNull()) + if (hunkId.isNull()) return; for (PlaneList::iterator it = _planes.begin(); it != _planes.end(); ++it) { -- cgit v1.2.3 From b1cc34a080ff31fb22ab466624a99c0cdaeb51c1 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 4 Jul 2012 23:18:29 +0200 Subject: CGE: Remove hack used to store keycode in CGEEvent --- engines/cge/cge_main.cpp | 10 +++++----- engines/cge/cge_main.h | 4 ++-- engines/cge/events.cpp | 17 ++++++++++------- engines/cge/events.h | 1 + engines/cge/vga13h.h | 3 ++- engines/cge/vmenu.cpp | 4 ++-- engines/cge/vmenu.h | 2 +- 7 files changed, 23 insertions(+), 18 deletions(-) diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index fbe37e58a0..a70e32de7e 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -518,8 +518,8 @@ Square::Square(CGEEngine *vm) : Sprite(vm, NULL), _vm(vm) { setShapeList(MB); } -void Square::touch(uint16 mask, int x, int y) { - Sprite::touch(mask, x, y); +void Square::touch(uint16 mask, int x, int y, Common::KeyCode keyCode) { + Sprite::touch(mask, x, y, keyCode); if (mask & kMouseLeftUp) { _vm->XZ(_x + x, _y + y).cell() = 0; _vm->_commandHandlerTurbo->addCommand(kCmdKill, -1, 0, this); @@ -758,11 +758,11 @@ void System::funTouch() { _funDel = n; } -void System::touch(uint16 mask, int x, int y) { +void System::touch(uint16 mask, int x, int y, Common::KeyCode keyCode) { funTouch(); if (mask & kEventKeyb) { - if (x == Common::KEYCODE_ESCAPE) { + if (keyCode == Common::KEYCODE_ESCAPE) { // The original was calling keyClick() // The sound is uselessly annoying and noisy, so it has been removed _vm->killText(); @@ -926,7 +926,7 @@ void CGEEngine::optionTouch(int opt, uint16 mask) { } #pragma argsused -void Sprite::touch(uint16 mask, int x, int y) { +void Sprite::touch(uint16 mask, int x, int y, Common::KeyCode keyCode) { _vm->_sys->funTouch(); if ((mask & kEventAttn) != 0) diff --git a/engines/cge/cge_main.h b/engines/cge/cge_main.h index b98fec531d..bde8306f36 100644 --- a/engines/cge/cge_main.h +++ b/engines/cge/cge_main.h @@ -92,7 +92,7 @@ public: void setPal(); void funTouch(); - virtual void touch(uint16 mask, int x, int y); + virtual void touch(uint16 mask, int x, int y, Common::KeyCode keyCode); void tick(); private: CGEEngine *_vm; @@ -101,7 +101,7 @@ private: class Square : public Sprite { public: Square(CGEEngine *vm); - virtual void touch(uint16 mask, int x, int y); + virtual void touch(uint16 mask, int x, int y, Common::KeyCode keyCode); private: CGEEngine *_vm; }; diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp index 98a39a947b..1530c870ef 100644 --- a/engines/cge/events.cpp +++ b/engines/cge/events.cpp @@ -135,9 +135,11 @@ void Keyboard::newKeyboard(Common::Event &event) { if ((event.type == Common::EVENT_KEYDOWN) && (_client)) { CGEEvent &evt = _vm->_eventManager->getNextEvent(); - evt._x = event.kbd.keycode; // Keycode - evt._mask = kEventKeyb; // Event mask - evt._spritePtr = _client; // Sprite pointer + evt._x = 0; + evt._y = 0; + evt._keyCode = event.kbd.keycode; // Keycode + evt._mask = kEventKeyb; // Event mask + evt._spritePtr = _client; // Sprite pointer } } @@ -204,6 +206,7 @@ void Mouse::newMouse(Common::Event &event) { CGEEvent &evt = _vm->_eventManager->getNextEvent(); evt._x = event.mouse.x; evt._y = event.mouse.y; + evt._keyCode = Common::KEYCODE_INVALID; evt._spritePtr = _vm->spriteAt(evt._x, evt._y); switch (event.type) { @@ -269,7 +272,7 @@ void EventManager::handleEvents() { CGEEvent e = _eventQueue[_eventQueueTail]; if (e._mask) { if (_vm->_mouse->_hold && e._spritePtr != _vm->_mouse->_hold) - _vm->_mouse->_hold->touch(e._mask | kEventAttn, e._x - _vm->_mouse->_hold->_x, e._y - _vm->_mouse->_hold->_y); + _vm->_mouse->_hold->touch(e._mask | kEventAttn, e._x - _vm->_mouse->_hold->_x, e._y - _vm->_mouse->_hold->_y, e._keyCode); // update mouse cursor position if (e._mask & kMouseRoll) @@ -278,11 +281,11 @@ void EventManager::handleEvents() { // activate current touched SPRITE if (e._spritePtr) { if (e._mask & kEventKeyb) - e._spritePtr->touch(e._mask, e._x, e._y); + e._spritePtr->touch(e._mask, e._x, e._y, e._keyCode); else - e._spritePtr->touch(e._mask, e._x - e._spritePtr->_x, e._y - e._spritePtr->_y); + e._spritePtr->touch(e._mask, e._x - e._spritePtr->_x, e._y - e._spritePtr->_y, e._keyCode); } else if (_vm->_sys) - _vm->_sys->touch(e._mask, e._x, e._y); + _vm->_sys->touch(e._mask, e._x, e._y, e._keyCode); if (e._mask & kMouseLeftDown) { _vm->_mouse->_hold = e._spritePtr; diff --git a/engines/cge/events.h b/engines/cge/events.h index 6bbd52e4a5..522aa67905 100644 --- a/engines/cge/events.h +++ b/engines/cge/events.h @@ -70,6 +70,7 @@ struct CGEEvent { uint16 _mask; uint16 _x; uint16 _y; + Common::KeyCode _keyCode; Sprite *_spritePtr; }; diff --git a/engines/cge/vga13h.h b/engines/cge/vga13h.h index beca19f667..a816f7756f 100644 --- a/engines/cge/vga13h.h +++ b/engines/cge/vga13h.h @@ -29,6 +29,7 @@ #define CGE_VGA13H_H #include "common/serializer.h" +#include "common/events.h" #include "graphics/surface.h" #include "cge/general.h" #include "cge/bitmap.h" @@ -146,7 +147,7 @@ public: void step(int nr = -1); Seq *setSeq(Seq *seq); CommandHandler::Command *snList(SnList type); - virtual void touch(uint16 mask, int x, int y); + virtual void touch(uint16 mask, int x, int y, Common::KeyCode keyCode); virtual void tick(); void sync(Common::Serializer &s); private: diff --git a/engines/cge/vmenu.cpp b/engines/cge/vmenu.cpp index a317a765d4..84b557f4a6 100644 --- a/engines/cge/vmenu.cpp +++ b/engines/cge/vmenu.cpp @@ -89,11 +89,11 @@ Vmenu::~Vmenu() { #define CALL_MEMBER_FN(object,ptrToMember) ((object).*(ptrToMember)) -void Vmenu::touch(uint16 mask, int x, int y) { +void Vmenu::touch(uint16 mask, int x, int y, Common::KeyCode keyCode) { if (!_items) return; - Sprite::touch(mask, x, y); + Sprite::touch(mask, x, y, keyCode); y -= kTextVMargin - 1; int n = 0; diff --git a/engines/cge/vmenu.h b/engines/cge/vmenu.h index 89ef7a9484..928b48f11c 100644 --- a/engines/cge/vmenu.h +++ b/engines/cge/vmenu.h @@ -58,7 +58,7 @@ public: MenuBar *_bar; Vmenu(CGEEngine *vm, Choice *list, int x, int y); ~Vmenu(); - virtual void touch(uint16 mask, int x, int y); + virtual void touch(uint16 mask, int x, int y, Common::KeyCode keyCode); private: char *_vmgt; CGEEngine *_vm; -- cgit v1.2.3 From 14a59b97b289416bc124985e7b5f3b45d8e7a7e0 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 4 Jul 2012 23:36:11 +0200 Subject: CGE: Silent some CppCheck warnings --- engines/cge/bitmap.cpp | 3 +++ engines/cge/vmenu.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp index 309b89bdda..4f85957b3d 100644 --- a/engines/cge/bitmap.cpp +++ b/engines/cge/bitmap.cpp @@ -123,12 +123,15 @@ Bitmap::~Bitmap() { Bitmap &Bitmap::operator=(const Bitmap &bmp) { debugC(1, kCGEDebugBitmap, "&Bitmap::operator ="); + if (this == &bmp) + return *this; uint8 *v0 = bmp._v; _w = bmp._w; _h = bmp._h; _m = NULL; _map = 0; + _vm = bmp._vm; delete[] _v; if (v0 == NULL) { diff --git a/engines/cge/vmenu.cpp b/engines/cge/vmenu.cpp index 84b557f4a6..910e54d267 100644 --- a/engines/cge/vmenu.cpp +++ b/engines/cge/vmenu.cpp @@ -63,7 +63,7 @@ Vmenu *Vmenu::_addr = NULL; int Vmenu::_recent = -1; Vmenu::Vmenu(CGEEngine *vm, Choice *list, int x, int y) - : Talk(vm, VMGather(list), kTBRect), _menu(list), _bar(NULL), _vm(vm) { + : Talk(vm, VMGather(list), kTBRect), _menu(list), _bar(NULL), _vmgt(NULL), _vm(vm) { Choice *cp; _addr = this; -- cgit v1.2.3 From 75137862967cd18a87dec16a6a322f9f97d54202 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 6 Jul 2012 12:11:12 +0300 Subject: SCI: Add a hack to handle the internal script resolution in Phantasmagoria --- engines/sci/graphics/frameout.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 20b8a241aa..defc55edb2 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -131,6 +131,20 @@ void GfxFrameout::kernelAddPlane(reg_t object) { tmpRunningWidth = 320; tmpRunningHeight = 200; } + + // HACK: Game scripts in Phantasmagoria 1 seem to use a very odd internal + // resolution, or some other extra calculation is taking place. + // Changing the internal script dimensions to these odd values fixes + // object positioning, but makes the interface picture slightly bigger, + // thus there is a small gap between the room picture and the interface + // edges, plus a couple of pixels of the picture are cut off in the + // bottom. + // FIXME: Find how to properly handle the script dimensions in + // Phantasmagoria. This can't be right. + if (g_sci->getGameId() == GID_PHANTASMAGORIA) { + tmpRunningWidth = 325; + tmpRunningHeight = 213; + } _coordAdjuster->setScriptsResolution(tmpRunningWidth, tmpRunningHeight); } -- cgit v1.2.3 From e4378d5bac1b2467190e21333a037a6af34bba52 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 6 Jul 2012 13:17:04 +0300 Subject: SCI: Better handling for Phantasmagoria's odd screen size Still not right, as the width isn't set --- engines/sci/graphics/frameout.cpp | 13 +++---------- engines/sci/graphics/screen.cpp | 7 +++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index defc55edb2..b13c7f4dce 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -132,18 +132,11 @@ void GfxFrameout::kernelAddPlane(reg_t object) { tmpRunningHeight = 200; } - // HACK: Game scripts in Phantasmagoria 1 seem to use a very odd internal - // resolution, or some other extra calculation is taking place. - // Changing the internal script dimensions to these odd values fixes - // object positioning, but makes the interface picture slightly bigger, - // thus there is a small gap between the room picture and the interface - // edges, plus a couple of pixels of the picture are cut off in the - // bottom. - // FIXME: Find how to properly handle the script dimensions in - // Phantasmagoria. This can't be right. + // HACK: Phantasmagoria 1 sets a window size of 630x450. + // We can't set a width of 630, as that messes up the pitch, so we hack + // the internal script width here if (g_sci->getGameId() == GID_PHANTASMAGORIA) { tmpRunningWidth = 325; - tmpRunningHeight = 213; } _coordAdjuster->setScriptsResolution(tmpRunningWidth, tmpRunningHeight); diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp index 4020518b72..3030fb4386 100644 --- a/engines/sci/graphics/screen.cpp +++ b/engines/sci/graphics/screen.cpp @@ -97,6 +97,13 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) { break; } + // Phantasmagoria 1 sets a window area of 630x450 + if (g_sci->getGameId() == GID_PHANTASMAGORIA) { + // TODO: Also set width to 630 (can't be set right now, as it messes up + // the pitch). For now, a hack has been placed in GfxFrameout::kernelAddPlane() + _height = 450; + } + _displayPixels = _displayWidth * _displayHeight; _visualScreen = (byte *)calloc(_pixels, 1); _priorityScreen = (byte *)calloc(_pixels, 1); -- cgit v1.2.3 From 47499fa8a0da90ecb348a7feda2196bba3ea8a13 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 7 Jul 2012 01:10:21 +0100 Subject: DOCS: Update Swedish README from patch #3539543 --- doc/se/LasMig | 160 +++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 136 insertions(+), 24 deletions(-) diff --git a/doc/se/LasMig b/doc/se/LasMig index 656210883f..9ac79b4c35 100644 --- a/doc/se/LasMig +++ b/doc/se/LasMig @@ -1,5 +1,4 @@ ScummVM LÄS MIG -Senast uppdaterad: $Date$ ------------------------------------------------------------------------ För ytterligare information, kompatibilitetslistor, donationsdetaljer, den senaste programversionen, utvecklingsrapporter med mera, var god besök ScummVM:s hemsida pÃ¥ http://www.scummvm.org/ @@ -55,6 +54,8 @@ InnehÃ¥ll: * 7.8 Att använda komprimerade ljudfiler (MP3, Ogg Vorbis, Flac) * 7.9 Uppspelningsfrekvens 8.0) Konfigurationsfilen + * 8.1 Igenkända nyckelord + * 8.2 Spelinställningar som kan aktiveras via användargränssnittet 9.0) Kompilering @@ -184,13 +185,18 @@ AGOS-spel frÃ¥n Adventuresoft/Horrorsoft: The Feeble Files [feeble] GOB-spel frÃ¥n Coktel Vision: + Bambou le sauveur de la jungle [bambou] Bargon Attack [bargon] + Fascination [fascination] + Geisha [geisha] Gobliiins [gob1] Gobliins 2 [gob2] Goblins 3 [gob3] Lost in Time [lostintime] + Once Upon A Time: Little Red Riding Hood [littlered] The Bizarre Adventures of Woodruff and the Schnibble [woodruff] + Urban Runner [urban] Ween: The Prophecy [ween] MADE-spel frÃ¥n Activision: @@ -221,6 +227,7 @@ MADE-spel frÃ¥n Activision: SCUMM-spel frÃ¥n Humongous Entertainment: Backyard Baseball [baseball] Backyard Baseball 2001 [baseball2001] + Backyard Baseball 2003 [baseball2003] Backyard Football [football] Big Thinkers First Grade [thinker1] Big Thinkers Kindergarten [thinkerk] @@ -288,7 +295,6 @@ Living Books-spel: De följande spelen borde starta, men är ännu ej helt spelbara. Spela dem pÃ¥ egen risk och var god skicka inga buggrapporter angÃ¥ende dem. För senaste nytt angÃ¥ende spelkompatibilitet kan du besöka vÃ¥r hemsida och läsa kompatibilitetslistan. - Backyard Baseball 2003 [baseball2003] Backyard Football 2002 [football2002] Backyard Soccer [soccer] Backyard Soccer MLS [soccermls] @@ -387,6 +393,11 @@ Instruktionerna för Broken Sword-spelen är för Sold-Out Software-versionerna ------ --------------------------------- Filmscenerna i Broken Sword-spelen har varit med om en hel del (se nästa avdelning om du är intresserad) men i regel behöver du bara kopiera .SMK-filerna frÃ¥n â€SMACKS†eller â€SMACKSHIâ€-katalogerna pÃ¥ CD-skivorna till samma katalog där de andra datafilerna ligger. (Broken Sword har även en â€SMACKSLO†katalog med samma filmscener, men dessa har lägre kvalitet.) Du kan även lägga dem i en underkatalog med namnet â€videoâ€, om du vill. +För PlayStation-versionerna kan du dumpa originalfilmerna frÃ¥n CD:n. Dumpa varje fil med ändelsen â€STR†som rÃ¥a sektorer frÃ¥n CD:n (samtliga 2352 bitar per sektor). DU kan även använde de omkodade filmscenerna nedan istället, men detta fungerar inte för alla filmer i Broken Sword II. För ytterligare information, se: + + http://wiki.scummvm.org/index.php/HOWTO-PlayStation_Videos + + Vissa nyutgÃ¥vor av spelen, tillika PlayStation-versionen, har inga Smacker videos. Revolution Software har varit goda nog att skapa nykodade filmscener som kan laddas hem frÃ¥n vÃ¥ran hemsida: http://www.scummvm.org/downloads.php @@ -395,7 +406,7 @@ Dessa filmscener är tillgängliga i DXA-format med FLAC-ljud. Kvaliteten är de För de system som är för lÃ¥ngsamma för att hantera FLAC-ljud finns ljudet för dessa filmscener att ladda hem separat som OGG Vorbis-ljud. För att se dessa filmscener med OGG Vorbis-ljud krävs en version av ScummVM som kompilerats med stöd för bÃ¥de libVorbis och zlib. -Vi erbjuder även ett tillägg för undertexter i Broken Sword. Packa upp tillägget och följ instruktionerna i readme.txt-filen. (Broken Sword II har redan undertexter; inga modifikationer krävs för dem). +Vi erbjuder även ett tillägg för undertexter i Broken Sword. Packa upp tillägget och följ instruktionerna i readme.txt-filen. Undertextpaketet fungerar för tillfället inte med PlayStation-filmer (Broken Sword II har redan undertexter; inga modifikationer krävs för dem). 3.7.2) Broken Sword-spelens filmscener – en Ã¥terblick: @@ -475,7 +486,7 @@ Döp om voices.wav pÃ¥ CD4 till voices4.wav 3.14) Notiser om The Legend of Kyrandia: ----- ---------------------------------- -För att spela The Legend of Kyrandia i ScummVM behöver du “kyra.datâ€-filen som är tillgänglig frÃ¥n â€Downloadsâ€-avdelningen pÃ¥ ScummVM:s hemsida. +För att spela The Legend of Kyrandia i ScummVM behöver du “kyra.datâ€-filen. Filen borde alltid inkluderas med officiella ScummVM-paket. Om ScummVM klagar över att filen saknas kan du finna den pÃ¥ “Downloadsâ€-avdelningen av ScummVM:s hemsida. Märk att den nuvarande Windows-versionen av ScummVM borde ha filen inbyggd i programfilen, och sÃ¥lunda behöver du bara ladda hem den om ScummVM klagar över att filen saknas. 3.15) Notiser om Sierra AGI-spel med textinmatningshjälp: @@ -537,10 +548,6 @@ Den här versionen har följande kända problem. Du behöver inte rapportera dem FM-TOWNS-versioner av spel: - Kanji-versioner kräver en FM-TOWNS Font ROM - - ScummVM krashar slumpmässigt när FM-TOWNS Font Rom används för - kanji-versionerna av de följande spelen: - The Secret of Monkey Island, Monkey Island 2: LeChuck's Revenge - och Indiana Jones and the Fate of Atlantis Loom: - Att stänga av undertexterna via konfigurationsfilen är inte pÃ¥litligt dÃ¥ @@ -590,7 +597,6 @@ Den här versionen har följande kända problem. Du behöver inte rapportera dem The Legend of Kyrandia: - Varken musik eller ljudeffekter i Macintosh diskett-versioner. - Macintosh-CD använder DOS-musik och ljudeffekter. - - PC-9821-versionen saknar stöd för ljudeffekter. Humongous Entertainment-spel: - Endast originalgränssnittet för att ladda och spara kan användas. @@ -668,6 +674,7 @@ Ordning: scummvm [INSTÄLLNINGAR]... [SPEL] --themepath=PATH Sökväg dit GUI-teman lagras --list-themes Visa full lista med alla användbara GUI-teman -e, --music-driver=MODE Välj musik-driver (se även avdelning 7.0) + --list-audio-devices Visar tillgängliga ljudenheter -q, --language=LANG Välj spelets sprÃ¥k (se även avdelning 5.2) -m, --music-volume=NUM Ställ in musikvolym, 0-255 (standard: 192) -s, --sfx-volume=NUM Ställ in ljudeffektsvolym, 0-255 (standard: 192) @@ -822,19 +829,28 @@ Motorer som för närvarande stöder Ã¥tervändo till launchern: AGI AGOS CINE + COMPOSER + CRUISE DRACI + DRASCULA GOB GROOVIE + HUGO KYRA LURE + MADE + MOHAWK PARALLACTION QUEEN SAGA + SCI SCUMM SKY SWORD1 SWORD2 + TEENAGENT TOUCHE + TSAGE TUCKER @@ -1006,8 +1022,24 @@ Notis för WinCE-användare: PÃ¥ grund av de begränsade tangentborden pÃ¥ de fl Spardata lagras som standard i den aktiva katalogen pÃ¥ vissa plattformar och i förbestämda kataloger pÃ¥ andra plattformar. Du kan ställa in katalogen i konfigurationsfilen genom att ändra savepath-parametern. Se exempel för konfigurationsfilen senare i detta dokument. Plattformar som för närvarande har annorlunda standardkataloger: - Mac OS X: $HOME/Documents/ScummVM Savegames/ - Övriga unix-system: $HOME/.scummvm/ + Mac OS X: + $HOME/Documents/ScummVM Savegames/ + + Övriga unix-system: + $HOME/.scummvm/ + + Windows Vista/7: + \Users\username\AppData\Roaming\ScummVM\Saved games\ + + Windows 2000/XP: + \Documents and Settings\username\Application Data\ScummVM\Saved games\ + + Windows NT4: + \Profiles\username\Application Data\ScummVM\Saved games\ + +Spardata lagras i en gömd map I Windows NT4/2000/XP/Vista/7, som kan kommas Ã¥t genom att köra "%APPDATA%%\ScummVM\Saved Games\" eller genom att visa dolda filer i Windows Explorer. + +Notis för användare av NT4/2000/XP/Vista/7: Den förutbestämda platsen för spardata har ändrats i ScummVM 1.5.0. Migrationsfilen kan användas för att kopiera spardata frÃ¥n den förra platsen till den nya. 6.1) Autosparning: @@ -1059,20 +1091,28 @@ Där “xxx†stÃ¥r för positionsnumret (t.ex. 001) i ScummVM. AGI AGOS + CGE CINE + CRUISE DRACI GROOVIE + HUGO KYRA LURE + MOHAWK PARALLACTION QUEEN SAGA + SCI SCUMM SKY SWORD1 SWORD2 + TEENAGENT TINSEL + TOON TOUCHE + TSAGE TUCKER --save-slot/-x: @@ -1086,20 +1126,28 @@ Där “xxx†stÃ¥r för positionsnumret (t.ex. 001) i ScummVM. Motorer som för tillfället stöder --save-slot/-x: AGI + CGE CINE + CRUISE DRACI GROOVIE + HUGO KYRA LURE - PARALLACTION + MOHAWK QUEEN SAGA + SCI SCUMM SKY SWORD1 SWORD2 + TEENAGENT TINSEL + TOON TOUCHE + TSAGE + TUCKER 7.0) Musik och ljud: @@ -1396,7 +1444,7 @@ Att använda frekvenser mellan de ovansagda rekommenderas ej. Till att börja me ---- -------------------- Som standard sparas och laddas konfigrationsfilen i: - Windows Vista: + Windows Vista/7: \Users\username\AppData\Roaming\ScummVM\scummvm.ini, Windows 2000/XP: @@ -1458,6 +1506,9 @@ Ett exempel pÃ¥ en konfigurationsfil ser ut sÃ¥ här: path=C:\amiga_mi2\ music_driver=windows + +8.1) Igenkända nyckelord +---- ------------------- Följande nyckelord kan användas: path string Sökvägen dit spelets datafiler ligger @@ -1483,7 +1534,6 @@ Följande nyckelord kan användas: fullscreen bool Fullskärmsläge aspect_ratio bool Aktivera korrektion av bildförhÃ¥llande - disable_dithering bool Anti-gitter för EGA-spel gfx_mode string Grafikläge (normalt, 2x, 3x, 2xsai, super2xsai, supereagle, advmame2x, advmame3x, hq2x, hq3x, tv2x, dotmatrix) @@ -1529,6 +1579,29 @@ Följande nyckelord kan användas: boot_param number Skicka det här numret till boot script +Sierra-spel som använder AGI-motorn använder även följande nyckelord: + + originalsaveload bool Ställ in till “true†för att använda + originalskärmarna för ladda/spara + istället för ScummVM:s förbättrade + skärmar + +Sierra-spel som använder SCI-motorn använder även följande nyckelord: + + disable_dithering bool Tar bort gitter artefakter frÃ¥n EGA-spel + prefer_digitalsfx bool Ställ in till “true†för att föredra + digitala ljudeffekter istället för + syntetiserade ljudeffekter + originalsaveload bool Ställ in till “true†för att använda + originalskärmarna för ladda/spara + istället för ScummVM:s förbättrade + skärmar + native_fb01 bool Ställ in till “true†för att använda + ett IBM Music Feature-kort eller en + Yamaha FB-01 FM synthmodul för + MIDI-uppspelning + + Broken Sword II lägger till följande nyckelord: gfx_details number Grafisk detalj (0-3) @@ -1546,6 +1619,13 @@ Flight of the Amazon Queen lägger till följande nyckelord: sfx_mute bool Ställ in till “true†för att deaktivera ljudeffekter + +Jones in the Fast Lane använder även följande nyckelord: + music_mute bool Ställ in till “true†för att använda + CD-ljud, om tillgängligt, istället + spelets vanliga ljud. + + King's Quest VI Windows lägger till följande nyckelord: windows_cursors bool Ställ in till “true†för att använda de svartvita @@ -1553,6 +1633,25 @@ King's Quest VI Windows lägger till följande nyckelord: Ställ in till â€false†för att använda de uppskalade muspekarna som matchar resten av grafiken. + +Lands of Lore: The Throne of Chaos använder även följande nyckelord: + + smooth_scrolling bool Ställ in till “true†för mjukare + skärmrullning när du gÃ¥r frÃ¥n en + skärm till en annan. + floating_cursors bool Ställ in till “true†för att ändra + pekaren till en riktningspil när den + närmar sig kanten av skärmen. Spelaren + kan sedan klicka för att gÃ¥ mot + den riktningen. + + +Space Quest IV CD använder även följande nyckelord: + + silver_cursors bool Ställ in till “true†för att använda + silverpekare istället för gulpekarna + + Simon the Sorcerer 1 och 2 lägger till följande nyckelord: music_mute bool Ställ in till “true†för att deaktivera musik @@ -1565,6 +1664,28 @@ The Legend of Kyrandia lägger till följande nyckelord: walkspeed int GÃ¥nghastighet (0-4) +The Legend of Kyrandia: Malcolm's Revenge använder även följande nyckelord: + + studio_audience bool Ställ in till “true†för att höra + skratt och applÃ¥der när Malcolm + berättar ett skämt + skip_support bool Ställ in till “true†för att kunna + skippa text och filmscener + helium_mode bool Ställ in till “true†sÃ¥ lÃ¥ter folk + som att dom inandats helium + +The 7th Guest använder även följande nyckelord: + + t7g_speed string Hastighet pÃ¥ videouppspelning + (normal, tweaked, im_an_ios) + + +8.2) Spelinställningar som kan aktiveras via användargränssnittet +---- ------------------------------------------------------------ +MÃ¥nga av inställningarna i den föregÃ¥ende avdelningen kan aktiveras via användargränssnittet. Om en inställning finns tillgänglig för ett specifikt spel visas en ny tabb med namnet â€Motor†när du lägger till eller ändrar inställningarna för spelet. +Om specialinställningarna inte visas mÃ¥ste spelet köras en gÃ¥ng eller läggas till igen i spellistan i ScummVM:s launcher. Detta uppdaterar inställningarna för varje spel, vilket lÃ¥ter specialinställningarna visas. + + 9.0) Kompilering: ---- ------------ För en uppdaterad överblick för hur man kompilerar ScummVM pÃ¥ diverse plattformar var god se vÃ¥r Wiki, speciellt den här här sidan: @@ -1599,15 +1720,6 @@ PÃ¥ Win9x/NT/XP kan du definiera USE_WINDBG och lägga till WinDbg för att visa * Var god se: http://wiki.scummvm.org/index.php/Compiling_ScummVM/Windows_CE - Debian GNU/Linux: - * Installera paketen 'build-essential', 'fakeroot', 'debhelper', - och 'libsdl1.2-dev' pÃ¥ ditt system. - * Installera de här paketen (valfria): 'libvorbis-dev' (för Ogg - Vorbis stöd), 'libasound2-dev' (för ALSA sequencer stöd), - 'libmad0-dev' (för MAD MP3 stöd), 'zlib1g-dev' (för stöd av kompresserad spardata). - * Kör 'make deb'. - * Kör sedan 'dpkg -i ../scummvm-cvs*deb', sÃ¥ är du klar. - Mac OS X: * Se till att du har utvecklingsverktygen istallerade. * SDL-utvecklingspaketet för OS X som finns tillgängligt pÃ¥ SLD:s hemsida @@ -1649,4 +1761,4 @@ PÃ¥ Win9x/NT/XP kan du definiera USE_WINDBG och lägga till WinDbg för att visa Lycka till och glada äventyr! ScummVM-teamet. http://www.scummvm.org/ ------------------------------------------------------------------------- \ No newline at end of file +------------------------------------------------------------------------ -- cgit v1.2.3 From 56194194aa1cea352185ab5dcafdbe7ca234a5ef Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 7 Jul 2012 01:15:04 +0100 Subject: I18N: Update Danish translation This was sent by Steffen Nyeland by email. --- po/da_DA.po | 441 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 219 insertions(+), 222 deletions(-) diff --git a/po/da_DA.po b/po/da_DA.po index 50068cae5e..eb62af84a9 100644 --- a/po/da_DA.po +++ b/po/da_DA.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-06-24 18:06+0100\n" -"PO-Revision-Date: 2011-01-08 22:53+0100\n" +"PO-Revision-Date: 2012-06-29 19:45+0100\n" "Last-Translator: Steffen Nyeland \n" "Language-Team: Steffen Nyeland \n" "MIME-Version: 1.0\n" @@ -15,6 +15,8 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Language: Dansk\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-Language: Danish\n" +"X-Poedit-Country: DENMARK\n" #: gui/about.cpp:91 #, c-format @@ -77,7 +79,6 @@ msgid "Remap keys" msgstr "Kortlæg taster" #: gui/gui-manager.cpp:129 base/main.cpp:307 -#, fuzzy msgid "Toggle FullScreen" msgstr "Skift fuldskærm" @@ -193,9 +194,8 @@ msgid "Platform:" msgstr "Platform:" #: gui/launcher.cpp:231 -#, fuzzy msgid "Engine" -msgstr "Undersøg" +msgstr "Motor" #: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" @@ -386,11 +386,11 @@ msgstr "Start det valgte spil" #: gui/launcher.cpp:628 msgid "~L~oad..." -msgstr "~H~ent..." +msgstr "Ind~l~æs..." #: gui/launcher.cpp:628 msgid "Load savegame for selected game" -msgstr "Hent gemmer for det valgte spil" +msgstr "Indlæs gemmer for det valgte spil" #: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." @@ -493,7 +493,7 @@ msgstr "Vil du virkelig fjerne denne spil konfiguration?" #: gui/launcher.cpp:1001 msgid "This game does not support loading games from the launcher." -msgstr "Dette spil understøtter ikke hentning af spil fra spiloversigten." +msgstr "Dette spil understøtter ikke indlæsning af spil fra spiloversigten." #: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" @@ -520,7 +520,7 @@ msgstr "Skan gennemf #: gui/massadd.cpp:261 #, c-format msgid "Discovered %d new games, ignored %d previously added games." -msgstr "" +msgstr "Opdaget %d nye spil, ignorerede %d tidligere tilføjede spil." #: gui/massadd.cpp:265 #, c-format @@ -528,9 +528,9 @@ msgid "Scanned %d directories ..." msgstr "Gennemset %d biblioteker ..." #: gui/massadd.cpp:268 -#, fuzzy, c-format +#, c-format msgid "Discovered %d new games, ignored %d previously added games ..." -msgstr "Fundet %d nye spil ..." +msgstr "Fundet %d nye spil, ignorer %d tidligere tilføjede spil ..." #: gui/options.cpp:78 msgid "Never" @@ -580,19 +580,19 @@ msgstr "Ingen" #: gui/options.cpp:382 msgid "Failed to apply some of the graphic options changes:" -msgstr "" +msgstr "Anvendelse af ændringer for grafiske indstillinger fejlede:" #: gui/options.cpp:394 msgid "the video mode could not be changed." -msgstr "" +msgstr "videotilstanden kunne ikke ændres." #: gui/options.cpp:400 msgid "the fullscreen setting could not be changed" -msgstr "" +msgstr "fuld skærm indstillingen kunne ikke ændres" #: gui/options.cpp:406 msgid "the aspect ratio setting could not be changed" -msgstr "" +msgstr "billedformat indstillingen ikke kunne ændres" #: gui/options.cpp:727 msgid "Graphics mode:" @@ -672,7 +672,7 @@ msgstr "GM enhed:" #: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" -msgstr "Angiver standard lyd enhed for General MIDI udgang" +msgstr "Angiver standard lyd enhed for General MIDI-udgang" #: gui/options.cpp:826 msgid "Don't use General MIDI music" @@ -887,9 +887,8 @@ msgid "Language of ScummVM GUI" msgstr "Sprog for brugerfladen i ScummVM" #: gui/options.cpp:1347 -#, fuzzy msgid "You have to restart ScummVM before your changes will take effect." -msgstr "Du skal genstarte ScummVM for at ændringer vises." +msgstr "Du skal genstarte ScummVM før dine ændringer har effekt." #: gui/options.cpp:1360 msgid "Select directory for savegames" @@ -1022,20 +1021,17 @@ msgstr "Kunne ikke finde nogen motor istand til at afvikle det valgte spil" #: common/error.cpp:38 msgid "No error" -msgstr "" +msgstr "Ingen fejl" #: common/error.cpp:40 -#, fuzzy msgid "Game data not found" msgstr "Spil data ikke fundet" #: common/error.cpp:42 -#, fuzzy msgid "Game id not supported" msgstr "Spil id ikke understøttet" #: common/error.cpp:44 -#, fuzzy msgid "Unsupported color mode" msgstr "Ikke understøttet farve tilstand" @@ -1048,7 +1044,6 @@ msgid "Write permission denied" msgstr "Skrive rettighed nægtet" #: common/error.cpp:52 -#, fuzzy msgid "Path does not exist" msgstr "Sti eksistere ikke" @@ -1065,9 +1060,8 @@ msgid "Cannot create file" msgstr "Kan ikke oprette fil" #: common/error.cpp:61 -#, fuzzy msgid "Reading data failed" -msgstr "Læsning fejlet" +msgstr "Læsning af data fejlet" #: common/error.cpp:63 msgid "Writing data failed" @@ -1075,34 +1069,33 @@ msgstr "Skrivning af data fejlet" #: common/error.cpp:66 msgid "Could not find suitable engine plugin" -msgstr "" +msgstr "Kunne ikke finde passende motor udvidelse" #: common/error.cpp:68 -#, fuzzy msgid "Engine plugin does not support save states" -msgstr "Motor understøtter ikke fejlfindingsniveau '%s'" +msgstr "Motor udvidelse understøtter ikke gemmetilstande" #: common/error.cpp:71 msgid "User canceled" -msgstr "" +msgstr "Bruger annullerede" #: common/error.cpp:75 -#, fuzzy msgid "Unknown error" msgstr "Ukendt fejl" #: engines/advancedDetector.cpp:324 #, c-format msgid "The game in '%s' seems to be unknown." -msgstr "" +msgstr "Spillet i '%s' ser ud til at være ukendt." #: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" +"Venligst, rapportere følgende data til ScummVM holdet sammen med navnet" #: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" -msgstr "" +msgstr "på det spil, du forsøgte at tilføje og dets version/sprog/ etc.:" #: engines/dialogs.cpp:84 msgid "~R~esume" @@ -1159,6 +1152,9 @@ msgid "" "the README for basic information, and for instructions on how to obtain " "further assistance." msgstr "" +"Beklager, denne motor leverer i øjeblikket ikke spil hjælp. Se venligst " +"README for grundlæggende oplysninger, og for at få instruktioner om, hvordan " +"man får yderligere hjælp." #: engines/dialogs.cpp:228 #, c-format @@ -1166,6 +1162,8 @@ msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" +"Gem af spiltilstand fejlede (%s)! Se venligst README for grundlæggende " +"oplysninger, og for at få instruktioner om, hvordan man får yderligere hjælp." #: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 @@ -1183,21 +1181,19 @@ msgstr "~T~aster" #: engines/engine.cpp:235 msgid "Could not initialize color format." -msgstr "" +msgstr "Kunne ikke initialisere farveformat." #: engines/engine.cpp:243 -#, fuzzy msgid "Could not switch to video mode: '" -msgstr "Aktuel videotilstand:" +msgstr "Kunne ikke skifte til videotilstand: '" #: engines/engine.cpp:252 -#, fuzzy msgid "Could not apply aspect ratio setting." -msgstr "Skift billedformat korrektion" +msgstr "Kunne ikke anvende billedformat korrektion indstilling." #: engines/engine.cpp:257 msgid "Could not apply fullscreen setting." -msgstr "" +msgstr "Kunne ikke anvende fuldskærm indstilling." #: engines/engine.cpp:357 msgid "" @@ -1207,6 +1203,11 @@ msgid "" "the data files to your hard disk instead.\n" "See the README file for details." msgstr "" +"Det lader til at du spiller dette spil direkte\n" +"fra cd'en. Dette er kendt for at forårsage problemer,\n" +"og det anbefales derfor, at du kopierer\n" +"datafiler til din harddisk i stedet.\n" +"Se README fil for detaljer." #: engines/engine.cpp:368 msgid "" @@ -1216,6 +1217,11 @@ msgid "" "order to listen to the game's music.\n" "See the README file for details." msgstr "" +"Dette spil har lydspor på sin disk. Disse\n" +"spor skal rippes fra disken ved hjælp af\n" +"en passende CD audio udvindingsværktøj\n" +"for at lytte til spillets musik.\n" +"Se README fil for detaljer." #: engines/engine.cpp:426 #, c-format @@ -1223,6 +1229,9 @@ msgid "" "Gamestate load failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" +"Indlæsning af spiltilstand fejlede (%s)! Se venligst README for " +"grundlæggende oplysninger, og for at få instruktioner om, hvordan man får " +"yderligere hjælp." #: engines/engine.cpp:439 msgid "" @@ -1230,20 +1239,23 @@ msgid "" "ScummVM. As such, it is likely to be unstable, and any saves you make might " "not work in future versions of ScummVM." msgstr "" +"ADVARSEL: Spillet du er ved at starte endnu ikke er fuldt understøttet af " +"ScummVM. Således, er det sandsynligt, at det er ustabilt, og alle gemmer du " +"foretager fungerer muligvis ikke i fremtidige versioner af ScummVM." #: engines/engine.cpp:442 msgid "Start anyway" -msgstr "" +msgstr "Start alligevel" #: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" -msgstr "" +msgstr "Brug original gem/indlæs skærme" #: 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 "Brug de originale gem/indlæs skærme, istedet for dem fra ScummVM" #: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 msgid "Restore game:" @@ -1254,105 +1266,102 @@ msgid "Restore" msgstr "Gendan" #: engines/dreamweb/detection.cpp:57 -#, fuzzy msgid "Use bright palette mode" -msgstr "Øverste højre punkt" +msgstr "Brug lys palet tilstand" #: engines/dreamweb/detection.cpp:58 msgid "Display graphics using the game's bright palette" -msgstr "" +msgstr "Vis grafik ved hjælp af spillets lyse palette" #: engines/sci/detection.cpp:370 msgid "EGA undithering" msgstr "EGA farveforøgelse" #: engines/sci/detection.cpp:371 -#, fuzzy msgid "Enable undithering in EGA games" -msgstr "Aktiver farveforøgelse i EGA spil der understøtter det" +msgstr "Aktiver farveforøgelse i EGA spil" #: engines/sci/detection.cpp:380 -#, fuzzy msgid "Prefer digital sound effects" -msgstr "Lydstyrke for specielle lydeffekter" +msgstr "Foretræk digitale lydeffekter" #: engines/sci/detection.cpp:381 msgid "Prefer digital sound effects instead of synthesized ones" -msgstr "" +msgstr "Foretræk digitale lydeffekter i stedet for syntetiserede" #: engines/sci/detection.cpp:400 msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "" +msgstr "Brug IMF/Yahama FB-01 til MIDI-udgang" #: engines/sci/detection.cpp:401 msgid "" "Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " "output" msgstr "" +"Bruge et IBM Musik Feature-kort eller et Yahama FB-01 FM synth modul til " +"MIDI-udgang" #: engines/sci/detection.cpp:411 msgid "Use CD audio" -msgstr "" +msgstr "Brug CD lyd" #: engines/sci/detection.cpp:412 msgid "Use CD audio instead of in-game audio, if available" -msgstr "" +msgstr "Brug cd-lyd i stedet for lyd fra spillet, hvis tilgængelige" #: engines/sci/detection.cpp:422 msgid "Use Windows cursors" -msgstr "" +msgstr "Brug Windows markør" #: engines/sci/detection.cpp:423 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" -msgstr "" +msgstr "Brug Windows-markører (mindre og monokrome) i stedet for dem fra DOS" #: engines/sci/detection.cpp:433 -#, fuzzy msgid "Use silver cursors" -msgstr "Normal markør" +msgstr "Brug sølv markør" #: engines/sci/detection.cpp:434 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" +"Brug det alternative sæt af sølv markører, i stedet for de normale gyldne" #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." -msgstr "" +msgstr "Indsæt Disk %c og Tryk på knappen for at fortsætte." #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Unable to Find %s, (%c%d) Press Button." -msgstr "" +msgstr "Kunne ikke finde %s, (%c%d) Tryk på knappen." #: engines/scumm/dialogs.cpp:177 #, c-format msgid "Error reading disk %c, (%c%d) Press Button." -msgstr "" +msgstr "Fejl ved læsning af disk %c, (%c%d) Tryk på knappen." #: engines/scumm/dialogs.cpp:178 msgid "Game Paused. Press SPACE to Continue." -msgstr "" +msgstr "Spil sat på pause. Tryk MELLEMRUM for at fortsætte." #. I18N: You may specify 'Yes' symbol at the end of the line, like this: #. "Moechten Sie wirklich neu starten? (J/N)J" #. Will react to J as 'Yes' #: engines/scumm/dialogs.cpp:182 -#, fuzzy msgid "Are you sure you want to restart? (Y/N)" -msgstr " Er du sikker på at du vil afslutte ? " +msgstr "Er du sikker på at du vil genstarte? (J/N) " #. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment #: engines/scumm/dialogs.cpp:184 -#, fuzzy msgid "Are you sure you want to quit? (Y/N)" -msgstr " Er du sikker på at du vil afslutte ? " +msgstr "Er du sikker på at du vil afslutte? (J/N) " #: engines/scumm/dialogs.cpp:189 msgid "Play" -msgstr "" +msgstr "Spil" #: engines/scumm/dialogs.cpp:191 engines/scumm/help.cpp:82 #: engines/scumm/help.cpp:84 @@ -1365,42 +1374,41 @@ msgstr "Afslut" #: engines/scumm/dialogs.cpp:193 msgid "Insert save/load game disk" -msgstr "" +msgstr "Indsæt gem/indlæs spil disk" #: engines/scumm/dialogs.cpp:194 msgid "You must enter a name" -msgstr "" +msgstr "Du skal indtaste et name" #: engines/scumm/dialogs.cpp:195 msgid "The game was NOT saved (disk full?)" -msgstr "" +msgstr "Spillet blev ikke gemt (disk fuld?)" #: engines/scumm/dialogs.cpp:196 msgid "The game was NOT loaded" -msgstr "" +msgstr "Spillet blev IKKE indlæst" #: engines/scumm/dialogs.cpp:197 #, c-format msgid "Saving '%s'" -msgstr "" +msgstr "Gemmer '%s'" #: engines/scumm/dialogs.cpp:198 #, c-format msgid "Loading '%s'" -msgstr "" +msgstr "Indlæser '%s'" #: engines/scumm/dialogs.cpp:199 msgid "Name your SAVE game" -msgstr "" +msgstr "Navngiv din GEMMER" #: engines/scumm/dialogs.cpp:200 -#, fuzzy msgid "Select a game to LOAD" -msgstr "Vælg et tema" +msgstr "Vælg et spil at indlæse" #: engines/scumm/dialogs.cpp:201 msgid "Game title)" -msgstr "" +msgstr "Spil titel)" #. I18N: Previous page button #: engines/scumm/dialogs.cpp:287 @@ -1418,46 +1426,41 @@ msgid "~C~lose" msgstr "~L~uk" #: engines/scumm/dialogs.cpp:597 -#, fuzzy msgid "Speech Only" -msgstr "Tale" +msgstr "Kun tale" #: engines/scumm/dialogs.cpp:598 -#, fuzzy msgid "Speech and Subtitles" -msgstr "Undertekster" +msgstr "Tale og Undertekster" #: engines/scumm/dialogs.cpp:599 -#, fuzzy msgid "Subtitles Only" -msgstr "Undertekster" +msgstr "Kun undertekster" #: engines/scumm/dialogs.cpp:607 -#, fuzzy msgctxt "lowres" msgid "Speech & Subs" -msgstr "Tale" +msgstr "Tale & Tekst" #: engines/scumm/dialogs.cpp:653 msgid "Select a Proficiency Level." -msgstr "" +msgstr "Vælg et Færdighedsniveau." #: engines/scumm/dialogs.cpp:655 msgid "Refer to your Loom(TM) manual for help." -msgstr "" +msgstr "Se din Loom(TM) manual for hjælp." #: engines/scumm/dialogs.cpp:658 -#, fuzzy msgid "Standard" -msgstr "Standard (16bpp)" +msgstr "Standard" #: engines/scumm/dialogs.cpp:659 msgid "Practice" -msgstr "" +msgstr "Træning" #: engines/scumm/dialogs.cpp:660 msgid "Expert" -msgstr "" +msgstr "Ekspert" #: engines/scumm/help.cpp:73 msgid "Common keyboard commands:" @@ -1465,7 +1468,7 @@ msgstr "Almindelige tastatur kommandoer:" #: engines/scumm/help.cpp:74 msgid "Save / Load dialog" -msgstr "Gem / Hent dialog" +msgstr "Gem / Indlæs dialog" #: engines/scumm/help.cpp:76 msgid "Skip line of text" @@ -1497,7 +1500,7 @@ msgstr "Ctrl" #: engines/scumm/help.cpp:79 msgid "Load game state 1-10" -msgstr "Hent spil tilstand 1-10" +msgstr "Indlæs spil tilstand 1-10" #: engines/scumm/help.cpp:80 engines/scumm/help.cpp:84 #: engines/scumm/help.cpp:86 engines/scumm/help.cpp:100 @@ -1590,7 +1593,6 @@ msgid " since they may cause crashes" msgstr " siden de kan skabe nedbrud" #: engines/scumm/help.cpp:110 -#, fuzzy msgid " or incorrect game behavior." msgstr " eller ukorrekt opførsel af spil." @@ -1830,7 +1832,7 @@ msgstr "Komm" #: engines/scumm/help.cpp:246 msgid "Save / Load / Options" -msgstr "Gem / Hent / Indstillinger" +msgstr "Gem / Indlæs / Indstillinger" #: engines/scumm/help.cpp:255 msgid "Other game controls:" @@ -1979,6 +1981,8 @@ msgid "" "Native MIDI support requires the Roland Upgrade from LucasArts,\n" "but %s is missing. Using AdLib instead." msgstr "" +"Indbygget MIDI understøttelse kræver Roland opgradering fra LucasArts,\n" +"men %s mangler. Bruger AdLib i stedet." #: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format @@ -1998,7 +2002,7 @@ msgid "" "\n" "%s" msgstr "" -"Mislykkedes at hente spil tilstand fra fil:\n" +"Mislykkedes at indlæse spil tilstand fra fil:\n" "\n" "%s" @@ -2019,6 +2023,9 @@ msgid "" "play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " "directory inside the Tentacle game directory." msgstr "" +"Normalt ville Maniac Mansion begynde nu. Men ScummVM kan ikke gøre det " +"endnu. For at spille det, gå til 'Tilføj spil' i ScummVM start-menuen og " +"vælg 'Maniac' mappen inde i Tentacle spillets mappe." #. I18N: Option for fast scene switching #: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171 @@ -2032,16 +2039,15 @@ msgstr "~O~vergange aktiveret" #. I18N: Drop book page #: engines/mohawk/dialogs.cpp:95 msgid "~D~rop Page" -msgstr "" +msgstr "Smi~d~ side" #: engines/mohawk/dialogs.cpp:99 msgid "~S~how Map" -msgstr "" +msgstr "Vi~s~ kort" #: engines/mohawk/dialogs.cpp:105 -#, fuzzy msgid "~M~ain Menu" -msgstr "ScummVM Hovedmenu" +msgstr "Hoved~m~enu" #: engines/mohawk/dialogs.cpp:172 msgid "~W~ater Effect Enabled" @@ -2050,154 +2056,130 @@ msgstr "~V~andeffekter aktiveret" #: engines/agos/animation.cpp:560 #, c-format msgid "Cutscene file '%s' not found!" -msgstr "" +msgstr "Filmsekvens fil '%s' ikke fundet!" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 -#, fuzzy msgid "Failed to load game state from file." -msgstr "" -"Mislykkedes at hente spil tilstand fra fil:\n" -"\n" -"%s" +msgstr "Mislykkedes at indlæse spil tilstand fra fil." #: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 -#, fuzzy msgid "Failed to save game state to file." -msgstr "" -"Mislykkedes at gemme spil tilstand til fil:\n" -"\n" -"%s" +msgstr "Mislykkedes at gemme spil tilstand til fil." #: engines/gob/inter_v5.cpp:107 -#, fuzzy msgid "Failed to delete file." -msgstr "" -"Mislykkedes at gemme spil tilstand til fil:\n" -"\n" -"%s" +msgstr "Mislykkedes at slette fil." #: engines/groovie/script.cpp:420 -#, fuzzy msgid "Failed to save game" -msgstr "" -"Mislykkedes at gemme spil tilstand til fil:\n" -"\n" -"%s" +msgstr "Mislykkedes at gemme spil" #. I18N: Studio audience adds an applause and cheering sounds whenever #. Malcolm makes a joke. #: engines/kyra/detection.cpp:62 msgid "Studio audience" -msgstr "" +msgstr "Studio publikum" #: engines/kyra/detection.cpp:63 msgid "Enable studio audience" -msgstr "" +msgstr "Aktivér studio publikum" #. I18N: This option allows the user to skip text and cutscenes. #: engines/kyra/detection.cpp:73 msgid "Skip support" -msgstr "" +msgstr "Spring over støtte" #: engines/kyra/detection.cpp:74 msgid "Allow text and cutscenes to be skipped" -msgstr "" +msgstr "Tillad at tekst og filmsekvenser kan springes over" #. I18N: Helium mode makes people sound like they've inhaled Helium. #: engines/kyra/detection.cpp:84 msgid "Helium mode" -msgstr "" +msgstr "Helium tilstand" #: engines/kyra/detection.cpp:85 -#, fuzzy msgid "Enable helium mode" -msgstr "Aktivér Roland GS tilstand" +msgstr "Aktivér helium tilstand" #. 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 "Jævn bevægelse" #: engines/kyra/detection.cpp:100 msgid "Enable smooth scrolling when walking" -msgstr "" +msgstr "Aktivér jævn bevægelse når du går" #. 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 "Normal markør" +msgstr "Flydende markør" #: engines/kyra/detection.cpp:113 msgid "Enable floating cursors" -msgstr "" +msgstr "Aktivér flydende markør" #. I18N: HP stands for Hit Points #: engines/kyra/detection.cpp:127 msgid "HP bar graphs" -msgstr "" +msgstr "HP søjlegrafer" #: engines/kyra/detection.cpp:128 msgid "Enable hit point bar graphs" -msgstr "" +msgstr "Aktivér træfpoint (HP) søjlediagrammer" #: engines/kyra/lol.cpp:478 msgid "Attack 1" -msgstr "" +msgstr "Angreb 1" #: engines/kyra/lol.cpp:479 msgid "Attack 2" -msgstr "" +msgstr "Angreb 2" #: engines/kyra/lol.cpp:480 msgid "Attack 3" -msgstr "" +msgstr "Angreb 3" #: engines/kyra/lol.cpp:481 msgid "Move Forward" -msgstr "" +msgstr "Flyt fremad" #: engines/kyra/lol.cpp:482 msgid "Move Back" -msgstr "" +msgstr "Flyt bagud" #: engines/kyra/lol.cpp:483 msgid "Slide Left" -msgstr "" +msgstr "Flyt til venstre" #: engines/kyra/lol.cpp:484 -#, fuzzy msgid "Slide Right" -msgstr "Højre" +msgstr "Flyt til højre" #: engines/kyra/lol.cpp:485 -#, fuzzy msgid "Turn Left" -msgstr "Sluk" +msgstr "Drej til venstre" #: engines/kyra/lol.cpp:486 -#, fuzzy msgid "Turn Right" -msgstr "Pil til højre" +msgstr "Drej til højre" #: engines/kyra/lol.cpp:487 -#, fuzzy msgid "Rest" -msgstr "Gendan" +msgstr "Hvil" #: engines/kyra/lol.cpp:488 -#, fuzzy msgid "Options" -msgstr "~I~ndstillinger" +msgstr "Indstillinger" #: engines/kyra/lol.cpp:489 -#, fuzzy msgid "Choose Spell" -msgstr "Vælg" +msgstr "Vælg magi" #: engines/kyra/sound_midi.cpp:475 msgid "" @@ -2207,44 +2189,54 @@ msgid "" "General MIDI ones. After all it might happen\n" "that a few tracks will not be correctly played." msgstr "" +"Det lader til at du en General MIDI-enhed,\n" +"men dit spil kun understøtter Roland MT32 MIDI.\n" +"Vi forsøger at kortlægge Roland MT32 instrumenterne til\n" +"dem i General MIDI. Trods det kan det ske\n" +"at nogle spor ikke vil blive korrekt afspillet." #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" -msgstr "" +msgstr "Diskette intro" #: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" -msgstr "" +msgstr "Brug diskette versionens intro (kun CD version)" #: engines/sky/compact.cpp:130 msgid "" "Unable to find \"sky.cpt\" file!\n" "Please download it from www.scummvm.org" msgstr "" +"Kunne ikke finde \"sky.cpt\" filen!\n" +"Venligst download den fra www.scummvm.org" #: engines/sky/compact.cpp:141 msgid "" "The \"sky.cpt\" file has an incorrect size.\n" "Please (re)download it from www.scummvm.org" msgstr "" +"\"sky.cpt\" filen har en forkert størrelse.\n" +"Venligst (gen)hent den fra www.scummvm.org" #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" -msgstr "" +msgstr "PSX stream filmsekvens '%s' kan ikke afspilles i palette tilstand" #: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 msgid "DXA cutscenes found but ScummVM has been built without zlib support" msgstr "" +"DXA filmsekvenser fundet, men ScummVM er bygget uden zlib understøttelse" #: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465 msgid "MPEG2 cutscenes are no longer supported" -msgstr "" +msgstr "MPEG2 filmsekvenser understøttes ikke længere" #: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473 #, c-format msgid "Cutscene '%s' not found" -msgstr "" +msgstr "Filmsekvens '%s' ikke fundet" #: engines/sword1/control.cpp:863 msgid "" @@ -2256,6 +2248,13 @@ msgid "" "Press OK to convert them now, otherwise you will be asked again the next " "time you start the game.\n" msgstr "" +"ScummVM har konstateret, at du har gamle gemmer for Broken Sword 1, der skal " +"konverteres.\n" +"Det gamle gemte spil format understøttes ikke længere, så vil du ikke være i " +"stand til at indlæse dine spil, hvis du ikke konvertere dem.\n" +"\n" +"Tryk på OK for at konvertere dem nu, ellers vil du blive spurgt igen, næste " +"gang du starter spillet.\n" #: engines/sword1/control.cpp:1232 #, c-format @@ -2263,31 +2262,34 @@ msgid "" "Target new save game already exists!\n" "Would you like to keep the old save game (%s) or the new one (%s)?\n" msgstr "" +"Nyt gemt spil findes allerede!\n" +"Vil du gerne beholde det gamle gemte spil (%s) eller det nye (%s)?\n" #: engines/sword1/control.cpp:1235 msgid "Keep the old one" -msgstr "" +msgstr "Behold den gamle" #: engines/sword1/control.cpp:1235 msgid "Keep the new one" -msgstr "" +msgstr "Behold den nye" #: engines/sword1/logic.cpp:1633 msgid "This is the end of the Broken Sword 1 Demo" -msgstr "" +msgstr "Dette er slutningen af Broken Sword 1 demoen" #: engines/sword2/animation.cpp:435 msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" +"PSX filmsekvenser fundet, men ScummVM er bygget uden RGB farve understøttelse" #: engines/sword2/sword2.cpp:79 msgid "Show object labels" -msgstr "" +msgstr "Vis labels på genstande" #: engines/sword2/sword2.cpp:80 msgid "Show labels for objects on mouse hover" -msgstr "" +msgstr "Vis labels for genstande musen er henover" #: engines/parallaction/saveload.cpp:133 #, c-format @@ -2295,16 +2297,16 @@ msgid "" "Can't save game in slot %i\n" "\n" msgstr "" +"Kan ikke gemme spil på plads %i\n" +"\n" #: engines/parallaction/saveload.cpp:204 -#, fuzzy msgid "Loading game..." -msgstr "Indlæs spil:" +msgstr "Indlæser spil..." #: engines/parallaction/saveload.cpp:219 -#, fuzzy msgid "Saving game..." -msgstr "Gemmer:" +msgstr "Gemmer spil..." #: engines/parallaction/saveload.cpp:272 msgid "" @@ -2315,10 +2317,16 @@ msgid "" "\n" "Press OK to convert them now, otherwise you will be asked next time.\n" msgstr "" +"ScummVM har konstateret, at du har gamle gemmer for Nippon Safes, der skal " +"omdøbes.\n" +"De gamle navne er ikke længere understøttet, så du vil ikke være i stand til " +"at indlæse dine spil, hvis du ikke konvertere dem.\n" +"\n" +"Tryk på OK for at konvertere dem nu, ellers vil du blive spurgt næste gang.\n" #: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." -msgstr "" +msgstr "ScummVM konverterede med succes alle dine gemmer." #: engines/parallaction/saveload.cpp:321 msgid "" @@ -2327,6 +2335,10 @@ msgid "" "\n" "Please report to the team." msgstr "" +"ScummVM udskrev nogle advarsler i dit konsol vindue, og kan ikke garantere " +"at alle dine filer er blevet konverteret.\n" +"\n" +"Venligst rapportér til holdet." #: audio/fmopl.cpp:49 msgid "MAME OPL emulator" @@ -2342,11 +2354,13 @@ msgid "" "The selected audio device '%s' was not found (e.g. might be turned off or " "disconnected)." msgstr "" +"Den valgte lydenhed '%s' blev ikke fundet (kan f.eks være slukket eller " +"afbrudt)." #: audio/mididrv.cpp:209 audio/mididrv.cpp:221 audio/mididrv.cpp:257 #: audio/mididrv.cpp:272 msgid "Attempting to fall back to the next available device..." -msgstr "" +msgstr "Forsøger at falde tilbage til den næste tilgængelig enhed..." #: audio/mididrv.cpp:221 #, c-format @@ -2354,6 +2368,7 @@ msgid "" "The selected audio device '%s' cannot be used. See log file for more " "information." msgstr "" +"Den valgte lydenhed '%s' kan ikke bruges. Se log filen for mere information." #: audio/mididrv.cpp:257 #, c-format @@ -2361,6 +2376,8 @@ msgid "" "The preferred audio device '%s' was not found (e.g. might be turned off or " "disconnected)." msgstr "" +"Den foretrukne lydenhed '%s' blev ikke fundet (kan f.eks være slukket eller " +"afbrudt)." #: audio/mididrv.cpp:272 #, c-format @@ -2368,6 +2385,8 @@ msgid "" "The preferred audio device '%s' cannot be used. See log file for more " "information." msgstr "" +"Den foretrukne lydenhed '%s' kan ikke bruges. Se log filen for mere " +"information." #: audio/null.h:43 msgid "No music" @@ -2390,7 +2409,6 @@ msgid "C64 Audio Emulator" msgstr "C64 lyd emulator" #: audio/softsynth/mt32.cpp:293 -#, fuzzy msgid "Initializing MT-32 Emulator" msgstr "Initialisere MT-32 emulator" @@ -2411,7 +2429,6 @@ msgid "Keymap:" msgstr "Tasteoversigt:" #: backends/keymapper/remap-dialog.cpp:66 -#, fuzzy msgid " (Effective)" msgstr " (Aktiv)" @@ -2421,7 +2438,7 @@ msgstr " (Aktiv)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Blocked)" -msgstr "" +msgstr "(Blokeret)" #: backends/keymapper/remap-dialog.cpp:119 msgid " (Global)" @@ -2508,14 +2525,12 @@ msgid "Disable power off" msgstr "Deaktiver slukning" #: backends/platform/iphone/osys_events.cpp:300 -#, fuzzy msgid "Mouse-click-and-drag mode enabled." -msgstr "Pegeplade tilstand aktiveret." +msgstr "Muse-klik-og-træk tilstand aktiveret." #: backends/platform/iphone/osys_events.cpp:302 -#, fuzzy msgid "Mouse-click-and-drag mode disabled." -msgstr "Pegeplade tilstand deaktiveret." +msgstr "Muse-klik-og-træk tilstand deaktiveret." #: backends/platform/iphone/osys_events.cpp:313 msgid "Touchpad mode enabled." @@ -2527,7 +2542,7 @@ msgstr "Pegeplade tilstand deaktiveret." #: backends/platform/maemo/maemo.cpp:205 msgid "Click Mode" -msgstr "" +msgstr "Klik tilstand" #: backends/platform/maemo/maemo.cpp:211 #: backends/platform/symbian/src/SymbianActions.cpp:42 @@ -2538,9 +2553,8 @@ msgid "Left Click" msgstr "Venstre klik" #: backends/platform/maemo/maemo.cpp:214 -#, fuzzy msgid "Middle Click" -msgstr "Midterste højre punkt" +msgstr "Miderste klik" #: backends/platform/maemo/maemo.cpp:217 #: backends/platform/symbian/src/SymbianActions.cpp:43 @@ -2550,7 +2564,6 @@ msgid "Right Click" msgstr "Højre klik" #: backends/platform/sdl/macosx/appmenu_osx.mm:78 -#, fuzzy msgid "Hide ScummVM" msgstr "Skjul ScummVM" @@ -2582,26 +2595,22 @@ msgstr "Normal (ingen skalering)" #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 -#, fuzzy msgid "Enabled aspect ratio correction" -msgstr "Skift billedformat korrektion" +msgstr "Aktivér billedformat korrektion" #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 -#, fuzzy msgid "Disabled aspect ratio correction" -msgstr "Skift billedformat korrektion" +msgstr "Deaktivér billedformat korrektion" #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 -#, fuzzy msgid "Active graphics filter:" -msgstr "Skift mellem grafik filtre" +msgstr "Aktive grafik filtre:" #: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 #: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 -#, fuzzy msgid "Windowed mode" -msgstr "Rendere tilstand:" +msgstr "Vindue tilstand" #: backends/graphics/opengl/opengl-graphics.cpp:135 msgid "OpenGL Normal" @@ -2616,21 +2625,20 @@ msgid "OpenGL Original" msgstr "OpenGL Original" #: backends/graphics/openglsdl/openglsdl-graphics.cpp:415 -#, fuzzy msgid "Current display mode" -msgstr "Aktuel videotilstand:" +msgstr "Aktuel videotilstand" #: backends/graphics/openglsdl/openglsdl-graphics.cpp:428 msgid "Current scale" -msgstr "" +msgstr "Aktuel skalering" #: backends/graphics/openglsdl/openglsdl-graphics.cpp:558 msgid "Active filter mode: Linear" -msgstr "" +msgstr "Aktiv filter tilstand: Linær" #: backends/graphics/openglsdl/openglsdl-graphics.cpp:560 msgid "Active filter mode: Nearest" -msgstr "" +msgstr "Aktiv filter tilstand: Nærmest" #: backends/platform/symbian/src/SymbianActions.cpp:38 #: backends/platform/wince/CEActionsSmartphone.cpp:39 @@ -2812,17 +2820,15 @@ msgid "Network down" msgstr "Netværk nede" #: backends/platform/wii/options.cpp:178 -#, fuzzy msgid "Initializing network" msgstr "Initialisere netværk" #: backends/platform/wii/options.cpp:182 -#, fuzzy msgid "Timeout while initializing network" msgstr "Tidsgrænse nået ved initialisering af netværk" #: backends/platform/wii/options.cpp:186 -#, fuzzy, c-format +#, c-format msgid "Network not initialized (%d)" msgstr "Netværk ikke initialiseret (%d)" @@ -2882,12 +2888,12 @@ msgstr "Pil til h #: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Do you want to load or save the game?" -msgstr "Vil du hente eller gemme spillet?" +msgstr "Vil du indlæse eller gemme spillet?" #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 msgid " Are you sure you want to quit ? " -msgstr " Er du sikker på at du vil afslutte ? " +msgstr " Er du sikker på at du vil afslutte? " #: backends/platform/wince/CEActionsSmartphone.cpp:50 msgid "Keyboard" @@ -2944,95 +2950,86 @@ msgstr "" "hele oversigten" #: backends/events/default/default-events.cpp:191 -#, fuzzy msgid "Do you really want to return to the Launcher?" -msgstr "Vil du virkelig slette denne gemmer?" +msgstr "Vil du virkelig gå tilbage til oversigten?" #: backends/events/default/default-events.cpp:191 -#, fuzzy msgid "Launcher" -msgstr "Slag" +msgstr "Oversigt" #: backends/events/default/default-events.cpp:213 -#, fuzzy msgid "Do you really want to quit?" -msgstr "Vil du afslutte?" +msgstr "Vil du virkelig afslutte?" #: backends/events/gph/gph-events.cpp:338 #: backends/events/gph/gph-events.cpp:381 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" -msgstr "" +msgstr "Touchscreen 'Tap Mode' - Venstre Klik" #: backends/events/gph/gph-events.cpp:340 #: backends/events/gph/gph-events.cpp:383 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" -msgstr "" +msgstr "Touchscreen 'Tap Mode' - Højre Klik" #: backends/events/gph/gph-events.cpp:342 #: backends/events/gph/gph-events.cpp:385 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" -msgstr "" +msgstr "Touchscreen 'Tap Mode' - Henover (Ingen Klik)" #: backends/events/gph/gph-events.cpp:362 -#, fuzzy msgid "Maximum Volume" -msgstr "Lydstyrke" +msgstr "Maximal lydstyrke" #: backends/events/gph/gph-events.cpp:364 msgid "Increasing Volume" -msgstr "" +msgstr "Hæver lydstyrke" #: backends/events/gph/gph-events.cpp:370 -#, fuzzy msgid "Minimal Volume" -msgstr "Lydstyrke" +msgstr "Minimal lydstyrke" #: backends/events/gph/gph-events.cpp:372 msgid "Decreasing Volume" -msgstr "" +msgstr "Sænker lydstyrke" #: backends/updates/macosx/macosx-updates.mm:65 msgid "Check for Updates..." -msgstr "" +msgstr "Søg efter opdateringer..." #: backends/platform/bada/form.cpp:269 -#, fuzzy msgid "Right Click Once" -msgstr "Højre klik" +msgstr "Enkelt højre klik" #: backends/platform/bada/form.cpp:277 -#, fuzzy msgid "Move Only" -msgstr "Tale" +msgstr "Flyt kun" #: backends/platform/bada/form.cpp:291 msgid "Escape Key" -msgstr "" +msgstr "Escape tast" #: backends/platform/bada/form.cpp:296 -#, fuzzy msgid "Game Menu" -msgstr "Spil" +msgstr "Spil menu" #: backends/platform/bada/form.cpp:301 -#, fuzzy msgid "Show Keypad" msgstr "Vis tastatur" #: backends/platform/bada/form.cpp:309 msgid "Control Mouse" -msgstr "" +msgstr "Kontrollér mus" #: backends/events/maemosdl/maemosdl-events.cpp:192 msgid "Clicking Enabled" -msgstr "" +msgstr "Klik aktiveret" #: backends/events/maemosdl/maemosdl-events.cpp:192 msgid "Clicking Disabled" -msgstr "" +msgstr "Klik deaktiveret" #~ msgid "Hercules Green" #~ msgstr "Hercules grøn" -- cgit v1.2.3 From 6051ec13b7c1610897923201b2a01e5d472cd7d9 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 7 Jul 2012 01:15:59 +0100 Subject: DOCS: Add Danish QuickStart file This was sent by Steffen Nyeland by email. --- doc/da/HurtigStart | 151 +++++++++++++++++++++++++++++++++++++++++++++++++++++ ports.mk | 6 +++ 2 files changed, 157 insertions(+) create mode 100644 doc/da/HurtigStart diff --git a/doc/da/HurtigStart b/doc/da/HurtigStart new file mode 100644 index 0000000000..b54590bba3 --- /dev/null +++ b/doc/da/HurtigStart @@ -0,0 +1,151 @@ +Dette dokument er en delvis oversættelse af den engelske README filen. +Det originale dokument har meget mere information, sÃ¥ hvis du ikke kan +finde det du har brug for her og kan forstÃ¥ en smule engelsk, sÃ¥ prøv +at se i den Engelske README-fil. + +For mere information, kompatibilitet lister, detaljer om donering, den +seneste udgivelse, statusrapporter og mere, kan du besøge ScummVMs hjemme- +side pÃ¥: http://www.scummvm.org/ + +Indholdsfortegnelse: +-------------------- +1.0) Indledning + * 1.1 Om ScummVM + * 1.2 Hurtig start +2.0) Kontakt + * 2.1 Rapportering af fejl + +1.0) Indledning: +---- ----------- + +1.1) Om ScummVM: +---- ----------- +ScummVM er et program, som tillader dig at køre visse klassiske grafiske +peg-og-klik eventyr spil, hvis du allerede har deres data filer. Den +smarte del omkring dette: ScummVM erstatter bare de eksekverbare filer +der fulgte med i spillet, sÃ¥ du kan afspille dem pÃ¥ systemer, hvor de +aldrig var designet til! + +Oprindeligt var det designet til at køre LucasArts' SCUMM spil, sÃ¥som +Maniac Mansion, Monkey Island, Day of the Tentacle eller Sam and Max. +SCUMM stÃ¥r for 'Script Creation Utility for Maniac Mansion', som var det +første spil som LucasArts designede dette system til. Og langt senere gav +navn til ScummVM ('VM', betyder Virtuel Maskine). + +EfterhÃ¥nden er understøttelse for en masse ikke-SCUMM spil blevet tilføjet, +og ScummVM understøtter nu ogsÃ¥ mange af Sierras AGI og SCI-spil (sÃ¥som +Kings Quest 1-6, Space Quest 1-5, ...), Discworld 1 og 2, Simon the Sorcerer +1 og 2, Beneath A Steel Sky, Lure of the Temptress, Broken Sword I og II, +Flight of the Amazon Queen, Gobliiins 1-3, The Legend of Kyrandia serien, +mange af Humongous Entertainments børne SCUMM spil (herunder Freddi Fish +and Putt Putt spil) og mange flere. Du kan finde en komplet liste med +oplysninger om, hvilke eventyr der understøttes og hvor godt, pÃ¥ +kompatibilitetssiden. ScummVM forbedres løbende, sÃ¥ vend ofte tilbage. + +Blandt de systemer, som du kan spille disse spil pÃ¥ er regulære desktop +computere (Windows, Linux, Mac OS X, ...), spillekonsoller (Dreamcast, +Nintendo DS og Wii, PS2, PSP, ...), smartphones (Android, iPhone, PocketPC, +Symbian ...) og flere. + +PÃ¥ dette tidspunkt er ScummVM stadig under kraftig udvikling. Vær opmærksom +pÃ¥, at selvom vi forsøger at sørge for, at mange spil kan gennemføres med fÃ¥ +store fejl, kan nedbrud ske, og vi tilbyder ingen garanti. NÃ¥r det er sagt, +er nogle af spillene blevet understøttet i lang tid og bør fungerer fint +med alle nyere stabile udgaver. Du kan fÃ¥ en fornemmelse af, hvor godt +hvert spil virker i ScummVM, ved at kigge pÃ¥ kompatibilitetssiden. Faktisk, +hvis du søger lidt rundt, vil du mÃ¥ske opdage, at ScummVM endog anvendes +kommercielt til genudgivelse af nogle af understøttede spil pÃ¥ moderne +platforme. Dette viser, at flere virksomheder er tilfredse med kvaliteten +af ​​programmet, og hvor godt det kan køre nogle af spillene. + +Hvis du har fornøjelse af ScummVM, er du velkommen til at donere ved hjælp +af PayPal-knappen pÃ¥ ScummVM's hjemmeside. Dette vil hjælpe os med at købe +værktøjer nødvendige for at udvikle ScummVM nemmere og hurtigere. Hvis du +ikke kan donere, hjælp og bidrage med en programrettelse! + +1.2) Hurtig start: +---- ------------ +VIGTIGT: Denne korte vejledning antager, at du bruger ScummVM pÃ¥ dansk. +Som standard vil ScummVM bruge dit operativsystem sprog. Hvis du +foretrækker at bruge ScummVM pÃ¥ engelsk, kan du ogsÃ¥ foretrække at +følge vejledning fra den engelske README fil. + +For de utÃ¥lmodige blandt jer, er her hvordan du fÃ¥r ScummVM op at køre +i fem enkle trin. + +1. Hent ScummVM fra og +installere det. + +2. Opret en mappe pÃ¥ din harddisk og kopiere spillets datafiler fra de +oprindelige medier til denne mappe. Gentag dette for hvert spil du +ønsker at spille (det er bedre at bruge en separat mappe til hvert spil). + +3. Start ScummVM. + +Hvis ScummVM pÃ¥ dette tidspunkt vises pÃ¥ engelsk i stedet for dansk, gør +som følger for at ændre sprog: + - Klik pÃ¥ 'Options'. + - Klik pÃ¥ højre pil i fanebjælken og vælg 'Misc' fanen. + - Vælg "Dansk" i "GUI Language'og klik pÃ¥ 'OK'. + - Bekræft meddelelsen boksen, der popper op, klik pÃ¥ 'Quit' for at + afslutte ScummVM og derefter genstarte programmet. + +Vælg nu 'Tilføj spil', vælge mappen med spillets datafiler (forsøg ikke +at vælge datafilerne selv!) Og tryk pÃ¥ 'Vælg' + +4. En dialog skulle komme op, hvor du kan konfigurere forskellige +indstillinger, hvis du ønsker det (det burde dog være fint at lade alt +forblive pÃ¥ sin standard). Bekræft dialogen. + +5. Vælg det spil, du ønsker at spille pÃ¥ listen, og tryk pÃ¥ 'Start'. + +ScummVM husker de spil, du tilføjer. SÃ¥ hvis du lukker ScummVM, vil +listen over spil næste gang du starter den, indeholde alle de spil du +tidligere har tilføjet. Du kan derfor gÃ¥ direkte til trin 5, medmindre +du ønsker at tilføje flere spil. + +Tip: Hvis du ønsker at tilføje flere spil pÃ¥ én gang, sÃ¥ prøv at trykke +og holde shift-tasten nede før du klikker pÃ¥ 'Tilføj spil' - teksten vil +skifte til 'Tilføj flere', og hvis du trykker pÃ¥ den, bliver du igen bedt +om at vælge en mappe, men denne gang vil ScummVM søge gennem alle +undermapper for understøttede spil. + +2.0) Kontakt: +---- -------- +Den nemmeste mÃ¥de at kontakte ScummVM holdet pÃ¥ er ved at sende fejlrapporter +(se afsnit 2.1) eller ved at bruge vores fora pÃ¥ http://forums.scummvm.org. +Du kan ogsÃ¥ deltage og e-maile til scummvm-devel postlisten, eller chatte +med os pÃ¥ IRC (#scummvm pÃ¥ irc.freenode.net). Bed os venligst ikke om at +understøtte et ikke-understøttet spil -- læs FAQ pÃ¥ vores hjemmeside først. +Bemærk, at det officielle sprog i dette forum, mailing liste og chat er +engelsk og ingen andre sprog bør anvendes. + +2.1) Rapportering af fejl: +---- --------------------- +For at rapportere en fejl, skal du oprette en SourceForge konto, og følge +"Bug Tracker" linket fra vores hjemmeside. Sørg for at fejlen er reproducerbare, +og stadig forekommer i den seneste git/Daglig byggede version. +Kontroller ogsÃ¥ listen med kendte problemer (nedenfor) og kompatibilitetslisten +pÃ¥ vores hjemmeside for spillet, for at sikre, at problemet ikke allerede er kendt: + + http://www.scummvm.org/compatibility_stable.php + +Vær venlig ikke at rapportere fejl pÃ¥ spil, der ikke er anført som værende +mulige at gennemføre i 'understøttede spil' sektionen, eller kompatibilitetslisten. +Vi -ved- disse spil har fejl. + +Inkluder venligst følgende oplysninger: + - ScummVM version (VENLIGST test pÃ¥ den nyeste git/Daglig byggede) + - Detaljer om fejlen, herunder oplysninger om genskabelsen af fejlen + - Sprog i spillet (engelsk, tysk, ...) + - Version af spillet (talkie, diskette, ...) + - Platform og Kompiler (Win32, Linux, FreeBSD, ...) + - Medsend et gemt spil hvis det er muligt + - Hvis fejlen kun skete for nylig, notér venligst den sidste version + uden fejl, og den første version med fejlen. PÃ¥ denne mÃ¥de kan vi + ordne det hurtigere ved at kigge pÃ¥ de foretagne ændringer. + +Endelig, bedes du rapportere hvert problem separat; indsend ikke flere +problemer pÃ¥ samme billet. (Ellers bliver det svært at spore status for +hver enkelt fejl). Husk ogsÃ¥ pÃ¥, at alle fejlrapporter skal skrives pÃ¥ +engelsk. \ No newline at end of file diff --git a/ports.mk b/ports.mk index 271a352596..357a7e297a 100644 --- a/ports.mk +++ b/ports.mk @@ -160,6 +160,8 @@ osxsnap: bundle cp $(srcdir)/doc/QuickStart ./ScummVM-snapshot/doc/QuickStart mkdir ScummVM-snapshot/doc/cz cp $(srcdir)/doc/cz/PrectiMe ./ScummVM-snapshot/doc/cz/PrectiMe + mkdir ScummVM-snapshot/doc/da + cp $(srcdir)/doc/da/HurtigStart ./ScummVM-snapshot/doc/da/HurtigStart mkdir ScummVM-snapshot/doc/de cp $(srcdir)/doc/de/Liesmich ./ScummVM-snapshot/doc/de/Liesmich cp $(srcdir)/doc/de/Schnellstart ./ScummVM-snapshot/doc/de/Schnellstart @@ -176,6 +178,7 @@ osxsnap: bundle cp $(srcdir)/doc/se/Snabbstart ./ScummVM-snapshot/doc/se/Snabbstart /Developer/Tools/SetFile -t ttro -c ttxt ./ScummVM-snapshot/* xattr -w "com.apple.TextEncoding" "utf-8;134217984" ./ScummVM-snapshot/doc/cz/* + xattr -w "com.apple.TextEncoding" "utf-8;134217984" ./ScummVM-snapshot/doc/da/* xattr -w "com.apple.TextEncoding" "utf-8;134217984" ./ScummVM-snapshot/doc/de/* xattr -w "com.apple.TextEncoding" "utf-8;134217984" ./ScummVM-snapshot/doc/es/* xattr -w "com.apple.TextEncoding" "utf-8;134217984" ./ScummVM-snapshot/doc/fr/* @@ -206,6 +209,7 @@ win32dist: $(EXECUTABLE) mkdir -p $(WIN32PATH)/graphics mkdir -p $(WIN32PATH)/doc mkdir -p $(WIN32PATH)/doc/cz + mkdir -p $(WIN32PATH)/doc/da mkdir -p $(WIN32PATH)/doc/de mkdir -p $(WIN32PATH)/doc/es mkdir -p $(WIN32PATH)/doc/fr @@ -231,6 +235,7 @@ endif cp $(srcdir)/doc/fr/DemarrageRapide $(WIN32PATH)/doc/fr/DemarrageRapide.txt cp $(srcdir)/doc/it/GuidaRapida $(WIN32PATH)/doc/it/GuidaRapida.txt cp $(srcdir)/doc/no-nb/HurtigStart $(WIN32PATH)/doc/no-nb/HurtigStart.txt + cp $(srcdir)/doc/da/HurtigStart $(WIN32PATH)/doc/da/HurtigStart.txt cp $(srcdir)/doc/de/Schnellstart $(WIN32PATH)/doc/de/Schnellstart.txt cp $(srcdir)/doc/se/Snabbstart $(WIN32PATH)/doc/se/Snabbstart.txt cp $(srcdir)/README $(WIN32PATH)/README.txt @@ -246,6 +251,7 @@ endif unix2dos $(WIN32PATH)/*.txt unix2dos $(WIN32PATH)/doc/*.txt unix2dos $(WIN32PATH)/doc/cz/*.txt + unix2dos $(WIN32PATH)/doc/da/*.txt unix2dos $(WIN32PATH)/doc/de/*.txt unix2dos $(WIN32PATH)/doc/es/*.txt unix2dos $(WIN32PATH)/doc/fr/*.txt -- cgit v1.2.3 From 8b55dcf531e2842ca110f244789e29dbd4a0d0c3 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sat, 7 Jul 2012 01:26:25 +0100 Subject: I18N: Regenerate translations data file --- gui/themes/translations.dat | Bin 322629 -> 337762 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 4812633011..2307ea20ae 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 10ba526812daf504c086adf3057bdab643d3a3fe Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 7 Jul 2012 20:13:02 +1000 Subject: SCUMM: Add another English Windows version of Freddi Fish and Luther's Maze Madness. --- devtools/scumm-md5.txt | 1 + engines/scumm/scumm-md5.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt index 176f04aaf8..d67f46205c 100644 --- a/devtools/scumm-md5.txt +++ b/devtools/scumm-md5.txt @@ -575,6 +575,7 @@ maze Freddi Fish and Luther's Maze Madness 4f04b321a95d4315ce6d65f8e1dd0368 -1 us All HE 80 - - Kirben cd424f143a141bc59226ad83a6e40f51 -1 nl All HE 98.5 - - daniel9, sugarcube 4dbff3787aedcd96b0b325f2d92d7ad9 -1 us All HE 100 Updated - Kirben + 4522564b3c31aaf218b6a96826a549fd -1 us Windows HE 100 - - legoking831 water Freddi Fish and Luther's Water Worries 4ba37f835be11a59d969f90f272f575b -1 us All HE 80 - - Kirben diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 0814e3bfe1..d6198b13c4 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 Fri Jun 15 09:16:45 2012 + This file was generated by the md5table tool on Sat Jul 07 10:02:31 2012 DO NOT EDIT MANUALLY! */ @@ -191,6 +191,7 @@ static const MD5Table md5table[] = { { "45082a5c9f42ba14dacfe1fdeeba819d", "freddicove", "HE 100", "Demo", 18422, Common::EN_ANY, Common::kPlatformUnknown }, { "45152f7cf2ba8f43cf8a8ea2e740ae09", "monkey", "VGA", "VGA", 8357, Common::ES_ESP, Common::kPlatformPC }, { "4521138d15d1fd7649c31fb981746231", "pajama2", "HE 98.5", "Demo", -1, Common::DE_DEU, Common::kPlatformUnknown }, + { "4522564b3c31aaf218b6a96826a549fd", "maze", "HE 100", "", -1, Common::EN_USA, Common::kPlatformWindows }, { "46b53fd430adcfbed791b48a0d4b079f", "funpack", "", "", -1, Common::EN_ANY, Common::kPlatformPC }, { "470c45b636139bb40716daa1c7edaad0", "loom", "EGA", "EGA", -1, Common::DE_DEU, Common::kPlatformPC }, { "477dbafbd66a53c98416dc01aef019ad", "monkey", "EGA", "EGA", -1, Common::IT_ITA, Common::kPlatformPC }, -- cgit v1.2.3 From cfe7bf614b425671167a0b1e92418bfeb7b20bf4 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 7 Jul 2012 14:37:15 +0100 Subject: TOON: Remove unecessary getSystem() function. This was needed due to the unecessary protected shadow variable hiding the Engine superclass _system member variable. --- engines/toon/character.cpp | 14 +++++++------- engines/toon/movie.cpp | 20 ++++++++++---------- engines/toon/script_func.cpp | 4 ++-- engines/toon/toon.cpp | 3 +-- engines/toon/toon.h | 5 ----- 5 files changed, 20 insertions(+), 26 deletions(-) diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp index e19656f2c8..479f4965f3 100644 --- a/engines/toon/character.cpp +++ b/engines/toon/character.cpp @@ -62,7 +62,7 @@ Character::Character(ToonEngine *vm) : _vm(vm) { _speed = 150; // 150 = nominal drew speed _lastWalkTime = 0; _numPixelToWalk = 0; - _nextIdleTime = _vm->getSystem()->getMillis() + (_vm->randRange(0, 600) + 300) * _vm->getTickLength(); + _nextIdleTime = _vm->_system->getMillis() + (_vm->randRange(0, 600) + 300) * _vm->getTickLength(); _lineToSayId = 0; } @@ -101,7 +101,7 @@ void Character::setFacing(int32 facing) { int32 dir = 0; - _lastWalkTime = _vm->getSystem()->getMillis(); + _lastWalkTime = _vm->_system->getMillis(); if ((_facing - facing + 8) % 8 > (facing - _facing + 8) % 8) dir = 1; else @@ -188,7 +188,7 @@ bool Character::walkTo(int16 newPosX, int16 newPosY) { _currentPathNode = 0; stopSpecialAnim(); - _lastWalkTime = _vm->getSystem()->getMillis(); + _lastWalkTime = _vm->_system->getMillis(); _numPixelToWalk = 0; @@ -220,8 +220,8 @@ bool Character::walkTo(int16 newPosX, int16 newPosY) { } // in 1/1000 pixels - _numPixelToWalk += _speed * (_vm->getSystem()->getMillis() - _lastWalkTime) * _scale / 1024; - _lastWalkTime = _vm->getSystem()->getMillis(); + _numPixelToWalk += _speed * (_vm->_system->getMillis() - _lastWalkTime) * _scale / 1024; + _lastWalkTime = _vm->_system->getMillis(); while (_numPixelToWalk >= 1000 && _currentPathNode < _currentPath.size()) { _x = _currentPath[_currentPathNode].x; @@ -356,8 +356,8 @@ void Character::update(int32 timeIncrement) { } // in 1/1000 pixels - _numPixelToWalk += _speed * (_vm->getSystem()->getMillis() - _lastWalkTime) * _scale / 1024; - _lastWalkTime = _vm->getSystem()->getMillis(); + _numPixelToWalk += _speed * (_vm->_system->getMillis() - _lastWalkTime) * _scale / 1024; + _lastWalkTime = _vm->_system->getMillis(); while (_numPixelToWalk > 1000 && _currentPathNode < _currentPath.size()) { _x = _currentPath[_currentPathNode].x; diff --git a/engines/toon/movie.cpp b/engines/toon/movie.cpp index 8cdf92363f..93e41adf57 100644 --- a/engines/toon/movie.cpp +++ b/engines/toon/movie.cpp @@ -109,40 +109,40 @@ bool Movie::playVideo(bool isFirstIntroVideo) { if (frame) { if (_decoder->isLowRes()) { // handle manually 2x scaling here - Graphics::Surface* surf = _vm->getSystem()->lockScreen(); + Graphics::Surface* surf = _vm->_system->lockScreen(); for (int y = 0; y < frame->h / 2; y++) { memcpy(surf->getBasePtr(0, y * 2 + 0), frame->getBasePtr(0, y), frame->pitch); memcpy(surf->getBasePtr(0, y * 2 + 1), frame->getBasePtr(0, y), frame->pitch); } - _vm->getSystem()->unlockScreen(); + _vm->_system->unlockScreen(); } else { - _vm->getSystem()->copyRectToScreen(frame->pixels, frame->pitch, 0, 0, frame->w, frame->h); + _vm->_system->copyRectToScreen(frame->pixels, frame->pitch, 0, 0, frame->w, frame->h); // WORKAROUND: There is an encoding glitch in the first intro video. This hides this using the adjacent pixels. if (isFirstIntroVideo) { int32 currentFrame = _decoder->getCurFrame(); if (currentFrame >= 956 && currentFrame <= 1038) { debugC(1, kDebugMovie, "Triggered workaround for glitch in first intro video..."); - _vm->getSystem()->copyRectToScreen(frame->getBasePtr(frame->w-188, 123), frame->pitch, frame->w-188, 124, 188, 1); - _vm->getSystem()->copyRectToScreen(frame->getBasePtr(frame->w-188, 126), frame->pitch, frame->w-188, 125, 188, 1); - _vm->getSystem()->copyRectToScreen(frame->getBasePtr(0, 125), frame->pitch, 0, 126, 64, 1); - _vm->getSystem()->copyRectToScreen(frame->getBasePtr(0, 128), frame->pitch, 0, 127, 64, 1); + _vm->_system->copyRectToScreen(frame->getBasePtr(frame->w-188, 123), frame->pitch, frame->w-188, 124, 188, 1); + _vm->_system->copyRectToScreen(frame->getBasePtr(frame->w-188, 126), frame->pitch, frame->w-188, 125, 188, 1); + _vm->_system->copyRectToScreen(frame->getBasePtr(0, 125), frame->pitch, 0, 126, 64, 1); + _vm->_system->copyRectToScreen(frame->getBasePtr(0, 128), frame->pitch, 0, 127, 64, 1); } } } } _decoder->setSystemPalette(); - _vm->getSystem()->updateScreen(); + _vm->_system->updateScreen(); } Common::Event event; - while (_vm->getSystem()->getEventManager()->pollEvent(event)) + while (_vm->_system->getEventManager()->pollEvent(event)) if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE)) { _vm->dirtyAllScreen(); return false; } - _vm->getSystem()->delayMillis(10); + _vm->_system->delayMillis(10); } _vm->dirtyAllScreen(); return !_vm->shouldQuit(); diff --git a/engines/toon/script_func.cpp b/engines/toon/script_func.cpp index e9b7534198..1fa4058114 100644 --- a/engines/toon/script_func.cpp +++ b/engines/toon/script_func.cpp @@ -564,9 +564,9 @@ int32 ScriptFunc::sys_Cmd_Exit_Conversation(EMCState *state) { int32 ScriptFunc::sys_Cmd_Set_Mouse_Pos(EMCState *state) { if (_vm->state()->_inCloseUp) { - _vm->getSystem()->warpMouse(stackPos(0), stackPos(1)); + _vm->_system->warpMouse(stackPos(0), stackPos(1)); } else { - _vm->getSystem()->warpMouse(stackPos(0) - _vm->state()->_currentScrollValue, stackPos(1)); + _vm->_system->warpMouse(stackPos(0) - _vm->state()->_currentScrollValue, stackPos(1)); } return 0; } diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 0956b965a7..ee427652d8 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -820,7 +820,6 @@ Common::Error ToonEngine::run() { ToonEngine::ToonEngine(OSystem *syst, const ADGameDescription *gameDescription) : Engine(syst), _gameDescription(gameDescription), _language(gameDescription->language), _rnd("toon") { - _system = syst; _tickLength = 16; _currentPicture = NULL; _inventoryPicture = NULL; @@ -1224,7 +1223,7 @@ void ToonEngine::loadScene(int32 SceneId, bool forGameLoad) { _script->init(&_sceneAnimationScripts[i]._state, _sceneAnimationScripts[i]._data); if (!forGameLoad) { _script->start(&_sceneAnimationScripts[i]._state, 9 + i); - _sceneAnimationScripts[i]._lastTimer = getSystem()->getMillis(); + _sceneAnimationScripts[i]._lastTimer = _system->getMillis(); _sceneAnimationScripts[i]._frozen = false; _sceneAnimationScripts[i]._frozenForConversation = false; } diff --git a/engines/toon/toon.h b/engines/toon/toon.h index 540f3e403b..d40c489011 100644 --- a/engines/toon/toon.h +++ b/engines/toon/toon.h @@ -289,10 +289,6 @@ public: return _oldTimer2; } - OSystem *getSystem() { - return _system; - } - AudioManager *getAudioManager() { return _audioManager; } @@ -340,7 +336,6 @@ public: void clearDirtyRects(); protected: - OSystem *_system; int32 _tickLength; Resources *_resources; TextResource *_genericTexts; -- cgit v1.2.3 From 4f9b9ce3cc263b5e5ad9a223ca2a01f3b9ddaf39 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 8 Jul 2012 09:41:25 +1000 Subject: SCUMM: Correct HE version for another English Windows version of Freddi Fish and Luther's Maze Madness. --- devtools/scumm-md5.txt | 2 +- engines/scumm/scumm-md5.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt index d67f46205c..42dcb27d1a 100644 --- a/devtools/scumm-md5.txt +++ b/devtools/scumm-md5.txt @@ -575,7 +575,7 @@ maze Freddi Fish and Luther's Maze Madness 4f04b321a95d4315ce6d65f8e1dd0368 -1 us All HE 80 - - Kirben cd424f143a141bc59226ad83a6e40f51 -1 nl All HE 98.5 - - daniel9, sugarcube 4dbff3787aedcd96b0b325f2d92d7ad9 -1 us All HE 100 Updated - Kirben - 4522564b3c31aaf218b6a96826a549fd -1 us Windows HE 100 - - legoking831 + 4522564b3c31aaf218b6a96826a549fd -1 us Windows HE 99 - - legoking831 water Freddi Fish and Luther's Water Worries 4ba37f835be11a59d969f90f272f575b -1 us All HE 80 - - Kirben diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index d6198b13c4..d4eefe8c28 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 Sat Jul 07 10:02:31 2012 + This file was generated by the md5table tool on Sat Jul 07 23:39:27 2012 DO NOT EDIT MANUALLY! */ @@ -191,7 +191,7 @@ static const MD5Table md5table[] = { { "45082a5c9f42ba14dacfe1fdeeba819d", "freddicove", "HE 100", "Demo", 18422, Common::EN_ANY, Common::kPlatformUnknown }, { "45152f7cf2ba8f43cf8a8ea2e740ae09", "monkey", "VGA", "VGA", 8357, Common::ES_ESP, Common::kPlatformPC }, { "4521138d15d1fd7649c31fb981746231", "pajama2", "HE 98.5", "Demo", -1, Common::DE_DEU, Common::kPlatformUnknown }, - { "4522564b3c31aaf218b6a96826a549fd", "maze", "HE 100", "", -1, Common::EN_USA, Common::kPlatformWindows }, + { "4522564b3c31aaf218b6a96826a549fd", "maze", "HE 99", "", -1, Common::EN_USA, Common::kPlatformWindows }, { "46b53fd430adcfbed791b48a0d4b079f", "funpack", "", "", -1, Common::EN_ANY, Common::kPlatformPC }, { "470c45b636139bb40716daa1c7edaad0", "loom", "EGA", "EGA", -1, Common::DE_DEU, Common::kPlatformPC }, { "477dbafbd66a53c98416dc01aef019ad", "monkey", "EGA", "EGA", -1, Common::IT_ITA, Common::kPlatformPC }, -- cgit v1.2.3 From e265be07bfb03ee9686ea27b2e12bf4d61ad3732 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Sun, 8 Jul 2012 09:54:09 +0200 Subject: MOHAWK: Run animations attached to LiveText items. Should fix bug #3541294. --- engines/mohawk/livingbooks.cpp | 14 +++++++++----- engines/mohawk/livingbooks.h | 3 +++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index 708478a6d8..f5e5e7d7b4 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -3378,11 +3378,10 @@ void LBLiveTextItem::readData(uint16 type, uint16 size, Common::MemoryReadStream LiveTextWord word; word.bounds = _vm->readRect(stream); word.soundId = stream->readUint16(); - // TODO: unknowns - uint16 unknown1 = stream->readUint16(); - uint16 unknown2 = stream->readUint16(); - debug(4, "Word: (%d, %d) to (%d, %d), sound %d, unknowns %04x, %04x", - word.bounds.left, word.bounds.top, word.bounds.right, word.bounds.bottom, word.soundId, unknown1, unknown2); + word.itemType = stream->readUint16(); + word.itemId = stream->readUint16(); + debug(4, "Word: (%d, %d) to (%d, %d), sound %d, item %d (type %d)", + word.bounds.left, word.bounds.top, word.bounds.right, word.bounds.bottom, word.soundId, word.itemId, word.itemType); _words.push_back(word); } @@ -3531,6 +3530,11 @@ void LBLiveTextItem::handleMouseDown(Common::Point pos) { _currentWord = i; _vm->playSound(this, soundId); paletteUpdate(_currentWord, true); + + // TODO: check this in RE + LBItem *item = _vm->getItemById(_words[i].itemId); + if (item) + item->togglePlaying(false); return; } } diff --git a/engines/mohawk/livingbooks.h b/engines/mohawk/livingbooks.h index 91d6a8cd30..76da7d8219 100644 --- a/engines/mohawk/livingbooks.h +++ b/engines/mohawk/livingbooks.h @@ -537,6 +537,9 @@ protected: struct LiveTextWord { Common::Rect bounds; uint16 soundId; + + uint16 itemType; + uint16 itemId; }; struct LiveTextPhrase { -- cgit v1.2.3 From 87b79f2124a1d13cfd3a62d9a526d1770a340b19 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Sun, 8 Jul 2012 10:27:31 +0200 Subject: COMPOSER: Fix parsing v1 book groups. This fixes bug #3539019. --- engines/composer/composer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp index 556dad7e94..23a9d2ff85 100644 --- a/engines/composer/composer.cpp +++ b/engines/composer/composer.cpp @@ -381,11 +381,17 @@ void ComposerEngine::loadLibrary(uint id) { filename = getStringFromConfig(_bookGroup, Common::String::format("%d", id)); filename = mangleFilename(filename); + // bookGroup is the basename of the path. + // TODO: tidy this up. _bookGroup.clear(); for (uint i = 0; i < filename.size(); i++) { - if (filename[i] == '\\' || filename[i] == ':') + if (filename[i] == '~' || filename[i] == '/' || filename[i] == ':') continue; for (uint j = 0; j < filename.size(); j++) { + if (filename[j] == '/') { + _bookGroup.clear(); + continue; + } if (filename[j] == '.') break; _bookGroup += filename[j]; -- cgit v1.2.3 From 93cc9c92c90162a73c0da5dee9b26b0a0012d60b Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 8 Jul 2012 12:36:30 +0100 Subject: I18N: Update French translation --- po/fr_FR.po | 117 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 58 insertions(+), 59 deletions(-) diff --git a/po/fr_FR.po b/po/fr_FR.po index be7ddddbed..e153beb3a5 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" -"PO-Revision-Date: 2011-10-23 14:52+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"PO-Revision-Date: 2012-07-08 12:24+0100\n" "Last-Translator: Thierry Crozat \n" "Language-Team: French \n" "MIME-Version: 1.0\n" @@ -193,9 +193,8 @@ msgid "Platform:" msgstr "Système:" #: gui/launcher.cpp:231 -#, fuzzy msgid "Engine" -msgstr "Examiner" +msgstr "Moteur" #: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" @@ -1145,13 +1144,13 @@ msgid "~R~eturn to Launcher" msgstr "Retour au ~L~anceur" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Sauvegarde:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1171,14 +1170,13 @@ msgstr "" "obtenir de l'aide supplémentaire." #: engines/dialogs.cpp:228 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Désolé, il n'y a pas d'aide disponible dans ce jeu actuellement. Lisez le " -"fichier README pour les informations de base et les instructions pour " -"obtenir de l'aide supplémentaire." +"Echec de la sauvegarde (%s)! Lisez le fichier README pour les informations " +"de base et les instructions pour obtenir de l'aide supplémentaire." #: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 @@ -1239,14 +1237,13 @@ msgstr "" "Lisez le fichier README pour plus de détails." #: engines/engine.cpp:426 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate load failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Désolé, il n'y a pas d'aide disponible dans ce jeu actuellement. Lisez le " -"fichier README pour les informations de base et les instructions pour " -"obtenir de l'aide supplémentaire." +"Echec du chargement (%s)! . Lisez le fichier README pour les informations de " +"base et les instructions pour obtenir de l'aide supplémentaire." #: engines/engine.cpp:439 msgid "" @@ -1265,84 +1262,88 @@ msgstr "Jouer quand m #: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" -msgstr "" +msgstr "Utiliser les dialogues sauvegarde/chargement d'origine" #: 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 "" +"Utiliser les dialogues sauvegarde/chargement d'origine plutôt que ceux de " +"ScummVM" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Charger le jeu:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Charger" #: engines/dreamweb/detection.cpp:57 -#, fuzzy msgid "Use bright palette mode" -msgstr "Élément en haut à droite" +msgstr "Utiliser le mode palette lumineuse" #: engines/dreamweb/detection.cpp:58 msgid "Display graphics using the game's bright palette" -msgstr "" +msgstr "Utiliser la palette lumineuse du jeu pour l'affichage" #: engines/sci/detection.cpp:370 msgid "EGA undithering" msgstr "Détramage EGA" #: engines/sci/detection.cpp:371 -#, fuzzy msgid "Enable undithering in EGA games" -msgstr "Active le détramage dans les jeux EGA qui le supporte" +msgstr "Activer le détramage dans les jeux EGA" #: engines/sci/detection.cpp:380 -#, fuzzy msgid "Prefer digital sound effects" -msgstr "Volume des effets spéciaux sonores" +msgstr "Préférer les effets sonors digitals" #: engines/sci/detection.cpp:381 msgid "Prefer digital sound effects instead of synthesized ones" -msgstr "" +msgstr "Préférer les effets sonores digitaux plutôt que ceux synthétisés" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "" +msgid "Use IMF/Yamaha FB-01 for MIDI output" +msgstr "Utiliser IMF/Yamaha FB-01 pour la sortie MIDI" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" +"Utiliser une carte IBM Music Feature ou un module Yamaha FB-01 FM pour la " +"sortie MIDI" #: engines/sci/detection.cpp:411 msgid "Use CD audio" -msgstr "" +msgstr "Utiliser la musique du CD" #: engines/sci/detection.cpp:412 msgid "Use CD audio instead of in-game audio, if available" msgstr "" +"Utiliser la musique du CD quand elle est disponible au lieu de la musique du " +"jeu" #: engines/sci/detection.cpp:422 msgid "Use Windows cursors" -msgstr "" +msgstr "Utiliser les curseurs Windows" #: engines/sci/detection.cpp:423 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" +"Utiliser les curseurs Windows (plus petits et monochromes) au lieu des " +"curseurs DOS" #: engines/sci/detection.cpp:433 -#, fuzzy msgid "Use silver cursors" -msgstr "Curseur normal" +msgstr "Utiliser les curseurs argentés" #: engines/sci/detection.cpp:434 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" -msgstr "" +msgstr "Utiliser les curseurs argentés au lieu des curseurs normaux dorés" #: engines/scumm/dialogs.cpp:175 #, c-format @@ -2096,61 +2097,59 @@ msgstr " #. Malcolm makes a joke. #: engines/kyra/detection.cpp:62 msgid "Studio audience" -msgstr "" +msgstr "Public en studio" #: engines/kyra/detection.cpp:63 msgid "Enable studio audience" -msgstr "" +msgstr "Activer le public en studio" #. I18N: This option allows the user to skip text and cutscenes. #: engines/kyra/detection.cpp:73 msgid "Skip support" -msgstr "" +msgstr "Support des interruptions" #: engines/kyra/detection.cpp:74 msgid "Allow text and cutscenes to be skipped" -msgstr "" +msgstr "Permet de sauter les textes et scènes cinématiques" #. I18N: Helium mode makes people sound like they've inhaled Helium. #: engines/kyra/detection.cpp:84 msgid "Helium mode" -msgstr "" +msgstr "Mode Helium" #: engines/kyra/detection.cpp:85 -#, fuzzy msgid "Enable helium mode" -msgstr "Activer le mode Roland GS" +msgstr "Activer le mode helium" #. 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 "Défilement régulier" #: engines/kyra/detection.cpp:100 msgid "Enable smooth scrolling when walking" -msgstr "" +msgstr "Activer le défilement régulier en marchant" #. 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 "Curseur normal" +msgstr "Curseurs flotants" #: engines/kyra/detection.cpp:113 msgid "Enable floating cursors" -msgstr "" +msgstr "Activer les curseurs flotants" #. I18N: HP stands for Hit Points #: engines/kyra/detection.cpp:127 msgid "HP bar graphs" -msgstr "" +msgstr "Bar HP" #: engines/kyra/detection.cpp:128 msgid "Enable hit point bar graphs" -msgstr "" +msgstr "Activer les bars de santé (Hit Point)" #: engines/kyra/lol.cpp:478 msgid "Attack 1" @@ -2201,12 +2200,13 @@ msgid "Choose Spell" msgstr "Choisir un Sort" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "Il semble que vous utilisiez un périphérique General MIDI,\n" "mais ce jeu ne support que le MIDI Roland MT32.\n" @@ -2216,11 +2216,11 @@ msgstr "" #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" -msgstr "" +msgstr "Intro disquette" #: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" -msgstr "" +msgstr "Utiliser l'intro de la version disquette (version CD uniquement)" #: engines/sky/compact.cpp:130 msgid "" @@ -2242,6 +2242,7 @@ msgstr "" #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" msgstr "" +"La scène cinématique PSX '%s' ne peut pas être lu avec 256 couleurs ou moins" #: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 msgid "DXA cutscenes found but ScummVM has been built without zlib support" @@ -2298,20 +2299,19 @@ msgid "This is the end of the Broken Sword 1 Demo" msgstr "C'est la fin de la démo des Chevaliers de Baphomet" #: engines/sword2/animation.cpp:435 -#, fuzzy msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" -"Les séquences DXA sont présente mais ScummVM a été compilé sans le support " -"zlib." +"Scènes cinématique PSX détectées mais ScummVM a été compilé sans le support " +"des couleurs RGB" #: engines/sword2/sword2.cpp:79 msgid "Show object labels" -msgstr "" +msgstr "Afficher la description des objets" #: engines/sword2/sword2.cpp:80 msgid "Show labels for objects on mouse hover" -msgstr "" +msgstr "Afficher la description des objets lors de passage du pointeur" #: engines/parallaction/saveload.cpp:133 #, c-format @@ -2451,9 +2451,8 @@ msgid "Keymap:" msgstr "Affectation des touches:" #: backends/keymapper/remap-dialog.cpp:66 -#, fuzzy msgid " (Effective)" -msgstr "(Actif)" +msgstr "(Effectif)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Active)" @@ -2461,7 +2460,7 @@ msgstr "(Actif)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Blocked)" -msgstr "" +msgstr "(Bloqué)" #: backends/keymapper/remap-dialog.cpp:119 msgid " (Global)" -- cgit v1.2.3 From 36f63e665a188929bef38f759096a10db8982d50 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 8 Jul 2012 12:38:47 +0100 Subject: I18N: Update all translations from source code This in particular fixes the spelling of Yamaha. --- po/ca_ES.po | 19 +- po/cs_CZ.po | 23 +- po/da_DA.po | 23 +- po/de_DE.po | 53 ++-- po/es_ES.po | 23 +- po/eu.po | 19 +- po/hu_HU.po | 23 +- po/it_IT.po | 21 +- po/nb_NO.po | 762 ++++++++++++++++++++++++--------------------------------- po/nn_NO.po | 18 +- po/pl_PL.po | 19 +- po/pt_BR.po | 19 +- po/ru_RU.po | 19 +- po/scummvm.pot | 18 +- po/se_SE.po | 21 +- po/uk_UA.po | 19 +- 16 files changed, 502 insertions(+), 597 deletions(-) diff --git a/po/ca_ES.po b/po/ca_ES.po index d076f96f55..8a978bee0d 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2011-10-04 20:51+0100\n" "Last-Translator: Jordi Vilalta Prat \n" "Language-Team: Catalan \n" @@ -1144,13 +1144,13 @@ msgid "~R~eturn to Launcher" msgstr "~R~etorna al Llançador" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Desa la partida:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1268,11 +1268,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Recupera la partida:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Restaura" @@ -1304,12 +1304,12 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" +msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" @@ -2203,12 +2203,13 @@ msgid "Choose Spell" msgstr "Escull" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "Sembla que esteu utilitzant un dispositiu General\n" "MIDI, però el joc només suporta MIDI de Roland\n" diff --git a/po/cs_CZ.po b/po/cs_CZ.po index 93bfed0261..6bf4e77206 100644 --- a/po/cs_CZ.po +++ b/po/cs_CZ.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.4.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2012-05-22 21:02+0100\n" "Last-Translator: Zbynìk Schwarz \n" "Language-Team: \n" @@ -1131,13 +1131,13 @@ msgid "~R~eturn to Launcher" msgstr "~N~ávrat do Spou¹tìèe" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Ulo¾it hru:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1256,11 +1256,11 @@ msgstr "Pou msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Pou¾ít pùvodní obrazovky naètení/ulo¾ení místo ze ScummVM" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Obnovit hru" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Obnovit" @@ -1289,15 +1289,15 @@ msgid "Prefer digital sound effects instead of synthesized ones" 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 "Pou¾ít IMF/Yahama FB-01 pro výstup MIDI" +msgid "Use IMF/Yamaha FB-01 for MIDI output" +msgstr "Pou¾ít IMF/Yamaha 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 " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" -"Pou¾ít kartu IBM Music Feature nebo modul syntetizátoru Yahama FB-01 FM pro " +"Pou¾ít kartu IBM Music Feature nebo modul syntetizátoru Yamaha FB-01 FM pro " "výstup MIDI" #: engines/sci/detection.cpp:411 @@ -2180,12 +2180,13 @@ msgid "Choose Spell" msgstr "Zvolit Kouzlo" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "Zdá se, ¾e pou¾íváte zaøízení General MIDI,\n" "ale Va¹e hra podporuje pouze Roland MT32 MIDI.\n" diff --git a/po/da_DA.po b/po/da_DA.po index eb62af84a9..d3a39db440 100644 --- a/po/da_DA.po +++ b/po/da_DA.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2012-06-29 19:45+0100\n" "Last-Translator: Steffen Nyeland \n" "Language-Team: Steffen Nyeland \n" @@ -1131,13 +1131,13 @@ msgid "~R~eturn to Launcher" msgstr "~R~etur til oversigt" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Gemmer:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1257,11 +1257,11 @@ msgstr "Brug original gem/indl msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Brug de originale gem/indlæs skærme, istedet for dem fra ScummVM" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Gendan spil:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Gendan" @@ -1290,15 +1290,15 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Foretræk digitale lydeffekter i stedet for syntetiserede" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "Brug IMF/Yahama FB-01 til MIDI-udgang" +msgid "Use IMF/Yamaha FB-01 for MIDI output" +msgstr "Brug IMF/Yamaha FB-01 til MIDI-udgang" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" -"Bruge et IBM Musik Feature-kort eller et Yahama FB-01 FM synth modul til " +"Bruge et IBM Musik Feature-kort eller et Yamaha FB-01 FM synth modul til " "MIDI-udgang" #: engines/sci/detection.cpp:411 @@ -2182,12 +2182,13 @@ msgid "Choose Spell" msgstr "Vælg magi" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "Det lader til at du en General MIDI-enhed,\n" "men dit spil kun understøtter Roland MT32 MIDI.\n" diff --git a/po/de_DE.po b/po/de_DE.po index d68dcb2d8e..c40e08034a 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2012-01-29 21:11+0100\n" "Last-Translator: Simon Sawatzki \n" "Language-Team: Simon Sawatzki (Lead), Lothar Serra Mari " @@ -931,8 +931,9 @@ msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." msgstr "" -"Das ausgewählte Thema unterstützt nicht die aktuelle Sprache. Wenn Sie dieses " -"Thema benutzen wollen, müssen Sie erst zu einer anderen Sprache wechseln." +"Das ausgewählte Thema unterstützt nicht die aktuelle Sprache. Wenn Sie " +"dieses Thema benutzen wollen, müssen Sie erst zu einer anderen Sprache " +"wechseln." #: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" @@ -1150,13 +1151,13 @@ msgid "~R~eturn to Launcher" msgstr "Zur Spiele~l~iste" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Speichern:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1250,8 +1251,8 @@ msgid "" "Gamestate load failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Laden des Spielstands %s fehlgeschlagen! Bitte lesen Sie die Liesmich-" -"Datei für grundlegende Informationen und Anweisungen zu weiterer Hilfe." +"Laden des Spielstands %s fehlgeschlagen! Bitte lesen Sie die Liesmich-Datei " +"für grundlegende Informationen und Anweisungen zu weiterer Hilfe." #: engines/engine.cpp:439 msgid "" @@ -1276,13 +1277,14 @@ msgstr "Originale Spielstand-Men #: 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 "Verwendet die originalen Menüs zum Speichern und Laden statt der von ScummVM." +msgstr "" +"Verwendet die originalen Menüs zum Speichern und Laden statt der von ScummVM." -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Spiel laden:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Laden" @@ -1311,16 +1313,16 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Bevorzugt digitale Sound-Effekte statt synthethisierter." #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "IMF/Yahama FB-01 für MIDI-Ausgabe verwenden" +msgid "Use IMF/Yamaha FB-01 for MIDI output" +msgstr "IMF/Yamaha FB-01 für MIDI-Ausgabe verwenden" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" -"Verwendet eine Music-Feature-Karte von IBM oder ein " -"Yahama-FB-01-FM-Synthetisierungsmodul für die MIDI-Ausgabe." +"Verwendet eine Music-Feature-Karte von IBM oder ein Yamaha-FB-01-FM-" +"Synthetisierungsmodul für die MIDI-Ausgabe." #: engines/sci/detection.cpp:411 msgid "Use CD audio" @@ -2208,12 +2210,13 @@ msgid "Choose Spell" msgstr "Zauberspruch auswählen" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "Sie scheinen ein General-MIDI-Gerät zu\n" "verwenden, aber das Spiel unterstützt nur\n" @@ -2280,10 +2283,10 @@ msgid "" "Press OK to convert them now, otherwise you will be asked again the next " "time you start the game.\n" msgstr "" -"ScummVM hat erkannt, dass Sie alte Spielstände von Baphomets Fluch 1 " -"haben, die umgewandelt werden sollten.\n" -"Das alte Speicherformat wird nicht mehr unterstützt, also können Sie " -"diese Spielstände unkonvertiert nicht laden.\n" +"ScummVM hat erkannt, dass Sie alte Spielstände von Baphomets Fluch 1 haben, " +"die umgewandelt werden sollten.\n" +"Das alte Speicherformat wird nicht mehr unterstützt, also können Sie diese " +"Spielstände unkonvertiert nicht laden.\n" "\n" "Klicken Sie auf OK, um diese jetzt umzuwandeln, sonst werden Sie erneut " "gefragt, wenn Sie nächstes Mal dieses Spiel starten.\n" @@ -2313,8 +2316,8 @@ msgstr "Das ist das Ende der Demo von Broken Sword 1 (Baphomets Fluch 1)." msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" -"PSX-Zwischensequenzen gefunden, aber ScummVM wurde ohne Unterstützung " -"für RGB-Farben erstellt." +"PSX-Zwischensequenzen gefunden, aber ScummVM wurde ohne Unterstützung für " +"RGB-Farben erstellt." #: engines/sword2/sword2.cpp:79 msgid "Show object labels" @@ -2350,8 +2353,8 @@ msgid "" "\n" "Press OK to convert them now, otherwise you will be asked next time.\n" msgstr "" -"ScummVM hat erkannt, dass Sie alte Spielstände von Nippon Safes haben, " -"die umbenannt werden sollten.\n" +"ScummVM hat erkannt, dass Sie alte Spielstände von Nippon Safes haben, die " +"umbenannt werden sollten.\n" "Die alten Dateinamen werden nicht mehr unterstützt, also können Sie diese " "Spielstände unkonvertiert nicht laden.\n" "\n" diff --git a/po/es_ES.po b/po/es_ES.po index 9849a1798b..fffd190695 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.4.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2012-06-22 17:44+0100\n" "Last-Translator: Tomás Maidagan\n" "Language-Team: \n" @@ -1136,13 +1136,13 @@ msgid "~R~eturn to Launcher" msgstr "~V~olver al lanzador" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Guardar partida" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1264,11 +1264,11 @@ msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" "Utilizar las pantallas de guardar/cargar originales, en vez de las de ScummVM" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Cargar partida:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Cargar" @@ -1297,15 +1297,15 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Preferir efectos de sonido digitales en vez de los sintetizados" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "Usar IMF/Yahama FB-01 para la salida MIDI" +msgid "Use IMF/Yamaha FB-01 for MIDI output" +msgstr "Usar IMF/Yamaha FB-01 para la salida MIDI" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" -"Usa una tarjeta IBM Music o un módulo sintetizador Yahama FB-01 FM para la " +"Usa una tarjeta IBM Music o un módulo sintetizador Yamaha FB-01 FM para la " "salida MIDI" #: engines/sci/detection.cpp:411 @@ -2190,12 +2190,13 @@ msgid "Choose Spell" msgstr "Elegir hechizo" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "Estás usando un dispositivo General Midi, pero el\n" "juego solo es compatible con MIDI Roland MT32.\n" diff --git a/po/eu.po b/po/eu.po index fa0d3030b6..5bc553e572 100644 --- a/po/eu.po +++ b/po/eu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2011-12-15 14:53+0100\n" "Last-Translator: Mikel Iturbe Urretxa \n" "Language-Team: Librezale \n" @@ -1137,13 +1137,13 @@ msgid "~R~eturn to Launcher" msgstr "It~z~uli abiarazlera" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Gorde jokoa:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1261,11 +1261,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Jokoa kargatu:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Kargatu" @@ -1297,12 +1297,12 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" +msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" @@ -2189,12 +2189,13 @@ msgid "Choose Spell" msgstr "Sorginkeria aukeratu" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "General MIDI gailua erabiltzen zaudela dirudi,\n" "baina zure jokoak Roland MT32 MIDI bakarrik\n" diff --git a/po/hu_HU.po b/po/hu_HU.po index c868806a8a..29ad6c3aeb 100644 --- a/po/hu_HU.po +++ b/po/hu_HU.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2012-06-25 06:21+0100\n" "Last-Translator: George Kormendi \n" "Language-Team: Hungarian\n" @@ -1130,13 +1130,13 @@ msgid "~R~eturn to Launcher" msgstr "Visszatérés az indítóba" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Játék mentése:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1254,11 +1254,11 @@ msgstr "Eredeti ment/t msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Az eredeti mentés/betöltés képernyõ használata a ScummVM képek helyett" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Játékmenet visszaállítása:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Visszaállítás" @@ -1287,15 +1287,15 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Digitális hanghatások elõnyben a szintetizáltakkal szemben" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "IMF/Yahama FB-01 használata MIDI kimentre" +msgid "Use IMF/Yamaha FB-01 for MIDI output" +msgstr "IMF/Yamaha FB-01 használata MIDI kimentre" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" -"IBM Music Feature kártya vagy Yahama FB-01 FM szintetizátor modul használata " +"IBM Music Feature kártya vagy Yamaha FB-01 FM szintetizátor modul használata " "MIDI kimenetre" #: engines/sci/detection.cpp:411 @@ -2178,12 +2178,13 @@ msgid "Choose Spell" msgstr "Válassz varázslatot" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "Úgy néz ki egy General MIDI eszközt használsz,\n" "a játék csak Roland MT32 MIDI eszközt támogat.\n" diff --git a/po/it_IT.po b/po/it_IT.po index 26bf3773f9..d4f8256c83 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2012-06-29 14:33+0100\n" "Last-Translator: Matteo 'Maff' Angelino \n" "Language-Team: Italian\n" @@ -1137,13 +1137,13 @@ msgid "~R~eturn to Launcher" msgstr "~V~ai a elenco giochi" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Salva gioco:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1266,11 +1266,11 @@ msgstr "" "Usa le schermate originali di salvataggio e caricamento, al posto di quelle " "di ScummVM" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Ripristina gioco:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Ripristina" @@ -1299,12 +1299,12 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Scegli gli effetti sonori digitali al posto di quelli sintetizzati" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "Usa IMF/Yahama FB-01 per output MIDI" +msgid "Use IMF/Yamaha FB-01 for MIDI output" +msgstr "Usa IMF/Yamaha FB-01 per output MIDI" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" "Usa una scheda IBM Music Feature o un modulo synth Yamaha FB-01 FM per " @@ -2194,12 +2194,13 @@ msgid "Choose Spell" msgstr "Scegli incantesimo" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "Sembra che tu stia utilizzanto un dispositivo\n" "General MIDI, ma il gioco supporta solo Roland\n" diff --git a/po/nb_NO.po b/po/nb_NO.po index 0975877d65..bc7b1720fa 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2012-07-04 02:19+0100\n" "Last-Translator: Einar Johan Sømåen \n" "Language-Team: somaen \n" @@ -37,8 +37,7 @@ msgstr "Tilgjengelige motorer:" msgid "Go up" msgstr "Gå tilbake" -#: gui/browser.cpp:66 -#: gui/browser.cpp:68 +#: gui/browser.cpp:66 gui/browser.cpp:68 msgid "Go to previous directory level" msgstr "Gå til forrige mappenivå" @@ -47,37 +46,24 @@ msgctxt "lowres" msgid "Go up" msgstr "Gå tilbake" -#: gui/browser.cpp:69 -#: gui/chooser.cpp:45 -#: gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:345 -#: gui/massadd.cpp:94 -#: gui/options.cpp:1228 -#: gui/saveload.cpp:64 -#: gui/saveload.cpp:173 -#: gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 -#: engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 -#: engines/parallaction/saveload.cpp:274 +#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 +#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 +#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 +#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" msgstr "Avbryt" -#: gui/browser.cpp:70 -#: gui/chooser.cpp:46 -#: gui/themebrowser.cpp:55 +#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55 msgid "Choose" msgstr "Velg" -#: gui/gui-manager.cpp:115 -#: engines/scumm/help.cpp:125 -#: engines/scumm/help.cpp:140 -#: engines/scumm/help.cpp:165 -#: engines/scumm/help.cpp:191 -#: engines/scumm/help.cpp:209 +#: gui/gui-manager.cpp:115 engines/scumm/help.cpp:125 +#: engines/scumm/help.cpp:140 engines/scumm/help.cpp:165 +#: engines/scumm/help.cpp:191 engines/scumm/help.cpp:209 #: backends/keymapper/remap-dialog.cpp:52 msgid "Close" msgstr "Lukk" @@ -86,23 +72,19 @@ msgstr "Lukk" msgid "Mouse click" msgstr "Musklikk" -#: gui/gui-manager.cpp:122 -#: base/main.cpp:300 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Vis tastatur" -#: gui/gui-manager.cpp:126 -#: base/main.cpp:304 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Omkoble taster" -#: gui/gui-manager.cpp:129 -#: base/main.cpp:307 +#: gui/gui-manager.cpp:129 base/main.cpp:307 msgid "Toggle FullScreen" msgstr "Veksle fullskjerm" -#: gui/KeysDialog.h:36 -#: gui/KeysDialog.cpp:145 +#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145 msgid "Choose an action to map" msgstr "Velg en handling for kobling" @@ -110,31 +92,17 @@ msgstr "Velg en handling for kobling" msgid "Map" msgstr "Koble" -#: gui/KeysDialog.cpp:42 -#: gui/launcher.cpp:346 -#: gui/launcher.cpp:1001 -#: gui/launcher.cpp:1005 -#: gui/massadd.cpp:91 -#: gui/options.cpp:1229 -#: engines/engine.cpp:361 -#: engines/engine.cpp:372 -#: engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 -#: engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 -#: engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 -#: engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 -#: engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 -#: engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 -#: engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 -#: engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 -#: engines/parallaction/saveload.cpp:274 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 +#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 +#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 +#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 +#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 +#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 +#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 +#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 +#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 +#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -144,16 +112,12 @@ msgstr "OK" msgid "Select an action and click 'Map'" msgstr "Velg en handling, og trykk 'Koble'" -#: gui/KeysDialog.cpp:80 -#: gui/KeysDialog.cpp:102 -#: gui/KeysDialog.cpp:141 +#: gui/KeysDialog.cpp:80 gui/KeysDialog.cpp:102 gui/KeysDialog.cpp:141 #, c-format msgid "Associated key : %s" msgstr "Koblet tast : %s" -#: gui/KeysDialog.cpp:82 -#: gui/KeysDialog.cpp:104 -#: gui/KeysDialog.cpp:143 +#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143 #, c-format msgid "Associated key : none" msgstr "Koblet tast: ingen" @@ -174,11 +138,13 @@ msgstr "Spill" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:191 -#: gui/launcher.cpp:193 -#: gui/launcher.cpp:194 -msgid "Short game identifier used for referring to savegames and running the game from the command line" -msgstr "Kort spill-identifikator, brukt for å referere til lagrede spill, og å kjøre spillet fra kommandolinjen" +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 +msgid "" +"Short game identifier used for referring to savegames and running the game " +"from the command line" +msgstr "" +"Kort spill-identifikator, brukt for å referere til lagrede spill, og å kjøre " +"spillet fra kommandolinjen" #: gui/launcher.cpp:193 msgctxt "lowres" @@ -189,9 +155,7 @@ msgstr "ID:" msgid "Name:" msgstr "Navn:" -#: gui/launcher.cpp:198 -#: gui/launcher.cpp:200 -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Full spilltittel" @@ -204,17 +168,16 @@ msgstr "Navn:" msgid "Language:" msgstr "Språk:" -#: gui/launcher.cpp:204 -#: gui/launcher.cpp:205 -msgid "Language of the game. This will not turn your Spanish game version into English" -msgstr "Spillets språk. Dette vil ikke gjøre din spanske spillversjon om til engelsk versjon" +#: gui/launcher.cpp:204 gui/launcher.cpp:205 +msgid "" +"Language of the game. This will not turn your Spanish game version into " +"English" +msgstr "" +"Spillets språk. Dette vil ikke gjøre din spanske spillversjon om til engelsk " +"versjon" -#: gui/launcher.cpp:206 -#: gui/launcher.cpp:220 -#: gui/options.cpp:80 -#: gui/options.cpp:730 -#: gui/options.cpp:743 -#: gui/options.cpp:1199 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" @@ -223,9 +186,7 @@ msgstr "" msgid "Platform:" msgstr "Plattform:" -#: gui/launcher.cpp:216 -#: gui/launcher.cpp:218 -#: gui/launcher.cpp:219 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Plattform spillet opprinnelig ble designet for" @@ -238,15 +199,11 @@ msgstr "Plattform:" msgid "Engine" msgstr "Motor" -#: gui/launcher.cpp:239 -#: gui/options.cpp:1062 -#: gui/options.cpp:1079 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Grafikk" -#: gui/launcher.cpp:239 -#: gui/options.cpp:1062 -#: gui/options.cpp:1079 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "GFX" @@ -259,8 +216,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Overstyr globale grafikkinstillinger" -#: gui/launcher.cpp:251 -#: gui/options.cpp:1085 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Lyd" @@ -273,13 +229,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Overstyr globale lydinstillinger" -#: gui/launcher.cpp:265 -#: gui/options.cpp:1090 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Volum" -#: gui/launcher.cpp:267 -#: gui/options.cpp:1092 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Volum" @@ -293,8 +247,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Overstyr globale voluminstillinger" -#: gui/launcher.cpp:280 -#: gui/options.cpp:1100 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" @@ -307,8 +260,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Overstyr globale MIDI-instillinger" -#: gui/launcher.cpp:294 -#: gui/options.cpp:1106 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" @@ -321,13 +273,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Overstyr globale MT-32-instillinger" -#: gui/launcher.cpp:308 -#: gui/options.cpp:1113 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Sti" -#: gui/launcher.cpp:310 -#: gui/options.cpp:1115 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Sti" @@ -341,80 +291,54 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Spillsti:" -#: gui/launcher.cpp:324 -#: gui/options.cpp:1139 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Ekstrasti:" -#: gui/launcher.cpp:324 -#: gui/launcher.cpp:326 -#: gui/launcher.cpp:327 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Bestemmer sti til ytterligere data brukt av spillet" -#: gui/launcher.cpp:326 -#: gui/options.cpp:1141 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Ekstrasti:" -#: gui/launcher.cpp:333 -#: gui/options.cpp:1123 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Lagringssti:" -#: gui/launcher.cpp:333 -#: gui/launcher.cpp:335 -#: gui/launcher.cpp:336 -#: gui/options.cpp:1123 -#: gui/options.cpp:1125 -#: gui/options.cpp:1126 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Bestemmer sti til lagrede spill" -#: gui/launcher.cpp:335 -#: gui/options.cpp:1125 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Lagringssti:" -#: gui/launcher.cpp:354 -#: gui/launcher.cpp:453 -#: gui/launcher.cpp:511 -#: gui/launcher.cpp:565 -#: gui/options.cpp:1134 -#: gui/options.cpp:1142 -#: gui/options.cpp:1151 -#: gui/options.cpp:1258 -#: gui/options.cpp:1264 -#: gui/options.cpp:1272 -#: gui/options.cpp:1302 -#: gui/options.cpp:1308 -#: gui/options.cpp:1315 -#: gui/options.cpp:1408 -#: gui/options.cpp:1411 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 #: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Ingen" -#: gui/launcher.cpp:359 -#: gui/launcher.cpp:459 -#: gui/launcher.cpp:569 -#: gui/options.cpp:1252 -#: gui/options.cpp:1296 -#: gui/options.cpp:1414 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standard" -#: gui/launcher.cpp:504 -#: gui/options.cpp:1417 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Velg SoundFont" -#: gui/launcher.cpp:523 -#: gui/launcher.cpp:677 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Velg mappe med spilldata" @@ -430,13 +354,11 @@ msgstr "Velg mappe for lagrede spill" msgid "This game ID is already taken. Please choose another one." msgstr "Denne spill-IDen er allerede i bruk. Vennligst velg en annen." -#: gui/launcher.cpp:621 -#: engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~A~vslutt" -#: gui/launcher.cpp:621 -#: backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Avslutt ScummVM" @@ -444,8 +366,7 @@ msgstr "Avslutt ScummVM" msgid "A~b~out..." msgstr "~O~m..." -#: gui/launcher.cpp:622 -#: backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "Om ScummVM" @@ -473,13 +394,11 @@ msgstr "~ msgid "Load savegame for selected game" msgstr "Åpne lagret spill for det valgte spillet" -#: gui/launcher.cpp:633 -#: gui/launcher.cpp:1120 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~L~egg til spill..." -#: gui/launcher.cpp:633 -#: gui/launcher.cpp:640 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Hold Shift for å legge til flere" @@ -487,8 +406,7 @@ msgstr "Hold Shift for msgid "~E~dit Game..." msgstr "~R~ediger spill..." -#: gui/launcher.cpp:635 -#: gui/launcher.cpp:642 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Endre spillinstillinger" @@ -496,13 +414,11 @@ msgstr "Endre spillinstillinger" msgid "~R~emove Game" msgstr "~F~jern spill" -#: gui/launcher.cpp:637 -#: gui/launcher.cpp:644 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Fjern spill fra listen. Spilldataene forblir intakte" -#: gui/launcher.cpp:640 -#: gui/launcher.cpp:1120 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~L~egg til spill..." @@ -521,36 +437,31 @@ msgstr "~F~jern spill" msgid "Search in game list" msgstr "Søk i spilliste" -#: gui/launcher.cpp:656 -#: gui/launcher.cpp:1167 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Søk:" -#: gui/launcher.cpp:680 -#: engines/dialogs.cpp:114 -#: engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:214 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Åpne spill:" -#: gui/launcher.cpp:680 -#: engines/dialogs.cpp:114 -#: engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:214 -#: backends/platform/wince/CEActionsPocket.cpp:267 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Åpne" #: gui/launcher.cpp:788 -msgid "Do you really want to run the mass game detector? This could potentially add a huge number of games." -msgstr "Vil du virkelig kjøre flerspill-finneren? Dette kan potensielt legge til et stort antall spill." +msgid "" +"Do you really want to run the mass game detector? This could potentially add " +"a huge number of games." +msgstr "" +"Vil du virkelig kjøre flerspill-finneren? Dette kan potensielt legge til et " +"stort antall spill." -#: gui/launcher.cpp:789 -#: gui/launcher.cpp:937 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -558,8 +469,7 @@ msgstr "Vil du virkelig kj msgid "Yes" msgstr "Ja" -#: gui/launcher.cpp:789 -#: gui/launcher.cpp:937 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -589,7 +499,8 @@ msgstr "Dette spillet st #: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" -msgstr "ScummVM kunne ikke finne noen motor som kunne kjøre det valgte spillet!" +msgstr "" +"ScummVM kunne ikke finne noen motor som kunne kjøre det valgte spillet!" #: gui/launcher.cpp:1119 msgctxt "lowres" @@ -600,8 +511,7 @@ msgstr "Legg til flere..." msgid "Mass Add..." msgstr "Legg til flere..." -#: gui/massadd.cpp:78 -#: gui/massadd.cpp:81 +#: gui/massadd.cpp:78 gui/massadd.cpp:81 msgid "... progress ..." msgstr "... fremdrift ..." @@ -612,7 +522,8 @@ msgstr "S #: gui/massadd.cpp:261 #, c-format msgid "Discovered %d new games, ignored %d previously added games." -msgstr "Fant %d nye spill, ignorerte %d spill som har blitt lagt til tidligere." +msgstr "" +"Fant %d nye spill, ignorerte %d spill som har blitt lagt til tidligere." #: gui/massadd.cpp:265 #, c-format @@ -622,7 +533,8 @@ msgstr "Sjekket %d mapper ..." #: gui/massadd.cpp:268 #, c-format msgid "Discovered %d new games, ignored %d previously added games ..." -msgstr "Fant %d nye spill, ignorerte %d spill som har blitt lagt til tidligere..." +msgstr "" +"Fant %d nye spill, ignorerte %d spill som har blitt lagt til tidligere..." #: gui/options.cpp:78 msgid "Never" @@ -664,11 +576,8 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:248 -#: gui/options.cpp:474 -#: gui/options.cpp:575 -#: gui/options.cpp:644 -#: gui/options.cpp:852 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Ingen" @@ -697,8 +606,7 @@ msgstr "Grafikkmodus:" msgid "Render mode:" msgstr "Tegnemodus:" -#: gui/options.cpp:741 -#: gui/options.cpp:742 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Spesiel dithering-modus støttet av enkelte spill" @@ -724,14 +632,11 @@ msgstr "Foretrukket enhet:" msgid "Music Device:" msgstr "Musikkenhet:" -#: gui/options.cpp:764 -#: gui/options.cpp:766 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "Velger foretrukket lydenhet eller lydkort-emulator" -#: gui/options.cpp:764 -#: gui/options.cpp:766 -#: gui/options.cpp:767 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Velger ut-lydenhet eller lydkortemulator" @@ -749,8 +654,7 @@ msgstr "Musikkenhet:" msgid "AdLib emulator:" msgstr "AdLib-emulator:" -#: gui/options.cpp:793 -#: gui/options.cpp:794 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib brukes til musikk i mange spill" @@ -758,10 +662,13 @@ msgstr "AdLib brukes til musikk i mange spill" msgid "Output rate:" msgstr "Utrate:" -#: gui/options.cpp:804 -#: gui/options.cpp:805 -msgid "Higher value specifies better sound quality but may be not supported by your soundcard" -msgstr "Høyere verdier gir bedre lydkvalitet, men støttes kanskje ikke av ditt lydkort " +#: gui/options.cpp:804 gui/options.cpp:805 +msgid "" +"Higher value specifies better sound quality but may be not supported by your " +"soundcard" +msgstr "" +"Høyere verdier gir bedre lydkvalitet, men støttes kanskje ikke av ditt " +"lydkort " #: gui/options.cpp:815 msgid "GM Device:" @@ -775,8 +682,7 @@ msgstr "Velger standard lydenhet for General MIDI-utdata" msgid "Don't use General MIDI music" msgstr "Ikke bruk General MIDI-musikk" -#: gui/options.cpp:837 -#: gui/options.cpp:899 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "Bruk første tilgjengelige enhet" @@ -784,9 +690,7 @@ msgstr "Bruk f msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:849 -#: gui/options.cpp:851 -#: gui/options.cpp:852 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "SoundFont støttes ikke av enkelte lydkort, FluidSynth og Timidity" @@ -819,10 +723,13 @@ msgstr "Velger standard lydenhet for Roland MT-32/LAPC1/CM32I/CM64-avspilling" msgid "True Roland MT-32 (disable GM emulation)" msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)" -#: gui/options.cpp:875 -#: gui/options.cpp:877 -msgid "Check if you want to use your real hardware Roland-compatible sound device connected to your computer" -msgstr "Velg hvis du har et ekte Roland-kompatible lydkort tilkoblet maskinen, og vil bruke dette." +#: gui/options.cpp:875 gui/options.cpp:877 +msgid "" +"Check if you want to use your real hardware Roland-compatible sound device " +"connected to your computer" +msgstr "" +"Velg hvis du har et ekte Roland-kompatible lydkort tilkoblet maskinen, og " +"vil bruke dette." #: gui/options.cpp:877 msgctxt "lowres" @@ -845,13 +752,11 @@ msgstr "Ikke bruk Roland MT-32-musikk" msgid "Text and Speech:" msgstr "Tekst og Tale:" -#: gui/options.cpp:920 -#: gui/options.cpp:930 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Tale" -#: gui/options.cpp:921 -#: gui/options.cpp:931 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Undertekster" @@ -907,9 +812,7 @@ msgstr "Demp alle" msgid "SFX volume:" msgstr "Lydeffektvolum:" -#: gui/options.cpp:962 -#: gui/options.cpp:964 -#: gui/options.cpp:965 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Volum for spesielle lydeffekter" @@ -936,9 +839,7 @@ msgctxt "lowres" msgid "Theme Path:" msgstr "Temasti:" -#: gui/options.cpp:1139 -#: gui/options.cpp:1141 -#: gui/options.cpp:1142 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Velger sti for ytterligere data brukt av alle spill eller ScummVM" @@ -1014,26 +915,26 @@ msgid "Select directory for plugins" msgstr "Velg mappe for plugins" #: gui/options.cpp:1450 -msgid "The theme you selected does not support your current language. If you want to use this theme you need to switch to another language first." -msgstr "Temaet du valgte støtter ikke det aktive språket. Hvis du vil bruke dette temaet, må du bytte til et annet språk først." +msgid "" +"The theme you selected does not support your current language. If you want " +"to use this theme you need to switch to another language first." +msgstr "" +"Temaet du valgte støtter ikke det aktive språket. Hvis du vil bruke dette " +"temaet, må du bytte til et annet språk først." -#: gui/saveload.cpp:59 -#: gui/saveload.cpp:257 +#: gui/saveload.cpp:59 gui/saveload.cpp:257 msgid "No date saved" msgstr "Ingen dato lagret" -#: gui/saveload.cpp:60 -#: gui/saveload.cpp:258 +#: gui/saveload.cpp:60 gui/saveload.cpp:258 msgid "No time saved" msgstr "Ingen tid lagret" -#: gui/saveload.cpp:61 -#: gui/saveload.cpp:259 +#: gui/saveload.cpp:61 gui/saveload.cpp:259 msgid "No playtime saved" msgstr "Ingen spilltid lagret" -#: gui/saveload.cpp:68 -#: gui/saveload.cpp:173 +#: gui/saveload.cpp:68 gui/saveload.cpp:173 msgid "Delete" msgstr "Slett" @@ -1053,8 +954,7 @@ msgstr "Tid: " msgid "Playtime: " msgstr "Spilltid: " -#: gui/saveload.cpp:305 -#: gui/saveload.cpp:372 +#: gui/saveload.cpp:305 gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Ikke navngitt spilltilstand" @@ -1087,10 +987,7 @@ msgstr "Antialiased Tegner (16bpp)" msgid "Antialiased (16bpp)" msgstr "Antialiased (16bpp)" -#: gui/widget.cpp:322 -#: gui/widget.cpp:324 -#: gui/widget.cpp:330 -#: gui/widget.cpp:332 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Tøm verdi" @@ -1103,15 +1000,13 @@ msgstr "Motoren st msgid "Menu" msgstr "Meny" -#: base/main.cpp:290 -#: backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Hopp over" -#: base/main.cpp:293 -#: backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pause" @@ -1199,7 +1094,8 @@ msgstr "Spillet i '%s' ser ut til #: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" -msgstr "Vennligst rapporter de følgende dataene til ScummVM-teamet sammen med navnet" +msgstr "" +"Vennligst rapporter de følgende dataene til ScummVM-teamet sammen med navnet" #: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" @@ -1229,29 +1125,23 @@ msgstr "~H~jelp" msgid "~A~bout" msgstr "~O~m" -#: engines/dialogs.cpp:104 -#: engines/dialogs.cpp:180 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "~T~ilbake til oppstarter" -#: engines/dialogs.cpp:106 -#: engines/dialogs.cpp:182 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~T~ilbake til oppstarter" -#: engines/dialogs.cpp:115 -#: engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Lagret spill:" -#: engines/dialogs.cpp:115 -#: engines/agi/saveload.cpp:803 -#: engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1261,22 +1151,30 @@ msgid "Save" msgstr "Lagre" #: engines/dialogs.cpp:144 -msgid "Sorry, this engine does not currently provide in-game help. Please consult the README for basic information, and for instructions on how to obtain further assistance." -msgstr "Beklager, men denne motoren støtter for øyeblikket ikke hjelp i spillet. Vennligst se i README-filen for grunnleggende informasjon, og for instruksjoner om hvordan du kan få ytterligere hjelp." +msgid "" +"Sorry, this engine does not currently provide in-game help. Please consult " +"the README for basic information, and for instructions on how to obtain " +"further assistance." +msgstr "" +"Beklager, men denne motoren støtter for øyeblikket ikke hjelp i spillet. " +"Vennligst se i README-filen for grunnleggende informasjon, og for " +"instruksjoner om hvordan du kan få ytterligere hjelp." #: engines/dialogs.cpp:228 #, c-format -msgid "Gamestate save failed (%s)! Please consult the README for basic information, and for instructions on how to obtain further assistance." -msgstr "Lagring av spilltilstand feilet (%s)! Vennligst konsulter README-filen for grunnleggende informasjon og instruksjon om hvordan du får ytterligere hjelp." +msgid "" +"Gamestate save failed (%s)! Please consult the README for basic information, " +"and for instructions on how to obtain further assistance." +msgstr "" +"Lagring av spilltilstand feilet (%s)! Vennligst konsulter README-filen for " +"grunnleggende informasjon og instruksjon om hvordan du får ytterligere hjelp." -#: engines/dialogs.cpp:301 -#: engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:302 -#: engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~A~vbryt" @@ -1326,36 +1224,40 @@ msgstr "" #: engines/engine.cpp:426 #, c-format -msgid "Gamestate load failed (%s)! Please consult the README for basic information, and for instructions on how to obtain further assistance." +msgid "" +"Gamestate load failed (%s)! Please consult the README for basic information, " +"and for instructions on how to obtain further assistance." msgstr "" #: engines/engine.cpp:439 -msgid "WARNING: The game you are about to start is not yet fully supported by ScummVM. As such, it is likely to be unstable, and any saves you make might not work in future versions of ScummVM." -msgstr "ADVARSEL: Spillet du prøver å starte er ikke fullstendig støttet av ScummVM. Derfor er det sannsynlig at det vil være ustabilt, og det er ikke sikkert at lagrede spill vil fortsette å fungere i fremtidige versjoner av ScummVM." +msgid "" +"WARNING: The game you are about to start is not yet fully supported by " +"ScummVM. As such, it is likely to be unstable, and any saves you make might " +"not work in future versions of ScummVM." +msgstr "" +"ADVARSEL: Spillet du prøver å starte er ikke fullstendig støttet av ScummVM. " +"Derfor er det sannsynlig at det vil være ustabilt, og det er ikke sikkert at " +"lagrede spill vil fortsette å fungere i fremtidige versjoner av ScummVM." #: engines/engine.cpp:442 msgid "Start anyway" msgstr "Start allikevel" -#: engines/agi/detection.cpp:145 -#: engines/dreamweb/detection.cpp:47 +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" msgstr "Bruk originale lagre/laste-skjermer" -#: engines/agi/detection.cpp:146 -#: engines/dreamweb/detection.cpp:48 +#: 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 "Bruk de originale lagre/laste-skjermene, istedenfor ScummVM-variantene" -#: engines/agi/saveload.cpp:816 -#: engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Gjennopprett spill:" -#: engines/agi/saveload.cpp:816 -#: engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Gjenopprett" @@ -1384,11 +1286,13 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Foretrekk digitale lydeffekter fremfor syntetiske" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "Bruk IMF/Yahama-FB-01 for MIDI-output" +msgid "Use IMF/Yamaha FB-01 for MIDI output" +msgstr "Bruk IMF/Yamaha-FB-01 for MIDI-output" #: engines/sci/detection.cpp:401 -msgid "Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI output" +msgid "" +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " +"output" msgstr "" #: engines/sci/detection.cpp:411 @@ -1404,7 +1308,8 @@ msgid "Use Windows cursors" msgstr "Bruk Windows-muspekere" #: engines/sci/detection.cpp:423 -msgid "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "Bruk Windows-muspekerene (mindre, og monokrome) isteden" #: engines/sci/detection.cpp:433 @@ -1412,8 +1317,10 @@ msgid "Use silver cursors" msgstr "Bruk sølvmuspekere" #: engines/sci/detection.cpp:434 -msgid "Use the alternate set of silver cursors, instead of the normal golden ones" -msgstr "Bruk det alternative settet med sølvmuspekere, istedenfor de normale gylne." +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" +"Bruk det alternative settet med sølvmuspekere, istedenfor de normale gylne." #: engines/scumm/dialogs.cpp:175 #, c-format @@ -1450,8 +1357,7 @@ msgstr "Er du sikker p msgid "Play" msgstr "Spill" -#: engines/scumm/dialogs.cpp:191 -#: engines/scumm/help.cpp:82 +#: engines/scumm/dialogs.cpp:191 engines/scumm/help.cpp:82 #: engines/scumm/help.cpp:84 #: backends/platform/symbian/src/SymbianActions.cpp:52 #: backends/platform/wince/CEActionsPocket.cpp:44 @@ -1578,16 +1484,11 @@ msgstr "Space" msgid "Pause game" msgstr "Pause spill" -#: engines/scumm/help.cpp:79 -#: engines/scumm/help.cpp:84 -#: engines/scumm/help.cpp:95 -#: engines/scumm/help.cpp:96 -#: engines/scumm/help.cpp:97 -#: engines/scumm/help.cpp:98 -#: engines/scumm/help.cpp:99 -#: engines/scumm/help.cpp:100 -#: engines/scumm/help.cpp:101 -#: engines/scumm/help.cpp:102 +#: engines/scumm/help.cpp:79 engines/scumm/help.cpp:84 +#: engines/scumm/help.cpp:95 engines/scumm/help.cpp:96 +#: engines/scumm/help.cpp:97 engines/scumm/help.cpp:98 +#: engines/scumm/help.cpp:99 engines/scumm/help.cpp:100 +#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102 msgid "Ctrl" msgstr "Ctrl" @@ -1595,12 +1496,9 @@ msgstr "Ctrl" msgid "Load game state 1-10" msgstr "Åpne spilltilstand 1-10" -#: engines/scumm/help.cpp:80 -#: engines/scumm/help.cpp:84 -#: engines/scumm/help.cpp:86 -#: engines/scumm/help.cpp:100 -#: engines/scumm/help.cpp:101 -#: engines/scumm/help.cpp:102 +#: engines/scumm/help.cpp:80 engines/scumm/help.cpp:84 +#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:100 +#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102 msgid "Alt" msgstr "Alt" @@ -1608,8 +1506,7 @@ msgstr "Alt" msgid "Save game state 1-10" msgstr "Lagre spilltilstand 1-10" -#: engines/scumm/help.cpp:86 -#: engines/scumm/help.cpp:89 +#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:89 msgid "Enter" msgstr "Enter" @@ -1701,30 +1598,24 @@ msgstr "Spinne drafts p msgid "Main game controls:" msgstr "Hovedkontroller for spill:" -#: engines/scumm/help.cpp:121 -#: engines/scumm/help.cpp:136 +#: engines/scumm/help.cpp:121 engines/scumm/help.cpp:136 #: engines/scumm/help.cpp:161 msgid "Push" msgstr "Dytt" -#: engines/scumm/help.cpp:122 -#: engines/scumm/help.cpp:137 +#: engines/scumm/help.cpp:122 engines/scumm/help.cpp:137 #: engines/scumm/help.cpp:162 msgid "Pull" msgstr "Dra" -#: engines/scumm/help.cpp:123 -#: engines/scumm/help.cpp:138 -#: engines/scumm/help.cpp:163 -#: engines/scumm/help.cpp:197 +#: engines/scumm/help.cpp:123 engines/scumm/help.cpp:138 +#: engines/scumm/help.cpp:163 engines/scumm/help.cpp:197 #: engines/scumm/help.cpp:207 msgid "Give" msgstr "Gi" -#: engines/scumm/help.cpp:124 -#: engines/scumm/help.cpp:139 -#: engines/scumm/help.cpp:164 -#: engines/scumm/help.cpp:190 +#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139 +#: engines/scumm/help.cpp:164 engines/scumm/help.cpp:190 #: engines/scumm/help.cpp:208 msgid "Open" msgstr "Åpne" @@ -1737,54 +1628,43 @@ msgstr "G msgid "Get" msgstr "Få" -#: engines/scumm/help.cpp:128 -#: engines/scumm/help.cpp:152 -#: engines/scumm/help.cpp:170 -#: engines/scumm/help.cpp:198 -#: engines/scumm/help.cpp:213 -#: engines/scumm/help.cpp:224 +#: engines/scumm/help.cpp:128 engines/scumm/help.cpp:152 +#: engines/scumm/help.cpp:170 engines/scumm/help.cpp:198 +#: engines/scumm/help.cpp:213 engines/scumm/help.cpp:224 #: engines/scumm/help.cpp:250 msgid "Use" msgstr "Bruk" -#: engines/scumm/help.cpp:129 -#: engines/scumm/help.cpp:141 +#: engines/scumm/help.cpp:129 engines/scumm/help.cpp:141 msgid "Read" msgstr "Les" -#: engines/scumm/help.cpp:130 -#: engines/scumm/help.cpp:147 +#: engines/scumm/help.cpp:130 engines/scumm/help.cpp:147 msgid "New kid" msgstr "Bytt unge" -#: engines/scumm/help.cpp:131 -#: engines/scumm/help.cpp:153 +#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:153 #: engines/scumm/help.cpp:171 msgid "Turn on" msgstr "Slå på" -#: engines/scumm/help.cpp:132 -#: engines/scumm/help.cpp:154 +#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:154 #: engines/scumm/help.cpp:172 msgid "Turn off" msgstr "Slå av" -#: engines/scumm/help.cpp:142 -#: engines/scumm/help.cpp:167 +#: engines/scumm/help.cpp:142 engines/scumm/help.cpp:167 #: engines/scumm/help.cpp:194 msgid "Walk to" msgstr "Gå til" -#: engines/scumm/help.cpp:143 -#: engines/scumm/help.cpp:168 -#: engines/scumm/help.cpp:195 -#: engines/scumm/help.cpp:210 +#: engines/scumm/help.cpp:143 engines/scumm/help.cpp:168 +#: engines/scumm/help.cpp:195 engines/scumm/help.cpp:210 #: engines/scumm/help.cpp:227 msgid "Pick up" msgstr "Plukk opp" -#: engines/scumm/help.cpp:144 -#: engines/scumm/help.cpp:169 +#: engines/scumm/help.cpp:144 engines/scumm/help.cpp:169 msgid "What is" msgstr "Hva er" @@ -1808,13 +1688,11 @@ msgstr "Fiks" msgid "Switch" msgstr "Bytt" -#: engines/scumm/help.cpp:166 -#: engines/scumm/help.cpp:228 +#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:228 msgid "Look" msgstr "Kikk" -#: engines/scumm/help.cpp:173 -#: engines/scumm/help.cpp:223 +#: engines/scumm/help.cpp:173 engines/scumm/help.cpp:223 msgid "Talk" msgstr "Snakk" @@ -1859,24 +1737,20 @@ msgstr "spill H p msgid "play C major on distaff" msgstr "spill C dur på distaffen" -#: engines/scumm/help.cpp:192 -#: engines/scumm/help.cpp:214 +#: engines/scumm/help.cpp:192 engines/scumm/help.cpp:214 msgid "puSh" msgstr "Dytt" -#: engines/scumm/help.cpp:193 -#: engines/scumm/help.cpp:215 +#: engines/scumm/help.cpp:193 engines/scumm/help.cpp:215 msgid "pull (Yank)" msgstr "Dra" -#: engines/scumm/help.cpp:196 -#: engines/scumm/help.cpp:212 +#: engines/scumm/help.cpp:196 engines/scumm/help.cpp:212 #: engines/scumm/help.cpp:248 msgid "Talk to" msgstr "Snakk til" -#: engines/scumm/help.cpp:199 -#: engines/scumm/help.cpp:211 +#: engines/scumm/help.cpp:199 engines/scumm/help.cpp:211 msgid "Look at" msgstr "Se på" @@ -1908,10 +1782,8 @@ msgstr "Merk neste dialog" msgid "Walk" msgstr "Gå" -#: engines/scumm/help.cpp:225 -#: engines/scumm/help.cpp:234 -#: engines/scumm/help.cpp:241 -#: engines/scumm/help.cpp:249 +#: engines/scumm/help.cpp:225 engines/scumm/help.cpp:234 +#: engines/scumm/help.cpp:241 engines/scumm/help.cpp:249 msgid "Inventory" msgstr "Inventar" @@ -1939,8 +1811,7 @@ msgstr "Sl msgid "Kick" msgstr "Spark" -#: engines/scumm/help.cpp:239 -#: engines/scumm/help.cpp:247 +#: engines/scumm/help.cpp:239 engines/scumm/help.cpp:247 msgid "Examine" msgstr "Undersøk" @@ -1961,38 +1832,31 @@ msgstr "Lagre / msgid "Other game controls:" msgstr "Andre spillkontroller" -#: engines/scumm/help.cpp:257 -#: engines/scumm/help.cpp:267 +#: engines/scumm/help.cpp:257 engines/scumm/help.cpp:267 msgid "Inventory:" msgstr "Inventar:" -#: engines/scumm/help.cpp:258 -#: engines/scumm/help.cpp:274 +#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:274 msgid "Scroll list up" msgstr "Bla liste opp" -#: engines/scumm/help.cpp:259 -#: engines/scumm/help.cpp:275 +#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275 msgid "Scroll list down" msgstr "Bla liste ned" -#: engines/scumm/help.cpp:260 -#: engines/scumm/help.cpp:268 +#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:268 msgid "Upper left item" msgstr "Øvre venstre gjenstand" -#: engines/scumm/help.cpp:261 -#: engines/scumm/help.cpp:270 +#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:270 msgid "Lower left item" msgstr "Nedre venstre gjenstand" -#: engines/scumm/help.cpp:262 -#: engines/scumm/help.cpp:271 +#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271 msgid "Upper right item" msgstr "Øvre høyre gjenstand" -#: engines/scumm/help.cpp:263 -#: engines/scumm/help.cpp:273 +#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:273 msgid "Lower right item" msgstr "Nedre høyre gjenstand" @@ -2004,8 +1868,7 @@ msgstr "Midtre venstre gjenstand" msgid "Middle right item" msgstr "Midtre høyre gjenstand" -#: engines/scumm/help.cpp:279 -#: engines/scumm/help.cpp:284 +#: engines/scumm/help.cpp:279 engines/scumm/help.cpp:284 msgid "Switching characters:" msgstr "Bytte av karakterer:" @@ -2021,8 +1884,7 @@ msgstr "Tredje unge" msgid "Fighting controls (numpad):" msgstr "Kampkontroller (talltastatur)" -#: engines/scumm/help.cpp:295 -#: engines/scumm/help.cpp:296 +#: engines/scumm/help.cpp:295 engines/scumm/help.cpp:296 #: engines/scumm/help.cpp:297 msgid "Step back" msgstr "Bakoversteg" @@ -2114,8 +1976,7 @@ msgid "" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2278 -#: engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2126,8 +1987,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 -#: engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2138,8 +1998,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 -#: engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2151,12 +2010,17 @@ msgstr "" "%s" #: engines/scumm/scumm.cpp:2512 -msgid "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' directory inside the Tentacle game directory." -msgstr "Vanligvis, ville Maniac Mansion ha startet nå. Men ScummVM støtter ikke det ennå. Så, for å spille Maniac Mansion, gå til 'Legg til spill' i ScummVM-hovedmenyen og velg 'Maniac'-undermappa i Tentacle-mappa." +msgid "" +"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " +"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " +"directory inside the Tentacle game directory." +msgstr "" +"Vanligvis, ville Maniac Mansion ha startet nå. Men ScummVM støtter ikke det " +"ennå. Så, for å spille Maniac Mansion, gå til 'Legg til spill' i ScummVM-" +"hovedmenyen og velg 'Maniac'-undermappa i Tentacle-mappa." #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 -#: engines/mohawk/dialogs.cpp:171 +#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171 msgid "~Z~ip Mode Activated" msgstr "~Z~ipmodus aktivert" @@ -2186,14 +2050,12 @@ msgstr "~V~anneffekt aktivert" msgid "Cutscene file '%s' not found!" msgstr "" -#: engines/gob/inter_playtoons.cpp:256 -#: engines/gob/inter_v2.cpp:1287 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "Klarte ikke åpne spilltilstand fra fil." -#: engines/gob/inter_v2.cpp:1357 -#: engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "Klarte ikke lagre spilltilstand fra fil." @@ -2313,12 +2175,13 @@ msgid "Choose Spell" msgstr "Velg" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "Du ser ut til å bruke en General MIDI-enhet,\n" "men spillet ditt støtter bare Roland MT32-MIDI.\n" @@ -2326,13 +2189,11 @@ msgstr "" "General MIDI-instrumentene. Allikevel, kan det\n" "skje at enkelte spor ikke vil spilles riktig." -#: engines/queen/queen.cpp:59 -#: engines/sky/detection.cpp:44 +#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" msgstr "Diskett-intro" -#: engines/queen/queen.cpp:60 -#: engines/sky/detection.cpp:45 +#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" msgstr "Bruk diskettversjonens intro (Kun for CD-versjon)" @@ -2355,33 +2216,36 @@ msgstr "" msgid "PSX stream cutscene '%s' cannot be played in paletted mode" msgstr "" -#: engines/sword1/animation.cpp:560 -#: engines/sword2/animation.cpp:455 +#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 msgid "DXA cutscenes found but ScummVM has been built without zlib support" msgstr "" -#: engines/sword1/animation.cpp:570 -#: engines/sword2/animation.cpp:465 +#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465 msgid "MPEG2 cutscenes are no longer supported" msgstr "" -#: engines/sword1/animation.cpp:576 -#: engines/sword2/animation.cpp:473 +#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473 #, c-format msgid "Cutscene '%s' not found" msgstr "" #: engines/sword1/control.cpp:863 msgid "" -"ScummVM found that you have old savefiles for Broken Sword 1 that should be converted.\n" -"The old save game format is no longer supported, so you will not be able to load your games if you don't convert them.\n" +"ScummVM found that you have old savefiles for Broken Sword 1 that should be " +"converted.\n" +"The old save game format is no longer supported, so you will not be able to " +"load your games if you don't convert them.\n" "\n" -"Press OK to convert them now, otherwise you will be asked again the next time you start the game.\n" +"Press OK to convert them now, otherwise you will be asked again the next " +"time you start the game.\n" msgstr "" -"ScummVM oppdaget at du har gamle lagrede spill for Broken Sword 1 som bør konverteres.\n" -"Det gamle formatet for lagrede spill støttes ikke lengre, så du vil ikke være i stand til å laste de lagrede spillene,\n" +"ScummVM oppdaget at du har gamle lagrede spill for Broken Sword 1 som bør " +"konverteres.\n" +"Det gamle formatet for lagrede spill støttes ikke lengre, så du vil ikke " +"være i stand til å laste de lagrede spillene,\n" "med mindre du konverterer dem.\n" -"Trykk OK for å konvertere dem nå, ellers vil du bli spurt igjen neste gang du starter spillet." +"Trykk OK for å konvertere dem nå, ellers vil du bli spurt igjen neste gang " +"du starter spillet." #: engines/sword1/control.cpp:1232 #, c-format @@ -2403,7 +2267,8 @@ msgid "This is the end of the Broken Sword 1 Demo" msgstr "Dette er slutten på Broken Sword 1-demoen" #: engines/sword2/animation.cpp:435 -msgid "PSX cutscenes found but ScummVM has been built without RGB color support" +msgid "" +"PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" #: engines/sword2/sword2.cpp:79 @@ -2431,15 +2296,20 @@ msgstr "Lagrer spill..." #: engines/parallaction/saveload.cpp:272 msgid "" -"ScummVM found that you have old savefiles for Nippon Safes that should be renamed.\n" -"The old names are no longer supported, so you will not be able to load your games if you don't convert them.\n" +"ScummVM found that you have old savefiles for Nippon Safes that should be " +"renamed.\n" +"The old names are no longer supported, so you will not be able to load your " +"games if you don't convert them.\n" "\n" "Press OK to convert them now, otherwise you will be asked next time.\n" msgstr "" -"ScummVM oppdaget at du har gamle lagrede spill for Nippon Safes som bør omdøpes.\n" -"De gamle navnene støttes ikke lengre, så du vil ikke være i stand til å laste de lagrede spillene,\n" +"ScummVM oppdaget at du har gamle lagrede spill for Nippon Safes som bør " +"omdøpes.\n" +"De gamle navnene støttes ikke lengre, så du vil ikke være i stand til å " +"laste de lagrede spillene,\n" "med mindre du konverterer dem.\n" -"Trykk OK for å konvertere dem nå, ellers vil du bli spurt igjen neste gang du starter spillet." +"Trykk OK for å konvertere dem nå, ellers vil du bli spurt igjen neste gang " +"du starter spillet." #: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." @@ -2447,11 +2317,13 @@ msgstr "ScummVM konverterte alle de lagrede spillene dine uten problemer." #: engines/parallaction/saveload.cpp:321 msgid "" -"ScummVM printed some warnings in your console window and can't guarantee all your files have been converted.\n" +"ScummVM printed some warnings in your console window and can't guarantee all " +"your files have been converted.\n" "\n" "Please report to the team." msgstr "" -"ScummVM skrev ut noen advarsler i konsollvinduet ditt og kan ikke garantere at alle filene dine har blitt konvertert.\n" +"ScummVM skrev ut noen advarsler i konsollvinduet ditt og kan ikke garantere " +"at alle filene dine har blitt konvertert.\n" "\n" "Vennligst rapporter dette til teamet." @@ -2465,30 +2337,44 @@ msgstr "DOSBox OPL emulator" #: audio/mididrv.cpp:209 #, c-format -msgid "The selected audio device '%s' was not found (e.g. might be turned off or disconnected)." -msgstr "Den valgte lydenheten '%s' ble ikke funnet (den kan f.eks. være avslått eller frakoblet)." +msgid "" +"The selected audio device '%s' was not found (e.g. might be turned off or " +"disconnected)." +msgstr "" +"Den valgte lydenheten '%s' ble ikke funnet (den kan f.eks. være avslått " +"eller frakoblet)." -#: audio/mididrv.cpp:209 -#: audio/mididrv.cpp:221 -#: audio/mididrv.cpp:257 +#: audio/mididrv.cpp:209 audio/mididrv.cpp:221 audio/mididrv.cpp:257 #: audio/mididrv.cpp:272 msgid "Attempting to fall back to the next available device..." msgstr "Forsøker å falle tilbake på den neste tilgjengelige enheten..." #: audio/mididrv.cpp:221 #, c-format -msgid "The selected audio device '%s' cannot be used. See log file for more information." -msgstr "Den valgte lydenheten '%s' kan ikke brukes. Se logg-filen for mer informasjon." +msgid "" +"The selected audio device '%s' cannot be used. See log file for more " +"information." +msgstr "" +"Den valgte lydenheten '%s' kan ikke brukes. Se logg-filen for mer " +"informasjon." #: audio/mididrv.cpp:257 #, c-format -msgid "The preferred audio device '%s' was not found (e.g. might be turned off or disconnected)." -msgstr "Den foretrukne lydenheten '%s' ble ikke funnet (den kan f.eks. være avslått eller frakoblet)." +msgid "" +"The preferred audio device '%s' was not found (e.g. might be turned off or " +"disconnected)." +msgstr "" +"Den foretrukne lydenheten '%s' ble ikke funnet (den kan f.eks. være avslått " +"eller frakoblet)." #: audio/mididrv.cpp:272 #, c-format -msgid "The preferred audio device '%s' cannot be used. See log file for more information." -msgstr "Den foretrukne lydenheten '%s' kan ikke brukes. Se i logg-filen for mer informasjon." +msgid "" +"The preferred audio device '%s' cannot be used. See log file for more " +"information." +msgstr "" +"Den foretrukne lydenheten '%s' kan ikke brukes. Se i logg-filen for mer " +"informasjon." #: audio/null.h:43 msgid "No music" @@ -2843,13 +2729,11 @@ msgstr "GC Pad-aksellerasjon:" msgid "DVD" msgstr "DVD" -#: backends/platform/wii/options.cpp:89 -#: backends/platform/wii/options.cpp:101 +#: backends/platform/wii/options.cpp:89 backends/platform/wii/options.cpp:101 msgid "Status:" msgstr "Status:" -#: backends/platform/wii/options.cpp:90 -#: backends/platform/wii/options.cpp:102 +#: backends/platform/wii/options.cpp:90 backends/platform/wii/options.cpp:102 msgid "Unknown" msgstr "Ukjent" @@ -3027,7 +2911,8 @@ msgstr "Koble handling til h #: backends/platform/wince/wince-sdl.cpp:519 msgid "You must map a key to the 'Right Click' action to play this game" -msgstr "Du må koble en tast til handlingen 'Høyreklikk' for å spille dette spillet" +msgstr "" +"Du må koble en tast til handlingen 'Høyreklikk' for å spille dette spillet" #: backends/platform/wince/wince-sdl.cpp:528 msgid "Map hide toolbar action" @@ -3035,7 +2920,9 @@ msgstr "Koble skjul-verkt #: backends/platform/wince/wince-sdl.cpp:532 msgid "You must map a key to the 'Hide toolbar' action to play this game" -msgstr "Du må koble en tast til 'Skjul verktøylinje'-handlingen for å spille dette spillet" +msgstr "" +"Du må koble en tast til 'Skjul verktøylinje'-handlingen for å spille dette " +"spillet" #: backends/platform/wince/wince-sdl.cpp:541 msgid "Map Zoom Up action (optional)" @@ -3046,8 +2933,11 @@ msgid "Map Zoom Down action (optional)" msgstr "Koble handlingen Zoom Ned (valgfritt)" #: backends/platform/wince/wince-sdl.cpp:552 -msgid "Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory" -msgstr "Ikke glem å koble en tast til handlingen 'Skjul verktøylinje' for å se hele inventaret" +msgid "" +"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory" +msgstr "" +"Ikke glem å koble en tast til handlingen 'Skjul verktøylinje' for å se hele " +"inventaret" #: backends/events/default/default-events.cpp:191 msgid "Do you really want to return to the Launcher?" @@ -3136,19 +3026,19 @@ msgstr "Klikking deaktivert" #~ msgid "Hercules Amber" #~ msgstr "Hercules Oransje" -#~ msgctxt "lowres" +#~ msgctxt "lowres" #~ msgid "Hercules Green" #~ msgstr "Hercules Grønn" -#~ msgctxt "lowres" +#~ msgctxt "lowres" #~ msgid "Hercules Amber" #~ msgstr "Hercules Oransje" #~ msgid "Save game failed!" #~ msgstr "Lagret spill:" -#~ msgctxt "lowres" +#~ msgctxt "lowres" #~ msgid "Add Game..." #~ msgstr "Legg til spill..." diff --git a/po/nn_NO.po b/po/nn_NO.po index fe0c1d1106..a88637b7c0 100644 --- a/po/nn_NO.po +++ b/po/nn_NO.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2011-04-25 23:07+0100\n" "Last-Translator: Einar Johan T. Sømåen \n" "Language-Team: somaen \n" @@ -1135,13 +1135,13 @@ msgid "~R~eturn to Launcher" msgstr "~T~ilbake til oppstarter" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Lagra spel:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1242,11 +1242,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Gjenopprett spel:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Gjenopprett" @@ -1276,12 +1276,12 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" +msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" @@ -2178,8 +2178,8 @@ msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 diff --git a/po/pl_PL.po b/po/pl_PL.po index da089c5026..5d3655f8b6 100644 --- a/po/pl_PL.po +++ b/po/pl_PL.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2011-10-24 21:14+0100\n" "Last-Translator: Micha³ Zi±bkowski \n" "Language-Team: Grajpopolsku.pl \n" @@ -1134,13 +1134,13 @@ msgid "~R~eturn to Launcher" msgstr "~P~owrót do launchera" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Zapis:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1257,11 +1257,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Wznów grê:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Wznów" @@ -1293,12 +1293,12 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" +msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" @@ -2192,12 +2192,13 @@ msgid "Choose Spell" msgstr "Wybierz" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "Wygl±da na to, ¿e u¿ywasz urz±dzenia General MIDI, ale gra obs³uguje tylko " "MIDI Roland MT32.\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index cb0c50a7c8..ac60a814e2 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2011-10-21 21:30-0300\n" "Last-Translator: Saulo Benigno \n" "Language-Team: ScummBR (www.scummbr.com) \n" @@ -1146,13 +1146,13 @@ msgid "~R~eturn to Launcher" msgstr "~V~oltar ao menu" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Salvar jogo:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1273,11 +1273,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Restaurar jogo:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Restaurar" @@ -1309,12 +1309,12 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" +msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" @@ -2216,12 +2216,13 @@ msgid "Choose Spell" msgstr "Escolher" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "Você parece estar usando um dispositivo General MIDI,\n" "mas, o jogo só suporta Roland MT32 MIDI.\n" diff --git a/po/ru_RU.po b/po/ru_RU.po index 5d5f8dabf4..ec66de6f4f 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2012-02-16 13:09+0200+0200\n" "Last-Translator: Eugene Sandulenko \n" "Language-Team: Russian\n" @@ -1138,13 +1138,13 @@ msgid "~R~eturn to Launcher" msgstr "~²~ ÓÛÐÒÝÞÕ ÜÕÝî" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "ÁÞåàÐÝØâì ØÓàã:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1266,11 +1266,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "²ÞááâÐÝÞÒØâì ØÓàã:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "²ÞááâÒÝÞÒØâì" @@ -1304,12 +1304,12 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" +msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" @@ -2196,12 +2196,13 @@ msgid "Choose Spell" msgstr "²ëÑàÐâì ×ÐÚÛØÝÐÝØÕ" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "ºÐÖÕâáï, Òë ßëâÐÕâÕáì ØáßÞÛì×ÞÒÐâì ãáâàÞÙáâÒÞ\n" "General MIDI, ÝÞ íâÐ ØÓàÐ ßÞÔÔÕàÖØÒÐÕâ âÞÛìÚÞ\n" diff --git a/po/scummvm.pot b/po/scummvm.pot index 86067a3083..8a68e4372b 100644 --- a/po/scummvm.pot +++ b/po/scummvm.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1115,13 +1115,13 @@ msgid "~R~eturn to Launcher" msgstr "" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1220,11 +1220,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "" @@ -1253,12 +1253,12 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" +msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" @@ -2132,8 +2132,8 @@ msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 diff --git a/po/se_SE.po b/po/se_SE.po index fe896842a2..880b198895 100644 --- a/po/se_SE.po +++ b/po/se_SE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2012-06-28 15:47+0100\n" "Last-Translator: Hampus Flink \n" "Language-Team: \n" @@ -1137,13 +1137,13 @@ msgid "~R~eturn to Launcher" msgstr "Åte~r~vänd till launcher" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Spara spelet:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1260,11 +1260,11 @@ msgstr "Anv msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Använder originalskärmarna för spara/ladda istället för ScummVM:s" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Återställ spel:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Återställ" @@ -1293,12 +1293,12 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "Föredra digitala ljudeffekter istället för syntetiserade" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "Använd IMF/Yahama FB-01 för MIDI-uppspelning" +msgid "Use IMF/Yamaha FB-01 for MIDI output" +msgstr "Använd IMF/Yamaha FB-01 för MIDI-uppspelning" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" "Använd ett IMB Music Feature-kort eller en Yamaha FB-01 FM synthmodul för " @@ -2186,12 +2186,13 @@ msgid "Choose Spell" msgstr "Välj trollformel" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "Du verkar använda en General MIDI enhet\n" "men ditt spel stöder endast Roland MT32 MIDI.\n" diff --git a/po/uk_UA.po b/po/uk_UA.po index cbcf7f670c..7f484fdc06 100644 --- a/po/uk_UA.po +++ b/po/uk_UA.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-06-24 18:06+0100\n" +"POT-Creation-Date: 2012-07-08 12:25+0100\n" "PO-Revision-Date: 2012-02-16 13:09+0200\n" "Last-Translator: Eugene Sandulenko\n" "Language-Team: Ukrainian\n" @@ -1136,13 +1136,13 @@ msgid "~R~eturn to Launcher" msgstr "~¿~ÞÒÕà.Ò ÓÞÛÞÒÝÕ ÜÕÝî" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:728 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "·ÑÕàÕÓâØ Óàã: " #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:728 +#: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1263,11 +1263,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "²öÔÝÞÒØâØ Óàã:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:824 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "²öÔÝÞÒØâØ" @@ -1299,12 +1299,12 @@ msgid "Prefer digital sound effects instead of synthesized ones" msgstr "" #: engines/sci/detection.cpp:400 -msgid "Use IMF/Yahama FB-01 for MIDI output" +msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "" #: engines/sci/detection.cpp:401 msgid "" -"Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" @@ -2191,12 +2191,13 @@ msgid "Choose Spell" msgstr "²ØÑàÐâØ ×ÐÚÛïââï" #: engines/kyra/sound_midi.cpp:475 +#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" "We try to map the Roland MT32 instruments to\n" -"General MIDI ones. After all it might happen\n" -"that a few tracks will not be correctly played." +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." msgstr "" "·ÔÐôâìáï, éÞ ²Ø ÒØÚÞàØáâÞÒãôâÕ ßàØáâàöÙ General\n" "MIDI, ÐÛÕ ²ÐèÐ ÓàÐ ßöÔâàØÜãô âöÛìÚØ Roland MT32\n" -- cgit v1.2.3 From 2675311f2512e44dd4c37ba9ac9d449b9f4c2439 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 8 Jul 2012 12:39:16 +0100 Subject: I18N: Regenerate translations data file --- gui/themes/translations.dat | Bin 337762 -> 334603 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 2307ea20ae..df99750170 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 4c43d6d85dc70e1b9b82629f1af1e9a37a136013 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jul 2012 12:21:26 +0300 Subject: SCI: Add a hack in kGetAngleWorker to fix bug #3540976 kGetAngle(Worker) has been implemented based on behavior observed with a test program created with SCI Studio. However, the return values have subtle differences from the original, which uses atan(). This temporary hack will do for now till the implementation of kGetAngle is done again. A simpler atan2-based implementation has also been added for future reference --- engines/sci/engine/kmath.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp index 7570856dff..cbfe00d3ca 100644 --- a/engines/sci/engine/kmath.cpp +++ b/engines/sci/engine/kmath.cpp @@ -78,6 +78,25 @@ reg_t kSqrt(EngineState *s, int argc, reg_t *argv) { } uint16 kGetAngleWorker(int16 x1, int16 y1, int16 x2, int16 y2) { + // TODO: This has been implemented based on behavior observed with a test + // program created with SCI Studio. However, the return values have subtle + // differences from the original, which uses atan(). + // The differences in the return values are the cause of bug #3540976 + // and perhaps bug #3037267 as well. + + // HACK: Return the expected value for Longbow, scene 150 (bug #3540976). + // This is a temporary solution, till the function returns the expected + // results. + if (g_sci->getGameId() == GID_LONGBOW && g_sci->getEngineState()->currentRoomNumber() == 150) { + if (x1 == 207 && y1 == 88 && x2 == 107 && y2 == 184) + return 226; + } + +#if 0 + // A simpler atan2-based implementation + return (360 - atan2((double)(x1 - x2), (double)(y1 - y2)) * 57.2958) % 360; +#endif + int16 xRel = x2 - x1; int16 yRel = y1 - y2; // y-axis is mirrored. int16 angle; -- cgit v1.2.3 From 2ef3f5e6957ce072f9bb5df0fe3f65da578b836c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jul 2012 15:58:50 +0300 Subject: SCI: Update the virtual file selected in the QFG4 character import screen This makes the character import screen in QFG4 functional, as the virtual file index was never updated --- engines/sci/engine/kgraphics.cpp | 6 ++++-- engines/sci/engine/klists.cpp | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index ec8e0dbf1b..5b483eb4a2 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -950,8 +950,8 @@ reg_t kDrawControl(EngineState *s, int argc, reg_t *argv) { } } if (objName == "savedHeros") { - // Import of QfG character files dialog is shown - // display additional popup information before letting user use it + // Import of QfG character files dialog is shown. + // display additional popup information before letting user use it. reg_t changeDirButton = s->_segMan->findObjectByName("changeDirItem"); if (!changeDirButton.isNull()) { // check if checkDirButton is still enabled, in that case we are called the first time during that room @@ -964,6 +964,8 @@ reg_t kDrawControl(EngineState *s, int argc, reg_t *argv) { "for Quest for Glory 2. Example: 'qfg2-thief.sav'."); } } + + // For the SCI32 version of this, check kListAt(). s->_chosenQfGImportItem = readSelectorValue(s->_segMan, controlObject, SELECTOR(mark)); } diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp index 15d18eb4bb..342fa95eda 100644 --- a/engines/sci/engine/klists.cpp +++ b/engines/sci/engine/klists.cpp @@ -506,6 +506,11 @@ reg_t kListAt(EngineState *s, int argc, reg_t *argv) { curIndex++; } + // Update the virtual file selected in the character import screen of QFG4. + // For the SCI0-SCI1.1 version of this, check kDrawControl(). + if (g_sci->inQfGImportRoom() && !strcmp(s->_segMan->getObjectName(curObject), "SelectorDText")) + s->_chosenQfGImportItem = listIndex; + return curObject; } -- cgit v1.2.3 From 10b3fdf2478dce3712de6213678f54335d5c46a0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jul 2012 16:10:40 +0300 Subject: SCI: Show information for correct file naming in the QFG4 import room This information is shown in previous QFG versions, but it had to be placed in a SCI32 graphics function in order to be shown in QFG4 too --- engines/sci/engine/kgraphics.cpp | 3 ++- engines/sci/graphics/frameout.cpp | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 5b483eb4a2..6d938b6d22 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -951,7 +951,8 @@ reg_t kDrawControl(EngineState *s, int argc, reg_t *argv) { } if (objName == "savedHeros") { // Import of QfG character files dialog is shown. - // display additional popup information before letting user use it. + // Display additional popup information before letting user use it. + // For the SCI32 version of this, check kernelAddPlane(). reg_t changeDirButton = s->_segMan->findObjectByName("changeDirItem"); if (!changeDirButton.isNull()) { // check if checkDirButton is still enabled, in that case we are called the first time during that room diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index b13c7f4dce..cb56e24de9 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -117,6 +117,8 @@ void GfxFrameout::showCurrentScrollText() { } } +extern void showScummVMDialog(const Common::String &message); + void GfxFrameout::kernelAddPlane(reg_t object) { PlaneEntry newPlane; @@ -142,6 +144,19 @@ void GfxFrameout::kernelAddPlane(reg_t object) { _coordAdjuster->setScriptsResolution(tmpRunningWidth, tmpRunningHeight); } + // Import of QfG character files dialog is shown in QFG4. + // Display additional popup information before letting user use it. + // For the SCI0-SCI1.1 version of this, check kDrawControl(). + if (g_sci->inQfGImportRoom() && !strcmp(_segMan->getObjectName(object), "DSPlane")) { + showScummVMDialog("Characters saved inside ScummVM are shown " + "automatically. Character files saved in the original " + "interpreter need to be put inside ScummVM's saved games " + "directory and a prefix needs to be added depending on which " + "game it was saved in: 'qfg1-' for Quest for Glory 1, 'qfg2-' " + "for Quest for Glory 2, 'qfg3-' for Quest for Glory 3. " + "Example: 'qfg2-thief.sav'."); + } + newPlane.object = object; newPlane.priority = readSelectorValue(_segMan, object, SELECTOR(priority)); newPlane.lastPriority = 0xFFFF; // hidden -- cgit v1.2.3 From 3b69816a7d02f5c6ef03efd48062abd532cced18 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jul 2012 16:15:07 +0300 Subject: SCI: Add another English floppy version of KQ5 (bug #3536863) According to this bug report, there exists another English version with the same file checksums as the vanilla English version, patched to Polish. We need a better way of distinguishing the two versions. Until we do, this is a duplicate entry of the Polish floppy version --- engines/sci/detection_tables.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 07b4733cfd..8a6184c7e4 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -1238,6 +1238,26 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // King's Quest 5 - English DOS Floppy + // VERSION file reports "0.000.051" + // Supplied by misterhands in bug report #3536863. + // FIXME: According to bug #3536863, there exists another English version + // with the same file checksums as the vanilla English version, patched to + // Polish. We need a better way of distinguishing the two versions. Until + // we do, this is a duplicate entry of the Polish version below. + {"kq5", "", { + {"resource.map", 0, "70010c20138541f89013bb5e1b30f16a", 7998}, + {"resource.000", 0, "a591bd4b879fc832b8095c0b3befe9e2", 276398}, + {"resource.001", 0, "c0f48d4a7ebeaa6aa074fc98d77423e9", 1018560}, + {"resource.002", 0, "7f188a95acdb60bbe32a8379ba299393", 1307048}, + {"resource.003", 0, "0860785af59518b94d54718dddcd6907", 1348500}, + {"resource.004", 0, "c4745dd1e261c22daa6477961d08bf6c", 1239887}, + {"resource.005", 0, "6556ff8e7c4d1acf6a78aea154daa76c", 1287869}, + {"resource.006", 0, "da82e4beb744731d0a151f1d4922fafa", 1170456}, + {"resource.007", 0, "431def14ca29cdb5e6a5e84d3f38f679", 1240176}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformPC, 0, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // King's Quest 5 - English DOS Floppy (supplied by omer_mor in bug report #3036996) // VERSION file reports "0.000.051" {"kq5", "", { @@ -1356,6 +1376,10 @@ static const struct ADGameDescription SciGameDescriptions[] = { // King's Quest 5 - Polish DOS Floppy (supplied by jacek909 in bug report #2725722, includes english language?!) // SCI interpreter version 1.000.060 + // FIXME: According to bug #3536863, this is actually a patched English version. + // The vanilla English version has the same MD5 checksums. + // We need a better way of detecting this. Until we do, a duplicate English + // entry has been placed above. {"kq5", "", { {"resource.map", 0, "70010c20138541f89013bb5e1b30f16a", 7998}, {"resource.000", 0, "a591bd4b879fc832b8095c0b3befe9e2", 276398}, -- cgit v1.2.3 From ff1828fc7117d1dfcb5ea3dd04baf1ddc9045b3b Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Sun, 8 Jul 2012 20:24:33 +0200 Subject: MOHAWK: Play anims for LiveText items *after* the speech. Another attempt at fixing bug #3541294. --- engines/mohawk/livingbooks.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index f5e5e7d7b4..7f7df66e53 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -3460,6 +3460,12 @@ void LBLiveTextItem::update() { uint16 soundId = _words[_currentWord].soundId; if (soundId && !_vm->_sound->isPlaying(soundId)) { paletteUpdate(_currentWord, false); + + // TODO: check this in RE + LBItem *item = _vm->getItemById(_words[_currentWord].itemId); + if (item) + item->togglePlaying(false); + _currentWord = 0xFFFF; } } @@ -3530,11 +3536,6 @@ void LBLiveTextItem::handleMouseDown(Common::Point pos) { _currentWord = i; _vm->playSound(this, soundId); paletteUpdate(_currentWord, true); - - // TODO: check this in RE - LBItem *item = _vm->getItemById(_words[i].itemId); - if (item) - item->togglePlaying(false); return; } } -- cgit v1.2.3 From bb434d4acddcef722465b19062f8ba5b8da86b63 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Sun, 8 Jul 2012 20:53:47 +0200 Subject: NEWS: V1 composer games aren't supported yet. --- NEWS | 3 --- 1 file changed, 3 deletions(-) diff --git a/NEWS b/NEWS index e4ea5f3f49..443306fbfd 100644 --- a/NEWS +++ b/NEWS @@ -9,10 +9,7 @@ For a more comprehensive changelog of the latest experimental code, see: - Added support for Dreamweb. - Added support for Geisha. - Added support for Gregory and the Hot Air Balloon. - - Added support for Magic Tales: Baba Yaga and the Magic Geese. - - Added support for Magic Tales: Imo and the King. - Added support for Magic Tales: Liam Finds a Story. - - Added support for Magic Tales: The Little Samurai. - Added support for Once Upon A Time: Little Red Riding Hood - Added support for Sleeping Cub's Test of Courage. - Added support for Soltys. -- cgit v1.2.3 From 50dc5009c85f3713d6917d5aba1cbb1428da1c30 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jul 2012 21:58:47 +0300 Subject: SCI: Ignore another leftover script from KQ7 in the debugger --- engines/sci/console.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 40a6fd1415..564bbbbd79 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -2987,8 +2987,9 @@ void Console::printKernelCallsFound(int kernelFuncNum, bool showFoundScripts) { // Ignore specific leftover scripts, which require other non-existing scripts if ((_engine->getGameId() == GID_HOYLE3 && itr->getNumber() == 995) || (_engine->getGameId() == GID_KQ5 && itr->getNumber() == 980) || - (_engine->getGameId() == GID_SLATER && itr->getNumber() == 947) || - (_engine->getGameId() == GID_MOTHERGOOSE256 && itr->getNumber() == 980)) { + (_engine->getGameId() == GID_KQ7 && itr->getNumber() == 111) || + (_engine->getGameId() == GID_MOTHERGOOSE256 && itr->getNumber() == 980) || + (_engine->getGameId() == GID_SLATER && itr->getNumber() == 947)) { continue; } -- cgit v1.2.3 From 262c7a1fb73cb89a7c2db562374bdc0ce6f85d18 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jul 2012 21:59:54 +0300 Subject: SCI: Fix a typo and add some comments to kGetAngleWorker() --- engines/sci/engine/kmath.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp index cbfe00d3ca..05c8845288 100644 --- a/engines/sci/engine/kmath.cpp +++ b/engines/sci/engine/kmath.cpp @@ -77,10 +77,16 @@ reg_t kSqrt(EngineState *s, int argc, reg_t *argv) { return make_reg(0, (int16) sqrt((float) ABS(argv[0].toSint16()))); } +/** + * Returns the angle (in degrees) between the two points determined by (x1, y1) + * and (x2, y2). The angle ranges from 0 to 359 degrees. + * What this function does is pretty simple but apparently the original is not + * accurate. + */ uint16 kGetAngleWorker(int16 x1, int16 y1, int16 x2, int16 y2) { // TODO: This has been implemented based on behavior observed with a test // program created with SCI Studio. However, the return values have subtle - // differences from the original, which uses atan(). + // differences from the original, which uses custom implementation of atan(). // The differences in the return values are the cause of bug #3540976 // and perhaps bug #3037267 as well. @@ -94,7 +100,7 @@ uint16 kGetAngleWorker(int16 x1, int16 y1, int16 x2, int16 y2) { #if 0 // A simpler atan2-based implementation - return (360 - atan2((double)(x1 - x2), (double)(y1 - y2)) * 57.2958) % 360; + return (int16)(360 - atan2((double)(x1 - x2), (double)(y1 - y2)) * 57.2958) % 360; #endif int16 xRel = x2 - x1; @@ -122,6 +128,7 @@ uint16 kGetAngleWorker(int16 x1, int16 y1, int16 x2, int16 y2) { // Convert from grads to degrees by merging grad 0 with grad 1, // grad 10 with grad 11, grad 20 with grad 21, etc. This leads to // "degrees" that equal either one or two grads. + // This subtraction is meant to change from 400 "degrees" into 360 degrees angle -= (angle + 9) / 10; return angle; } -- cgit v1.2.3 From b2fb2730d67deccf819701ae98cb49daddf6ac4f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jul 2012 22:00:36 +0300 Subject: SCI: Also set the filename of the videoState struct when playing AVIs --- engines/sci/engine/kvideo.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index 61d2f935f7..cb2a763da9 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -209,6 +209,8 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) { warning("Failed to open movie file %s", filename.c_str()); delete videoDecoder; videoDecoder = 0; + } else { + s->_videoState.fileName = filename; } break; } -- cgit v1.2.3 From 97fe2682d75a4f5f0320f755aef7b7c950a8de6b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 8 Jul 2012 22:24:53 +0300 Subject: I18N: Updated Russian and Ukrainian translations --- po/ru_RU.po | 105 +++++++++++++++++++++++++++------------------------------ po/uk_UA.po | 110 ++++++++++++++++++++++++++++-------------------------------- 2 files changed, 101 insertions(+), 114 deletions(-) diff --git a/po/ru_RU.po b/po/ru_RU.po index ec66de6f4f..019acbddbc 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-07-08 12:25+0100\n" -"PO-Revision-Date: 2012-02-16 13:09+0200+0200\n" +"PO-Revision-Date: 2012-07-08 22:00+0200+0200\n" "Last-Translator: Eugene Sandulenko \n" "Language-Team: Russian\n" "MIME-Version: 1.0\n" @@ -193,9 +193,8 @@ msgid "Platform:" msgstr "¿ÛÐâäÞàÜÐ:" #: gui/launcher.cpp:231 -#, fuzzy msgid "Engine" -msgstr "¿àÞÒÕàØâì" +msgstr "´ÒØÖÞÚ" #: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" @@ -689,7 +688,7 @@ msgstr "SoundFont:" #: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "" -"SoundFontë ßÞÔÔÕàÔÖØÒÐîâáï ÝÕÚÞâÞàëÜØ ×ÒãÚÞÒëÜØ ÚÐàâÐÜØ, Fluidsynth Ø " +"SoundFontë ßÞÔÔÕàÖØÒÐîâáï ÝÕÚÞâÞàëÜØ ×ÒãÚÞÒëÜØ ÚÐàâÐÜØ, Fluidsynth Ø " "Timidity" #: gui/options.cpp:851 @@ -716,7 +715,7 @@ msgstr " #: gui/options.cpp:870 msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" msgstr "" -"ÃÚÐ×ëÒÐÕâ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ ßÞ ãÜÞÛçÐÝØï ÔÛï ÒëÒÞÔÐ ÝÐ Roland MT-32/LAPC1/" +"ÃÚÐ×ëÒÐÕâ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ ßÞ ãÜÞÛçÐÝØî ÔÛï ÒëÒÞÔÐ ÝÐ Roland MT-32/LAPC1/" "CM32l/CM64" #: gui/options.cpp:875 @@ -743,7 +742,7 @@ msgstr " #: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "" -"²ëÚÛîçÐÕâ ÜÐßßØÝÓ General MIDI ÔÛï ØÓà á ×ÒãÚÞÒÞÙ ÔÞàÞÖÚÞÙ ÔÛï Roland MT-32" +"²ëÚÛîçÐÕâ áÞßÞáâÐÒÛÕÝØÕ General MIDI ÔÛï ØÓà á ×ÒãÚÞÒÞÙ ÔÞàÞÖÚÞÙ ÔÛï Roland MT-32" #: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" @@ -922,7 +921,7 @@ msgid "" "The theme you selected does not support your current language. If you want " "to use this theme you need to switch to another language first." msgstr "" -"ÂÕÜÐ, ÒëÑàÐÝÝÐï ÒÐÜØ, ÝÕ ßÞÔÔÕàÖØÒÐÕâ ÒëÑàÐÝÝëÙ ï×ëÚ. µáÛØ Òë åÞâØâÕ " +"ÂÕÜÐ, ÒëÑàÐÝÝÐï ÒÐÜØ, ÝÕ ßÞÔÔÕàÖØÒÐÕâ âÕÚãéØÙ ï×ëÚ. µáÛØ Òë åÞâØâÕ " "ØáßÞÛì×ÞÒÐâì íâã âÕÜã, ÒÐÜ ÝÕÞÑåÞÔØÜÞ áÝÐçÐÛÐ ßÕàÕÚÛîçØâìáï ÝÐ ÔàãÓÞÙ ï×ëÚ." #: gui/saveload.cpp:59 gui/saveload.cpp:257 @@ -1159,17 +1158,17 @@ msgid "" "the README for basic information, and for instructions on how to obtain " "further assistance." msgstr "" -"¿àÞáØÜ ßàÞéÕÝØï, ÝÞ íâÞâ ÔÒØÖÞÕ ßÞÚÐ ÝÕ ßàÕÔÞáâÐÒÛïÕâ ßÞÜÞéØ ÒÝãâàØ ØÓàë. " +"¿àÞáØÜ ßàÞéÕÝØï, ÝÞ íâÞâ ÔÒØÖÞÚ ßÞÚÐ ÝÕ ßàÕÔÞáâÐÒÛïÕâ ßÞÜÞéØ ÒÝãâàØ ØÓàë. " "¿ÞÖÐÛãÙáâÐ, ÞÑàÐâØâÕáì Ò äÐÙÛ README ×Ð ÑÐ×ÞÒÞÙ ØÝäÞàÜÐæØÕÙ, Ð âÐÚÖÕ " "ØÝáâàãÚæØïÜØ Þ âÞÜ, ÚÐÚ ßÞÛãçØâì ÔÐÛìÝÕÙèãî ßÞÜÞéì." #: engines/dialogs.cpp:228 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"¿àÞáØÜ ßàÞéÕÝØï, ÝÞ íâÞâ ÔÒØÖÞÕ ßÞÚÐ ÝÕ ßàÕÔÞáâÐÒÛïÕâ ßÞÜÞéØ ÒÝãâàØ ØÓàë. " +"½Õ ãÔÐÛÞáì áÞåàÐÝØâì ØÓàã (%s)! " "¿ÞÖÐÛãÙáâÐ, ÞÑàÐâØâÕáì Ò äÐÙÛ README ×Ð ÑÐ×ÞÒÞÙ ØÝäÞàÜÐæØÕÙ, Ð âÐÚÖÕ " "ØÝáâàãÚæØïÜØ Þ âÞÜ, ÚÐÚ ßÞÛãçØâì ÔÐÛìÝÕÙèãî ßÞÜÞéì." @@ -1233,12 +1232,12 @@ msgstr "" "äÐÙÛÕ README." #: engines/engine.cpp:426 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate load failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"¿àÞáØÜ ßàÞéÕÝØï, ÝÞ íâÞâ ÔÒØÖÞÕ ßÞÚÐ ÝÕ ßàÕÔÞáâÐÒÛïÕâ ßÞÜÞéØ ÒÝãâàØ ØÓàë. " +"½Õ ãÔÐÛÞáì ßàÞçØâÐâì áÞåàÐÝÕÝØÕ ØÓàë (%s)! " "¿ÞÖÐÛãÙáâÐ, ÞÑàÐâØâÕáì Ò äÐÙÛ README ×Ð ÑÐ×ÞÒÞÙ ØÝäÞàÜÐæØÕÙ, Ð âÐÚÖÕ " "ØÝáâàãÚæØïÜØ Þ âÞÜ, ÚÐÚ ßÞÛãçØâì ÔÐÛìÝÕÙèãî ßÞÜÞéì." @@ -1259,12 +1258,14 @@ msgstr " #: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" -msgstr "" +msgstr "¸áßÞÛì×ÞÒÐâì ÞàØÓØÝÐÛìÝëÕ íÚàÐÝë ×ÐßØáØ/çâÕÝØï ØÓàë" #: 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 "" +"¸áßÞÛì×ÞÒÐâì ÞàØÓØÝÐÛìÝëÕ íÚàÐÝë ×ÐßØáØ Ø áÞåàÐÝÕÝØï ØÓàë ÒÜÕáâÞ " +"áÔÕÛÐÝÝëå Ò ScummVM" #: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" @@ -1272,73 +1273,71 @@ msgstr " #: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore" -msgstr "²ÞááâÒÝÞÒØâì" +msgstr "²ÞááâÐÝÞÒØâì" #: engines/dreamweb/detection.cpp:57 -#, fuzzy msgid "Use bright palette mode" -msgstr "²ÕàåÝØÙ ßàÐÒëÙ ßàÕÔÜÕâ" +msgstr "¸áßÞÛì×ÞÒÐâì àÕÖØÜ ïàÚÞÙ ßÐÛØâàë" #: engines/dreamweb/detection.cpp:58 msgid "Display graphics using the game's bright palette" -msgstr "" +msgstr "ÀØáãÕâ ÓàÐäØÚã á ØáßÞÛì×ÞÒÐÝØÕÜ ïàÚÞÙ ßÐÛØâàë ØÓàë" #: engines/sci/detection.cpp:370 msgid "EGA undithering" msgstr "EGA ÑÕ× àÐáâàÐ" #: engines/sci/detection.cpp:371 -#, fuzzy msgid "Enable undithering in EGA games" -msgstr "" -"²ÚÛîçÐÕâ àÕÖØÜ ÑÕ× àÐáâàØàÞÒÐÝØï Ò EGA ØÓàÐå, ÚÞâÞàëÕ ßÞÔÔÕàÖØÒÐîâ âÐÚÞÙ " -"àÕÖØÜ" +msgstr "²ÚÛîçÐÕâ àÕÖØÜ ÑÕ× àÐáâàØàÞÒÐÝØï Ò EGA ØÓàÐå" #: engines/sci/detection.cpp:380 -#, fuzzy msgid "Prefer digital sound effects" -msgstr "³àÞÜÚÞáâì áßÕæØÐÛìÝëå ×ÒãÚÞÒëå íääÕÚâÞÒ" +msgstr "¿àÕÔßÞçØâÐâì æØäàÞÒëÕ ×ÒãÚÞÒëÕ íääÕÚâë" #: engines/sci/detection.cpp:381 msgid "Prefer digital sound effects instead of synthesized ones" -msgstr "" +msgstr "¾âÔÐÒÐâì ßàÕÔßÞçâÕÝØÕ æØäàÞÒëÜ ×ÒãÚÞÒëÜ íääÕÚâÐÜ ÒÜÕáâÞ áØÝâÕ×ØàÞÒÐÝÝëå" #: engines/sci/detection.cpp:400 msgid "Use IMF/Yamaha FB-01 for MIDI output" -msgstr "" +msgstr "¸áßÞÛì×ÞÒÐâì IMF/Yamaha FB-01 ÔÛï ÒëÒÞÔÐ MIDI" #: engines/sci/detection.cpp:401 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" +"¸áßÞÛì×ÒÞÒÐâì ×ÒãÚÞÒãî ÚÐàâÚã IBM Music Feature ØÛØ ÜÞÔãÛì áØÝâÕ×Ð " +"Yamaha FB-01 FM ÔÛï MIDI" #: engines/sci/detection.cpp:411 msgid "Use CD audio" -msgstr "" +msgstr "¸áßÞÛì×ÞÒÐâì CD ÐãÔØÞ" #: engines/sci/detection.cpp:412 msgid "Use CD audio instead of in-game audio, if available" -msgstr "" +msgstr "¸áßÞÛì×ÞÒÐâì ×ÒãÚÞÒëÕ ÔÞàÞÖÚØ á CD ÒÜÕáâÞ Üã×ëÚØ Ø× äÐÙÛÞÒ ØÓàë (ÕáÛØ ÔÞáâãßÝÞ)" #: engines/sci/detection.cpp:422 msgid "Use Windows cursors" -msgstr "" +msgstr "¸áßÞÛì×ÞÒÐâì ÚãàáÞàë Windows" #: engines/sci/detection.cpp:423 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" +"¸áßÞÛì×ÞÒÐâì ÚãàáÞàë Windows (ÜÕÝìèØÕ ßÞ àÐ×ÜÕàã Ø ÞÔÝÞæÒÕâÝëÕ) ÒÜÕáâÞ ÚãàáÞàÞÒ DOS" #: engines/sci/detection.cpp:433 -#, fuzzy msgid "Use silver cursors" -msgstr "¾ÑëçÝëÙ ÚãàáÞà" +msgstr "¸áßÞÛì×ÞÒÐâì áÕàÕÑàïÝÝëÕ ÚãàáÞàë" #: engines/sci/detection.cpp:434 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" +"¸áßÞÛì×ÞÒÐâì ÐÛìâÕàÝÐâØÒÝëÙ ÝÐÑÞà áÕàÕÑàïÝÝëå ÚãàáÞàÞÒ ÒÜÕáâÞ ÞÑëçÝëå ×ÞÛÞâëå" #: engines/scumm/dialogs.cpp:175 #, c-format @@ -2091,61 +2090,59 @@ msgstr " #. Malcolm makes a joke. #: engines/kyra/detection.cpp:62 msgid "Studio audience" -msgstr "" +msgstr "ÁâãÔØÙÝÐï ÐãÔØâÞàØï" #: engines/kyra/detection.cpp:63 msgid "Enable studio audience" -msgstr "" +msgstr "²ÚÛîçØâì ×ÒãÚØ ÐãÔØâÞàØØ Ò áâãÔØØ" #. I18N: This option allows the user to skip text and cutscenes. #: engines/kyra/detection.cpp:73 msgid "Skip support" -msgstr "" +msgstr "¿ÞÔÔàÕÖÚÐ ßàÞßãáÚÞÒ" #: engines/kyra/detection.cpp:74 msgid "Allow text and cutscenes to be skipped" -msgstr "" +msgstr "²ÚÛîçÐÕâ ÒÞ×ÜÞÖÝÞáâì ßàÞßãáÚÐâì âÕÚáâë Ø ×ÐáâÐÒÚØ" #. I18N: Helium mode makes people sound like they've inhaled Helium. #: engines/kyra/detection.cpp:84 msgid "Helium mode" -msgstr "" +msgstr "ÀÕÖØÜ ÓÕÛØï" #: engines/kyra/detection.cpp:85 -#, fuzzy msgid "Enable helium mode" -msgstr "²ÚÛîçØâì àÕÖØÜ Roland GS" +msgstr "²ÚÛîçØâì àÕÖØÜ ÓÕÛØï" #. 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 "¿ÛÐÒÝÐï ßàÞÚàãâÚÐ" #: engines/kyra/detection.cpp:100 msgid "Enable smooth scrolling when walking" -msgstr "" +msgstr "²ÚÛîçØâì ßÛÐÒÝãî ßàÞÚàãâÚã ÒÞ ÒàÕÜï åÞÔìÑë" #. 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 "¾ÑëçÝëÙ ÚãàáÞà" +msgstr "¿ÛÐÒÐîéØÕ ÚãàáÞàë" #: engines/kyra/detection.cpp:113 msgid "Enable floating cursors" -msgstr "" +msgstr "²ÚÛîçØâì ßÛÐÒÐîéØÕ ÚãàáÞàë" #. I18N: HP stands for Hit Points #: engines/kyra/detection.cpp:127 msgid "HP bar graphs" -msgstr "" +msgstr "¿ÞÛÞáÚØ ×ÔÞàÞÒìï" #: engines/kyra/detection.cpp:128 msgid "Enable hit point bar graphs" -msgstr "" +msgstr "²ÚÛîçØâì ÞâÞÑàÐÖÕÝØÕ ßÞÛÞáÞÚ ×ÔÞàÞÒìï" #: engines/kyra/lol.cpp:478 msgid "Attack 1" @@ -2196,7 +2193,6 @@ msgid "Choose Spell" msgstr "²ëÑàÐâì ×ÐÚÛØÝÐÝØÕ" #: engines/kyra/sound_midi.cpp:475 -#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" @@ -2213,11 +2209,11 @@ msgstr "" #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" -msgstr "" +msgstr "²áâãßÛÕÝØÕ á äÛÞßßØÚÞÒ" #: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" -msgstr "" +msgstr "¸áßÞÛì×ÞÒÐâì ÒáâãßÛÕÝØÕ á ÓØÑÚØå ÔØáÚÞÒ (âÞÛìÚÞ ÔÛï CD ÒÕàáØØ ØÓàë)" #: engines/sky/compact.cpp:130 msgid "" @@ -2238,7 +2234,7 @@ msgstr "" #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" -msgstr "" +msgstr "·ÐáâÐÒÚÐ PSX '%s' ÝÕ ÜÞÖÕâ Ñëâì ßàÞØÓàÐÝÐ Ò àÕÖØÜÕ á ßÐÛØâàÞÙ" #: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 msgid "DXA cutscenes found but ScummVM has been built without zlib support" @@ -2293,19 +2289,18 @@ msgid "This is the end of the Broken Sword 1 Demo" msgstr "ÍâÞ ×ÐÒÕàèÕÝØÕ ÔÕÜÞ ÁÛÞÜÐÝÝÞÓÞ ¼ÕçÐ 1" #: engines/sword2/animation.cpp:435 -#, fuzzy msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" -"½ÐÙÔÕÝë ×ÐáâÐÒÚØ Ò äÞàÜÐâÕ DXA, ÝÞ ScummVM ÑëÛ áÞÑàÐÝ ÑÕ× ßÞÔÔÕàÖÚØ zlib" +"½ÐÙÔÕÝë ×ÐáâÐÒÚØ Ò äÞàÜÐâÕ PSX, ÝÞ ScummVM ÑëÛ áÞÑàÐÝ ÑÕ× ßÞÔÔÕàÖÚØ RGB æÒÕâÞÒ" #: engines/sword2/sword2.cpp:79 msgid "Show object labels" -msgstr "" +msgstr "¿ÞÚÐ×ëÒÐâì ÝÐ×ÒÐÝØï ÞÑêÕÚâÞÒ" #: engines/sword2/sword2.cpp:80 msgid "Show labels for objects on mouse hover" -msgstr "" +msgstr "¿ÞÚÐ×ëÒÐÕâ ÝÐ×ÒÐÝØï ÞÑêÕÚâÞÒ ßà ØÝÐÒÕÔÕÝØØ ÚãàáÞàÐ ÜëèØ" #: engines/parallaction/saveload.cpp:133 #, c-format @@ -2334,7 +2329,7 @@ msgid "" "Press OK to convert them now, otherwise you will be asked next time.\n" msgstr "" "ScummVM ÞÑÝÐàãÖØÛ ã ÒÐá áâÐàëÕ áÞåàÐÝÕÝØï ØÓàë Nippon Safes, ÚÞâÞàëÕ " -"ÝÕÞÑåÞÔØÜÞ ßÕàÕØÜÕÝÞÒÐâì.ÁâÐàëÕ ÝÐ×ÒÐÝØï ÑÞÛìèÕ ÝÕ ßÞÔÔÕàÖØÒÐîâáï, Ø ßÞíâÞÜã " +"ÝÕÞÑåÞÔØÜÞ ßÕàÕØÜÕÝÞÒÐâì. ÁâÐàëÕ ÝÐ×ÒÐÝØï ÑÞÛìèÕ ÝÕ ßÞÔÔÕàÖØÒÐîâáï, Ø ßÞíâÞÜã " "Òë ÝÕ áÜÞÖÕâÕ ×ÐÓàã×Øâì áÞåàÐÝÕÝØï, ÕáÛØ ÝÕ ßÕàÕØÜÕÝãÕâÕ Øå.\n" "\n" "½ÐÖÜØâÕ ¾º, çâÞÑë ßÕàÕØÜÕÝÞÒÐâì Øå áÕÙçÐá, Ò ßàÞâØÒÝÞÜ áÛãçÐÕ íâÞ ÖÕ " @@ -2351,7 +2346,7 @@ msgid "" "\n" "Please report to the team." msgstr "" -"ScummVM ÝÐßØáÐÛ ÝÕáÚÞÛìÚÞ ßàÕÔãßàÕÖÔÕÝØÙ Ò ÞÚÝÞ ÚÞÝáÞÛØ, Ø ÝÕ áÜÞÓ " +"ScummVM ÝÐßØáÐÛ ÝÕáÚÞÛìÚÞ ßàÕÔãßàÕÖÔÕÝØÙ Ò ÞÚÝÞ ÚÞÝáÞÛØ Ø ÝÕ áÜÞÓ " "ßàÕÞÑàÐ×ÞÒÐâì ÒáÕ äÐÙÛë.\n" "\n" "¿ÞÖÐÛãÙáâÐ, áÞÞÑéØâÕ ÞÑ íâÞÜ ÚÞÜÐÝÔÕ ScummVM." @@ -2455,7 +2450,7 @@ msgstr " ( #: backends/keymapper/remap-dialog.cpp:106 msgid " (Blocked)" -msgstr "" +msgstr " (·ÐÑÛÞÚØàÞÒÐÝÐ)" #: backends/keymapper/remap-dialog.cpp:119 msgid " (Global)" diff --git a/po/uk_UA.po b/po/uk_UA.po index 7f484fdc06..38855dcb11 100644 --- a/po/uk_UA.po +++ b/po/uk_UA.po @@ -8,15 +8,15 @@ msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-07-08 12:25+0100\n" -"PO-Revision-Date: 2012-02-16 13:09+0200\n" -"Last-Translator: Eugene Sandulenko\n" +"PO-Revision-Date: 2012-06-29 20:19+0200\n" +"Last-Translator: lubomyr \n" "Language-Team: Ukrainian\n" +"Language: Ukrainian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-5\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Ukrainian\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%" -"10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" #: gui/about.cpp:91 #, c-format @@ -194,9 +194,8 @@ msgid "Platform:" msgstr "¿ÛÐâäÞàÜÐ:" #: gui/launcher.cpp:231 -#, fuzzy msgid "Engine" -msgstr "ÀÞ×ÓÛïÝãâØ" +msgstr "´ÒØÖÞÚ" #: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" @@ -1162,14 +1161,13 @@ msgstr "" "ÔÞßÞÜÞÓã." #: engines/dialogs.cpp:228 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"²ØÑÐçâÕ, æÕÙ ÔÒØÖÞÚ ÝÕ ßöÔâàØÜãô ÔÞÒöÔÚã ßÞ öÓàÐÜ. ±ãÔì-ÛÐáÚÐ, ÔØÒöâìáï äÐÙÛ " -"README ÔÛï ÞáÝÞÒÝÞ÷ öÝÞàÜÐæö÷, Ð âÐÚÞÖ öÝáâàãÚæöÙ, ïÚ ÞâàØÜÐâØ ßÞÔÐÛìèã " -"ÔÞßÞÜÞÓã." +"·ÑÕàÕÖÕÝÝï áâÐÝã ÓàØ ÝÕ ÒÔÐÛÞáï (%s)!. ±ãÔì-ÛÐáÚÐ, ÔØÒöâìáï äÐÙÛ README ÔÛï " +"ÞáÝÞÒÝÞ÷ öÝÞàÜÐæö÷, Ð âÐÚÞÖ öÝáâàãÚæöÙ, ïÚ ÞâàØÜÐâØ ßÞÔÐÛìèã ÔÞßÞÜÞÓã." #: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 @@ -1230,14 +1228,13 @@ msgstr "" "´ØÒöâìáï äÐÙÛ README ÔÛï ßÞÔÐÛìèØå öÝáâàãÚæöÙ." #: engines/engine.cpp:426 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate load failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"²ØÑÐçâÕ, æÕÙ ÔÒØÖÞÚ ÝÕ ßöÔâàØÜãô ÔÞÒöÔÚã ßÞ öÓàÐÜ. ±ãÔì-ÛÐáÚÐ, ÔØÒöâìáï äÐÙÛ " -"README ÔÛï ÞáÝÞÒÝÞ÷ öÝÞàÜÐæö÷, Ð âÐÚÞÖ öÝáâàãÚæöÙ, ïÚ ÞâàØÜÐâØ ßÞÔÐÛìèã " -"ÔÞßÞÜÞÓã." +"·ÐÒÐÝâÐÖÕÝÝï áâÐÝã ÓàØ ÝÕ ÒÔÐÛÞáï (%s)! . ±ãÔì-ÛÐáÚÐ, ÔØÒöâìáï äÐÙÛ README " +"ÔÛï ÞáÝÞÒÝÞ÷ öÝÞàÜÐæö÷, Ð âÐÚÞÖ öÝáâàãÚæöÙ, ïÚ ÞâàØÜÐâØ ßÞÔÐÛìèã ÔÞßÞÜÞÓã." #: engines/engine.cpp:439 msgid "" @@ -1256,12 +1253,13 @@ msgstr " #: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" -msgstr "" +msgstr "²ØÚÞàØáâÞÒãÒÐâØ ÞàØÓ. ×ÑÕàÕÖÕÝÝï/×ÐÒÐÝâÐÖÕÝÝï ÕÚàÐÝØ" #: 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 "" +"²ØÚÞàØáâÞÒãÒÐâØ ÞàØÓöÝÐÛìÝö ×ÑÕàÕÖÕÝÝï/×ÐÒÐÝâÐÖÕÝÝï ÕÚàÐÝØ, ×ÐÜöáâì ScummVM" #: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 msgid "Restore game:" @@ -1272,35 +1270,32 @@ msgid "Restore" msgstr "²öÔÝÞÒØâØ" #: engines/dreamweb/detection.cpp:57 -#, fuzzy msgid "Use bright palette mode" -msgstr "²ÕàåÝï áßàÐÒÐ àöç" +msgstr "²ØÚÞàØáâÞÒãÒÐâØ ïáÚàÐÒØÙ àÕÖØÜ ßÐÛöâàØ" #: engines/dreamweb/detection.cpp:58 msgid "Display graphics using the game's bright palette" -msgstr "" +msgstr "²öÔÞÑàÐÖÕÝÝï ÓàÐäöÚØ × ÒØÚÞàØáâÐÝÝïÜ ïáÚàÐÒÞ÷ ßÐÛöâàØ öÓà" #: engines/sci/detection.cpp:370 msgid "EGA undithering" msgstr "EGA ÑÕ× àÐáâàãÒÐÝÝï" #: engines/sci/detection.cpp:371 -#, fuzzy msgid "Enable undithering in EGA games" -msgstr "²öÜÚÝãâØ àÐáâàãÒÐÝÝï Ò EGA öÓàÐå ïÚö æÕ ßöÔâàØÜãîâì" +msgstr "ÃÒöÜÚÝãâØ ÐÝâØ-×ÓÛÐÔÖãÒÐÝÝï Ò EGA öÓàÐå" #: engines/sci/detection.cpp:380 -#, fuzzy msgid "Prefer digital sound effects" -msgstr "³ãçÝöáâì áßÕæöÐÛìÝØå ×ÒãÚÞÒØå ÕäÕÚâöÒ" +msgstr "½ÐÔÐÒÐâØ ßÕàÕÒÐÓã æØäàÞÒØÜ ×ÒãÚÞÒØÜ ÕäÕÚâÐÜ" #: engines/sci/detection.cpp:381 msgid "Prefer digital sound effects instead of synthesized ones" -msgstr "" +msgstr "²öÔÔÐÒÐâØ ßÕàÕÒÐÓã æØäàÞÒØÜ ×ÒãÚÞÒØÜ ÕäÕÚâÐÜ, Ð ÝÕ áØÝâÕ×ÞÒÐÝØÜ" #: engines/sci/detection.cpp:400 msgid "Use IMF/Yamaha FB-01 for MIDI output" -msgstr "" +msgstr "²ØÚÞàØáâÞÒãÒÐâØ IMF/Yahama FB-01 ÔÛï MIDI ÒØåÞÔã" #: engines/sci/detection.cpp:401 msgid "" @@ -1310,30 +1305,31 @@ msgstr "" #: engines/sci/detection.cpp:411 msgid "Use CD audio" -msgstr "" +msgstr "²ØÚÞàØáâÞÒãÒÐâØ CD ÐãÔöÞ" #: engines/sci/detection.cpp:412 msgid "Use CD audio instead of in-game audio, if available" -msgstr "" +msgstr "²ØÚÞàØáâÞÒãÒÐâØ CD ÐãÔöÞ ×ÐÜöáâì ã-Óàö ÐãÔöÞ, ïÚéÞ âÐÚö ô" #: engines/sci/detection.cpp:422 msgid "Use Windows cursors" -msgstr "" +msgstr "²ØÚÞàØáâÞÒãÒÐâØ Windows ÚãàáÞàØ" #: engines/sci/detection.cpp:423 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" -msgstr "" +msgstr "²ØÚÞàØáâÞÒãÒÐâØ Windows ÚãàáÞàØ (ÜÕÝèØå ö ÜÞÝÞåàÞÜÝØå), ×ÐÜöáâì DOS" #: engines/sci/detection.cpp:433 -#, fuzzy msgid "Use silver cursors" -msgstr "·ÒØçÐÙÝØÙ ÚãàáÞà" +msgstr "²ØÚÞàØáâÞÒãÒÐâØ áàöÑÝö ÚãàáÞàØ" #: engines/sci/detection.cpp:434 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" +"²ØÚÞàØáâÞÒãÒÐâØ ÐÛìâÕàÝÐâØÒÝØÙ ÝÐÑöà áàöÑÝØå ÚãàáÞàöÒ, ×ÐÜöáâì ×ÒØçÐÙÝØå " +"×ÞÛÞâØå" #: engines/scumm/dialogs.cpp:175 #, c-format @@ -2086,52 +2082,50 @@ msgstr " #. Malcolm makes a joke. #: engines/kyra/detection.cpp:62 msgid "Studio audience" -msgstr "" +msgstr "ÁâãÔöï ÐãÔØâÞàö÷" #: engines/kyra/detection.cpp:63 msgid "Enable studio audience" -msgstr "" +msgstr "ÃÒöÜÚÝãâØ áâãÔöî ÐãÔØâÞàö÷" #. I18N: This option allows the user to skip text and cutscenes. #: engines/kyra/detection.cpp:73 msgid "Skip support" -msgstr "" +msgstr "¿öÔâàØÜãÒÐâØ ¿àÞßãáâØâØ" #: engines/kyra/detection.cpp:74 msgid "Allow text and cutscenes to be skipped" -msgstr "" +msgstr "´Þ×ÒÞÛØâØ ßàÞßãáÚÐâØ âÕÚáâ ö àÞÛØÚØ" #. I18N: Helium mode makes people sound like they've inhaled Helium. #: engines/kyra/detection.cpp:84 msgid "Helium mode" -msgstr "" +msgstr "ÀÕÖØÜ ³ÕÛöãÜ" #: engines/kyra/detection.cpp:85 -#, fuzzy msgid "Enable helium mode" -msgstr "ÃÒöÜÚÝãâØ àÕÖØÜ Roland GS" +msgstr "ÃÒöÜÚÝãâØ àÕÖØÜ ³ÕÛöãÜ" #. 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 "¿ÛÐÒÝÐ ßàÞÚàãâÚÐ" #: engines/kyra/detection.cpp:100 msgid "Enable smooth scrolling when walking" -msgstr "" +msgstr "ÃÒöÜÚÝãâØ ßÛÐÒÝã ßàÞÚàãâÚã ßàØ åÞÔìÑö" #. 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 "·ÒØçÐÙÝØÙ ÚãàáÞà" +msgstr "¿ÛÐÒÐîçö ÚãàáÞàØ" #: engines/kyra/detection.cpp:113 msgid "Enable floating cursors" -msgstr "" +msgstr "ÃÒöÜÚÝãâØ ßÛÐÒÐîçö ÚãàáÞàØ" #. I18N: HP stands for Hit Points #: engines/kyra/detection.cpp:127 @@ -2191,7 +2185,6 @@ msgid "Choose Spell" msgstr "²ØÑàÐâØ ×ÐÚÛïââï" #: engines/kyra/sound_midi.cpp:475 -#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" @@ -2207,11 +2200,11 @@ msgstr "" #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" -msgstr "" +msgstr "´ØáÚÕâÝÕ ÒÒÕÔÕÝÝï" #: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" -msgstr "" +msgstr "²ØÚÞàØáâÞÒãÒÐâØ ÔØáÚÕâÝö ÒÕàáö÷ ÒÒÕÔÕÝÝï (âöÛìÚØ CD ÒÕàáöï)" #: engines/sky/compact.cpp:130 msgid "" @@ -2232,7 +2225,7 @@ msgstr "" #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" -msgstr "" +msgstr " àÞÛØÚ PSX ßÞâÞÚã '%s' ÝÕ ÜÞÖãâì ÑãâØ ÒöÔâÒÞàÕÝö ã àÕÖØÜö ßÐÛöâàØ" #: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 msgid "DXA cutscenes found but ScummVM has been built without zlib support" @@ -2286,18 +2279,17 @@ msgid "This is the end of the Broken Sword 1 Demo" msgstr "½Ð æìÞÜã ×ÐÚöÝçãôâìáï ÔÕÜÞ Broken Sword 1" #: engines/sword2/animation.cpp:435 -#, fuzzy msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" -msgstr "·ÝÐÙÔÕÝÞ ×ÐáâÐÒÚØ DXA, ÐÛÕ ScummVM ÑãÒ ßÞÑãÔÞÒÐÝØÙ ÑÕ× ßöÔâàØÜÚØ zlib" +msgstr "·ÝÐÙÔÕÝö PSX àÞÛØÚØ, ÐÛÕ ScummVM ÑãÒ ×öÑàÐÝØÙ ÑÕ× ßöÔâàØÜÚØ RGB ÚÞÛöàã" #: engines/sword2/sword2.cpp:79 msgid "Show object labels" -msgstr "" +msgstr "¿ÞÚÐ×ãÒÐâØ ÜöâÚØ ÞÑ'ôÚâöÒ" #: engines/sword2/sword2.cpp:80 msgid "Show labels for objects on mouse hover" -msgstr "" +msgstr "¿ÞÚÐ×ãÒÐâØ ÜöâÚØ ÔÛï ÞÑ'ôÚâöÒ ßàØ ÝÐÒÕÔÕÝÝö ÜØèö" #: engines/parallaction/saveload.cpp:133 #, c-format @@ -2362,7 +2354,7 @@ msgid "" "The selected audio device '%s' was not found (e.g. might be turned off or " "disconnected)." msgstr "" -"²ØÑàÐÝØÙ ×ÒãÚÞÒØÙ ßàØáâàöÙ %s ÝÕ ÑãÛÞ ×ÝÐÙÔÕÝÞ (âÞÑâÞ, ÙÞÓÞ ÜÞÖÕ ÑãâØ " +"²ØÑàÐÝØÙ ×ÒãÚÞÒØÙ ßàØáâàöÙ '%s' ÝÕ ÑãÛÞ ×ÝÐÙÔÕÝÞ (âÞÑâÞ, ÙÞÓÞ ÜÞÖÕ ÑãâØ " "ÒØÜÚÝÕÝÞ ÐÑÞ ÝÕ ßöÔÚÛîçÕÝÞ)." #: audio/mididrv.cpp:209 audio/mididrv.cpp:221 audio/mididrv.cpp:257 @@ -2376,7 +2368,7 @@ msgid "" "The selected audio device '%s' cannot be used. See log file for more " "information." msgstr "" -"²ØÑàÐÝØÙ ×ÒãÚÞÒØÙ ßàØáâàöÙ %s ÝÕ ÜÞÖÕ ÑãâØ ÒØÚÞàØáâÐÝØÙ. ´ØÒöâìáï äÐÙÛ ÛÞÓã " +"²ØÑàÐÝØÙ ×ÒãÚÞÒØÙ ßàØáâàöÙ '%s' ÝÕ ÜÞÖÕ ÑãâØ ÒØÚÞàØáâÐÝØÙ. ´ØÒöâìáï äÐÙÛ ÛÞÓã " "ÔÛï ÔÞÔÐâÚÞÒÞ÷ öÝäÞàÜÐæö÷." #: audio/mididrv.cpp:257 @@ -2385,7 +2377,7 @@ msgid "" "The preferred audio device '%s' was not found (e.g. might be turned off or " "disconnected)." msgstr "" -"ÃßÞÔÞÑÐÝØÙ ×ÒãÚÞÒØÙ ßàØáâàöÙ %s ÝÕ ÑãÛÞ ×ÝÐÙÔÕÝÞ (âÞÑâÞ, ÙÞÓÞ ÜÞÖÕ ÑãâØ " +"ÃßÞÔÞÑÐÝØÙ ×ÒãÚÞÒØÙ ßàØáâàöÙ '%s' ÝÕ ÑãÛÞ ×ÝÐÙÔÕÝÞ (âÞÑâÞ, ÙÞÓÞ ÜÞÖÕ ÑãâØ " "ÒØÜÚÝÕÝÞ ÐÑÞ ÝÕ ßöÔÚÛîçÕÝÞ)." #: audio/mididrv.cpp:272 @@ -2394,7 +2386,7 @@ msgid "" "The preferred audio device '%s' cannot be used. See log file for more " "information." msgstr "" -"ÃßÞÔÞÑÐÝØÙ ×ÒãÚÞÒØÙ ßàØáâàöÙ %s ÝÕ ÜÞÖÕ ÑãâØ ÒØÚÞàØáâÐÝØÙ. ´ØÒöâìáï äÐÙÛ " +"ÃßÞÔÞÑÐÝØÙ ×ÒãÚÞÒØÙ ßàØáâàöÙ '%s' ÝÕ ÜÞÖÕ ÑãâØ ÒØÚÞàØáâÐÝØÙ. ´ØÒöâìáï äÐÙÛ " "ÛÞÓã ÔÛï ÔÞÔÐâÚÞÒÞ÷ öÝäÞàÜÐæö÷." #: audio/null.h:43 @@ -2447,7 +2439,7 @@ msgstr " ( #: backends/keymapper/remap-dialog.cpp:106 msgid " (Blocked)" -msgstr "" +msgstr " (·ÐÑÛÞÚÞÒÐÝØÙ)" #: backends/keymapper/remap-dialog.cpp:119 msgid " (Global)" @@ -2867,11 +2859,11 @@ msgstr " #: backends/platform/wince/CEActionsPocket.cpp:52 msgid "Zoom up" -msgstr "·ÑöÛ. ÜÐèâÐÑ" +msgstr "·ÑöÛ. ÜÐáèâÐÑ" #: backends/platform/wince/CEActionsPocket.cpp:53 msgid "Zoom down" -msgstr "·ÜÝè. ÜÐèâÐÑ" +msgstr "·ÜÝè. ÜÐáèâÐÑ" #: backends/platform/wince/CEActionsPocket.cpp:55 #: backends/platform/wince/CEActionsSmartphone.cpp:49 @@ -2940,7 +2932,7 @@ msgstr " msgid "You must map a key to the 'Hide toolbar' action to play this game" msgstr "" "²Ø ßÞÒØÝÝö ßÕàÕßàØ×ÝÐçØâØ ÚÝÞßÚã ÔÛï Ôö÷ 'ÁåÞÒÐâØ ¿ÐÝÕÛì öÝáâà.', éÞÑ ÓàÐâØ " -"Ò æî Óàã" +"ã æî Óàã" #: backends/platform/wince/wince-sdl.cpp:541 msgid "Map Zoom Up action (optional)" -- cgit v1.2.3 From a4b0c0e2db36353ac037dc60a639bf59611bedda Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 8 Jul 2012 22:26:08 +0300 Subject: I18N: Updated translations.dat --- gui/themes/translations.dat | Bin 334603 -> 340460 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index df99750170..97d69b400c 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 6387e3bca73dd8b2dacab15a84a4a3b8d6c13c10 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 8 Jul 2012 22:30:05 +0300 Subject: RELEASE: This is 1.6.0git --- backends/platform/psp/README.PSP | 2 +- base/internal_version.h | 2 +- dists/android/AndroidManifest.xml | 2 +- dists/android/plugin-manifest.xml | 2 +- dists/gph/README-GPH | 2 +- dists/gph/scummvm.ini | 2 +- dists/iphone/Info.plist | 4 ++-- dists/irix/scummvm.spec | 2 +- dists/macosx/Info.plist | 6 +++--- dists/openpandora/PXML.xml | 8 ++++---- dists/openpandora/README-OPENPANDORA | 2 +- dists/openpandora/README-PND.txt | 2 +- dists/openpandora/index.html | 4 ++-- dists/redhat/scummvm-tools.spec | 2 +- dists/redhat/scummvm.spec | 2 +- dists/scummvm.rc | 8 ++++---- dists/slackware/scummvm.SlackBuild | 2 +- dists/wii/meta.xml | 2 +- dists/win32/scummvm.nsi | 4 ++-- 19 files changed, 30 insertions(+), 30 deletions(-) diff --git a/backends/platform/psp/README.PSP b/backends/platform/psp/README.PSP index bc0bd35a6e..969459dc5b 100644 --- a/backends/platform/psp/README.PSP +++ b/backends/platform/psp/README.PSP @@ -1,4 +1,4 @@ -ScummVM-PSP 1.5.0git README +ScummVM-PSP 1.6.0git README ============================================================================== Installation diff --git a/base/internal_version.h b/base/internal_version.h index 5392012169..40ed67ceec 100644 --- a/base/internal_version.h +++ b/base/internal_version.h @@ -16,4 +16,4 @@ #define SCUMMVM_REVISION #endif -#define SCUMMVM_VERSION "1.5.0git" SCUMMVM_REVISION +#define SCUMMVM_VERSION "1.6.0git" SCUMMVM_REVISION diff --git a/dists/android/AndroidManifest.xml b/dists/android/AndroidManifest.xml index e7778fdf61..a3c02474eb 100644 --- a/dists/android/AndroidManifest.xml +++ b/dists/android/AndroidManifest.xml @@ -4,7 +4,7 @@ diff --git a/dists/android/plugin-manifest.xml b/dists/android/plugin-manifest.xml index 51b39be3b1..7855c330c6 100644 --- a/dists/android/plugin-manifest.xml +++ b/dists/android/plugin-manifest.xml @@ -3,7 +3,7 @@ diff --git a/dists/gph/README-GPH b/dists/gph/README-GPH index 29f0175306..974c2cf266 100644 --- a/dists/gph/README-GPH +++ b/dists/gph/README-GPH @@ -1,4 +1,4 @@ -ScummVM 1.5.0git - GPH DEVICE SPECIFIC README +ScummVM 1.6.0git - GPH DEVICE SPECIFIC README ------------------------------------------------------------------------ diff --git a/dists/gph/scummvm.ini b/dists/gph/scummvm.ini index 952cd0de24..7d9d85fcc2 100644 --- a/dists/gph/scummvm.ini +++ b/dists/gph/scummvm.ini @@ -1,5 +1,5 @@ [info] -name="ScummVM 1.5.0git" +name="ScummVM 1.6.0git" path="/scummvm/scummvm.gpe" icon="/scummvm/scummvm.png" title="/scummvm/scummvmb.png" diff --git a/dists/iphone/Info.plist b/dists/iphone/Info.plist index e25cee51ea..2f6ba85b00 100644 --- a/dists/iphone/Info.plist +++ b/dists/iphone/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.5.0git + 1.6.0git CFBundleSignature ???? CFBundleVersion - 1.5.0git + 1.6.0git CFBundleIconFile icon.png CFBundleIconFiles diff --git a/dists/irix/scummvm.spec b/dists/irix/scummvm.spec index 2e099d94a8..bbdf31cc2c 100644 --- a/dists/irix/scummvm.spec +++ b/dists/irix/scummvm.spec @@ -1,5 +1,5 @@ product scummvm - id "ScummVM 1.5.0git" + id "ScummVM 1.6.0git" image sw id "software" version 18 diff --git a/dists/macosx/Info.plist b/dists/macosx/Info.plist index 94adc00a9b..d8c28f6a08 100644 --- a/dists/macosx/Info.plist +++ b/dists/macosx/Info.plist @@ -28,7 +28,7 @@ CFBundleExecutable scummvm CFBundleGetInfoString - 1.5.0git, Copyright 2001-2012 The ScummVM team + 1.6.0git, Copyright 2001-2012 The ScummVM team CFBundleIconFile scummvm.icns CFBundleIdentifier @@ -40,9 +40,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.5.0git + 1.6.0git CFBundleVersion - 1.5.0git + 1.6.0git NSPrincipalClass NSApplication NSHumanReadableCopyright diff --git a/dists/openpandora/PXML.xml b/dists/openpandora/PXML.xml index 896210bf01..b759c311ba 100644 --- a/dists/openpandora/PXML.xml +++ b/dists/openpandora/PXML.xml @@ -4,11 +4,11 @@ - + - ScummVM 1.5.0git + ScummVM 1.6.0git - ScummVM 1.5.0git + ScummVM 1.6.0git @@ -25,7 +25,7 @@ - + ScummVM diff --git a/dists/openpandora/README-OPENPANDORA b/dists/openpandora/README-OPENPANDORA index b3947975c0..e3c7c9d631 100644 --- a/dists/openpandora/README-OPENPANDORA +++ b/dists/openpandora/README-OPENPANDORA @@ -1,4 +1,4 @@ -ScummVM 1.5.0git - OPENPANDORA SPECIFIC README +ScummVM 1.6.0git - OPENPANDORA SPECIFIC README ------------------------------------------------------------------------ Please refer to the: diff --git a/dists/openpandora/README-PND.txt b/dists/openpandora/README-PND.txt index 240936f755..594ad293ed 100644 --- a/dists/openpandora/README-PND.txt +++ b/dists/openpandora/README-PND.txt @@ -1,4 +1,4 @@ -ScummVM 1.5.0git - OPENPANDORA README - HOW TO INSTALL +ScummVM 1.6.0git - OPENPANDORA README - HOW TO INSTALL ------------------------------------------------------------------------ Please refer to the: diff --git a/dists/openpandora/index.html b/dists/openpandora/index.html index d7238c1889..5da951546c 100644 --- a/dists/openpandora/index.html +++ b/dists/openpandora/index.html @@ -5,7 +5,7 @@

-

ScummVM 1.5.0git: OpenPandora Specific Documentation

+

ScummVM 1.6.0git: OpenPandora Specific Documentation

ScummVM OpenPandora README
@@ -13,7 +13,7 @@ ScummVM OpenPandora WiKi

-

ScummVM 1.5.0git: General Documentation

+

ScummVM 1.6.0git: General Documentation

ScummVM website
diff --git a/dists/redhat/scummvm-tools.spec b/dists/redhat/scummvm-tools.spec index 99add8ba85..2f65931a70 100644 --- a/dists/redhat/scummvm-tools.spec +++ b/dists/redhat/scummvm-tools.spec @@ -7,7 +7,7 @@ # Prologue information #------------------------------------------------------------------------------ Name : scummvm-tools -Version : 1.5.0git +Version : 1.6.0git Release : 1 Summary : ScummVM-related tools Group : Interpreters diff --git a/dists/redhat/scummvm.spec b/dists/redhat/scummvm.spec index 2ccccae79d..d80404a3c6 100644 --- a/dists/redhat/scummvm.spec +++ b/dists/redhat/scummvm.spec @@ -7,7 +7,7 @@ # Prologue information #------------------------------------------------------------------------------ Name : scummvm -Version : 1.5.0git +Version : 1.6.0git Release : 1 Summary : Graphic adventure game interpreter Group : Interpreters diff --git a/dists/scummvm.rc b/dists/scummvm.rc index 6f24b8797d..4a67100f9f 100644 --- a/dists/scummvm.rc +++ b/dists/scummvm.rc @@ -49,8 +49,8 @@ pred.dic FILE "dists/pred.dic" #endif VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,5,0,0 - PRODUCTVERSION 1,5,0,0 + FILEVERSION 1,6,0,0 + PRODUCTVERSION 1,6,0,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -67,13 +67,13 @@ BEGIN BEGIN VALUE "Comments", "Look! A three headed monkey (TM)! .. Nice use of the TM!\0" VALUE "FileDescription", "http://www.scummvm.org/\0" - VALUE "FileVersion", "1.5.0git\0" + VALUE "FileVersion", "1.6.0git\0" VALUE "InternalName", "scummvm\0" VALUE "LegalCopyright", "Copyright © 2001-2012 The ScummVM Team\0" VALUE "LegalTrademarks", "'SCUMM', and all SCUMM games are a TM of LucasArts. Simon The Sorcerer is a TM of AdventureSoft. Beneath a Steel Sky and Broken Sword are a TM of Revolution. Flight of the Amazon Queen is a TM of John Passfield and Steve Stamatiadis. \0" VALUE "OriginalFilename", "scummvm.exe\0" VALUE "ProductName", "ScummVM\0" - VALUE "ProductVersion", "1.5.0git\0" + VALUE "ProductVersion", "1.6.0git\0" END END diff --git a/dists/slackware/scummvm.SlackBuild b/dists/slackware/scummvm.SlackBuild index 4ccc2a8995..076a1d20ea 100755 --- a/dists/slackware/scummvm.SlackBuild +++ b/dists/slackware/scummvm.SlackBuild @@ -9,7 +9,7 @@ if [ "$TMP" = "" ]; then fi PKG=$TMP/package-scummvm -VERSION=1.5.0git +VERSION=1.6.0git ARCH=i486 BUILD=1 diff --git a/dists/wii/meta.xml b/dists/wii/meta.xml index e843d36e79..5a4c46e144 100644 --- a/dists/wii/meta.xml +++ b/dists/wii/meta.xml @@ -2,7 +2,7 @@ ScummVM The ScummVM Team - 1.5.0git@REVISION@ + 1.6.0git@REVISION@ @TIMESTAMP@ Point & Click Adventures ScummVM is a program which allows you to run certain classic graphical point-and-click adventure games, provided you already have their data files. The clever part about this: ScummVM just replaces the executables shipped with the games, allowing you to play them on systems for which they were never designed! diff --git a/dists/win32/scummvm.nsi b/dists/win32/scummvm.nsi index 7ff174befb..795eb660b6 100644 --- a/dists/win32/scummvm.nsi +++ b/dists/win32/scummvm.nsi @@ -72,7 +72,7 @@ Name ScummVM # General Symbol Definitions ######################################################################################### !define REGKEY "Software\$(^Name)\$(^Name)" -!define VERSION "1.5.0git" +!define VERSION "1.6.0git" !define COMPANY "ScummVM Team" !define URL "http://scummvm.org/" !define DESCRIPTION "ScummVM Installer. Look! A three headed monkey (TM)!" @@ -92,7 +92,7 @@ XPStyle on #TargetMinimalOS 5.0 ; Minimal version of windows for installer: Windows 2000 or more recent ; (will build unicode installer with NSIS 2.50+) -VIProductVersion 1.5.0.0 +VIProductVersion 1.6.0.0 VIAddVersionKey ProductName $(^Name) VIAddVersionKey ProductVersion "${VERSION}" VIAddVersionKey CompanyName "${COMPANY}" -- cgit v1.2.3 From ccd1553f60680daf49f9237b718e9013cc3c3f97 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 8 Jul 2012 22:39:18 +0200 Subject: NEWS: Remove OpenGL entry in 1.5.0 news section. --- NEWS | 3 --- 1 file changed, 3 deletions(-) diff --git a/NEWS b/NEWS index 443306fbfd..40d98f294f 100644 --- a/NEWS +++ b/NEWS @@ -30,9 +30,6 @@ For a more comprehensive changelog of the latest experimental code, see: - Improved predictive dialog look. - Various GUI improvements. - SDL ports: - - Added support for OpenGL (GSoC Task). - Broken Sword 1: - Fixed incorrect sound effects in the DOS/Windows demo. - Added support for PlayStation videos. -- cgit v1.2.3 From 4635d83864b651292e7c7eb9be0687c0c742f061 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 8 Jul 2012 22:55:53 +0100 Subject: I18N: Update Swedish translation from patch #3541394 --- po/se_SE.po | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/po/se_SE.po b/po/se_SE.po index 880b198895..8388e55370 100644 --- a/po/se_SE.po +++ b/po/se_SE.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: ScummVM 1.5.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-07-08 12:25+0100\n" -"PO-Revision-Date: 2012-06-28 15:47+0100\n" +"PO-Revision-Date: 2012-07-08 18:03+0100\n" "Last-Translator: Hampus Flink \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -2186,7 +2186,6 @@ msgid "Choose Spell" msgstr "Välj trollformel" #: engines/kyra/sound_midi.cpp:475 -#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" @@ -2194,10 +2193,10 @@ msgid "" "General MIDI ones. It is still possible that\n" "some tracks sound incorrect." msgstr "" -"Du verkar använda en General MIDI enhet\n" +"Du verkar använda en General MIDI-enhet,\n" "men ditt spel stöder endast Roland MT32 MIDI.\n" -"Vi försöker kartlägga Roland MT32 instrument för\n" -"General MIDI instrument. Det kan trots allt hända\n" +"Vi försöker kartlägga Roland MT32-instrumenten till\n" +"General MIDI-instrument. Det kan trots allt hända\n" "att ett fåtal ljudspår inte spelas korrekt." #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -- cgit v1.2.3 From c40294fdcc64c2e78f0f5ef95e074b6ebf1070c6 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 8 Jul 2012 22:56:49 +0100 Subject: I18N: Update Spanish translation from patch #3541399 --- po/es_ES.po | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/po/es_ES.po b/po/es_ES.po index fffd190695..8e23894dcf 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: ScummVM 1.4.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-07-08 12:25+0100\n" -"PO-Revision-Date: 2012-06-22 17:44+0100\n" +"PO-Revision-Date: 2012-07-08 18:19+0100\n" "Last-Translator: Tomás Maidagan\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -2190,7 +2190,6 @@ msgid "Choose Spell" msgstr "Elegir hechizo" #: engines/kyra/sound_midi.cpp:475 -#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" @@ -2198,11 +2197,11 @@ msgid "" "General MIDI ones. It is still possible that\n" "some tracks sound incorrect." msgstr "" -"Estás usando un dispositivo General Midi, pero el\n" +"Estás usando un dispositivo General MIDI, pero el\n" "juego solo es compatible con MIDI Roland MT32.\n" "Intentamos adaptar los instrumentos Roland MT32\n" "a los de General MIDI, pero es posible que algunas\n" -"de las pistas no se reproduzcan correctamente." +"de las pistas no suenen correctamente." #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" -- cgit v1.2.3 From d2db9c1253580646e2b8f15eec7dc3b423292399 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 8 Jul 2012 22:58:06 +0100 Subject: I18N: Regenerate translations data file --- gui/themes/translations.dat | Bin 340460 -> 340940 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 97d69b400c..934aaeaebe 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 078c09c13e5ffa2266bccfd85c38a93d730a02e6 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 9 Jul 2012 01:27:39 +0300 Subject: SCI: Update comments in kGetAngleWorker() --- engines/sci/engine/kmath.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp index 05c8845288..a643fbe37a 100644 --- a/engines/sci/engine/kmath.cpp +++ b/engines/sci/engine/kmath.cpp @@ -89,6 +89,9 @@ uint16 kGetAngleWorker(int16 x1, int16 y1, int16 x2, int16 y2) { // differences from the original, which uses custom implementation of atan(). // The differences in the return values are the cause of bug #3540976 // and perhaps bug #3037267 as well. + // The results of this function match the expected results of SCI0, but not + // SCI1 (hence the bug in Longbow). We need to find the point in history + // when this function was changed. // HACK: Return the expected value for Longbow, scene 150 (bug #3540976). // This is a temporary solution, till the function returns the expected @@ -128,7 +131,6 @@ uint16 kGetAngleWorker(int16 x1, int16 y1, int16 x2, int16 y2) { // Convert from grads to degrees by merging grad 0 with grad 1, // grad 10 with grad 11, grad 20 with grad 21, etc. This leads to // "degrees" that equal either one or two grads. - // This subtraction is meant to change from 400 "degrees" into 360 degrees angle -= (angle + 9) / 10; return angle; } -- cgit v1.2.3 From b8354e27ae1c81578d9ac279dcba9bf09ccec058 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 9 Jul 2012 01:31:25 +0300 Subject: TINSEL: Fix bug #3541230 - "DW: PSX version locks up after using the book" Removed the superfluous MIDI offset storing code. Now, the MIDI buffer is re-read when the music loops. This removes a static variable and also fixes another bug in the SEQ decoder. --- engines/tinsel/music.cpp | 95 ++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 52 deletions(-) diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp index fa5334a033..a226feb656 100644 --- a/engines/tinsel/music.cpp +++ b/engines/tinsel/music.cpp @@ -140,7 +140,6 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) { } // the index and length of the last tune loaded - static uint32 dwLastMidiIndex = 0; // FIXME: Avoid non-const global vars uint32 dwSeqLen = 0; // length of the sequence // Support for external music from the music enhancement project @@ -181,61 +180,53 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) { if (dwFileOffset == 0) return true; - if (dwFileOffset != dwLastMidiIndex) { - Common::File midiStream; - - // open MIDI sequence file in binary mode - if (!midiStream.open(MIDI_FILE)) - error(CANNOT_FIND_FILE, MIDI_FILE); - - // update index of last tune loaded - dwLastMidiIndex = dwFileOffset; - - // move to correct position in the file - midiStream.seek(dwFileOffset, SEEK_SET); - - // read the length of the sequence - dwSeqLen = midiStream.readUint32LE(); - - // make sure buffer is large enough for this sequence - assert(dwSeqLen > 0 && dwSeqLen <= g_midiBuffer.size); - - // stop any currently playing tune - _vm->_midiMusic->stop(); - - // read the sequence - if (midiStream.read(g_midiBuffer.pDat, dwSeqLen) != dwSeqLen) - error(FILE_IS_CORRUPT, MIDI_FILE); - - midiStream.close(); - - // WORKAROUND for bug #2820054 "DW1: No intro music at first start on Wii", - // which actually affects all ports, since it's specific to the GRA version. - // - // The GRA version does not seem to set the channel volume at all for the first - // intro track, thus we need to do that here. We only initialize the channels - // used in that sequence. And we are using 127 as default channel volume. - // - // Only in the GRA version dwFileOffset can be "38888", just to be sure, we - // check for the SCN files feature flag not being set though. - if (_vm->getGameID() == GID_DW1 && dwFileOffset == 38888 && !(_vm->getFeatures() & GF_SCNFILES)) { - _vm->_midiMusic->send(0x7F07B0 | 3); - _vm->_midiMusic->send(0x7F07B0 | 5); - _vm->_midiMusic->send(0x7F07B0 | 8); - _vm->_midiMusic->send(0x7F07B0 | 10); - _vm->_midiMusic->send(0x7F07B0 | 13); - } + Common::File midiStream; + + // open MIDI sequence file in binary mode + if (!midiStream.open(MIDI_FILE)) + error(CANNOT_FIND_FILE, MIDI_FILE); - _vm->_midiMusic->playMIDI(dwSeqLen, bLoop); + // move to correct position in the file + midiStream.seek(dwFileOffset, SEEK_SET); - // Store the length - //dwLastSeqLen = dwSeqLen; - } else { - // dwFileOffset == dwLastMidiIndex - _vm->_midiMusic->stop(); - _vm->_midiMusic->playMIDI(dwSeqLen, bLoop); + // read the length of the sequence + dwSeqLen = midiStream.readUint32LE(); + + // make sure buffer is large enough for this sequence + assert(dwSeqLen > 0 && dwSeqLen <= g_midiBuffer.size); + + // stop any currently playing tune + _vm->_midiMusic->stop(); + + // read the sequence. This needs to be read again before playSEQ() is + // called even if the music is restarting, as playSEQ() reads the file + // name off the buffer itself. However, that function adds SMF headers + // to the buffer, thus if it's read again, the SMF headers will be read + // and the filename will always be 'MThd'. + if (midiStream.read(g_midiBuffer.pDat, dwSeqLen) != dwSeqLen) + error(FILE_IS_CORRUPT, MIDI_FILE); + + midiStream.close(); + + // WORKAROUND for bug #2820054 "DW1: No intro music at first start on Wii", + // which actually affects all ports, since it's specific to the GRA version. + // + // The GRA version does not seem to set the channel volume at all for the first + // intro track, thus we need to do that here. We only initialize the channels + // used in that sequence. And we are using 127 as default channel volume. + // + // Only in the GRA version dwFileOffset can be "38888", just to be sure, we + // check for the SCN files feature flag not being set though. + if (_vm->getGameID() == GID_DW1 && dwFileOffset == 38888 && !(_vm->getFeatures() & GF_SCNFILES)) { + _vm->_midiMusic->send(0x7F07B0 | 3); + _vm->_midiMusic->send(0x7F07B0 | 5); + _vm->_midiMusic->send(0x7F07B0 | 8); + _vm->_midiMusic->send(0x7F07B0 | 10); + _vm->_midiMusic->send(0x7F07B0 | 13); } + _vm->_midiMusic->playMIDI(dwSeqLen, bLoop); + return true; } -- cgit v1.2.3 From 0cf00ddfe2d985bdd00f5fb06ee5bfb2f8683831 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 9 Jul 2012 01:49:58 +0200 Subject: GUI: Make container widget a bit more container like. Now it is possible to add sub widgets to a ContainerWidget and allow for these to get events too. --- gui/widget.cpp | 20 ++++++++++++++++++++ gui/widget.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/gui/widget.cpp b/gui/widget.cpp index 3c26f1135b..4babce66fb 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -711,6 +711,26 @@ ContainerWidget::ContainerWidget(GuiObject *boss, const Common::String &name) : _type = kContainerWidget; } +ContainerWidget::~ContainerWidget() { + // We also remove the widget from the boss to avoid segfaults, when the + // deleted widget is an active widget in the boss. + for (Widget *w = _firstWidget; w; w = w->next()) { + _boss->removeWidget(w); + } +} + +Widget *ContainerWidget::findWidget(int x, int y) { + return findWidgetInChain(_firstWidget, x, y); +} + +void ContainerWidget::removeWidget(Widget *widget) { + // We also remove the widget from the boss to avoid a reference to a + // widget not in the widget chain anymore. + _boss->removeWidget(widget); + + Widget::removeWidget(widget); +} + void ContainerWidget::drawWidget() { g_gui.theme()->drawWidgetBackground(Common::Rect(_x, _y, _x + _w, _y + _h), 0, ThemeEngine::kWidgetBackgroundBorder); } diff --git a/gui/widget.h b/gui/widget.h index bcc9a3f6d3..6f710f302f 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -368,7 +368,10 @@ class ContainerWidget : public Widget { public: ContainerWidget(GuiObject *boss, int x, int y, int w, int h); ContainerWidget(GuiObject *boss, const Common::String &name); + ~ContainerWidget(); + virtual Widget *findWidget(int x, int y); + virtual void removeWidget(Widget *widget); protected: void drawWidget(); }; -- cgit v1.2.3 From e37c0be0d91029284cee1e3ff895de15e59248f8 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 9 Jul 2012 02:17:57 +0200 Subject: GUI: Fix missing button background in grid based chooser. Now the thumbnail button and the descriptions are sub widgets of the container widget. --- gui/saveload-dialog.cpp | 14 ++++---------- gui/saveload-dialog.h | 2 -- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index d7fa9c686a..cf97737a1b 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -611,15 +611,13 @@ void LoadChooserThumbnailed::reflowLayout() { ContainerWidget *container = new ContainerWidget(this, curX, y, containerWidth, containerHeight); container->setVisible(false); - int dstY = y + containerFrameHeightAdd / 2; - int dstX = curX + containerFrameWidthAdd / 2; + int dstY = containerFrameHeightAdd / 2; + int dstX = containerFrameWidthAdd / 2; - PicButtonWidget *button = new PicButtonWidget(this, dstX, dstY, buttonWidth, buttonHeight, 0, curLine * _columns + curColumn + 1); - button->setVisible(false); + PicButtonWidget *button = new PicButtonWidget(container, dstX, dstY, buttonWidth, buttonHeight, 0, curLine * _columns + curColumn + 1); dstY += buttonHeight; - StaticTextWidget *description = new StaticTextWidget(this, dstX, dstY, buttonWidth, kLineHeight, Common::String(), Graphics::kTextAlignLeft); - description->setVisible(false); + StaticTextWidget *description = new StaticTextWidget(container, dstX, dstY, buttonWidth, kLineHeight, Common::String(), Graphics::kTextAlignLeft); _buttons.push_back(SlotButton(container, button, description)); } @@ -642,10 +640,6 @@ void LoadChooserThumbnailed::destroyButtons() { for (ButtonArray::iterator i = _buttons.begin(), end = _buttons.end(); i != end; ++i) { removeWidget(i->container); delete i->container; - removeWidget(i->button); - delete i->button; - removeWidget(i->description); - delete i->description; } _buttons.clear(); diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h index e169dbf613..a604773142 100644 --- a/gui/saveload-dialog.h +++ b/gui/saveload-dialog.h @@ -149,8 +149,6 @@ private: void setVisible(bool state) { container->setVisible(state); - button->setVisible(state); - description->setVisible(state); } }; typedef Common::Array ButtonArray; -- cgit v1.2.3 From bed2eb20cdcfccc3bf1e9b24f7466b678332d601 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Mon, 9 Jul 2012 09:11:31 +0200 Subject: MOHAWK: Restart anims when LiveText plays them. --- engines/mohawk/livingbooks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index 7f7df66e53..a0671d18d5 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -3464,7 +3464,7 @@ void LBLiveTextItem::update() { // TODO: check this in RE LBItem *item = _vm->getItemById(_words[_currentWord].itemId); if (item) - item->togglePlaying(false); + item->togglePlaying(false, true); _currentWord = 0xFFFF; } -- cgit v1.2.3 From 19bd379e8bcceb3287673cbfd0388b733ced778f Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 9 Jul 2012 12:38:50 +0100 Subject: I18N: Update Hungarian translation from patch #3541507 --- po/hu_HU.po | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/po/hu_HU.po b/po/hu_HU.po index 29ad6c3aeb..828659dea6 100644 --- a/po/hu_HU.po +++ b/po/hu_HU.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-07-08 12:25+0100\n" -"PO-Revision-Date: 2012-06-25 06:21+0100\n" +"PO-Revision-Date: 2012-07-09 05:58+0100\n" "Last-Translator: George Kormendi \n" "Language-Team: Hungarian\n" "MIME-Version: 1.0\n" @@ -2178,7 +2178,6 @@ msgid "Choose Spell" msgstr "Válassz varázslatot" #: engines/kyra/sound_midi.cpp:475 -#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" @@ -2186,11 +2185,11 @@ msgid "" "General MIDI ones. It is still possible that\n" "some tracks sound incorrect." msgstr "" -"Úgy néz ki egy General MIDI eszközt használsz,\n" -"a játék csak Roland MT32 MIDI eszközt támogat.\n" -"Cseréld ki Roland MT32 hangszerekre\n" -"a General MIDI-t. Különben néhány\n" -"sávot nem lehet rendesen lejátszani." +"Úgy tûnik, egy General MIDI eszközt használsz,\n" +"de a játék csak Roland MT32 MIDI eszközt támogat.\n" +"Megpróbáljuk lecserélni a Roland MT32 hangszereket\n" +"General MIDIre. Továbbra is lehetséges hogy\n" +"néhány hangsáv helytelenül hangzik." #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" -- cgit v1.2.3 From 9a90f316dc29a37234a46457b4593aaddc24fa4c Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 9 Jul 2012 12:39:41 +0100 Subject: I18N: Update Italian translation This was sent by Matteo by email. --- po/it_IT.po | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/po/it_IT.po b/po/it_IT.po index d4f8256c83..164171ce8f 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-07-08 12:25+0100\n" -"PO-Revision-Date: 2012-06-29 14:33+0100\n" +"PO-Revision-Date: 2012-07-09 09:30+0100\n" "Last-Translator: Matteo 'Maff' Angelino \n" "Language-Team: Italian\n" "MIME-Version: 1.0\n" @@ -2194,7 +2194,6 @@ msgid "Choose Spell" msgstr "Scegli incantesimo" #: engines/kyra/sound_midi.cpp:475 -#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" @@ -2206,7 +2205,7 @@ msgstr "" "General MIDI, ma il gioco supporta solo Roland\n" "MT32 MIDI. Tenteremo di mappare gli strumenti\n" "Roland MT32 in quelli General MIDI. Alcune tracce\n" -"potrebbero non essere riprodotte correttamente." +"potrebbero avere un suono non corretto." #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" -- cgit v1.2.3 From 1153133627d2d3c4a7cc02963051992bbfc00345 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 9 Jul 2012 12:40:09 +0100 Subject: I18N: Regenerate translations data file --- gui/themes/translations.dat | Bin 340940 -> 341409 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 934aaeaebe..9735e99fca 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From bc0bd33d4dfd448db989e84bcc67e54183b21e39 Mon Sep 17 00:00:00 2001 From: Steffen Nyeland Date: Mon, 9 Jul 2012 20:30:32 +0200 Subject: Updated da_DA file --- po/da_DA.po | 769 ++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 438 insertions(+), 331 deletions(-) diff --git a/po/da_DA.po b/po/da_DA.po index d3a39db440..c2d55f82cd 100644 --- a/po/da_DA.po +++ b/po/da_DA.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-07-08 12:25+0100\n" -"PO-Revision-Date: 2012-06-29 19:45+0100\n" +"PO-Revision-Date: 2012-07-09 20:27+0100\n" "Last-Translator: Steffen Nyeland \n" "Language-Team: Steffen Nyeland \n" "MIME-Version: 1.0\n" @@ -35,7 +35,8 @@ msgstr "Tilg msgid "Go up" msgstr "Gå op" -#: gui/browser.cpp:66 gui/browser.cpp:68 +#: gui/browser.cpp:66 +#: gui/browser.cpp:68 msgid "Go to previous directory level" msgstr "Gå til forrige biblioteks niveau" @@ -44,24 +45,37 @@ msgctxt "lowres" msgid "Go up" msgstr "Gå op" -#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 +#: gui/browser.cpp:69 +#: gui/chooser.cpp:45 +#: gui/KeysDialog.cpp:43 +#: gui/launcher.cpp:345 +#: gui/massadd.cpp:94 +#: gui/options.cpp:1228 +#: gui/saveload.cpp:64 +#: gui/saveload.cpp:173 +#: gui/themebrowser.cpp:54 +#: engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 +#: engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" msgstr "Fortryd" -#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55 +#: gui/browser.cpp:70 +#: gui/chooser.cpp:46 +#: gui/themebrowser.cpp:55 msgid "Choose" msgstr "Vælg" -#: gui/gui-manager.cpp:115 engines/scumm/help.cpp:125 -#: engines/scumm/help.cpp:140 engines/scumm/help.cpp:165 -#: engines/scumm/help.cpp:191 engines/scumm/help.cpp:209 +#: gui/gui-manager.cpp:115 +#: engines/scumm/help.cpp:125 +#: engines/scumm/help.cpp:140 +#: engines/scumm/help.cpp:165 +#: engines/scumm/help.cpp:191 +#: engines/scumm/help.cpp:209 #: backends/keymapper/remap-dialog.cpp:52 msgid "Close" msgstr "Luk" @@ -70,19 +84,23 @@ msgstr "Luk" msgid "Mouse click" msgstr "Muse klik" -#: gui/gui-manager.cpp:122 base/main.cpp:300 +#: gui/gui-manager.cpp:122 +#: base/main.cpp:300 msgid "Display keyboard" msgstr "Vis tastatur" -#: gui/gui-manager.cpp:126 base/main.cpp:304 +#: gui/gui-manager.cpp:126 +#: base/main.cpp:304 msgid "Remap keys" msgstr "Kortlæg taster" -#: gui/gui-manager.cpp:129 base/main.cpp:307 +#: gui/gui-manager.cpp:129 +#: base/main.cpp:307 msgid "Toggle FullScreen" msgstr "Skift fuldskærm" -#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145 +#: gui/KeysDialog.h:36 +#: gui/KeysDialog.cpp:145 msgid "Choose an action to map" msgstr "Vælg en handling at kortlægge" @@ -90,17 +108,31 @@ msgstr "V msgid "Map" msgstr "Kortlæg" -#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 -#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 +#: gui/KeysDialog.cpp:42 +#: gui/launcher.cpp:346 +#: gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 +#: gui/massadd.cpp:91 +#: gui/options.cpp:1229 +#: engines/engine.cpp:361 +#: engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 +#: engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 +#: engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 +#: engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 +#: engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 +#: engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 +#: engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 +#: engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 +#: engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 #: backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -110,12 +142,16 @@ msgstr "OK" msgid "Select an action and click 'Map'" msgstr "Vælg en handling og klik 'Kortlæg'" -#: gui/KeysDialog.cpp:80 gui/KeysDialog.cpp:102 gui/KeysDialog.cpp:141 +#: gui/KeysDialog.cpp:80 +#: gui/KeysDialog.cpp:102 +#: gui/KeysDialog.cpp:141 #, c-format msgid "Associated key : %s" msgstr "Tilknyttet tast : %s" -#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143 +#: gui/KeysDialog.cpp:82 +#: gui/KeysDialog.cpp:104 +#: gui/KeysDialog.cpp:143 #, c-format msgid "Associated key : none" msgstr "Tilknyttet tast : ingen" @@ -136,13 +172,11 @@ msgstr "Spil" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 -msgid "" -"Short game identifier used for referring to savegames and running the game " -"from the command line" -msgstr "" -"Kort spil identifikator til brug for gemmer, og for at køre spillet fra " -"kommandolinien" +#: gui/launcher.cpp:191 +#: gui/launcher.cpp:193 +#: gui/launcher.cpp:194 +msgid "Short game identifier used for referring to savegames and running the game from the command line" +msgstr "Kort spil identifikator til brug for gemmer, og for at køre spillet fra kommandolinien" #: gui/launcher.cpp:193 msgctxt "lowres" @@ -153,7 +187,9 @@ msgstr "ID:" msgid "Name:" msgstr "Navn:" -#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 +#: gui/launcher.cpp:198 +#: gui/launcher.cpp:200 +#: gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Fuld titel på spillet" @@ -166,16 +202,17 @@ msgstr "Navn:" msgid "Language:" msgstr "Sprog:" -#: gui/launcher.cpp:204 gui/launcher.cpp:205 -msgid "" -"Language of the game. This will not turn your Spanish game version into " -"English" -msgstr "" -"Spillets sprog. Dette vil ikke ændre din spanske version af spillet til " -"engelsk" +#: gui/launcher.cpp:204 +#: gui/launcher.cpp:205 +msgid "Language of the game. This will not turn your Spanish game version into English" +msgstr "Spillets sprog. Dette vil ikke ændre din spanske version af spillet til engelsk" -#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 -#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 +#: gui/launcher.cpp:206 +#: gui/launcher.cpp:220 +#: gui/options.cpp:80 +#: gui/options.cpp:730 +#: gui/options.cpp:743 +#: gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" @@ -184,7 +221,9 @@ msgstr "" msgid "Platform:" msgstr "Platform:" -#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 +#: gui/launcher.cpp:216 +#: gui/launcher.cpp:218 +#: gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Platform som spillet oprindeligt var designet til" @@ -197,11 +236,15 @@ msgstr "Platform:" msgid "Engine" msgstr "Motor" -#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 +#: gui/launcher.cpp:239 +#: gui/options.cpp:1062 +#: gui/options.cpp:1079 msgid "Graphics" msgstr "Grafik" -#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 +#: gui/launcher.cpp:239 +#: gui/options.cpp:1062 +#: gui/options.cpp:1079 msgid "GFX" msgstr "GFX" @@ -214,7 +257,8 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Overstyr globale grafik indstillinger" -#: gui/launcher.cpp:251 gui/options.cpp:1085 +#: gui/launcher.cpp:251 +#: gui/options.cpp:1085 msgid "Audio" msgstr "Lyd" @@ -227,11 +271,13 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Overstyr globale lyd indstillinger" -#: gui/launcher.cpp:265 gui/options.cpp:1090 +#: gui/launcher.cpp:265 +#: gui/options.cpp:1090 msgid "Volume" msgstr "Lydstyrke" -#: gui/launcher.cpp:267 gui/options.cpp:1092 +#: gui/launcher.cpp:267 +#: gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Lydstyrke" @@ -245,7 +291,8 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Overstyr globale lydstyrke indstillinger" -#: gui/launcher.cpp:280 gui/options.cpp:1100 +#: gui/launcher.cpp:280 +#: gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" @@ -258,7 +305,8 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Overstyr globale MIDI indstillinger" -#: gui/launcher.cpp:294 gui/options.cpp:1106 +#: gui/launcher.cpp:294 +#: gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" @@ -271,11 +319,13 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Overstyr globale MT-32 indstillinger" -#: gui/launcher.cpp:308 gui/options.cpp:1113 +#: gui/launcher.cpp:308 +#: gui/options.cpp:1113 msgid "Paths" msgstr "Stier" -#: gui/launcher.cpp:310 gui/options.cpp:1115 +#: gui/launcher.cpp:310 +#: gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Stier" @@ -289,54 +339,80 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Spil sti:" -#: gui/launcher.cpp:324 gui/options.cpp:1139 +#: gui/launcher.cpp:324 +#: gui/options.cpp:1139 msgid "Extra Path:" msgstr "Ekstra sti:" -#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 +#: gui/launcher.cpp:324 +#: gui/launcher.cpp:326 +#: gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Angiver sti til ekstra data der bruges i spillet" -#: gui/launcher.cpp:326 gui/options.cpp:1141 +#: gui/launcher.cpp:326 +#: gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Ekstra sti:" -#: gui/launcher.cpp:333 gui/options.cpp:1123 +#: gui/launcher.cpp:333 +#: gui/options.cpp:1123 msgid "Save Path:" msgstr "Gemme sti:" -#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 -#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 +#: gui/launcher.cpp:333 +#: gui/launcher.cpp:335 +#: gui/launcher.cpp:336 +#: gui/options.cpp:1123 +#: gui/options.cpp:1125 +#: gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Angiver hvor dine gemmer bliver lagt" -#: gui/launcher.cpp:335 gui/options.cpp:1125 +#: gui/launcher.cpp:335 +#: gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Gemme sti:" -#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 -#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 -#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 -#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 -#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/launcher.cpp:354 +#: gui/launcher.cpp:453 +#: gui/launcher.cpp:511 +#: gui/launcher.cpp:565 +#: gui/options.cpp:1134 +#: gui/options.cpp:1142 +#: gui/options.cpp:1151 +#: gui/options.cpp:1258 +#: gui/options.cpp:1264 +#: gui/options.cpp:1272 +#: gui/options.cpp:1302 +#: gui/options.cpp:1308 +#: gui/options.cpp:1315 +#: gui/options.cpp:1408 +#: gui/options.cpp:1411 #: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Ingen" -#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 -#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 +#: gui/launcher.cpp:359 +#: gui/launcher.cpp:459 +#: gui/launcher.cpp:569 +#: gui/options.cpp:1252 +#: gui/options.cpp:1296 +#: gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standard" -#: gui/launcher.cpp:504 gui/options.cpp:1417 +#: gui/launcher.cpp:504 +#: gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Vælg SoundFont" -#: gui/launcher.cpp:523 gui/launcher.cpp:677 +#: gui/launcher.cpp:523 +#: gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Vælg bibliotek med spil data" @@ -352,11 +428,13 @@ msgstr "V msgid "This game ID is already taken. Please choose another one." msgstr "Dette spil ID er allerede i brug. Vælg venligst et andet." -#: gui/launcher.cpp:621 engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 +#: engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~A~fslut" -#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 +#: backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Slut ScummVM" @@ -364,7 +442,8 @@ msgstr "Slut ScummVM" msgid "A~b~out..." msgstr "~O~m..." -#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 +#: backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "Om ScummVM" @@ -392,11 +471,13 @@ msgstr "Ind~l~ msgid "Load savegame for selected game" msgstr "Indlæs gemmer for det valgte spil" -#: gui/launcher.cpp:633 gui/launcher.cpp:1120 +#: gui/launcher.cpp:633 +#: gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~T~ilføj spil..." -#: gui/launcher.cpp:633 gui/launcher.cpp:640 +#: gui/launcher.cpp:633 +#: gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Hold Skift for at tilføje flere" @@ -404,7 +485,8 @@ msgstr "Hold Skift for at tilf msgid "~E~dit Game..." msgstr "~R~ediger spil..." -#: gui/launcher.cpp:635 gui/launcher.cpp:642 +#: gui/launcher.cpp:635 +#: gui/launcher.cpp:642 msgid "Change game options" msgstr "Ændre spil indstillinger" @@ -412,11 +494,13 @@ msgstr " msgid "~R~emove Game" msgstr "~F~jern spil" -#: gui/launcher.cpp:637 gui/launcher.cpp:644 +#: gui/launcher.cpp:637 +#: gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Fjerner spil fra listen. Spillets data filer forbliver uberørt" -#: gui/launcher.cpp:640 gui/launcher.cpp:1120 +#: gui/launcher.cpp:640 +#: gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~T~ilføj spil..." @@ -435,31 +519,36 @@ msgstr "~F~jern spil" msgid "Search in game list" msgstr "Søg i spil liste" -#: gui/launcher.cpp:656 gui/launcher.cpp:1167 +#: gui/launcher.cpp:656 +#: gui/launcher.cpp:1167 msgid "Search:" msgstr "Søg:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 +#: gui/launcher.cpp:680 +#: engines/dialogs.cpp:114 +#: engines/mohawk/myst.cpp:255 +#: engines/mohawk/riven.cpp:716 +#: engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Indlæs spil:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 +#: gui/launcher.cpp:680 +#: engines/dialogs.cpp:114 +#: engines/scumm/dialogs.cpp:188 +#: engines/mohawk/myst.cpp:255 +#: engines/mohawk/riven.cpp:716 +#: engines/cruise/menu.cpp:214 +#: backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Indlæs" #: gui/launcher.cpp:788 -msgid "" -"Do you really want to run the mass game detector? This could potentially add " -"a huge number of games." -msgstr "" -"Vil du virkelig køre fler spils detektoren? Dette kunne potentielt tilføje " -"et stort antal spil." +msgid "Do you really want to run the mass game detector? This could potentially add a huge number of games." +msgstr "Vil du virkelig køre fler spils detektoren? Dette kunne potentielt tilføje et stort antal spil." -#: gui/launcher.cpp:789 gui/launcher.cpp:937 +#: gui/launcher.cpp:789 +#: gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -467,7 +556,8 @@ msgstr "" msgid "Yes" msgstr "Ja" -#: gui/launcher.cpp:789 gui/launcher.cpp:937 +#: gui/launcher.cpp:789 +#: gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -497,8 +587,7 @@ msgstr "Dette spil underst #: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" -msgstr "" -"ScummVM kunne ikke finde en motor, istand til at afvikle det valgte spil!" +msgstr "ScummVM kunne ikke finde en motor, istand til at afvikle det valgte spil!" #: gui/launcher.cpp:1119 msgctxt "lowres" @@ -509,7 +598,8 @@ msgstr "Tilf msgid "Mass Add..." msgstr "Tilføj flere..." -#: gui/massadd.cpp:78 gui/massadd.cpp:81 +#: gui/massadd.cpp:78 +#: gui/massadd.cpp:81 msgid "... progress ..." msgstr "... fremskridt ..." @@ -572,8 +662,11 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 -#: gui/options.cpp:644 gui/options.cpp:852 +#: gui/options.cpp:248 +#: gui/options.cpp:474 +#: gui/options.cpp:575 +#: gui/options.cpp:644 +#: gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Ingen" @@ -602,7 +695,8 @@ msgstr "Grafik tilstand:" msgid "Render mode:" msgstr "Rendere tilstand:" -#: gui/options.cpp:741 gui/options.cpp:742 +#: gui/options.cpp:741 +#: gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Speciel farvereduceringstilstand understøttet a nogle spil" @@ -628,11 +722,14 @@ msgstr "Foretruk. enhed:" msgid "Music Device:" msgstr "Musik enhed:" -#: gui/options.cpp:764 gui/options.cpp:766 +#: gui/options.cpp:764 +#: gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "Angiver foretukket lyd enhed eller lydkort emulator" -#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 +#: gui/options.cpp:764 +#: gui/options.cpp:766 +#: gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Angiver lyd udgangsenhed eller lydkorts emulator" @@ -650,7 +747,8 @@ msgstr "Musik enhed:" msgid "AdLib emulator:" msgstr "AdLib emulator:" -#: gui/options.cpp:793 gui/options.cpp:794 +#: gui/options.cpp:793 +#: gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib bliver brugt til musik i mange spil" @@ -658,13 +756,10 @@ msgstr "AdLib bliver brugt til musik i mange spil" msgid "Output rate:" msgstr "Udgangsfrekvens:" -#: gui/options.cpp:804 gui/options.cpp:805 -msgid "" -"Higher value specifies better sound quality but may be not supported by your " -"soundcard" -msgstr "" -"Højere værdi angiver bedre lyd kvalitet, men understøttes måske ikke af dit " -"lydkort" +#: gui/options.cpp:804 +#: gui/options.cpp:805 +msgid "Higher value specifies better sound quality but may be not supported by your soundcard" +msgstr "Højere værdi angiver bedre lyd kvalitet, men understøttes måske ikke af dit lydkort" #: gui/options.cpp:815 msgid "GM Device:" @@ -672,13 +767,14 @@ msgstr "GM enhed:" #: gui/options.cpp:815 msgid "Specifies default sound device for General MIDI output" -msgstr "Angiver standard lyd enhed for General MIDI-udgang" +msgstr "Angiver standard lyd enhed for Generel MIDI-udgang" #: gui/options.cpp:826 msgid "Don't use General MIDI music" -msgstr "Brug ikke General MIDI musik" +msgstr "Brug ikke Generel MIDI musik" -#: gui/options.cpp:837 gui/options.cpp:899 +#: gui/options.cpp:837 +#: gui/options.cpp:899 msgid "Use first available device" msgstr "Brug første tilgængelig enhed" @@ -686,7 +782,9 @@ msgstr "Brug f msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 +#: gui/options.cpp:849 +#: gui/options.cpp:851 +#: gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "SoundFont er understøttet af nogle lydkort, Fluidsynth og Timidity" @@ -719,13 +817,10 @@ msgstr "Angiver standard lyd enhed for Roland MT-32/LAPC1/CM32I/CM64 udgang" msgid "True Roland MT-32 (disable GM emulation)" msgstr "Ægte Roland MT-32 (undlad GM emulering)" -#: gui/options.cpp:875 gui/options.cpp:877 -msgid "" -"Check if you want to use your real hardware Roland-compatible sound device " -"connected to your computer" -msgstr "" -"Kontroller om du vil bruge din rigtige hardware Roland-kompatible lyd enhed " -"tilsluttet til din computer" +#: gui/options.cpp:875 +#: gui/options.cpp:877 +msgid "Check if you want to use your real hardware Roland-compatible sound device connected to your computer" +msgstr "Kontroller om du vil bruge din rigtige hardware Roland-kompatible lyd enhed tilsluttet til din computer" #: gui/options.cpp:877 msgctxt "lowres" @@ -738,7 +833,7 @@ msgstr "Aktiv #: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" -msgstr "Sluk for General MIDI kortlægning for spil med Roland MT-32 lydspor" +msgstr "Sluk for Generel MIDI kortlægning for spil med Roland MT-32 lydspor" #: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" @@ -748,11 +843,13 @@ msgstr "Brug ikke Roland MT-32 musik" msgid "Text and Speech:" msgstr "Tekst og tale:" -#: gui/options.cpp:920 gui/options.cpp:930 +#: gui/options.cpp:920 +#: gui/options.cpp:930 msgid "Speech" msgstr "Tale" -#: gui/options.cpp:921 gui/options.cpp:931 +#: gui/options.cpp:921 +#: gui/options.cpp:931 msgid "Subtitles" msgstr "Undertekster" @@ -808,7 +905,9 @@ msgstr "Mute alle" msgid "SFX volume:" msgstr "SFX lydstyrke:" -#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 +#: gui/options.cpp:962 +#: gui/options.cpp:964 +#: gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Lydstyrke for specielle lydeffekter" @@ -835,7 +934,9 @@ msgctxt "lowres" msgid "Theme Path:" msgstr "Tema sti:" -#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 +#: gui/options.cpp:1139 +#: gui/options.cpp:1141 +#: gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Angiver sti til ekstra data brugt af alle spil eller ScummVM" @@ -911,26 +1012,26 @@ msgid "Select directory for plugins" msgstr "Vælg bibliotek for plugins" #: gui/options.cpp:1450 -msgid "" -"The theme you selected does not support your current language. If you want " -"to use this theme you need to switch to another language first." -msgstr "" -"Temaet du valgte understøtter ikke dit aktuelle sprog. Hvis du ønsker at " -"bruge dette tema, skal du skifte til et andet sprog først." +msgid "The theme you selected does not support your current language. If you want to use this theme you need to switch to another language first." +msgstr "Temaet du valgte understøtter ikke dit aktuelle sprog. Hvis du ønsker at bruge dette tema, skal du skifte til et andet sprog først." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload.cpp:59 +#: gui/saveload.cpp:257 msgid "No date saved" msgstr "Ingen dato gemt" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload.cpp:60 +#: gui/saveload.cpp:258 msgid "No time saved" msgstr "Intet tidspunkt gemt" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload.cpp:61 +#: gui/saveload.cpp:259 msgid "No playtime saved" msgstr "Ingen spilletid gemt" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload.cpp:68 +#: gui/saveload.cpp:173 msgid "Delete" msgstr "Slet" @@ -950,7 +1051,8 @@ msgstr "Tid:" msgid "Playtime: " msgstr "Spilletid:" -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload.cpp:305 +#: gui/saveload.cpp:372 msgid "Untitled savestate" msgstr "Unavngivet gemmetilstand" @@ -983,7 +1085,10 @@ msgstr "Antialias renderer (16bpp)" msgid "Antialiased (16bpp)" msgstr "Antialias (16bpp)" -#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 +#: gui/widget.cpp:322 +#: gui/widget.cpp:324 +#: gui/widget.cpp:330 +#: gui/widget.cpp:332 msgid "Clear value" msgstr "Slet værdi" @@ -996,13 +1101,15 @@ msgstr "Motor underst msgid "Menu" msgstr "Menu" -#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 +#: backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Spring over" -#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 +#: backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pause" @@ -1090,8 +1197,7 @@ msgstr "Spillet i '%s' ser ud til at v #: engines/advancedDetector.cpp:325 msgid "Please, report the following data to the ScummVM team along with name" -msgstr "" -"Venligst, rapportere følgende data til ScummVM holdet sammen med navnet" +msgstr "Venligst, rapportere følgende data til ScummVM holdet sammen med navnet" #: engines/advancedDetector.cpp:327 msgid "of the game you tried to add and its version/language/etc.:" @@ -1121,22 +1227,28 @@ msgstr "H~j~ msgid "~A~bout" msgstr "~O~m" -#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 +#: engines/dialogs.cpp:104 +#: engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "~R~etur til spiloversigt" -#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 +#: engines/dialogs.cpp:106 +#: engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~R~etur til oversigt" -#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/dialogs.cpp:115 +#: engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:735 msgid "Save game:" msgstr "Gemmer:" -#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/dialogs.cpp:115 +#: engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 +#: engines/cruise/menu.cpp:212 #: engines/sci/engine/kfile.cpp:735 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 @@ -1147,30 +1259,22 @@ msgid "Save" msgstr "Gem" #: engines/dialogs.cpp:144 -msgid "" -"Sorry, this engine does not currently provide in-game help. Please consult " -"the README for basic information, and for instructions on how to obtain " -"further assistance." -msgstr "" -"Beklager, denne motor leverer i øjeblikket ikke spil hjælp. Se venligst " -"README for grundlæggende oplysninger, og for at få instruktioner om, hvordan " -"man får yderligere hjælp." +msgid "Sorry, this engine does not currently provide in-game help. Please consult the README for basic information, and for instructions on how to obtain further assistance." +msgstr "Beklager, denne motor leverer i øjeblikket ikke spil hjælp. Se venligst README for grundlæggende oplysninger, og for at få instruktioner om, hvordan man får yderligere hjælp." #: engines/dialogs.cpp:228 #, c-format -msgid "" -"Gamestate save failed (%s)! Please consult the README for basic information, " -"and for instructions on how to obtain further assistance." -msgstr "" -"Gem af spiltilstand fejlede (%s)! Se venligst README for grundlæggende " -"oplysninger, og for at få instruktioner om, hvordan man får yderligere hjælp." +msgid "Gamestate save failed (%s)! Please consult the README for basic information, and for instructions on how to obtain further assistance." +msgstr "Gem af spiltilstand fejlede (%s)! Se venligst README for grundlæggende oplysninger, og for at få instruktioner om, hvordan man får yderligere hjælp." -#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 +#: engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 +#: engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~F~ortryd" @@ -1225,43 +1329,36 @@ msgstr "" #: engines/engine.cpp:426 #, c-format -msgid "" -"Gamestate load failed (%s)! Please consult the README for basic information, " -"and for instructions on how to obtain further assistance." -msgstr "" -"Indlæsning af spiltilstand fejlede (%s)! Se venligst README for " -"grundlæggende oplysninger, og for at få instruktioner om, hvordan man får " -"yderligere hjælp." +msgid "Gamestate load failed (%s)! Please consult the README for basic information, and for instructions on how to obtain further assistance." +msgstr "Indlæsning af spiltilstand fejlede (%s)! Se venligst README for grundlæggende oplysninger, og for at få instruktioner om, hvordan man får yderligere hjælp." #: engines/engine.cpp:439 -msgid "" -"WARNING: The game you are about to start is not yet fully supported by " -"ScummVM. As such, it is likely to be unstable, and any saves you make might " -"not work in future versions of ScummVM." -msgstr "" -"ADVARSEL: Spillet du er ved at starte endnu ikke er fuldt understøttet af " -"ScummVM. Således, er det sandsynligt, at det er ustabilt, og alle gemmer du " -"foretager fungerer muligvis ikke i fremtidige versioner af ScummVM." +msgid "WARNING: The game you are about to start is not yet fully supported by ScummVM. As such, it is likely to be unstable, and any saves you make might not work in future versions of ScummVM." +msgstr "ADVARSEL: Spillet du er ved at starte endnu ikke er fuldt understøttet af ScummVM. Således, er det sandsynligt, at det er ustabilt, og alle gemmer du foretager fungerer muligvis ikke i fremtidige versioner af ScummVM." #: engines/engine.cpp:442 msgid "Start anyway" msgstr "Start alligevel" -#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/agi/detection.cpp:145 +#: engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" msgstr "Brug original gem/indlæs skærme" -#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48 +#: 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 "Brug de originale gem/indlæs skærme, istedet for dem fra ScummVM" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 +#: engines/sci/engine/kfile.cpp:831 msgid "Restore game:" msgstr "Gendan spil:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 +#: engines/sci/engine/kfile.cpp:831 msgid "Restore" msgstr "Gendan" @@ -1294,12 +1391,8 @@ msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Brug IMF/Yamaha FB-01 til MIDI-udgang" #: engines/sci/detection.cpp:401 -msgid "" -"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " -"output" -msgstr "" -"Bruge et IBM Musik Feature-kort eller et Yamaha FB-01 FM synth modul til " -"MIDI-udgang" +msgid "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI output" +msgstr "Bruge et IBM Musik Feature-kort eller et Yamaha FB-01 FM synth modul til MIDI-udgang" #: engines/sci/detection.cpp:411 msgid "Use CD audio" @@ -1314,8 +1407,7 @@ msgid "Use Windows cursors" msgstr "Brug Windows markør" #: engines/sci/detection.cpp:423 -msgid "" -"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgid "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "Brug Windows-markører (mindre og monokrome) i stedet for dem fra DOS" #: engines/sci/detection.cpp:433 @@ -1323,10 +1415,8 @@ msgid "Use silver cursors" msgstr "Brug sølv markør" #: engines/sci/detection.cpp:434 -msgid "" -"Use the alternate set of silver cursors, instead of the normal golden ones" -msgstr "" -"Brug det alternative sæt af sølv markører, i stedet for de normale gyldne" +msgid "Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "Brug det alternative sæt af sølv markører, i stedet for de normale gyldne" #: engines/scumm/dialogs.cpp:175 #, c-format @@ -1363,7 +1453,8 @@ msgstr "Er du sikker p msgid "Play" msgstr "Spil" -#: engines/scumm/dialogs.cpp:191 engines/scumm/help.cpp:82 +#: engines/scumm/dialogs.cpp:191 +#: engines/scumm/help.cpp:82 #: engines/scumm/help.cpp:84 #: backends/platform/symbian/src/SymbianActions.cpp:52 #: backends/platform/wince/CEActionsPocket.cpp:44 @@ -1490,11 +1581,16 @@ msgstr "Mellemrum" msgid "Pause game" msgstr "Pause spil" -#: engines/scumm/help.cpp:79 engines/scumm/help.cpp:84 -#: engines/scumm/help.cpp:95 engines/scumm/help.cpp:96 -#: engines/scumm/help.cpp:97 engines/scumm/help.cpp:98 -#: engines/scumm/help.cpp:99 engines/scumm/help.cpp:100 -#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102 +#: engines/scumm/help.cpp:79 +#: engines/scumm/help.cpp:84 +#: engines/scumm/help.cpp:95 +#: engines/scumm/help.cpp:96 +#: engines/scumm/help.cpp:97 +#: engines/scumm/help.cpp:98 +#: engines/scumm/help.cpp:99 +#: engines/scumm/help.cpp:100 +#: engines/scumm/help.cpp:101 +#: engines/scumm/help.cpp:102 msgid "Ctrl" msgstr "Ctrl" @@ -1502,9 +1598,12 @@ msgstr "Ctrl" msgid "Load game state 1-10" msgstr "Indlæs spil tilstand 1-10" -#: engines/scumm/help.cpp:80 engines/scumm/help.cpp:84 -#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:100 -#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102 +#: engines/scumm/help.cpp:80 +#: engines/scumm/help.cpp:84 +#: engines/scumm/help.cpp:86 +#: engines/scumm/help.cpp:100 +#: engines/scumm/help.cpp:101 +#: engines/scumm/help.cpp:102 msgid "Alt" msgstr "Alt" @@ -1512,7 +1611,8 @@ msgstr "Alt" msgid "Save game state 1-10" msgstr "Gem spil tilstand 1-10" -#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:89 +#: engines/scumm/help.cpp:86 +#: engines/scumm/help.cpp:89 msgid "Enter" msgstr "Enter" @@ -1604,24 +1704,30 @@ msgstr "Spind ordspil p msgid "Main game controls:" msgstr "Vigtigste spilstyring:" -#: engines/scumm/help.cpp:121 engines/scumm/help.cpp:136 +#: engines/scumm/help.cpp:121 +#: engines/scumm/help.cpp:136 #: engines/scumm/help.cpp:161 msgid "Push" msgstr "Skub" -#: engines/scumm/help.cpp:122 engines/scumm/help.cpp:137 +#: engines/scumm/help.cpp:122 +#: engines/scumm/help.cpp:137 #: engines/scumm/help.cpp:162 msgid "Pull" msgstr "Træk" -#: engines/scumm/help.cpp:123 engines/scumm/help.cpp:138 -#: engines/scumm/help.cpp:163 engines/scumm/help.cpp:197 +#: engines/scumm/help.cpp:123 +#: engines/scumm/help.cpp:138 +#: engines/scumm/help.cpp:163 +#: engines/scumm/help.cpp:197 #: engines/scumm/help.cpp:207 msgid "Give" msgstr "Giv" -#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139 -#: engines/scumm/help.cpp:164 engines/scumm/help.cpp:190 +#: engines/scumm/help.cpp:124 +#: engines/scumm/help.cpp:139 +#: engines/scumm/help.cpp:164 +#: engines/scumm/help.cpp:190 #: engines/scumm/help.cpp:208 msgid "Open" msgstr "Åbn" @@ -1634,43 +1740,54 @@ msgstr "G msgid "Get" msgstr "Tag" -#: engines/scumm/help.cpp:128 engines/scumm/help.cpp:152 -#: engines/scumm/help.cpp:170 engines/scumm/help.cpp:198 -#: engines/scumm/help.cpp:213 engines/scumm/help.cpp:224 +#: engines/scumm/help.cpp:128 +#: engines/scumm/help.cpp:152 +#: engines/scumm/help.cpp:170 +#: engines/scumm/help.cpp:198 +#: engines/scumm/help.cpp:213 +#: engines/scumm/help.cpp:224 #: engines/scumm/help.cpp:250 msgid "Use" msgstr "Brug" -#: engines/scumm/help.cpp:129 engines/scumm/help.cpp:141 +#: engines/scumm/help.cpp:129 +#: engines/scumm/help.cpp:141 msgid "Read" msgstr "Læs" -#: engines/scumm/help.cpp:130 engines/scumm/help.cpp:147 +#: engines/scumm/help.cpp:130 +#: engines/scumm/help.cpp:147 msgid "New kid" msgstr "Nyt barn" -#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:153 +#: engines/scumm/help.cpp:131 +#: engines/scumm/help.cpp:153 #: engines/scumm/help.cpp:171 msgid "Turn on" msgstr "Tænd" -#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:154 +#: engines/scumm/help.cpp:132 +#: engines/scumm/help.cpp:154 #: engines/scumm/help.cpp:172 msgid "Turn off" msgstr "Sluk" -#: engines/scumm/help.cpp:142 engines/scumm/help.cpp:167 +#: engines/scumm/help.cpp:142 +#: engines/scumm/help.cpp:167 #: engines/scumm/help.cpp:194 msgid "Walk to" msgstr "Gå til" -#: engines/scumm/help.cpp:143 engines/scumm/help.cpp:168 -#: engines/scumm/help.cpp:195 engines/scumm/help.cpp:210 +#: engines/scumm/help.cpp:143 +#: engines/scumm/help.cpp:168 +#: engines/scumm/help.cpp:195 +#: engines/scumm/help.cpp:210 #: engines/scumm/help.cpp:227 msgid "Pick up" msgstr "Tag op" -#: engines/scumm/help.cpp:144 engines/scumm/help.cpp:169 +#: engines/scumm/help.cpp:144 +#: engines/scumm/help.cpp:169 msgid "What is" msgstr "Hvad er" @@ -1694,11 +1811,13 @@ msgstr "Lav" msgid "Switch" msgstr "Skift" -#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:228 +#: engines/scumm/help.cpp:166 +#: engines/scumm/help.cpp:228 msgid "Look" msgstr "Se" -#: engines/scumm/help.cpp:173 engines/scumm/help.cpp:223 +#: engines/scumm/help.cpp:173 +#: engines/scumm/help.cpp:223 msgid "Talk" msgstr "Tal" @@ -1743,20 +1862,24 @@ msgstr "spil H p msgid "play C major on distaff" msgstr "spil C-dur på rok" -#: engines/scumm/help.cpp:192 engines/scumm/help.cpp:214 +#: engines/scumm/help.cpp:192 +#: engines/scumm/help.cpp:214 msgid "puSh" msgstr "Skub" -#: engines/scumm/help.cpp:193 engines/scumm/help.cpp:215 +#: engines/scumm/help.cpp:193 +#: engines/scumm/help.cpp:215 msgid "pull (Yank)" msgstr "træk (Y)" -#: engines/scumm/help.cpp:196 engines/scumm/help.cpp:212 +#: engines/scumm/help.cpp:196 +#: engines/scumm/help.cpp:212 #: engines/scumm/help.cpp:248 msgid "Talk to" msgstr "Tal til" -#: engines/scumm/help.cpp:199 engines/scumm/help.cpp:211 +#: engines/scumm/help.cpp:199 +#: engines/scumm/help.cpp:211 msgid "Look at" msgstr "Lur på" @@ -1788,8 +1911,10 @@ msgstr "Fremh msgid "Walk" msgstr "Gå" -#: engines/scumm/help.cpp:225 engines/scumm/help.cpp:234 -#: engines/scumm/help.cpp:241 engines/scumm/help.cpp:249 +#: engines/scumm/help.cpp:225 +#: engines/scumm/help.cpp:234 +#: engines/scumm/help.cpp:241 +#: engines/scumm/help.cpp:249 msgid "Inventory" msgstr "Oversigt" @@ -1817,7 +1942,8 @@ msgstr "Slag" msgid "Kick" msgstr "Spark" -#: engines/scumm/help.cpp:239 engines/scumm/help.cpp:247 +#: engines/scumm/help.cpp:239 +#: engines/scumm/help.cpp:247 msgid "Examine" msgstr "Undersøg" @@ -1838,31 +1964,38 @@ msgstr "Gem / Indl msgid "Other game controls:" msgstr "Andre spil kontroller" -#: engines/scumm/help.cpp:257 engines/scumm/help.cpp:267 +#: engines/scumm/help.cpp:257 +#: engines/scumm/help.cpp:267 msgid "Inventory:" msgstr "Oversigt:" -#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:274 +#: engines/scumm/help.cpp:258 +#: engines/scumm/help.cpp:274 msgid "Scroll list up" msgstr "Rul liste op" -#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275 +#: engines/scumm/help.cpp:259 +#: engines/scumm/help.cpp:275 msgid "Scroll list down" msgstr "Rul liste ned" -#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:268 +#: engines/scumm/help.cpp:260 +#: engines/scumm/help.cpp:268 msgid "Upper left item" msgstr "Øverste venstre punkt" -#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:270 +#: engines/scumm/help.cpp:261 +#: engines/scumm/help.cpp:270 msgid "Lower left item" msgstr "Nederste højre punkt" -#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271 +#: engines/scumm/help.cpp:262 +#: engines/scumm/help.cpp:271 msgid "Upper right item" msgstr "Øverste højre punkt" -#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:273 +#: engines/scumm/help.cpp:263 +#: engines/scumm/help.cpp:273 msgid "Lower right item" msgstr "Nederste venstre punkt" @@ -1874,7 +2007,8 @@ msgstr "Midterste h msgid "Middle right item" msgstr "Midterste højre punkt" -#: engines/scumm/help.cpp:279 engines/scumm/help.cpp:284 +#: engines/scumm/help.cpp:279 +#: engines/scumm/help.cpp:284 msgid "Switching characters:" msgstr "Skift personer:" @@ -1890,7 +2024,8 @@ msgstr "Tredie barn" msgid "Fighting controls (numpad):" msgstr "Kamp kontroller (numtast):" -#: engines/scumm/help.cpp:295 engines/scumm/help.cpp:296 +#: engines/scumm/help.cpp:295 +#: engines/scumm/help.cpp:296 #: engines/scumm/help.cpp:297 msgid "Step back" msgstr "Skridt tilbage" @@ -1984,7 +2119,8 @@ msgstr "" "Indbygget MIDI understøttelse kræver Roland opgradering fra LucasArts,\n" "men %s mangler. Bruger AdLib i stedet." -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 +#: engines/agos/saveload.cpp:202 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1995,7 +2131,8 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 +#: engines/agos/saveload.cpp:167 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2006,7 +2143,8 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 +#: engines/agos/saveload.cpp:210 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2018,17 +2156,12 @@ msgstr "" "%s" #: engines/scumm/scumm.cpp:2512 -msgid "" -"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " -"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " -"directory inside the Tentacle game directory." -msgstr "" -"Normalt ville Maniac Mansion begynde nu. Men ScummVM kan ikke gøre det " -"endnu. For at spille det, gå til 'Tilføj spil' i ScummVM start-menuen og " -"vælg 'Maniac' mappen inde i Tentacle spillets mappe." +msgid "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' directory inside the Tentacle game directory." +msgstr "Normalt ville Maniac Mansion begynde nu. Men ScummVM kan ikke gøre det endnu. For at spille det, gå til 'Tilføj spil' i ScummVM start-menuen og vælg 'Maniac' mappen inde i Tentacle spillets mappe." #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171 +#: engines/mohawk/dialogs.cpp:92 +#: engines/mohawk/dialogs.cpp:171 msgid "~Z~ip Mode Activated" msgstr "~Z~ip tilstand aktiveret" @@ -2058,12 +2191,14 @@ msgstr "~V~andeffekter aktiveret" msgid "Cutscene file '%s' not found!" msgstr "Filmsekvens fil '%s' ikke fundet!" -#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 +#: engines/gob/inter_playtoons.cpp:256 +#: engines/gob/inter_v2.cpp:1287 #: engines/tinsel/saveload.cpp:502 msgid "Failed to load game state from file." msgstr "Mislykkedes at indlæse spil tilstand fra fil." -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 +#: engines/tinsel/saveload.cpp:515 msgid "Failed to save game state to file." msgstr "Mislykkedes at gemme spil tilstand til fil." @@ -2182,7 +2317,6 @@ msgid "Choose Spell" msgstr "Vælg magi" #: engines/kyra/sound_midi.cpp:475 -#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" @@ -2190,17 +2324,19 @@ msgid "" "General MIDI ones. It is still possible that\n" "some tracks sound incorrect." msgstr "" -"Det lader til at du en General MIDI-enhed,\n" +"Det lader til at du bruger en Generel MIDI-enhed,\n" "men dit spil kun understøtter Roland MT32 MIDI.\n" "Vi forsøger at kortlægge Roland MT32 instrumenterne til\n" -"dem i General MIDI. Trods det kan det ske\n" -"at nogle spor ikke vil blive korrekt afspillet." +"dem i Generel MIDI. Trods det kan det ske\n" +"at nogle stykker ikke lyder korrekt." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 +#: engines/queen/queen.cpp:59 +#: engines/sky/detection.cpp:44 msgid "Floppy intro" msgstr "Diskette intro" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 +#: engines/queen/queen.cpp:60 +#: engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" msgstr "Brug diskette versionens intro (kun CD version)" @@ -2225,37 +2361,33 @@ msgstr "" msgid "PSX stream cutscene '%s' cannot be played in paletted mode" msgstr "PSX stream filmsekvens '%s' kan ikke afspilles i palette tilstand" -#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 +#: engines/sword1/animation.cpp:560 +#: engines/sword2/animation.cpp:455 msgid "DXA cutscenes found but ScummVM has been built without zlib support" -msgstr "" -"DXA filmsekvenser fundet, men ScummVM er bygget uden zlib understøttelse" +msgstr "DXA filmsekvenser fundet, men ScummVM er bygget uden zlib understøttelse" -#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465 +#: engines/sword1/animation.cpp:570 +#: engines/sword2/animation.cpp:465 msgid "MPEG2 cutscenes are no longer supported" msgstr "MPEG2 filmsekvenser understøttes ikke længere" -#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473 +#: engines/sword1/animation.cpp:576 +#: engines/sword2/animation.cpp:473 #, c-format msgid "Cutscene '%s' not found" msgstr "Filmsekvens '%s' ikke fundet" #: engines/sword1/control.cpp:863 msgid "" -"ScummVM found that you have old savefiles for Broken Sword 1 that should be " -"converted.\n" -"The old save game format is no longer supported, so you will not be able to " -"load your games if you don't convert them.\n" +"ScummVM found that you have old savefiles for Broken Sword 1 that should be converted.\n" +"The old save game format is no longer supported, so you will not be able to load your games if you don't convert them.\n" "\n" -"Press OK to convert them now, otherwise you will be asked again the next " -"time you start the game.\n" +"Press OK to convert them now, otherwise you will be asked again the next time you start the game.\n" msgstr "" -"ScummVM har konstateret, at du har gamle gemmer for Broken Sword 1, der skal " -"konverteres.\n" -"Det gamle gemte spil format understøttes ikke længere, så vil du ikke være i " -"stand til at indlæse dine spil, hvis du ikke konvertere dem.\n" +"ScummVM har konstateret, at du har gamle gemmer for Broken Sword 1, der skal konverteres.\n" +"Det gamle gemte spil format understøttes ikke længere, så vil du ikke være i stand til at indlæse dine spil, hvis du ikke konvertere dem.\n" "\n" -"Tryk på OK for at konvertere dem nu, ellers vil du blive spurgt igen, næste " -"gang du starter spillet.\n" +"Tryk på OK for at konvertere dem nu, ellers vil du blive spurgt igen, næste gang du starter spillet.\n" #: engines/sword1/control.cpp:1232 #, c-format @@ -2279,10 +2411,8 @@ msgid "This is the end of the Broken Sword 1 Demo" msgstr "Dette er slutningen af Broken Sword 1 demoen" #: engines/sword2/animation.cpp:435 -msgid "" -"PSX cutscenes found but ScummVM has been built without RGB color support" -msgstr "" -"PSX filmsekvenser fundet, men ScummVM er bygget uden RGB farve understøttelse" +msgid "PSX cutscenes found but ScummVM has been built without RGB color support" +msgstr "PSX filmsekvenser fundet, men ScummVM er bygget uden RGB farve understøttelse" #: engines/sword2/sword2.cpp:79 msgid "Show object labels" @@ -2311,17 +2441,13 @@ msgstr "Gemmer spil..." #: engines/parallaction/saveload.cpp:272 msgid "" -"ScummVM found that you have old savefiles for Nippon Safes that should be " -"renamed.\n" -"The old names are no longer supported, so you will not be able to load your " -"games if you don't convert them.\n" +"ScummVM found that you have old savefiles for Nippon Safes that should be renamed.\n" +"The old names are no longer supported, so you will not be able to load your games if you don't convert them.\n" "\n" "Press OK to convert them now, otherwise you will be asked next time.\n" msgstr "" -"ScummVM har konstateret, at du har gamle gemmer for Nippon Safes, der skal " -"omdøbes.\n" -"De gamle navne er ikke længere understøttet, så du vil ikke være i stand til " -"at indlæse dine spil, hvis du ikke konvertere dem.\n" +"ScummVM har konstateret, at du har gamle gemmer for Nippon Safes, der skal omdøbes.\n" +"De gamle navne er ikke længere understøttet, så du vil ikke være i stand til at indlæse dine spil, hvis du ikke konvertere dem.\n" "\n" "Tryk på OK for at konvertere dem nu, ellers vil du blive spurgt næste gang.\n" @@ -2331,13 +2457,11 @@ msgstr "ScummVM konverterede med succes alle dine gemmer." #: engines/parallaction/saveload.cpp:321 msgid "" -"ScummVM printed some warnings in your console window and can't guarantee all " -"your files have been converted.\n" +"ScummVM printed some warnings in your console window and can't guarantee all your files have been converted.\n" "\n" "Please report to the team." msgstr "" -"ScummVM udskrev nogle advarsler i dit konsol vindue, og kan ikke garantere " -"at alle dine filer er blevet konverteret.\n" +"ScummVM udskrev nogle advarsler i dit konsol vindue, og kan ikke garantere at alle dine filer er blevet konverteret.\n" "\n" "Venligst rapportér til holdet." @@ -2351,43 +2475,30 @@ msgstr "DOSBox OPL emulator" #: audio/mididrv.cpp:209 #, c-format -msgid "" -"The selected audio device '%s' was not found (e.g. might be turned off or " -"disconnected)." -msgstr "" -"Den valgte lydenhed '%s' blev ikke fundet (kan f.eks være slukket eller " -"afbrudt)." +msgid "The selected audio device '%s' was not found (e.g. might be turned off or disconnected)." +msgstr "Den valgte lydenhed '%s' blev ikke fundet (kan f.eks være slukket eller afbrudt)." -#: audio/mididrv.cpp:209 audio/mididrv.cpp:221 audio/mididrv.cpp:257 +#: audio/mididrv.cpp:209 +#: audio/mididrv.cpp:221 +#: audio/mididrv.cpp:257 #: audio/mididrv.cpp:272 msgid "Attempting to fall back to the next available device..." msgstr "Forsøger at falde tilbage til den næste tilgængelig enhed..." #: audio/mididrv.cpp:221 #, c-format -msgid "" -"The selected audio device '%s' cannot be used. See log file for more " -"information." -msgstr "" -"Den valgte lydenhed '%s' kan ikke bruges. Se log filen for mere information." +msgid "The selected audio device '%s' cannot be used. See log file for more information." +msgstr "Den valgte lydenhed '%s' kan ikke bruges. Se log filen for mere information." #: audio/mididrv.cpp:257 #, c-format -msgid "" -"The preferred audio device '%s' was not found (e.g. might be turned off or " -"disconnected)." -msgstr "" -"Den foretrukne lydenhed '%s' blev ikke fundet (kan f.eks være slukket eller " -"afbrudt)." +msgid "The preferred audio device '%s' was not found (e.g. might be turned off or disconnected)." +msgstr "Den foretrukne lydenhed '%s' blev ikke fundet (kan f.eks være slukket eller afbrudt)." #: audio/mididrv.cpp:272 #, c-format -msgid "" -"The preferred audio device '%s' cannot be used. See log file for more " -"information." -msgstr "" -"Den foretrukne lydenhed '%s' kan ikke bruges. Se log filen for mere " -"information." +msgid "The preferred audio device '%s' cannot be used. See log file for more information." +msgstr "Den foretrukne lydenhed '%s' kan ikke bruges. Se log filen for mere information." #: audio/null.h:43 msgid "No music" @@ -2740,11 +2851,13 @@ msgstr "GC Pad acceleration:" msgid "DVD" msgstr "DVD" -#: backends/platform/wii/options.cpp:89 backends/platform/wii/options.cpp:101 +#: backends/platform/wii/options.cpp:89 +#: backends/platform/wii/options.cpp:101 msgid "Status:" msgstr "Status:" -#: backends/platform/wii/options.cpp:90 backends/platform/wii/options.cpp:102 +#: backends/platform/wii/options.cpp:90 +#: backends/platform/wii/options.cpp:102 msgid "Unknown" msgstr "Ukendt" @@ -2922,8 +3035,7 @@ msgstr "Tildel h #: backends/platform/wince/wince-sdl.cpp:519 msgid "You must map a key to the 'Right Click' action to play this game" -msgstr "" -"Du skal tildele en tast til 'Højreklik' handlingen for at spille dette spil" +msgstr "Du skal tildele en tast til 'Højreklik' handlingen for at spille dette spil" #: backends/platform/wince/wince-sdl.cpp:528 msgid "Map hide toolbar action" @@ -2931,9 +3043,7 @@ msgstr "Tildel \"skjul v #: backends/platform/wince/wince-sdl.cpp:532 msgid "You must map a key to the 'Hide toolbar' action to play this game" -msgstr "" -"Du skal tildele en tast til 'Skjul værktøjslinje' handlingen for at spille " -"dette spil" +msgstr "Du skal tildele en tast til 'Skjul værktøjslinje' handlingen for at spille dette spil" #: backends/platform/wince/wince-sdl.cpp:541 msgid "Map Zoom Up action (optional)" @@ -2944,11 +3054,8 @@ msgid "Map Zoom Down action (optional)" msgstr "Tildel Forstør handling (valgfri)" #: backends/platform/wince/wince-sdl.cpp:552 -msgid "" -"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory" -msgstr "" -"Glem ikke at tildele en tast til 'Skjul værktøjslinje' handling for at se " -"hele oversigten" +msgid "Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory" +msgstr "Glem ikke at tildele en tast til 'Skjul værktøjslinje' handling for at se hele oversigten" #: backends/events/default/default-events.cpp:191 msgid "Do you really want to return to the Launcher?" @@ -3037,20 +3144,20 @@ msgstr "Klik deaktiveret" #~ msgid "Hercules Amber" #~ msgstr "Hercules brun" - #~ msgctxt "lowres" + #~ msgid "Hercules Green" #~ msgstr "Hercules grøn" - #~ msgctxt "lowres" + #~ msgid "Hercules Amber" #~ msgstr "Hercules brun" #, fuzzy #~ msgid "Save game failed!" #~ msgstr "Gemmer:" - #~ msgctxt "lowres" + #~ msgid "Add Game..." #~ msgstr "Tilføj spil..." -- cgit v1.2.3 From 3de8c4b07d6f15fe6e9ca4bcb8da92532ebf5692 Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Tue, 10 Jul 2012 22:15:31 -0500 Subject: NEWS: Mention Maemo port changes --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 40d98f294f..43e755f4ac 100644 --- a/NEWS +++ b/NEWS @@ -62,6 +62,10 @@ For a more comprehensive changelog of the latest experimental code, see: - Added aspect ratio correction feature. - Implemented 16 bits per pixel support for games. + Maemo port: + - Added support for Nokia 770 running OS2008 HE. + - Added configurable keymap. + Windows port: - Changed default savegames location for Windows NT4/2000/XP/Vista/7. (The migration batch file can be used to copy savegames from the old -- cgit v1.2.3 From 14832eae7f8787da83cd39214aa386e8136fdf1a Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Tue, 10 Jul 2012 22:58:41 -0500 Subject: MAEMO: Update debian/changelog --- backends/platform/maemo/debian/changelog | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/backends/platform/maemo/debian/changelog b/backends/platform/maemo/debian/changelog index 8a9d8ee3c3..f3e4c4eadb 100644 --- a/backends/platform/maemo/debian/changelog +++ b/backends/platform/maemo/debian/changelog @@ -1,8 +1,20 @@ -scummvm (1.5.0~git) unstable; urgency=low +scummvm (1.6.0~git) unstable; urgency=low * Development snapshot - -- Tarek Soliman Tue, 15 Nov 2011 14:56:57 -0600 + -- Tarek Soliman Tue, 10 Jul 2012 23:02:00 -0500 + +scummvm (1.5.0) unstable; urgency=low + + * 1.5.0 release + + -- Tarek Soliman Tue, 10 Jul 2012 22:57:32 -0500 + +scummvm (1.4.1) unstable; urgency=low + + * 1.4.1 release + + -- Tarek Soliman Wed, 11 Jan 2012 17:17:26 -0600 scummvm (1.4.0) unstable; urgency=low -- cgit v1.2.3 From 108e709b9bf78df2672f8a8bf0547a0966bfc246 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 11 Jul 2012 21:20:52 +1000 Subject: TSAGE: Fix for bug #3541354 - Nico shooting player after being tied up --- engines/tsage/blue_force/blueforce_scenes9.cpp | 73 +++++++++++++------------- engines/tsage/globals.cpp | 4 +- engines/tsage/globals.h | 2 +- 3 files changed, 40 insertions(+), 39 deletions(-) diff --git a/engines/tsage/blue_force/blueforce_scenes9.cpp b/engines/tsage/blue_force/blueforce_scenes9.cpp index 2178f31b30..1cb8191640 100644 --- a/engines/tsage/blue_force/blueforce_scenes9.cpp +++ b/engines/tsage/blue_force/blueforce_scenes9.cpp @@ -794,12 +794,12 @@ bool Scene910::Lyle::startAction(CursorType action, Event &event) { Scene910 *scene = (Scene910 *)BF_GLOBALS._sceneManager._scene; if (action == CURSOR_USE) { - if (BF_GLOBALS._v4CEE2 == 0) + if (BF_GLOBALS._nico910State == 0) return NamedObject::startAction(action, event); else return false; } else if (action == CURSOR_TALK) { - if ((BF_GLOBALS._hiddenDoorStatus != 0) || (BF_GLOBALS._v4CEE2 != 0)) { + if ((BF_GLOBALS._hiddenDoorStatus != 0) || (BF_GLOBALS._nico910State != 0)) { scene->_stripManager.start(9100 + _field90, &BF_GLOBALS._stripProxy); if (_field90 < 1) _field90++; @@ -833,7 +833,7 @@ bool Scene910::Nico::startAction(CursorType action, Event &event) { return true; break; case CURSOR_TALK: - if (BF_GLOBALS._v4CEE2 >= 4) + if (BF_GLOBALS._nico910State >= 4) return NamedObject::startAction(action, event); if (BF_GLOBALS._v4CEE6 < 4) @@ -847,8 +847,8 @@ bool Scene910::Nico::startAction(CursorType action, Event &event) { return true; break; case INV_COLT45: - if (BF_GLOBALS._v4CEE2 > 1) { - if (BF_GLOBALS._v4CEE2 != 4) { + if (BF_GLOBALS._nico910State > 1) { + if (BF_GLOBALS._nico910State != 4) { if ((BF_GLOBALS.getFlag(gunDrawn)) && (BF_GLOBALS.getFlag(fGunLoaded)) && (BF_GLOBALS.getHasBullets())) { if (scene->_field2DE0 == 0) { BF_GLOBALS._player.disableControl(); @@ -880,7 +880,7 @@ bool Scene910::Nico::startAction(CursorType action, Event &event) { break; case INV_BADGE: case INV_ID: - if (BF_GLOBALS._v4CEE2 >= 4) + if (BF_GLOBALS._nico910State >= 4) return NamedObject::startAction(action, event); if (BF_GLOBALS._v4CEE6 < 4) @@ -895,11 +895,12 @@ bool Scene910::Nico::startAction(CursorType action, Event &event) { return true; break; case INV_YELLOW_CORD: - if (BF_GLOBALS._v4CEE2 < 4) { + if (BF_GLOBALS._nico910State < 4) { BF_GLOBALS._player.disableControl(); scene->_yellowCord.fixPriority(121); scene->_sceneSubMode = 10; scene->_sceneMode = 9123; + BF_GLOBALS._nico910State = 3; if (BF_GLOBALS._player._visage == 1911) scene->setAction(&scene->_sequenceManager1, scene, 9123, &BF_GLOBALS._player, NULL); else @@ -995,7 +996,7 @@ bool Scene910::Stuart::startAction(CursorType action, Event &event) { return true; } else { BF_GLOBALS._player.disableControl(); - if (BF_GLOBALS._v4CEE2 == 4) { + if (BF_GLOBALS._nico910State == 4) { scene->_sceneSubMode = 11; scene->_sceneMode = 9123; if (BF_GLOBALS._player._visage == 1911) @@ -1136,7 +1137,7 @@ bool Scene910::BreakerBox::startAction(CursorType action, Event &event) { SceneItem::display2(910, 62); return true; } else if (scene->_sceneMode != 9120) { - if (BF_GLOBALS._v4CEE2 == 1) { + if (BF_GLOBALS._nico910State == 1) { BF_GLOBALS._player.disableControl(); scene->_sceneMode = 9118; scene->setAction(&scene->_sequenceManager1, scene, 9118, &BF_GLOBALS._player, &scene->_nico, NULL); @@ -1291,7 +1292,7 @@ bool Scene910::Object13::startAction(CursorType action, Event &event) { switch (_state) { case 1: - if (BF_GLOBALS._v4CEE2 < 1) { + if (BF_GLOBALS._nico910State < 1) { if (_frame == 2) { if (!BF_GLOBALS.getFlag(fGotPointsForClosingDoor)) { T2_GLOBALS._uiElements.addScore(30); @@ -1299,7 +1300,7 @@ bool Scene910::Object13::startAction(CursorType action, Event &event) { } scene->_sceneMode = 0; if (BF_GLOBALS._dayNumber == 5) { - if (BF_GLOBALS._v4CEE2 == 0) { + if (BF_GLOBALS._nico910State == 0) { scene->_breakerBoxInset.remove(); // _objectList.draw(); BF_GLOBALS._player.disableControl(); @@ -1309,7 +1310,7 @@ bool Scene910::Object13::startAction(CursorType action, Event &event) { scene->_nico.postInit(); scene->_sceneMode = 9129; scene->setAction(&scene->_sequenceManager1, scene, 9129, &BF_GLOBALS._player, &scene->_nico, NULL); - } else if (BF_GLOBALS._v4CEE2 == 2) { + } else if (BF_GLOBALS._nico910State == 2) { scene->_breakerBoxInset.remove(); // _objectList.draw(); BF_GLOBALS._player.disableControl(); @@ -1612,7 +1613,7 @@ bool Scene910::BlackPlug::startAction(CursorType action, Event &event) { SET_EXT_FGCOLOR, 13, LIST_END); return true; } - if (BF_GLOBALS._v4CEE2 == 3) { + if (BF_GLOBALS._nico910State == 3) { SceneItem::display(910, 84, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, @@ -1830,7 +1831,7 @@ bool Scene910::Generator::startAction(CursorType action, Event &event) { SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, SET_FONT, 4, SET_BG_COLOR, 1, SET_FG_COLOR, 19, SET_EXT_BGCOLOR, 9, SET_EXT_FGCOLOR, 13, LIST_END); - else if (BF_GLOBALS._v4CEE2 == 1) { + else if (BF_GLOBALS._nico910State == 1) { BF_GLOBALS._player.disableControl(); scene->_sceneMode = 9118; scene->setAction(&scene->_sequenceManager1, scene, 9118, &BF_GLOBALS._player, &scene->_nico, NULL); @@ -1869,7 +1870,7 @@ bool Scene910::Item2::startAction(CursorType action, Event &event) { bool Scene910::Item3::startAction(CursorType action, Event &event) { Scene910 *scene = (Scene910 *)BF_GLOBALS._sceneManager._scene; - if ((action == CURSOR_TALK) && (BF_GLOBALS._v4CEE2 == 4) && (BF_GLOBALS._v4CEE4 == 0)) { + if ((action == CURSOR_TALK) && (BF_GLOBALS._nico910State == 4) && (BF_GLOBALS._v4CEE4 == 0)) { BF_GLOBALS._player.disableControl(); scene->_sceneMode = 15; scene->_stripManager.start(9102, scene); @@ -1907,7 +1908,7 @@ bool Scene910::Item15::startAction(CursorType action, Event &event) { bool Scene910::Item16::startAction(CursorType action, Event &event) { Scene910 *scene = (Scene910 *)BF_GLOBALS._sceneManager._scene; - if ((BF_GLOBALS._hiddenDoorStatus == 0) || (BF_GLOBALS._v4CEE2 != 0)) + if ((BF_GLOBALS._hiddenDoorStatus == 0) || (BF_GLOBALS._nico910State != 0)) return false; if (BF_GLOBALS._player._visage == 1911) { @@ -2016,7 +2017,7 @@ void Scene910::postInit(SceneObjectList *OwnerList) { if (BF_GLOBALS._dayNumber < 5) _item17.setDetails(Rect(0, 149, 29, 167), 910, -1, -1, -1, 1, NULL); - if (BF_GLOBALS._v4CEE2 == 0) + if (BF_GLOBALS._nico910State == 0) _item16.setDetails(Rect(265, 18, 319, 102), 910, -1, -1, -1, 1, NULL); _breakerBox.setDetails(910, 6, -1, -1, 1, (SceneItem *)NULL); @@ -2048,7 +2049,7 @@ void Scene910::postInit(SceneObjectList *OwnerList) { || (BF_GLOBALS._sceneManager._previousScene == 190) || (BF_GLOBALS._sceneManager._previousScene == 300)) { BF_GLOBALS._sceneManager._previousScene = 900; - BF_GLOBALS._v4CEE2 = 0; + BF_GLOBALS._nico910State = 0; BF_GLOBALS._v4CEE4 = 0; } @@ -2142,7 +2143,7 @@ void Scene910::postInit(SceneObjectList *OwnerList) { _nico.setPosition(Common::Point(262, 124)); _nico.setStrip(6); BF_GLOBALS._v4CEE6 = 0; - BF_GLOBALS._v4CEE2 = 1; + BF_GLOBALS._nico910State = 1; _nico.setDetails(910, 63, 64, 67, 5, &_item4); BF_GLOBALS._v4CECA = 2; if (BF_GLOBALS._v4CECC == 0) @@ -2157,7 +2158,7 @@ void Scene910::postInit(SceneObjectList *OwnerList) { BF_GLOBALS._player.disableControl(); } - if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._v4CEE2 == 0)){ + if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._nico910State == 0)){ _shadow.postInit(); _shadow.setAction(&_action2); } @@ -2297,7 +2298,7 @@ void Scene910::signal() { case 13: BF_GLOBALS._player.disableControl(); BF_GLOBALS._player.setAction(&_sequenceManager2, NULL, 9117, &_nico, NULL); - BF_GLOBALS._v4CEE2 = 2; + BF_GLOBALS._nico910State = 2; // No break on purpose case 15: _stuart.postInit(); @@ -2314,7 +2315,7 @@ void Scene910::signal() { _lyle._field90 = 1; _sceneMode = 10; addFader((const byte *)&black, 2, this); - BF_GLOBALS._v4CEE2 = 1; + BF_GLOBALS._nico910State = 1; BF_GLOBALS._walkRegions.disableRegion(16); BF_GLOBALS._walkRegions.disableRegion(14); BF_GLOBALS._sceneItems.remove(&_item16); @@ -2324,7 +2325,7 @@ void Scene910::signal() { BF_GLOBALS._player._frame = 1; if (_field2DE2 == 0) { _field2DE2 = 1; - if (BF_GLOBALS._v4CEE2 == 4) { + if (BF_GLOBALS._nico910State == 4) { _sceneMode = 9149; setAction(&_sequenceManager1, this, 9149, &BF_GLOBALS._player, NULL); } else { @@ -2452,7 +2453,7 @@ void Scene910::signal() { break; case 9114: _fakeWall.hide(); - if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._v4CEE2 == 0)) { + if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._nico910State == 0)) { BF_GLOBALS._player.disableControl(); _nico.postInit(); _nico.setDetails(910, 63, 64, 65, 5, &_item4); @@ -2496,7 +2497,7 @@ void Scene910::signal() { case 9121: _item3.setDetails(7, 910, 96, 60, 61, 3); BF_GLOBALS._v4CEE4 = 2; - if (BF_GLOBALS._v4CEE2 == 4) { + if (BF_GLOBALS._nico910State == 4) { _sceneMode = 20; _stripManager.start(9115, this); } else { @@ -2527,7 +2528,7 @@ void Scene910::signal() { setAction(&_sequenceManager1, this, 9111, &BF_GLOBALS._player, &_blackCord, NULL); break; case 5: - switch (BF_GLOBALS._v4CEE2 - 1) { + switch (BF_GLOBALS._nico910State - 1) { case 0: _sceneMode = 9118; setAction(&_sequenceManager1, this, 9118, &BF_GLOBALS._player, &_nico, NULL); @@ -2598,7 +2599,7 @@ void Scene910::signal() { break; case 9125: BF_GLOBALS.setFlag(fBackupAt340); - BF_GLOBALS._v4CEE2 = 4; + BF_GLOBALS._nico910State = 4; _stuart.postInit(); _nico.setDetails(910, 72, 73, 74, 3, (SceneItem *)NULL); _stuart.setDetails(910, 66, 67, 68, 5, &_nico); @@ -2645,7 +2646,7 @@ void Scene910::signal() { } _lyle.setAction(&_sequenceManager2, NULL, 9131, &_lyle, NULL); BF_GLOBALS._walkRegions.enableRegion(16); - if (BF_GLOBALS._v4CEE2 == 4) + if (BF_GLOBALS._nico910State == 4) BF_INVENTORY.setObjectScene(INV_YELLOW_CORD, 0); else BF_INVENTORY.setObjectScene(INV_HALF_YELLOW_CORD, 910); @@ -2679,7 +2680,7 @@ void Scene910::signal() { } break; case 9143: - if (BF_GLOBALS._v4CEE2 == 0) { + if (BF_GLOBALS._nico910State == 0) { BF_GLOBALS._v51C44 = 1; BF_GLOBALS._sceneManager.changeScene(920); } else { @@ -2730,7 +2731,7 @@ void Scene910::process(Event &event) { if (_item17._bounds.contains(event.mousePos)) { GfxSurface surface = _cursorVisage.getFrame(EXITFRAME_SW); BF_GLOBALS._events.setCursor(surface); - } else if ((BF_GLOBALS._hiddenDoorStatus == 0) || (BF_GLOBALS._v4CEE2 != 0)) { + } else if ((BF_GLOBALS._hiddenDoorStatus == 0) || (BF_GLOBALS._nico910State != 0)) { CursorType cursorId = BF_GLOBALS._events.getCursor(); BF_GLOBALS._events.setCursor(cursorId); } else if (!_item16._bounds.contains(event.mousePos)) { @@ -2755,7 +2756,7 @@ void Scene910::process(Event &event) { _sceneMode = 9123; setAction(&_sequenceManager1, this, 9123, &BF_GLOBALS._player, NULL); event.handled = true; - } else if (BF_GLOBALS._v4CEE2 <= 1) { + } else if (BF_GLOBALS._nico910State <= 1) { if (BF_GLOBALS.getFlag(fCanDrawGun)) { BF_GLOBALS._player.addMover(NULL); BF_GLOBALS._player.disableControl(); @@ -2776,7 +2777,7 @@ void Scene910::process(Event &event) { event.handled = true; break; case CURSOR_WALK: - if (BF_GLOBALS._v4CEE2 == 1) { + if (BF_GLOBALS._nico910State == 1) { BF_GLOBALS._player.disableControl(); if (BF_GLOBALS._player._visage == 1911) { BF_GLOBALS._player.disableControl(); @@ -2826,7 +2827,7 @@ void Scene910::dispatch() { _sceneSubMode = 3; _sceneMode = 9123; setAction(&_sequenceManager1, this, 9123, &BF_GLOBALS._player, NULL); - } else if (BF_GLOBALS._v4CEE2 == 0) { + } else if (BF_GLOBALS._nico910State == 0) { _sceneMode = 9143; setAction(&_sequenceManager1, this, 9143, &BF_GLOBALS._player, NULL); } else { @@ -2840,7 +2841,7 @@ void Scene910::dispatch() { } } - if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._player._position.x > 250) && (_sceneMode != 9135) && (_sceneMode != 11) && (BF_GLOBALS._hiddenDoorStatus != 0) && (BF_GLOBALS._v4CEE2 == 0)) { + if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._player._position.x > 250) && (_sceneMode != 9135) && (_sceneMode != 11) && (BF_GLOBALS._hiddenDoorStatus != 0) && (BF_GLOBALS._nico910State == 0)) { BF_GLOBALS._player.disableControl(); _shadow.remove(); _nico.remove(); @@ -2853,7 +2854,7 @@ void Scene910::dispatch() { } void Scene910::checkGun() { - if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._v4CEE2 == 0) && (BF_GLOBALS._hiddenDoorStatus != 0)) + if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._nico910State == 0) && (BF_GLOBALS._hiddenDoorStatus != 0)) SceneItem::display(910, 70, SET_WIDTH, 312, SET_X, GLOBALS._sceneManager._scene->_sceneBounds.left + 4, SET_Y, GLOBALS._sceneManager._scene->_sceneBounds.top + UI_INTERFACE_Y + 2, @@ -2900,7 +2901,7 @@ void Scene910::closeHiddenDoor() { setAction(&_sequenceManager1, this, 9115, &_fakeWall, &_object5, NULL); } - if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._v4CEE2 == 0)) { + if ((BF_GLOBALS._dayNumber == 5) && (BF_GLOBALS._nico910State == 0)) { // _objectList.draw(); if (BF_GLOBALS._sceneObjects->contains(&_breakerBoxInset)) _breakerBoxInset.remove(); diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index 59eb59b194..de9463268b 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -247,7 +247,7 @@ void BlueForceGlobals::synchronize(Serializer &s) { for (int i = 0; i < 18; i++) s.syncAsByte(_breakerBoxStatusArr[i]); s.syncAsSint16LE(_hiddenDoorStatus); - s.syncAsSint16LE(_v4CEE2); + s.syncAsSint16LE(_nico910State); s.syncAsSint16LE(_v4CEE4); s.syncAsSint16LE(_v4CEE6); s.syncAsSint16LE(_v4CEE8); @@ -320,7 +320,7 @@ void BlueForceGlobals::reset() { _breakerBoxStatusArr[16] = 3; _breakerBoxStatusArr[17] = 0; _hiddenDoorStatus = 0; - _v4CEE2 = 0; + _nico910State = 0; _v4CEE4 = 0; _v4CEE6 = 0; _v4CEE8 = 0; diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h index 45226c921b..d190b6a2a4 100644 --- a/engines/tsage/globals.h +++ b/engines/tsage/globals.h @@ -200,7 +200,7 @@ public: int _v4CECC; int8 _breakerBoxStatusArr[18]; int _hiddenDoorStatus; - int _v4CEE2; + int _nico910State; int _v4CEE4; int _v4CEE6; int _v4CEE8; -- cgit v1.2.3 From ee818634abbf7c63c8b494f3b57f67b42cd3648a Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 11 Jul 2012 21:41:20 +1000 Subject: TINSEL: Added MD5 detection entries for Discworld 1 Polish translation --- engines/tinsel/detection_tables.h | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h index b6b19f6ee7..ef562a5e08 100644 --- a/engines/tinsel/detection_tables.h +++ b/engines/tinsel/detection_tables.h @@ -218,6 +218,41 @@ static const TinselGameDescription gameDescriptions[] = { TINSEL_V1, }, + { // Polish fan translation CD V1 version, with *.gra files (same as the floppy one, with english.smp) + { + "dw", + "CD", + { + {"dw.gra", 0, "ef05bbd2a754bd11a2e87bcd84ab5ccf", 781864}, + {"english.smp", 0, NULL, -1}, + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + + { // Polish fan translaction floppy V1 version, with *.gra files + { + "dw", + "Floppy", + AD_ENTRY1s("dw.gra", "ef05bbd2a754bd11a2e87bcd84ab5ccf", 781864), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NOSPEECH + }, + GID_DW1, + 0, + GF_FLOPPY | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + { // Italian CD with english speech and *.gra files. // Note: It contains only italian subtitles, but inside english.txt { @@ -520,6 +555,27 @@ static const TinselGameDescription gameDescriptions[] = { TINSEL_V2, }, + { // Polish fan translaction Discworld 1 + { + "dw", + "CD", + { + {"dw.scn", 0, "fa169d2c98660215ebd84b49c1899eef", 776396}, + {"english.txt", 0, "c1a53eb7ec812689dab70e2bb22cf2ab", 224151}, + {"english.smp", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::PL_POL, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + { // European/Australian Discworld 2 release { "dw2", -- cgit v1.2.3 From e8d115247f5c9dabc0736fc0097a39be6f4cdb85 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Fri, 13 Jul 2012 21:39:26 +0100 Subject: I18N: Update Czech translation and README from patch #3541613 --- doc/cz/PrectiMe | 53 +++++++++++++++++++++++++++++++++++++++++++++++------ po/cs_CZ.po | 25 ++++++++++++------------- 2 files changed, 59 insertions(+), 19 deletions(-) diff --git a/doc/cz/PrectiMe b/doc/cz/PrectiMe index 4cb362ab3c..153ef09dcd 100644 --- a/doc/cz/PrectiMe +++ b/doc/cz/PrectiMe @@ -53,7 +53,9 @@ Obsah: * 7.7 Podpora MIDI serveru TiMidity++ * 7.8 Použití komprimovaných zvukových souborů (MP3, Ogg Vorbis, Flac) * 7.9 Výstupní vzorkovací kmitoÄet -8.0) Soubor s nastavením +8.0) Soubor s nastavením + * 8.1 Rozpoznávaná klíÄová slova nastavení + * 8.2 Vlastní herní volby, které mohou být pÅ™epínány pomoci grafického rozhraní 9.0) Sestavení @@ -179,13 +181,18 @@ Hry AGOS od Adventuresoft/Horrorsoft: The Feeble Files [feeble] Hry GOB od Coktel Vision: + Bambou le sauveur de la jungle [bambou] Bargon Attack [bargon] + Fascination [fascination] + Geisha [geisha] Gobliiins [gob1] Gobliins 2 [gob2] Goblins 3 [gob3] Lost in Time [lostintime] + Once Upon A Time: Little Red Riding Hood [littlered] The Bizarre Adventures of Woodruff and the Schnibble [woodruff] + Urban Runner [urban] Ween: The Prophecy [ween] Hry MADE od Activision: @@ -216,6 +223,7 @@ Další hry: Hry SCUMM od Humongous Entertainment: Backyard Baseball [baseball] Backyard Baseball 2001 [baseball2001] + Backyard Baseball 2003 [baseball2003] Backyard Football [football] Big Thinkers First Grade [thinker1] Big Thinkers Kindergarten [thinkerk] @@ -284,7 +292,6 @@ Hry Living Books: Následující hry by mÄ›ly jít spustit, ale zatím nejsou úplnÄ› hratelné. Hrajte je pouze na vlastní riziko a prosíme, abyste pro tyto hry nenahlaÅ¡ovali chyby. Pokud chcete mít nejnovÄ›jší zprávy o kompatibilitách her, navÅ¡tivte naší stránku a prohlédnÄ›te si tabulku kompatibilit. - Backyard Baseball 2003 [baseball2003] Backyard Football 2002 [football2002] Backyard Soccer [soccer] Backyard Soccer MLS [soccermls] @@ -1478,6 +1485,8 @@ Vzorový soubor s nastavením vypadá takto: path=C:\amiga_mi2\ music_driver=windows +8.1) Rozpoznávaná klíÄová slova nastavení +---- ------------------------------------ Jsou rozpoznávána následující klíÄová slova: path Å™etÄ›zec Cesta, kde jsou umístÄ›ny datové soubory hry @@ -1494,7 +1503,6 @@ Jsou rozpoznávána následující klíÄová slova: talkspeed Äíslo ZpoždÄ›ní textu v hrách SCUMM, nebo rychlost textu v jiných hrách. fullscreen boolean Režim celé obrazovky aspect_ratio boolean Povolit korekci pomÄ›ru stran - disable_dithering boolean Odstranit artefakty chvÄ›ní v nÄ›kterých hrách EGA gfx_mode Å™etÄ›zec Grafický režim (normální, 2x, 3x, 2xsai, super2xsai, supereagle, advmame2x, advmame3x,hq2x, hq3x, tv2x, dotmatrix) confirm_exit boolean Zeptat se uživatele na potvrzení pÅ™ed ukonÄením (pouze jádro SDL). console boolean Povolit okno konzole (výchozí: zapnuto) (pouze Windows). @@ -1518,6 +1526,16 @@ Jsou rozpoznávána následující klíÄová slova: alt_intro boolean Použít alternativní úvod pro CD verze Beneath a Steel Sky a Flight of the Amazon Queen boot_param Äíslo PÅ™edá toto Äíslo zavádÄ›címu skriptu +Hry Sierra používající jádro AGI pÅ™idávají následující nestandardní klíÄové slovo: + +originalsaveload boolean Pokud true, jsou použity původní obrazovky nahrávání/uložení místo vylepÅ¡ených ze ScummVM + +Hry Sierra používající jádro SCI pÅ™idávají následující nestandardní klíÄová slova: + + disable_dithering boolean Odstranit artefakty chvÄ›ní v nÄ›kterých hrách EGA + prefer_digitalsfx boolean Pokud true, jsou upÅ™ednostňovány digitální zvukové efekty pÅ™ed syntetizovanými + originalsaveload boolean Pokud true, jsou použity původní obrazovky nahrávání/uložení místo vylepÅ¡ených ze ScummVM + native_fb01 bool Pokud true, je ovladaÄ hudby pro kartu IBM Music Feature nebo modul syntetizátoru Yahama FB-01 FM použit jako výstup MIDI Broken Sword II pÅ™idává následující nestandardní klíÄová slova: gfx_details Äíslo Nastavení grafických detailů (0-3) @@ -1526,16 +1544,25 @@ Broken Sword II pÅ™idává následující nestandardní klíÄová slova: reverse_stereo boolean Pokud true, kanály stereo jsou obráceny sfx_mute boolean Pokud true, zvukové efekty jsou ztlumeny -Flight of the Amazon Queen pÅ™idává následující nestandardní klíÄová slova +Flight of the Amazon Queen pÅ™idává následující nestandardní klíÄová slova: music_mute boolean Pokud true, hudba je ztlumena sfx_mute boolean Pokud true, zvukové efekty jsou ztlumeny -King's Quest VI Windows pÅ™idává následující nestandardní klíÄová slova: +Jones in the Fast Lane pÅ™idává následující nestandardní klíÄové slovo: + + music_mute boolean Pokud true, je použito CD audio místo zvuků ve hÅ™e + +King's Quest VI Windows pÅ™idává následující nestandardní klíÄové slovo: windows_cursors boolean Pokud true, jsou použity původní Äernobílé kurzory místo kurzorů z DOS. Pokud false, jsou ve verzi Windows použity kurzory DOS, zvÄ›tÅ¡ené, aby se shodovaly se zbytkem zvÄ›tÅ¡ené grafiky -Space Qust IV CD pÅ™idává následující nestandardní klíÄové slovo: +Lands of Lore: The Throne of Chaos pÅ™idává následující nestandardní klíÄová slova: + + smooth_scrolling boolean Pokud true, je posunování pÅ™i zmÄ›nÄ› z jedné obrazovky na druhou plynulejší + floating_cursors boolean Pokud true, je kurzor zmÄ›nÄ›n na smÄ›rovou Å¡ipku pÅ™i najetí na okraj obrazovky. HrÃ¡Ä pak může kliknout pro pohyb v tomto smÄ›ru. + +Space Quest IV CD pÅ™idává následující nestandardní klíÄové slovo: silver_cursors boolean Pokud true, je místo původních zlatých kurzorů použita alternativní sada stříbrných @@ -1548,10 +1575,23 @@ The Legend of Kyrandia pÅ™idává následující nestandardní klíÄové slovo: walkspeed celé Äíslo Rychlost chůze (0-4) +The Legend of Kyrandia: Malcolm's Revenge pÅ™idává následující nestandardní klíÄová slova: + + studio_audience boolean Pokud true, je slyÅ¡et potlesk a smích kdykoliv Malcolm provede nÄ›co vtipného + skip_support boolean Pokud true, hrÃ¡Ä může pÅ™eskakovat text a scény hry + helium_mode boolean Pokud true, lidé znÄ›jí tak, jakoby se nadýchali hélia + The 7th Guest pÅ™idává následující nestandardní klíÄové slovo: t7g_speed Å™etÄ›zec Rychlost pÅ™ehrávání videa (normal - normální, tweaked - upravená, im_an_ios - jsem na ios) +8.2) Vlastní herní volby, které mohou být pÅ™epínány pomoci grafického +---- ---------------------------------------------------------------- +rozhraní +-------- +Mnoho vlastních herních voleb v pÅ™edchozí Äásti může být pÅ™epnuto pÅ™es grafické rozhraní. Pokud je takováto volba pro urÄitou hru dostupná, objeví se karta "Jádro" pÅ™i pÅ™idávání nebo úpravÄ› nastavení této hry. +Pokud vlastní možnosti nejsou zobrazeny, musí být konkrétní hry spuÅ¡tÄ›ny jednou nebo znovu pÅ™idány do seznamu her spouÅ¡tÄ›Äe ScummVM. Toto aktualizuje nastavení každé položky, Äímž umožní zobrazení vlastních voleb. + 9.0) Sestavení: ---- ---------- Pro aktuální pÅ™ehled o tom, jak ScummVM sestavit pro různé platformy, prohlédnÄ›te si, prosím, naší Wiki, zvláštÄ› tuto stránku: @@ -1624,3 +1664,4 @@ http://www.scummvm.org/ ------------------------------------------------------------------------ + diff --git a/po/cs_CZ.po b/po/cs_CZ.po index 6bf4e77206..a2d640651c 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-07-08 12:25+0100\n" -"PO-Revision-Date: 2012-05-22 21:02+0100\n" +"PO-Revision-Date: 2012-07-08 18:03+0100\n" "Last-Translator: Zbynìk Schwarz \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -27,7 +27,7 @@ msgstr "(sestaveno %s)" #: gui/about.cpp:98 msgid "Features compiled in:" -msgstr "Zakompilované Funkce:" +msgstr "Zakompilované funkce:" #: gui/about.cpp:107 msgid "Available engines:" @@ -309,7 +309,7 @@ msgstr "Cesta pro ulo #: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 #: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" -msgstr "Stanovuje, kam jsou umístìny Va¹e ulo¾ené hry" +msgstr "Stanovuje, kam jsou umístìny va¹e ulo¾ené hry" #: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" @@ -726,7 +726,7 @@ msgid "" "connected to your computer" msgstr "" "Za¹krtnìte, pokud chcete pou¾ít pravé hardwarové zaøízení kompatibilní s " -"Roland, pøipojené k Va¹emu poèítaèi" +"Roland, pøipojené k va¹emu poèítaèi" #: gui/options.cpp:877 msgctxt "lowres" @@ -2180,7 +2180,6 @@ msgid "Choose Spell" msgstr "Zvolit Kouzlo" #: engines/kyra/sound_midi.cpp:475 -#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" @@ -2189,10 +2188,10 @@ msgid "" "some tracks sound incorrect." msgstr "" "Zdá se, ¾e pou¾íváte zaøízení General MIDI,\n" -"ale Va¹e hra podporuje pouze Roland MT32 MIDI.\n" +"ale va¹e hra podporuje pouze Roland MT32 MIDI.\n" "Sna¾íme se mapovat nástroje Roland MT32 na\n" -"ty od General MIDI. Po tomto se mù¾e stát,\n" -"¾e pár stop nebude správnì pøehráno." +"ty od General MIDI. Je stále mo¾né, ¾e\n" +"nìkteré stopy nebudou znít správnì." #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" @@ -2249,7 +2248,7 @@ msgstr "" "ScummVM zjistil, ¾e máte staré ulo¾ené pozice pro Broken Sword 1, které by " "mìly být pøevedeny.\n" "Starý formát ulo¾ených her ji¾ není podporován, tak¾e pokud je nepøevedete, " -"nebudete moci Va¹e hry naèíst.\n" +"nebudete moci va¹e hry naèíst.\n" "\n" "Stisknìte OK, abyste je pøevedli teï, jinak budete po¾ádáni znovu, pøi " "spu¹tìní této hry.\n" @@ -2317,13 +2316,13 @@ msgstr "" "ScummVM zjistil, ¾e máte staré ulo¾ené pozice pro Nippon Safes, které by " "mìly být pøejmenovány.\n" "Staré názvy ji¾ nejsou podporovány, tak¾e pokud je nepøevedete, nebudete " -"moci Va¹e hry naèíst.\n" +"moci va¹e hry naèíst.\n" "\n" "Stisknìte OK, abyste je pøevedli teï, jinak budete po¾ádáni pøí¹tì.\n" #: engines/parallaction/saveload.cpp:319 msgid "ScummVM successfully converted all your savefiles." -msgstr "ScummVM úspì¹nì pøevedl v¹echny Va¹e ulo¾ené pozice. " +msgstr "ScummVM úspì¹nì pøevedl v¹echny va¹e ulo¾ené pozice. " #: engines/parallaction/saveload.cpp:321 msgid "" @@ -2332,8 +2331,8 @@ msgid "" "\n" "Please report to the team." msgstr "" -"ScummVM vytiskl nìkterá varování ve Va¹em oknì konzole a nemù¾e zaruèit, ¾e " -"v¹echny Va¹e soubory byly pøevedeny.\n" +"ScummVM vytiskl nìkterá varování ve va¹em oknì konzole a nemù¾e zaruèit, ¾e " +"v¹echny va¹e soubory byly pøevedeny.\n" "\n" "Prosím nahlaste to týmu" -- cgit v1.2.3 From 9fa92e95e7367d2e99be387f471ed213689292df Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Fri, 13 Jul 2012 21:39:54 +0100 Subject: I18N: Update French translation --- po/fr_FR.po | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/po/fr_FR.po b/po/fr_FR.po index e153beb3a5..4631d4c91a 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -2200,7 +2200,6 @@ msgid "Choose Spell" msgstr "Choisir un Sort" #: engines/kyra/sound_midi.cpp:475 -#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" @@ -2209,10 +2208,10 @@ msgid "" "some tracks sound incorrect." msgstr "" "Il semble que vous utilisiez un périphérique General MIDI,\n" -"mais ce jeu ne support que le MIDI Roland MT32.\n" -"Nous essayons d'associer les instruments Roland MT32 auxinstruments General " -"MIDI. Mais il est possible que quelquespistes ne soient pas jouées " -"correctement." +"mais ce jeu ne support que le MIDI Roland MT32. Nous essayons\n" +"d'associer les instruments Roland MT32 aux instruments General\n" +"MIDI. Cependant il est possible que quelques pistes ne soient\n " +"pas jouées correctement." #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" -- cgit v1.2.3 From 856f9326179e186f08abc0163039f51ad31e9afb Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Fri, 13 Jul 2012 21:47:17 +0100 Subject: I18N: Regenerate translations data file --- gui/themes/translations.dat | Bin 341409 -> 342141 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 9735e99fca..0e32008bd9 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From e10b59b62492c67fc7eeb6eccd39f0b75722338d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 14 Jul 2012 05:04:00 +0300 Subject: TINSEL: Cleanup --- engines/tinsel/handle.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp index c3089db990..14d588dcec 100644 --- a/engines/tinsel/handle.cpp +++ b/engines/tinsel/handle.cpp @@ -99,14 +99,16 @@ void SetupHandleTable() { MEMHANDLE *pH; TinselFile f; - if (f.open(TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME)) { + const char *indexFileName = TinselV1PSX ? PSX_INDEX_FILENAME : INDEX_FILENAME; + + if (f.open(indexFileName)) { // get size of index file len = f.size(); if (len > 0) { if ((len % RECORD_SIZE) != 0) { // index file is corrupt - error(FILE_IS_CORRUPT, TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME); + error(FILE_IS_CORRUPT, indexFileName); } // calc number of handles @@ -132,16 +134,16 @@ void SetupHandleTable() { if (f.eos() || f.err()) { // index file is corrupt - error(FILE_IS_CORRUPT, (TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME)); + error(FILE_IS_CORRUPT, indexFileName); } // close the file f.close(); } else { // index file is corrupt - error(FILE_IS_CORRUPT, (TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME)); + error(FILE_IS_CORRUPT, indexFileName); } } else { // cannot find the index file - error(CANNOT_FIND_FILE, (TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME)); + error(CANNOT_FIND_FILE, indexFileName); } // allocate memory nodes and load all permanent graphics -- cgit v1.2.3 From 0c84dc1ec94771e5bb4ea68049b0cd94d86fb789 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Tue, 10 Jul 2012 23:39:54 -0400 Subject: CREATE_PROJECT: Add Visual Studio 2012 project --- devtools/create_project/msvc11/create_project.sln | 20 ++++ .../create_project/msvc11/create_project.vcxproj | 129 +++++++++++++++++++++ .../msvc11/create_project.vcxproj.filters | 71 ++++++++++++ 3 files changed, 220 insertions(+) create mode 100644 devtools/create_project/msvc11/create_project.sln create mode 100644 devtools/create_project/msvc11/create_project.vcxproj create mode 100644 devtools/create_project/msvc11/create_project.vcxproj.filters diff --git a/devtools/create_project/msvc11/create_project.sln b/devtools/create_project/msvc11/create_project.sln new file mode 100644 index 0000000000..1552c9f502 --- /dev/null +++ b/devtools/create_project/msvc11/create_project.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "create_project", "create_project.vcxproj", "{CF177559-077D-4A08-AABE-BE0FD35F6C63}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Debug|Win32.ActiveCfg = Debug|Win32 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Debug|Win32.Build.0 = Debug|Win32 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Release|Win32.ActiveCfg = Release|Win32 + {CF177559-077D-4A08-AABE-BE0FD35F6C63}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/devtools/create_project/msvc11/create_project.vcxproj b/devtools/create_project/msvc11/create_project.vcxproj new file mode 100644 index 0000000000..5947211e35 --- /dev/null +++ b/devtools/create_project/msvc11/create_project.vcxproj @@ -0,0 +1,129 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {CF177559-077D-4A08-AABE-BE0FD35F6C63} + create_project + $(VCTargetsPath11) + + + + Application + MultiByte + true + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + + Disabled + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + EditAndContinue + false + 4003;4512;4127 + + + Rpcrt4.lib;%(AdditionalDependencies) + true + MachineX86 + false + + + @echo off +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\" + + + + + MaxSpeed + true + MultiThreadedDLL + true + Level3 + ProgramDatabase + 4003;4512;4127 + + + Rpcrt4.lib;%(AdditionalDependencies) + true + true + true + MachineX86 + + + @echo off +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\" +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/devtools/create_project/msvc11/create_project.vcxproj.filters b/devtools/create_project/msvc11/create_project.vcxproj.filters new file mode 100644 index 0000000000..b4f0b18774 --- /dev/null +++ b/devtools/create_project/msvc11/create_project.vcxproj.filters @@ -0,0 +1,71 @@ + + + + + {2e3580c8-ec3a-4c81-8351-b668c668db2a} + + + {31aaf58c-d3cb-4ed6-8eca-163b4a9b31a6} + + + {f980f6fb-41b6-4161-b035-58b200c85cad} + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + scripts + + + scripts + + + scripts + + + scripts + + + -- cgit v1.2.3 From 4e0f6d346fe3c05157fa89c7881c2050e497763a Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 11 Jul 2012 00:43:54 -0400 Subject: CREATE_PROJECT: Properly disable Edit and Continue in Debug mode --- devtools/create_project/msbuild.cpp | 8 ++++---- devtools/create_project/visualstudio.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index dfd3f1d1c7..a82140c2d3 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -249,11 +249,11 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s // Compile configuration if (setup.devTools || name == setup.projectName || name == "sword25" || name == "grim") { project << "\t\t\tfalse\n"; - } else { - if (name == "scummvm" && !isRelease) - project << "\t\t\tProgramDatabase\n"; - if (warningsIterator != _projectWarnings.end()) + if (name == setup.projectName && !isRelease) + project << "\t\t\tProgramDatabase\n"; + } else { + if (warningsIterator != _projectWarnings.end()) project << "\t\t\t" << warnings << ";%(DisableSpecificWarnings)\n"; } diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp index 62b30ddcd0..c301e78ad1 100644 --- a/devtools/create_project/visualstudio.cpp +++ b/devtools/create_project/visualstudio.cpp @@ -110,7 +110,7 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std: std::string toolConfig; toolConfig = (!warnings.empty() ? "DisableSpecificWarnings=\"" + warnings + "\"" : ""); - toolConfig += (name == "scummvm" ? "DebugInformationFormat=\"3\" " : ""); + toolConfig += (name == setup.projectName ? "DebugInformationFormat=\"3\" " : ""); toolConfig += (name == "sword25" ? "DisableLanguageExtensions=\"false\" " : ""); toolConfig += (name == "grim" ? "DisableLanguageExtensions=\"false\" " : ""); -- cgit v1.2.3 From d86c0a44f8452261e7d1e330edf2449642b056fd Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 11 Jul 2012 01:08:22 -0400 Subject: CREATE_PROJECT: Add support for Visual Studio 2012 project creation --- devtools/README | 2 +- devtools/create_project/create_project.cpp | 3 +- devtools/create_project/msbuild.cpp | 24 ++++-- .../create_project/msvc11/create_project.vcxproj | 2 + dists/msvc11/create_msvc11.bat | 95 ++++++++++++++++++++++ dists/msvc11/readme.txt | 6 ++ 6 files changed, 122 insertions(+), 10 deletions(-) create mode 100644 dists/msvc11/create_msvc11.bat create mode 100644 dists/msvc11/readme.txt diff --git a/devtools/README b/devtools/README index 7db5259e7c..c7f08d6dfa 100644 --- a/devtools/README +++ b/devtools/README @@ -65,7 +65,7 @@ create_lure (dreammaster) create_project (LordHoto, Littleboy) -------------- - Creates project files for Visual Studio 2005, 2008, 2010, Xcode and + Creates project files for Visual Studio 2005, 2008, 2010, 2012, Xcode and Code::Blocks out of the configure / Makefile based build system. It also offers a way to enable or disable certain engines and the use of external libraries similar to configure. Run the tool without diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index df220f0934..c96b83414a 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -221,7 +221,7 @@ int main(int argc, char *argv[]) { msvcVersion = atoi(argv[++i]); - if (msvcVersion != 8 && msvcVersion != 9 && msvcVersion != 10) { + if (msvcVersion != 8 && msvcVersion != 9 && msvcVersion != 10 && msvcVersion != 11) { std::cerr << "ERROR: Unsupported version: \"" << msvcVersion << "\" passed to \"--msvc-version\"!\n"; return -1; } @@ -643,6 +643,7 @@ void displayHelp(const char *exe) { " 8 stands for \"Visual Studio 2005\"\n" " 9 stands for \"Visual Studio 2008\"\n" " 10 stands for \"Visual Studio 2010\"\n" + " 11 stands for \"Visual Studio 2012\"\n" " The default is \"9\", thus \"Visual Studio 2008\"\n" " --build-events Run custom build events as part of the build\n" " (default: false)\n" diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index a82140c2d3..90a5e3c15b 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -46,7 +46,13 @@ const char *MSBuildProvider::getPropertiesExtension() { } int MSBuildProvider::getVisualStudioVersion() { - return 2010; + if (_version == 10) + return 2010; + + if (_version == 11) + return 2012; + + error("Unsupported version passed to getVisualStudioVersion"); } namespace { @@ -58,9 +64,10 @@ inline void outputConfiguration(std::ostream &project, const std::string &config "\t\t\n"; } -inline void outputConfigurationType(const BuildSetup &setup, std::ostream &project, const std::string &name, const std::string &config) { +inline void outputConfigurationType(const BuildSetup &setup, std::ostream &project, const std::string &name, const std::string &config, int version) { project << "\t\n" "\t\t" << ((name == setup.projectName || setup.devTools) ? "Application" : "StaticLibrary") << "\n" + "\t\tv" << version << "0" "\t\n"; } @@ -98,17 +105,18 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri "\t\t{" << uuid << "}\n" "\t\t" << name << "\n" "\t\tWin32Proj\n" + "\t\t$(VCTargetsPath11)\n" "\t\n"; // Shared configuration project << "\t\n"; - outputConfigurationType(setup, project, name, "Release|Win32"); - outputConfigurationType(setup, project, name, "Analysis|Win32"); - outputConfigurationType(setup, project, name, "Debug|Win32"); - outputConfigurationType(setup, project, name, "Release|x64"); - outputConfigurationType(setup, project, name, "Analysis|x64"); - outputConfigurationType(setup, project, name, "Debug|x64"); + outputConfigurationType(setup, project, name, "Release|Win32", _version); + outputConfigurationType(setup, project, name, "Analysis|Win32", _version); + outputConfigurationType(setup, project, name, "Debug|Win32", _version); + outputConfigurationType(setup, project, name, "Release|x64", _version); + outputConfigurationType(setup, project, name, "Analysis|x64", _version); + outputConfigurationType(setup, project, name, "Debug|x64", _version); project << "\t\n" "\t\n" diff --git a/devtools/create_project/msvc11/create_project.vcxproj b/devtools/create_project/msvc11/create_project.vcxproj index 5947211e35..c87461c049 100644 --- a/devtools/create_project/msvc11/create_project.vcxproj +++ b/devtools/create_project/msvc11/create_project.vcxproj @@ -63,6 +63,7 @@ @echo off +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc11\" xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\" xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\" xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\" @@ -89,6 +90,7 @@ xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\" @echo off +xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc11\" xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\" xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\" xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\" diff --git a/dists/msvc11/create_msvc11.bat b/dists/msvc11/create_msvc11.bat new file mode 100644 index 0000000000..b6a5413e3b --- /dev/null +++ b/dists/msvc11/create_msvc11.bat @@ -0,0 +1,95 @@ +@echo off + +echo. +echo Automatic creation of the MSVC11 project files +echo. + +if "%~1"=="/stable" goto stable +if "%~1"=="/STABLE" goto stable +if "%~1"=="/all" goto all +if "%~1"=="/ALL" goto all +if "%~1"=="/tools" goto tools +if "%~1"=="/TOOLS" goto tools +if "%~1"=="/clean" goto clean_check +if "%~1"=="/CLEAN" goto clean_check +if "%~1"=="/help" goto command_help +if "%~1"=="/HELP" goto command_help +if "%~1"=="/?" goto command_help + +if "%~1"=="" goto check_tool + +echo Invalid command parameter: %~1 +echo. + +:command_help +echo Valid command parameters are: +echo stable Generated stable engines project files +echo all Generate all engines project files +echo tools Generate project files for the devtools +echo clean Clean generated project files +echo help Show help message +goto done + +:check_tool +if not exist create_project.exe goto no_tool + +:question +echo. +set batchanswer=S +set /p batchanswer="Enable stable engines only, or all engines? (S/a)" +if "%batchanswer%"=="s" goto stable +if "%batchanswer%"=="S" goto stable +if "%batchanswer%"=="a" goto all +if "%batchanswer%"=="A" goto all +goto question + +:no_tool +echo create_project.exe not found in the current folder. +echo You need to build it first and copy it in this +echo folder +goto done + +:all +echo. +echo Creating project files with all engines enabled (stable and unstable) +echo. +create_project ..\.. --enable-all-engines --msvc --msvc-version 11 --build-events +goto done + +:stable +echo. +echo Creating normal project files, with only the stable engines enabled +echo. +create_project ..\.. --msvc --msvc-version 11 +goto done + +:tools +echo. +echo Creating tools project files +echo. +create_project ..\.. --tools --msvc --msvc-version 11 +goto done + +:clean_check +echo. +set cleananswer=N +set /p cleananswer="This will remove all project files. Are you sure you want to continue? (N/y)" +if "%cleananswer%"=="n" goto done +if "%cleananswer%"=="N" goto done +if "%cleananswer%"=="y" goto clean +if "%cleananswer%"=="Y" goto clean +goto clean_check + +:clean +echo. +echo Removing all project files +del /Q *.vcxproj* > NUL 2>&1 +del /Q *.props > NUL 2>&1 +del /Q *.sln* > NUL 2>&1 +del /Q scummvm* > NUL 2>&1 +del /Q devtools* > NUL 2>&1 +goto done + +:done +echo. +pause diff --git a/dists/msvc11/readme.txt b/dists/msvc11/readme.txt new file mode 100644 index 0000000000..fa91a8cc12 --- /dev/null +++ b/dists/msvc11/readme.txt @@ -0,0 +1,6 @@ +The Visual Studio project files can now be created automatically from the GCC +files using the create_project tool inside the /devtools/create_project folder. + +To create the default project files, build create_project.exe, copy it inside +this folder and run the create_msvc11.bat file for a default build. You can run +create_project.exe with no parameters to check the possible command-line options -- cgit v1.2.3 From 4e832ff947dcb998d76a33ccf86682e75c237fe1 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 11 Jul 2012 01:19:55 -0400 Subject: CREATE_PROJECT: Add freetype dll to copied files in postbuild script --- devtools/create_project/scripts/postbuild.cmd | 1 + 1 file changed, 1 insertion(+) diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd index dd52c0217c..d78119d058 100644 --- a/devtools/create_project/scripts/postbuild.cmd +++ b/devtools/create_project/scripts/postbuild.cmd @@ -24,6 +24,7 @@ echo Copying data files echo. xcopy /F /Y "%~4/lib/%~3/SDL.dll" "%~2" 1>NUL 2>&1 +xcopy /F /Y "%~4/lib/%~3/freetype6.dll" "%~2" 1>NUL 2>&1 xcopy /F /Y "%~1/backends/vkeybd/packs/vkeybd_default.zip" "%~2" 1>NUL 2>&1 if "%~5"=="0" goto done -- cgit v1.2.3 From 339fb6968ea00e9c07e27eb7bd16560020d2ed98 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 11 Jul 2012 01:20:19 -0400 Subject: BACKENDS: Silence warning about ARRAYSIZE in windows-saves --- backends/saves/windows/windows-saves.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backends/saves/windows/windows-saves.cpp b/backends/saves/windows/windows-saves.cpp index 87348c3416..d520632394 100644 --- a/backends/saves/windows/windows-saves.cpp +++ b/backends/saves/windows/windows-saves.cpp @@ -26,8 +26,12 @@ #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(DISABLE_DEFAULT_SAVEFILEMANAGER) +#if defined(ARRAYSIZE) +#undef ARRAYSIZE +#endif #define WIN32_LEAN_AND_MEAN #include +#undef ARRAYSIZE // winnt.h defines ARRAYSIZE, but we want our own one... #include "common/config-manager.h" #include "common/savefile.h" -- cgit v1.2.3 From 51352b32f15d9a919e9b7a7d3b5a92e31384e9f4 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sat, 14 Jul 2012 12:34:12 -0400 Subject: CREATE_PROJECT: Disable SAFESEH in debug mode (for edit and continue) --- devtools/create_project/msbuild.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index 90a5e3c15b..c797770955 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -67,7 +67,7 @@ inline void outputConfiguration(std::ostream &project, const std::string &config inline void outputConfigurationType(const BuildSetup &setup, std::ostream &project, const std::string &name, const std::string &config, int version) { project << "\t\n" "\t\t" << ((name == setup.projectName || setup.devTools) ? "Application" : "StaticLibrary") << "\n" - "\t\tv" << version << "0" + "\t\tv" << version << "0\n" "\t\n"; } @@ -403,6 +403,7 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b "\t\t\n" "\t\t\n" "\t\t\ttrue\n" + "\t\t\tfalse\n" "\t\t\tlibcmt.lib;%(IgnoreSpecificDefaultLibraries)\n"; } -- cgit v1.2.3 From 732a2c80ddde4cf0ffd1b1742f514ae940c5301d Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sat, 14 Jul 2012 13:23:54 -0400 Subject: LASTEXPRESS: Remove duplicated include statements --- engines/lastexpress/data/animation.cpp | 2 -- engines/lastexpress/data/scene.cpp | 1 - engines/lastexpress/data/sequence.cpp | 1 - engines/lastexpress/data/snd.cpp | 2 -- engines/lastexpress/data/subtitle.cpp | 1 - engines/lastexpress/debug.cpp | 4 ---- engines/lastexpress/entities/abbot.cpp | 2 -- engines/lastexpress/entities/alexei.cpp | 3 --- engines/lastexpress/entities/alouan.cpp | 3 --- engines/lastexpress/entities/anna.cpp | 2 -- engines/lastexpress/entities/august.cpp | 2 -- engines/lastexpress/entities/boutarel.cpp | 2 -- engines/lastexpress/entities/chapters.cpp | 2 -- engines/lastexpress/entities/cooks.cpp | 2 -- engines/lastexpress/entities/coudert.cpp | 2 -- engines/lastexpress/entities/entity.cpp | 4 ---- engines/lastexpress/entities/entity39.cpp | 1 - engines/lastexpress/entities/francois.cpp | 1 - engines/lastexpress/entities/gendarmes.cpp | 1 - engines/lastexpress/entities/hadija.cpp | 3 --- engines/lastexpress/entities/ivo.cpp | 3 --- engines/lastexpress/entities/kahina.cpp | 2 -- engines/lastexpress/entities/kronos.cpp | 2 -- engines/lastexpress/entities/mahmud.cpp | 2 -- engines/lastexpress/entities/max.cpp | 2 -- engines/lastexpress/entities/mertens.cpp | 2 -- engines/lastexpress/entities/milos.cpp | 2 -- engines/lastexpress/entities/mmeboutarel.cpp | 2 -- engines/lastexpress/entities/pascale.cpp | 14 ++++++-------- engines/lastexpress/entities/rebecca.cpp | 2 -- engines/lastexpress/entities/salko.cpp | 2 -- engines/lastexpress/entities/servers0.cpp | 3 --- engines/lastexpress/entities/servers1.cpp | 3 --- engines/lastexpress/entities/sophie.cpp | 3 --- engines/lastexpress/entities/tables.cpp | 2 -- engines/lastexpress/entities/tatiana.cpp | 2 -- engines/lastexpress/entities/train.cpp | 2 -- engines/lastexpress/entities/vassili.cpp | 2 -- engines/lastexpress/entities/verges.cpp | 2 -- engines/lastexpress/entities/vesna.cpp | 3 --- engines/lastexpress/entities/yasmin.cpp | 2 -- engines/lastexpress/fight/fight.cpp | 1 - engines/lastexpress/game/action.cpp | 3 --- engines/lastexpress/game/beetle.cpp | 1 - engines/lastexpress/game/entities.cpp | 4 ---- engines/lastexpress/game/inventory.cpp | 2 -- engines/lastexpress/game/logic.cpp | 3 --- engines/lastexpress/game/object.cpp | 1 - engines/lastexpress/game/savegame.cpp | 2 -- engines/lastexpress/game/savepoint.cpp | 1 - engines/lastexpress/game/scenes.cpp | 4 ---- engines/lastexpress/lastexpress.cpp | 2 -- engines/lastexpress/menu/menu.cpp | 2 -- engines/lastexpress/resource.cpp | 1 - engines/lastexpress/sound/entry.cpp | 3 --- engines/lastexpress/sound/queue.cpp | 1 - engines/lastexpress/sound/sound.cpp | 1 - 57 files changed, 6 insertions(+), 126 deletions(-) diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp index 9d0ed532f2..12968520bb 100644 --- a/engines/lastexpress/data/animation.cpp +++ b/engines/lastexpress/data/animation.cpp @@ -32,10 +32,8 @@ #include "common/events.h" #include "common/rational.h" -#include "common/rect.h" #include "common/stream.h" #include "common/system.h" -#include "common/textconsole.h" #include "engines/engine.h" diff --git a/engines/lastexpress/data/scene.cpp b/engines/lastexpress/data/scene.cpp index 8f279ffbb3..79683d8067 100644 --- a/engines/lastexpress/data/scene.cpp +++ b/engines/lastexpress/data/scene.cpp @@ -28,7 +28,6 @@ #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" -#include "common/textconsole.h" #include "common/stream.h" namespace LastExpress { diff --git a/engines/lastexpress/data/sequence.cpp b/engines/lastexpress/data/sequence.cpp index a62348f6c0..e1e0d9bee8 100644 --- a/engines/lastexpress/data/sequence.cpp +++ b/engines/lastexpress/data/sequence.cpp @@ -27,7 +27,6 @@ #include "lastexpress/debug.h" #include "common/stream.h" -#include "common/textconsole.h" namespace LastExpress { diff --git a/engines/lastexpress/data/snd.cpp b/engines/lastexpress/data/snd.cpp index a9bee6155d..5010d6e763 100644 --- a/engines/lastexpress/data/snd.cpp +++ b/engines/lastexpress/data/snd.cpp @@ -28,11 +28,9 @@ #include "lastexpress/debug.h" #include "audio/decoders/adpcm_intern.h" -#include "audio/audiostream.h" #include "common/debug.h" #include "common/memstream.h" #include "common/system.h" -#include "common/textconsole.h" namespace LastExpress { diff --git a/engines/lastexpress/data/subtitle.cpp b/engines/lastexpress/data/subtitle.cpp index 0be832cbdd..9918cf7689 100644 --- a/engines/lastexpress/data/subtitle.cpp +++ b/engines/lastexpress/data/subtitle.cpp @@ -32,7 +32,6 @@ #include "common/debug.h" #include "common/rect.h" #include "common/stream.h" -#include "common/textconsole.h" namespace LastExpress { diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp index dc2807db63..f64b172f73 100644 --- a/engines/lastexpress/debug.cpp +++ b/engines/lastexpress/debug.cpp @@ -28,7 +28,6 @@ #include "lastexpress/data/cursor.h" #include "lastexpress/data/scene.h" #include "lastexpress/data/sequence.h" -#include "lastexpress/data/snd.h" #include "lastexpress/data/subtitle.h" #include "lastexpress/fight/fight.h" @@ -44,15 +43,12 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" #include "common/debug-channels.h" -#include "common/events.h" #include "common/md5.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp index 301c52e142..a0aeb05f7f 100644 --- a/engines/lastexpress/entities/abbot.cpp +++ b/engines/lastexpress/entities/abbot.cpp @@ -34,9 +34,7 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/alexei.cpp b/engines/lastexpress/entities/alexei.cpp index 54c2d87b89..b0f9dd6a42 100644 --- a/engines/lastexpress/entities/alexei.cpp +++ b/engines/lastexpress/entities/alexei.cpp @@ -31,9 +31,6 @@ #include "lastexpress/game/scenes.h" #include "lastexpress/game/state.h" -#include "lastexpress/sound/sound.h" - -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/alouan.cpp b/engines/lastexpress/entities/alouan.cpp index cd79870559..3ae38dcf27 100644 --- a/engines/lastexpress/entities/alouan.cpp +++ b/engines/lastexpress/entities/alouan.cpp @@ -28,9 +28,6 @@ #include "lastexpress/game/savepoint.h" #include "lastexpress/game/state.h" -#include "lastexpress/sound/sound.h" - -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp index b13aa21f6d..e4a25be380 100644 --- a/engines/lastexpress/entities/anna.cpp +++ b/engines/lastexpress/entities/anna.cpp @@ -34,9 +34,7 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp index cfde8a2d6f..c9e89ab95b 100644 --- a/engines/lastexpress/entities/august.cpp +++ b/engines/lastexpress/entities/august.cpp @@ -36,9 +36,7 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/boutarel.cpp b/engines/lastexpress/entities/boutarel.cpp index 315b12a69e..bba07f5aa4 100644 --- a/engines/lastexpress/entities/boutarel.cpp +++ b/engines/lastexpress/entities/boutarel.cpp @@ -32,9 +32,7 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp index 4ef2dc50e8..b9384cbab9 100644 --- a/engines/lastexpress/entities/chapters.cpp +++ b/engines/lastexpress/entities/chapters.cpp @@ -63,11 +63,9 @@ #include "lastexpress/game/state.h" #include "lastexpress/menu/menu.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/entities/cooks.cpp b/engines/lastexpress/entities/cooks.cpp index 42e888cc7c..d962d21f8a 100644 --- a/engines/lastexpress/entities/cooks.cpp +++ b/engines/lastexpress/entities/cooks.cpp @@ -29,9 +29,7 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp index c3e7e37b88..e735f50d52 100644 --- a/engines/lastexpress/entities/coudert.cpp +++ b/engines/lastexpress/entities/coudert.cpp @@ -32,9 +32,7 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index e136ca4776..dbce2246d0 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -33,11 +33,7 @@ #include "lastexpress/game/state.h" #include "lastexpress/game/savegame.h" #include "lastexpress/game/savepoint.h" -#include "lastexpress/game/state.h" - -#include "lastexpress/sound/sound.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/entity39.cpp b/engines/lastexpress/entities/entity39.cpp index e786d153a0..1786cd2201 100644 --- a/engines/lastexpress/entities/entity39.cpp +++ b/engines/lastexpress/entities/entity39.cpp @@ -28,7 +28,6 @@ #include "lastexpress/game/savepoint.h" #include "lastexpress/game/state.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/francois.cpp b/engines/lastexpress/entities/francois.cpp index 46cd790ffb..3cbfc68734 100644 --- a/engines/lastexpress/entities/francois.cpp +++ b/engines/lastexpress/entities/francois.cpp @@ -32,7 +32,6 @@ #include "lastexpress/sound/queue.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp index daa50956d3..6f08c4cd62 100644 --- a/engines/lastexpress/entities/gendarmes.cpp +++ b/engines/lastexpress/entities/gendarmes.cpp @@ -31,7 +31,6 @@ #include "lastexpress/game/state.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/hadija.cpp b/engines/lastexpress/entities/hadija.cpp index 8ec972b939..09c80247d4 100644 --- a/engines/lastexpress/entities/hadija.cpp +++ b/engines/lastexpress/entities/hadija.cpp @@ -28,10 +28,7 @@ #include "lastexpress/game/savepoint.h" #include "lastexpress/game/state.h" -#include "lastexpress/sound/sound.h" - #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/ivo.cpp b/engines/lastexpress/entities/ivo.cpp index f2261b438c..a097251f0d 100644 --- a/engines/lastexpress/entities/ivo.cpp +++ b/engines/lastexpress/entities/ivo.cpp @@ -32,10 +32,7 @@ #include "lastexpress/game/scenes.h" #include "lastexpress/game/state.h" -#include "lastexpress/sound/sound.h" - #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp index 2918b1e8bd..8916f14911 100644 --- a/engines/lastexpress/entities/kahina.cpp +++ b/engines/lastexpress/entities/kahina.cpp @@ -32,10 +32,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/kronos.cpp b/engines/lastexpress/entities/kronos.cpp index 134dce9c81..c9fe0dcde1 100644 --- a/engines/lastexpress/entities/kronos.cpp +++ b/engines/lastexpress/entities/kronos.cpp @@ -39,10 +39,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/mahmud.cpp b/engines/lastexpress/entities/mahmud.cpp index 0e67b45cd2..a6fbd1a443 100644 --- a/engines/lastexpress/entities/mahmud.cpp +++ b/engines/lastexpress/entities/mahmud.cpp @@ -34,10 +34,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/max.cpp b/engines/lastexpress/entities/max.cpp index eacc38bf60..7911a5e5b6 100644 --- a/engines/lastexpress/entities/max.cpp +++ b/engines/lastexpress/entities/max.cpp @@ -31,10 +31,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp index d88962fce2..e465bac3c9 100644 --- a/engines/lastexpress/entities/mertens.cpp +++ b/engines/lastexpress/entities/mertens.cpp @@ -32,10 +32,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp index ff3d2b6744..2e0da272ba 100644 --- a/engines/lastexpress/entities/milos.cpp +++ b/engines/lastexpress/entities/milos.cpp @@ -36,10 +36,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/mmeboutarel.cpp b/engines/lastexpress/entities/mmeboutarel.cpp index 9ca10ca374..a72bd1578b 100644 --- a/engines/lastexpress/entities/mmeboutarel.cpp +++ b/engines/lastexpress/entities/mmeboutarel.cpp @@ -31,10 +31,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/pascale.cpp b/engines/lastexpress/entities/pascale.cpp index a191273702..1f8504c566 100644 --- a/engines/lastexpress/entities/pascale.cpp +++ b/engines/lastexpress/entities/pascale.cpp @@ -30,10 +30,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { @@ -186,7 +184,7 @@ IMPLEMENT_FUNCTION(9, Pascale, sitSophieAndRebecca) case kActionExitCompartment: CALLBACK_ACTION(); - break; + break; case kActionDefault: getEntities()->drawSequenceLeft(kEntityPascale, "012C1"); @@ -298,7 +296,7 @@ IMPLEMENT_FUNCTION(12, Pascale, chapter1) case kActionNone: setup_chapter1Handler(); - break; + break; case kActionDefault: getSavePoints()->addData(kEntityPascale, kAction239072064, 0); @@ -648,7 +646,7 @@ IMPLEMENT_FUNCTION(21, Pascale, chapter3) case kActionNone: setup_chapter3Handler(); - break; + break; case kActionDefault: getEntities()->clearSequences(kEntityPascale); @@ -685,7 +683,7 @@ label_callback: setCallback(2); setup_welcomeSophieAndRebecca(); } - break; + break; case kActionCallback: if (getCallback() == 1) @@ -771,7 +769,7 @@ IMPLEMENT_FUNCTION(25, Pascale, chapter4) case kActionNone: setup_chapter4Handler(); - break; + break; case kActionDefault: getEntities()->clearSequences(kEntityPascale); @@ -1090,7 +1088,7 @@ IMPLEMENT_FUNCTION(31, Pascale, chapter5) case kActionNone: setup_chapter5Handler(); - break; + break; case kActionDefault: getEntities()->clearSequences(kEntityPascale); diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp index b1a176b47e..a5f2d66793 100644 --- a/engines/lastexpress/entities/rebecca.cpp +++ b/engines/lastexpress/entities/rebecca.cpp @@ -30,10 +30,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/salko.cpp b/engines/lastexpress/entities/salko.cpp index 63d995dc42..c95269fc90 100644 --- a/engines/lastexpress/entities/salko.cpp +++ b/engines/lastexpress/entities/salko.cpp @@ -33,10 +33,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/servers0.cpp b/engines/lastexpress/entities/servers0.cpp index 989bddd662..60f5295fc6 100644 --- a/engines/lastexpress/entities/servers0.cpp +++ b/engines/lastexpress/entities/servers0.cpp @@ -28,10 +28,7 @@ #include "lastexpress/game/savepoint.h" #include "lastexpress/game/state.h" -#include "lastexpress/sound/sound.h" - #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/servers1.cpp b/engines/lastexpress/entities/servers1.cpp index 995fbbc01b..76a35a4071 100644 --- a/engines/lastexpress/entities/servers1.cpp +++ b/engines/lastexpress/entities/servers1.cpp @@ -28,10 +28,7 @@ #include "lastexpress/game/savepoint.h" #include "lastexpress/game/state.h" -#include "lastexpress/sound/sound.h" - #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/sophie.cpp b/engines/lastexpress/entities/sophie.cpp index 57bd491949..65c718a8c4 100644 --- a/engines/lastexpress/entities/sophie.cpp +++ b/engines/lastexpress/entities/sophie.cpp @@ -27,9 +27,6 @@ #include "lastexpress/game/savepoint.h" #include "lastexpress/game/state.h" -#include "lastexpress/sound/sound.h" - -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/tables.cpp b/engines/lastexpress/entities/tables.cpp index 06ea4c597c..4f8d2b954d 100644 --- a/engines/lastexpress/entities/tables.cpp +++ b/engines/lastexpress/entities/tables.cpp @@ -29,10 +29,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp index c8901b3e30..b97538818f 100644 --- a/engines/lastexpress/entities/tatiana.cpp +++ b/engines/lastexpress/entities/tatiana.cpp @@ -35,10 +35,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/train.cpp b/engines/lastexpress/entities/train.cpp index bced1da62b..1a1b6efaa7 100644 --- a/engines/lastexpress/entities/train.cpp +++ b/engines/lastexpress/entities/train.cpp @@ -32,10 +32,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/vassili.cpp b/engines/lastexpress/entities/vassili.cpp index 22f41afa92..5079fdb252 100644 --- a/engines/lastexpress/entities/vassili.cpp +++ b/engines/lastexpress/entities/vassili.cpp @@ -35,10 +35,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp index 8246f85145..d4b2a1716e 100644 --- a/engines/lastexpress/entities/verges.cpp +++ b/engines/lastexpress/entities/verges.cpp @@ -32,10 +32,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/vesna.cpp b/engines/lastexpress/entities/vesna.cpp index 7a1f1d3195..b5ffd9c979 100644 --- a/engines/lastexpress/entities/vesna.cpp +++ b/engines/lastexpress/entities/vesna.cpp @@ -32,10 +32,7 @@ #include "lastexpress/game/scenes.h" #include "lastexpress/game/state.h" -#include "lastexpress/sound/sound.h" - #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/yasmin.cpp b/engines/lastexpress/entities/yasmin.cpp index 45e5e11568..d2e8cd6b68 100644 --- a/engines/lastexpress/entities/yasmin.cpp +++ b/engines/lastexpress/entities/yasmin.cpp @@ -28,10 +28,8 @@ #include "lastexpress/game/savepoint.h" #include "lastexpress/game/state.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" namespace LastExpress { diff --git a/engines/lastexpress/fight/fight.cpp b/engines/lastexpress/fight/fight.cpp index b832d46a60..be1653092f 100644 --- a/engines/lastexpress/fight/fight.cpp +++ b/engines/lastexpress/fight/fight.cpp @@ -40,7 +40,6 @@ #include "lastexpress/sound/queue.h" #include "lastexpress/graphics.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp index 98d74dd1a7..0ce75f16a4 100644 --- a/engines/lastexpress/game/action.cpp +++ b/engines/lastexpress/game/action.cpp @@ -29,7 +29,6 @@ #include "lastexpress/entities/abbot.h" #include "lastexpress/entities/anna.h" -#include "lastexpress/entities/entity.h" #include "lastexpress/game/beetle.h" #include "lastexpress/game/entities.h" @@ -42,9 +41,7 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/game/beetle.cpp b/engines/lastexpress/game/beetle.cpp index ab707ddae9..f95947617a 100644 --- a/engines/lastexpress/game/beetle.cpp +++ b/engines/lastexpress/game/beetle.cpp @@ -27,7 +27,6 @@ #include "lastexpress/game/scenes.h" #include "lastexpress/game/state.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp index f27087a609..f2201ac9a7 100644 --- a/engines/lastexpress/game/entities.cpp +++ b/engines/lastexpress/game/entities.cpp @@ -27,8 +27,6 @@ #include "lastexpress/data/sequence.h" // Entities -#include "lastexpress/entities/entity.h" - #include "lastexpress/entities/abbot.h" #include "lastexpress/entities/alexei.h" #include "lastexpress/entities/alouan.h" @@ -71,10 +69,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp index e417b1ec0d..7b803bb1ca 100644 --- a/engines/lastexpress/game/inventory.cpp +++ b/engines/lastexpress/game/inventory.cpp @@ -33,10 +33,8 @@ #include "lastexpress/menu/menu.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/game/logic.cpp b/engines/lastexpress/game/logic.cpp index aeac8cff98..5f220479d1 100644 --- a/engines/lastexpress/game/logic.cpp +++ b/engines/lastexpress/game/logic.cpp @@ -36,7 +36,6 @@ // Game #include "lastexpress/game/action.h" #include "lastexpress/game/beetle.h" -#include "lastexpress/game/entities.h" #include "lastexpress/game/inventory.h" #include "lastexpress/game/object.h" #include "lastexpress/game/savegame.h" @@ -47,10 +46,8 @@ #include "lastexpress/menu/menu.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/game/object.cpp b/engines/lastexpress/game/object.cpp index d9e9e4279a..91dcfcfb4a 100644 --- a/engines/lastexpress/game/object.cpp +++ b/engines/lastexpress/game/object.cpp @@ -26,7 +26,6 @@ #include "lastexpress/game/scenes.h" #include "lastexpress/game/state.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp index 9c464feb6e..76cfe9525f 100644 --- a/engines/lastexpress/game/savegame.cpp +++ b/engines/lastexpress/game/savegame.cpp @@ -34,10 +34,8 @@ #include "lastexpress/debug.h" #include "lastexpress/lastexpress.h" -#include "lastexpress/helpers.h" #include "common/file.h" -#include "common/system.h" namespace LastExpress { diff --git a/engines/lastexpress/game/savepoint.cpp b/engines/lastexpress/game/savepoint.cpp index 64ae26c2be..0b5ff42679 100644 --- a/engines/lastexpress/game/savepoint.cpp +++ b/engines/lastexpress/game/savepoint.cpp @@ -26,7 +26,6 @@ #include "lastexpress/game/logic.h" #include "lastexpress/game/state.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" diff --git a/engines/lastexpress/game/scenes.cpp b/engines/lastexpress/game/scenes.cpp index b886951e0b..254b0fdb58 100644 --- a/engines/lastexpress/game/scenes.cpp +++ b/engines/lastexpress/game/scenes.cpp @@ -22,8 +22,6 @@ #include "lastexpress/game/scenes.h" -#include "lastexpress/data/scene.h" - #include "lastexpress/game/action.h" #include "lastexpress/game/beetle.h" #include "lastexpress/game/entities.h" @@ -34,10 +32,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/lastexpress.cpp b/engines/lastexpress/lastexpress.cpp index 250fa0f2d0..cc3795651d 100644 --- a/engines/lastexpress/lastexpress.cpp +++ b/engines/lastexpress/lastexpress.cpp @@ -32,10 +32,8 @@ #include "lastexpress/menu/menu.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" -#include "lastexpress/helpers.h" #include "lastexpress/resource.h" #include "common/config-manager.h" diff --git a/engines/lastexpress/menu/menu.cpp b/engines/lastexpress/menu/menu.cpp index f1a8bebe94..3254bed130 100644 --- a/engines/lastexpress/menu/menu.cpp +++ b/engines/lastexpress/menu/menu.cpp @@ -41,10 +41,8 @@ #include "lastexpress/menu/trainline.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/resource.cpp b/engines/lastexpress/resource.cpp index ee4885e34e..bbbd139b97 100644 --- a/engines/lastexpress/resource.cpp +++ b/engines/lastexpress/resource.cpp @@ -31,7 +31,6 @@ #include "common/debug.h" #include "common/file.h" -#include "common/textconsole.h" namespace LastExpress { diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp index 44cc68a57b..85bb8eb479 100644 --- a/engines/lastexpress/sound/entry.cpp +++ b/engines/lastexpress/sound/entry.cpp @@ -27,14 +27,11 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" -#include "common/stream.h" namespace LastExpress { diff --git a/engines/lastexpress/sound/queue.cpp b/engines/lastexpress/sound/queue.cpp index 33b4c06793..cfbb3091a4 100644 --- a/engines/lastexpress/sound/queue.cpp +++ b/engines/lastexpress/sound/queue.cpp @@ -27,7 +27,6 @@ #include "lastexpress/sound/entry.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { diff --git a/engines/lastexpress/sound/sound.cpp b/engines/lastexpress/sound/sound.cpp index 2f7bb4a601..17d51fe9f4 100644 --- a/engines/lastexpress/sound/sound.cpp +++ b/engines/lastexpress/sound/sound.cpp @@ -33,7 +33,6 @@ #include "lastexpress/sound/entry.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/helpers.h" #include "lastexpress/graphics.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" -- cgit v1.2.3 From 0635d99ec74ad431146e14aba4ad07a5f9e7e221 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sat, 14 Jul 2012 14:02:44 -0400 Subject: LASTEXPRESS: Cleanup - Add missing initializer/destructors - Add some const modifiers - Remove some unneeded casts - Use enumeration values in switch constructs --- engines/lastexpress/data/cursor.cpp | 2 +- engines/lastexpress/data/scene.cpp | 12 ++++++------ engines/lastexpress/data/snd.cpp | 9 ++++++++- engines/lastexpress/data/subtitle.cpp | 2 +- engines/lastexpress/detection.cpp | 3 ++- engines/lastexpress/fight/fight.cpp | 5 +++++ engines/lastexpress/fight/fighter.cpp | 27 ++++++++++++++++++--------- engines/lastexpress/fight/fighter.h | 3 --- engines/lastexpress/game/inventory.cpp | 14 +++++++------- engines/lastexpress/game/inventory.h | 12 ++++++------ engines/lastexpress/lastexpress.cpp | 13 ++++++------- engines/lastexpress/resource.cpp | 5 +---- engines/lastexpress/resource.h | 2 +- engines/lastexpress/sound/entry.cpp | 19 +++++++++++++++++-- engines/lastexpress/sound/queue.cpp | 13 ++++++++----- engines/lastexpress/sound/sound.cpp | 22 +++++++++++----------- 16 files changed, 98 insertions(+), 65 deletions(-) diff --git a/engines/lastexpress/data/cursor.cpp b/engines/lastexpress/data/cursor.cpp index 205c46f667..d176d963d1 100644 --- a/engines/lastexpress/data/cursor.cpp +++ b/engines/lastexpress/data/cursor.cpp @@ -128,7 +128,7 @@ Common::Rect Icon::draw(Graphics::Surface *surface) { for (int i = 0; i < 32; i++) { // Adjust brightness - if (_brightnessIndex == -1) + if (_brightnessIndex == -1 || _brightnessIndex >= ARRAYSIZE(brigthnessData)) *s = *image; else *s = (*image & brigthnessData[_brightnessIndex]) >> _brightnessIndex; diff --git a/engines/lastexpress/data/scene.cpp b/engines/lastexpress/data/scene.cpp index 79683d8067..fdb1ac6d46 100644 --- a/engines/lastexpress/data/scene.cpp +++ b/engines/lastexpress/data/scene.cpp @@ -121,7 +121,7 @@ bool SceneHotspot::isInside(const Common::Point &point) { // Scene Scene::~Scene() { // Free the hotspots - for (int i = 0; i < (int)_hotspots.size(); i++) + for (uint i = 0; i < _hotspots.size(); i++) delete _hotspots[i]; } @@ -171,7 +171,7 @@ bool Scene::checkHotSpot(const Common::Point &coord, SceneHotspot **hotspot) { bool found = false; int _location = 0; - for (int i = 0; i < (int)_hotspots.size(); i++) { + for (uint i = 0; i < _hotspots.size(); i++) { if (_hotspots[i]->isInside(coord)) { if (_location <= _hotspots[i]->location) { _location = _hotspots[i]->location; @@ -223,7 +223,7 @@ Common::String Scene::toString() { // Hotspots if (_hotspots.size() != 0) { output += "\nHotspots:\n"; - for (int i = 0; i < (int)_hotspots.size(); i++) + for (uint i = 0; i < _hotspots.size(); i++) output += _hotspots[i]->toString() + "\n"; } @@ -240,7 +240,7 @@ SceneLoader::~SceneLoader() { void SceneLoader::clear() { // Remove all scenes - for (int i = 0; i < (int)_scenes.size(); i++) + for (uint i = 0; i < _scenes.size(); i++) delete _scenes[i]; _scenes.clear(); @@ -291,9 +291,9 @@ Scene *SceneLoader::get(SceneIndex index) { return NULL; // Load the hotspots if needed - _scenes[(int)index]->loadHotspots(_stream); + _scenes[(uint)index]->loadHotspots(_stream); - return _scenes[(int)index]; + return _scenes[(uint)index]; } } // End of namespace LastExpress diff --git a/engines/lastexpress/data/snd.cpp b/engines/lastexpress/data/snd.cpp index 5010d6e763..6d64f6b82c 100644 --- a/engines/lastexpress/data/snd.cpp +++ b/engines/lastexpress/data/snd.cpp @@ -356,6 +356,8 @@ public: Audio::ADPCMStream(stream, disposeAfterUse, size, 44100, 1, blockSize) { _currentFilterId = -1; _nextFilterId = filterId; + _stepAdjust1 = 0; + _stepAdjust2 = 0; } int readBuffer(int16 *buffer, const int numSamples) { @@ -453,7 +455,9 @@ void SimpleSound::play(Audio::AudioStream *as) { ////////////////////////////////////////////////////////////////////////// StreamedSound::StreamedSound() : _as(NULL), _loaded(false) {} -StreamedSound::~StreamedSound() {} +StreamedSound::~StreamedSound() { + _as = NULL; +} bool StreamedSound::load(Common::SeekableReadStream *stream, int32 filterId) { if (!stream) @@ -482,6 +486,9 @@ bool StreamedSound::isFinished() { } void StreamedSound::setFilterId(int32 filterId) { + if (_as == NULL) + return; + ((LastExpress_ADPCMStream *)_as)->setFilterId(filterId); } diff --git a/engines/lastexpress/data/subtitle.cpp b/engines/lastexpress/data/subtitle.cpp index 9918cf7689..a9a8284588 100644 --- a/engines/lastexpress/data/subtitle.cpp +++ b/engines/lastexpress/data/subtitle.cpp @@ -150,7 +150,7 @@ SubtitleManager::~SubtitleManager() { } void SubtitleManager::reset() { - for (int i = 0; i < (int)_subtitles.size(); i++) + for (uint i = 0; i < _subtitles.size(); i++) delete _subtitles[i]; _subtitles.clear(); diff --git a/engines/lastexpress/detection.cpp b/engines/lastexpress/detection.cpp index 82a6520522..2fdeef910a 100644 --- a/engines/lastexpress/detection.cpp +++ b/engines/lastexpress/detection.cpp @@ -173,7 +173,7 @@ static const ADGameDescription gameDescriptions[] = { ADGF_UNSTABLE, GUIO1(GUIO_NOASPECT) }, - + // The Last Express (Russian) // expressw.exe 1999-04-05 15:33:56 // express.exe ??? @@ -211,6 +211,7 @@ public: return "LastExpress Engine (C) 1997 Smoking Car Productions"; } +protected: bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const; }; diff --git a/engines/lastexpress/fight/fight.cpp b/engines/lastexpress/fight/fight.cpp index be1653092f..22d9da80be 100644 --- a/engines/lastexpress/fight/fight.cpp +++ b/engines/lastexpress/fight/fight.cpp @@ -52,6 +52,8 @@ Fight::FightData::FightData() { index = 0; isFightRunning = false; + + memset(&sequences, 0, sizeof(sequences)); } Fight::FightData::~FightData() { @@ -398,6 +400,9 @@ end_load: } void Fight::setOpponents() { + if (!_data) + error("[Fight::setOpponents] Data not initialized"); + _data->player->setOpponent(_data->opponent); _data->opponent->setOpponent(_data->player); diff --git a/engines/lastexpress/fight/fighter.cpp b/engines/lastexpress/fight/fighter.cpp index bae7728a2b..4b1cddabd4 100644 --- a/engines/lastexpress/fight/fighter.cpp +++ b/engines/lastexpress/fight/fighter.cpp @@ -53,20 +53,20 @@ Fighter::Fighter(LastExpressEngine *engine) : _engine(engine) { } Fighter::~Fighter() { - clearSequences(); -} - -////////////////////////////////////////////////////////////////////////// -// Cleanup -////////////////////////////////////////////////////////////////////////// -void Fighter::clearSequences() { // The original game resets the function pointers to default values, just before deleting the struct getScenes()->removeAndRedraw(&_frame, false); // Free sequences - for (int i = 0; i < (int)_sequences.size(); i++) + for (uint i = 0; i < _sequences.size(); i++) SAFE_DELETE(_sequences[i]); + + // Zero-out passed pointers + _sequence = NULL; + _opponent = NULL; + _fight = NULL; + + _engine = NULL; } ////////////////////////////////////////////////////////////////////////// @@ -113,6 +113,9 @@ void Fighter::draw() { // Processing ////////////////////////////////////////////////////////////////////////// void Fighter::process() { + if (!_fight) + error("[Fighter::handleAction] Fighter not initialized properly"); + if (!_sequence) { if (_frame) { getScenes()->removeFromQueue(_frame); @@ -188,6 +191,9 @@ void Fighter::process() { // Default actions ////////////////////////////////////////////////////////////////////////// void Fighter::handleAction(FightAction action) { + if (!_opponent || !_fight) + error("[Fighter::handleAction] Fighter not initialized properly"); + switch (action) { default: return; @@ -243,7 +249,10 @@ void Opponent::update() { // Helpers ////////////////////////////////////////////////////////////////////////// bool Fighter::checkFrame(uint32 val) { - return (_frame->getInfo()->field_33 & val); + if (!_frame) + error("[Fighter::checkFrame] Invalid current frame"); + + return (bool)(_frame->getInfo()->field_33 & val); } } // End of namespace LastExpress diff --git a/engines/lastexpress/fight/fighter.h b/engines/lastexpress/fight/fighter.h index e37fe49d86..dad95af186 100644 --- a/engines/lastexpress/fight/fighter.h +++ b/engines/lastexpress/fight/fighter.h @@ -99,9 +99,6 @@ protected: void draw(); void process(); - // Cleanup - void clearSequences(); - // Helpers bool checkFrame(uint32 val); }; diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp index 7b803bb1ca..bb382ea38e 100644 --- a/engines/lastexpress/game/inventory.cpp +++ b/engines/lastexpress/game/inventory.cpp @@ -259,7 +259,7 @@ void Inventory::handleMouseEvent(const Common::Event &ev) { // Change item highlight on list if (getFlags()->mouseLeftPressed) { - uint32 index = ev.mouse.y / 40; + uint32 index = (unsigned) (int) ev.mouse.y / 40; if (_highlightedItemIndex && _highlightedItemIndex != index) drawHighlight(_highlightedItemIndex, true); @@ -416,12 +416,12 @@ void Inventory::show() { drawEgg(); } -void Inventory::setPortrait(InventoryItem item) { +void Inventory::setPortrait(InventoryItem item) const { getProgress().portrait = item; drawItem((CursorStyle)getProgress().portrait, 0, 0); } -void Inventory::showHourGlass(){ +void Inventory::showHourGlass() const { if (!getMenu()->isShown()) drawItem(kCursorHourGlass, 608, 448); @@ -611,7 +611,7 @@ void Inventory::examine(InventoryItem item) { } } -void Inventory::drawEgg() { +void Inventory::drawEgg() const { if (!getMenu()->isShown()) drawItem((CursorStyle)(getMenu()->getGameId() + 39), 608, 448, _eggHightlighted ? 0 : 1); @@ -652,7 +652,7 @@ void Inventory::drawBlinkingEgg() { askForRedraw(); } -void Inventory::drawItem(CursorStyle id, uint16 x, uint16 y, int16 brightnessIndex) { +void Inventory::drawItem(CursorStyle id, uint16 x, uint16 y, int16 brightnessIndex) const { Icon icon(id); icon.setPosition(x, y); @@ -676,7 +676,7 @@ void Inventory::drawSelectedItem() { } } -void Inventory::clearSelectedItem() { +void Inventory::clearSelectedItem() const { _engine->getGraphicsManager()->clear(GraphicsManager::kBackgroundInventory, Common::Rect(44, 0, 44 + 32, 32)); } @@ -731,7 +731,7 @@ void Inventory::drawHighlight(uint32 currentIndex, bool reset) { } } -uint32 Inventory::getItemIndex(uint32 currentIndex) { +uint32 Inventory::getItemIndex(uint32 currentIndex) const { uint32 count = 0; for (uint32 i = 1; i < ARRAYSIZE(_entries); i++) { diff --git a/engines/lastexpress/game/inventory.h b/engines/lastexpress/game/inventory.h index b1995adce3..15dd29053d 100644 --- a/engines/lastexpress/game/inventory.h +++ b/engines/lastexpress/game/inventory.h @@ -107,9 +107,9 @@ public: // UI Control void show(); void blinkEgg(bool enabled); - void showHourGlass(); - void setPortrait(InventoryItem item); - void drawEgg(); + void showHourGlass() const; + void setPortrait(InventoryItem item) const; + void drawEgg() const; void drawBlinkingEgg(); // Handle inventory UI events. @@ -168,14 +168,14 @@ private: void close(); void examine(InventoryItem item); void drawHighlight(uint32 currentIndex, bool reset); - uint32 getItemIndex(uint32 currentIndex); + uint32 getItemIndex(uint32 currentIndex) const; bool isItemSceneParameter(InventoryItem item) const; - void drawItem(CursorStyle id, uint16 x, uint16 y, int16 brighnessIndex = -1); + void drawItem(CursorStyle id, uint16 x, uint16 y, int16 brighnessIndex = -1) const; void drawSelectedItem(); - void clearSelectedItem(); + void clearSelectedItem() const; }; } // End of namespace LastExpress diff --git a/engines/lastexpress/lastexpress.cpp b/engines/lastexpress/lastexpress.cpp index cc3795651d..74d1969e01 100644 --- a/engines/lastexpress/lastexpress.cpp +++ b/engines/lastexpress/lastexpress.cpp @@ -52,18 +52,17 @@ const char *g_entityNames[] = { "Player", "Anna", "August", "Mertens", "Coudert" namespace LastExpress { LastExpressEngine::LastExpressEngine(OSystem *syst, const ADGameDescription *gd) : - Engine(syst), _gameDescription(gd), - _debugger(NULL), _cursor(NULL), - _font(NULL), _logic(NULL), _menu(NULL), - _frameCounter(0), _lastFrameCount(0), + Engine(syst), _gameDescription(gd), + _debugger(NULL), _random("lastexpress"), _cursor(NULL), + _font(NULL), _logic(NULL), _menu(NULL), + _frameCounter(0), _lastFrameCount(0), _graphicsMan(NULL), _resMan(NULL), _sceneMan(NULL), _soundMan(NULL), _eventMouse(NULL), _eventTick(NULL), - _eventMouseBackup(NULL), _eventTickBackup(NULL), - _random("lastexpress") + _eventMouseBackup(NULL), _eventTickBackup(NULL) { // Setup mixer - syncSoundSettings(); + Engine::syncSoundSettings(); // Adding the default directories const Common::FSNode gameDataDir(ConfMan.get("path")); diff --git a/engines/lastexpress/resource.cpp b/engines/lastexpress/resource.cpp index bbbd139b97..1d010355ac 100644 --- a/engines/lastexpress/resource.cpp +++ b/engines/lastexpress/resource.cpp @@ -128,13 +128,10 @@ bool ResourceManager::loadArchive(const Common::String &name) { // Get a stream to file in the archive // - same as createReadStreamForMember except it checks if the file exists and will assert / output a debug message if not -Common::SeekableReadStream *ResourceManager::getFileStream(const Common::String &name) { +Common::SeekableReadStream *ResourceManager::getFileStream(const Common::String &name) const { // Check if the file exits in the archive if (!hasFile(name)) { -//#ifdef _DEBUG -// error("[ResourceManager::getFileStream] Cannot open file: %s", name.c_str()); -//#endif debugC(2, kLastExpressDebugResource, "Error opening file: %s", name.c_str()); return NULL; } diff --git a/engines/lastexpress/resource.h b/engines/lastexpress/resource.h index f2f5d63bce..90ac9b87ad 100644 --- a/engines/lastexpress/resource.h +++ b/engines/lastexpress/resource.h @@ -42,7 +42,7 @@ public: // Loading bool loadArchive(ArchiveIndex type); static bool isArchivePresent(ArchiveIndex type); - Common::SeekableReadStream *getFileStream(const Common::String &name); + Common::SeekableReadStream *getFileStream(const Common::String &name) const; // Archive functions bool hasFile(const Common::String &name) const; diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp index 85bb8eb479..3d2b05895f 100644 --- a/engines/lastexpress/sound/entry.cpp +++ b/engines/lastexpress/sound/entry.cpp @@ -44,6 +44,8 @@ namespace LastExpress { SoundEntry::SoundEntry(LastExpressEngine *engine) : _engine(engine) { _type = kSoundTypeNone; + _currentDataPtr = NULL; + _blockCount = 0; _time = 0; @@ -68,7 +70,13 @@ SoundEntry::~SoundEntry() { // Entries that have been queued will have their streamed disposed automatically if (!_soundStream) SAFE_DELETE(_stream); - delete _soundStream; + + SAFE_DELETE(_soundStream); + + free(_currentDataPtr); + + _subtitle = NULL; + _stream = NULL; // Zero passed pointers _engine = NULL; @@ -274,7 +282,7 @@ bool SoundEntry::updateSound() { int l = strlen(sub) + 1; if (l - 1 > 4) - sub[l - 1 - 4] = 0; + sub[l - (1 + 4)] = 0; showSubtitle(sub); } } else { @@ -390,6 +398,10 @@ SubtitleEntry::SubtitleEntry(LastExpressEngine *engine) : _engine(engine) { SubtitleEntry::~SubtitleEntry() { SAFE_DELETE(_data); + + // Zero-out passed pointers + _sound = NULL; + _engine = NULL; } void SubtitleEntry::load(Common::String filename, SoundEntry *soundEntry) { @@ -420,6 +432,9 @@ void SubtitleEntry::loadData() { } void SubtitleEntry::setupAndDraw() { + if (!_sound) + error("[SubtitleEntry::setupAndDraw] Sound entry not initialized"); + if (!_data) { _data = new SubtitleManager(_engine->getFont()); _data->load(getArchive(_filename)); diff --git a/engines/lastexpress/sound/queue.cpp b/engines/lastexpress/sound/queue.cpp index cfbb3091a4..5f3ab96d81 100644 --- a/engines/lastexpress/sound/queue.cpp +++ b/engines/lastexpress/sound/queue.cpp @@ -38,6 +38,7 @@ SoundQueue::SoundQueue(LastExpressEngine *engine) : _engine(engine) { _subtitlesFlag = 0; _currentSubtitle = NULL; + _soundCacheData = NULL; } SoundQueue::~SoundQueue() { @@ -50,6 +51,7 @@ SoundQueue::~SoundQueue() { _subtitles.clear(); _currentSubtitle = NULL; + SAFE_DELETE(_soundCacheData); // Zero passed pointers _engine = NULL; @@ -133,7 +135,7 @@ void SoundQueue::updateQueue() { // Original update the current entry, loading another set of samples to be decoded - getFlags()->flag_3 = 0; + getFlags()->flag_3 = false; --_flag; } @@ -339,13 +341,14 @@ void SoundQueue::updateSubtitles() { return; } + if (!subtitle) + return; + if (_subtitlesFlag & 1) subtitle->drawOnScreen(); - if (subtitle) { - subtitle->loadData(); - subtitle->setupAndDraw(); - } + subtitle->loadData(); + subtitle->setupAndDraw(); } ////////////////////////////////////////////////////////////////////////// diff --git a/engines/lastexpress/sound/sound.cpp b/engines/lastexpress/sound/sound.cpp index 17d51fe9f4..4f6a7b8f93 100644 --- a/engines/lastexpress/sound/sound.cpp +++ b/engines/lastexpress/sound/sound.cpp @@ -1329,23 +1329,23 @@ void SoundManager::playLoopingSound(int param) { } } else { switch (getEntityData(kEntityPlayer)->car) { - case 1: - case 6: + case kCarBaggageRear: + case kCarBaggage: partNumber = 4; break; - case 2: - case 3: - case 4: - case 5: + case kCarKronos: + case kCarGreenSleeping: + case kCarRedSleeping: + case kCarRestaurant: partNumber = 1; break; - case 7: + case kCarCoalTender: partNumber = 5; break; - case 8: + case kCarLocomotive: partNumber = 99; break; - case 9: + case kCar9: partNumber = 3; break; default: @@ -1356,13 +1356,13 @@ void SoundManager::playLoopingSound(int param) { } if (partNumber != 99) - sprintf(tmp, "LOOP%d%c.SND", partNumber, _engine->getRandom().getRandomNumber(numLoops[partNumber] - 1) + 'A'); + sprintf(tmp, "LOOP%d%c.SND", partNumber, (char)(_engine->getRandom().getRandomNumber(numLoops[partNumber] - 1) + 'A')); } if (getFlags()->flag_3) fnameLen = 5; - if (!entry || scumm_strnicmp(entry->getName2().c_str(), tmp, fnameLen)) { + if (!entry || scumm_strnicmp(entry->getName2().c_str(), tmp, (uint)fnameLen)) { _loopingSoundDuration = _engine->getRandom().getRandomNumber(319) + 260; if (partNumber != 99) { -- cgit v1.2.3 From 13c00d40486201989463d337d5c09720f10a0aeb Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sat, 14 Jul 2012 14:26:22 -0400 Subject: LASTEXPRESS: Fix sound in animated sequences --- engines/lastexpress/data/snd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/lastexpress/data/snd.cpp b/engines/lastexpress/data/snd.cpp index 6d64f6b82c..3deb2d6300 100644 --- a/engines/lastexpress/data/snd.cpp +++ b/engines/lastexpress/data/snd.cpp @@ -486,7 +486,7 @@ bool StreamedSound::isFinished() { } void StreamedSound::setFilterId(int32 filterId) { - if (_as == NULL) + if (!_as) return; ((LastExpress_ADPCMStream *)_as)->setFilterId(filterId); @@ -526,6 +526,7 @@ void AppendableSound::queueBuffer(Common::SeekableReadStream *bufferIn) { // Setup the ADPCM decoder uint32 sizeIn = (uint32)bufferIn->size(); Audio::AudioStream *adpcm = makeDecoder(bufferIn, sizeIn); + ((LastExpress_ADPCMStream *)adpcm)->setFilterId(1); // Queue the stream _as->queueAudioStream(adpcm); -- cgit v1.2.3 From 4cee0836c9d4dda646f1e76a3440ffb73499dbb5 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sat, 14 Jul 2012 14:32:51 -0400 Subject: LASTEXPRESS: Replace CALLBACK_ACTION macro by member function --- engines/lastexpress/entities/abbot.cpp | 6 +- engines/lastexpress/entities/alexei.cpp | 12 +-- engines/lastexpress/entities/anna.cpp | 30 +++--- engines/lastexpress/entities/august.cpp | 48 ++++----- engines/lastexpress/entities/boutarel.cpp | 16 +-- engines/lastexpress/entities/chapters.cpp | 6 +- engines/lastexpress/entities/cooks.cpp | 12 +-- engines/lastexpress/entities/coudert.cpp | 110 ++++++++++---------- engines/lastexpress/entities/entity.cpp | 39 ++++--- engines/lastexpress/entities/entity.h | 7 +- engines/lastexpress/entities/entity_intern.h | 17 +-- engines/lastexpress/entities/francois.cpp | 24 ++--- engines/lastexpress/entities/gendarmes.cpp | 16 +-- engines/lastexpress/entities/ivo.cpp | 8 +- engines/lastexpress/entities/kahina.cpp | 42 ++++---- engines/lastexpress/entities/mahmud.cpp | 10 +- engines/lastexpress/entities/max.cpp | 4 +- engines/lastexpress/entities/mertens.cpp | 150 +++++++++++++-------------- engines/lastexpress/entities/milos.cpp | 28 ++--- engines/lastexpress/entities/mmeboutarel.cpp | 8 +- engines/lastexpress/entities/pascale.cpp | 30 +++--- engines/lastexpress/entities/rebecca.cpp | 14 +-- engines/lastexpress/entities/salko.cpp | 4 +- engines/lastexpress/entities/servers0.cpp | 22 ++-- engines/lastexpress/entities/servers1.cpp | 12 +-- engines/lastexpress/entities/sophie.cpp | 2 +- engines/lastexpress/entities/tatiana.cpp | 18 ++-- engines/lastexpress/entities/train.cpp | 2 +- engines/lastexpress/entities/verges.cpp | 38 +++---- engines/lastexpress/entities/vesna.cpp | 8 +- engines/lastexpress/entities/yasmin.cpp | 6 +- 31 files changed, 377 insertions(+), 372 deletions(-) diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp index a0aeb05f7f..eef64bdf07 100644 --- a/engines/lastexpress/entities/abbot.cpp +++ b/engines/lastexpress/entities/abbot.cpp @@ -768,7 +768,7 @@ IMPLEMENT_FUNCTION(29, Abbot, function29) getSavePoints()->push(kEntityAbbot, kEntityBoutarel, kAction122358304); getEntities()->drawSequenceLeft(kEntityAbbot, "508B"); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1285,7 +1285,7 @@ IMPLEMENT_FUNCTION_II(40, Abbot, function40, CarIndex, EntityPosition) case kActionNone: if (getEntities()->updateEntity(kEntityAbbot, (CarIndex)params->param1, (EntityPosition)params->param2)) { - CALLBACK_ACTION(); + callbackAction(); } else if (!getEvent(kEventAbbotInvitationDrink) && getEntities()->isDistanceBetweenEntities(kEntityAbbot, kEntityPlayer, 1000) && !getEntities()->isInsideCompartments(kEntityPlayer) @@ -1300,7 +1300,7 @@ IMPLEMENT_FUNCTION_II(40, Abbot, function40, CarIndex, EntityPosition) case kActionDefault: if (getEntities()->updateEntity(kEntityAbbot, (CarIndex)params->param1, (EntityPosition)params->param2)) - CALLBACK_ACTION(); + callbackAction(); break; case kActionCallback: diff --git a/engines/lastexpress/entities/alexei.cpp b/engines/lastexpress/entities/alexei.cpp index b0f9dd6a42..437c31c476 100644 --- a/engines/lastexpress/entities/alexei.cpp +++ b/engines/lastexpress/entities/alexei.cpp @@ -204,7 +204,7 @@ IMPLEMENT_FUNCTION(13, Alexei, function13) getData()->entityPosition = kPosition_7500; getEntities()->clearSequences(kEntityAlexei); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -239,7 +239,7 @@ IMPLEMENT_FUNCTION(14, Alexei, function14) getObjects()->update(kObjectCompartment2, kEntityPlayer, kObjectLocation1, kCursorHandKnock, kCursorHand); getEntities()->exitCompartment(kEntityAlexei, kObjectCompartment2, true); - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -289,7 +289,7 @@ IMPLEMENT_FUNCTION(15, Alexei, function15) getData()->location = kLocationInsideCompartment; getEntities()->drawSequenceLeft(kEntityAlexei, "103B"); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -309,7 +309,7 @@ IMPLEMENT_FUNCTION_IS(16, Alexei, function16, TimeValue) getObjects()->update(kObjectCompartment2, kEntityPlayer, kObjectLocation1, kCursorHandKnock, kCursorHand); getObjects()->update(kObjectHandleInsideBathroom, kEntityPlayer, kObjectLocation1, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; } @@ -1375,7 +1375,7 @@ label_callback_3: case 2: case 5: - CALLBACK_ACTION(); + callbackAction(); break; case 3: @@ -1445,7 +1445,7 @@ IMPLEMENT_FUNCTION(36, Alexei, function36) break; case 4: - CALLBACK_ACTION(); + callbackAction(); break; } break; diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp index e4a25be380..806beaee9d 100644 --- a/engines/lastexpress/entities/anna.cpp +++ b/engines/lastexpress/entities/anna.cpp @@ -225,7 +225,7 @@ IMPLEMENT_FUNCTION(12, Anna, function12) case kActionEndSound: if (params->param2) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -287,7 +287,7 @@ IMPLEMENT_FUNCTION(12, Anna, function12) getObjects()->update(kObjectCompartmentF, kEntityAnna, kObjectLocation1, kCursorHandKnock, kCursorHand); getObjects()->update(kObject53, kEntityAnna, kObjectLocation1, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -422,7 +422,7 @@ IMPLEMENT_FUNCTION_IS(15, Anna, function15, TimeValue) getObjects()->update(kObjectCompartmentF, kEntityPlayer, kObjectLocation1, kCursorHandKnock, kCursorHand); getObjects()->update(kObject53, kEntityPlayer, kObjectLocation1, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; } @@ -575,7 +575,7 @@ IMPLEMENT_FUNCTION_II(17, Anna, function17, uint32, uint32) if (getEntities()->updateEntity(kEntityAnna, (CarIndex)params->param1, (EntityPosition)params->param2)) { getData()->inventoryItem = kItemNone; - CALLBACK_ACTION(); + callbackAction(); } break; @@ -613,7 +613,7 @@ IMPLEMENT_FUNCTION_II(17, Anna, function17, uint32, uint32) } if (getEntities()->updateEntity(kEntityAnna, (CarIndex)params->param1, (EntityPosition)params->param2)) - CALLBACK_ACTION(); + callbackAction(); break; case kActionCallback: @@ -662,7 +662,7 @@ IMPLEMENT_FUNCTION_I(18, Anna, function18, TimeValue) case kActionNone: if (params->param1 && params->param1 < getState()->time && getEntities()->isSomebodyInsideRestaurantOrSalon()) { getData()->inventoryItem = kItemNone; - CALLBACK_ACTION(); + callbackAction(); break; } @@ -755,7 +755,7 @@ IMPLEMENT_FUNCTION_I(18, Anna, function18, TimeValue) case kAction259136835: case kAction268773672: getData()->inventoryItem = kItemNone; - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -1664,7 +1664,7 @@ IMPLEMENT_FUNCTION_II(39, Anna, function39, CarIndex, EntityPosition) if (getEntities()->updateEntity(kEntityAnna, (CarIndex)params->param1, (EntityPosition)params->param2)) { getData()->inventoryItem = kItemNone; - CALLBACK_ACTION(); + callbackAction(); } break; @@ -1685,7 +1685,7 @@ IMPLEMENT_FUNCTION_II(39, Anna, function39, CarIndex, EntityPosition) if (getEntities()->updateEntity(kEntityAnna, (CarIndex)params->param1, (EntityPosition)params->param2)) { getData()->inventoryItem = kItemNone; - CALLBACK_ACTION(); + callbackAction(); } break; @@ -1983,7 +1983,7 @@ IMPLEMENT_FUNCTION_I(45, Anna, function45, bool) case 2: getEntities()->exitCompartment(kEntityAnna, kObjectCompartmentF, true); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2193,7 +2193,7 @@ IMPLEMENT_FUNCTION(49, Anna, leaveTableWithAugust) getSavePoints()->push(kEntityAnna, kEntityTables3, kActionDrawTablesWithChairs, "010M"); getEntities()->clearSequences(kEntityAugust); - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -3038,7 +3038,7 @@ IMPLEMENT_FUNCTION(60, Anna, function60) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityAnna); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -3531,7 +3531,7 @@ IMPLEMENT_FUNCTION(71, Anna, function71) getEntities()->exitCompartment(kEntityAnna, kObjectCompartmentF); getData()->entityPosition = kPosition_4070; - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -3587,7 +3587,7 @@ IMPLEMENT_FUNCTION_II(72, Anna, function72, CarIndex, EntityPosition) if (getEntities()->updateEntity(kEntityAnna, (CarIndex)params->param1, (EntityPosition)params->param2)) { getData()->inventoryItem = kItemNone; - CALLBACK_ACTION(); + callbackAction(); } break; @@ -3600,7 +3600,7 @@ IMPLEMENT_FUNCTION_II(72, Anna, function72, CarIndex, EntityPosition) case kActionDefault: if (getEntities()->updateEntity(kEntityAnna, (CarIndex)params->param1, (EntityPosition)params->param2)) { - CALLBACK_ACTION(); + callbackAction(); } else if (!getEvent(kEventAnnaTired)) getData()->inventoryItem = kItemInvalid; break; diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp index c9e89ab95b..86c02e4301 100644 --- a/engines/lastexpress/entities/august.cpp +++ b/engines/lastexpress/entities/august.cpp @@ -148,7 +148,7 @@ IMPLEMENT_FUNCTION_END IMPLEMENT_FUNCTION_SI(7, August, enterExitCompartment3, ObjectIndex) if (savepoint.action == kAction4) { getEntities()->exitCompartment(kEntityAugust, (ObjectIndex)params->param4); - CALLBACK_ACTION(); + callbackAction(); return; } @@ -175,7 +175,7 @@ IMPLEMENT_FUNCTION_IIS(10, August, callSavepointNoDrawing, EntityIndex, ActionIn if (!params->param6) getSavePoints()->call(kEntityAugust, (EntityIndex)params->param1, (ActionIndex)params->param2, (char *)¶ms->seq); - CALLBACK_ACTION(); + callbackAction(); break; case kAction10: @@ -231,7 +231,7 @@ IMPLEMENT_FUNCTION_I(17, August, function17, TimeValue) case kActionNone: if (params->param1 < getState()->time && !params->param2) { params->param2 = 1; - CALLBACK_ACTION(); + callbackAction(); break; } @@ -260,7 +260,7 @@ IMPLEMENT_FUNCTION_I(17, August, function17, TimeValue) case 1: if (ENTITY_PARAM(0, 1)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -270,7 +270,7 @@ IMPLEMENT_FUNCTION_I(17, August, function17, TimeValue) case 2: case 3: if (ENTITY_PARAM(0, 1)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -287,7 +287,7 @@ IMPLEMENT_FUNCTION_I(17, August, function17, TimeValue) case 5: if (ENTITY_PARAM(0, 1)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -306,7 +306,7 @@ IMPLEMENT_FUNCTION_II(18, August, updateEntity2, CarIndex, EntityPosition) case kActionNone: if (getEntities()->updateEntity(_entityIndex, (CarIndex)params->param1, (EntityPosition)params->param2)) { - CALLBACK_ACTION(); + callbackAction(); } else if (getEntities()->isDistanceBetweenEntities(kEntityAugust, kEntityPlayer, 1000) && !getEntities()->isInGreenCarEntrance(kEntityPlayer) && !getEntities()->isInsideCompartments(kEntityPlayer) @@ -314,14 +314,14 @@ IMPLEMENT_FUNCTION_II(18, August, updateEntity2, CarIndex, EntityPosition) if (getData()->car == kCarGreenSleeping || getData()->car == kCarRedSleeping) { ENTITY_PARAM(0, 1) = 1; - CALLBACK_ACTION(); + callbackAction(); } } break; case kActionDefault: if (getEntities()->updateEntity(_entityIndex, (CarIndex)params->param1, (EntityPosition)params->param2)) - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -405,7 +405,7 @@ IMPLEMENT_FUNCTION_II(19, August, function19, bool, bool) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityAugust); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -501,7 +501,7 @@ IMPLEMENT_FUNCTION_I(20, August, function20, bool) getObjects()->update(kObjectCompartment3, kEntityPlayer, kObjectLocation1, kCursorHandKnock, kCursorHand); getEntities()->exitCompartment(kEntityAugust, kObjectCompartment3, true); - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -518,7 +518,7 @@ IMPLEMENT_FUNCTION_I(21, August, function21, TimeValue) getObjects()->update(kObjectCompartment3, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; } @@ -784,7 +784,7 @@ IMPLEMENT_FUNCTION_I(23, August, function23, TimeValue) } else { getEntities()->exitCompartment(kEntityAugust, kObjectCompartment1, true); getObjects()->update(kObjectCompartment1, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -865,7 +865,7 @@ label_callback_9: if (params->param8 >= 3) { getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; } @@ -957,7 +957,7 @@ label_callback_9: case 2: getObjects()->update(kObjectCompartment1, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; case 3: @@ -984,7 +984,7 @@ label_callback_9: getScenes()->loadScene(kScene41); - CALLBACK_ACTION(); + callbackAction(); break; case 5: @@ -1026,7 +1026,7 @@ label_callback_9: case 12: getData()->location = kLocationOutsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; case 13: @@ -1054,7 +1054,7 @@ label_callback_9: getScenes()->loadScene(kScene41); - CALLBACK_ACTION(); + callbackAction(); break; case 15: @@ -1094,7 +1094,7 @@ IMPLEMENT_FUNCTION(24, August, dinner) getScenes()->loadSceneFromPosition(kCarRestaurant, 61); - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -2108,7 +2108,7 @@ IMPLEMENT_FUNCTION_II(41, August, function41, CarIndex, EntityPosition) getData()->inventoryItem = kItemNone; if (getEntities()->updateEntity(kEntityAugust, (CarIndex)params->param1, (EntityPosition)params->param2)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -2145,7 +2145,7 @@ IMPLEMENT_FUNCTION_II(41, August, function41, CarIndex, EntityPosition) case kActionDefault: if (getEntities()->updateEntity(kEntityAugust, (CarIndex)params->param1, (EntityPosition)params->param2)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -2170,7 +2170,7 @@ IMPLEMENT_FUNCTION_III(42, August, function42, CarIndex, EntityPosition, bool) if (getEntities()->updateEntity(kEntityAugust, (CarIndex)params->param1, (EntityPosition)params->param2)) { getData()->inventoryItem = kItemNone; - CALLBACK_ACTION(); + callbackAction(); } break; @@ -2189,7 +2189,7 @@ IMPLEMENT_FUNCTION_III(42, August, function42, CarIndex, EntityPosition, bool) case kActionDefault: if (getEntities()->updateEntity(kEntityAugust, (CarIndex)params->param1, (EntityPosition)params->param2)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -2471,7 +2471,7 @@ IMPLEMENT_FUNCTION(47, August, function47) break; case 5: - CALLBACK_ACTION(); + callbackAction(); break; } break; diff --git a/engines/lastexpress/entities/boutarel.cpp b/engines/lastexpress/entities/boutarel.cpp index bba07f5aa4..95ec37bf50 100644 --- a/engines/lastexpress/entities/boutarel.cpp +++ b/engines/lastexpress/entities/boutarel.cpp @@ -229,7 +229,7 @@ IMPLEMENT_FUNCTION_I(11, Boutarel, function11, bool) case 7: getData()->location = kLocationInsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -247,7 +247,7 @@ IMPLEMENT_FUNCTION(12, Boutarel, enterTableWithMmeBoutarel) getSavePoints()->push(kEntityBoutarel, kEntityTables2, kAction136455232); getData()->location = kLocationInsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -274,7 +274,7 @@ IMPLEMENT_FUNCTION(13, Boutarel, leaveTableWithMmeBoutarel) getSavePoints()->push(kEntityBoutarel, kEntityTables2, kActionDrawTablesWithChairs, "008F"); getEntities()->clearSequences(kEntityMmeBoutarel); - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -356,7 +356,7 @@ IMPLEMENT_FUNCTION_I(14, Boutarel, function14, bool) getEntities()->clearSequences(kEntityBoutarel); getData()->location = kLocationInsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -414,7 +414,7 @@ IMPLEMENT_FUNCTION_IS(15, Boutarel, function15, bool) case 5: getData()->location = kLocationInsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -462,7 +462,7 @@ IMPLEMENT_FUNCTION_IS(16, Boutarel, function16, bool) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityBoutarel); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -509,7 +509,7 @@ IMPLEMENT_FUNCTION_I(18, Boutarel, function18, TimeValue) getObjects()->update(kObjectCompartmentC, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); getObjects()->update(kObject50, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; } @@ -680,7 +680,7 @@ IMPLEMENT_FUNCTION(20, Boutarel, function20) case 4: getSavePoints()->push(kEntityBoutarel, kEntityCooks, kAction224849280); - CALLBACK_ACTION(); + callbackAction(); break; } break; diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp index b9384cbab9..eab4dfe2c1 100644 --- a/engines/lastexpress/entities/chapters.cpp +++ b/engines/lastexpress/entities/chapters.cpp @@ -150,7 +150,7 @@ IMPLEMENT_FUNCTION(5, Chapters, resetMainEntities) RESET_ENTITY_STATE(kEntityVesna, Vesna, setup_reset); RESET_ENTITY_STATE(kEntityYasmin, Yasmin, setup_reset); - CALLBACK_ACTION(); + callbackAction(); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// @@ -189,7 +189,7 @@ IMPLEMENT_FUNCTION(6, Chapters, chapter1End) getScenes()->loadScene(kScene41); - CALLBACK_ACTION(); + callbackAction(); } else { getSound()->playSound(kEntityPlayer, "LIB014"); getSound()->playSound(kEntityPlayer, "LIB015", kFlagDefault, 15); @@ -1813,7 +1813,7 @@ void Chapters::enterExitHelper(bool isEnteringStation) { ENTITY_PARAM(0, 3) = 1; } - CALLBACK_ACTION(); + callbackAction(); } } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/cooks.cpp b/engines/lastexpress/entities/cooks.cpp index d962d21f8a..63494e6062 100644 --- a/engines/lastexpress/entities/cooks.cpp +++ b/engines/lastexpress/entities/cooks.cpp @@ -94,7 +94,7 @@ IMPLEMENT_FUNCTION(3, Cooks, function3) case kActionDrawScene: if (!getEntities()->isInKitchen(kEntityPlayer)) { getEntities()->clearSequences(kEntityCooks); - CALLBACK_ACTION(); + callbackAction(); break; } @@ -106,7 +106,7 @@ IMPLEMENT_FUNCTION(3, Cooks, function3) if (!getEntities()->hasValidFrame(kEntityCooks)) { getSound()->playSound(kEntityCooks, "LIB015"); getEntities()->clearSequences(kEntityCooks); - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -120,7 +120,7 @@ IMPLEMENT_FUNCTION(3, Cooks, function3) if (params->param1 && !getEntities()->hasValidFrame(kEntityCooks)) { getSound()->playSound(kEntityCooks, "LIB015"); getEntities()->clearSequences(kEntityCooks); - CALLBACK_ACTION(); + callbackAction(); } break; @@ -180,7 +180,7 @@ IMPLEMENT_FUNCTION(4, Cooks, function4) case kActionDrawScene: if (!getEntities()->isInKitchen(kEntityPlayer)) { getEntities()->clearSequences(kEntityCooks); - CALLBACK_ACTION(); + callbackAction(); break; } @@ -192,7 +192,7 @@ IMPLEMENT_FUNCTION(4, Cooks, function4) if (!getEntities()->hasValidFrame(kEntityCooks)) { getSound()->playSound(kEntityCooks, "LIB015"); getEntities()->clearSequences(kEntityCooks); - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -206,7 +206,7 @@ IMPLEMENT_FUNCTION(4, Cooks, function4) if (params->param1 && !getEntities()->hasValidFrame(kEntityCooks)) { getSound()->playSound(kEntityCooks, "LIB015"); getEntities()->clearSequences(kEntityCooks); - CALLBACK_ACTION(); + callbackAction(); } break; diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp index e735f50d52..dc7beb3167 100644 --- a/engines/lastexpress/entities/coudert.cpp +++ b/engines/lastexpress/entities/coudert.cpp @@ -128,7 +128,7 @@ IMPLEMENT_FUNCTION_S(2, Coudert, bloodJacket) break; case kActionExitCompartment: - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -173,7 +173,7 @@ IMPLEMENT_FUNCTION(4, Coudert, callbackActionOnDirection) case kActionNone: if (getData()->direction != kDirectionRight) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -181,7 +181,7 @@ IMPLEMENT_FUNCTION(4, Coudert, callbackActionOnDirection) break; case kActionExitCompartment: - CALLBACK_ACTION(); + callbackAction(); break; case kActionCallback: @@ -225,7 +225,7 @@ IMPLEMENT_FUNCTION_S(6, Coudert, playSound) break; case kActionEndSound: - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -254,7 +254,7 @@ IMPLEMENT_FUNCTION_NOSETUP(7, Coudert, playSound16) break; case kActionEndSound: - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -294,7 +294,7 @@ IMPLEMENT_FUNCTION_II(9, Coudert, updateEntity, CarIndex, EntityPosition) if (getEntities()->updateEntity(kEntityCoudert, (CarIndex)params->param1, (EntityPosition)params->param2)) { getData()->inventoryItem = kItemNone; - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -330,7 +330,7 @@ IMPLEMENT_FUNCTION_II(9, Coudert, updateEntity, CarIndex, EntityPosition) params->param3 = kItemInvalid; if (getEntities()->updateEntity(kEntityCoudert, (CarIndex)params->param1, (EntityPosition)params->param2)) - CALLBACK_ACTION(); + callbackAction(); break; case kActionCallback: @@ -367,7 +367,7 @@ IMPLEMENT_FUNCTION_I(10, Coudert, updateFromTime, uint32) UPDATE_PARAM(params->param2, getState()->time, params->param1); - CALLBACK_ACTION(); + callbackAction(); break; case kActionCallback: @@ -390,7 +390,7 @@ IMPLEMENT_FUNCTION_I(11, Coudert, updateFromTicks, uint32) UPDATE_PARAM(params->param2, getState()->timeTicks, params->param1); - CALLBACK_ACTION(); + callbackAction(); break; case kActionCallback: @@ -410,7 +410,7 @@ IMPLEMENT_FUNCTION_I(12, Coudert, excuseMe, EntityIndex) return; if (getSoundQueue()->isBuffered(kEntityCoudert)) { - CALLBACK_ACTION(); + callbackAction(); return; } @@ -450,7 +450,7 @@ IMPLEMENT_FUNCTION_I(12, Coudert, excuseMe, EntityIndex) getSound()->playSound(kEntityCoudert, "JAC1112E"); } - CALLBACK_ACTION(); + callbackAction(); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// @@ -559,7 +559,7 @@ IMPLEMENT_FUNCTION_II(13, Coudert, function13, bool, EntityIndex) case 5: case 6: case 7: - CALLBACK_ACTION(); + callbackAction(); break; case 9: @@ -627,7 +627,7 @@ IMPLEMENT_FUNCTION_I(14, Coudert, function14, EntityIndex) break; case 5: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -704,7 +704,7 @@ IMPLEMENT_FUNCTION_I(15, Coudert, function15, bool) break; case 5: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -722,7 +722,7 @@ IMPLEMENT_FUNCTION(16, Coudert, function16) ENTITY_PARAM(2, 1) = 0; getInventory()->setLocationAndProcess(kItem5, kObjectLocation1); - CALLBACK_ACTION(); + callbackAction(); break; } @@ -741,7 +741,7 @@ IMPLEMENT_FUNCTION(16, Coudert, function16) if (!getEntities()->isPlayerPosition(kCarRedSleeping, 2)) getData()->entityPosition = kPosition_2088; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -759,7 +759,7 @@ IMPLEMENT_FUNCTION_I(17, Coudert, function17, bool) if (ENTITY_PARAM(2, 1)) { ENTITY_PARAM(2, 1) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } @@ -787,7 +787,7 @@ IMPLEMENT_FUNCTION_I(17, Coudert, function17, bool) case 1: case 2: case 3: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -815,7 +815,7 @@ IMPLEMENT_FUNCTION(18, Coudert, function18) getEntities()->drawSequenceLeft(kEntityCoudert, "627K"); getScenes()->loadSceneFromItemPosition(kItem5); - CALLBACK_ACTION(); + callbackAction(); break; } @@ -847,7 +847,7 @@ IMPLEMENT_FUNCTION(18, Coudert, function18) break; case 2: - CALLBACK_ACTION(); + callbackAction(); break; case 3: @@ -855,7 +855,7 @@ IMPLEMENT_FUNCTION(18, Coudert, function18) ENTITY_PARAM(0, 1) = 0; getSavePoints()->push(kEntityCoudert, kEntityCoudert, kActionDrawScene); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -874,14 +874,14 @@ IMPLEMENT_FUNCTION_I(19, Coudert, function19, bool) || ENTITY_PARAM(2, 4) || ENTITY_PARAM(2, 6)) { getInventory()->setLocationAndProcess(kItem5, kObjectLocation1); ENTITY_PARAM(2, 1) = 1; - CALLBACK_ACTION(); + callbackAction(); break; } if (ENTITY_PARAM(0, 3) || ENTITY_PARAM(0, 5) || ENTITY_PARAM(0, 4)) { getScenes()->loadSceneFromItemPosition(kItem5); ENTITY_PARAM(2, 1) = 1; - CALLBACK_ACTION(); + callbackAction(); break; } @@ -901,7 +901,7 @@ IMPLEMENT_FUNCTION_I(19, Coudert, function19, bool) getEntities()->drawSequenceLeft(kEntityCoudert, ENTITY_PARAM(0, 2) ? "627B" : "627E"); ENTITY_PARAM(0, 1) = 0; - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -928,7 +928,7 @@ IMPLEMENT_FUNCTION_II(20, Coudert, function20, ObjectIndex, ObjectIndex) if (params->param2) getObjects()->update((ObjectIndex)params->param2, (EntityIndex)params->param7, (ObjectLocation)params->param8, (CursorStyle)CURRENT_PARAM(1, 1), (CursorStyle)CURRENT_PARAM(1, 2)); - CALLBACK_ACTION(); + callbackAction(); break; case kActionKnock: @@ -1042,7 +1042,7 @@ IMPLEMENT_FUNCTION(21, Coudert, function21) case 5: getData()->location = kLocationOutsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; case 6: @@ -1071,7 +1071,7 @@ IMPLEMENT_FUNCTION(21, Coudert, function21) getData()->location = kLocationOutsideCompartment; getSavePoints()->push(kEntityCoudert, kEntityIvo, kAction123852928); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1143,7 +1143,7 @@ IMPLEMENT_FUNCTION(22, Coudert, function22) case 5: getData()->location = kLocationOutsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; case 6: @@ -1172,7 +1172,7 @@ IMPLEMENT_FUNCTION(22, Coudert, function22) getData()->location = kLocationOutsideCompartment; getSavePoints()->push(kEntityCoudert, kEntityMilos, kAction123852928); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1223,7 +1223,7 @@ IMPLEMENT_FUNCTION(23, Coudert, function23) case 3: getEntities()->exitCompartment(kEntityCoudert, kObjectCompartmentF, true); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1294,7 +1294,7 @@ IMPLEMENT_FUNCTION(25, Coudert, function25) getData()->location = kLocationOutsideCompartment; getSavePoints()->push(kEntityCoudert, kEntityRebecca, kAction123852928); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1355,7 +1355,7 @@ IMPLEMENT_FUNCTION(26, Coudert, function26) case 5: getData()->location = kLocationOutsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; case 6: @@ -1373,7 +1373,7 @@ IMPLEMENT_FUNCTION(26, Coudert, function26) getData()->location = kLocationOutsideCompartment; getSavePoints()->push(kEntityCoudert, kEntityMmeBoutarel, kAction123852928); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1444,7 +1444,7 @@ IMPLEMENT_FUNCTION(27, Coudert, function27) case 5: getData()->location = kLocationOutsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; case 6: @@ -1471,7 +1471,7 @@ IMPLEMENT_FUNCTION(27, Coudert, function27) getData()->location = kLocationOutsideCompartment; getSavePoints()->push(kEntityCoudert, kEntityBoutarel, kAction123852928); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1513,7 +1513,7 @@ IMPLEMENT_FUNCTION_I(30, Coudert, function30, ObjectIndex) case kActionDefault: switch (parameters->param1) { default: - CALLBACK_ACTION(); + callbackAction(); // Stop processing here return; @@ -1613,7 +1613,7 @@ IMPLEMENT_FUNCTION_I(30, Coudert, function30, ObjectIndex) break; case 6: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1652,7 +1652,7 @@ IMPLEMENT_FUNCTION_I(31, Coudert, function31, uint32) case 2: case 3: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1697,7 +1697,7 @@ IMPLEMENT_FUNCTION(32, Coudert, function32) break; case 5: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1724,7 +1724,7 @@ IMPLEMENT_FUNCTION(33, Coudert, function33) setup_updateEntity(kCarRedSleeping, kPosition_540); } } else { - CALLBACK_ACTION(); + callbackAction(); } break; @@ -1761,7 +1761,7 @@ IMPLEMENT_FUNCTION(33, Coudert, function33) case 4: ENTITY_PARAM(2, 6) = 0; - CALLBACK_ACTION(); + callbackAction(); break; case 5: @@ -1806,7 +1806,7 @@ IMPLEMENT_FUNCTION(33, Coudert, function33) case 10: ENTITY_PARAM(2, 6) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1880,7 +1880,7 @@ IMPLEMENT_FUNCTION_I(34, Coudert, function34, bool) break; case 7: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1949,7 +1949,7 @@ IMPLEMENT_FUNCTION_I(35, Coudert, function35, bool) break; case 4: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2172,7 +2172,7 @@ IMPLEMENT_FUNCTION(39, Coudert, function39) getSavePoints()->push(kEntityCoudert, kEntityVerges, kAction167854368); ENTITY_PARAM(2, 2) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2534,7 +2534,7 @@ IMPLEMENT_FUNCTION(41, Coudert, function41) case 18: getSavePoints()->push(kEntityCoudert, kEntityMilos, kAction208228224); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -3049,7 +3049,7 @@ IMPLEMENT_FUNCTION(46, Coudert, function46) break; case 11: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -3114,7 +3114,7 @@ IMPLEMENT_FUNCTION_I(47, Coudert, function47, bool) break; case 7: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -3162,7 +3162,7 @@ IMPLEMENT_FUNCTION(48, Coudert, function48) break; case 5: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -3259,7 +3259,7 @@ IMPLEMENT_FUNCTION(49, Coudert, function49) break; case 11: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -3345,7 +3345,7 @@ IMPLEMENT_FUNCTION(50, Coudert, function50) break; case 9: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -3694,7 +3694,7 @@ IMPLEMENT_FUNCTION(54, Coudert, function54) break; case 3: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -3762,7 +3762,7 @@ IMPLEMENT_FUNCTION(55, Coudert, function55) break; case 7: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -3866,7 +3866,7 @@ IMPLEMENT_FUNCTION(56, Coudert, function56) break; case 16: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -4166,7 +4166,7 @@ void Coudert::visitCompartment(const SavePoint &savepoint, EntityPosition positi case 6: getData()->location = kLocationOutsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; } break; diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index dbce2246d0..7fdfd53d2f 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -242,12 +242,12 @@ void Entity::savegame(const SavePoint &savepoint) { break; case kActionNone: - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: getSaveLoad()->saveGame((SavegameType)params->param1, _entityIndex, (EventIndex)params->param2); - CALLBACK_ACTION(); + callbackAction(); break; } } @@ -260,7 +260,7 @@ void Entity::playSound(const SavePoint &savepoint, bool resetItem, SoundFlag fla break; case kActionEndSound: - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -280,7 +280,7 @@ void Entity::draw(const SavePoint &savepoint, bool handleExcuseMe) { break; case kActionExitCompartment: - CALLBACK_ACTION(); + callbackAction(); break; case kActionExcuseMeCath: @@ -304,7 +304,7 @@ void Entity::draw2(const SavePoint &savepoint) { break; case kActionExitCompartment: - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -323,7 +323,7 @@ void Entity::updateFromTicks(const SavePoint &savepoint) { case kActionNone: UPDATE_PARAM(params->param2, getState()->timeTicks, params->param1) - CALLBACK_ACTION(); + callbackAction(); break; } } @@ -337,7 +337,7 @@ void Entity::updateFromTime(const SavePoint &savepoint) { case kActionNone: UPDATE_PARAM(params->param2, getState()->time, params->param1) - CALLBACK_ACTION(); + callbackAction(); break; } } @@ -348,12 +348,12 @@ void Entity::callbackActionOnDirection(const SavePoint &savepoint) { break; case kActionExitCompartment: - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: if (getData()->direction != kDirectionRight) - CALLBACK_ACTION(); + callbackAction(); break; } } @@ -366,7 +366,7 @@ void Entity::callbackActionRestaurantOrSalon(const SavePoint &savepoint) { case kActionNone: case kActionDefault: if (getEntities()->isSomebodyInsideRestaurantOrSalon()) - CALLBACK_ACTION(); + callbackAction(); break; } } @@ -391,7 +391,7 @@ void Entity::updateEntity(const SavePoint &savepoint, bool handleExcuseMe) { case kActionNone: case kActionDefault: if (getEntities()->updateEntity(_entityIndex, (CarIndex)params->param1, (EntityPosition)params->param2)) - CALLBACK_ACTION(); + callbackAction(); break; } } @@ -406,7 +406,7 @@ void Entity::callSavepoint(const SavePoint &savepoint, bool handleExcuseMe) { case kActionExitCompartment: if (!CURRENT_PARAM(1, 1)) getSavePoints()->call(_entityIndex, (EntityIndex)params->param4, (ActionIndex)params->param5, (char *)¶ms->seq2); - CALLBACK_ACTION(); + callbackAction(); break; case kActionExcuseMeCath: @@ -444,7 +444,7 @@ void Entity::enterExitCompartment(const SavePoint &savepoint, EntityPosition pos if (updateLocation) getData()->location = kLocationInsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -473,7 +473,7 @@ void Entity::updatePosition(const SavePoint &savepoint, bool handleExcuseMe) { case kActionExitCompartment: getEntities()->updatePositionExit(_entityIndex, (CarIndex)params->param4, (Position)params->param5); - CALLBACK_ACTION(); + callbackAction(); break; case kActionExcuseMeCath: @@ -490,4 +490,15 @@ void Entity::updatePosition(const SavePoint &savepoint, bool handleExcuseMe) { } } +void Entity::callbackAction() { + if (getData()->currentCall == 0) + error("[Entity::callbackAction] currentCall is already 0, cannot proceed"); + + getData()->currentCall--; + + getSavePoints()->setCallback(_entityIndex, _callbacks[_data->getCurrentCallback()]); + + getSavePoints()->call(_entityIndex, _entityIndex, kActionCallback); +} + } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 039f461c7b..3fd2009313 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -784,13 +784,18 @@ protected: /** * Updates the position * - * @param savepoint The savepoint + * @param savepoint The savepoint * - Sequence name * - CarIndex * - Position * @param handleExcuseMe true to handle excuseMe actions */ void updatePosition(const SavePoint &savepoint, bool handleExcuseMe = false); + + /** + * Store the current callback information and perform the callback action + */ + void callbackAction(); }; diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 2da0da15b3..c21f2c14e2 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -378,7 +378,7 @@ void class::setup_##name() { \ #define TIME_CHECK_CALLBACK_ACTION(timeValue, parameter) \ if (getState()->time > timeValue && !parameter) { \ parameter = 1; \ - CALLBACK_ACTION(); \ + callbackAction(); \ break; \ } @@ -408,17 +408,6 @@ void class::setup_##name() { \ } \ } -////////////////////////////////////////////////////////////////////////// -// Callback action -////////////////////////////////////////////////////////////////////////// -#define CALLBACK_ACTION() { \ - if (getData()->currentCall == 0) \ - error("[CALLBACK_ACTION] currentCall is already 0, cannot proceed"); \ - getData()->currentCall--; \ - getSavePoints()->setCallback(_entityIndex, _callbacks[_data->getCurrentCallback()]); \ - getSavePoints()->call(_entityIndex, _entityIndex, kActionCallback); \ - } - ////////////////////////////////////////////////////////////////////////// // Param update ////////////////////////////////////////////////////////////////////////// @@ -486,7 +475,7 @@ void class::setup_##name() { \ case 2: \ getData()->entityPosition = positionFrom; \ getEntities()->clearSequences(_entityIndex); \ - CALLBACK_ACTION(); \ + callbackAction(); \ } \ break; \ } @@ -516,7 +505,7 @@ void class::setup_##name() { \ case 3: \ getData()->location = kLocationInsideCompartment; \ getEntities()->clearSequences(_entityIndex); \ - CALLBACK_ACTION(); \ + callbackAction(); \ break; \ } \ break; \ diff --git a/engines/lastexpress/entities/francois.cpp b/engines/lastexpress/entities/francois.cpp index 3cbfc68734..b99dbe466b 100644 --- a/engines/lastexpress/entities/francois.cpp +++ b/engines/lastexpress/entities/francois.cpp @@ -113,7 +113,7 @@ IMPLEMENT_FUNCTION_II(8, Francois, updateEntity, CarIndex, EntityPosition) case kActionNone: if (getEntities()->updateEntity(_entityIndex, (CarIndex)params->param1, (EntityPosition)params->param2)) { - CALLBACK_ACTION(); + callbackAction(); } else { if (!getEntities()->isDistanceBetweenEntities(kEntityFrancois, kEntityPlayer, 2000) || !getInventory()->hasItem(kItemFirebird) @@ -168,7 +168,7 @@ IMPLEMENT_FUNCTION_II(8, Francois, updateEntity, CarIndex, EntityPosition) case kActionDefault: if (getEntities()->updateEntity(_entityIndex, (CarIndex)params->param1, (EntityPosition)params->param2)) - CALLBACK_ACTION(); + callbackAction(); break; case kActionCallback: @@ -224,7 +224,7 @@ IMPLEMENT_FUNCTION(9, Francois, function9) case 2: getData()->location = kLocationOutsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -262,7 +262,7 @@ IMPLEMENT_FUNCTION(10, Francois, function10) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityFrancois); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -441,7 +441,7 @@ label_callback: break; case 5: - CALLBACK_ACTION(); + callbackAction(); break; case 6: @@ -464,7 +464,7 @@ label_callback: getData()->field_4A3 = 30; getData()->inventoryItem = kItemNone; - CALLBACK_ACTION(); + callbackAction(); break; case kAction205346192: @@ -523,7 +523,7 @@ IMPLEMENT_FUNCTION(12, Francois, function12) break; case 7: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -608,7 +608,7 @@ IMPLEMENT_FUNCTION(13, Francois, function13) break; case 11: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -707,7 +707,7 @@ IMPLEMENT_FUNCTION_IIS(14, Francois, function14, ObjectIndex, EntityPosition) break; case 13: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -763,7 +763,7 @@ IMPLEMENT_FUNCTION(15, Francois, function15) case 7: if (!getEntities()->isInsideCompartment(kEntityMmeBoutarel, kCarRedSleeping, kPosition_5790)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -772,7 +772,7 @@ IMPLEMENT_FUNCTION(15, Francois, function15) break; case 8: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -829,7 +829,7 @@ IMPLEMENT_FUNCTION(16, Francois, function16) getData()->entityPosition = kPosition_5790; getData()->location = kLocationInsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; } break; diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp index 6f08c4cd62..877c0c29b3 100644 --- a/engines/lastexpress/entities/gendarmes.cpp +++ b/engines/lastexpress/entities/gendarmes.cpp @@ -194,7 +194,7 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, function9, CarIndex, EntityPosition) break; case 1: - CALLBACK_ACTION(); + callbackAction(); break; case 2: @@ -232,7 +232,7 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, function9, CarIndex, EntityPosition) case 6: getData()->location = kLocationOutsideCompartment; getEntities()->exitCompartment(kEntityGendarmes, (ObjectIndex)parameters2->param5); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -270,7 +270,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje if (!params->param4 && getEntities()->isOutsideAlexeiWindow()) { getObjects()->update((ObjectIndex)params->param3, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); } else { if (getEntities()->isOutsideAlexeiWindow()) getScenes()->loadSceneFromPosition(kCarGreenSleeping, 49); @@ -321,7 +321,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje getLogic()->gameOver(kSavegameTypeIndex, 1, kSceneGameOverBloodJacket, true); getObjects()->update((ObjectIndex)params->param3, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; case 4: @@ -329,7 +329,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje getLogic()->gameOver(kSavegameTypeIndex, 1, kSceneGameOverPolice1, true); getObjects()->update((ObjectIndex)params->param3, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; case 5: @@ -557,7 +557,7 @@ void Gendarmes::arrest(const SavePoint &savepoint, bool shouldPlaySound, SoundFl if (shouldUpdateEntity) { EXPOSE_PARAMS(EntityData::EntityParametersIIII); if (getEntities()->updateEntity(kEntityGendarmes, (CarIndex)params->param1, (EntityPosition)params->param2)) { - CALLBACK_ACTION(); + callbackAction(); break; } } @@ -581,7 +581,7 @@ void Gendarmes::arrest(const SavePoint &savepoint, bool shouldPlaySound, SoundFl break; case kActionExitCompartment: - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -598,7 +598,7 @@ void Gendarmes::arrest(const SavePoint &savepoint, bool shouldPlaySound, SoundFl if (shouldUpdateEntity) { EXPOSE_PARAMS(EntityData::EntityParametersIIII); if (getEntities()->updateEntity(kEntityGendarmes, (CarIndex)params->param1, (EntityPosition)params->param2)) { - CALLBACK_ACTION(); + callbackAction(); break; } } diff --git a/engines/lastexpress/entities/ivo.cpp b/engines/lastexpress/entities/ivo.cpp index a097251f0d..cb0fb92b74 100644 --- a/engines/lastexpress/entities/ivo.cpp +++ b/engines/lastexpress/entities/ivo.cpp @@ -181,7 +181,7 @@ IMPLEMENT_FUNCTION(11, Ivo, function11) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityIvo); - CALLBACK_ACTION(); + callbackAction(); break; case 4: @@ -190,7 +190,7 @@ IMPLEMENT_FUNCTION(11, Ivo, function11) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityIvo); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -207,7 +207,7 @@ IMPLEMENT_FUNCTION(12, Ivo, sitAtTableWithSalko) getEntities()->clearSequences(kEntitySalko); getSavePoints()->push(kEntityIvo, kEntityTables2, kAction136455232); - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -228,7 +228,7 @@ IMPLEMENT_FUNCTION(13, Ivo, leaveTableWithSalko) getSavePoints()->push(kEntityIvo, kEntityTables2, kActionDrawTablesWithChairs, "009E"); getEntities()->clearSequences(kEntitySalko); - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp index 8916f14911..0c4045097a 100644 --- a/engines/lastexpress/entities/kahina.cpp +++ b/engines/lastexpress/entities/kahina.cpp @@ -88,7 +88,7 @@ IMPLEMENT_FUNCTION_END IMPLEMENT_FUNCTION_I(4, Kahina, updateFromTime, uint32) if (savepoint.action == kAction137503360) { ENTITY_PARAM(0, 2) = 1; - CALLBACK_ACTION(); + callbackAction(); } Entity::updateFromTime(savepoint); @@ -109,7 +109,7 @@ IMPLEMENT_FUNCTION_I(6, Kahina, function6, TimeValue) if (params->param1 < getState()->time && !params->param2) { params->param2 = 1; - CALLBACK_ACTION(); + callbackAction(); break; } @@ -139,7 +139,7 @@ IMPLEMENT_FUNCTION_I(6, Kahina, function6, TimeValue) case 1: if (ENTITY_PARAM(0, 1) || ENTITY_PARAM(0, 2)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -149,7 +149,7 @@ IMPLEMENT_FUNCTION_I(6, Kahina, function6, TimeValue) case 2: case 3: if (ENTITY_PARAM(0, 1) || ENTITY_PARAM(0, 2)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -161,7 +161,7 @@ IMPLEMENT_FUNCTION_I(6, Kahina, function6, TimeValue) case 4: if (ENTITY_PARAM(0, 2)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -171,7 +171,7 @@ IMPLEMENT_FUNCTION_I(6, Kahina, function6, TimeValue) case 5: if (ENTITY_PARAM(0, 1) || ENTITY_PARAM(0, 2)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -183,7 +183,7 @@ IMPLEMENT_FUNCTION_I(6, Kahina, function6, TimeValue) case kAction137503360: ENTITY_PARAM(0, 2) = 1; - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -196,12 +196,12 @@ IMPLEMENT_FUNCTION_II(7, Kahina, updateEntity2, CarIndex, EntityPosition) case kActionNone: if (getEntities()->updateEntity(_entityIndex, (CarIndex)params->param1, (EntityPosition)params->param2)) - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: if (getEntities()->updateEntity(_entityIndex, (CarIndex)params->param1, (EntityPosition)params->param2)) { - CALLBACK_ACTION(); + callbackAction(); } else if (getEntities()->isDistanceBetweenEntities(kEntityKahina, kEntityPlayer, 1000) && !getEntities()->isInGreenCarEntrance(kEntityPlayer) && !getEntities()->isInsideCompartments(kEntityPlayer) @@ -209,14 +209,14 @@ IMPLEMENT_FUNCTION_II(7, Kahina, updateEntity2, CarIndex, EntityPosition) if (getData()->car == kCarGreenSleeping || getData()->car == kCarRedSleeping) { ENTITY_PARAM(0, 1) = 1; - CALLBACK_ACTION(); + callbackAction(); } } break; case kAction137503360: ENTITY_PARAM(0, 2) = 1; - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -370,12 +370,12 @@ IMPLEMENT_FUNCTION(14, Kahina, function14) case kActionExitCompartment: getEntities()->exitCompartment(kEntityKahina, kObjectCompartmentF); - CALLBACK_ACTION(); + callbackAction(); break; case kAction4: getEntities()->exitCompartment(kEntityKahina, kObjectCompartmentF); - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -540,7 +540,7 @@ IMPLEMENT_FUNCTION(15, Kahina, function15) case 17: getEntities()->clearSequences(kEntityKahina); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -727,7 +727,7 @@ IMPLEMENT_FUNCTION_II(19, Kahina, function19, CarIndex, EntityPosition) RESET_ENTITY_STATE(kEntityKahina, Kahina, setup_function22); if (getEntities()->updateEntity(kEntityKahina, (CarIndex)params->param1, (EntityPosition)params->param2)) - CALLBACK_ACTION(); + callbackAction(); break; case kActionExcuseMeCath: @@ -743,7 +743,7 @@ IMPLEMENT_FUNCTION_II(19, Kahina, function19, CarIndex, EntityPosition) case kActionDefault: if (getEntities()->updateEntity(kEntityKahina, (CarIndex)params->param1, (EntityPosition)params->param2)) - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -1123,7 +1123,7 @@ IMPLEMENT_FUNCTION(23, Kahina, function23) case 7: getEntities()->clearSequences(kEntityKahina); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1260,7 +1260,7 @@ IMPLEMENT_FUNCTION(25, Kahina, function25) getProgress().field_78 = 1; ENTITY_PARAM(0, 3) = 0; - CALLBACK_ACTION(); + callbackAction(); break; case kActionCallback: @@ -1301,7 +1301,7 @@ IMPLEMENT_FUNCTION(25, Kahina, function25) case 13: getEntities()->clearSequences(kEntityKahina); - CALLBACK_ACTION(); + callbackAction(); break; case 6: @@ -1385,7 +1385,7 @@ IMPLEMENT_FUNCTION(26, Kahina, function26) getInventory()->setLocationAndProcess(kItemBriefcase, kObjectLocation2); getProgress().field_78 = 1; - CALLBACK_ACTION(); + callbackAction(); break; case kActionCallback: @@ -1427,7 +1427,7 @@ IMPLEMENT_FUNCTION(26, Kahina, function26) case 9: getEntities()->clearSequences(kEntityKahina); - CALLBACK_ACTION(); + callbackAction(); break; case 6: diff --git a/engines/lastexpress/entities/mahmud.cpp b/engines/lastexpress/entities/mahmud.cpp index a6fbd1a443..ebe754bfa4 100644 --- a/engines/lastexpress/entities/mahmud.cpp +++ b/engines/lastexpress/entities/mahmud.cpp @@ -93,7 +93,7 @@ IMPLEMENT_FUNCTION_SIII(4, Mahmud, enterExitCompartment2, ObjectIndex, uint32, O case kActionExitCompartment: getEntities()->exitCompartment(kEntityMahmud, (ObjectIndex)params->param4); - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -265,7 +265,7 @@ IMPLEMENT_FUNCTION_II(10, Mahmud, function10, ObjectIndex, bool) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityMahmud); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -390,7 +390,7 @@ IMPLEMENT_FUNCTION(11, Mahmud, function11) getEntities()->clearSequences(kEntityMahmud); getObjects()->update(kObjectCompartment4, kEntityMahmud, kObjectLocation3, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -469,7 +469,7 @@ IMPLEMENT_FUNCTION(12, Mahmud, function12) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityMahmud); - CALLBACK_ACTION(); + callbackAction(); break; } @@ -535,7 +535,7 @@ IMPLEMENT_FUNCTION(13, Mahmud, function13) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityMahmud); - CALLBACK_ACTION(); + callbackAction(); break; } diff --git a/engines/lastexpress/entities/max.cpp b/engines/lastexpress/entities/max.cpp index 7911a5e5b6..cecfe64dc6 100644 --- a/engines/lastexpress/entities/max.cpp +++ b/engines/lastexpress/entities/max.cpp @@ -184,7 +184,7 @@ IMPLEMENT_FUNCTION(7, Max, function7) case kAction101687594: getEntities()->clearSequences(kEntityMax); - CALLBACK_ACTION(); + callbackAction(); break; case kAction122358304: @@ -193,7 +193,7 @@ IMPLEMENT_FUNCTION(7, Max, function7) getObjects()->update(kObjectCompartmentF, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); getObjects()->update(kObject53, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; case kAction158007856: diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp index e465bac3c9..5672fe4d49 100644 --- a/engines/lastexpress/entities/mertens.cpp +++ b/engines/lastexpress/entities/mertens.cpp @@ -119,7 +119,7 @@ IMPLEMENT_FUNCTION_S(2, Mertens, bloodJacket) break; case kActionExitCompartment: - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -168,7 +168,7 @@ IMPLEMENT_FUNCTION_SI(4, Mertens, enterExitCompartment2, ObjectIndex) case kAction4: getEntities()->exitCompartment(kEntityMertens, (ObjectIndex)params->param4); - CALLBACK_ACTION(); + callbackAction(); return; case kActionCallback: @@ -195,7 +195,7 @@ IMPLEMENT_FUNCTION_SIII(5, Mertens, enterExitCompartment3, ObjectIndex, EntityPo case kActionExitCompartment: getEntities()->exitCompartment(_entityIndex, (ObjectIndex)params->param4); getData()->entityPosition = (EntityPosition)params->param5; - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -227,7 +227,7 @@ IMPLEMENT_FUNCTION(6, Mertens, callbackActionOnDirection) case kActionNone: if (getData()->direction != kDirectionRight) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -235,7 +235,7 @@ IMPLEMENT_FUNCTION(6, Mertens, callbackActionOnDirection) break; case kActionExitCompartment: - CALLBACK_ACTION(); + callbackAction(); break; case kActionCallback: @@ -258,7 +258,7 @@ IMPLEMENT_FUNCTION_S(7, Mertens, playSound) break; case kActionEndSound: - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -285,7 +285,7 @@ IMPLEMENT_FUNCTION_S(8, Mertens, playSound16) break; case kActionEndSound: - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -331,7 +331,7 @@ IMPLEMENT_FUNCTION_II(10, Mertens, updateEntity, CarIndex, EntityPosition) || getEntities()->checkFields10(kEntityPlayer)) { if (getEntities()->updateEntity(kEntityMertens, (CarIndex)params->param1, (EntityPosition)params->param2)) { getData()->inventoryItem = kItemNone; - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -362,7 +362,7 @@ IMPLEMENT_FUNCTION_II(10, Mertens, updateEntity, CarIndex, EntityPosition) if (getEntities()->updateEntity(kEntityMertens, (CarIndex)params->param1, (EntityPosition)params->param2)) { getData()->inventoryItem = kItemNone; - CALLBACK_ACTION(); + callbackAction(); } break; @@ -393,7 +393,7 @@ IMPLEMENT_FUNCTION_II(10, Mertens, updateEntity, CarIndex, EntityPosition) params->param3 = 1; if (getEntities()->updateEntity(kEntityMertens, (CarIndex)params->param1, (EntityPosition)params->param2)) - CALLBACK_ACTION(); + callbackAction(); break; case kActionCallback: @@ -426,7 +426,7 @@ IMPLEMENT_FUNCTION_II(10, Mertens, updateEntity, CarIndex, EntityPosition) getEntities()->updateEntity(kEntityMertens, kCarGreenSleeping, kPosition_2000); getEntities()->loadSceneFromEntityPosition(getData()->car, (EntityPosition)(getData()->entityPosition + 750)); - CALLBACK_ACTION(); + callbackAction(); break; case 3: @@ -442,7 +442,7 @@ IMPLEMENT_FUNCTION_II(10, Mertens, updateEntity, CarIndex, EntityPosition) getEntities()->updateEntity(kEntityMertens, kCarGreenSleeping, kPosition_2000); getEntities()->loadSceneFromEntityPosition(getData()->car, (EntityPosition)(getData()->entityPosition + 750)); - CALLBACK_ACTION(); + callbackAction(); break; } @@ -484,7 +484,7 @@ IMPLEMENT_FUNCTION_I(11, Mertens, function11, uint32) UPDATE_PARAM(params->param2, getState()->time, params->param1) - CALLBACK_ACTION(); + callbackAction(); break; case kActionCallback: @@ -504,7 +504,7 @@ IMPLEMENT_FUNCTION_I(12, Mertens, bonsoir, EntityIndex) return; if (getSoundQueue()->isBuffered(kEntityMertens)) { - CALLBACK_ACTION(); + callbackAction(); return; } @@ -538,7 +538,7 @@ IMPLEMENT_FUNCTION_I(12, Mertens, bonsoir, EntityIndex) getSound()->playSound(kEntityMertens, "CON1112G"); } - CALLBACK_ACTION(); + callbackAction(); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// @@ -638,7 +638,7 @@ IMPLEMENT_FUNCTION_II(13, Mertens, function13, bool, bool) case 6: case 9: case 10: - CALLBACK_ACTION(); + callbackAction(); break; case 7: @@ -717,7 +717,7 @@ IMPLEMENT_FUNCTION_I(14, Mertens, function14, EntityIndex) break; case 5: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -781,7 +781,7 @@ IMPLEMENT_FUNCTION_I(15, Mertens, function15, bool) break; case 6: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -858,7 +858,7 @@ IMPLEMENT_FUNCTION_I(16, Mertens, function16, bool) break; case 6: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -886,7 +886,7 @@ IMPLEMENT_FUNCTION(17, Mertens, function17) getScenes()->loadSceneFromItemPosition(kItem7); ENTITY_PARAM(2, 1) = 1; - CALLBACK_ACTION(); + callbackAction(); break; } @@ -924,7 +924,7 @@ IMPLEMENT_FUNCTION(17, Mertens, function17) break; case 2: - CALLBACK_ACTION(); + callbackAction(); break; case 3: @@ -942,7 +942,7 @@ IMPLEMENT_FUNCTION(17, Mertens, function17) getSavePoints()->push(kEntityMertens, kEntityMertens, kActionDrawScene); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -968,7 +968,7 @@ IMPLEMENT_FUNCTION(18, Mertens, function18) getInventory()->setLocationAndProcess(kItem7, kObjectLocation1); ENTITY_PARAM(2, 1) = 1; - CALLBACK_ACTION(); + callbackAction(); break; } @@ -976,7 +976,7 @@ IMPLEMENT_FUNCTION(18, Mertens, function18) getScenes()->loadSceneFromItemPosition(kItem7); ENTITY_PARAM(2, 1) = 1; - CALLBACK_ACTION(); + callbackAction(); break; } @@ -1007,7 +1007,7 @@ IMPLEMENT_FUNCTION(18, Mertens, function18) ENTITY_PARAM(0, 1) = 0; getData()->inventoryItem = kItemNone; - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -1023,7 +1023,7 @@ IMPLEMENT_FUNCTION(19, Mertens, function19) if (ENTITY_PARAM(2, 1)) { getInventory()->setLocationAndProcess(kItem7, kObjectLocation1); ENTITY_PARAM(2, 1) = 0; - CALLBACK_ACTION(); + callbackAction(); } else { setCallback(1); setup_bloodJacket("601C"); @@ -1037,7 +1037,7 @@ IMPLEMENT_FUNCTION(19, Mertens, function19) if (!getEntities()->isPlayerPosition(kCarGreenSleeping, 2)) getData()->entityPosition = kPosition_2088; - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -1055,7 +1055,7 @@ IMPLEMENT_FUNCTION(20, Mertens, function20) if (ENTITY_PARAM(2, 1)) { ENTITY_PARAM(2, 1) = 0; - CALLBACK_ACTION(); + callbackAction(); } else { setCallback(1); setup_bloodJacket("601C"); @@ -1064,7 +1064,7 @@ IMPLEMENT_FUNCTION(20, Mertens, function20) case kActionCallback: if (getCallback() == 1) - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -1090,7 +1090,7 @@ IMPLEMENT_FUNCTION_II(21, Mertens, function21, ObjectIndex, ObjectIndex) if (params->param2) getObjects()->update((ObjectIndex)params->param2, (EntityIndex)params->param8, (ObjectLocation)CURRENT_PARAM(1, 1), (CursorStyle)CURRENT_PARAM(1, 2), (CursorStyle)CURRENT_PARAM(1, 3)); - CALLBACK_ACTION(); + callbackAction(); break; case kActionKnock: @@ -1220,7 +1220,7 @@ IMPLEMENT_FUNCTION(22, Mertens, function22) break; case 9: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1289,7 +1289,7 @@ IMPLEMENT_FUNCTION(23, Mertens, function23) case 6: getData()->location = kLocationOutsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1349,7 +1349,7 @@ IMPLEMENT_FUNCTION(24, Mertens, function24) case 5: getData()->location = kLocationOutsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; case 6: @@ -1378,7 +1378,7 @@ IMPLEMENT_FUNCTION(24, Mertens, function24) break; case 9: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1456,7 +1456,7 @@ IMPLEMENT_FUNCTION(25, Mertens, function25) case 5: getData()->location = kLocationOutsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; case 6: @@ -1490,7 +1490,7 @@ IMPLEMENT_FUNCTION(25, Mertens, function25) break; case 9: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1545,7 +1545,7 @@ IMPLEMENT_FUNCTION_I(26, Mertens, function26, bool) case 2: getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; case 3: @@ -1611,7 +1611,7 @@ IMPLEMENT_FUNCTION_I(26, Mertens, function26, bool) getData()->location = kLocationOutsideCompartment; getObjects()->update(kObjectCompartment1, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1626,7 +1626,7 @@ IMPLEMENT_FUNCTION_I(27, Mertens, tylerCompartment, MertensActionType) case kActionNone: if (getProgress().field_14 == 29) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -1678,7 +1678,7 @@ label_callback11: getSound()->playSound(kEntityPlayer, "LIB015"); getScenes()->loadScene(kScene41); - CALLBACK_ACTION(); + callbackAction(); break; } } else { @@ -1736,7 +1736,7 @@ label_callback11: getSound()->playSound(kEntityPlayer, "LIB015"); getScenes()->loadScene(kScene41); - CALLBACK_ACTION(); + callbackAction(); break; } } else { @@ -1761,7 +1761,7 @@ label_callback11: default: getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; case 1: @@ -1819,7 +1819,7 @@ label_callback11: getSound()->playSound(kEntityPlayer, "LIB015"); getScenes()->loadScene(kScene41); - CALLBACK_ACTION(); + callbackAction(); break; } } else { @@ -1928,7 +1928,7 @@ label_callback11: getData()->location = kLocationOutsideCompartment; getObjects()->update(kObjectCompartment1, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; case 8: @@ -1955,7 +1955,7 @@ label_callback11: case 19: case 22: case 28: - CALLBACK_ACTION(); + callbackAction(); break; case 15: @@ -1967,7 +1967,7 @@ label_callback11: getSound()->playSound(kEntityPlayer, "LIB015"); getScenes()->loadScene(kScene41); - CALLBACK_ACTION(); + callbackAction(); break; case 16: @@ -1979,27 +1979,27 @@ label_callback11: getSound()->playSound(kEntityPlayer, "LIB015"); getScenes()->loadScene(kScene41); - CALLBACK_ACTION(); + callbackAction(); break; case 23: getProgress().eventMertensAugustWaiting = true; getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; case 24: getProgress().eventMertensKronosInvitation = true; getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; case 25: getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2051,7 +2051,7 @@ IMPLEMENT_FUNCTION_S(28, Mertens, function28) break; case 4: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2113,7 +2113,7 @@ IMPLEMENT_FUNCTION_SS(29, Mertens, function29) break; case 4: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2138,14 +2138,14 @@ IMPLEMENT_FUNCTION_I(30, Mertens, function30, MertensActionType) case kActionDefault: switch (params->param1) { default: - CALLBACK_ACTION(); + callbackAction(); return; case 1: params->param2 = kPosition_8200; if (getProgress().field_14) { - CALLBACK_ACTION(); + callbackAction(); return; } @@ -2271,7 +2271,7 @@ IMPLEMENT_FUNCTION_I(30, Mertens, function30, MertensActionType) break; case 9: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2310,7 +2310,7 @@ IMPLEMENT_FUNCTION_I(31, Mertens, function31, MertensActionType) case 2: case 3: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2358,7 +2358,7 @@ IMPLEMENT_FUNCTION(32, Mertens, function32) break; case 5: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2380,7 +2380,7 @@ IMPLEMENT_FUNCTION(33, Mertens, function33) setCallback(ENTITY_PARAM(0, 8) ? 1 : 3); setup_updateEntity(kCarGreenSleeping, ENTITY_PARAM(0, 8) ? kPosition_1500 : kPosition_540); } else { - CALLBACK_ACTION(); + callbackAction(); } break; @@ -2399,7 +2399,7 @@ IMPLEMENT_FUNCTION(33, Mertens, function33) case 2: ENTITY_PARAM(1, 8) = 0; - CALLBACK_ACTION(); + callbackAction(); break; case 3: @@ -2478,7 +2478,7 @@ IMPLEMENT_FUNCTION(33, Mertens, function33) break; } - CALLBACK_ACTION(); + callbackAction(); break; case 12: @@ -2491,13 +2491,13 @@ IMPLEMENT_FUNCTION(33, Mertens, function33) break; } - CALLBACK_ACTION(); + callbackAction(); break; case 13: ENTITY_PARAM(2, 2) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2546,7 +2546,7 @@ IMPLEMENT_FUNCTION(35, Mertens, function35) case kActionDefault: if (getProgress().field_14 == 29) { - CALLBACK_ACTION(); + callbackAction(); break; } else { getProgress().field_14 = 3; @@ -2587,7 +2587,7 @@ IMPLEMENT_FUNCTION(35, Mertens, function35) break; case 4: - CALLBACK_ACTION(); + callbackAction(); break; case 5: @@ -2609,7 +2609,7 @@ IMPLEMENT_FUNCTION(35, Mertens, function35) break; case 7: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2624,7 +2624,7 @@ IMPLEMENT_FUNCTION(36, Mertens, function36) case kActionDefault: if (getProgress().field_14 == 29) { - CALLBACK_ACTION(); + callbackAction(); } else { getProgress().field_14 = 3; @@ -2710,7 +2710,7 @@ IMPLEMENT_FUNCTION(36, Mertens, function36) case 6: case 9: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2765,7 +2765,7 @@ IMPLEMENT_FUNCTION(37, Mertens, function37) break; case 4: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2789,12 +2789,12 @@ IMPLEMENT_FUNCTION(38, Mertens, function38) case kActionDefault: if (!ENTITY_PARAM(0, 4)) { - CALLBACK_ACTION(); + callbackAction(); break; } if (getProgress().field_14 == 29) { - CALLBACK_ACTION(); + callbackAction(); } else { setCallback(1); setup_updateEntity(kCarGreenSleeping, kPosition_8200); @@ -2808,7 +2808,7 @@ IMPLEMENT_FUNCTION(38, Mertens, function38) case 1: if (!ENTITY_PARAM(0, 4)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -2818,7 +2818,7 @@ IMPLEMENT_FUNCTION(38, Mertens, function38) case 2: ENTITY_PARAM(0, 4) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2892,7 +2892,7 @@ IMPLEMENT_FUNCTION(39, Mertens, function39) break; case 10: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -2938,7 +2938,7 @@ IMPLEMENT_FUNCTION(40, Mertens, function40) case 5: ENTITY_PARAM(0, 6) = 1; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -3911,7 +3911,7 @@ IMPLEMENT_FUNCTION(49, Mertens, function49) break; case 11: - CALLBACK_ACTION(); + callbackAction(); break; } break; diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp index 2e0da272ba..21f3b06896 100644 --- a/engines/lastexpress/entities/milos.cpp +++ b/engines/lastexpress/entities/milos.cpp @@ -133,7 +133,7 @@ IMPLEMENT_FUNCTION_II(10, Milos, enterCompartmentDialog, CarIndex, EntityPositio case kActionNone: case kActionDefault: if (getEntities()->updateEntity(kEntityMilos, (CarIndex)params->param1, (EntityPosition)params->param2)) - CALLBACK_ACTION(); + callbackAction(); break; case kActionExcuseMeCath: @@ -171,7 +171,7 @@ IMPLEMENT_FUNCTION_I(11, Milos, function11, TimeValue) if (!params->param5 && params->param1 < getState()->time && !params->param7) { params->param7 = 1; - CALLBACK_ACTION(); + callbackAction(); break; } @@ -392,7 +392,7 @@ IMPLEMENT_FUNCTION(13, Milos, function13) getEntities()->clearSequences(kEntityIvo); getEntities()->clearSequences(kEntitySalko); - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -420,7 +420,7 @@ IMPLEMENT_FUNCTION(14, Milos, function14) getEntities()->exitCompartment(kEntityMilos, kObjectCompartment1, true); getObjects()->update(kObjectCompartment1, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -472,7 +472,7 @@ IMPLEMENT_FUNCTION(14, Milos, function14) getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; } } else { @@ -591,7 +591,7 @@ label_callback_12: getData()->location = kLocationOutsideCompartment; getObjects()->update(kObjectCompartment1, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; case 2: @@ -631,7 +631,7 @@ label_callback_12: getScenes()->loadScene(kScene41); getData()->location = kLocationOutsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; case 6: @@ -1384,7 +1384,7 @@ IMPLEMENT_FUNCTION_I(26, Milos, function26, TimeValue) case kActionNone: if (params->param1 < getState()->time && !params->param2) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -1413,7 +1413,7 @@ IMPLEMENT_FUNCTION_I(26, Milos, function26, TimeValue) case 1: if (ENTITY_PARAM(0, 2)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -1423,7 +1423,7 @@ IMPLEMENT_FUNCTION_I(26, Milos, function26, TimeValue) case 2: case 3: if (ENTITY_PARAM(0, 2)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -1440,7 +1440,7 @@ IMPLEMENT_FUNCTION_I(26, Milos, function26, TimeValue) case 5: if (ENTITY_PARAM(0, 2)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -1459,7 +1459,7 @@ IMPLEMENT_FUNCTION_II(27, Milos, function27, CarIndex, EntityPosition) case kActionNone: if (getEntities()->updateEntity(kEntityMilos, (CarIndex)params->param1, (EntityPosition)params->param2)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -1470,14 +1470,14 @@ IMPLEMENT_FUNCTION_II(27, Milos, function27, CarIndex, EntityPosition) if (getData()->car == kCarRedSleeping || getData()->car == kCarGreenSleeping) { ENTITY_PARAM(0, 2) = 1; - CALLBACK_ACTION(); + callbackAction(); } } break; case kActionDefault: if (getEntities()->updateEntity(kEntityMilos, (CarIndex)params->param1, (EntityPosition)params->param2)) - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END diff --git a/engines/lastexpress/entities/mmeboutarel.cpp b/engines/lastexpress/entities/mmeboutarel.cpp index a72bd1578b..ace8637556 100644 --- a/engines/lastexpress/entities/mmeboutarel.cpp +++ b/engines/lastexpress/entities/mmeboutarel.cpp @@ -122,7 +122,7 @@ IMPLEMENT_FUNCTION_S(8, MmeBoutarel, function8) if (!getEntities()->isPlayerPosition(kCarRedSleeping, 2)) getData()->entityPosition = kPosition_2088; - CALLBACK_ACTION(); + callbackAction(); } break; @@ -209,7 +209,7 @@ IMPLEMENT_FUNCTION(9, MmeBoutarel, function9) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityMmeBoutarel); - CALLBACK_ACTION(); + callbackAction(); break; case 5: @@ -218,7 +218,7 @@ IMPLEMENT_FUNCTION(9, MmeBoutarel, function9) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityMmeBoutarel); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -310,7 +310,7 @@ IMPLEMENT_FUNCTION(11, MmeBoutarel, function11) break; case 4: - CALLBACK_ACTION(); + callbackAction(); break; } break; diff --git a/engines/lastexpress/entities/pascale.cpp b/engines/lastexpress/entities/pascale.cpp index 1f8504c566..6620634ade 100644 --- a/engines/lastexpress/entities/pascale.cpp +++ b/engines/lastexpress/entities/pascale.cpp @@ -169,7 +169,7 @@ IMPLEMENT_FUNCTION(8, Pascale, welcomeSophieAndRebecca) getData()->entityPosition = kPosition_5900; ENTITY_PARAM(0, 4) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -183,7 +183,7 @@ IMPLEMENT_FUNCTION(9, Pascale, sitSophieAndRebecca) break; case kActionExitCompartment: - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -215,7 +215,7 @@ IMPLEMENT_FUNCTION(10, Pascale, welcomeCath) getScenes()->loadSceneFromPosition(kCarRestaurant, 69); } - CALLBACK_ACTION(); + callbackAction(); break; case kAction4: @@ -237,7 +237,7 @@ IMPLEMENT_FUNCTION(10, Pascale, welcomeCath) getScenes()->loadSceneFromPosition(kCarRestaurant, 69); - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -281,7 +281,7 @@ IMPLEMENT_FUNCTION(11, Pascale, function11) getEntities()->clearSequences(kEntityPascale); getData()->entityPosition = kPosition_5900; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -364,7 +364,7 @@ IMPLEMENT_FUNCTION(13, Pascale, getMessageFromAugustToTyler) getSavePoints()->push(kEntityPascale, kEntityVerges, kActionDeliverMessageToTyler); ENTITY_PARAM(0, 1) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -380,7 +380,7 @@ IMPLEMENT_FUNCTION(14, Pascale, sitAnna) case kActionExitCompartment: getEntities()->updatePositionExit(kEntityPascale, kCarRestaurant, 62); - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -431,7 +431,7 @@ IMPLEMENT_FUNCTION(15, Pascale, welcomeAnna) getData()->entityPosition = kPosition_5900; ENTITY_PARAM(0, 2) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -484,7 +484,7 @@ IMPLEMENT_FUNCTION(16, Pascale, serveTatianaVassili) getData()->entityPosition = kPosition_5900; ENTITY_PARAM(0, 3) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -725,7 +725,7 @@ IMPLEMENT_FUNCTION(23, Pascale, function23) ENTITY_PARAM(0, 7) = 0; getEntities()->clearSequences(kEntityPascale); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -746,7 +746,7 @@ IMPLEMENT_FUNCTION(24, Pascale, welcomeAbbot) break; case kActionExitCompartment: - CALLBACK_ACTION(); + callbackAction(); break; case kAction10: @@ -951,7 +951,7 @@ IMPLEMENT_FUNCTION(27, Pascale, function27) ENTITY_PARAM(1, 1) = 0; ENTITY_PARAM(1, 2) = 1; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -997,7 +997,7 @@ IMPLEMENT_FUNCTION(28, Pascale, messageFromAnna) getData()->entityPosition = kPosition_5900; ENTITY_PARAM(1, 2) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1035,7 +1035,7 @@ IMPLEMENT_FUNCTION(29, Pascale, function29) case 2: getData()->entityPosition = kPosition_850; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1073,7 +1073,7 @@ IMPLEMENT_FUNCTION(30, Pascale, function30) case 2: getData()->entityPosition = kPosition_5900; - CALLBACK_ACTION(); + callbackAction(); break; } break; diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp index a5f2d66793..4f7be385ce 100644 --- a/engines/lastexpress/entities/rebecca.cpp +++ b/engines/lastexpress/entities/rebecca.cpp @@ -177,7 +177,7 @@ IMPLEMENT_FUNCTION(15, Rebecca, function15) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityRebecca); - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -259,7 +259,7 @@ IMPLEMENT_FUNCTION_I(16, Rebecca, function16, bool) getSavePoints()->push(kEntityRebecca, kEntityTables3, kAction136455232); getData()->location = kLocationInsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -332,7 +332,7 @@ IMPLEMENT_FUNCTION_I(17, Rebecca, function17, bool) case 5: getData()->location = kLocationInsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; case 6: @@ -341,7 +341,7 @@ IMPLEMENT_FUNCTION_I(17, Rebecca, function17, bool) getData()->location = kLocationInsideCompartment; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -395,7 +395,7 @@ IMPLEMENT_FUNCTION(18, Rebecca, function18) case 2: case 3: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -471,7 +471,7 @@ IMPLEMENT_FUNCTION(19, Rebecca, function19) case 5: case 6: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -491,7 +491,7 @@ IMPLEMENT_FUNCTION_I(20, Rebecca, function20, TimeValue) getObjects()->update(kObjectCompartmentE, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); getObjects()->update(kObject52, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; } diff --git a/engines/lastexpress/entities/salko.cpp b/engines/lastexpress/entities/salko.cpp index c95269fc90..70a26b515a 100644 --- a/engines/lastexpress/entities/salko.cpp +++ b/engines/lastexpress/entities/salko.cpp @@ -135,7 +135,7 @@ IMPLEMENT_FUNCTION_II(7, Salko, function7, CarIndex, EntityPosition) break; case kAction123668192: - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -388,7 +388,7 @@ label_callback3: getData()->entityPosition = kPosition_2740; getEntities()->clearSequences(kEntitySalko); - CALLBACK_ACTION(); + callbackAction(); break; } break; diff --git a/engines/lastexpress/entities/servers0.cpp b/engines/lastexpress/entities/servers0.cpp index 60f5295fc6..56fc0e6056 100644 --- a/engines/lastexpress/entities/servers0.cpp +++ b/engines/lastexpress/entities/servers0.cpp @@ -110,11 +110,11 @@ IMPLEMENT_FUNCTION_NOSETUP(5, Servers0, callbackActionOnDirection) case kActionNone: if (getData()->direction != kDirectionRight) - CALLBACK_ACTION(); + callbackAction(); break; case kActionExitCompartment: - CALLBACK_ACTION(); + callbackAction(); break; case kActionExcuseMeCath: @@ -160,7 +160,7 @@ IMPLEMENT_FUNCTION(7, Servers0, function7) case 2: getEntities()->clearSequences(kEntityServers0); getData()->entityPosition = kPosition_5900; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -217,7 +217,7 @@ IMPLEMENT_FUNCTION(9, Servers0, function9) ENTITY_PARAM(2, 2) = 0; ENTITY_PARAM(1, 6) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -483,7 +483,7 @@ IMPLEMENT_FUNCTION(25, Servers0, function25) getEntities()->clearSequences(kEntityServers0); ENTITY_PARAM(1, 3) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -644,7 +644,7 @@ IMPLEMENT_FUNCTION(29, Servers0, augustAnnaDateOrder) getEntities()->clearSequences(kEntityServers0); ENTITY_PARAM(1, 5) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -690,7 +690,7 @@ IMPLEMENT_FUNCTION(30, Servers0, function30) getEntities()->clearSequences(kEntityServers0); ENTITY_PARAM(2, 4) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -856,7 +856,7 @@ IMPLEMENT_FUNCTION(33, Servers0, augustOrderSteak) getEntities()->clearSequences(kEntityServers0); ENTITY_PARAM(1, 7) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -899,7 +899,7 @@ IMPLEMENT_FUNCTION(34, Servers0, augustServeDuck) getEntities()->clearSequences(kEntityServers0); ENTITY_PARAM(1, 8) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -969,7 +969,7 @@ void Servers0::handleServer(const SavePoint &savepoint, const char *name, Entity getSavePoints()->push(kEntityServers0, entity, action); *parameter = 0; - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -1024,7 +1024,7 @@ void Servers0::serveTable(const SavePoint &savepoint, const char *seq1, EntityIn getEntities()->clearSequences(kEntityServers0); *parameter = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; diff --git a/engines/lastexpress/entities/servers1.cpp b/engines/lastexpress/entities/servers1.cpp index 76a35a4071..24bf678f3a 100644 --- a/engines/lastexpress/entities/servers1.cpp +++ b/engines/lastexpress/entities/servers1.cpp @@ -140,7 +140,7 @@ IMPLEMENT_FUNCTION(7, Servers1, function7) getData()->entityPosition = kPosition_5900; ENTITY_PARAM(1, 2) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -216,7 +216,7 @@ IMPLEMENT_FUNCTION(9, Servers1, function9) getData()->entityPosition = kPosition_5900; ENTITY_PARAM(0, 1) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -262,7 +262,7 @@ IMPLEMENT_FUNCTION(10, Servers1, function10) getData()->entityPosition = kPosition_5900; ENTITY_PARAM(0, 2) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -466,7 +466,7 @@ IMPLEMENT_FUNCTION(20, Servers1, function20) getEntities()->drawSequenceLeft(kEntityServers1, "BLANK"); ENTITY_PARAM(0, 7) = 0; - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -702,7 +702,7 @@ void Servers1::serveTable(const SavePoint &savepoint, const char *seq1, EntityIn if (parameter2 != NULL) *parameter2 = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -772,7 +772,7 @@ void Servers1::serveSalon(const SavePoint &savepoint, const char *seq1, const ch getData()->entityPosition = kPosition_5900; *parameter = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; diff --git a/engines/lastexpress/entities/sophie.cpp b/engines/lastexpress/entities/sophie.cpp index 65c718a8c4..c2f25b7eb1 100644 --- a/engines/lastexpress/entities/sophie.cpp +++ b/engines/lastexpress/entities/sophie.cpp @@ -120,7 +120,7 @@ IMPLEMENT_FUNCTION_II(2, Sophie, updateEntity, CarIndex, EntityPosition) break; case kAction123668192: - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp index b97538818f..3b9cc6d322 100644 --- a/engines/lastexpress/entities/tatiana.cpp +++ b/engines/lastexpress/entities/tatiana.cpp @@ -190,7 +190,7 @@ IMPLEMENT_FUNCTION(14, Tatiana, function14) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityTatiana); - CALLBACK_ACTION(); + callbackAction(); } break; @@ -226,7 +226,7 @@ IMPLEMENT_FUNCTION(15, Tatiana, function15) getEntities()->exitCompartment(kEntityTatiana, kObjectCompartmentB, true); getObjects()->update(kObjectCompartmentB, kEntityPlayer, kObjectLocation1, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -244,7 +244,7 @@ IMPLEMENT_FUNCTION_I(16, Tatiana, function16, uint32) getObjects()->update(kObjectCompartmentB, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); getObjects()->update(kObject49, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; } @@ -384,14 +384,14 @@ IMPLEMENT_FUNCTION(18, Tatiana, function18) getSavePoints()->push(kEntityTatiana, kEntityAlexei, kAction157159392); getEntities()->clearSequences(kEntityTatiana); - CALLBACK_ACTION(); + callbackAction(); } break; case kActionExitCompartment: getSavePoints()->push(kEntityTatiana, kEntityAlexei, kAction188784532); - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -1533,7 +1533,7 @@ IMPLEMENT_FUNCTION(40, Tatiana, function40) if (getEntities()->isInsideTrainCar(kEntityPlayer, kCarKronos) || getData()->car != getEntityData(kEntityPlayer)->car || getEntities()->updateEntity(kEntityTatiana, kCarKronos, kPosition_9270)) - CALLBACK_ACTION(); + callbackAction(); break; case kActionExcuseMe: @@ -1545,7 +1545,7 @@ IMPLEMENT_FUNCTION(40, Tatiana, function40) case kActionDefault: if (getEntities()->updateEntity(kEntityTatiana, kCarKronos, kPosition_9270)) - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -1593,7 +1593,7 @@ IMPLEMENT_FUNCTION(41, Tatiana, function41) } getEntities()->clearSequences(kEntityTatiana); - CALLBACK_ACTION(); + callbackAction(); } break; @@ -1627,7 +1627,7 @@ IMPLEMENT_FUNCTION(41, Tatiana, function41) case 6: getEntities()->clearSequences(kEntityTatiana); - CALLBACK_ACTION(); + callbackAction(); break; case 4: diff --git a/engines/lastexpress/entities/train.cpp b/engines/lastexpress/entities/train.cpp index 1a1b6efaa7..0830dffbef 100644 --- a/engines/lastexpress/entities/train.cpp +++ b/engines/lastexpress/entities/train.cpp @@ -550,7 +550,7 @@ void Train::handleCompartmentAction() { ENTITY_PARAM(0, 8) = params->param1; - CALLBACK_ACTION(); + callbackAction(); } ////////////////////////////////////////////////////////////////////////// diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp index d4b2a1716e..bdd758a5be 100644 --- a/engines/lastexpress/entities/verges.cpp +++ b/engines/lastexpress/entities/verges.cpp @@ -100,11 +100,11 @@ IMPLEMENT_FUNCTION(3, Verges, callbackActionOnDirection) case kActionNone: if (getData()->direction != kDirectionRight) - CALLBACK_ACTION(); + callbackAction(); break; case kActionExitCompartment: - CALLBACK_ACTION(); + callbackAction(); break; case kActionExcuseMeCath: @@ -217,7 +217,7 @@ switch (savepoint.action) { break; case 6: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -239,7 +239,7 @@ IMPLEMENT_FUNCTION_IIS(10, Verges, function10, CarIndex, EntityPosition) } if (getEntities()->updateEntity(kEntityVerges, (CarIndex)params->param1, (EntityPosition)params->param2)) { - CALLBACK_ACTION(); + callbackAction(); break; } @@ -264,7 +264,7 @@ IMPLEMENT_FUNCTION_IIS(10, Verges, function10, CarIndex, EntityPosition) } if (getEntities()->updateEntity(kEntityVerges, (CarIndex)params->param1, (EntityPosition)params->param2)) - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -335,7 +335,7 @@ IMPLEMENT_FUNCTION(11, Verges, function11) getObjects()->update(kObject104, kEntityVerges, kObjectLocationNone, kCursorNormal, kCursorHand); getObjects()->update(kObject105, kEntityVerges, kObjectLocationNone, kCursorNormal, kCursorHand); - CALLBACK_ACTION(); + callbackAction(); break; } } @@ -395,7 +395,7 @@ IMPLEMENT_FUNCTION(12, Verges, function12) getData()->entityPosition = kPosition_850; getEntities()->clearSequences(kEntityVerges); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -436,7 +436,7 @@ IMPLEMENT_FUNCTION_I(13, Verges, function13, bool) getEntities()->clearSequences(kEntityVerges); getScenes()->loadSceneFromPosition(kCarBaggage, 91); - CALLBACK_ACTION(); + callbackAction(); } break; } @@ -460,7 +460,7 @@ IMPLEMENT_FUNCTION_IS(15, Verges, function15, EntityIndex) if (!getEntities()->isPlayerPosition(kCarGreenSleeping, 2) && !getEntities()->isPlayerPosition(kCarRedSleeping, 2)) getData()->entityPosition = kPosition_2088; - CALLBACK_ACTION(); + callbackAction(); } break; @@ -497,7 +497,7 @@ IMPLEMENT_FUNCTION_ISS(16, Verges, function16, EntityIndex) if (!getEntities()->isPlayerPosition(kCarGreenSleeping, 2) && !getEntities()->isPlayerPosition(kCarRedSleeping, 2)) getData()->entityPosition = kPosition_2088; - CALLBACK_ACTION(); + callbackAction(); } break; @@ -557,7 +557,7 @@ IMPLEMENT_FUNCTION(17, Verges, function17) case 4: ENTITY_PARAM(0, 3) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -649,7 +649,7 @@ IMPLEMENT_FUNCTION(22, Verges, function22) break; case 5: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -695,7 +695,7 @@ IMPLEMENT_FUNCTION(24, Verges, policeGettingOffTrain) break; case kActionEndSound: - CALLBACK_ACTION(); + callbackAction(); break; case kActionDefault: @@ -816,7 +816,7 @@ IMPLEMENT_FUNCTION(25, Verges, function25) case 11: ENTITY_PARAM(0, 7) = 0; - CALLBACK_ACTION(); + callbackAction(); break; case 6: @@ -1222,7 +1222,7 @@ IMPLEMENT_FUNCTION_S(30, Verges, function30) break; case 4: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1264,7 +1264,7 @@ IMPLEMENT_FUNCTION(31, Verges, function31) getProgress().field_48 = 1; ENTITY_PARAM(0, 4) = 0; - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1341,7 +1341,7 @@ IMPLEMENT_FUNCTION(32, Verges, function32) break; case 6: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1546,7 +1546,7 @@ IMPLEMENT_FUNCTION(35, Verges, function35) break; case 6: - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -1885,7 +1885,7 @@ void Verges::talk(const SavePoint &savepoint, const char *sound1, const char *so break; case 6: - CALLBACK_ACTION(); + callbackAction(); break; } break; diff --git a/engines/lastexpress/entities/vesna.cpp b/engines/lastexpress/entities/vesna.cpp index b5ffd9c979..b0ee9bcbc1 100644 --- a/engines/lastexpress/entities/vesna.cpp +++ b/engines/lastexpress/entities/vesna.cpp @@ -131,7 +131,7 @@ IMPLEMENT_FUNCTION_II(7, Vesna, updateEntity2, CarIndex, EntityPosition) break; case kAction123668192: - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -242,7 +242,7 @@ IMPLEMENT_FUNCTION(11, Vesna, function11) case kAction55996766: case kAction101687594: - CALLBACK_ACTION(); + callbackAction(); break; } IMPLEMENT_FUNCTION_END @@ -455,7 +455,7 @@ IMPLEMENT_FUNCTION(18, Vesna, function18) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityVesna); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -708,7 +708,7 @@ IMPLEMENT_FUNCTION(21, Vesna, function21) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityVesna); - CALLBACK_ACTION(); + callbackAction(); break; } break; diff --git a/engines/lastexpress/entities/yasmin.cpp b/engines/lastexpress/entities/yasmin.cpp index d2e8cd6b68..ebf90744f5 100644 --- a/engines/lastexpress/entities/yasmin.cpp +++ b/engines/lastexpress/entities/yasmin.cpp @@ -130,7 +130,7 @@ IMPLEMENT_FUNCTION(6, Yasmin, function6) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityYasmin); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -170,7 +170,7 @@ IMPLEMENT_FUNCTION(7, Yasmin, function7) getData()->location = kLocationInsideCompartment; getEntities()->clearSequences(kEntityYasmin); - CALLBACK_ACTION(); + callbackAction(); break; } break; @@ -470,7 +470,7 @@ IMPLEMENT_FUNCTION(21, Yasmin, function21) case kActionNone: case kActionDefault: if (getEntities()->updateEntity(kEntityYasmin, (CarIndex)params->param1, (EntityPosition)params->param2)) - CALLBACK_ACTION(); + callbackAction(); break; case kActionExcuseMeCath: -- cgit v1.2.3 From 67751f77c8abae0f6326cb0daec67cd6dd272c7d Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sat, 14 Jul 2012 16:33:41 -0400 Subject: CREATE_PROJECT: Output Groups and File references in XCode provider --- devtools/create_project/create_project.cpp | 26 ++++++++------------- devtools/create_project/create_project.h | 8 +++++++ devtools/create_project/xcode.cpp | 36 ++++++++++++++++++++++++------ 3 files changed, 46 insertions(+), 24 deletions(-) diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index c96b83414a..8499fec400 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -75,14 +75,6 @@ namespace { */ std::string unifyPath(const std::string &path); -/** - * Returns the last path component. - * - * @param path Path string. - * @return Last path component. - */ -std::string getLastPathComponent(const std::string &path); - /** * Display the help text for the program. * @@ -606,14 +598,6 @@ std::string unifyPath(const std::string &path) { return result; } -std::string getLastPathComponent(const std::string &path) { - std::string::size_type pos = path.find_last_of('/'); - if (pos == std::string::npos) - return path; - else - return path.substr(pos + 1); -} - void displayHelp(const char *exe) { using std::cout; @@ -1001,7 +985,7 @@ bool isInList(const std::string &dir, const std::string &fileName, const StringL continue; } - const std::string lastPathComponent = getLastPathComponent(*i); + const std::string lastPathComponent = ProjectProvider::getLastPathComponent(*i); if (extensionName == "o") { return false; } else if (!producesObjectFile(fileName) && extensionName != "h") { @@ -1304,6 +1288,14 @@ std::string ProjectProvider::createUUID() const { #endif } +std::string ProjectProvider::getLastPathComponent(const std::string &path) { + std::string::size_type pos = path.find_last_of('/'); + if (pos == std::string::npos) + return path; + else + return path.substr(pos + 1); +} + void ProjectProvider::addFilesToProject(const std::string &dir, std::ofstream &projectFile, const StringList &includeList, const StringList &excludeList, const std::string &filePrefix) { diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h index 8719143f4a..b4eda8f8d2 100644 --- a/devtools/create_project/create_project.h +++ b/devtools/create_project/create_project.h @@ -317,6 +317,14 @@ public: */ void createProject(const BuildSetup &setup); + /** + * Returns the last path component. + * + * @param path Path string. + * @return Last path component. + */ + static std::string getLastPathComponent(const std::string &path); + protected: const int _version; ///< Target project version StringList &_globalWarnings; ///< Global warnings diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index 9784bb0bf5..0574814e02 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -202,18 +202,38 @@ void XCodeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &p // Init root group _groups.comment = "PBXGroup"; - Object *group = new Object(this, "PBXGroup", "PBXGroup", "PBXGroup", "", ""); - //Property children; - //children.flags = SettingsAsList; - //group->properties["children"] = children; - group->addProperty("children", "", "", SettingsNoValue|SettingsAsList); + // Create group + std::string name = getLastPathComponent(dir.name); + Object *group = new Object(this, "PBXGroup_" + name , "PBXGroup", "PBXGroup", "", name); + + // List of children + Property children; + children.hasOrder = true; + children.flags = SettingsAsList; + group->addProperty("name", name, "", SettingsNoValue|SettingsQuoteVariable); group->addProperty("sourceTree", "", "", SettingsNoValue|SettingsQuoteVariable); - _groups.add(group); + int order = 0; + for (FileNode::NodeList::const_iterator i = dir.children.begin(); i != dir.children.end(); ++i) { + const FileNode *node = *i; + + std::string id = "FileReference_" + node->name; + FileProperty property = FileProperty(node->name, node->name, node->name, ""); + + ADD_SETTING_ORDER_NOVALUE(children, getHash(id), node->name, order++); + ADD_BUILD_FILE(id, node->name, node->name + " in Sources"); + ADD_FILE_REFERENCE(node->name, property); + + // Process child nodes + if (!node->children.empty()) + writeFileListToProject(*node, projectFile, indentation + 1, duplicate, objPrefix + node->name + '_', filePrefix + node->name + '/'); + } - // TODO Add files + group->properties["children"] = children; + + _groups.add(group); } ////////////////////////////////////////////////////////////////////////// @@ -717,6 +737,7 @@ void XCodeProvider::setupBuildConfiguration() { ADD_SETTING_QUOTE(scummvmSimulator_Debug, "FRAMEWORK_SEARCH_PATHS", "$(inherited)"); ADD_SETTING_LIST(scummvmSimulator_Debug, "GCC_PREPROCESSOR_DEFINITIONS", scummvm_defines, SettingsNoQuote|SettingsAsList, 5); ADD_SETTING(scummvmSimulator_Debug, "SDKROOT", "iphonesimulator3.2"); + ADD_SETTING_QUOTE(scummvmSimulator_Debug, "VALID_ARCHS", "i386 x86_64"); REMOVE_SETTING(scummvmSimulator_Debug, "TARGETED_DEVICE_FAMILY"); scummvmSimulator_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue); @@ -726,6 +747,7 @@ void XCodeProvider::setupBuildConfiguration() { Object *scummvmSimulator_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-Simulator_Release", _targets[2] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Release"); Property scummvmSimulator_Release(scummvmSimulator_Debug); ADD_SETTING(scummvmSimulator_Release, "COPY_PHASE_STRIP", "YES"); + ADD_SETTING(scummvmSimulator_Release, "GCC_OPTIMIZATION_LEVEL", "3"); REMOVE_SETTING(scummvmSimulator_Release, "GCC_DYNAMIC_NO_PIC"); ADD_SETTING(scummvmSimulator_Release, "WRAPPER_EXTENSION", "app"); -- cgit v1.2.3 From 2c5cf9f860ffe5264268379ce6e0c0aa5ff25c0e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 15 Jul 2012 01:32:11 +0300 Subject: SCI: Properly detect the Polish version of KQ5 Thanks to jacek909 for the extra MD5 checksums of the Polish version. This fixes bugs #2725722 (Polish version checksums) and #3536863 (SCI: KQ5 Floppy English detected as Polish) --- engines/sci/detection_tables.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 8a6184c7e4..268914edba 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -1241,10 +1241,8 @@ static const struct ADGameDescription SciGameDescriptions[] = { // King's Quest 5 - English DOS Floppy // VERSION file reports "0.000.051" // Supplied by misterhands in bug report #3536863. - // FIXME: According to bug #3536863, there exists another English version - // with the same file checksums as the vanilla English version, patched to - // Polish. We need a better way of distinguishing the two versions. Until - // we do, this is a duplicate entry of the Polish version below. + // This is the original English version, which has been externally patched to + // Polish in the Polish release below. {"kq5", "", { {"resource.map", 0, "70010c20138541f89013bb5e1b30f16a", 7998}, {"resource.000", 0, "a591bd4b879fc832b8095c0b3befe9e2", 276398}, @@ -1374,12 +1372,10 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::IT_ITA, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - // King's Quest 5 - Polish DOS Floppy (supplied by jacek909 in bug report #2725722, includes english language?!) + // King's Quest 5 - Polish DOS Floppy (supplied by jacek909 in bug report #2725722) // SCI interpreter version 1.000.060 - // FIXME: According to bug #3536863, this is actually a patched English version. - // The vanilla English version has the same MD5 checksums. - // We need a better way of detecting this. Until we do, a duplicate English - // entry has been placed above. + // VERSION file reports "0.000.051". + // This is actually an English version with external text resource patches (bug #3536863). {"kq5", "", { {"resource.map", 0, "70010c20138541f89013bb5e1b30f16a", 7998}, {"resource.000", 0, "a591bd4b879fc832b8095c0b3befe9e2", 276398}, @@ -1390,6 +1386,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.005", 0, "6556ff8e7c4d1acf6a78aea154daa76c", 1287869}, {"resource.006", 0, "da82e4beb744731d0a151f1d4922fafa", 1170456}, {"resource.007", 0, "431def14ca29cdb5e6a5e84d3f38f679", 1240176}, + {"text.000", 0, "601aa35a3ddeb558e1280e0963e955a2", 1517}, AD_LISTEND}, Common::PL_POL, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, -- cgit v1.2.3 From 13a5e5812af635477626de6a13f54ed8b8e4afa5 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 15 Jul 2012 02:14:37 +0300 Subject: TEENAGENT: Unpack teenagent.dat and remove the engine's zlib dependency This addresses bug #3539822 - "TEENAGENT: Not working without zlib" --- devtools/create_teenagent/create_teenagent.cpp | 2 -- dists/engine-data/teenagent.dat | Bin 70047 -> 141090 bytes engines/teenagent/resources.cpp | 46 ++++++++++++++++--------- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/devtools/create_teenagent/create_teenagent.cpp b/devtools/create_teenagent/create_teenagent.cpp index 9551acbaea..fc2ba4da0e 100644 --- a/devtools/create_teenagent/create_teenagent.cpp +++ b/devtools/create_teenagent/create_teenagent.cpp @@ -106,7 +106,5 @@ int main(int argc, char *argv[]) { fclose(fin); fclose(fout); - fprintf(stderr, "please run \"gzip -n %s\"\n", dat_name); - return 0; } diff --git a/dists/engine-data/teenagent.dat b/dists/engine-data/teenagent.dat index 0dd31dad14..1492326920 100644 Binary files a/dists/engine-data/teenagent.dat and b/dists/engine-data/teenagent.dat differ diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp index 597ca670c0..74ebae9c9b 100644 --- a/engines/teenagent/resources.cpp +++ b/engines/teenagent/resources.cpp @@ -22,7 +22,6 @@ #include "teenagent/resources.h" #include "teenagent/teenagent.h" #include "common/textconsole.h" -#include "common/zlib.h" namespace TeenAgent { @@ -69,24 +68,37 @@ bool Resources::loadArchives(const ADGameDescription *gd) { warning("%s", errorMessage.c_str()); return false; } - Common::SeekableReadStream *dat = Common::wrapCompressedReadStream(dat_file); - cseg.read(dat, 0xb3b0); - dseg.read(dat, 0xe790); - eseg.read(dat, 0x8be2); - - delete dat; - - { - FilePack varia; - varia.open("varia.res"); - font7.load(varia, 7); - font7.width_pack = 1; - font7.height = 11; - font8.load(varia, 8); - font8.height = 31; - varia.close(); + + // Check if teenagent.dat is compressed (older versions of the file) + uint16 header = dat_file->readUint16BE(); + bool isCompressed = (header == 0x1F8B || + ((header & 0x0F00) == 0x0800 && + header % 31 == 0)); + dat_file->seek(-2, SEEK_CUR); + + if (isCompressed) { + delete dat_file; + Common::String errorMessage = "The teenagent.dat file is compressed. Please decompress it"; + GUIErrorMessage(errorMessage); + warning("%s", errorMessage.c_str()); + return false; } + cseg.read(dat_file, 0xb3b0); + dseg.read(dat_file, 0xe790); + eseg.read(dat_file, 0x8be2); + + delete dat_file; + + FilePack varia; + varia.open("varia.res"); + font7.load(varia, 7); + font7.width_pack = 1; + font7.height = 11; + font8.load(varia, 8); + font8.height = 31; + varia.close(); + off.open("off.res"); on.open("on.res"); ons.open("ons.res"); -- cgit v1.2.3 From c54f95ee86b001676fbdc44aa5e1c74191fae459 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 15 Jul 2012 02:27:51 +0300 Subject: TEENAGENT: Readd the zlib code, to maintain backwards compatibility --- engines/teenagent/resources.cpp | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp index 74ebae9c9b..49a429d5b7 100644 --- a/engines/teenagent/resources.cpp +++ b/engines/teenagent/resources.cpp @@ -22,6 +22,7 @@ #include "teenagent/resources.h" #include "teenagent/teenagent.h" #include "common/textconsole.h" +#include "common/zlib.h" namespace TeenAgent { @@ -69,26 +70,15 @@ bool Resources::loadArchives(const ADGameDescription *gd) { return false; } - // Check if teenagent.dat is compressed (older versions of the file) - uint16 header = dat_file->readUint16BE(); - bool isCompressed = (header == 0x1F8B || - ((header & 0x0F00) == 0x0800 && - header % 31 == 0)); - dat_file->seek(-2, SEEK_CUR); - - if (isCompressed) { - delete dat_file; - Common::String errorMessage = "The teenagent.dat file is compressed. Please decompress it"; - GUIErrorMessage(errorMessage); - warning("%s", errorMessage.c_str()); - return false; - } - - cseg.read(dat_file, 0xb3b0); - dseg.read(dat_file, 0xe790); - eseg.read(dat_file, 0x8be2); + // teenagent.dat used to be compressed with zlib compression. The usage of + // zlib here is no longer needed, and it's maintained only for backwards + // compatibility. + Common::SeekableReadStream *dat = Common::wrapCompressedReadStream(dat_file); + cseg.read(dat, 0xb3b0); + dseg.read(dat, 0xe790); + eseg.read(dat, 0x8be2); - delete dat_file; + delete dat; FilePack varia; varia.open("varia.res"); -- cgit v1.2.3 From f4e395b4a185ac4aabd4e0a19c7e00682365d893 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 15 Jul 2012 02:47:06 +0300 Subject: TEENAGENT: Show a verbose warning when a compressed data file is used and zlib hasn't been included in the executable --- engines/teenagent/resources.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp index 49a429d5b7..0dc6ea2f3c 100644 --- a/engines/teenagent/resources.cpp +++ b/engines/teenagent/resources.cpp @@ -74,10 +74,27 @@ bool Resources::loadArchives(const ADGameDescription *gd) { // zlib here is no longer needed, and it's maintained only for backwards // compatibility. Common::SeekableReadStream *dat = Common::wrapCompressedReadStream(dat_file); + +#if !defined(USE_ZLIB) + uint16 header = dat->readUint16BE(); + bool isCompressed = (header == 0x1F8B || + ((header & 0x0F00) == 0x0800 && + header % 31 == 0)); + dat->seek(-2, SEEK_CUR); + + if (isCompressed) { + // teenagent.dat is compressed, but zlib hasn't been compiled in + delete dat; + Common::String errorMessage = "The teenagent.dat file is compressed and zlib hasn't been included in this executable. Please decompress it"; + GUIErrorMessage(errorMessage); + warning("%s", errorMessage.c_str()); + return false; + } +#endif + cseg.read(dat, 0xb3b0); dseg.read(dat, 0xe790); eseg.read(dat, 0x8be2); - delete dat; FilePack varia; -- cgit v1.2.3 From a97f4466fdf7320cf184d0d4974670b4b4e4bee4 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 15 Jul 2012 03:07:01 +0300 Subject: TEENAGENT: Add translatable strings in resources.cpp --- engines/teenagent/resources.cpp | 9 +++++---- po/POTFILES | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp index 0dc6ea2f3c..dff58f98e2 100644 --- a/engines/teenagent/resources.cpp +++ b/engines/teenagent/resources.cpp @@ -22,6 +22,7 @@ #include "teenagent/resources.h" #include "teenagent/teenagent.h" #include "common/textconsole.h" +#include "common/translation.h" #include "common/zlib.h" namespace TeenAgent { @@ -64,9 +65,9 @@ bool Resources::loadArchives(const ADGameDescription *gd) { Common::File *dat_file = new Common::File(); if (!dat_file->open("teenagent.dat")) { delete dat_file; - Common::String errorMessage = "You're missing the 'teenagent.dat' file. Get it from the ScummVM website"; - GUIErrorMessage(errorMessage); + Common::String errorMessage = _("You're missing the 'teenagent.dat' file. Get it from the ScummVM website"); warning("%s", errorMessage.c_str()); + GUIErrorMessage(errorMessage); return false; } @@ -85,9 +86,9 @@ bool Resources::loadArchives(const ADGameDescription *gd) { if (isCompressed) { // teenagent.dat is compressed, but zlib hasn't been compiled in delete dat; - Common::String errorMessage = "The teenagent.dat file is compressed and zlib hasn't been included in this executable. Please decompress it"; - GUIErrorMessage(errorMessage); + Common::String errorMessage = _("The teenagent.dat file is compressed and zlib hasn't been included in this executable. Please decompress it"); warning("%s", errorMessage.c_str()); + GUIErrorMessage(errorMessage); return false; } #endif diff --git a/po/POTFILES b/po/POTFILES index 8b74115939..36bd2ff4c7 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -53,6 +53,7 @@ engines/sword1/logic.cpp engines/sword1/sword1.cpp engines/sword2/animation.cpp engines/sword2/sword2.cpp +engines/teenagent/resources.cpp engines/tinsel/saveload.cpp engines/parallaction/saveload.cpp -- cgit v1.2.3 From aa8dec9a722e1b85374a215cba9a7066040a5e6e Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Sat, 14 Jul 2012 23:39:28 -0500 Subject: MAEMO: Fix compile without keymapper --- backends/platform/maemo/maemo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/platform/maemo/maemo.cpp b/backends/platform/maemo/maemo.cpp index e296d4787c..eb9b144ab2 100644 --- a/backends/platform/maemo/maemo.cpp +++ b/backends/platform/maemo/maemo.cpp @@ -180,6 +180,7 @@ void OSystem_SDL_Maemo::setupIcon() { // http://bugzilla.libsdl.org/show_bug.cgi?id=586 } +#ifdef ENABLE_KEYMAPPER static const Common::KeyTableEntry maemoKeys[] = { // Function keys {"MENU", Common::KEYCODE_F11, 0, "Menu", false}, @@ -191,7 +192,6 @@ static const Common::KeyTableEntry maemoKeys[] = { {0, Common::KEYCODE_INVALID, 0, 0, false} }; -#ifdef ENABLE_KEYMAPPER Common::HardwareInputSet *OSystem_SDL_Maemo::getHardwareInputSet() { return new Common::HardwareInputSet(true, maemoKeys); } -- cgit v1.2.3 From 6abb3501b50101760885efaf4a9721beadb18052 Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Sat, 14 Jul 2012 23:42:28 -0500 Subject: MAEMO: Set defaults for fullscreen and aspect ratio correction New installs now have fullscreen and aspect ratio correction on by default --- backends/platform/maemo/maemo.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backends/platform/maemo/maemo.cpp b/backends/platform/maemo/maemo.cpp index eb9b144ab2..61fe56e816 100644 --- a/backends/platform/maemo/maemo.cpp +++ b/backends/platform/maemo/maemo.cpp @@ -84,6 +84,10 @@ static void registerDefaultKeyBindings(Common::KeymapperDefaultBindings *_keymap #endif void OSystem_SDL_Maemo::initBackend() { + + ConfMan.registerDefault("fullscreen", true); + ConfMan.registerDefault("aspect_ratio", true); + // Create the events manager if (_eventSource == 0) _eventSource = new MaemoSdlEventSource(); -- cgit v1.2.3 From 848b6daeb980199a948fd5d067e5f199c1ee1593 Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Sun, 15 Jul 2012 00:07:24 -0500 Subject: MAEMO: Minor whitespace fix --- backends/platform/maemo/maemo.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/backends/platform/maemo/maemo.cpp b/backends/platform/maemo/maemo.cpp index 61fe56e816..4e50d04715 100644 --- a/backends/platform/maemo/maemo.cpp +++ b/backends/platform/maemo/maemo.cpp @@ -84,7 +84,6 @@ static void registerDefaultKeyBindings(Common::KeymapperDefaultBindings *_keymap #endif void OSystem_SDL_Maemo::initBackend() { - ConfMan.registerDefault("fullscreen", true); ConfMan.registerDefault("aspect_ratio", true); -- cgit v1.2.3 From 2f08f95e117dbeb3d4b0e431e73a1a49c9809f23 Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Sun, 15 Jul 2012 00:18:49 -0500 Subject: MAEMO: Fix uninitialized member --- backends/platform/maemo/maemo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/backends/platform/maemo/maemo.cpp b/backends/platform/maemo/maemo.cpp index 4e50d04715..6bd229177b 100644 --- a/backends/platform/maemo/maemo.cpp +++ b/backends/platform/maemo/maemo.cpp @@ -43,6 +43,7 @@ namespace Maemo { OSystem_SDL_Maemo::OSystem_SDL_Maemo() : + _eventObserver(0), OSystem_POSIX() { } -- cgit v1.2.3 From 212551fe4e98ac7d16cdac317b5c87be3190ab18 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 15 Jul 2012 20:58:14 +1000 Subject: TINSEL: Added script workaround for #3543624 - DW1 PSX demo idle animation --- engines/tinsel/detection.cpp | 4 ++++ engines/tinsel/pcode.cpp | 43 ++++++++++++++++++++++++++++--------------- engines/tinsel/tinsel.h | 1 + 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp index 0f662e22bd..6d20f8bee2 100644 --- a/engines/tinsel/detection.cpp +++ b/engines/tinsel/detection.cpp @@ -63,6 +63,10 @@ uint16 TinselEngine::getVersion() const { return _gameDescription->version; } +bool TinselEngine::getIsADGFDemo() const { + return (bool)(_gameDescription->desc.flags & ADGF_DEMO); +} + } // End of namespace Tinsel static const PlainGameDescriptor tinselGames[] = { diff --git a/engines/tinsel/pcode.cpp b/engines/tinsel/pcode.cpp index 60f04b47fd..6ea18c8268 100644 --- a/engines/tinsel/pcode.cpp +++ b/engines/tinsel/pcode.cpp @@ -122,6 +122,8 @@ static uint32 g_hMasterScript; struct WorkaroundEntry { TinselEngineVersion version; ///< Engine version this workaround applies to bool scnFlag; ///< Only applicable for Tinsel 1 (DW 1) + bool isDemo; ///< Flags whether it's for a demo + Common::Platform platform; ///< Platform filter SCNHANDLE hCode; ///< Script to apply fragment to int ip; ///< Script offset to run this fragment before int numBytes; ///< Number of bytes in the script @@ -129,6 +131,7 @@ struct WorkaroundEntry { }; #define FRAGMENT_WORD(x) (byte)(x & 0xFF), (byte)(x >> 8) +#define FRAGMENT_DWORD(x) (byte)(x & 0xFF), (byte)(x >> 8), (byte)(x >> 16), (byte)(x >> 24) static const byte fragment1[] = {OP_ZERO, OP_GSTORE | OPSIZE16, 206, 0}; static const byte fragment2[] = {OP_LIBCALL | OPSIZE8, 110}; @@ -149,6 +152,10 @@ static const byte fragment12[] = {OP_JMPTRUE | OPSIZE16, FRAGMENT_WORD(1491), OP_IMM | OPSIZE16, FRAGMENT_WORD(322), OP_LIBCALL | OPSIZE8, 46, // Give back the whistle OP_JUMP | OPSIZE16, FRAGMENT_WORD(1568)}; static const byte fragment13[] = {OP_ZERO, OP_GSTORE | OPSIZE16, FRAGMENT_WORD(306)}; +static const byte fragment14[] = {OP_LIBCALL | OPSIZE8, 58, + OP_IMM, FRAGMENT_DWORD((42 << 23)), OP_ONE, OP_ZERO, OP_LIBCALL | OPSIZE8, 44, + OP_LIBCALL | OPSIZE8, 97, OP_JUMP | OPSIZE16, FRAGMENT_WORD(2220) +}; #undef FRAGMENT_WORD @@ -157,7 +164,7 @@ const WorkaroundEntry workaroundList[] = { // book back to the present. In the GRA version, it was global 373, // and was reset when he is returned to the past, but was forgotten // in the SCN version, so this ensures the flag is properly reset. - {TINSEL_V1, true, 427942095, 1, sizeof(fragment1), fragment1}, + {TINSEL_V1, true, false, Common::kPlatformUnknown, 427942095, 1, sizeof(fragment1), fragment1}, // DW1-GRA: Rincewind exiting the Inn is blocked by the luggage. // Whilst you can then move into walkable areas, saving and @@ -165,26 +172,26 @@ const WorkaroundEntry workaroundList[] = { // fragment turns off NPC blocking for the Outside Inn rooms so that // the luggage won't block Past Outside Inn. // See bug report #2525010. - {TINSEL_V1, false, 444622076, 0, sizeof(fragment2), fragment2}, + {TINSEL_V1, false, false, Common::kPlatformUnknown, 444622076, 0, sizeof(fragment2), fragment2}, // Present Outside Inn - {TINSEL_V1, false, 352600876, 0, sizeof(fragment2), fragment2}, + {TINSEL_V1, false, false, Common::kPlatformUnknown, 352600876, 0, sizeof(fragment2), fragment2}, // DW1-GRA: Talking to palace guards in Act 2 gives !!!HIGH // STRING||| - this happens if you initiate dialog with one of the // guards, but not the other. So these fragments provide the correct // talk parameters where needed. // See bug report #2831159. - {TINSEL_V1, false, 310506872, 463, sizeof(fragment4), fragment4}, - {TINSEL_V1, false, 310506872, 485, sizeof(fragment5), fragment5}, - {TINSEL_V1, false, 310506872, 513, sizeof(fragment6), fragment6}, - {TINSEL_V1, false, 310506872, 613, sizeof(fragment7), fragment7}, - {TINSEL_V1, false, 310506872, 641, sizeof(fragment8), fragment8}, + {TINSEL_V1, false, false, Common::kPlatformUnknown, 310506872, 463, sizeof(fragment4), fragment4}, + {TINSEL_V1, false, false, Common::kPlatformUnknown, 310506872, 485, sizeof(fragment5), fragment5}, + {TINSEL_V1, false, false, Common::kPlatformUnknown, 310506872, 513, sizeof(fragment6), fragment6}, + {TINSEL_V1, false, false, Common::kPlatformUnknown, 310506872, 613, sizeof(fragment7), fragment7}, + {TINSEL_V1, false, false, Common::kPlatformUnknown, 310506872, 641, sizeof(fragment8), fragment8}, // DW1-SCN: The script for the lovable street-Starfish does a // 'StopSample' after flicking the coin to ensure it's sound is // stopped, but which also accidentally can stop any active // conversation with the Amazon. - {TINSEL_V1, true, 394640351, 121, sizeof(fragment9), fragment9}, + {TINSEL_V1, true, false, Common::kPlatformUnknown, 394640351, 121, sizeof(fragment9), fragment9}, // DW2: In the garden, global #490 is set when the bees begin their // 'out of hive' animation, and reset when done. But if the game is @@ -197,25 +204,29 @@ const WorkaroundEntry workaroundList[] = { // * Stealing the mallets from the wizards (bug #2820788). // This fix ensures that the global is reset when the Garden scene // is loaded (both entering and restoring a game). - {TINSEL_V2, true, 2888147476U, 0, sizeof(fragment3), fragment3}, + {TINSEL_V2, true, false, Common::kPlatformUnknown, 2888147476U, 0, sizeof(fragment3), fragment3}, // DW1-GRA: Corrects text being drawn partially off-screen during // the blackboard description of the Librarian. - {TINSEL_V1, false, 293831402, 133, sizeof(fragment10), fragment10}, + {TINSEL_V1, false, false, Common::kPlatformUnknown, 293831402, 133, sizeof(fragment10), fragment10}, // DW1-GRA/SCN: Corrects the dead-end of being able to give the // whistle back to the pirate before giving him the parrot. // See bug report #2934211. - {TINSEL_V1, true, 352601285, 1569, sizeof(fragment11), fragment11}, - {TINSEL_V1, false, 352602304, 1488, sizeof(fragment12), fragment12}, + {TINSEL_V1, true, false, Common::kPlatformUnknown, 352601285, 1569, sizeof(fragment11), fragment11}, + {TINSEL_V1, false, false, Common::kPlatformUnknown, 352602304, 1488, sizeof(fragment12), fragment12}, // DW2: Corrects a bug with global 306 not being cleared if you leave // the marketplace scene whilst D'Blah is talking (even if it's not // actually audible); returning to the scene and clicking on him multiple // times would cause the game to crash - {TINSEL_V2, true, 1109294728, 0, sizeof(fragment13), fragment13}, + {TINSEL_V2, true, false, Common::kPlatformUnknown, 1109294728, 0, sizeof(fragment13), fragment13}, + + // DW1 PSX DEMO: Alters a script in the PSX DW1 demo to show the Idle animation scene rather than + // quitting the game when no user input happens for a while + {TINSEL_V1, true, true, Common::kPlatformPSX, 0, 2186, sizeof(fragment14), fragment14}, - {TINSEL_V0, false, 0, 0, 0, NULL} + {TINSEL_V0, false, false, Common::kPlatformUnknown, 0, 0, 0, NULL} }; //----------------- LOCAL GLOBAL DATA -------------------- @@ -582,6 +593,8 @@ void Interpret(CORO_PARAM, INT_CONTEXT *ic) { if ((wkEntry->version == TinselVersion) && (wkEntry->hCode == ic->hCode) && (wkEntry->ip == ip) && + (wkEntry->isDemo == _vm->getIsADGFDemo()) && + ((wkEntry->platform == Common::kPlatformUnknown) || (wkEntry->platform == _vm->getPlatform())) && (!TinselV1 || (wkEntry->scnFlag == ((_vm->getFeatures() & GF_SCNFILES) != 0)))) { // Point to start of workaround fragment ip = 0; diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h index bac7ef6efb..5660366657 100644 --- a/engines/tinsel/tinsel.h +++ b/engines/tinsel/tinsel.h @@ -186,6 +186,7 @@ public: uint16 getVersion() const; uint32 getFlags() const; Common::Platform getPlatform() const; + bool getIsADGFDemo() const; const char *getSampleIndex(LANGUAGE lang); const char *getSampleFile(LANGUAGE lang); -- cgit v1.2.3 From 89aa6573fed989131da5e34648f70b0669e39501 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 15 Jul 2012 14:38:26 +0300 Subject: TINSEL: Remove the GF_DEMO flag --- engines/tinsel/detection_tables.h | 4 ++-- engines/tinsel/music.cpp | 2 +- engines/tinsel/scene.h | 6 +++--- engines/tinsel/sound.cpp | 2 +- engines/tinsel/tinlib.cpp | 4 ++-- engines/tinsel/tinsel.h | 22 ++++++++++------------ 6 files changed, 19 insertions(+), 21 deletions(-) diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h index ef562a5e08..dc3b5f1382 100644 --- a/engines/tinsel/detection_tables.h +++ b/engines/tinsel/detection_tables.h @@ -47,7 +47,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_DEMO, + 0, TINSEL_V0, }, @@ -551,7 +551,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW2, 0, - GF_CD | GF_SCNFILES | GF_DEMO, + GF_CD | GF_SCNFILES, TINSEL_V2, }, diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp index a226feb656..637e043e11 100644 --- a/engines/tinsel/music.cpp +++ b/engines/tinsel/music.cpp @@ -300,7 +300,7 @@ void OpenMidiFiles() { Common::File midiStream; // Demo version has no midi file - if ((_vm->getFeatures() & GF_DEMO) || (TinselVersion == TINSEL_V2)) + if (TinselV0 || TinselV2) return; if (g_midiBuffer.pDat) diff --git a/engines/tinsel/scene.h b/engines/tinsel/scene.h index baaff27a3e..06e5c096d9 100644 --- a/engines/tinsel/scene.h +++ b/engines/tinsel/scene.h @@ -75,9 +75,9 @@ enum REEL { typedef enum { TRANS_DEF, TRANS_CUT, TRANS_FADE } TRANSITS; // amount to shift scene handles by -#define SCNHANDLE_SHIFT ((TinselV2 && !IsDemo) ? 25 : 23) -#define OFFSETMASK ((TinselV2 && !IsDemo) ? 0x01ffffffL : 0x007fffffL) -#define HANDLEMASK ((TinselV2 && !IsDemo) ? 0xFE000000L : 0xFF800000L) +#define SCNHANDLE_SHIFT ((TinselV2 && !TinselV2Demo) ? 25 : 23) +#define OFFSETMASK ((TinselV2 && !TinselV2Demo) ? 0x01ffffffL : 0x007fffffL) +#define HANDLEMASK ((TinselV2 && !TinselV2Demo) ? 0xFE000000L : 0xFF800000L) void DoHailScene(SCNHANDLE scene); diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp index f575b03270..f0ad62a091 100644 --- a/engines/tinsel/sound.cpp +++ b/engines/tinsel/sound.cpp @@ -471,7 +471,7 @@ void SoundManager::setSFXVolumes(uint8 volume) { */ void SoundManager::openSampleFiles() { // Floppy and demo versions have no sample files, except for the Discworld 2 demo - if (_vm->getFeatures() & GF_FLOPPY || (IsDemo && !TinselV2)) + if (_vm->getFeatures() & GF_FLOPPY || TinselV0) return; TinselFile f; diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp index 5dda836144..7c4fec6592 100644 --- a/engines/tinsel/tinlib.cpp +++ b/engines/tinsel/tinlib.cpp @@ -3412,7 +3412,7 @@ static void TalkOrSay(CORO_PARAM, SPEECH_TYPE speechType, SCNHANDLE hText, int x // Kick off the sample now (perhaps with a delay) if (g_bNoPause) g_bNoPause = false; - else if (!IsDemo) + else if (!TinselV2Demo) CORO_SLEEP(SysVar(SV_SPEECHDELAY)); //SamplePlay(VOICE, hText, _ctx->sub, false, -1, -1, PRIORITY_TALK); @@ -4244,7 +4244,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi int libCode; if (TinselV0) libCode = DW1DEMO_CODES[operand]; else if (!TinselV2) libCode = DW1_CODES[operand]; - else if (_vm->getFeatures() & GF_DEMO) libCode = DW2DEMO_CODES[operand]; + else if (TinselV2Demo) libCode = DW2DEMO_CODES[operand]; else libCode = DW2_CODES[operand]; debug(7, "CallLibraryRoutine op %d (escOn %d, myEscape %d)", operand, pic->escOn, pic->myEscape); diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h index 5660366657..ef04669f5f 100644 --- a/engines/tinsel/tinsel.h +++ b/engines/tinsel/tinsel.h @@ -63,21 +63,20 @@ enum TinselGameID { }; enum TinselGameFeatures { - GF_DEMO = 1 << 0, - GF_CD = 1 << 1, - GF_FLOPPY = 1 << 2, - GF_SCNFILES = 1 << 3, - GF_ENHANCED_AUDIO_SUPPORT = 1 << 4, - GF_ALT_MIDI = 1 << 5, // Alternate sequence in midi.dat file + GF_CD = 1 << 0, + GF_FLOPPY = 1 << 1, + GF_SCNFILES = 1 << 2, + GF_ENHANCED_AUDIO_SUPPORT = 1 << 3, + GF_ALT_MIDI = 1 << 4, // Alternate sequence in midi.dat file // The GF_USE_?FLAGS values specify how many country flags are displayed // in the subtitles options dialog. // None of these defined -> 1 language, in ENGLISH.TXT - GF_USE_3FLAGS = 1 << 6, // French, German, Spanish - GF_USE_4FLAGS = 1 << 7, // French, German, Spanish, Italian - GF_USE_5FLAGS = 1 << 8, // All 5 flags + GF_USE_3FLAGS = 1 << 5, // French, German, Spanish + GF_USE_4FLAGS = 1 << 6, // French, German, Spanish, Italian + GF_USE_5FLAGS = 1 << 7, // All 5 flags - GF_BIG_ENDIAN = 1 << 9 + GF_BIG_ENDIAN = 1 << 8 }; /** @@ -134,11 +133,10 @@ typedef bool (*KEYFPTR)(const Common::KeyState &); #define TinselV0 (TinselVersion == TINSEL_V0) #define TinselV1 (TinselVersion == TINSEL_V1) #define TinselV2 (TinselVersion == TINSEL_V2) +#define TinselV2Demo (TinselVersion == TINSEL_V2 && _vm->getIsADGFDemo()) #define TinselV1PSX (TinselVersion == TINSEL_V1 && _vm->getPlatform() == Common::kPlatformPSX) #define TinselV1Mac (TinselVersion == TINSEL_V1 && _vm->getPlatform() == Common::kPlatformMacintosh) -#define IsDemo (_vm->getFeatures() & GF_DEMO) - #define READ_16(v) ((_vm->getFeatures() & GF_BIG_ENDIAN) ? READ_BE_UINT16(v) : READ_LE_UINT16(v)) #define READ_32(v) ((_vm->getFeatures() & GF_BIG_ENDIAN) ? READ_BE_UINT32(v) : READ_LE_UINT32(v)) -- cgit v1.2.3 From bd09eb06557514b4e68e6dc915cd71976af677bb Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 15 Jul 2012 14:41:27 +0300 Subject: TINSEL: Reorder the detection entries to split the DW1 and DW2 entries --- engines/tinsel/detection_tables.h | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h index dc3b5f1382..23d8d2242b 100644 --- a/engines/tinsel/detection_tables.h +++ b/engines/tinsel/detection_tables.h @@ -535,26 +535,6 @@ static const TinselGameDescription gameDescriptions[] = { TINSEL_V1, }, - { // English DW2 demo - { - "dw2", - "Demo", - { - {"dw2.scn", 0, "853ab998f5136b69bc586991175d6eeb", 4231121}, - {"english.smp", 0, "b5660a0e031cb4710bcb0ef5629ea61d", 28562357}, - {NULL, 0, NULL, 0} - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DEMO, - GUIO1(GUIO_NOASPECT) - }, - GID_DW2, - 0, - GF_CD | GF_SCNFILES, - TINSEL_V2, - }, - { // Polish fan translaction Discworld 1 { "dw", @@ -576,6 +556,26 @@ static const TinselGameDescription gameDescriptions[] = { TINSEL_V1, }, + { // English Discworld 2 demo + { + "dw2", + "Demo", + { + {"dw2.scn", 0, "853ab998f5136b69bc586991175d6eeb", 4231121}, + {"english.smp", 0, "b5660a0e031cb4710bcb0ef5629ea61d", 28562357}, + {NULL, 0, NULL, 0} + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DEMO, + GUIO1(GUIO_NOASPECT) + }, + GID_DW2, + 0, + GF_CD | GF_SCNFILES, + TINSEL_V2, + }, + { // European/Australian Discworld 2 release { "dw2", -- cgit v1.2.3 From d4a354c17f811faa916bf548a11a88cb51c3b7b2 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 15 Jul 2012 14:55:06 +0300 Subject: TINSEL: Remove the GF_CD and GF_FLOPPY flags --- engines/tinsel/detection.cpp | 4 ++ engines/tinsel/detection_tables.h | 92 +++++++++++++++++++-------------------- engines/tinsel/sound.cpp | 6 +-- engines/tinsel/tinsel.h | 17 ++++---- 4 files changed, 61 insertions(+), 58 deletions(-) diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp index 6d20f8bee2..2e4be33e53 100644 --- a/engines/tinsel/detection.cpp +++ b/engines/tinsel/detection.cpp @@ -67,6 +67,10 @@ bool TinselEngine::getIsADGFDemo() const { return (bool)(_gameDescription->desc.flags & ADGF_DEMO); } +bool TinselEngine::isCD() const { + return (bool)(_gameDescription->desc.flags & ADGF_CD); +} + } // End of namespace Tinsel static const PlainGameDescriptor tinselGames[] = { diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h index 23d8d2242b..5f305f06e4 100644 --- a/engines/tinsel/detection_tables.h +++ b/engines/tinsel/detection_tables.h @@ -61,12 +61,12 @@ static const TinselGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformPC, - ADGF_DEMO, + ADGF_DEMO | ADGF_CD, GUIO0() }, GID_DW1, 0, - GF_CD, + 0, TINSEL_V1, }, #if 0 @@ -81,12 +81,12 @@ static const TinselGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformMacintosh, - ADGF_DEMO, + ADGF_DEMO | ADGF_CD, GUIO0() }, GID_DW1, 0, - GF_CD | GF_SCNFILES | GF_BIG_ENDIAN, + GF_SCNFILES | GF_BIG_ENDIAN, TINSEL_V1, }, #endif @@ -110,7 +110,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_FLOPPY | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -133,7 +133,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_FLOPPY | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -156,7 +156,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_FLOPPY | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -179,7 +179,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_FLOPPY | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -195,7 +195,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_FLOPPY | GF_ENHANCED_AUDIO_SUPPORT, + GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -214,7 +214,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_CD | GF_ENHANCED_AUDIO_SUPPORT, + GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -228,12 +228,12 @@ static const TinselGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_CD, GUIO_NONE }, GID_DW1, 0, - GF_CD | GF_ENHANCED_AUDIO_SUPPORT, + GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -249,7 +249,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_FLOPPY | GF_ENHANCED_AUDIO_SUPPORT, + GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -271,7 +271,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -296,7 +296,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -315,12 +315,12 @@ static const TinselGameDescription gameDescriptions[] = { }, Common::DE_DEU, Common::kPlatformPC, - ADGF_DROPLANGUAGE | ADGF_CD, + ADGF_DROPLANGUAGE, GUIO0() }, GID_DW1, 0, - GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, { @@ -343,7 +343,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, { @@ -366,7 +366,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -386,7 +386,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, + GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -406,7 +406,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, + GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -425,7 +425,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, + GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -443,12 +443,12 @@ static const TinselGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformPSX, - ADGF_DEMO, + ADGF_CD | ADGF_DEMO, GUIO0() }, GID_DW1, 0, - GF_CD | GF_SCNFILES, + GF_SCNFILES, TINSEL_V1, }, @@ -469,7 +469,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, + GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, #endif @@ -491,7 +491,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT | GF_BIG_ENDIAN, + GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT | GF_BIG_ENDIAN, TINSEL_V1, }, @@ -510,7 +510,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT | GF_ALT_MIDI, + GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT | GF_ALT_MIDI, TINSEL_V1, }, @@ -531,7 +531,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, + GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -547,12 +547,12 @@ static const TinselGameDescription gameDescriptions[] = { }, Common::PL_POL, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_CD, GUIO_NONE }, GID_DW1, 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, + GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, @@ -567,12 +567,12 @@ static const TinselGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformPC, - ADGF_DEMO, + ADGF_DEMO | ADGF_CD, GUIO1(GUIO_NOASPECT) }, GID_DW2, 0, - GF_CD | GF_SCNFILES, + GF_SCNFILES, TINSEL_V2, }, @@ -587,12 +587,12 @@ static const TinselGameDescription gameDescriptions[] = { }, Common::EN_GRB, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_CD, GUIO1(GUIO_NOASPECT) }, GID_DW2, 0, - GF_CD | GF_SCNFILES, + GF_SCNFILES, TINSEL_V2, }, @@ -607,12 +607,12 @@ static const TinselGameDescription gameDescriptions[] = { }, Common::EN_USA, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_CD, GUIO1(GUIO_NOASPECT) }, GID_DW2, 0, - GF_CD | GF_SCNFILES, + GF_SCNFILES, TINSEL_V2, }, @@ -627,12 +627,12 @@ static const TinselGameDescription gameDescriptions[] = { }, Common::FR_FRA, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_CD, GUIO1(GUIO_NOASPECT) }, GID_DW2, 0, - GF_CD | GF_SCNFILES, + GF_SCNFILES, TINSEL_V2, }, @@ -647,12 +647,12 @@ static const TinselGameDescription gameDescriptions[] = { }, Common::DE_DEU, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_CD, GUIO1(GUIO_NOASPECT) }, GID_DW2, 0, - GF_CD | GF_SCNFILES, + GF_SCNFILES, TINSEL_V2, }, @@ -668,12 +668,12 @@ static const TinselGameDescription gameDescriptions[] = { }, Common::IT_ITA, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_CD, GUIO1(GUIO_NOASPECT) }, GID_DW2, 0, - GF_CD | GF_SCNFILES, + GF_SCNFILES, TINSEL_V2, }, { @@ -688,12 +688,12 @@ static const TinselGameDescription gameDescriptions[] = { }, Common::ES_ESP, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_CD, GUIO1(GUIO_NOASPECT) }, GID_DW2, 0, - GF_CD | GF_SCNFILES, + GF_SCNFILES, TINSEL_V2, }, @@ -709,12 +709,12 @@ static const TinselGameDescription gameDescriptions[] = { }, Common::RU_RUS, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_CD, GUIO1(GUIO_NOASPECT) }, GID_DW2, 0, - GF_CD | GF_SCNFILES, + GF_SCNFILES, TINSEL_V2, }, diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp index f0ad62a091..e052302cfd 100644 --- a/engines/tinsel/sound.cpp +++ b/engines/tinsel/sound.cpp @@ -75,7 +75,7 @@ SoundManager::~SoundManager() { // playSample for DiscWorld 1 bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::SoundHandle *handle) { // Floppy version has no sample file - if (_vm->getFeatures() & GF_FLOPPY) + if (!_vm->isCD()) return false; // no sample driver? @@ -182,7 +182,7 @@ bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int p Audio::Mixer::SoundType type, Audio::SoundHandle *handle) { // Floppy version has no sample file - if (_vm->getFeatures() & GF_FLOPPY) + if (!_vm->isCD()) return false; // no sample driver? @@ -471,7 +471,7 @@ void SoundManager::setSFXVolumes(uint8 volume) { */ void SoundManager::openSampleFiles() { // Floppy and demo versions have no sample files, except for the Discworld 2 demo - if (_vm->getFeatures() & GF_FLOPPY || TinselV0) + if (!_vm->isCD() || TinselV0) return; TinselFile f; diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h index ef04669f5f..38c17812b4 100644 --- a/engines/tinsel/tinsel.h +++ b/engines/tinsel/tinsel.h @@ -63,20 +63,18 @@ enum TinselGameID { }; enum TinselGameFeatures { - GF_CD = 1 << 0, - GF_FLOPPY = 1 << 1, - GF_SCNFILES = 1 << 2, - GF_ENHANCED_AUDIO_SUPPORT = 1 << 3, - GF_ALT_MIDI = 1 << 4, // Alternate sequence in midi.dat file + GF_SCNFILES = 1 << 0, + GF_ENHANCED_AUDIO_SUPPORT = 1 << 1, + GF_ALT_MIDI = 1 << 2, // Alternate sequence in midi.dat file // The GF_USE_?FLAGS values specify how many country flags are displayed // in the subtitles options dialog. // None of these defined -> 1 language, in ENGLISH.TXT - GF_USE_3FLAGS = 1 << 5, // French, German, Spanish - GF_USE_4FLAGS = 1 << 6, // French, German, Spanish, Italian - GF_USE_5FLAGS = 1 << 7, // All 5 flags + GF_USE_3FLAGS = 1 << 3, // French, German, Spanish + GF_USE_4FLAGS = 1 << 4, // French, German, Spanish, Italian + GF_USE_5FLAGS = 1 << 5, // All 5 flags - GF_BIG_ENDIAN = 1 << 8 + GF_BIG_ENDIAN = 1 << 6 }; /** @@ -185,6 +183,7 @@ public: uint32 getFlags() const; Common::Platform getPlatform() const; bool getIsADGFDemo() const; + bool isCD() const; const char *getSampleIndex(LANGUAGE lang); const char *getSampleFile(LANGUAGE lang); -- cgit v1.2.3 From a5af61005c4a2f3daacc40c81da06ff344c9bbd3 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 15 Jul 2012 15:00:00 +0300 Subject: TINSEL: Remove the GF_BIG_ENDIAN flag --- engines/tinsel/detection_tables.h | 4 ++-- engines/tinsel/drives.cpp | 2 +- engines/tinsel/tinsel.h | 8 +++----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h index 5f305f06e4..631c2dce14 100644 --- a/engines/tinsel/detection_tables.h +++ b/engines/tinsel/detection_tables.h @@ -86,7 +86,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_SCNFILES | GF_BIG_ENDIAN, + GF_SCNFILES, TINSEL_V1, }, #endif @@ -491,7 +491,7 @@ static const TinselGameDescription gameDescriptions[] = { }, GID_DW1, 0, - GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT | GF_BIG_ENDIAN, + GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, TINSEL_V1, }, diff --git a/engines/tinsel/drives.cpp b/engines/tinsel/drives.cpp index 5c4b939e4e..3ecef83753 100644 --- a/engines/tinsel/drives.cpp +++ b/engines/tinsel/drives.cpp @@ -149,7 +149,7 @@ bool GotoCD() { bool TinselFile::_warningShown = false; -TinselFile::TinselFile() : ReadStreamEndian((_vm->getFeatures() & GF_BIG_ENDIAN) != 0) { +TinselFile::TinselFile() : ReadStreamEndian(TinselV1Mac) { _stream = NULL; } diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h index 38c17812b4..123249125e 100644 --- a/engines/tinsel/tinsel.h +++ b/engines/tinsel/tinsel.h @@ -72,9 +72,7 @@ enum TinselGameFeatures { // None of these defined -> 1 language, in ENGLISH.TXT GF_USE_3FLAGS = 1 << 3, // French, German, Spanish GF_USE_4FLAGS = 1 << 4, // French, German, Spanish, Italian - GF_USE_5FLAGS = 1 << 5, // All 5 flags - - GF_BIG_ENDIAN = 1 << 6 + GF_USE_5FLAGS = 1 << 5 // All 5 flags }; /** @@ -135,8 +133,8 @@ typedef bool (*KEYFPTR)(const Common::KeyState &); #define TinselV1PSX (TinselVersion == TINSEL_V1 && _vm->getPlatform() == Common::kPlatformPSX) #define TinselV1Mac (TinselVersion == TINSEL_V1 && _vm->getPlatform() == Common::kPlatformMacintosh) -#define READ_16(v) ((_vm->getFeatures() & GF_BIG_ENDIAN) ? READ_BE_UINT16(v) : READ_LE_UINT16(v)) -#define READ_32(v) ((_vm->getFeatures() & GF_BIG_ENDIAN) ? READ_BE_UINT32(v) : READ_LE_UINT32(v)) +#define READ_16(v) (TinselV1Mac ? READ_BE_UINT16(v) : READ_LE_UINT16(v)) +#define READ_32(v) (TinselV1Mac ? READ_BE_UINT32(v) : READ_LE_UINT32(v)) // Global reference to the TinselEngine object extern TinselEngine *_vm; -- cgit v1.2.3 From 3ef5baed129fc739a65d846769debed67d5772db Mon Sep 17 00:00:00 2001 From: Simon Sawatzki Date: Sat, 14 Jul 2012 23:38:53 +0200 Subject: I18N: Updated German GUI translation. --- po/de_DE.po | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/po/de_DE.po b/po/de_DE.po index c40e08034a..bb53f4e2ff 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -8,10 +8,10 @@ msgstr "" "Project-Id-Version: ScummVM 1.5.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-07-08 12:25+0100\n" -"PO-Revision-Date: 2012-01-29 21:11+0100\n" +"PO-Revision-Date: 2012-07-14 22:49+0100\n" "Last-Translator: Simon Sawatzki \n" "Language-Team: Simon Sawatzki (Lead), Lothar Serra Mari " -" (Contributor)\n" +"(Contributor)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" @@ -2210,7 +2210,6 @@ msgid "Choose Spell" msgstr "Zauberspruch auswählen" #: engines/kyra/sound_midi.cpp:475 -#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" @@ -2220,10 +2219,10 @@ msgid "" msgstr "" "Sie scheinen ein General-MIDI-Gerät zu\n" "verwenden, aber das Spiel unterstützt nur\n" -"Roland MT-32 MIDI. Es wird versucht, die\n" -"Roland-MT-32-Instrumente denen von\n" -"General MIDI zuzuordnen. Es kann jedoch\n" -"vorkommen, dass ein paar Musikstücke nicht\n" +"Roland MT32 MIDI. Es wird versucht, die\n" +"Roland-MT32-Instrumente denen von\n" +"General MIDI zuzuordnen. Es ist dennoch\n" +"möglich, dass ein paar Musikstücke nicht\n" "richtig abgespielt werden." #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -- cgit v1.2.3 From 8865ece35904e51f8fb4e6432cb2590f27ac2362 Mon Sep 17 00:00:00 2001 From: Simon Sawatzki Date: Sat, 14 Jul 2012 23:40:32 +0200 Subject: DOCS: Updated German README (Liesmich) and NEWS (Neues). Liesmich now based on README SHA1 ID: 604c6bde91a9f1fb71d18f8fdcc172fc738ff9ef Neues now based on NEWS SHA1 ID: 3de8c4b07d6f15fe6e9ca4bcb8da92532ebf5692 --- doc/de/Liesmich | 2 +- doc/de/Neues | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/doc/de/Liesmich b/doc/de/Liesmich index e8ee4ca3f8..88b6ce6de8 100644 --- a/doc/de/Liesmich +++ b/doc/de/Liesmich @@ -2241,7 +2241,7 @@ folgende nicht standardmäßige Schlüsselwörter: erweiterten von ScummVM verwendet. native_fb01 Bool Falls „true“, wird für die MIDI-Ausgabe der Musiktreiber für eine Music-Feature-Karte - von IBM oder für ein Yahama-FB-01-FM- + von IBM oder für ein Yamaha-FB-01-FM- Synthetisierungsmodul verwendet. Baphomets Fluch II verfügt zusätzlich über folgende nicht standardmäßige diff --git a/doc/de/Neues b/doc/de/Neues index 7c6699fcb0..74203148e7 100644 --- a/doc/de/Neues +++ b/doc/de/Neues @@ -2,7 +2,7 @@ Umfangreichere Änderungsaufzeichnungen des neusten experimentellen Codes finden Sie auf Englisch unter: https://github.com/scummvm/scummvm/commits/ -1.5.0 (??.??.????) +1.5.0 (27.07.2012) Neue Spiele: - Unterstützung für Backyard Baseball 2003 hinzugefügt. - Unterstützung für Blue Force hinzugefügt. @@ -10,10 +10,7 @@ Sie auf Englisch unter: - Unterstützung für Dreamweb hinzugefügt. - Unterstützung für Geisha hinzugefügt. - Unterstützung für Gregor und der Heißluftballon hinzugefügt. - - Unterstützung für Magic Tales: Baba Yaga and the Magic Geese hinzugefügt. - - Unterstützung für Magic Tales: Imo and the King hinzugefügt. - Unterstützung für Magic Tales: Liam Finds a Story hinzugefügt. - - Unterstützung für Magic Tales: The Little Samurai hinzugefügt. - Unterstützung für Once Upon A Time: Little Red Riding Hood hinzugefügt. - Unterstützung für Sleeping Cub's Test of Courage hinzugefügt. - Unterstützung für Soltys hinzugefügt. @@ -36,12 +33,10 @@ Allgemein: - Aussehen von vorhersagendem Eingabedialog verbessert. - Verschiedene Verbesserungen der grafischen Benutzeroberfläche. - SDL-Portierungen: - - Unterstützung für OpenGL hinzugefügt. (GSoC-Aufgabe) - Baphomets Fluch 1: - Falsche Soundeffekte in der DOS-/Windows-Demo korrigiert. - Unterstützung für PlayStation-Videos hinzugefügt. + - Fehlende Untertitel zur Demo hinzugefügt. Baphomets Fluch 2: - Unterstützung für PlayStation-Videos hinzugefügt. @@ -49,6 +44,10 @@ Allgemein: Cine: - Roland-MT-32-Ausgabetreiber integriert. + Drascula: + - Spanische Untertitel zur Zwischensequenz mit Von Braun + hinzugefügt (3069981: Keine Untertitel in Szene mit „Von Braun“). + Gob: - Absturz in Lost in Time beseitigt. - AdLib-Abspieler umgeschrieben. Den nun funktionierenden MDY-Abspieler in @@ -69,6 +68,10 @@ Allgemein: - Unterstützung für Seitenverhältniskorrektur hinzugefügt. - Unterstützung für 16 Bits pro Pixel bei Spielen integriert. + Maemo-Portierung: + - Unterstützung für Nokia 770 mit dem Betriebssystem OS2008 HE hinzugefügt. + - Konfigurierbare Tastenzuweisung hinzugefügt. + Windows-Portierung: - Standard-Verzeichnis für Spielstände bei Windows NT4/2000/XP/Vista/7 geändert. -- cgit v1.2.3 From 790b0ca83cee7f4d7d11e6b310407501ed58a3ee Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 15 Jul 2012 14:07:35 +0100 Subject: I18N: Update French translation --- po/fr_FR.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/fr_FR.po b/po/fr_FR.po index 4631d4c91a..5faab55d83 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -1262,7 +1262,7 @@ msgstr "Jouer quand m #: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" -msgstr "Utiliser les dialogues sauvegarde/chargement d'origine" +msgstr "Dialogues sauvegarde/chargement d'origine" #: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48 #: engines/sci/detection.cpp:391 -- cgit v1.2.3 From 093a48989a9cbdb88c5833299c2b574950d677a1 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 15 Jul 2012 14:13:33 +0100 Subject: I18N: Regenerate translations data file --- gui/themes/translations.dat | Bin 342141 -> 342397 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 0e32008bd9..4b35fdb9a8 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 4c3b4835aae1fe671253a65f6a10649c5ab2014c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 15 Jul 2012 16:54:29 +0300 Subject: TINSEL: Fix bug #3459999 - "TINSEL: DW Crash in Subtitle Menu" --- engines/tinsel/dialogs.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp index fbe9e8d1f6..c33b412f6f 100644 --- a/engines/tinsel/dialogs.cpp +++ b/engines/tinsel/dialogs.cpp @@ -1038,18 +1038,20 @@ static bool RePosition(); static bool LanguageChange() { LANGUAGE nLang = _vm->_config->_language; - if (_vm->getFeatures() & GF_USE_3FLAGS) { - // VERY quick dodgy bodge - if (cd.selBox == 0) - nLang = TXT_FRENCH; // = 1 - else if (cd.selBox == 1) - nLang = TXT_GERMAN; // = 2 - else - nLang = TXT_SPANISH; // = 4 - } else if (_vm->getFeatures() & GF_USE_4FLAGS) { - nLang = (LANGUAGE)(cd.selBox + 1); - } else if (_vm->getFeatures() & GF_USE_5FLAGS) { - nLang = (LANGUAGE)cd.selBox; + if ((_vm->getFeatures() & GF_USE_3FLAGS) || (_vm->getFeatures() & GF_USE_4FLAGS) || (_vm->getFeatures() & GF_USE_5FLAGS)) { + // Languages: TXT_ENGLISH, TXT_FRENCH, TXT_GERMAN, TXT_ITALIAN, TXT_SPANISH + // 5 flag versions include English + int selected = (_vm->getFeatures() & GF_USE_5FLAGS) ? cd.selBox : cd.selBox + 1; + // Make sure that a language flag has been selected. If the user has + // changed the language speed slider and hasn't clicked on a flag, it + // won't be selected. + if (selected >= 0 && selected <= 4) { + nLang = (LANGUAGE)selected; + + // 3 flag versions don't include Italian + if (selected >= 3 && (_vm->getFeatures() & GF_USE_3FLAGS)) + nLang = TXT_SPANISH; + } } if (nLang != _vm->_config->_language) { -- cgit v1.2.3 From 1fffbe40ceb82bec77479c56176abeff0d2bd5e5 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 15 Jul 2012 17:37:55 +0300 Subject: TINSEL: Change SetMidiVolume() so that it doesn't start/stop music tracks Previously, SetMidiVolume() would stop the currently playing track when the MIDI volume was set to 0. Now, the music track always plays, even when the volume is set to 0. This fixes bug #3541533 - "DW: Silencing music volume stops music" and resolves two FIXME comments --- engines/tinsel/music.cpp | 44 ++++++++++---------------------------------- engines/tinsel/tinlib.cpp | 21 ++++++--------------- 2 files changed, 16 insertions(+), 49 deletions(-) diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp index 637e043e11..b3bfbcc5dc 100644 --- a/engines/tinsel/music.cpp +++ b/engines/tinsel/music.cpp @@ -131,13 +131,11 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) { g_currentMidi = dwFileOffset; g_currentLoop = bLoop; - if (_vm->_config->_musicVolume != 0) { - bool mute = false; - if (ConfMan.hasKey("mute")) - mute = ConfMan.getBool("mute"); + bool mute = false; + if (ConfMan.hasKey("mute")) + mute = ConfMan.getBool("mute"); - SetMidiVolume(mute ? 0 : _vm->_config->_musicVolume); - } + SetMidiVolume(mute ? 0 : _vm->_config->_musicVolume); // the index and length of the last tune loaded uint32 dwSeqLen = 0; // length of the sequence @@ -270,27 +268,7 @@ int GetMidiVolume() { */ void SetMidiVolume(int vol) { assert(vol >= 0 && vol <= Audio::Mixer::kMaxChannelVolume); - - static int priorVolMusic = 0; // FIXME: Avoid non-const global vars - - if (vol == 0 && priorVolMusic == 0) { - // Nothing to do - } else if (vol == 0 && priorVolMusic != 0) { - // Stop current midi sequence - StopMidi(); - _vm->_midiMusic->setVolume(vol); - } else if (vol != 0 && priorVolMusic == 0) { - // Perhaps restart last midi sequence - if (g_currentLoop) - PlayMidiSequence(g_currentMidi, true); - - _vm->_midiMusic->setVolume(vol); - } else if (vol != 0 && priorVolMusic != 0) { - // Alter current volume - _vm->_midiMusic->setVolume(vol); - } - - priorVolMusic = vol; + _vm->_midiMusic->setVolume(vol); } /** @@ -933,14 +911,12 @@ void RestoreMidiFacts(SCNHANDLE Midi, bool Loop) { g_currentMidi = Midi; g_currentLoop = Loop; - if (_vm->_config->_musicVolume != 0 && Loop) { - bool mute = false; - if (ConfMan.hasKey("mute")) - mute = ConfMan.getBool("mute"); + bool mute = false; + if (ConfMan.hasKey("mute")) + mute = ConfMan.getBool("mute"); - PlayMidiSequence(g_currentMidi, true); - SetMidiVolume(mute ? 0 : _vm->_config->_musicVolume); - } + PlayMidiSequence(g_currentMidi, true); + SetMidiVolume(mute ? 0 : _vm->_config->_musicVolume); } #if 0 diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp index 7c4fec6592..058f8eb6fd 100644 --- a/engines/tinsel/tinlib.cpp +++ b/engines/tinsel/tinlib.cpp @@ -1625,10 +1625,6 @@ static void Play(CORO_PARAM, SCNHANDLE hFilm, int x, int y, bool bComplete, int * Play a midi file. */ static void PlayMidi(CORO_PARAM, SCNHANDLE hMidi, int loop, bool complete) { - // FIXME: This is a workaround for the FIXME below - if (GetMidiVolume() == 0) - return; - CORO_BEGIN_CONTEXT; CORO_END_CONTEXT(_ctx); @@ -1637,18 +1633,13 @@ static void PlayMidi(CORO_PARAM, SCNHANDLE hMidi, int loop, bool complete) { PlayMidiSequence(hMidi, loop == MIDI_LOOP); - // FIXME: The following check messes up the script arguments when - // entering the secret door in the bookshelf in the library, - // leading to a crash, when the music volume is set to 0 (MidiPlaying() - // always false then). - // - // Why exactly this happens is unclear. An analysis of the involved - // script(s) might reveal more. - // - // Note: This check&sleep was added in DW v2. It was most likely added - // to ensure that the MIDI song started playing before the next opcode + // This check&sleep was added in DW v2. It was most likely added to + // ensure that the MIDI song started playing before the next opcode // is executed. - if (!MidiPlaying()) + // In DW1, it messes up the script arguments when entering the secret + // door in the bookshelf in the library, leading to a crash, when the + // music volume is set to 0. + if (!MidiPlaying() && TinselV2) CORO_SLEEP(1); if (complete) { -- cgit v1.2.3 From b17667cbcf64f68d94b9228f09c6c2fd6b9f1ed5 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 15 Jul 2012 22:19:10 +0300 Subject: TINSEL: Fix bug #3541745 - "DW: PSX version has a too small Re-Start window" --- engines/tinsel/dialogs.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp index c33b412f6f..dde34841cf 100644 --- a/engines/tinsel/dialogs.cpp +++ b/engines/tinsel/dialogs.cpp @@ -753,6 +753,11 @@ static CONFBOX t1RestartBox[] = { #endif }; +static CONFBOX t1RestartBoxPSX[] = { + { AAGBUT, INITGAME, TM_NONE, NULL, USE_POINTER, 122, 48, 23, 19, NULL, IX1_TICK1 }, + { AAGBUT, CLOSEWIN, TM_NONE, NULL, USE_POINTER, 82, 48, 23, 19, NULL, IX1_CROSS1 } +}; + static CONFBOX t2RestartBox[] = { { AAGBUT, INITGAME, TM_NONE, NULL, 0, 140, 78, BW, BH, NULL, IX2_TICK1 }, { AAGBUT, CLOSEWIN, TM_NONE, NULL, 0, 60, 78, BW, BH, NULL, IX2_CROSS1 } @@ -763,10 +768,10 @@ static CONFINIT t1ciRestart = { 6, 2, 72, 53, false, t1RestartBox, ARRAYSIZE(t1R #else static CONFINIT t1ciRestart = { 4, 2, 98, 53, false, t1RestartBox, ARRAYSIZE(t1RestartBox), SIX_RESTART_HEADING }; #endif +static CONFINIT t1ciRestartPSX = { 8, 2, 46, 53, false, t1RestartBoxPSX, ARRAYSIZE(t1RestartBoxPSX), SIX_RESTART_HEADING }; static CONFINIT t2ciRestart = { 4, 2, 196, 53, false, t2RestartBox, sizeof(t2RestartBox)/sizeof(CONFBOX), SS_RESTART_HEADING }; -#define ciRestart (TinselV2 ? t2ciRestart : t1ciRestart) -#define restartBox (TinselV2 ? t2RestartBox : t1RestartBox) +#define ciRestart (TinselV2 ? t2ciRestart : (TinselV1PSX ? t1ciRestartPSX : t1ciRestart)) /*-------------------------------------------------------------*\ | This is the sound control 'menu'. In Discworld 2, it also | -- cgit v1.2.3 From 1a90ca5ecd9eeaaca3b6de79dd940e9b29e472aa Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 16 Jul 2012 11:49:50 +0300 Subject: SCI: Handle all negative priority values. Fixes graphics in the SQ6 demo --- engines/sci/graphics/frameout.cpp | 17 ++++++----------- engines/sci/graphics/frameout.h | 4 ++-- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index cb56e24de9..fedae2eb6f 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -159,7 +159,7 @@ void GfxFrameout::kernelAddPlane(reg_t object) { newPlane.object = object; newPlane.priority = readSelectorValue(_segMan, object, SELECTOR(priority)); - newPlane.lastPriority = 0xFFFF; // hidden + newPlane.lastPriority = -1; // hidden newPlane.planeOffsetX = 0; newPlane.planeOffsetY = 0; newPlane.pictureId = kPlanePlainColored; @@ -465,15 +465,10 @@ bool sortHelper(const FrameoutEntry* entry1, const FrameoutEntry* entry2) { } bool planeSortHelper(const PlaneEntry &entry1, const PlaneEntry &entry2) { -// SegManager *segMan = g_sci->getEngineState()->_segMan; - -// uint16 plane1Priority = readSelectorValue(segMan, entry1, SELECTOR(priority)); -// uint16 plane2Priority = readSelectorValue(segMan, entry2, SELECTOR(priority)); - - if (entry1.priority == 0xffff) + if (entry1.priority < 0) return true; - if (entry2.priority == 0xffff) + if (entry2.priority < 0) return false; return entry1.priority < entry2.priority; @@ -639,13 +634,13 @@ void GfxFrameout::kernelFrameout() { _screen->drawLine(startPoint, endPoint, it2->color, it2->priority, it2->control); } - uint16 planeLastPriority = it->lastPriority; + int16 planeLastPriority = it->lastPriority; // Update priority here, sq6 sets it w/o UpdatePlane - uint16 planePriority = it->priority = readSelectorValue(_segMan, planeObject, SELECTOR(priority)); + int16 planePriority = it->priority = readSelectorValue(_segMan, planeObject, SELECTOR(priority)); it->lastPriority = planePriority; - if (planePriority == 0xffff) { // Plane currently not meant to be shown + if (planePriority < 0) { // Plane currently not meant to be shown // If plane was shown before, delete plane rect if (planePriority != planeLastPriority) _paint32->fillRect(it->planeRect, 0); diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index ecaf450d89..5fd2824224 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -40,8 +40,8 @@ typedef Common::List PlaneLineList; struct PlaneEntry { reg_t object; - uint16 priority; - uint16 lastPriority; + int16 priority; + int16 lastPriority; int16 planeOffsetX; int16 planeOffsetY; GuiResourceId pictureId; -- cgit v1.2.3 From 59ea9187457da7b771fbb760ad76805d3a6e3c6e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 16 Jul 2012 12:04:34 +0300 Subject: SCI: Temporarily disable text display in the demo of SQ6 to stop crashes --- engines/sci/engine/kgraphics32.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 16e54a5429..f0989f5f00 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -173,6 +173,10 @@ reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv) { debugC(kDebugLevelStrings, "%s", text.c_str()); uint16 maxWidth = argv[1].toUint16(); // nsRight - nsLeft + 1 uint16 maxHeight = argv[2].toUint16(); // nsBottom - nsTop + 1 + // These values can be larger than the screen in the SQ6 demo + // TODO: Find out why. For now, don't show any text in the SQ6 demo. + if (g_sci->getGameId() == GID_SQ6 && g_sci->isDemo()) + return NULL_REG; return g_sci->_gfxText32->createTextBitmap(object, maxWidth, maxHeight); } case 1: { -- cgit v1.2.3 From 49c76c835bf000622bd5b078ef87275a335934fa Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 16 Jul 2012 12:11:22 +0300 Subject: SCI: Only skip text in room 100 in the SQ6 demo --- engines/sci/engine/kgraphics32.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index f0989f5f00..093920e148 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -173,9 +173,9 @@ reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv) { debugC(kDebugLevelStrings, "%s", text.c_str()); uint16 maxWidth = argv[1].toUint16(); // nsRight - nsLeft + 1 uint16 maxHeight = argv[2].toUint16(); // nsBottom - nsTop + 1 - // These values can be larger than the screen in the SQ6 demo - // TODO: Find out why. For now, don't show any text in the SQ6 demo. - if (g_sci->getGameId() == GID_SQ6 && g_sci->isDemo()) + // These values can be larger than the screen in the SQ6 demo, room 100 + // TODO: Find out why. For now, don't show any text in that room. + if (g_sci->getGameId() == GID_SQ6 && g_sci->isDemo() && s->currentRoomNumber() == 100) return NULL_REG; return g_sci->_gfxText32->createTextBitmap(object, maxWidth, maxHeight); } -- cgit v1.2.3 From 85d87e834587517604872b52bc0a9877002d76b0 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Mon, 16 Jul 2012 21:20:01 +0100 Subject: CINE: Mark Operation Stealth as Unstable. Since the cine engine's support for Operation Stealth is still incomplete with significant GFX glitches, this should be marked as "ADGF_UNSTABLE" to warn users and prevent invalid bug reports. However, it should be noted that the game is completable. --- engines/cine/detection_tables.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/engines/cine/detection_tables.h b/engines/cine/detection_tables.h index 0ec2768bae..bf02f0519c 100644 --- a/engines/cine/detection_tables.h +++ b/engines/cine/detection_tables.h @@ -251,7 +251,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs00", "d6752e7d25924cb866b61eb7cb0c8b56"), Common::EN_GRB, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO0() }, GType_OS, @@ -267,7 +267,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs1", "9629129b86979fa592c1787385bf3695"), Common::EN_GRB, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO0() }, GType_OS, @@ -281,7 +281,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs1", "d8c3a9d05a63e4cfa801826a7063a126"), Common::EN_USA, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO0() }, GType_OS, @@ -295,7 +295,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs00", "862a75d76fb7fffec30e52be9ad1c474"), Common::EN_USA, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO0() }, GType_OS, @@ -309,7 +309,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs1", "39b91ae35d1297ce0a76a1a803ca1593"), Common::DE_DEU, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO0() }, GType_OS, @@ -323,7 +323,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs1", "74c2dabd9d212525fca8875a5f6d8994"), Common::ES_ESP, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO0() }, GType_OS, @@ -341,7 +341,7 @@ static const CINEGameDescription gameDescriptions[] = { }, Common::ES_ESP, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO0() }, GType_OS, @@ -355,7 +355,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs00", "f143567f08cfd1a9b1c9a41c89eadfef"), Common::FR_FRA, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO0() }, GType_OS, @@ -369,7 +369,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs1", "da066e6b8dd93f2502c2a3755f08dc12"), Common::IT_ITA, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO0() }, GType_OS, @@ -383,7 +383,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs0", "a9da5531ead0ebf9ad387fa588c0cbb0"), Common::EN_GRB, Common::kPlatformAmiga, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO1(GUIO_NOMIDI) }, GType_OS, @@ -397,7 +397,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs0", "8a429ced2f4acff8a15ae125174042e8"), Common::EN_GRB, Common::kPlatformAmiga, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO1(GUIO_NOMIDI) }, GType_OS, @@ -411,7 +411,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs0", "d5f27e33fc29c879f36f15b86ccfa58c"), Common::EN_USA, Common::kPlatformAmiga, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO1(GUIO_NOMIDI) }, GType_OS, @@ -425,7 +425,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs0", "8b7dce249821d3a62b314399c4334347"), Common::DE_DEU, Common::kPlatformAmiga, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO1(GUIO_NOMIDI) }, GType_OS, @@ -439,7 +439,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs0", "35fc295ddd0af9da932d256ba799a4b0"), Common::ES_ESP, Common::kPlatformAmiga, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO1(GUIO_NOMIDI) }, GType_OS, @@ -453,7 +453,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs0", "d4ea4a97e01fa67ea066f9e785050ed2"), Common::FR_FRA, Common::kPlatformAmiga, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO1(GUIO_NOMIDI) }, GType_OS, @@ -467,7 +467,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("demo", "8d3a750d1c840b1b1071e42f9e6f6aa2"), Common::EN_GRB, Common::kPlatformAmiga, - ADGF_DEMO, + ADGF_DEMO | ADGF_UNSTABLE, GUIO1(GUIO_NOMIDI) }, GType_OS, @@ -481,7 +481,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs0", "1501d5ae364b2814a33ed19347c3fcae"), Common::EN_GRB, Common::kPlatformAtariST, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO1(GUIO_NOMIDI) }, GType_OS, @@ -495,7 +495,7 @@ static const CINEGameDescription gameDescriptions[] = { AD_ENTRY1("procs0", "2148d25de3219dd4a36580ca735d0afa"), Common::FR_FRA, Common::kPlatformAtariST, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO1(GUIO_NOMIDI) }, GType_OS, -- cgit v1.2.3 From eba2ed99f8b8bf0d3aaf6a314ffbd9e196da8c8c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 17 Jul 2012 00:49:09 +0300 Subject: SCI: Bugfix for kCreateTextBitmap(). Fixes the ComPost text in the SQ6 demo --- engines/sci/engine/kgraphics32.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 093920e148..7cfac57675 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -39,6 +39,7 @@ #include "sci/graphics/cache.h" #include "sci/graphics/compare.h" #include "sci/graphics/controls16.h" +#include "sci/graphics/coordadjuster.h" #include "sci/graphics/cursor.h" #include "sci/graphics/palette.h" #include "sci/graphics/paint16.h" @@ -171,8 +172,9 @@ reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv) { debugC(kDebugLevelStrings, "kCreateTextBitmap case 0 (%04x:%04x, %04x:%04x, %04x:%04x)", PRINT_REG(argv[1]), PRINT_REG(argv[2]), PRINT_REG(argv[3])); debugC(kDebugLevelStrings, "%s", text.c_str()); - uint16 maxWidth = argv[1].toUint16(); // nsRight - nsLeft + 1 - uint16 maxHeight = argv[2].toUint16(); // nsBottom - nsTop + 1 + int16 maxWidth = argv[1].toUint16(); + int16 maxHeight = argv[2].toUint16(); + g_sci->_gfxCoordAdjuster->fromScriptToDisplay(maxHeight, maxWidth); // These values can be larger than the screen in the SQ6 demo, room 100 // TODO: Find out why. For now, don't show any text in that room. if (g_sci->getGameId() == GID_SQ6 && g_sci->isDemo() && s->currentRoomNumber() == 100) -- cgit v1.2.3 From 43d3b2f378220278f508bfcea89d1aea6decaf6e Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sat, 14 Jul 2012 16:55:14 -0400 Subject: LASTEXPRESS: Remove strange casts --- engines/lastexpress/data/font.cpp | 6 +++--- engines/lastexpress/game/inventory.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/lastexpress/data/font.cpp b/engines/lastexpress/data/font.cpp index 79cf64e617..8ac1afce9a 100644 --- a/engines/lastexpress/data/font.cpp +++ b/engines/lastexpress/data/font.cpp @@ -149,7 +149,7 @@ uint8 Font::getCharWidth(uint16 c) const{ uint16 Font::getStringWidth(Common::String str) const { uint16 width = 0; for (uint i = 0; i < str.size(); i++) - width += getCharWidth((unsigned) (int)str[i]); + width += getCharWidth((unsigned char)str[i]); return width; } @@ -185,8 +185,8 @@ void Font::drawChar(Graphics::Surface *surface, int16 x, int16 y, uint16 c) { Common::Rect Font::drawString(Graphics::Surface *surface, int16 x, int16 y, Common::String str) { int16 currentX = x; for (uint i = 0; i < str.size(); i++) { - drawChar(surface, currentX, y, (unsigned) (int)str[i]); - currentX += getCharWidth((unsigned) (int)str[i]); + drawChar(surface, currentX, y, (unsigned char)str[i]); + currentX += getCharWidth((unsigned char)str[i]); } return Common::Rect(x, y, x + currentX, y + (int16)_charHeight); diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp index bb382ea38e..70536b7a6d 100644 --- a/engines/lastexpress/game/inventory.cpp +++ b/engines/lastexpress/game/inventory.cpp @@ -259,7 +259,7 @@ void Inventory::handleMouseEvent(const Common::Event &ev) { // Change item highlight on list if (getFlags()->mouseLeftPressed) { - uint32 index = (unsigned) (int) ev.mouse.y / 40; + uint32 index = (uint16)ev.mouse.y / 40; if (_highlightedItemIndex && _highlightedItemIndex != index) drawHighlight(_highlightedItemIndex, true); -- cgit v1.2.3 From 9e64e62c08a9a170382bdeb394ad8ef39e0bb700 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sat, 14 Jul 2012 18:12:11 -0400 Subject: LASTEXPRESS: Comment unused variable --- engines/lastexpress/sound/queue.cpp | 4 ++-- engines/lastexpress/sound/queue.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/lastexpress/sound/queue.cpp b/engines/lastexpress/sound/queue.cpp index 5f3ab96d81..1fbb4138e3 100644 --- a/engines/lastexpress/sound/queue.cpp +++ b/engines/lastexpress/sound/queue.cpp @@ -38,7 +38,7 @@ SoundQueue::SoundQueue(LastExpressEngine *engine) : _engine(engine) { _subtitlesFlag = 0; _currentSubtitle = NULL; - _soundCacheData = NULL; + //_soundCacheData = NULL; } SoundQueue::~SoundQueue() { @@ -51,7 +51,7 @@ SoundQueue::~SoundQueue() { _subtitles.clear(); _currentSubtitle = NULL; - SAFE_DELETE(_soundCacheData); + //SAFE_DELETE(_soundCacheData); // Zero passed pointers _engine = NULL; diff --git a/engines/lastexpress/sound/queue.h b/engines/lastexpress/sound/queue.h index 75fe06883a..e1f9be1cf7 100644 --- a/engines/lastexpress/sound/queue.h +++ b/engines/lastexpress/sound/queue.h @@ -106,7 +106,7 @@ private: // Entries Common::List _soundList; ///< List of all sound entries - void *_soundCacheData; + //void *_soundCacheData; // Subtitles int _subtitlesFlag; -- cgit v1.2.3 From 876a8f9377b6c5533ca81c3c358e8b74014dc93f Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 15 Jul 2012 14:10:39 -0400 Subject: LASTEXPRESS: Replace COMPARTMENT_TO and COMPARTMENT_FROM_TO macros --- engines/lastexpress/entities/alouan.cpp | 8 ++-- engines/lastexpress/entities/entity.cpp | 68 ++++++++++++++++++++++++++++ engines/lastexpress/entities/entity.h | 51 +++++++++++++++++---- engines/lastexpress/entities/entity_intern.h | 60 ------------------------ engines/lastexpress/entities/hadija.cpp | 8 ++-- 5 files changed, 118 insertions(+), 77 deletions(-) diff --git a/engines/lastexpress/entities/alouan.cpp b/engines/lastexpress/entities/alouan.cpp index 3ae38dcf27..8e56ae4c5b 100644 --- a/engines/lastexpress/entities/alouan.cpp +++ b/engines/lastexpress/entities/alouan.cpp @@ -86,22 +86,22 @@ IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(6, Alouan, compartment6) - COMPARTMENT_TO(Alouan, kObjectCompartment6, kPosition_4070, "621Cf", "621Df"); + Entity::goToCompartment(savepoint, kObjectCompartment6, kPosition_4070, "621Cf", "621Df", WRAP_ENTER_FUNCTION(Alouan, setup_enterExitCompartment)); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(7, Alouan, compartment8) - COMPARTMENT_TO(Alouan, kObjectCompartment8, kPosition_2740, "621Ch", "621Dh"); + Entity::goToCompartment(savepoint, kObjectCompartment8, kPosition_2740, "621Ch", "621Dh", WRAP_ENTER_FUNCTION(Alouan, setup_enterExitCompartment)); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(8, Alouan, compartment6to8) - COMPARTMENT_FROM_TO(Alouan, kObjectCompartment6, kPosition_4070, "621Bf", kObjectCompartment8, kPosition_2740, "621Ah"); + Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment6, kPosition_4070, "621Bf", kObjectCompartment8, kPosition_2740, "621Ah", WRAP_ENTER_FUNCTION(Alouan, setup_enterExitCompartment), WRAP_UPDATE_FUNCTION(Alouan, setup_updateEntity)); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(9, Alouan, compartment8to6) - COMPARTMENT_FROM_TO(Alouan, kObjectCompartment8, kPosition_2740, "621Bh", kObjectCompartment6, kPosition_4070, "621Af"); + Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment8, kPosition_2740, "621Bh", kObjectCompartment6, kPosition_4070, "621Af", WRAP_ENTER_FUNCTION(Alouan, setup_enterExitCompartment), WRAP_UPDATE_FUNCTION(Alouan, setup_updateEntity)); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 7fdfd53d2f..776b9f6c40 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -464,6 +464,74 @@ void Entity::enterExitCompartment(const SavePoint &savepoint, EntityPosition pos } } +void Entity::goToCompartment(const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, Common::String sequenceTo, Entity::EnterFunction *enterFunction) { + switch (savepoint.action) { + default: + break; + + case kActionDefault: + getData()->entityPosition = positionFrom; + setCallback(1); + (*enterFunction)(sequenceFrom.c_str(), compartmentFrom); + break; + + case kActionCallback: + switch (getCallback()) { + default: + break; + + case 1: + setCallback(2); + (*enterFunction)(sequenceTo.c_str(), compartmentFrom); + break; + + case 2: + getData()->entityPosition = positionFrom; + getEntities()->clearSequences(_entityIndex); + callbackAction(); + break; + } + break; + } +} + +void Entity::goToCompartmentFromCompartment(const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, ObjectIndex compartmentTo, EntityPosition positionTo, Common::String sequenceTo, Entity::EnterFunction *enterFunction, Entity::UpdateFunction *updateFunction) { + switch (savepoint.action) { + default: + break; + + case kActionDefault: + getData()->entityPosition = positionFrom; + getData()->location = kLocationOutsideCompartment; + setCallback(1); + (*enterFunction)(sequenceFrom.c_str(), compartmentFrom); + break; + + case kActionCallback: + switch (getCallback()) { + default: + break; + + case 1: + setCallback(2); + (*updateFunction)(kCarGreenSleeping, positionTo); + break; + + case 2: + setCallback(3); + (*enterFunction)(sequenceTo.c_str(), compartmentTo); + break; + + case 3: + getData()->location = kLocationInsideCompartment; + getEntities()->clearSequences(_entityIndex); + callbackAction(); + break; + } + break; + } +} + void Entity::updatePosition(const SavePoint &savepoint, bool handleExcuseMe) { EXPOSE_PARAMS(EntityData::EntityParametersSIII) diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 3fd2009313..bb2b96618e 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -616,19 +616,19 @@ public: EntityParameters *getParameters(uint callback, byte index) const; EntityParameters *getCurrentParameters(byte index = 0) { return getParameters(_data.currentCall, index); } - int getCallback(uint callback) const; - int getCurrentCallback() { return getCallback(_data.currentCall); } - void setCallback(uint callback, byte index); - void setCurrentCallback(uint index) { setCallback(_data.currentCall, index); } + int getCallback(uint callback) const; + int getCurrentCallback() { return getCallback(_data.currentCall); } + void setCallback(uint callback, byte index); + void setCurrentCallback(uint index) { setCallback(_data.currentCall, index); } void updateParameters(uint32 index) const; // Serializable - void saveLoadWithSerializer(Common::Serializer &ser); + void saveLoadWithSerializer(Common::Serializer &ser); private: - EntityCallData _data; + EntityCallData _data; EntityCallParameters _parameters[9]; }; @@ -665,9 +665,15 @@ public: protected: LastExpressEngine *_engine; - EntityIndex _entityIndex; - EntityData *_data; - Common::Array _callbacks; + EntityIndex _entityIndex; + EntityData *_data; + Common::Array _callbacks; + + typedef Common::Functor2 EnterFunction; + typedef Common::Functor2 UpdateFunction; + + #define WRAP_ENTER_FUNCTION(className, method) new Common::Functor2Mem(this, &className::method) + #define WRAP_UPDATE_FUNCTION(className, method) new Common::Functor2Mem(this, &className::method) /** * Saves the game @@ -781,6 +787,33 @@ protected: */ void enterExitCompartment(const SavePoint &savepoint, EntityPosition position1 = kPositionNone, EntityPosition position2 = kPositionNone, CarIndex car = kCarNone, ObjectIndex compartment = kObjectNone, bool alternate = false, bool updateLocation = false); + /** + * Go to compartment. + * + * @param savepoint The savepoint. + * @param compartmentFrom The compartment from. + * @param positionFrom The position from. + * @param sequenceFrom The sequence from. + * @param sequenceTo The sequence to. + * @param enterFunction The enter/exit compartment function. + */ + void goToCompartment(const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, Common::String sequenceTo, EnterFunction *enterFunction); + + /** + * Go to compartment from compartment. + * + * @param savepoint The savepoint. + * @param compartmentFrom The compartment from. + * @param positionFrom The position from. + * @param sequenceFrom The sequence from. + * @param compartmentTo The compartment to. + * @param positionTo The position to. + * @param sequenceTo The sequence to. + * @param enterFunction The enter/exit compartment function. + * @param enterFunction The update entity function. + */ + void goToCompartmentFromCompartment(const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, ObjectIndex compartmentTo, EntityPosition positionTo, Common::String sequenceTo, Entity::EnterFunction *enterFunction, Entity::UpdateFunction *updateFunction); + /** * Updates the position * diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index c21f2c14e2..0613b7bb0b 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -451,66 +451,6 @@ void class::setup_##name() { \ if (!parameter) \ parameter = (uint)(type + value); -////////////////////////////////////////////////////////////////////////// -// Compartments -////////////////////////////////////////////////////////////////////////// -// Go from one compartment to another (or the same one if no optional args are passed -#define COMPARTMENT_TO(class, compartmentFrom, positionFrom, sequenceFrom, sequenceTo) \ - switch (savepoint.action) { \ - default: \ - break; \ - case kActionDefault: \ - getData()->entityPosition = positionFrom; \ - setCallback(1); \ - setup_enterExitCompartment(sequenceFrom, compartmentFrom); \ - break; \ - case kActionCallback: \ - switch (getCallback()) { \ - default: \ - break; \ - case 1: \ - setCallback(2); \ - setup_enterExitCompartment(sequenceTo, compartmentFrom); \ - break; \ - case 2: \ - getData()->entityPosition = positionFrom; \ - getEntities()->clearSequences(_entityIndex); \ - callbackAction(); \ - } \ - break; \ - } - -#define COMPARTMENT_FROM_TO(class, compartmentFrom, positionFrom, sequenceFrom, compartmentTo, positionTo, sequenceTo) \ - switch (savepoint.action) { \ - default: \ - break; \ - case kActionDefault: \ - getData()->entityPosition = positionFrom; \ - getData()->location = kLocationOutsideCompartment; \ - setCallback(1); \ - setup_enterExitCompartment(sequenceFrom, compartmentFrom); \ - break; \ - case kActionCallback: \ - switch (getCallback()) { \ - default: \ - break; \ - case 1: \ - setCallback(2); \ - setup_updateEntity(kCarGreenSleeping, positionTo); \ - break; \ - case 2: \ - setCallback(3); \ - setup_enterExitCompartment(sequenceTo, compartmentTo); \ - break; \ - case 3: \ - getData()->location = kLocationInsideCompartment; \ - getEntities()->clearSequences(_entityIndex); \ - callbackAction(); \ - break; \ - } \ - break; \ - } - } // End of namespace LastExpress #endif // LASTEXPRESS_ENTITY_INTERN_H diff --git a/engines/lastexpress/entities/hadija.cpp b/engines/lastexpress/entities/hadija.cpp index 09c80247d4..2dd239d4c9 100644 --- a/engines/lastexpress/entities/hadija.cpp +++ b/engines/lastexpress/entities/hadija.cpp @@ -86,22 +86,22 @@ IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(6, Hadija, compartment6) - COMPARTMENT_TO(Hadija, kObjectCompartment6, kPosition_4070, "619Cf", "619Df"); + Entity::goToCompartment(savepoint, kObjectCompartment6, kPosition_4070, "619Cf", "619Df", WRAP_ENTER_FUNCTION(Hadija, setup_enterExitCompartment)); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(7, Hadija, compartment8) - COMPARTMENT_TO(Hadija, kObjectCompartment8, kPosition_2740, "619Ch", "619Dh"); + Entity::goToCompartment(savepoint, kObjectCompartment8, kPosition_2740, "619Ch", "619Dh", WRAP_ENTER_FUNCTION(Hadija, setup_enterExitCompartment)); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(8, Hadija, compartment6to8) - COMPARTMENT_FROM_TO(Hadija, kObjectCompartment6, kPosition_4070, "619Bf", kObjectCompartment8, kPosition_2740, "619Ah"); + Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment6, kPosition_4070, "619Bf", kObjectCompartment8, kPosition_2740, "619Ah", WRAP_ENTER_FUNCTION(Hadija, setup_enterExitCompartment), WRAP_UPDATE_FUNCTION(Hadija, setup_updateEntity)); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(9, Hadija, compartment8to6) - COMPARTMENT_FROM_TO(Hadija, kObjectCompartment8, kPosition_2740, "619Bh", kObjectCompartment6, kPosition_4070, "619Af"); + Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment8, kPosition_2740, "619Bh", kObjectCompartment6, kPosition_4070, "619Af", WRAP_ENTER_FUNCTION(Hadija, setup_enterExitCompartment), WRAP_UPDATE_FUNCTION(Hadija, setup_updateEntity)); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 96d0aedba93e4ba2691a5ee1eba24a1f07539c96 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 15 Jul 2012 17:21:36 -0400 Subject: LASTEXPRESS: Replace SAVEGAME_BLOOD_JACKET macro by function --- engines/lastexpress/entities/coudert.cpp | 39 ++++++++++++++++---------------- engines/lastexpress/entities/coudert.h | 1 + 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp index dc7beb3167..66733acc16 100644 --- a/engines/lastexpress/entities/coudert.cpp +++ b/engines/lastexpress/entities/coudert.cpp @@ -37,15 +37,6 @@ namespace LastExpress { -#define SAVEGAME_BLOOD_JACKET() \ - if (getProgress().jacket == kJacketBlood \ - && getEntities()->isDistanceBetweenEntities(kEntityCoudert, kEntityPlayer, 1000) \ - && !getEntities()->isInsideCompartments(kEntityPlayer) \ - && !getEntities()->checkFields10(kEntityPlayer)) { \ - setCallback(1); \ - setup_savegame(kSavegameTypeEvent, kEventMertensBloodJacket); \ - } - Coudert::Coudert(LastExpressEngine *engine) : Entity(engine, kEntityCoudert) { ADD_CALLBACK_FUNCTION(Coudert, reset); ADD_CALLBACK_FUNCTION(Coudert, bloodJacket); @@ -124,7 +115,7 @@ IMPLEMENT_FUNCTION_S(2, Coudert, bloodJacket) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + savegameBloodJacket(); break; case kActionExitCompartment: @@ -151,7 +142,7 @@ IMPLEMENT_FUNCTION_SI(3, Coudert, enterExitCompartment, ObjectIndex) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + savegameBloodJacket(); return; case kActionCallback: @@ -177,7 +168,7 @@ IMPLEMENT_FUNCTION(4, Coudert, callbackActionOnDirection) break; } - SAVEGAME_BLOOD_JACKET(); + savegameBloodJacket(); break; case kActionExitCompartment: @@ -200,7 +191,7 @@ IMPLEMENT_FUNCTION_SIII(5, Coudert, enterExitCompartment2, ObjectIndex, EntityPo break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + savegameBloodJacket(); return; case kActionCallback: @@ -221,7 +212,7 @@ IMPLEMENT_FUNCTION_S(6, Coudert, playSound) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + savegameBloodJacket(); break; case kActionEndSound: @@ -250,7 +241,7 @@ IMPLEMENT_FUNCTION_NOSETUP(7, Coudert, playSound16) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + savegameBloodJacket(); break; case kActionEndSound: @@ -363,7 +354,7 @@ IMPLEMENT_FUNCTION_I(10, Coudert, updateFromTime, uint32) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + savegameBloodJacket(); UPDATE_PARAM(params->param2, getState()->time, params->param1); @@ -386,7 +377,7 @@ IMPLEMENT_FUNCTION_I(11, Coudert, updateFromTicks, uint32) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + savegameBloodJacket(); UPDATE_PARAM(params->param2, getState()->timeTicks, params->param1); @@ -460,7 +451,7 @@ IMPLEMENT_FUNCTION_II(13, Coudert, function13, bool, EntityIndex) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + savegameBloodJacket(); if (!params->param2 && !params->param3) { @@ -582,7 +573,7 @@ IMPLEMENT_FUNCTION_I(14, Coudert, function14, EntityIndex) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + savegameBloodJacket(); break; case kActionDefault: @@ -4173,4 +4164,14 @@ void Coudert::visitCompartment(const SavePoint &savepoint, EntityPosition positi } } +void Coudert::savegameBloodJacket() { + if (getProgress().jacket == kJacketBlood + && getEntities()->isDistanceBetweenEntities(kEntityCoudert, kEntityPlayer, 1000) + && !getEntities()->isInsideCompartments(kEntityPlayer) + && !getEntities()->checkFields10(kEntityPlayer)) { + setCallback(1); + setup_savegame(kSavegameTypeEvent, kEventMertensBloodJacket); + } +} + } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/coudert.h b/engines/lastexpress/entities/coudert.h index 45d13ce9bb..d06bb95ce9 100644 --- a/engines/lastexpress/entities/coudert.h +++ b/engines/lastexpress/entities/coudert.h @@ -219,6 +219,7 @@ public: private: void visitCompartment(const SavePoint &savepoint, EntityPosition position, const char *seq1, ObjectIndex compartment, const char *seq2, const char *seq3, EntityPosition sittingPosition, ObjectIndex object, const char *seq4); + void savegameBloodJacket(); }; } // End of namespace LastExpress -- cgit v1.2.3 From d4f7c0232380b94b42d280c3680e473cd0c2d9b5 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 15 Jul 2012 19:24:11 -0400 Subject: LASTEXPRESS: Replace PLAY_STEAM macro by function --- engines/lastexpress/entities/chapters.cpp | 40 +++++++++++++++---------------- engines/lastexpress/entities/chapters.h | 1 + 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp index eab4dfe2c1..b4978165b9 100644 --- a/engines/lastexpress/entities/chapters.cpp +++ b/engines/lastexpress/entities/chapters.cpp @@ -384,12 +384,6 @@ IMPLEMENT_FUNCTION(7, Chapters, chapter1Init) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -#define PLAY_STEAM() { \ - getSoundQueue()->resetState(); \ - getSound()->playSteam((CityIndex)ENTITY_PARAM(0, 4)); \ - ENTITY_PARAM(0, 2) = 0; \ - } - IMPLEMENT_FUNCTION(8, Chapters, chapter1Handler) switch (savepoint.action) { default: @@ -522,43 +516,43 @@ label_chapter1_next: getSavePoints()->push(kEntityChapters, kEntityTrain, kActionTrainStopRunning); if (getEntityData(kEntityPlayer)->location != kLocationOutsideTrain) { - PLAY_STEAM(); + playSteam(); break; } if (getEntities()->isOutsideAlexeiWindow()) { getScenes()->loadSceneFromPosition(kCarGreenSleeping, 49); - PLAY_STEAM(); + playSteam(); break; } if (getEntities()->isOutsideAnnaWindow()) { getScenes()->loadSceneFromPosition(kCarRedSleeping, 49); - PLAY_STEAM(); + playSteam(); break; } CarIndex car = getEntityData(kEntityPlayer)->car; if (car < kCarRedSleeping || car > kCarCoalTender) { if (car < kCarBaggageRear || car > kCarGreenSleeping) { - PLAY_STEAM(); + playSteam(); break; } if (getEntities()->isPlayerPosition(kCarGreenSleeping, 98)) { getSound()->playSound(kEntityPlayer, "LIB015"); getScenes()->loadSceneFromPosition(kCarGreenSleeping, 71); - PLAY_STEAM(); + playSteam(); break; } getScenes()->loadSceneFromPosition(kCarGreenSleeping, 82); - PLAY_STEAM(); + playSteam(); break; } getScenes()->loadSceneFromPosition(kCarRestaurant, 82); - PLAY_STEAM(); + playSteam(); break; } @@ -1278,43 +1272,43 @@ label_callback_4: getSavePoints()->push(kEntityChapters, kEntityTrain, kActionTrainStopRunning); if (getEntityData(kEntityPlayer)->location != kLocationOutsideTrain) { - PLAY_STEAM(); + playSteam(); break; } if (getEntities()->isOutsideAlexeiWindow()) { getScenes()->loadSceneFromPosition(kCarGreenSleeping, 49); - PLAY_STEAM(); + playSteam(); break; } if (getEntities()->isOutsideAnnaWindow()) { getScenes()->loadSceneFromPosition(kCarRedSleeping, 49); - PLAY_STEAM(); + playSteam(); break; } CarIndex car = getEntityData(kEntityPlayer)->car; if (car < kCarRedSleeping || car > kCarCoalTender) { if (car < kCarBaggageRear || car > kCarGreenSleeping) { - PLAY_STEAM(); + playSteam(); break; } if (getEntities()->isPlayerPosition(kCarGreenSleeping, 98)) { getSound()->playSound(kEntityPlayer, "LIB015"); getScenes()->loadSceneFromPosition(kCarGreenSleeping, 71); - PLAY_STEAM(); + playSteam(); break; } getScenes()->loadSceneFromPosition(kCarGreenSleeping, 82); - PLAY_STEAM(); + playSteam(); break; } getScenes()->loadSceneFromPosition(kCarRestaurant, 82); - PLAY_STEAM(); + playSteam(); break; } @@ -1816,4 +1810,10 @@ void Chapters::enterExitHelper(bool isEnteringStation) { callbackAction(); } +void Chapters::playSteam() { + getSoundQueue()->resetState(); + getSound()->playSteam((CityIndex)ENTITY_PARAM(0, 4)); + ENTITY_PARAM(0, 2) = 0; +} + } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/chapters.h b/engines/lastexpress/entities/chapters.h index 353d3a6b5b..62b8af9270 100644 --- a/engines/lastexpress/entities/chapters.h +++ b/engines/lastexpress/entities/chapters.h @@ -156,6 +156,7 @@ public: private: void enterExitStation(const SavePoint &savepoint, bool isEnteringStation); void enterExitHelper(bool isEnteringStation); + void playSteam(); }; } // End of namespace LastExpress -- cgit v1.2.3 From 132dd5b4bc236f805babe0187797ef03bbb16310 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 15 Jul 2012 19:25:16 -0400 Subject: LASTEXPRESS: Replace SYNC_STRING macro by function --- engines/lastexpress/entities/entity.cpp | 29 +++++++++++++++-------------- engines/lastexpress/entities/entity.h | 9 +++++++++ 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 776b9f6c40..120c1f2d85 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -51,6 +51,17 @@ EntityData::EntityCallData::~EntityCallData() { SAFE_DELETE(sequence3); } +void EntityData::EntityCallData::syncString(Common::Serializer &s, Common::String &string, int length) { + char seqName[13]; + memset(&seqName, 0, length); + + if (s.isSaving()) strcpy((char *)&seqName, string.c_str()); + s.syncBytes((byte *)&seqName, length); + + if (s.isLoading()) + string = seqName; +} + void EntityData::EntityCallData::saveLoadWithSerializer(Common::Serializer &s) { for (uint i = 0; i < ARRAYSIZE(callbacks); i++) s.syncAsByte(callbacks[i]); @@ -77,20 +88,10 @@ void EntityData::EntityCallData::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsByte(directionSwitch); // Sync strings -#define SYNC_STRING(varName, count) { \ - char seqName[13]; \ - memset(&seqName, 0, count); \ - if (s.isSaving()) strcpy((char *)&seqName, varName.c_str()); \ - s.syncBytes((byte *)&seqName, count); \ - if (s.isLoading()) varName = seqName; \ -} - - SYNC_STRING(sequenceName, 13); - SYNC_STRING(sequenceName2, 13); - SYNC_STRING(sequenceNamePrefix, 7); - SYNC_STRING(sequenceNameCopy, 13); - -#undef SYNC_STRING + syncString(s, sequenceName, 13); + syncString(s, sequenceName2, 13); + syncString(s, sequenceNamePrefix, 7); + syncString(s, sequenceNameCopy, 13); // Skip pointers to frame & sequences s.skip(5 * 4); diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index bb2b96618e..4dca5424b1 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -596,6 +596,15 @@ public: return str; } + /** + * Synchronizes a string. + * + * @param s The Common::Serializer to use. + * @param string The string. + * @param length Length of the string. + */ + void syncString(Common::Serializer &s, Common::String &string, int length); + // Serializable void saveLoadWithSerializer(Common::Serializer &s); }; -- cgit v1.2.3 From e517c1199a0a187d865fbf22ce964a7dad069eb9 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 15 Jul 2012 19:26:35 -0400 Subject: LASTEXPRESS: Move LOW_BYTE macro to helpers.h --- engines/lastexpress/entities/entity_intern.h | 2 -- engines/lastexpress/helpers.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 0613b7bb0b..c622ff9f0e 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -25,8 +25,6 @@ namespace LastExpress { -#define LOW_BYTE(w) ((unsigned char)(((unsigned long)(w)) & 0xff)) - ////////////////////////////////////////////////////////////////////////// // Callbacks #define ENTITY_CALLBACK(class, name, pointer) \ diff --git a/engines/lastexpress/helpers.h b/engines/lastexpress/helpers.h index 7f3f1e246c..02454be13d 100644 --- a/engines/lastexpress/helpers.h +++ b/engines/lastexpress/helpers.h @@ -27,6 +27,8 @@ // Misc helpers ////////////////////////////////////////////////////////////////////////// +#define LOW_BYTE(w) ((unsigned char)(((unsigned long)(w)) & 0xff)) + // Misc #define getArchive(name) _engine->getResourceManager()->getFileStream(name) #define rnd(value) _engine->getRandom().getRandomNumber(value - 1) -- cgit v1.2.3 From 3d1b7b2d962ac37d8fb706ac8b884d3e560f97b5 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 15 Jul 2012 22:36:29 -0400 Subject: LASTEXPRESS: Merge the two savegameBloodJacket functions into the base Entity class --- engines/lastexpress/entities/coudert.cpp | 30 ++++++++++-------------------- engines/lastexpress/entities/coudert.h | 1 - engines/lastexpress/entities/entity.cpp | 22 ++++++++++++++++++++++ engines/lastexpress/entities/entity.h | 7 +++++++ engines/lastexpress/entities/entity39.h | 2 +- engines/lastexpress/entities/mertens.cpp | 28 ++++++++++------------------ engines/lastexpress/entities/mertens.h | 3 +++ 7 files changed, 53 insertions(+), 40 deletions(-) diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp index 66733acc16..eea9dda718 100644 --- a/engines/lastexpress/entities/coudert.cpp +++ b/engines/lastexpress/entities/coudert.cpp @@ -115,7 +115,7 @@ IMPLEMENT_FUNCTION_S(2, Coudert, bloodJacket) break; case kActionNone: - savegameBloodJacket(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); break; case kActionExitCompartment: @@ -142,7 +142,7 @@ IMPLEMENT_FUNCTION_SI(3, Coudert, enterExitCompartment, ObjectIndex) break; case kActionNone: - savegameBloodJacket(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); return; case kActionCallback: @@ -168,7 +168,7 @@ IMPLEMENT_FUNCTION(4, Coudert, callbackActionOnDirection) break; } - savegameBloodJacket(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); break; case kActionExitCompartment: @@ -191,7 +191,7 @@ IMPLEMENT_FUNCTION_SIII(5, Coudert, enterExitCompartment2, ObjectIndex, EntityPo break; case kActionNone: - savegameBloodJacket(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); return; case kActionCallback: @@ -212,7 +212,7 @@ IMPLEMENT_FUNCTION_S(6, Coudert, playSound) break; case kActionNone: - savegameBloodJacket(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); break; case kActionEndSound: @@ -241,7 +241,7 @@ IMPLEMENT_FUNCTION_NOSETUP(7, Coudert, playSound16) break; case kActionNone: - savegameBloodJacket(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); break; case kActionEndSound: @@ -354,7 +354,7 @@ IMPLEMENT_FUNCTION_I(10, Coudert, updateFromTime, uint32) break; case kActionNone: - savegameBloodJacket(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); UPDATE_PARAM(params->param2, getState()->time, params->param1); @@ -377,7 +377,7 @@ IMPLEMENT_FUNCTION_I(11, Coudert, updateFromTicks, uint32) break; case kActionNone: - savegameBloodJacket(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); UPDATE_PARAM(params->param2, getState()->timeTicks, params->param1); @@ -451,7 +451,7 @@ IMPLEMENT_FUNCTION_II(13, Coudert, function13, bool, EntityIndex) break; case kActionNone: - savegameBloodJacket(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); if (!params->param2 && !params->param3) { @@ -573,7 +573,7 @@ IMPLEMENT_FUNCTION_I(14, Coudert, function14, EntityIndex) break; case kActionNone: - savegameBloodJacket(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); break; case kActionDefault: @@ -4164,14 +4164,4 @@ void Coudert::visitCompartment(const SavePoint &savepoint, EntityPosition positi } } -void Coudert::savegameBloodJacket() { - if (getProgress().jacket == kJacketBlood - && getEntities()->isDistanceBetweenEntities(kEntityCoudert, kEntityPlayer, 1000) - && !getEntities()->isInsideCompartments(kEntityPlayer) - && !getEntities()->checkFields10(kEntityPlayer)) { - setCallback(1); - setup_savegame(kSavegameTypeEvent, kEventMertensBloodJacket); - } -} - } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/coudert.h b/engines/lastexpress/entities/coudert.h index d06bb95ce9..45d13ce9bb 100644 --- a/engines/lastexpress/entities/coudert.h +++ b/engines/lastexpress/entities/coudert.h @@ -219,7 +219,6 @@ public: private: void visitCompartment(const SavePoint &savepoint, EntityPosition position, const char *seq1, ObjectIndex compartment, const char *seq2, const char *seq3, EntityPosition sittingPosition, ObjectIndex object, const char *seq4); - void savegameBloodJacket(); }; } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 120c1f2d85..a412dc9b65 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -253,6 +253,28 @@ void Entity::savegame(const SavePoint &savepoint) { } } +void Entity::savegameBloodJacket(SaveFunction *savegame) { + if (getProgress().jacket == kJacketBlood + && getEntities()->isDistanceBetweenEntities(_entityIndex, kEntityPlayer, 1000) + && !getEntities()->isInsideCompartments(kEntityPlayer) + && !getEntities()->checkFields10(kEntityPlayer)) { + setCallback(1); + + switch (_entityIndex) { + default: + break; + + case kEntityCoudert: + (*savegame)(kSavegameTypeEvent, kEventCoudertBloodJacket); + break; + + case kEntityMertens: + (*savegame)(kSavegameTypeEvent, kEventCoudertBloodJacket); + break; + } + } +} + void Entity::playSound(const SavePoint &savepoint, bool resetItem, SoundFlag flag) { EXPOSE_PARAMS(EntityData::EntityParametersSIIS) diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 4dca5424b1..01a19553ec 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -680,9 +680,11 @@ protected: typedef Common::Functor2 EnterFunction; typedef Common::Functor2 UpdateFunction; + typedef Common::Functor2 SaveFunction; #define WRAP_ENTER_FUNCTION(className, method) new Common::Functor2Mem(this, &className::method) #define WRAP_UPDATE_FUNCTION(className, method) new Common::Functor2Mem(this, &className::method) + #define WRAP_SAVE_FUNCTION(className, method) new Common::Functor2Mem(this, &className::method) /** * Saves the game @@ -693,6 +695,11 @@ protected: */ void savegame(const SavePoint &savepoint); + /** + * Saves the game before being found out with a blood covered jacket + */ + void savegameBloodJacket(SaveFunction *savegame); + /** * Play sound * diff --git a/engines/lastexpress/entities/entity39.h b/engines/lastexpress/entities/entity39.h index 4335a9566e..148bca5c33 100644 --- a/engines/lastexpress/entities/entity39.h +++ b/engines/lastexpress/entities/entity39.h @@ -72,4 +72,4 @@ private: } // End of namespace LastExpress -#endif // LASTEXPRESS_##define##_H +#endif // LASTEXPRESS_ENTITY39_H diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp index 5672fe4d49..dd69aea2a6 100644 --- a/engines/lastexpress/entities/mertens.cpp +++ b/engines/lastexpress/entities/mertens.cpp @@ -37,14 +37,6 @@ namespace LastExpress { -#define SAVEGAME_BLOOD_JACKET() \ - if (getProgress().jacket == kJacketBlood \ - && getEntities()->isDistanceBetweenEntities(kEntityMertens, kEntityPlayer, 1000) \ - && !getEntities()->isInsideCompartments(kEntityPlayer) \ - && !getEntities()->checkFields10(kEntityPlayer)) { \ - setCallback(1); \ - setup_savegame(kSavegameTypeEvent, kEventMertensBloodJacket); \ - } Mertens::Mertens(LastExpressEngine *engine) : Entity(engine, kEntityMertens) { ADD_CALLBACK_FUNCTION(Mertens, reset); @@ -115,7 +107,7 @@ IMPLEMENT_FUNCTION_S(2, Mertens, bloodJacket) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); break; case kActionExitCompartment: @@ -142,7 +134,7 @@ IMPLEMENT_FUNCTION_SI(3, Mertens, enterExitCompartment, ObjectIndex) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); return; case kActionCallback: @@ -163,7 +155,7 @@ IMPLEMENT_FUNCTION_SI(4, Mertens, enterExitCompartment2, ObjectIndex) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); return; case kAction4: @@ -189,7 +181,7 @@ IMPLEMENT_FUNCTION_SIII(5, Mertens, enterExitCompartment3, ObjectIndex, EntityPo break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); break; case kActionExitCompartment: @@ -231,7 +223,7 @@ IMPLEMENT_FUNCTION(6, Mertens, callbackActionOnDirection) break; } - SAVEGAME_BLOOD_JACKET(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); break; case kActionExitCompartment: @@ -254,7 +246,7 @@ IMPLEMENT_FUNCTION_S(7, Mertens, playSound) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); break; case kActionEndSound: @@ -281,7 +273,7 @@ IMPLEMENT_FUNCTION_S(8, Mertens, playSound16) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); break; case kActionEndSound: @@ -480,7 +472,7 @@ IMPLEMENT_FUNCTION_I(11, Mertens, function11, uint32) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); UPDATE_PARAM(params->param2, getState()->time, params->param1) @@ -548,7 +540,7 @@ IMPLEMENT_FUNCTION_II(13, Mertens, function13, bool, bool) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); if (!params->param2 && !params->param3) { UPDATE_PARAM_PROC(params->param4, getState()->timeTicks, 75) @@ -670,7 +662,7 @@ IMPLEMENT_FUNCTION_I(14, Mertens, function14, EntityIndex) break; case kActionNone: - SAVEGAME_BLOOD_JACKET(); + Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/mertens.h b/engines/lastexpress/entities/mertens.h index 31b7a97dcd..55c2a76140 100644 --- a/engines/lastexpress/entities/mertens.h +++ b/engines/lastexpress/entities/mertens.h @@ -210,6 +210,9 @@ public: DECLARE_FUNCTION(function53) DECLARE_NULL_FUNCTION() + +private: + void loadSceneFromPosition(); }; } // End of namespace LastExpress -- cgit v1.2.3 From 2b116592cb5654656d2b8118e1a3674e195bb00e Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 15 Jul 2012 22:39:26 -0400 Subject: LASTEXPRESS: Remove LOADSCENE_FROM_POSITION macro --- engines/lastexpress/entities/mertens.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp index dd69aea2a6..517ff76362 100644 --- a/engines/lastexpress/entities/mertens.cpp +++ b/engines/lastexpress/entities/mertens.cpp @@ -300,14 +300,6 @@ IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION_II(10, Mertens, updateEntity, CarIndex, EntityPosition) - -#define LOADSCENE_FROM_POSITION() \ - if (getData()->direction != kDirectionUp) { \ - getEntities()->loadSceneFromEntityPosition(getData()->car, (EntityPosition)(getData()->entityPosition + 750)); \ - } else { \ - getEntities()->loadSceneFromEntityPosition(getData()->car, (EntityPosition)(getData()->entityPosition - 750), true); \ - } - switch (savepoint.action) { default: break; @@ -406,7 +398,7 @@ IMPLEMENT_FUNCTION_II(10, Mertens, updateEntity, CarIndex, EntityPosition) ENTITY_PARAM(0, 7) = 0; if (params->param1 != 3 || (params->param2 != kPosition_8200 && params->param2 != kPosition_9510)) { - LOADSCENE_FROM_POSITION(); + loadSceneFromPosition(); break; } @@ -438,31 +430,29 @@ IMPLEMENT_FUNCTION_II(10, Mertens, updateEntity, CarIndex, EntityPosition) break; } - LOADSCENE_FROM_POSITION(); + loadSceneFromPosition(); break; case 4: getAction()->playAnimation(kEventMertensKronosConcertInvitation); ENTITY_PARAM(2, 4) = 0; - LOADSCENE_FROM_POSITION(); + loadSceneFromPosition(); break; case 5: getAction()->playAnimation(getData()->entityPosition < getEntityData(kEntityPlayer)->entityPosition ? kEventMertensAskTylerCompartmentD : kEventMertensAskTylerCompartment); - LOADSCENE_FROM_POSITION(); + loadSceneFromPosition(); break; case 6: getAction()->playAnimation(kEventMertensDontMakeBed); - LOADSCENE_FROM_POSITION(); + loadSceneFromPosition(); ENTITY_PARAM(0, 4) = 0; break; } break; } - -#undef LOADSCENE_FROM_POSITION IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// @@ -4098,4 +4088,15 @@ IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_NULL_FUNCTION(54, Mertens) +////////////////////////////////////////////////////////////////////////// +// Helper functions +////////////////////////////////////////////////////////////////////////// + +void Mertens::loadSceneFromPosition() { + if (getData()->direction != kDirectionUp) + getEntities()->loadSceneFromEntityPosition(getData()->car, (EntityPosition)(getData()->entityPosition + 750)); + else + getEntities()->loadSceneFromEntityPosition(getData()->car, (EntityPosition)(getData()->entityPosition - 750), true); +} + } // End of namespace LastExpress -- cgit v1.2.3 From 04a181a787befb9ef5bc2a3d524f622a5fcfaeeb Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 15 Jul 2012 22:48:00 -0400 Subject: LASTEXPRESS: Replace 2 macros in Sophie entity implementation --- engines/lastexpress/entities/sophie.cpp | 68 ++++++++++++++++++--------------- engines/lastexpress/entities/sophie.h | 4 ++ 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/engines/lastexpress/entities/sophie.cpp b/engines/lastexpress/entities/sophie.cpp index c2f25b7eb1..10c414763c 100644 --- a/engines/lastexpress/entities/sophie.cpp +++ b/engines/lastexpress/entities/sophie.cpp @@ -31,31 +31,6 @@ namespace LastExpress { -#define CHAPTER_IMPLEMENTATION() \ - switch (savepoint.action) { \ - default: \ - break; \ - case kActionNone: \ - setup_chaptersHandler(); \ - break; \ - case kActionDefault: \ - getEntities()->clearSequences(kEntitySophie); \ - getData()->entityPosition = kPosition_4840; \ - getData()->location = kLocationInsideCompartment; \ - getData()->car = kCarRedSleeping; \ - getData()->clothes = kClothesDefault; \ - getData()->inventoryItem = kItemNone; \ - break; \ - } - -#define DEFAULT_ACTION_IMPLEMENTATION() \ - if (savepoint.action == kActionDefault) { \ - getData()->entityPosition = kPosition_4840; \ - getData()->location = kLocationInsideCompartment; \ - getData()->car = kCarRedSleeping; \ - getEntities()->clearSequences(kEntitySophie); \ - } - Sophie::Sophie(LastExpressEngine *engine) : Entity(engine, kEntitySophie) { ADD_CALLBACK_FUNCTION(Sophie, reset); ADD_CALLBACK_FUNCTION(Sophie, updateEntity); @@ -217,27 +192,27 @@ IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(5, Sophie, function5) - DEFAULT_ACTION_IMPLEMENTATION() + handleAction(savepoint); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(6, Sophie, chapter2) - CHAPTER_IMPLEMENTATION() + handleChapter(savepoint); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(7, Sophie, chapter3) - CHAPTER_IMPLEMENTATION() + handleChapter(savepoint); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(8, Sophie, chapter4) - CHAPTER_IMPLEMENTATION() + handleChapter(savepoint); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(9, Sophie, function9) - DEFAULT_ACTION_IMPLEMENTATION() + handleAction(savepoint); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// @@ -271,4 +246,37 @@ IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_NULL_FUNCTION(12, Sophie) +////////////////////////////////////////////////////////////////////////// +// Helpers functions +////////////////////////////////////////////////////////////////////////// + +void Sophie::handleAction(const SavePoint &savepoint) { + if (savepoint.action == kActionDefault) { + getData()->entityPosition = kPosition_4840; + getData()->location = kLocationInsideCompartment; + getData()->car = kCarRedSleeping; + getEntities()->clearSequences(kEntitySophie); + } +} + +void Sophie::handleChapter(const SavePoint &savepoint) { + switch (savepoint.action) { + default: + break; + + case kActionNone: + setup_chaptersHandler(); + break; + + case kActionDefault: + getEntities()->clearSequences(kEntitySophie); + getData()->entityPosition = kPosition_4840; + getData()->location = kLocationInsideCompartment; + getData()->car = kCarRedSleeping; + getData()->clothes = kClothesDefault; + getData()->inventoryItem = kItemNone; + break; + } +} + } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/sophie.h b/engines/lastexpress/entities/sophie.h index c2ca348027..47cfa8065c 100644 --- a/engines/lastexpress/entities/sophie.h +++ b/engines/lastexpress/entities/sophie.h @@ -88,6 +88,10 @@ public: DECLARE_FUNCTION(chapter5Handler) DECLARE_NULL_FUNCTION() + +private: + void handleAction(const SavePoint &savepoint); + void handleChapter(const SavePoint &savepoint); }; } // End of namespace LastExpress -- cgit v1.2.3 From 3cf7e8ccf347fd57a82eb5df39ac4941a4f6c2b1 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Mon, 16 Jul 2012 23:14:14 -0400 Subject: LASTEXPRESS: Replace INCREMENT_DIRECTION_COUNTER macro --- engines/lastexpress/game/entities.cpp | 19 ++++++++++--------- engines/lastexpress/game/entities.h | 1 + 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp index f2201ac9a7..4cdefcd334 100644 --- a/engines/lastexpress/game/entities.cpp +++ b/engines/lastexpress/game/entities.cpp @@ -669,11 +669,12 @@ void Entities::executeCallbacks() { ////////////////////////////////////////////////////////////////////////// // Processing ////////////////////////////////////////////////////////////////////////// -#define INCREMENT_DIRECTION_COUNTER() { \ - data->doProcessEntity = false; \ - if (data->direction == kDirectionRight || (data->direction == kDirectionSwitch && data->directionSwitch == kDirectionRight)) \ - ++data->field_4A1; \ - } +void Entities::incrementDirectionCounter(EntityData::EntityCallData *data) { + data->doProcessEntity = false; + + if (data->direction == kDirectionRight || (data->direction == kDirectionSwitch && data->directionSwitch == kDirectionRight)) + ++data->field_4A1; +} void Entities::processEntity(EntityIndex entityIndex) { EntityData::EntityCallData *data = getData(entityIndex); @@ -692,7 +693,7 @@ void Entities::processEntity(EntityIndex entityIndex) { getScenes()->removeAndRedraw(&data->frame, false); getScenes()->removeAndRedraw(&data->frame1, false); - INCREMENT_DIRECTION_COUNTER(); + incrementDirectionCounter(data); return; } @@ -722,7 +723,7 @@ label_nosequence: processFrame(entityIndex, false, true); if (!getFlags()->flag_entities_0 && !data->doProcessEntity) { - INCREMENT_DIRECTION_COUNTER(); + incrementDirectionCounter(data); return; } } else { @@ -740,7 +741,7 @@ label_nosequence: data->position = 0; } - INCREMENT_DIRECTION_COUNTER(); + incrementDirectionCounter(data); } return; } @@ -789,7 +790,7 @@ label_nosequence: } } - INCREMENT_DIRECTION_COUNTER(); + incrementDirectionCounter(data); } void Entities::computeCurrentFrame(EntityIndex entityIndex) const { diff --git a/engines/lastexpress/game/entities.h b/engines/lastexpress/game/entities.h index eb5eae461f..a9de7931f0 100644 --- a/engines/lastexpress/game/entities.h +++ b/engines/lastexpress/game/entities.h @@ -344,6 +344,7 @@ private: uint _positions[_positionsCount]; void executeCallbacks(); + void incrementDirectionCounter(EntityData::EntityCallData *data); void processEntity(EntityIndex entity); void drawSequence(EntityIndex entity, const char *sequence, EntityDirection direction) const; -- cgit v1.2.3 From be94a24fd2cf3e89e3976eb52581c5a8a65d81a1 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Mon, 16 Jul 2012 23:16:17 -0400 Subject: LASTEXPRESS: Replace INVERT_Y macro --- engines/lastexpress/game/beetle.cpp | 32 +++++++++++++++++--------------- engines/lastexpress/game/beetle.h | 1 + 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/engines/lastexpress/game/beetle.cpp b/engines/lastexpress/game/beetle.cpp index f95947617a..2a72459697 100644 --- a/engines/lastexpress/game/beetle.cpp +++ b/engines/lastexpress/game/beetle.cpp @@ -336,26 +336,13 @@ void Beetle::drawUpdate() { } } -#define INVERT_Y() \ - switch (_data->indexes[_data->offset]) { \ - default: \ - break; \ - case 24: \ - case 25: \ - case 26: \ - case 27: \ - case 28: \ - _data->coordY = -_data->coordY; \ - break; \ - } - // Invert direction - INVERT_Y(); + invertDirection(); SequenceFrame *frame = new SequenceFrame(_data->currentSequence, (uint16)_data->currentFrame); updateFrame(frame); - INVERT_Y(); + invertDirection(); getScenes()->addToQueue(frame); @@ -363,6 +350,21 @@ void Beetle::drawUpdate() { _data->frame = frame; } +void Beetle::invertDirection() { + switch (_data->indexes[_data->offset]) { + default: + break; + + case 24: + case 25: + case 26: + case 27: + case 28: + _data->coordY = -_data->coordY; + break; + } +} + void Beetle::move() { if (!_data) error("[Beetle::move] Sequences have not been loaded"); diff --git a/engines/lastexpress/game/beetle.h b/engines/lastexpress/game/beetle.h index d3c47f39e5..034ebbd557 100644 --- a/engines/lastexpress/game/beetle.h +++ b/engines/lastexpress/game/beetle.h @@ -111,6 +111,7 @@ private: void updateFrame(SequenceFrame *frame) const; void updateData(uint32 index); void drawUpdate(); + void invertDirection(); }; } // End of namespace LastExpress -- cgit v1.2.3 From 0181a464eb864e15a02acd3ab7fb700a7cac0007 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Mon, 16 Jul 2012 23:27:43 -0400 Subject: LASTEXPRESS: Use filter 16 as default filter for NIS animations This makes sure the sound is at the correct volume --- engines/lastexpress/data/snd.cpp | 2 +- engines/lastexpress/shared.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/engines/lastexpress/data/snd.cpp b/engines/lastexpress/data/snd.cpp index 3deb2d6300..51d0815c1e 100644 --- a/engines/lastexpress/data/snd.cpp +++ b/engines/lastexpress/data/snd.cpp @@ -526,7 +526,7 @@ void AppendableSound::queueBuffer(Common::SeekableReadStream *bufferIn) { // Setup the ADPCM decoder uint32 sizeIn = (uint32)bufferIn->size(); Audio::AudioStream *adpcm = makeDecoder(bufferIn, sizeIn); - ((LastExpress_ADPCMStream *)adpcm)->setFilterId(1); + ((LastExpress_ADPCMStream *)adpcm)->setFilterId(16); // Queue the stream _as->queueAudioStream(adpcm); diff --git a/engines/lastexpress/shared.h b/engines/lastexpress/shared.h index d60a498447..bebd149b9b 100644 --- a/engines/lastexpress/shared.h +++ b/engines/lastexpress/shared.h @@ -80,7 +80,8 @@ enum SoundFlag { kFlagMusic = 0x5000010, kFlagType3 = 0x6000000, kFlagLoop = 0x6001008, - kFlagType9 = 0x7000000 + kFlagType9 = 0x7000000, + kFlagNIS = 0x7002010 }; enum SoundState { -- cgit v1.2.3 From d830c0edc9e53b5a3274535139179c2ef029a5d5 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Mon, 16 Jul 2012 23:47:49 -0400 Subject: LASTEXPRESS: Replace TIME_CHECK_SAVEPOINT and TIME_CHECK_OBJECT macros --- engines/lastexpress/entities/abbot.cpp | 4 ++-- engines/lastexpress/entities/august.cpp | 6 +++--- engines/lastexpress/entities/coudert.cpp | 12 ++++++------ engines/lastexpress/entities/entity.cpp | 19 +++++++++++++++++++ engines/lastexpress/entities/entity.h | 7 +++++++ engines/lastexpress/entities/entity_intern.h | 22 +++++----------------- engines/lastexpress/entities/kahina.cpp | 2 +- engines/lastexpress/entities/mertens.cpp | 2 +- engines/lastexpress/entities/milos.cpp | 4 ++-- engines/lastexpress/entities/rebecca.cpp | 2 +- engines/lastexpress/entities/tatiana.cpp | 2 +- 11 files changed, 48 insertions(+), 34 deletions(-) diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp index eef64bdf07..9280068fae 100644 --- a/engines/lastexpress/entities/abbot.cpp +++ b/engines/lastexpress/entities/abbot.cpp @@ -415,7 +415,7 @@ IMPLEMENT_FUNCTION(22, Abbot, function22) break; case kActionNone: - TIME_CHECK_SAVEPOINT(kTime1971000, params->param1, kEntityAbbot, kEntityServers0, kAction218586752); + Entity::timeCheckSavepoint(kTime1971000, params->param1, kEntityAbbot, kEntityServers0, kAction218586752); if (getState()->time > kTime1989000 && getEntities()->isSomebodyInsideRestaurantOrSalon()) { getData()->inventoryItem = kItemNone; @@ -1319,7 +1319,7 @@ IMPLEMENT_FUNCTION(41, Abbot, chapter4Handler) break; case kActionNone: - TIME_CHECK_SAVEPOINT(kTime2358000, params->param1, kEntityAbbot, kEntityServers0, kAction218128129); + Entity::timeCheckSavepoint(kTime2358000, params->param1, kEntityAbbot, kEntityServers0, kAction218128129); if (getState()->time > kTime2389500 && getEntities()->isSomebodyInsideRestaurantOrSalon()) setup_function42(); diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp index 86c02e4301..f255d041f8 100644 --- a/engines/lastexpress/entities/august.cpp +++ b/engines/lastexpress/entities/august.cpp @@ -1811,7 +1811,7 @@ IMPLEMENT_FUNCTION(36, August, chapter2Handler) break; case kActionNone: - TIME_CHECK_SAVEPOINT(kTime1755000, params->param2, kEntityAugust, kEntityServers0, kAction252568704); + Entity::timeCheckSavepoint(kTime1755000, params->param2, kEntityAugust, kEntityServers0, kAction252568704); if (getState()->time > kTime1773000 && params->param1 && getEntities()->isSomebodyInsideRestaurantOrSalon()) { getData()->inventoryItem = kItemNone; @@ -1960,7 +1960,7 @@ IMPLEMENT_FUNCTION(38, August, function38) break; case kActionNone: - TIME_CHECK_SAVEPOINT(kTime1801800, params->param1, kEntityAugust, kEntityRebecca, kAction155980128); + Entity::timeCheckSavepoint(kTime1801800, params->param1, kEntityAugust, kEntityRebecca, kAction155980128); TIME_CHECK_CALLBACK(kTime1820700, params->param2, 3, setup_callbackActionRestaurantOrSalon); break; @@ -2210,7 +2210,7 @@ IMPLEMENT_FUNCTION(43, August, chapter3Handler) break; case kActionNone: - TIME_CHECK_SAVEPOINT(kTime1953000, params->param2, kEntityAugust, kEntityAnna, kAction291662081); + Entity::timeCheckSavepoint(kTime1953000, params->param2, kEntityAugust, kEntityAnna, kAction291662081); // Set as same position as Anna if (params->param1) { diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp index eea9dda718..77cddddf48 100644 --- a/engines/lastexpress/entities/coudert.cpp +++ b/engines/lastexpress/entities/coudert.cpp @@ -2285,9 +2285,9 @@ label_callback_10: if (!ENTITY_PARAM(0, 2)) break; - TIME_CHECK_OBJECT(kTime1107000, params->param4, kObject111, kObjectLocation2); - TIME_CHECK_OBJECT(kTime1161000, params->param5, kObject111, kObjectLocation3); - TIME_CHECK_OBJECT(kTime1206000, params->param6, kObject111, kObjectLocation4); + timeCheckObject(kTime1107000, params->param4, kObject111, kObjectLocation2); + timeCheckObject(kTime1161000, params->param5, kObject111, kObjectLocation3); + timeCheckObject(kTime1206000, params->param6, kObject111, kObjectLocation4); break; case kAction1: @@ -2835,9 +2835,9 @@ label_callback_18: label_callback_19: if (ENTITY_PARAM(0, 2)) { - TIME_CHECK_OBJECT(kTime2025000, params->param7, kObject111, kObjectLocation7); - TIME_CHECK_OBJECT(kTime2133000, params->param8, kObject111, kObjectLocation8); - TIME_CHECK_OBJECT(kTime2173500, CURRENT_PARAM(1, 1), kObject111, kObjectLocation9); + timeCheckObject(kTime2025000, params->param7, kObject111, kObjectLocation7); + timeCheckObject(kTime2133000, params->param8, kObject111, kObjectLocation8); + timeCheckObject(kTime2173500, CURRENT_PARAM(1, 1), kObject111, kObjectLocation9); } break; diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index a412dc9b65..743adc3201 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -29,6 +29,7 @@ #include "lastexpress/game/action.h" #include "lastexpress/game/entities.h" #include "lastexpress/game/logic.h" +#include "lastexpress/game/object.h" #include "lastexpress/game/scenes.h" #include "lastexpress/game/state.h" #include "lastexpress/game/savegame.h" @@ -592,4 +593,22 @@ void Entity::callbackAction() { getSavePoints()->call(_entityIndex, _entityIndex, kActionCallback); } +////////////////////////////////////////////////////////////////////////// +// Helper functions +////////////////////////////////////////////////////////////////////////// + +void Entity::timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action) { + if (getState()->time > timeValue && !parameter) { + parameter = 1; + getSavePoints()->push(entity1, entity2, action); + } +} + +void Entity::timeCheckObject(TimeValue timeValue, uint ¶meter, ObjectIndex object, ObjectLocation location) { + if (getState()->time > timeValue && !parameter) { + parameter = 1; + getObjects()->updateLocation2(object, location); + } +} + } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 01a19553ec..f29d78e181 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -845,6 +845,13 @@ protected: * Store the current callback information and perform the callback action */ void callbackAction(); + + ////////////////////////////////////////////////////////////////////////// + // Helper functions + ////////////////////////////////////////////////////////////////////////// + + void timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action); + void timeCheckObject(TimeValue timeValue, uint ¶meter, ObjectIndex index, ObjectLocation location); }; diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index c622ff9f0e..64814a1b40 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -326,12 +326,6 @@ void class::setup_##name() { \ break; \ } -#define TIME_CHECK_SAVEPOINT(timeValue, parameter, entity1, entity2, action) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - getSavePoints()->push(entity1, entity2, action); \ - } - #define TIME_CHECK_CALLBACK(timeValue, parameter, callback, function) \ if (getState()->time > timeValue && !parameter) { \ parameter = 1; \ @@ -366,11 +360,11 @@ void class::setup_##name() { \ #define TIME_CHECK_CALLBACK_INVENTORY(timeValue, parameter, callback, function) \ if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - getData()->inventoryItem = kItemNone; \ - setCallback(callback); \ - function(); \ - break; \ + parameter = 1; \ + getData()->inventoryItem = kItemNone; \ + setCallback(callback); \ + function(); \ + break; \ } #define TIME_CHECK_CALLBACK_ACTION(timeValue, parameter) \ @@ -389,12 +383,6 @@ void class::setup_##name() { \ break; \ } -#define TIME_CHECK_OBJECT(timeValue, parameter, object, location) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - getObjects()->updateLocation2(object, location); \ - } - #define TIME_CHECK_CAR(timeValue, parameter, callback, function) {\ if ((getState()->time <= timeValue && !getEntities()->isPlayerInCar(kCarGreenSleeping)) || !parameter) \ parameter = (uint)getState()->time + 75; \ diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp index 0c4045097a..6bb2e6b90a 100644 --- a/engines/lastexpress/entities/kahina.cpp +++ b/engines/lastexpress/entities/kahina.cpp @@ -267,7 +267,7 @@ IMPLEMENT_FUNCTION(11, Kahina, chapter1Handler) return; if (getProgress().jacket != kJacketOriginal) - TIME_CHECK_SAVEPOINT(kTime1107000, params->param1, kEntityKahina, kEntityMertens, kAction238732837); + Entity::timeCheckSavepoint(kTime1107000, params->param1, kEntityKahina, kEntityMertens, kAction238732837); if (getProgress().eventMertensKronosInvitation) setup_function12(); diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp index 517ff76362..328c8e88d8 100644 --- a/engines/lastexpress/entities/mertens.cpp +++ b/engines/lastexpress/entities/mertens.cpp @@ -2993,7 +2993,7 @@ IMPLEMENT_FUNCTION(42, Mertens, function42) getData()->inventoryItem = kItemInvalid; if (!params->param2) { - TIME_CHECK_SAVEPOINT(kTime1125000, params->param3, kEntityMertens, kEntityMahmud, kAction170483072); + Entity::timeCheckSavepoint(kTime1125000, params->param3, kEntityMertens, kEntityMahmud, kAction170483072); if (params->param4 != kTimeInvalid && getState()->time > kTimeCityChalons) { diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp index 21f3b06896..c33a8b887e 100644 --- a/engines/lastexpress/entities/milos.cpp +++ b/engines/lastexpress/entities/milos.cpp @@ -720,7 +720,7 @@ IMPLEMENT_FUNCTION(15, Milos, chapter1Handler) break; case kActionNone: - TIME_CHECK_SAVEPOINT(kTime1071000, params->param3, kEntityMilos, kEntityServers1, kAction223002560); + Entity::timeCheckSavepoint(kTime1071000, params->param3, kEntityMilos, kEntityServers1, kAction223002560); if (getState()->time > kTime1089000 && getEntities()->isSomebodyInsideRestaurantOrSalon()) { setup_function16(); @@ -1534,7 +1534,7 @@ IMPLEMENT_FUNCTION(29, Milos, chapter4Handler) TIME_CHECK_PLAYSOUND_MILOS(kTime2370600, params->param5, "Mil4015"); - TIME_CHECK_SAVEPOINT(kTime2407500, params->param6, kEntityMilos, kEntityVesna, kAction55996766); + Entity::timeCheckSavepoint(kTime2407500, params->param6, kEntityMilos, kEntityVesna, kAction55996766); break; case kActionCallback: diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp index 4f7be385ce..3ef266994f 100644 --- a/engines/lastexpress/entities/rebecca.cpp +++ b/engines/lastexpress/entities/rebecca.cpp @@ -841,7 +841,7 @@ IMPLEMENT_FUNCTION(24, Rebecca, function24) break; case kActionNone: - TIME_CHECK_SAVEPOINT(kTime1134000, params->param2, kEntityRebecca, kEntityServers0, kAction223712416); + Entity::timeCheckSavepoint(kTime1134000, params->param2, kEntityRebecca, kEntityServers0, kAction223712416); if (!params->param1) break; diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp index 3b9cc6d322..b15a0a18b2 100644 --- a/engines/lastexpress/entities/tatiana.cpp +++ b/engines/lastexpress/entities/tatiana.cpp @@ -440,7 +440,7 @@ IMPLEMENT_FUNCTION(19, Tatiana, chapter1Handler) } label_tatiana_chapter1_2: - TIME_CHECK_SAVEPOINT(kTime1084500, params->param7, kEntityTatiana, kEntityPascale, kAction257489762); + Entity::timeCheckSavepoint(kTime1084500, params->param7, kEntityTatiana, kEntityPascale, kAction257489762); if (params->param1) { UPDATE_PARAM(params->param8, getState()->timeTicks, 90); -- cgit v1.2.3 From 58f9d3345de84208dd2e05855adff909689f9c04 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 18 Jul 2012 00:41:06 +1000 Subject: TSAGE: Altered the ADGF_TESTING flags for Blue Force --- engines/tsage/detection_tables.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/tsage/detection_tables.h b/engines/tsage/detection_tables.h index d538cbacbf..02d4a6ab9b 100644 --- a/engines/tsage/detection_tables.h +++ b/engines/tsage/detection_tables.h @@ -105,7 +105,7 @@ static const tSageGameDescription gameDescriptions[] = { AD_ENTRY1s("blue.rlb", "17c3993415e8a2cf93040eef7e88ec93", 1156508), Common::EN_ANY, Common::kPlatformPC, - ADGF_TESTING, + ADGF_UNSTABLE, GUIO2(GUIO_NOSPEECH, GUIO_NOSFX) }, GType_BlueForce, @@ -120,7 +120,7 @@ static const tSageGameDescription gameDescriptions[] = { AD_ENTRY1s("blue.rlb", "17eabb456cb1546c66baf1aff387ba6a", 10032614), Common::EN_ANY, Common::kPlatformPC, - ADGF_TESTING, + 0, GUIO2(GUIO_NOSPEECH, GUIO_NOSFX) }, GType_BlueForce, @@ -134,7 +134,7 @@ static const tSageGameDescription gameDescriptions[] = { AD_ENTRY1s("blue.rlb", "99983f48cb218f1f3760cf2f9a7ef11d", 63863322), Common::EN_ANY, Common::kPlatformPC, - ADGF_CD | ADGF_TESTING, + ADGF_CD, GUIO2(GUIO_NOSPEECH, GUIO_NOSFX) }, GType_BlueForce, @@ -150,7 +150,7 @@ static const tSageGameDescription gameDescriptions[] = { AD_ENTRY1s("blue.rlb", "5b2b35c51b62e82d82b0791540bfae2d", 10082565), Common::ES_ESP, Common::kPlatformPC, - ADGF_CD | ADGF_TESTING, + ADGF_CD | ADGF_UNSTABLE, GUIO2(GUIO_NOSPEECH, GUIO_NOSFX) }, GType_BlueForce, -- cgit v1.2.3 From b6000da8753c1a28c2f2f3d0bbd2f1e704674d85 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 18 Jul 2012 00:49:28 +1000 Subject: DREAMWEB: Marked Dreamweb as stable --- engines/dreamweb/detection_tables.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/engines/dreamweb/detection_tables.h b/engines/dreamweb/detection_tables.h index 063aabbd89..8a2f94f99b 100644 --- a/engines/dreamweb/detection_tables.h +++ b/engines/dreamweb/detection_tables.h @@ -46,7 +46,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformPC, - ADGF_TESTING, + 0, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -63,7 +63,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformPC, - ADGF_CD | ADGF_TESTING, + ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -84,7 +84,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::EN_GRB, Common::kPlatformPC, - ADGF_CD | ADGF_TESTING, + ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -101,7 +101,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::EN_USA, Common::kPlatformPC, - ADGF_CD | ADGF_TESTING, + ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -118,7 +118,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::FR_FRA, Common::kPlatformPC, - ADGF_CD | ADGF_TESTING, + ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -136,7 +136,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::FR_FRA, Common::kPlatformPC, - ADGF_CD | ADGF_TESTING, + ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -153,7 +153,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::DE_DEU, Common::kPlatformPC, - ADGF_TESTING, + 0, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -170,7 +170,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::DE_DEU, Common::kPlatformPC, - ADGF_CD | ADGF_TESTING, + ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -187,7 +187,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::ES_ESP, Common::kPlatformPC, - ADGF_TESTING, + 0, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -204,7 +204,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::ES_ESP, Common::kPlatformPC, - ADGF_CD | ADGF_TESTING, + ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -222,7 +222,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::ES_ESP, Common::kPlatformPC, - ADGF_CD | ADGF_TESTING, + ADGF_CD, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, @@ -239,7 +239,7 @@ static const DreamWebGameDescription gameDescriptions[] = { }, Common::IT_ITA, Common::kPlatformPC, - ADGF_TESTING, + 0, GUIO2(GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE) }, }, -- cgit v1.2.3 From b398dcabaffbbc53d24d296fed3f64b0b8ecd519 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan SømaÌŠen Date: Wed, 18 Jul 2012 13:54:15 +0200 Subject: COMMON: Add an optional argument to wrapCompressedReadStream, to simplify using streams that can't tell their size() --- common/zlib.cpp | 9 +++++---- common/zlib.h | 10 +++++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/common/zlib.cpp b/common/zlib.cpp index 7d765fc539..76e34485da 100644 --- a/common/zlib.cpp +++ b/common/zlib.cpp @@ -107,7 +107,7 @@ protected: public: - GZipReadStream(SeekableReadStream *w) : _wrapped(w), _stream() { + GZipReadStream(SeekableReadStream *w, uint32 knownSize = 0) : _wrapped(w), _stream() { assert(w != 0); // Verify file header is correct @@ -122,7 +122,8 @@ public: _origSize = w->readUint32LE(); } else { // Original size not available in zlib format - _origSize = 0; + // use an otherwise known size if supplied. + _origSize = knownSize; } _pos = 0; w->seek(0, SEEK_SET); @@ -336,7 +337,7 @@ public: #endif // USE_ZLIB -SeekableReadStream *wrapCompressedReadStream(SeekableReadStream *toBeWrapped) { +SeekableReadStream *wrapCompressedReadStream(SeekableReadStream *toBeWrapped, uint32 knownSize) { #if defined(USE_ZLIB) if (toBeWrapped) { uint16 header = toBeWrapped->readUint16BE(); @@ -345,7 +346,7 @@ SeekableReadStream *wrapCompressedReadStream(SeekableReadStream *toBeWrapped) { header % 31 == 0)); toBeWrapped->seek(-2, SEEK_CUR); if (isCompressed) - return new GZipReadStream(toBeWrapped); + return new GZipReadStream(toBeWrapped, knownSize); } #endif return toBeWrapped; diff --git a/common/zlib.h b/common/zlib.h index 61322c286a..8372499922 100644 --- a/common/zlib.h +++ b/common/zlib.h @@ -86,10 +86,18 @@ bool inflateZlibHeaderless(byte *dst, uint dstLen, const byte *src, uint srcLen, * format. In the former case, the original stream is returned unmodified * (and in particular, not wrapped). * + * Certain GZip-formats don't supply an easily readable length, if you + * still need the length carried along with the stream, and you know + * the decompressed length at wrap-time, then it can be supplied as knownSize + * here. knownSize will be ignored if the GZip-stream DOES include a length. + * * It is safe to call this with a NULL parameter (in this case, NULL is * returned). + * + * @param toBeWrapped the stream to be wrapped (if it is in gzip-format) + * @param knownSize a supplied length of the compressed data (if not available directly) */ -SeekableReadStream *wrapCompressedReadStream(SeekableReadStream *toBeWrapped); +SeekableReadStream *wrapCompressedReadStream(SeekableReadStream *toBeWrapped, uint32 knownSize = 0); /** * Take an arbitrary WriteStream and wrap it in a custom stream which provides -- cgit v1.2.3 From 0b8fa3248b331616e8b09648a091446d325ef6ac Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 18 Jul 2012 22:25:44 +0200 Subject: DISTS/FEDORA: Add new dependencies --- dists/redhat/scummvm.spec | 3 ++- dists/redhat/scummvm.spec.in | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dists/redhat/scummvm.spec b/dists/redhat/scummvm.spec index d80404a3c6..bd17017fbf 100644 --- a/dists/redhat/scummvm.spec +++ b/dists/redhat/scummvm.spec @@ -27,6 +27,7 @@ BuildRequires: flac-devel BuildRequires: zlib-devel BuildRequires: nasm BuildRequires: SDL-devel >= 1.2.2 +BuildRequires: freetype-devel #------------------------------------------------------------------------------ # Description @@ -94,7 +95,7 @@ fi #------------------------------------------------------------------------------ %files %defattr(0644,root,root,0755) -%doc AUTHORS README NEWS COPYING COPYING.LGPL COPYING.BSD COPYRIGHT +%doc AUTHORS README NEWS COPYING COPYING.LGPL COPYING.FREEFONT COPYING.BSD COPYRIGHT %attr(0755,root,root)%{_bindir}/scummvm %{_datadir}/applications/* %{_datadir}/pixmaps/scummvm.xpm diff --git a/dists/redhat/scummvm.spec.in b/dists/redhat/scummvm.spec.in index 3beef2f960..9dbd8add5b 100644 --- a/dists/redhat/scummvm.spec.in +++ b/dists/redhat/scummvm.spec.in @@ -27,6 +27,7 @@ BuildRequires: flac-devel BuildRequires: zlib-devel BuildRequires: nasm BuildRequires: SDL-devel >= 1.2.2 +BuildRequires: freetype-devel #------------------------------------------------------------------------------ # Description @@ -94,7 +95,7 @@ fi #------------------------------------------------------------------------------ %files %defattr(0644,root,root,0755) -%doc AUTHORS README NEWS COPYING COPYING.LGPL COPYING.BSD COPYRIGHT +%doc AUTHORS README NEWS COPYING COPYING.LGPL COPYING.FREEFONT COPYING.BSD COPYRIGHT %attr(0755,root,root)%{_bindir}/scummvm %{_datadir}/applications/* %{_datadir}/pixmaps/scummvm.xpm -- cgit v1.2.3 From 2151500934d0e97bf2dcdcd7697d9b6bcc4114ac Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Wed, 18 Jul 2012 21:34:17 -0500 Subject: MAEMO: Add new build dependencies Since libfaad doesn't exist in maemo.org extras-devel, it cannot be added. --- backends/platform/maemo/debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/platform/maemo/debian/control b/backends/platform/maemo/debian/control index 6e1dfe2fd4..bdaccd2359 100644 --- a/backends/platform/maemo/debian/control +++ b/backends/platform/maemo/debian/control @@ -2,7 +2,7 @@ Source: scummvm Section: user/games Priority: optional Maintainer: Tarek Soliman -Build-Depends: debhelper (>> 4.0.0), libsdl1.2-dev, libmad0-dev, libasound2-dev, libvorbisidec-dev, libmpeg2-4-dev, libflac-dev (>= 1.1.2), libz-dev, quilt +Build-Depends: debhelper (>> 4.0.0), libsdl1.2-dev, libmad0-dev, libasound2-dev, libvorbisidec-dev, libmpeg2-4-dev, libflac-dev (>= 1.1.2), libfreetype6-dev, libz-dev, quilt Standards-Version: 3.6.1.1 Package: scummvm -- cgit v1.2.3 From e21bd107495f5749eb3d8edb58bde499a5cf8f6e Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Thu, 19 Jul 2012 05:53:55 +0200 Subject: QUEEN: Change description on the "alt_intro" option It's not a floppy version intro, so call it "Alternative intro" instead. It's too late to make this change in 1.5.0 because it would need translation changes. (When the option was first added, it *was* called "Alternative intro" but it got changed along the way.) --- engines/queen/queen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp index 3acc87b856..f3b183c84f 100644 --- a/engines/queen/queen.cpp +++ b/engines/queen/queen.cpp @@ -56,8 +56,8 @@ static const PlainGameDescriptor queenGameDescriptor = { }; static const ExtraGuiOption queenExtraGuiOption = { - _s("Floppy intro"), - _s("Use the floppy version's intro (CD version only)"), + _s("Alternative intro"), + _s("Use an alternative game intro (CD version only)"), "alt_intro", false }; -- cgit v1.2.3 From e160f62ade8821a507e5d07551751a1a75308a53 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 19 Jul 2012 19:13:43 +1000 Subject: TSAGE: Changed '0' to 'ADGF_NO_FLAGS' in detection tables --- engines/tsage/detection_tables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/tsage/detection_tables.h b/engines/tsage/detection_tables.h index 02d4a6ab9b..a84ee5662f 100644 --- a/engines/tsage/detection_tables.h +++ b/engines/tsage/detection_tables.h @@ -120,7 +120,7 @@ static const tSageGameDescription gameDescriptions[] = { AD_ENTRY1s("blue.rlb", "17eabb456cb1546c66baf1aff387ba6a", 10032614), Common::EN_ANY, Common::kPlatformPC, - 0, + ADGF_NO_FLAGS, GUIO2(GUIO_NOSPEECH, GUIO_NOSFX) }, GType_BlueForce, -- cgit v1.2.3 From 6a8d037af1703f6820ae2d42217e2bc8367e46b8 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Mon, 16 Jul 2012 23:56:35 -0400 Subject: LASTEXPRESS: Fix variable shadowing and update comments --- engines/lastexpress/entities/entity.cpp | 6 +++--- engines/lastexpress/entities/entity.h | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 743adc3201..1ad6d08035 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -254,7 +254,7 @@ void Entity::savegame(const SavePoint &savepoint) { } } -void Entity::savegameBloodJacket(SaveFunction *savegame) { +void Entity::savegameBloodJacket(SaveFunction *saveFunction) { if (getProgress().jacket == kJacketBlood && getEntities()->isDistanceBetweenEntities(_entityIndex, kEntityPlayer, 1000) && !getEntities()->isInsideCompartments(kEntityPlayer) @@ -266,11 +266,11 @@ void Entity::savegameBloodJacket(SaveFunction *savegame) { break; case kEntityCoudert: - (*savegame)(kSavegameTypeEvent, kEventCoudertBloodJacket); + (*saveFunction)(kSavegameTypeEvent, kEventCoudertBloodJacket); break; case kEntityMertens: - (*savegame)(kSavegameTypeEvent, kEventCoudertBloodJacket); + (*saveFunction)(kSavegameTypeEvent, kEventCoudertBloodJacket); break; } } diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index f29d78e181..5ba78abc17 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -696,9 +696,11 @@ protected: void savegame(const SavePoint &savepoint); /** - * Saves the game before being found out with a blood covered jacket + * Saves the game before being found out with a blood covered jacket. + * + * @param saveFunction The setup function to call to save the game */ - void savegameBloodJacket(SaveFunction *savegame); + void savegameBloodJacket(SaveFunction *saveFunction); /** * Play sound @@ -826,7 +828,7 @@ protected: * @param positionTo The position to. * @param sequenceTo The sequence to. * @param enterFunction The enter/exit compartment function. - * @param enterFunction The update entity function. + * @param updateFunction The update entity function. */ void goToCompartmentFromCompartment(const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, ObjectIndex compartmentTo, EntityPosition positionTo, Common::String sequenceTo, Entity::EnterFunction *enterFunction, Entity::UpdateFunction *updateFunction); -- cgit v1.2.3 From b4d10631614ae8b75154a4006ce3683a05200af7 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 20 Jul 2012 14:04:45 -0400 Subject: NEWS: Set 1.5.0 release date --- NEWS | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 43e755f4ac..3f5f10ce05 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,10 @@ For a more comprehensive changelog of the latest experimental code, see: https://github.com/scummvm/scummvm/commits/ -1.5.0 (????-??-??) +1.6.0 (????-??-??) + + +1.5.0 (2012-07-27) New Games: - Added support for Backyard Baseball 2003. - Added support for Blue Force. -- cgit v1.2.3 From 6d18bddbb5d2b6f61edbf6a1b7014ca1fbca81a9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 20 Jul 2012 14:50:00 -0400 Subject: CREDITS: Credits for original sources --- AUTHORS | 7 +++++++ devtools/credits.pl | 11 +++++++++++ gui/credits.h | 4 ++++ 3 files changed, 22 insertions(+) diff --git a/AUTHORS b/AUTHORS index 387c602b84..7272d6baf6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -597,3 +597,10 @@ Special thanks to Broken Sword 2.5 team for providing sources of their engine and their great support. + Neil Dodwell and David Dew from Creative Reality for providing the source + of Dreamweb and for their tremendous support. + + Janusz Wisniewski and Miroslaw Liminowicz from Laboratorium Komputerowe + Avalon for providing full source code for Soltys and letting us to + redistribute the game. + diff --git a/devtools/credits.pl b/devtools/credits.pl index 411ec3c10d..7a7766657b 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -69,6 +69,7 @@ sub html_entities_to_ascii { # å -> aa # & -> & # ł -> l + # ś -> s # Š -> S $text =~ s/á/a/g; $text =~ s/é/e/g; @@ -76,6 +77,7 @@ sub html_entities_to_ascii { $text =~ s/ó/o/g; $text =~ s/ø/o/g; $text =~ s/ł/l/g; + $text =~ s/ś/s/g; $text =~ s/Š/S/g; $text =~ s/å/aa/g; @@ -101,6 +103,7 @@ sub html_entities_to_cpp { $text =~ s/ó/\\363/g; $text =~ s/ø/\\370/g; $text =~ s/ł/l/g; + $text =~ s/ś/s/g; $text =~ s/Š/S/g; $text =~ s/å/\\345/g; @@ -1127,6 +1130,14 @@ begin_credits("Credits"); "Broken Sword 2.5 team for providing sources of their engine and their great ". "support."); + add_paragraph( + "Neil Dodwell and David Dew from Creative Reality for providing the source ". + "of Dreamweb and for their tremendous support."); + + add_paragraph( + "Janusz Wiśniewski and Miroslaw Liminowicz from Laboratorium Komputerowe Avalon ". + "for providing full source code for Sołtys and letting us to redistribute the game."); + end_section(); end_credits(); diff --git a/gui/credits.h b/gui/credits.h index 7226864543..1b3ba82017 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -710,5 +710,9 @@ static const char *credits[] = { "C0""", "C0""Broken Sword 2.5 team for providing sources of their engine and their great support.", "C0""", +"C0""Neil Dodwell and David Dew from Creative Reality for providing the source of Dreamweb and for their tremendous support.", +"C0""", +"C0""Janusz Wisniewski and Miroslaw Liminowicz from Laboratorium Komputerowe Avalon for providing full source code for Soltys and letting us to redistribute the game.", +"C0""", "", }; -- cgit v1.2.3 From a523fc186a9210aabfc9ab4d480726a483fdfbb5 Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Fri, 20 Jul 2012 14:49:40 -0500 Subject: MAEMO: Fix date in debian/changelog (cherry picked from commit 831cfc89345299034e94160088d2ad3ff20eff5e) --- backends/platform/maemo/debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/platform/maemo/debian/changelog b/backends/platform/maemo/debian/changelog index f3e4c4eadb..ea44574e96 100644 --- a/backends/platform/maemo/debian/changelog +++ b/backends/platform/maemo/debian/changelog @@ -8,7 +8,7 @@ scummvm (1.5.0) unstable; urgency=low * 1.5.0 release - -- Tarek Soliman Tue, 10 Jul 2012 22:57:32 -0500 + -- Tarek Soliman Fri, 20 Jul 2012 14:48:44 -0500 scummvm (1.4.1) unstable; urgency=low -- cgit v1.2.3 From b5feb0dcc70ccaab77e2005d32a33cfc614a57e3 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 20 Jul 2012 21:03:34 +0200 Subject: CREDITS: Update dreamweb team --- AUTHORS | 2 ++ devtools/credits.pl | 2 ++ gui/credits.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/AUTHORS b/AUTHORS index 7272d6baf6..02c805b833 100644 --- a/AUTHORS +++ b/AUTHORS @@ -89,7 +89,9 @@ ScummVM Team DreamWeb: Torbjorn Andersson Bertrand Augereau + Filippos Karapetis Vladimir Menshakov - (retired) + Willem Jan Palenstijn Gob: Torbjorn Andersson diff --git a/devtools/credits.pl b/devtools/credits.pl index 7a7766657b..6a4b97b89d 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -553,7 +553,9 @@ begin_credits("Credits"); begin_section("DreamWeb"); add_person("Torbjörn Andersson", "eriktorbjorn", ""); add_person("Bertrand Augereau", "Tramb", ""); + add_person("Filippos Karapetis", "[md5]", ""); add_person("Vladimir Menshakov", "whoozle", "(retired)"); + add_person("Willem Jan Palenstijn", "wjp", ""); end_section(); begin_section("Gob"); diff --git a/gui/credits.h b/gui/credits.h index 1b3ba82017..34c6f21026 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -106,8 +106,10 @@ static const char *credits[] = { "C1""DreamWeb", "C0""Torbj\366rn Andersson", "C0""Bertrand Augereau", +"C0""Filippos Karapetis", "C0""Vladimir Menshakov", "C2""(retired)", +"C0""Willem Jan Palenstijn", "", "C1""Gob", "C0""Torbj\366rn Andersson", -- cgit v1.2.3 From f0304ee0bb09f2b57d755e5e3100fe157512af56 Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Fri, 20 Jul 2012 16:00:37 -0500 Subject: MAEMO: Package missing docs --- backends/platform/maemo/debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/platform/maemo/debian/rules b/backends/platform/maemo/debian/rules index 64add08de8..43a34399a3 100755 --- a/backends/platform/maemo/debian/rules +++ b/backends/platform/maemo/debian/rules @@ -50,7 +50,7 @@ install: build install -m0644 dists/engine-data/drascula.dat dists/engine-data/hugo.dat dists/engine-data/kyra.dat dists/engine-data/lure.dat dists/engine-data/queen.tbl dists/engine-data/sky.cpt dists/engine-data/teenagent.dat dists/engine-data/toon.dat debian/scummvm/opt/scummvm/share install -m0644 -d debian/scummvm/usr/share/doc/scummvm - install -m0644 NEWS README COPYRIGHT debian/scummvm/usr/share/doc/scummvm + install -m0644 AUTHORS COPYING COPYING.BSD COPYING.FREEFONT COPYING.LGPL COPYRIGHT NEWS README debian/scummvm/usr/share/doc/scummvm binary: binary-arch binary-arch: build install -- cgit v1.2.3 From 818c16bdd09f4aa92c4a46de5256f28331c35cbb Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 20 Jul 2012 20:51:42 -0400 Subject: VIDEO: Add first draft of the new VideoDecoder API It is currently named "AdvancedVideoDecoder" until all current VideoDecoders are converted to the new API. --- video/video_decoder.cpp | 405 ++++++++++++++++++++++++++++++++++++++++++++++-- video/video_decoder.h | 358 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 744 insertions(+), 19 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 44d7917652..ef2aeae94f 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -22,6 +22,7 @@ #include "video/video_decoder.h" +#include "audio/audiostream.h" #include "audio/mixer.h" // for kMaxChannelVolume #include "common/rational.h" @@ -51,26 +52,10 @@ uint32 VideoDecoder::getTime() const { return g_system->getMillis() - _startTime; } -void VideoDecoder::setSystemPalette() { - g_system->getPaletteManager()->setPalette(getPalette(), 0, 256); -} - bool VideoDecoder::needsUpdate() const { return !endOfVideo() && getTimeToNextFrame() == 0; } -void VideoDecoder::reset() { - _curFrame = -1; - _startTime = 0; - _pauseLevel = 0; - _audioVolume = Audio::Mixer::kMaxChannelVolume; - _audioBalance = 0; -} - -bool VideoDecoder::endOfVideo() const { - return !isVideoLoaded() || (getCurFrame() >= (int32)getFrameCount() - 1); -} - void VideoDecoder::pauseVideo(bool pause) { if (pause) { _pauseLevel++; @@ -108,6 +93,394 @@ void VideoDecoder::setBalance(int8 balance) { updateBalance(); } +AdvancedVideoDecoder::AdvancedVideoDecoder() { + _needsRewind = false; + _dirtyPalette = false; + _palette = 0; + _isPlaying = false; +} + +void AdvancedVideoDecoder::close() { + if (_isPlaying) + stop(); + + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + delete *it; + + _tracks.clear(); + _needsRewind = false; + _dirtyPalette = false; + _palette = 0; + _startTime = 0; + reset(); +} + +bool AdvancedVideoDecoder::isVideoLoaded() const { + return !_tracks.empty(); +} + +const Graphics::Surface *AdvancedVideoDecoder::decodeNextFrame() { + readNextPacket(); + VideoTrack *track = findNextVideoTrack(); + + if (!track) + return 0; + + const Graphics::Surface *frame = track->decodeNextFrame(); + + if (track->hasDirtyPalette()) { + _palette = track->getPalette(); + _dirtyPalette = true; + } + + return frame; +} + +const byte *AdvancedVideoDecoder::getPalette() { + _dirtyPalette = false; + return _palette; +} + +int AdvancedVideoDecoder::getCurFrame() const { + int32 frame = -1; + + for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) + if ((*it)->getTrackType() == Track::kTrackTypeVideo) + frame += ((VideoTrack *)*it)->getCurFrame() + 1; + + return frame; +} + +uint32 AdvancedVideoDecoder::getFrameCount() const { + int count = 0; + + for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) + if ((*it)->getTrackType() == Track::kTrackTypeVideo) + count += ((VideoTrack *)*it)->getFrameCount(); + + return count; +} + +uint32 AdvancedVideoDecoder::getTime() const { + if (isPaused()) + return _pauseStartTime - _startTime; + + for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) { + if ((*it)->getTrackType() == Track::kTrackTypeAudio) { + uint32 time = ((const AudioTrack *)*it)->getRunningTime(); + + if (time != 0) + return time + _audioStartOffset.msecs(); + } + } + + return g_system->getMillis() - _startTime; +} + +uint32 AdvancedVideoDecoder::getTimeToNextFrame() const { + if (endOfVideo()) + return 0; + + const VideoTrack *track = findNextVideoTrack(); + + if (!track) + return 0; + + uint32 elapsedTime = getTime(); + uint32 nextFrameStartTime = track->getNextFrameStartTime(); + + if (nextFrameStartTime <= elapsedTime) + return 0; + + return nextFrameStartTime - elapsedTime; +} + +bool AdvancedVideoDecoder::endOfVideo() const { + // TODO: Bring _isPlaying into account? + + if (!isVideoLoaded()) + return true; + + for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) + if (!(*it)->endOfTrack()) + return false; + + return true; +} + +bool AdvancedVideoDecoder::isRewindable() const { + if (_tracks.empty()) + return false; + + for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) + if (!(*it)->isRewindable()) + return false; + + return true; +} + +bool AdvancedVideoDecoder::rewind() { + if (!isRewindable()) + return false; + + _needsRewind = false; + + // TODO: Pause status + + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + if (!(*it)->rewind()) + return false; + + _audioStartOffset = 0; + return true; +} + +bool AdvancedVideoDecoder::isSeekable() const { + if (_tracks.empty()) + return false; + + for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) + if (!(*it)->isSeekable()) + return false; + + return true; +} + +bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) { + if (!isSeekable()) + return false; + + _needsRewind = false; + + // TODO: Pause status + + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + if (!(*it)->seek(time)) + return false; + + _audioStartOffset = time; + return true; +} + +void AdvancedVideoDecoder::start() { + if (_isPlaying || !isVideoLoaded()) + return; + + _isPlaying = true; + _startTime = g_system->getMillis(); + _audioStartOffset = 0; + + // If someone previously called stop(), we'll rewind it. + if (_needsRewind) + rewind(); + + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + (*it)->start(); +} + +void AdvancedVideoDecoder::stop() { + if (!_isPlaying) + return; + + _isPlaying = false; + _startTime = 0; + _audioStartOffset = 0; + _palette = 0; + _dirtyPalette = false; + + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + (*it)->stop(); + + // Also reset the pause state. + _pauseLevel = 0; + + // If this is a rewindable video, don't close it too. We'll just rewind() the video + // the next time someone calls start(). Otherwise, since it can't be rewound, we + // just close it. + if (isRewindable()) + _needsRewind = true; + else + close(); +} + +Audio::Timestamp AdvancedVideoDecoder::getDuration() const { + return Audio::Timestamp(0, 1000); +} + +void AdvancedVideoDecoder::pauseVideoIntern(bool pause) { + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + (*it)->pause(pause); +} + +void AdvancedVideoDecoder::updateVolume() { + // For API compatibility only + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + if ((*it)->getTrackType() == Track::kTrackTypeAudio) + ((AudioTrack *)*it)->setVolume(_audioVolume); +} + +void AdvancedVideoDecoder::updateBalance() { + // For API compatibility only + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + if ((*it)->getTrackType() == Track::kTrackTypeAudio) + ((AudioTrack *)*it)->setBalance(_audioBalance); +} + +AdvancedVideoDecoder::Track::Track() { + _paused = false; +} + +bool AdvancedVideoDecoder::Track::isRewindable() const { + return isSeekable(); +} + +bool AdvancedVideoDecoder::Track::rewind() { + return seek(Audio::Timestamp(0, 1000)); +} + +uint32 AdvancedVideoDecoder::FixedRateVideoTrack::getNextFrameStartTime() const { + if (endOfTrack() || getCurFrame() < 0) + return 0; + + Common::Rational time = (getCurFrame() + 1) * 1000; + time /= getFrameRate(); + return time.toInt(); +} + +bool AdvancedVideoDecoder::FixedLengthVideoTrack::endOfTrack() const { + return getCurFrame() >= (getFrameCount() - 1); +} + +bool AdvancedVideoDecoder::AudioTrack::endOfTrack() const { + Audio::AudioStream *stream = getAudioStream(); + return !stream || (!g_system->getMixer()->isSoundHandleActive(_handle) && stream->endOfData()); +} + +void AdvancedVideoDecoder::AudioTrack::setVolume(byte volume) { + _volume = volume; + + if (g_system->getMixer()->isSoundHandleActive(_handle)) + g_system->getMixer()->setChannelVolume(_handle, _volume); +} + +void AdvancedVideoDecoder::AudioTrack::setBalance(int8 balance) { + _balance = balance; + + if (g_system->getMixer()->isSoundHandleActive(_handle)) + g_system->getMixer()->setChannelBalance(_handle, _balance); +} + +void AdvancedVideoDecoder::AudioTrack::start() { + stop(); + + Audio::AudioStream *stream = getAudioStream(); + assert(stream); + + g_system->getMixer()->playStream(getSoundType(), &_handle, stream, -1, getVolume(), getBalance(), DisposeAfterUse::NO); + + // Pause the audio again if we're still paused + if (isPaused()) + g_system->getMixer()->pauseHandle(_handle, true); +} + +void AdvancedVideoDecoder::AudioTrack::stop() { + g_system->getMixer()->stopHandle(_handle); +} + +uint32 AdvancedVideoDecoder::AudioTrack::getRunningTime() const { + if (g_system->getMixer()->isSoundHandleActive(_handle)) + return g_system->getMixer()->getSoundElapsedTime(_handle); + + return 0; +} + +void AdvancedVideoDecoder::AudioTrack::pauseIntern(bool shouldPause) { + if (g_system->getMixer()->isSoundHandleActive(_handle)) + g_system->getMixer()->pauseHandle(_handle, shouldPause); +} + +Audio::AudioStream *AdvancedVideoDecoder::RewindableAudioTrack::getAudioStream() const { + return getRewindableAudioStream(); +} + +bool AdvancedVideoDecoder::RewindableAudioTrack::rewind() { + Audio::RewindableAudioStream *stream = getRewindableAudioStream(); + assert(stream); + return stream->rewind(); +} + +Audio::AudioStream *AdvancedVideoDecoder::SeekableAudioTrack::getAudioStream() const { + return getSeekableAudioStream(); +} + +bool AdvancedVideoDecoder::SeekableAudioTrack::seek(const Audio::Timestamp &time) { + Audio::SeekableAudioStream *stream = getSeekableAudioStream(); + assert(stream); + return stream->seek(time); +} + +void AdvancedVideoDecoder::addTrack(Track *track) { + _tracks.push_back(track); +} + +AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack() { + VideoTrack *bestTrack = 0; + uint32 bestTime = 0xFFFFFFFF; + + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) { + if ((*it)->getTrackType() == Track::kTrackTypeVideo) { + VideoTrack *track = (VideoTrack *)*it; + uint32 time = track->getNextFrameStartTime(); + + if (time < bestTime) { + bestTime = time; + bestTrack = track; + } + } + } + + return bestTrack; +} + +const AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack() const { + const VideoTrack *bestTrack = 0; + uint32 bestTime = 0xFFFFFFFF; + + for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) { + if ((*it)->getTrackType() == Track::kTrackTypeVideo) { + const VideoTrack *track = (const VideoTrack *)*it; + uint32 time = track->getNextFrameStartTime(); + + if (time < bestTime) { + bestTime = time; + bestTrack = track; + } + } + } + + return bestTrack; +} + +////////////////////////////////////////////// +///////////////// DEPRECATED ///////////////// +////////////////////////////////////////////// + +void VideoDecoder::reset() { + _curFrame = -1; + _startTime = 0; + _pauseLevel = 0; + _audioVolume = Audio::Mixer::kMaxChannelVolume; + _audioBalance = 0; +} + +bool VideoDecoder::endOfVideo() const { + return !isVideoLoaded() || (getCurFrame() >= (int32)getFrameCount() - 1); +} + +void VideoDecoder::setSystemPalette() { + g_system->getPaletteManager()->setPalette(getPalette(), 0, 256); +} + uint32 FixedRateVideoDecoder::getTimeToNextFrame() const { if (endOfVideo() || _curFrame < 0) return 0; diff --git a/video/video_decoder.h b/video/video_decoder.h index 3bb75ade09..1c359591b3 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -23,10 +23,16 @@ #ifndef VIDEO_DECODER_H #define VIDEO_DECODER_H -#include "common/str.h" - +#include "audio/mixer.h" #include "audio/timestamp.h" // TODO: Move this to common/ ? +#include "common/list.h" +#include "common/str.h" +namespace Audio { +class AudioStream; +class RewindableAudioStream; +class SeekableAudioStream; +} namespace Common { class Rational; @@ -42,6 +48,7 @@ namespace Video { /** * Generic interface for video decoder classes. + * @note This class is now deprecated in favor of AdvancedVideoDecoder. */ class VideoDecoder { public: @@ -109,6 +116,7 @@ public: /** * Set the system palette to the palette returned by getPalette. * @see getPalette + * @note This function is now deprecated. There is no replacement. */ void setSystemPalette(); @@ -222,47 +230,389 @@ public: protected: /** * Resets _curFrame and _startTime. Should be called from every close() function. + * @note This function is now deprecated. There is no replacement. */ void reset(); /** * Actual implementation of pause by subclasses. See pause() * for details. + * @note This function is now deprecated. There is no replacement. */ virtual void pauseVideoIntern(bool pause) {} /** * Add the time the video has been paused to maintain sync + * @note This function is now deprecated. There is no replacement. */ virtual void addPauseTime(uint32 ms) { _startTime += ms; } /** * Reset the pause start time (which should be called when seeking) + * @note This function is now deprecated. There is no replacement. */ void resetPauseStartTime(); /** * Update currently playing audio tracks with the new volume setting + * @note This function is now deprecated. There is no replacement. */ virtual void updateVolume() {} /** * Update currently playing audio tracks with the new balance setting + * @note This function is now deprecated. There is no replacement. */ virtual void updateBalance() {} int32 _curFrame; int32 _startTime; -private: +// FIXME: These are protected until the new API takes over this one +//private: uint32 _pauseLevel; uint32 _pauseStartTime; byte _audioVolume; int8 _audioBalance; }; +/** + * Improved interface for video decoder classes. + */ +class AdvancedVideoDecoder : public VideoDecoder { +public: + AdvancedVideoDecoder(); + virtual ~AdvancedVideoDecoder() {} + + // Old API Non-changing + // loadFile() + // loadStream() + // getWidth() + // getHeight() + // needsUpdate() + + // Old API Changing + virtual void close(); + bool isVideoLoaded() const; + virtual const Graphics::Surface *decodeNextFrame(); + const byte *getPalette(); + bool hasDirtyPalette() const { return _dirtyPalette; } + int getCurFrame() const; + uint32 getFrameCount() const; + uint32 getTime() const; + uint32 getTimeToNextFrame() const; + bool endOfVideo() const; + + // New API + /** + * Returns if a video is rewindable or not. + */ + bool isRewindable() const; + + /** + * Rewind a video to its beginning. + * + * If the video is playing, it will continue to play. + * + * @return true on success, false otherwise + */ + bool rewind(); + + /** + * Returns if a video is seekable or not. + */ + bool isSeekable() const; + + /** + * Seek to a given time in the video. + * + * If the video is playing, it will continue to play. + * + * @param time The time to seek to + * @return true on success, false otherwise + */ + bool seek(const Audio::Timestamp &time); + + /** + * Begin playback of the video. + * + * @note This has no effect is the video is already playing. + */ + void start(); + + /** + * Stop playback of the video. + * + * @note This will close() the video if it is not rewindable. + */ + void stop(); + + /** + * Returns if the video is currently playing or not. + * @todo Differentiate this function from endOfVideo() + */ + bool isPlaying() const { return _isPlaying; } + + /** + * Get the duration of the video. + * + * If the duration is unknown, this will return 0. + */ + virtual Audio::Timestamp getDuration() const; + + // Future API + //void setRate(const Common::Rational &rate); + //Common::Rational getRate() const; + //void setStartTime(const Audio::Timestamp &startTime); + //Audio::Timestamp getStartTime() const; + //void setStopTime(const Audio::Timestamp &stopTime); + //Audio::Timestamp getStopTime() const; + //void setSegment(const Audio::Timestamp &startTime, const Audio::Timestamp &stopTime); + +protected: + // Old API + void pauseVideoIntern(bool pause); + void updateVolume(); + void updateBalance(); + + // New API + + /** + * An abstract representation of a track in a movie. + */ + class Track { + public: + Track(); + virtual ~Track() {} + + /** + * The types of tracks this class can be. + */ + enum TrackType { + kTrackTypeNone, + kTrackTypeVideo, + kTrackTypeAudio + }; + + /** + * Get the type of track. + */ + virtual TrackType getTrackType() const = 0; + + /** + * Return if the track has finished. + */ + virtual bool endOfTrack() const = 0; + + /** + * Return if the track is rewindable. + */ + virtual bool isRewindable() const; + + /** + * Rewind the video to the beginning. + * @return true on success, false otherwise. + */ + virtual bool rewind(); + + /** + * Return if the track is seekable. + */ + virtual bool isSeekable() const { return false; } + + /** + * Seek to the given time. + * @param time The time to seek to. + * @return true on success, false otherwise. + */ + virtual bool seek(const Audio::Timestamp &time) { return false; } + + /** + * Start playback of the track. + */ + virtual void start() {} + + /** + * Stop playback of the track. + */ + virtual void stop() {} + + /** + * Set the pause status of the track. + */ + void pause(bool shouldPause) {} + + /** + * Return if the track is paused. + */ + bool isPaused() const { return _paused; } + + protected: + /** + * Function called by pause() for subclasses to implement. + */ + void pauseIntern(bool pause); + + private: + bool _paused; + }; + + /** + * An abstract representation of a video track. + */ + class VideoTrack : public Track { + public: + VideoTrack() {} + virtual ~VideoTrack() {} + + TrackType getTrackType() const { return kTrackTypeVideo; } + + // TODO: Document + virtual int getCurFrame() const = 0; + virtual int getFrameCount() const { return 0; } + virtual uint32 getNextFrameStartTime() const = 0; + virtual const Graphics::Surface *decodeNextFrame() = 0; + virtual const byte *getPalette() const { return 0; } + virtual bool hasDirtyPalette() const { return false; } + }; + + /** + * A VideoTrack that is played at a constant rate. + */ + class FixedRateVideoTrack : public virtual VideoTrack { + public: + FixedRateVideoTrack() {} + virtual ~FixedRateVideoTrack() {} + + uint32 getNextFrameStartTime() const; + + protected: + /** + * Get the rate at which this track is played. + */ + virtual Common::Rational getFrameRate() const = 0; + }; + + /** + * A VideoTrack with a known frame count that can be reliably + * used to figure out if the track has finished. + */ + class FixedLengthVideoTrack : public virtual VideoTrack { + public: + FixedLengthVideoTrack() {} + virtual ~FixedLengthVideoTrack() {} + + bool endOfTrack() const; + }; + + /** + * An abstract representation of an audio track. + */ + class AudioTrack : public Track { + public: + AudioTrack() {} + virtual ~AudioTrack() {} + + TrackType getTrackType() const { return kTrackTypeAudio; } + + virtual bool endOfTrack() const; + void start(); + void stop(); + + // TODO: Document + byte getVolume() const { return _volume; } + void setVolume(byte volume); + int8 getBalance() const { return _balance; } + void setBalance(int8 balance); + uint32 getRunningTime() const; + + virtual Audio::Mixer::SoundType getSoundType() const { return Audio::Mixer::kPlainSoundType; } + + protected: + void pauseIntern(bool pause); + + // TODO: Document + virtual Audio::AudioStream *getAudioStream() const = 0; + + private: + Audio::SoundHandle _handle; + byte _volume; + int8 _balance; + }; + + /** + * An AudioTrack that implements isRewindable() and rewind() using + * the RewindableAudioStream API. + */ + class RewindableAudioTrack : public AudioTrack { + public: + RewindableAudioTrack() {} + virtual ~RewindableAudioTrack() {} + + bool isRewindable() const { return true; } + bool rewind(); + + protected: + Audio::AudioStream *getAudioStream() const; + + // TODO: Document + virtual Audio::RewindableAudioStream *getRewindableAudioStream() const = 0; + }; + + /** + * An AudioTrack that implements isSeekable() and seek() using + * the SeekableAudioStream API. + */ + class SeekableAudioTrack : public AudioTrack { + public: + SeekableAudioTrack() {} + virtual ~SeekableAudioTrack() {} + + bool isSeekable() const { return true; } + bool seek(const Audio::Timestamp &time); + + protected: + Audio::AudioStream *getAudioStream() const; + + // TODO: Document + virtual Audio::SeekableAudioStream *getSeekableAudioStream() const = 0; + }; + + /** + * Decode enough data for the next frame and enough audio to last that long. + * + * This function is used by the default decodeNextFrame() function. A subclass + * of a Track may decide to just have its decodeNextFrame() function read + * and decode the frame. + */ + virtual void readNextPacket() {} + + /** + * Define a track to be used by this class. + * + * The pointer is then owned by this base class. + */ + void addTrack(Track *track); + +private: + // Tracks owned by this AdvancedVideoDecoder + typedef Common::List TrackList; + TrackList _tracks; + VideoTrack *findNextVideoTrack(); + const VideoTrack *findNextVideoTrack() const; + + // Current playback status + bool _isPlaying, _needsRewind; + Audio::Timestamp _audioStartOffset; + + // Palette settings from individual tracks + mutable bool _dirtyPalette; + const byte *_palette; +}; + /** * A VideoDecoder wrapper that implements getTimeToNextFrame() based on getFrameRate(). + * @note This class is now deprecated. Use AdvancedVideoDecoder instead. */ class FixedRateVideoDecoder : public virtual VideoDecoder { public: @@ -282,6 +632,7 @@ private: /** * A VideoDecoder that can be rewound back to the beginning. + * @note This class is now deprecated. Use AdvancedVideoDecoder instead. */ class RewindableVideoDecoder : public virtual VideoDecoder { public: @@ -293,6 +644,7 @@ public: /** * A VideoDecoder that can seek to a frame or point in time. + * @note This class is now deprecated. Use AdvancedVideoDecoder instead. */ class SeekableVideoDecoder : public virtual RewindableVideoDecoder { public: -- cgit v1.2.3 From a12b3ea2dde9db348424f401a35fca3167120011 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 20 Jul 2012 20:52:58 -0400 Subject: SCI: Move the SEQ code to the new VideoDecoder API --- engines/sci/console.cpp | 5 ++-- engines/sci/engine/kvideo.cpp | 7 +++-- engines/sci/video/seq_decoder.cpp | 61 +++++++++++++++++++-------------------- engines/sci/video/seq_decoder.h | 52 ++++++++++++++++++--------------- 4 files changed, 64 insertions(+), 61 deletions(-) diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 564bbbbd79..2a4ad1743d 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -250,9 +250,8 @@ void Console::postEnter() { #endif if (_videoFile.hasSuffix(".seq")) { - SeqDecoder *seqDecoder = new SeqDecoder(); - seqDecoder->setFrameDelay(_videoFrameDelay); - videoDecoder = seqDecoder; + videoDecoder = new SEQDecoder(_videoFrameDelay); + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); // TODO: Remove after new API is complete #ifdef ENABLE_SCI32 } else if (_videoFile.hasSuffix(".vmd")) { videoDecoder = new Video::VMDDecoder(g_system->getMixer()); diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index cb2a763da9..bfe32a8d82 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -162,15 +162,16 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) { } else { // DOS SEQ // SEQ's are called with no subops, just the string and delay - SeqDecoder *seqDecoder = new SeqDecoder(); - seqDecoder->setFrameDelay(argv[1].toUint16()); // Time between frames in ticks - videoDecoder = seqDecoder; + // Time is specified as ticks + videoDecoder = new SEQDecoder(argv[1].toUint16()); if (!videoDecoder->loadFile(filename)) { warning("Failed to open movie file %s", filename.c_str()); delete videoDecoder; videoDecoder = 0; } + + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); // TODO: Remove after new API is complete } } else { // Windows AVI diff --git a/engines/sci/video/seq_decoder.cpp b/engines/sci/video/seq_decoder.cpp index abd64911a7..a7b6346eca 100644 --- a/engines/sci/video/seq_decoder.cpp +++ b/engines/sci/video/seq_decoder.cpp @@ -41,33 +41,44 @@ enum seqFrameTypes { kSeqFrameDiff = 1 }; -SeqDecoder::SeqDecoder() { - _fileStream = 0; - _surface = 0; - _dirtyPalette = false; +SEQDecoder::SEQDecoder(uint frameDelay) : _frameDelay(frameDelay) { } -SeqDecoder::~SeqDecoder() { +SEQDecoder::~SEQDecoder() { close(); } -bool SeqDecoder::loadStream(Common::SeekableReadStream *stream) { +bool SEQDecoder::loadStream(Common::SeekableReadStream *stream) { close(); + addTrack(new SEQVideoTrack(stream, _frameDelay)); + + return true; +} + +SEQDecoder::SEQVideoTrack::SEQVideoTrack(Common::SeekableReadStream *stream, uint frameDelay) { + assert(stream); + assert(frameDelay != 0); _fileStream = stream; + _frameDelay = frameDelay; + _curFrame = -1; + _surface = new Graphics::Surface(); _surface->create(SEQ_SCREEN_WIDTH, SEQ_SCREEN_HEIGHT, Graphics::PixelFormat::createFormatCLUT8()); _frameCount = _fileStream->readUint16LE(); - // Set palette - int paletteChunkSize = _fileStream->readUint32LE(); - readPaletteChunk(paletteChunkSize); + // Set initial palette + readPaletteChunk(_fileStream->readUint32LE()); +} - return true; +SEQDecoder::SEQVideoTrack::~SEQVideoTrack() { + delete _fileStream; + _surface->free(); + delete _surface; } -void SeqDecoder::readPaletteChunk(uint16 chunkSize) { +void SEQDecoder::SEQVideoTrack::readPaletteChunk(uint16 chunkSize) { byte *paletteData = new byte[chunkSize]; _fileStream->read(paletteData, chunkSize); @@ -91,23 +102,7 @@ void SeqDecoder::readPaletteChunk(uint16 chunkSize) { delete[] paletteData; } -void SeqDecoder::close() { - if (!_fileStream) - return; - - _frameDelay = 0; - - delete _fileStream; - _fileStream = 0; - - _surface->free(); - delete _surface; - _surface = 0; - - reset(); -} - -const Graphics::Surface *SeqDecoder::decodeNextFrame() { +const Graphics::Surface *SEQDecoder::SEQVideoTrack::decodeNextFrame() { int16 frameWidth = _fileStream->readUint16LE(); int16 frameHeight = _fileStream->readUint16LE(); int16 frameLeft = _fileStream->readUint16LE(); @@ -142,9 +137,6 @@ const Graphics::Surface *SeqDecoder::decodeNextFrame() { delete[] buf; } - if (_curFrame == -1) - _startTime = g_system->getMillis(); - _curFrame++; return _surface; } @@ -159,7 +151,7 @@ const Graphics::Surface *SeqDecoder::decodeNextFrame() { } \ memcpy(dest + writeRow * SEQ_SCREEN_WIDTH + writeCol, litData + litPos, n); -bool SeqDecoder::decodeFrame(byte *rleData, int rleSize, byte *litData, int litSize, byte *dest, int left, int width, int height, int colorKey) { +bool SEQDecoder::SEQVideoTrack::decodeFrame(byte *rleData, int rleSize, byte *litData, int litSize, byte *dest, int left, int width, int height, int colorKey) { int writeRow = 0; int writeCol = left; int litPos = 0; @@ -237,4 +229,9 @@ bool SeqDecoder::decodeFrame(byte *rleData, int rleSize, byte *litData, int litS return true; } +const byte *SEQDecoder::SEQVideoTrack::getPalette() const { + _dirtyPalette = false; + return _palette; +} + } // End of namespace Sci diff --git a/engines/sci/video/seq_decoder.h b/engines/sci/video/seq_decoder.h index 800a3c9024..c07bcd748b 100644 --- a/engines/sci/video/seq_decoder.h +++ b/engines/sci/video/seq_decoder.h @@ -40,27 +40,16 @@ namespace Sci { /** * Implementation of the Sierra SEQ decoder, used in KQ6 DOS floppy/CD and GK1 DOS */ -class SeqDecoder : public Video::FixedRateVideoDecoder { +class SEQDecoder : public Video::AdvancedVideoDecoder { public: - SeqDecoder(); - virtual ~SeqDecoder(); + SEQDecoder(uint frameDelay); + virtual ~SEQDecoder(); bool loadStream(Common::SeekableReadStream *stream); - void close(); - void setFrameDelay(int frameDelay) { _frameDelay = frameDelay; } - - bool isVideoLoaded() const { return _fileStream != 0; } uint16 getWidth() const { return SEQ_SCREEN_WIDTH; } uint16 getHeight() const { return SEQ_SCREEN_HEIGHT; } - uint32 getFrameCount() const { return _frameCount; } - const Graphics::Surface *decodeNextFrame(); Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); } - const byte *getPalette() { _dirtyPalette = false; return _palette; } - bool hasDirtyPalette() const { return _dirtyPalette; } - -protected: - Common::Rational getFrameRate() const { assert(_frameDelay); return Common::Rational(60, _frameDelay); } private: enum { @@ -68,16 +57,33 @@ private: SEQ_SCREEN_HEIGHT = 200 }; - void readPaletteChunk(uint16 chunkSize); - bool decodeFrame(byte *rleData, int rleSize, byte *litData, int litSize, byte *dest, int left, int width, int height, int colorKey); + class SEQVideoTrack : public FixedRateVideoTrack, public FixedLengthVideoTrack { + public: + SEQVideoTrack(Common::SeekableReadStream *stream, uint frameDelay); + ~SEQVideoTrack(); + + int getCurFrame() const { return _curFrame; } + int getFrameCount() const { return _frameCount; } + const Graphics::Surface *decodeNextFrame(); + const byte *getPalette() const; + bool hasDirtyPalette() const { return _dirtyPalette; } + + protected: + Common::Rational getFrameRate() const { return Common::Rational(60, _frameDelay); } + + private: + void readPaletteChunk(uint16 chunkSize); + bool decodeFrame(byte *rleData, int rleSize, byte *litData, int litSize, byte *dest, int left, int width, int height, int colorKey); + + Common::SeekableReadStream *_fileStream; + int _curFrame, _frameCount; + byte _palette[256 * 3]; + mutable bool _dirtyPalette; + Graphics::Surface *_surface; + uint _frameDelay; + }; - uint16 _width, _height; - uint16 _frameDelay; - Common::SeekableReadStream *_fileStream; - byte _palette[256 * 3]; - bool _dirtyPalette; - uint32 _frameCount; - Graphics::Surface *_surface; + uint _frameDelay; }; } // End of namespace Sci -- cgit v1.2.3 From 5636c1fee05d1b718597017e003fa046c9791902 Mon Sep 17 00:00:00 2001 From: dhewg Date: Sat, 21 Jul 2012 16:20:24 +0200 Subject: WII: Adapt to mouse cursor dontScale API change --- backends/platform/wii/osystem.cpp | 2 +- backends/platform/wii/osystem.h | 2 +- backends/platform/wii/osystem_gfx.cpp | 28 ++++++++++++++-------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp index 681675529a..22a6495f8f 100644 --- a/backends/platform/wii/osystem.cpp +++ b/backends/platform/wii/osystem.cpp @@ -39,7 +39,7 @@ OSystem_Wii::OSystem_Wii() : _startup_time(0), - _cursorScale(1), + _cursorDontScale(true), _cursorPaletteDisabled(true), _cursorPalette(NULL), _cursorPaletteDirty(false), diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index abafa7f642..5d6998d0b6 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -56,7 +56,7 @@ class OSystem_Wii : public EventsBaseBackend, public PaletteManager { private: s64 _startup_time; - int _cursorScale; + bool _cursorDontScale; bool _cursorPaletteDisabled; u16 *_cursorPalette; bool _cursorPaletteDirty; diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp index 90e4d98c6b..fc0802dd4c 100644 --- a/backends/platform/wii/osystem_gfx.cpp +++ b/backends/platform/wii/osystem_gfx.cpp @@ -451,7 +451,7 @@ bool OSystem_Wii::needsScreenUpdate() { void OSystem_Wii::updateScreen() { static f32 ar; static gfx_screen_coords_t cc; - static int cs; + static f32 csx, csy; u32 now = getMillis(); if (now - _lastScreenUpdate < 1000 / MAX_FPS) @@ -466,7 +466,6 @@ void OSystem_Wii::updateScreen() { wii_memstats(); #endif - cs = _cursorScale; _lastScreenUpdate = now; if (_overlayVisible || _consoleVisible) @@ -488,12 +487,6 @@ void OSystem_Wii::updateScreen() { if (_gameRunning) ar = gfx_set_ar(4.0 / 3.0); - // ugly, but the modern theme sets a factor of 3, only god knows why - if (cs > 2) - cs = 1; - else - cs *= 2; - if (_overlayDirty) { gfx_tex_convert(&_texOverlay, _overlayPixels); _overlayDirty = false; @@ -503,10 +496,18 @@ void OSystem_Wii::updateScreen() { } if (_mouseVisible) { - cc.x = f32(_mouseX - cs * _mouseHotspotX) * _currentXScale; - cc.y = f32(_mouseY - cs * _mouseHotspotY) * _currentYScale; - cc.w = f32(_texMouse.width) * _currentXScale * cs; - cc.h = f32(_texMouse.height) * _currentYScale * cs; + if (_cursorDontScale) { + csx = 1.0f / _currentXScale; + csy = 1.0f / _currentYScale; + } else { + csx = 1.0f; + csy = 1.0f; + } + + cc.x = f32(_mouseX - csx * _mouseHotspotX) * _currentXScale; + cc.y = f32(_mouseY - csy * _mouseHotspotY) * _currentYScale; + cc.w = f32(_texMouse.width) * _currentXScale * csx; + cc.h = f32(_texMouse.height) * _currentYScale * csy; if (_texMouse.palette && _cursorPaletteDirty) { _texMouse.palette[_mouseKeyColor] = 0; @@ -745,8 +746,7 @@ void OSystem_Wii::setMouseCursor(const void *buf, uint w, uint h, int hotspotX, _mouseHotspotX = hotspotX; _mouseHotspotY = hotspotY; - // TODO: Adapt to new dontScale logic! - _cursorScale = 1; + _cursorDontScale = dontScale; if ((_texMouse.palette) && (oldKeycolor != _mouseKeyColor)) _cursorPaletteDirty = true; -- cgit v1.2.3 From e68d6c23fefde8df2ee23f3e23035c3b73a641e6 Mon Sep 17 00:00:00 2001 From: Klaus Reimer Date: Sat, 21 Jul 2012 16:39:28 +0200 Subject: WEBOS: Remove broken keymapper code which is not needed anymore anyway --- backends/platform/webos/webos.cpp | 20 -------------------- backends/platform/webos/webos.h | 3 --- 2 files changed, 23 deletions(-) diff --git a/backends/platform/webos/webos.cpp b/backends/platform/webos/webos.cpp index 4ec153a7e9..fc18628235 100644 --- a/backends/platform/webos/webos.cpp +++ b/backends/platform/webos/webos.cpp @@ -45,24 +45,4 @@ void OSystem_SDL_WebOS::initBackend() { OSystem_SDL::initBackend(); } -/** - * Gets the original SDL hardware key set, adds WebOS specific keys and - * returns the new key set. - * - * @return The hardware key set with added webOS specific keys. - */ -#ifdef ENABLE_KEYMAPPER -HardwareInputSet *OSystem_SDL_WebOS::getHardwareInputSet() { - // Get the original SDL hardware key set - HardwareInputSet *inputSet = OSystem_SDL::getHardwareInputSet(); - - // Add WebOS specific keys - inputSet->addHardwareInput(new HardwareInput("FORWARD", - KeyState((KeyCode) 229, 229, 0), "Forward")); - - // Return the modified hardware key set - return inputSet; -} -#endif - #endif diff --git a/backends/platform/webos/webos.h b/backends/platform/webos/webos.h index 8dfa43239c..dda56a70da 100644 --- a/backends/platform/webos/webos.h +++ b/backends/platform/webos/webos.h @@ -31,9 +31,6 @@ public: OSystem_SDL_WebOS(); virtual void initBackend(); -#ifdef ENABLE_KEYMAPPER - virtual Common::HardwareInputSet *getHardwareInputSet(); -#endif }; #endif -- cgit v1.2.3 From fb1edcd4fef7fd750b4af18745ca7b3151b56aae Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 21 Jul 2012 12:40:16 -0400 Subject: VIDEO: Add getWidth()/getHeight()/getPixelFormat() functions to VideoTrack The default implementations of those functions in AdvancedVideoDecoder now call into them. --- engines/sci/video/seq_decoder.h | 17 ++++++++--------- video/video_decoder.cpp | 24 ++++++++++++++++++++++++ video/video_decoder.h | 8 ++++++-- 3 files changed, 38 insertions(+), 11 deletions(-) diff --git a/engines/sci/video/seq_decoder.h b/engines/sci/video/seq_decoder.h index c07bcd748b..ac801d3f19 100644 --- a/engines/sci/video/seq_decoder.h +++ b/engines/sci/video/seq_decoder.h @@ -47,21 +47,15 @@ public: bool loadStream(Common::SeekableReadStream *stream); - uint16 getWidth() const { return SEQ_SCREEN_WIDTH; } - uint16 getHeight() const { return SEQ_SCREEN_HEIGHT; } - Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); } - private: - enum { - SEQ_SCREEN_WIDTH = 320, - SEQ_SCREEN_HEIGHT = 200 - }; - class SEQVideoTrack : public FixedRateVideoTrack, public FixedLengthVideoTrack { public: SEQVideoTrack(Common::SeekableReadStream *stream, uint frameDelay); ~SEQVideoTrack(); + uint16 getWidth() const { return SEQ_SCREEN_WIDTH; } + uint16 getHeight() const { return SEQ_SCREEN_HEIGHT; } + Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); } int getCurFrame() const { return _curFrame; } int getFrameCount() const { return _frameCount; } const Graphics::Surface *decodeNextFrame(); @@ -72,6 +66,11 @@ private: Common::Rational getFrameRate() const { return Common::Rational(60, _frameDelay); } private: + enum { + SEQ_SCREEN_WIDTH = 320, + SEQ_SCREEN_HEIGHT = 200 + }; + void readPaletteChunk(uint16 chunkSize); bool decodeFrame(byte *rleData, int rleSize, byte *litData, int litSize, byte *dest, int left, int width, int height, int colorKey); diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index ef2aeae94f..a8cf32575a 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -119,6 +119,30 @@ bool AdvancedVideoDecoder::isVideoLoaded() const { return !_tracks.empty(); } +uint16 AdvancedVideoDecoder::getWidth() const { + for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) + if ((*it)->getTrackType() == Track::kTrackTypeVideo) + return ((VideoTrack *)*it)->getWidth(); + + return 0; +} + +uint16 AdvancedVideoDecoder::getHeight() const { + for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) + if ((*it)->getTrackType() == Track::kTrackTypeVideo) + return ((VideoTrack *)*it)->getHeight(); + + return 0; +} + +Graphics::PixelFormat AdvancedVideoDecoder::getPixelFormat() const { + for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) + if ((*it)->getTrackType() == Track::kTrackTypeVideo) + return ((VideoTrack *)*it)->getPixelFormat(); + + return Graphics::PixelFormat(); +} + const Graphics::Surface *AdvancedVideoDecoder::decodeNextFrame() { readNextPacket(); VideoTrack *track = findNextVideoTrack(); diff --git a/video/video_decoder.h b/video/video_decoder.h index 1c359591b3..ede2872c6a 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -287,13 +287,14 @@ public: // Old API Non-changing // loadFile() // loadStream() - // getWidth() - // getHeight() // needsUpdate() // Old API Changing virtual void close(); bool isVideoLoaded() const; + virtual uint16 getWidth() const; + virtual uint16 getHeight() const; + virtual Graphics::PixelFormat getPixelFormat() const; virtual const Graphics::Surface *decodeNextFrame(); const byte *getPalette(); bool hasDirtyPalette() const { return _dirtyPalette; } @@ -468,6 +469,9 @@ protected: TrackType getTrackType() const { return kTrackTypeVideo; } // TODO: Document + virtual uint16 getWidth() const = 0; + virtual uint16 getHeight() const = 0; + virtual Graphics::PixelFormat getPixelFormat() const = 0; virtual int getCurFrame() const = 0; virtual int getFrameCount() const { return 0; } virtual uint32 getNextFrameStartTime() const = 0; -- cgit v1.2.3 From 10341d2b5722fb39cba39356c8596d857319a1ba Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 21 Jul 2012 14:39:03 -0400 Subject: VIDEO: Add getDuration() and getStartTime() functions to Track The AdvancedVideoDecoder::getDuration() function now attempts to calculate duration based on the longest track. --- video/video_decoder.cpp | 40 ++++++++++++++++++++++++++++++++++++++-- video/video_decoder.h | 29 ++++++++++++++++++++++++++++- 2 files changed, 66 insertions(+), 3 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index a8cf32575a..285290da6e 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -328,7 +328,21 @@ void AdvancedVideoDecoder::stop() { } Audio::Timestamp AdvancedVideoDecoder::getDuration() const { - return Audio::Timestamp(0, 1000); + Audio::Timestamp maxDuration(0, 1000); + + for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) { + Audio::Timestamp startTime = (*it)->getStartTime(); + Audio::Timestamp duration = (*it)->getDuration(); + + if (duration.totalNumberOfFrames() != 0) { + // HACK: Timestamp's + operator doesn't do framerate conversion :( + duration = duration + startTime.convertToFramerate(duration.framerate()); + if (duration > maxDuration) + maxDuration = duration; + } + } + + return maxDuration; } void AdvancedVideoDecoder::pauseVideoIntern(bool pause) { @@ -359,7 +373,15 @@ bool AdvancedVideoDecoder::Track::isRewindable() const { } bool AdvancedVideoDecoder::Track::rewind() { - return seek(Audio::Timestamp(0, 1000)); + return seek(getStartTime()); +} + +Audio::Timestamp AdvancedVideoDecoder::Track::getStartTime() const { + return Audio::Timestamp(0, 1000); +} + +Audio::Timestamp AdvancedVideoDecoder::Track::getDuration() const { + return Audio::Timestamp(0, 1000); } uint32 AdvancedVideoDecoder::FixedRateVideoTrack::getNextFrameStartTime() const { @@ -375,6 +397,14 @@ bool AdvancedVideoDecoder::FixedLengthVideoTrack::endOfTrack() const { return getCurFrame() >= (getFrameCount() - 1); } +Audio::Timestamp AdvancedVideoDecoder::FixedDurationVideoTrack::getDuration() const { + // Since Audio::Timestamp doesn't support a fractional frame rate, we're currently + // just converting to milliseconds. + Common::Rational time = getFrameCount() * 1000; + time /= getFrameRate(); + return time.toInt(); +} + bool AdvancedVideoDecoder::AudioTrack::endOfTrack() const { Audio::AudioStream *stream = getAudioStream(); return !stream || (!g_system->getMixer()->isSoundHandleActive(_handle) && stream->endOfData()); @@ -433,6 +463,12 @@ bool AdvancedVideoDecoder::RewindableAudioTrack::rewind() { return stream->rewind(); } +Audio::Timestamp AdvancedVideoDecoder::SeekableAudioTrack::getDuration() const { + Audio::SeekableAudioStream *stream = getSeekableAudioStream(); + assert(stream); + return stream->getLength(); +} + Audio::AudioStream *AdvancedVideoDecoder::SeekableAudioTrack::getAudioStream() const { return getSeekableAudioStream(); } diff --git a/video/video_decoder.h b/video/video_decoder.h index ede2872c6a..87d832eeb9 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -423,7 +423,7 @@ protected: /** * Seek to the given time. - * @param time The time to seek to. + * @param time The time to seek to, from the beginning of the video. * @return true on success, false otherwise. */ virtual bool seek(const Audio::Timestamp &time) { return false; } @@ -448,6 +448,19 @@ protected: */ bool isPaused() const { return _paused; } + /** + * Get the start time of the track (starting from the beginning of the + * movie). + */ + virtual Audio::Timestamp getStartTime() const; + + /** + * Get the duration of the track (starting from this track's start time). + * + * By default, this returns 0 for unknown. + */ + virtual Audio::Timestamp getDuration() const; + protected: /** * Function called by pause() for subclasses to implement. @@ -509,6 +522,18 @@ protected: bool endOfTrack() const; }; + /** + * A FixedRateVideoTrack and FixedLengthVideoTrack that implements the getDuration() + * function. + */ + class FixedDurationVideoTrack : public FixedRateVideoTrack, public FixedLengthVideoTrack { + public: + FixedDurationVideoTrack() {} + virtual ~FixedDurationVideoTrack() {} + + virtual Audio::Timestamp getDuration() const; + }; + /** * An abstract representation of an audio track. */ @@ -575,6 +600,8 @@ protected: bool isSeekable() const { return true; } bool seek(const Audio::Timestamp &time); + Audio::Timestamp getDuration() const; + protected: Audio::AudioStream *getAudioStream() const; -- cgit v1.2.3 From e74c306a7f3847128eb786c2d56f04d559e5a822 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 21 Jul 2012 14:43:08 -0400 Subject: SCI: Switch SEQDecoder to using the new FixedDurationVideoTrack subclass --- engines/sci/video/seq_decoder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/video/seq_decoder.h b/engines/sci/video/seq_decoder.h index ac801d3f19..75d7ce6c3d 100644 --- a/engines/sci/video/seq_decoder.h +++ b/engines/sci/video/seq_decoder.h @@ -48,7 +48,7 @@ public: bool loadStream(Common::SeekableReadStream *stream); private: - class SEQVideoTrack : public FixedRateVideoTrack, public FixedLengthVideoTrack { + class SEQVideoTrack : public FixedDurationVideoTrack { public: SEQVideoTrack(Common::SeekableReadStream *stream, uint frameDelay); ~SEQVideoTrack(); -- cgit v1.2.3 From c3cc3620c0d66a2ea7eac9738ead934f3b6381b0 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 21 Jul 2012 14:50:10 -0400 Subject: VIDEO: When adding tracks, keep them in sync with the main video status --- video/video_decoder.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 285290da6e..67e53c6b47 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -481,6 +481,12 @@ bool AdvancedVideoDecoder::SeekableAudioTrack::seek(const Audio::Timestamp &time void AdvancedVideoDecoder::addTrack(Track *track) { _tracks.push_back(track); + + if (isPaused()) + track->pause(true); + + if (isPlaying()) + track->start(); } AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack() { -- cgit v1.2.3 From 1d565a26610a174c16b58b569fe413f3acf9bd75 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 21 Jul 2012 17:11:09 -0400 Subject: VIDEO: Fix volume/balance settings in AdvancedVideoDecoder --- video/video_decoder.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 67e53c6b47..07fd225dcf 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -98,6 +98,9 @@ AdvancedVideoDecoder::AdvancedVideoDecoder() { _dirtyPalette = false; _palette = 0; _isPlaying = false; + _audioVolume = Audio::Mixer::kMaxChannelVolume; + _audioBalance = 0; + _pauseLevel = 0; } void AdvancedVideoDecoder::close() { @@ -112,7 +115,9 @@ void AdvancedVideoDecoder::close() { _dirtyPalette = false; _palette = 0; _startTime = 0; - reset(); + _audioVolume = Audio::Mixer::kMaxChannelVolume; + _audioBalance = 0; + _pauseLevel = 0; } bool AdvancedVideoDecoder::isVideoLoaded() const { @@ -482,9 +487,17 @@ bool AdvancedVideoDecoder::SeekableAudioTrack::seek(const Audio::Timestamp &time void AdvancedVideoDecoder::addTrack(Track *track) { _tracks.push_back(track); + // Update volume settings if it's an audio track + if (track->getTrackType() == Track::kTrackTypeAudio) { + ((AudioTrack *)track)->setVolume(_audioVolume); + ((AudioTrack *)track)->setBalance(_audioBalance); + } + + // Keep the track paused if we're paused if (isPaused()) track->pause(true); + // Start the track if we're playing if (isPlaying()) track->start(); } -- cgit v1.2.3 From fc1163ac28aae1c7bc9f8f9d3877c6f368b4b19c Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 21 Jul 2012 17:30:06 -0400 Subject: VIDEO: Allow for disabling of automatic audio sync in AdvancedVideoDecoder --- video/video_decoder.cpp | 12 +++++++----- video/video_decoder.h | 7 +++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 07fd225dcf..3312b2530d 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -194,12 +194,14 @@ uint32 AdvancedVideoDecoder::getTime() const { if (isPaused()) return _pauseStartTime - _startTime; - for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) { - if ((*it)->getTrackType() == Track::kTrackTypeAudio) { - uint32 time = ((const AudioTrack *)*it)->getRunningTime(); + if (useAudioSync()) { + for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) { + if ((*it)->getTrackType() == Track::kTrackTypeAudio) { + uint32 time = ((const AudioTrack *)*it)->getRunningTime(); - if (time != 0) - return time + _audioStartOffset.msecs(); + if (time != 0) + return time + _audioStartOffset.msecs(); + } } } diff --git a/video/video_decoder.h b/video/video_decoder.h index 87d832eeb9..9496148de6 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -625,6 +625,13 @@ protected: */ void addTrack(Track *track); + /** + * Whether or not getTime() will sync with a playing audio track. + * + * A subclass should override this to disable this feature. + */ + virtual bool useAudioSync() const { return true; } + private: // Tracks owned by this AdvancedVideoDecoder typedef Common::List TrackList; -- cgit v1.2.3 From 5cdb0f71a499250d36d79d0f8ba85ff2d370f9aa Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 21 Jul 2012 17:30:43 -0400 Subject: VIDEO: Fix AudioTrack::endOfTrack() --- video/video_decoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 3312b2530d..82cba7e6e2 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -414,7 +414,7 @@ Audio::Timestamp AdvancedVideoDecoder::FixedDurationVideoTrack::getDuration() co bool AdvancedVideoDecoder::AudioTrack::endOfTrack() const { Audio::AudioStream *stream = getAudioStream(); - return !stream || (!g_system->getMixer()->isSoundHandleActive(_handle) && stream->endOfData()); + return !stream || !g_system->getMixer()->isSoundHandleActive(_handle) || stream->endOfData(); } void AdvancedVideoDecoder::AudioTrack::setVolume(byte volume) { -- cgit v1.2.3 From 24c97b89138190d211b1f19d5575c9029c0329b2 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 21 Jul 2012 17:31:00 -0400 Subject: VIDEO: Move PSXStreamDecoder to the new VideoDecoder API --- engines/sword1/animation.cpp | 1 + engines/sword2/animation.cpp | 1 + video/psx_decoder.cpp | 256 +++++++++++++++++++++---------------------- video/psx_decoder.h | 112 +++++++++++-------- 4 files changed, 195 insertions(+), 175 deletions(-) diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index ddafd964eb..49c5ef7312 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -189,6 +189,7 @@ bool MoviePlayer::load(uint32 id) { // Need to load here in case it fails in which case we'd need // to go back to paletted mode if (_decoder->loadFile(filename)) { + ((Video::AdvancedVideoDecoder *)_decoder)->start(); // TODO: Remove after new API is complete return true; } else { initGraphics(g_system->getWidth(), g_system->getHeight(), true); diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index 5e3f8929e9..c1cf33ff09 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -99,6 +99,7 @@ bool MoviePlayer::load(const char *name) { // Need to load here in case it fails in which case we'd need // to go back to paletted mode if (_decoder->loadFile(filename)) { + ((Video::AdvancedVideoDecoder *)_decoder)->start(); // TODO: Remove after new API is complete return true; } else { initGraphics(640, 480, true); diff --git a/video/psx_decoder.cpp b/video/psx_decoder.cpp index df91a2badd..93bf711c25 100644 --- a/video/psx_decoder.cpp +++ b/video/psx_decoder.cpp @@ -149,22 +149,12 @@ static const uint32 s_huffmanACSymbols[AC_CODE_COUNT] = { END_OF_BLOCK }; -PSXStreamDecoder::PSXStreamDecoder(CDSpeed speed, uint32 frameCount) : _nextFrameStartTime(0, speed), _frameCount(frameCount) { +PSXStreamDecoder::PSXStreamDecoder(CDSpeed speed, uint32 frameCount) : _speed(speed), _frameCount(frameCount) { _stream = 0; - _audStream = 0; - _surface = new Graphics::Surface(); - _yBuffer = _cbBuffer = _crBuffer = 0; - _acHuffman = new Common::Huffman(0, AC_CODE_COUNT, s_huffmanACCodes, s_huffmanACLengths, s_huffmanACSymbols); - _dcHuffmanChroma = new Common::Huffman(0, DC_CODE_COUNT, s_huffmanDCChromaCodes, s_huffmanDCChromaLengths, s_huffmanDCSymbols); - _dcHuffmanLuma = new Common::Huffman(0, DC_CODE_COUNT, s_huffmanDCLumaCodes, s_huffmanDCLumaLengths, s_huffmanDCSymbols); } PSXStreamDecoder::~PSXStreamDecoder() { close(); - delete _surface; - delete _acHuffman; - delete _dcHuffmanLuma; - delete _dcHuffmanChroma; } #define RAW_CD_SECTOR_SIZE 2352 @@ -178,95 +168,30 @@ bool PSXStreamDecoder::loadStream(Common::SeekableReadStream *stream) { close(); _stream = stream; - - Common::SeekableReadStream *sector = readSector(); - - if (!sector) { - close(); - return false; - } - - // Rip out video info from the first frame - sector->seek(18); - byte sectorType = sector->readByte() & CDXA_TYPE_MASK; - - if (sectorType != CDXA_TYPE_VIDEO && sectorType != CDXA_TYPE_DATA) { - close(); - return false; - } - - sector->seek(40); - - uint16 width = sector->readUint16LE(); - uint16 height = sector->readUint16LE(); - _surface->create(width, height, g_system->getScreenFormat()); - - _macroBlocksW = (width + 15) / 16; - _macroBlocksH = (height + 15) / 16; - _yBuffer = new byte[_macroBlocksW * _macroBlocksH * 16 * 16]; - _cbBuffer = new byte[_macroBlocksW * _macroBlocksH * 8 * 8]; - _crBuffer = new byte[_macroBlocksW * _macroBlocksH * 8 * 8]; - - delete sector; - _stream->seek(0); + readNextPacket(); return true; } void PSXStreamDecoder::close() { - if (!_stream) - return; + AdvancedVideoDecoder::close(); + _audioTrack = 0; + _videoTrack = 0; + _frameCount = 0; delete _stream; _stream = 0; - - // Deinitialize sound - g_system->getMixer()->stopHandle(_audHandle); - _audStream = 0; - - _surface->free(); - - memset(&_adpcmStatus, 0, sizeof(_adpcmStatus)); - - _macroBlocksW = _macroBlocksH = 0; - delete[] _yBuffer; _yBuffer = 0; - delete[] _cbBuffer; _cbBuffer = 0; - delete[] _crBuffer; _crBuffer = 0; - - reset(); -} - -uint32 PSXStreamDecoder::getTime() const { - // TODO: Currently, the audio is always after the video so using this - // can often lead to gaps in the audio... - //if (_audStream) - // return _mixer->getSoundElapsedTime(_audHandle); - - return VideoDecoder::getTime(); -} - -uint32 PSXStreamDecoder::getTimeToNextFrame() const { - if (!isVideoLoaded() || endOfVideo()) - return 0; - - uint32 nextTimeMillis = _nextFrameStartTime.msecs(); - uint32 elapsedTime = getTime(); - - if (elapsedTime > nextTimeMillis) - return 0; - - return nextTimeMillis - elapsedTime; } #define VIDEO_DATA_CHUNK_SIZE 2016 #define VIDEO_DATA_HEADER_SIZE 56 -const Graphics::Surface *PSXStreamDecoder::decodeNextFrame() { +void PSXStreamDecoder::readNextPacket() { Common::SeekableReadStream *sector = 0; byte *partialFrame = 0; int sectorsRead = 0; - while (!endOfVideo()) { + while (_stream->pos() < _stream->size()) { sector = readSector(); sectorsRead++; @@ -284,6 +209,11 @@ const Graphics::Surface *PSXStreamDecoder::decodeNextFrame() { case CDXA_TYPE_DATA: case CDXA_TYPE_VIDEO: if (track == 1) { + if (!_videoTrack) { + _videoTrack = new PSXVideoTrack(sector, _speed, _frameCount); + addTrack(_videoTrack); + } + sector->seek(28); uint16 curSector = sector->readUint16LE(); uint16 sectorCount = sector->readUint16LE(); @@ -303,35 +233,27 @@ const Graphics::Surface *PSXStreamDecoder::decodeNextFrame() { // Done assembling the frame Common::SeekableReadStream *frame = new Common::MemoryReadStream(partialFrame, frameSize, DisposeAfterUse::YES); - decodeFrame(frame); + _videoTrack->decodeFrame(frame, sectorsRead); delete frame; delete sector; - - _curFrame++; - if (_curFrame == 0) - _startTime = g_system->getMillis(); - - // Increase the time by the amount of sectors we read - // One may notice that this is still not the most precise - // method since a frame takes up the time its sectors took - // up instead of the amount of time it takes the next frame - // to be read from the sectors. The actual frame rate should - // be constant instead of variable, so the slight difference - // in a frame's showing time is negligible (1/150 of a second). - _nextFrameStartTime = _nextFrameStartTime.addFrames(sectorsRead); - - return _surface; + return; } } else error("Unhandled multi-track video"); break; case CDXA_TYPE_AUDIO: // We only handle one audio channel so far - if (track == 1) - queueAudioFromSector(sector); - else + if (track == 1) { + if (!_audioTrack) { + _audioTrack = new PSXAudioTrack(sector); + addTrack(_audioTrack); + } + + _audioTrack->queueAudioFromSector(sector); + } else { warning("Unhandled multi-track audio"); + } break; default: // This shows up way too often, but the other sectors @@ -343,7 +265,19 @@ const Graphics::Surface *PSXStreamDecoder::decodeNextFrame() { delete sector; } - return 0; + if (_stream->pos() >= _stream->size()) { + if (_videoTrack) + _videoTrack->setEndOfTrack(); + + if (_audioTrack) + _audioTrack->setEndOfTrack(); + } +} + +bool PSXStreamDecoder::useAudioSync() const { + // Audio sync is disabled since most audio data comes after video + // data. + return false; } static const byte s_syncHeader[12] = { 0x00, 0xff ,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 }; @@ -373,20 +307,29 @@ static const int s_xaTable[5][2] = { { 122, -60 } }; -void PSXStreamDecoder::queueAudioFromSector(Common::SeekableReadStream *sector) { +PSXStreamDecoder::PSXAudioTrack::PSXAudioTrack(Common::SeekableReadStream *sector) { assert(sector); + _endOfTrack = false; - if (!_audStream) { - // Initialize audio stream - sector->seek(19); - byte format = sector->readByte(); + sector->seek(19); + byte format = sector->readByte(); + bool stereo = (format & (1 << 0)) != 0; + uint rate = (format & (1 << 2)) ? 18900 : 37800; + _audStream = Audio::makeQueuingAudioStream(rate, stereo); - bool stereo = (format & (1 << 0)) != 0; - uint rate = (format & (1 << 2)) ? 18900 : 37800; + memset(&_adpcmStatus, 0, sizeof(_adpcmStatus)); +} - _audStream = Audio::makeQueuingAudioStream(rate, stereo); - g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audHandle, _audStream, -1, getVolume(), getBalance()); - } +PSXStreamDecoder::PSXAudioTrack::~PSXAudioTrack() { + delete _audStream; +} + +bool PSXStreamDecoder::PSXAudioTrack::endOfTrack() const { + return AudioTrack::endOfTrack() && _endOfTrack; +} + +void PSXStreamDecoder::PSXAudioTrack::queueAudioFromSector(Common::SeekableReadStream *sector) { + assert(sector); sector->seek(24); @@ -472,7 +415,54 @@ void PSXStreamDecoder::queueAudioFromSector(Common::SeekableReadStream *sector) delete[] buf; } -void PSXStreamDecoder::decodeFrame(Common::SeekableReadStream *frame) { +Audio::AudioStream *PSXStreamDecoder::PSXAudioTrack::getAudioStream() const { + return _audStream; +} + + +PSXStreamDecoder::PSXVideoTrack::PSXVideoTrack(Common::SeekableReadStream *firstSector, CDSpeed speed, int frameCount) : _nextFrameStartTime(0, speed), _frameCount(frameCount) { + assert(firstSector); + + firstSector->seek(40); + uint16 width = firstSector->readUint16LE(); + uint16 height = firstSector->readUint16LE(); + _surface = new Graphics::Surface(); + _surface->create(width, height, g_system->getScreenFormat()); + + _macroBlocksW = (width + 15) / 16; + _macroBlocksH = (height + 15) / 16; + _yBuffer = new byte[_macroBlocksW * _macroBlocksH * 16 * 16]; + _cbBuffer = new byte[_macroBlocksW * _macroBlocksH * 8 * 8]; + _crBuffer = new byte[_macroBlocksW * _macroBlocksH * 8 * 8]; + + _endOfTrack = false; + _curFrame = -1; + _acHuffman = new Common::Huffman(0, AC_CODE_COUNT, s_huffmanACCodes, s_huffmanACLengths, s_huffmanACSymbols); + _dcHuffmanChroma = new Common::Huffman(0, DC_CODE_COUNT, s_huffmanDCChromaCodes, s_huffmanDCChromaLengths, s_huffmanDCSymbols); + _dcHuffmanLuma = new Common::Huffman(0, DC_CODE_COUNT, s_huffmanDCLumaCodes, s_huffmanDCLumaLengths, s_huffmanDCSymbols); +} + +PSXStreamDecoder::PSXVideoTrack::~PSXVideoTrack() { + _surface->free(); + delete _surface; + + delete[] _yBuffer; + delete[] _cbBuffer; + delete[] _crBuffer; + delete _acHuffman; + delete _dcHuffmanChroma; + delete _dcHuffmanLuma; +} + +uint32 PSXStreamDecoder::PSXVideoTrack::getNextFrameStartTime() const { + return _nextFrameStartTime.msecs(); +} + +const Graphics::Surface *PSXStreamDecoder::PSXVideoTrack::decodeNextFrame() { + return _surface; +} + +void PSXStreamDecoder::PSXVideoTrack::decodeFrame(Common::SeekableReadStream *frame, uint sectorCount) { // A frame is essentially an MPEG-1 intra frame Common::BitStream16LEMSB bits(frame); @@ -494,9 +484,20 @@ void PSXStreamDecoder::decodeFrame(Common::SeekableReadStream *frame) { // Output data onto the frame Graphics::convertYUV420ToRGB(_surface, _yBuffer, _cbBuffer, _crBuffer, _surface->w, _surface->h, _macroBlocksW * 16, _macroBlocksW * 8); + + _curFrame++; + + // Increase the time by the amount of sectors we read + // One may notice that this is still not the most precise + // method since a frame takes up the time its sectors took + // up instead of the amount of time it takes the next frame + // to be read from the sectors. The actual frame rate should + // be constant instead of variable, so the slight difference + // in a frame's showing time is negligible (1/150 of a second). + _nextFrameStartTime = _nextFrameStartTime.addFrames(sectorCount); } -void PSXStreamDecoder::decodeMacroBlock(Common::BitStream *bits, int mbX, int mbY, uint16 scale, uint16 version) { +void PSXStreamDecoder::PSXVideoTrack::decodeMacroBlock(Common::BitStream *bits, int mbX, int mbY, uint16 scale, uint16 version) { int pitchY = _macroBlocksW * 16; int pitchC = _macroBlocksW * 8; @@ -533,7 +534,7 @@ static const byte s_quantizationTable[8 * 8] = { 27, 29, 35, 38, 46, 56, 69, 83 }; -void PSXStreamDecoder::dequantizeBlock(int *coefficients, float *block, uint16 scale) { +void PSXStreamDecoder::PSXVideoTrack::dequantizeBlock(int *coefficients, float *block, uint16 scale) { // Dequantize the data, un-zig-zagging as we go along for (int i = 0; i < 8 * 8; i++) { if (i == 0) // Special case for the DC coefficient @@ -543,7 +544,7 @@ void PSXStreamDecoder::dequantizeBlock(int *coefficients, float *block, uint16 s } } -int PSXStreamDecoder::readDC(Common::BitStream *bits, uint16 version, PlaneType plane) { +int PSXStreamDecoder::PSXVideoTrack::readDC(Common::BitStream *bits, uint16 version, PlaneType plane) { // Version 2 just has its coefficient as 10-bits if (version == 2) return readSignedCoefficient(bits); @@ -573,7 +574,7 @@ int PSXStreamDecoder::readDC(Common::BitStream *bits, uint16 version, PlaneType if (count > 63) \ error("PSXStreamDecoder::readAC(): Too many coefficients") -void PSXStreamDecoder::readAC(Common::BitStream *bits, int *block) { +void PSXStreamDecoder::PSXVideoTrack::readAC(Common::BitStream *bits, int *block) { // Clear the block first for (int i = 0; i < 63; i++) block[i] = 0; @@ -608,7 +609,7 @@ void PSXStreamDecoder::readAC(Common::BitStream *bits, int *block) { } } -int PSXStreamDecoder::readSignedCoefficient(Common::BitStream *bits) { +int PSXStreamDecoder::PSXVideoTrack::readSignedCoefficient(Common::BitStream *bits) { uint val = bits->getBits(10); // extend the sign @@ -630,7 +631,7 @@ static const double s_idct8x8[8][8] = { { 0.353553390593274, -0.490392640201615, 0.461939766255643, -0.415734806151273, 0.353553390593273, -0.277785116509801, 0.191341716182545, -0.097545161008064 } }; -void PSXStreamDecoder::idct(float *dequantData, float *result) { +void PSXStreamDecoder::PSXVideoTrack::idct(float *dequantData, float *result) { // IDCT code based on JPEG's IDCT code // TODO: Switch to the integer-based one mentioned in the docs // This is by far the costliest operation here @@ -669,7 +670,7 @@ void PSXStreamDecoder::idct(float *dequantData, float *result) { } } -void PSXStreamDecoder::decodeBlock(Common::BitStream *bits, byte *block, int pitch, uint16 scale, uint16 version, PlaneType plane) { +void PSXStreamDecoder::PSXVideoTrack::decodeBlock(Common::BitStream *bits, byte *block, int pitch, uint16 scale, uint16 version, PlaneType plane) { // Version 2 just has signed 10 bits for DC // Version 3 has them huffman coded int coefficients[8 * 8]; @@ -686,22 +687,13 @@ void PSXStreamDecoder::decodeBlock(Common::BitStream *bits, byte *block, int pit // Now output the data for (int y = 0; y < 8; y++) { - byte *start = block + pitch * y; + byte *dst = block + pitch * y; // Convert the result to be in the range [0, 255] for (int x = 0; x < 8; x++) - *start++ = (int)CLIP(idctData[y * 8 + x], -128.0f, 127.0f) + 128; + *dst++ = (int)CLIP(idctData[y * 8 + x], -128.0f, 127.0f) + 128; } } -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 4364ec4bbb..2a9dedf77f 100644 --- a/video/psx_decoder.h +++ b/video/psx_decoder.h @@ -56,7 +56,7 @@ namespace Video { * - sword1 (psx) * - sword2 (psx) */ -class PSXStreamDecoder : public VideoDecoder { +class PSXStreamDecoder : public AdvancedVideoDecoder { public: // CD speed in sectors/second // Calling code should use these enum values instead of the constants @@ -71,59 +71,85 @@ public: bool loadStream(Common::SeekableReadStream *stream); void close(); - bool isVideoLoaded() const { return _stream != 0; } - uint16 getWidth() const { return _surface->w; } - uint16 getHeight() const { return _surface->h; } - uint32 getFrameCount() const { return _frameCount; } - uint32 getTime() const; - uint32 getTimeToNextFrame() const; - const Graphics::Surface *decodeNextFrame(); - Graphics::PixelFormat getPixelFormat() const { return _surface->format; } - bool endOfVideo() const { return _stream->pos() >= _stream->size(); } - protected: - // VideoDecoder API - void updateVolume(); - void updateBalance(); + void readNextPacket(); + bool useAudioSync() const; private: - void initCommon(); - Common::SeekableReadStream *_stream; - Graphics::Surface *_surface; + class PSXVideoTrack : public VideoTrack { + public: + PSXVideoTrack(Common::SeekableReadStream *firstSector, CDSpeed speed, int frameCount); + ~PSXVideoTrack(); + + uint16 getWidth() const { return _surface->w; } + uint16 getHeight() const { return _surface->h; } + Graphics::PixelFormat getPixelFormat() const { return _surface->format; } + bool endOfTrack() const { return _endOfTrack; } + int getCurFrame() const { return _curFrame; } + int getFrameCount() const { return _frameCount; } + uint32 getNextFrameStartTime() const; + const Graphics::Surface *decodeNextFrame(); + + void setEndOfTrack() { _endOfTrack = true; } + void decodeFrame(Common::SeekableReadStream *frame, uint sectorCount); + + private: + Graphics::Surface *_surface; + uint32 _frameCount; + Audio::Timestamp _nextFrameStartTime; + bool _endOfTrack; + int _curFrame; + + enum PlaneType { + kPlaneY = 0, + kPlaneU = 1, + kPlaneV = 2 + }; + + uint16 _macroBlocksW, _macroBlocksH; + byte *_yBuffer, *_cbBuffer, *_crBuffer; + void decodeMacroBlock(Common::BitStream *bits, int mbX, int mbY, uint16 scale, uint16 version); + void decodeBlock(Common::BitStream *bits, byte *block, int pitch, uint16 scale, uint16 version, PlaneType plane); + + void readAC(Common::BitStream *bits, int *block); + Common::Huffman *_acHuffman; + + int readDC(Common::BitStream *bits, uint16 version, PlaneType plane); + Common::Huffman *_dcHuffmanLuma, *_dcHuffmanChroma; + int _lastDC[3]; + + void dequantizeBlock(int *coefficients, float *block, uint16 scale); + void idct(float *dequantData, float *result); + int readSignedCoefficient(Common::BitStream *bits); + }; - uint32 _frameCount; - Audio::Timestamp _nextFrameStartTime; + class PSXAudioTrack : public AudioTrack { + public: + PSXAudioTrack(Common::SeekableReadStream *sector); + ~PSXAudioTrack(); - Audio::SoundHandle _audHandle; - Audio::QueuingAudioStream *_audStream; - void queueAudioFromSector(Common::SeekableReadStream *sector); + bool endOfTrack() const; - enum PlaneType { - kPlaneY = 0, - kPlaneU = 1, - kPlaneV = 2 - }; + void setEndOfTrack() { _endOfTrack = true; } + void queueAudioFromSector(Common::SeekableReadStream *sector); - uint16 _macroBlocksW, _macroBlocksH; - byte *_yBuffer, *_cbBuffer, *_crBuffer; - void decodeFrame(Common::SeekableReadStream *frame); - void decodeMacroBlock(Common::BitStream *bits, int mbX, int mbY, uint16 scale, uint16 version); - void decodeBlock(Common::BitStream *bits, byte *block, int pitch, uint16 scale, uint16 version, PlaneType plane); + private: + Audio::AudioStream *getAudioStream() const; - void readAC(Common::BitStream *bits, int *block); - Common::Huffman *_acHuffman; + Audio::QueuingAudioStream *_audStream; - int readDC(Common::BitStream *bits, uint16 version, PlaneType plane); - Common::Huffman *_dcHuffmanLuma, *_dcHuffmanChroma; - int _lastDC[3]; + struct ADPCMStatus { + int16 sample[2]; + } _adpcmStatus[2]; - void dequantizeBlock(int *coefficients, float *block, uint16 scale); - void idct(float *dequantData, float *result); - int readSignedCoefficient(Common::BitStream *bits); + bool _endOfTrack; + }; - struct ADPCMStatus { - int16 sample[2]; - } _adpcmStatus[2]; + CDSpeed _speed; + uint32 _frameCount; + Common::SeekableReadStream *_stream; + PSXVideoTrack *_videoTrack; + PSXAudioTrack *_audioTrack; Common::SeekableReadStream *readSector(); }; -- cgit v1.2.3 From 144b9ce9189260973994ca83b6e2b29126ef269a Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 21 Jul 2012 17:38:24 -0400 Subject: VIDEO: Don't try to sync video off of finished audio tracks --- video/video_decoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 82cba7e6e2..3cce2dea02 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -196,7 +196,7 @@ uint32 AdvancedVideoDecoder::getTime() const { if (useAudioSync()) { for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) { - if ((*it)->getTrackType() == Track::kTrackTypeAudio) { + if ((*it)->getTrackType() == Track::kTrackTypeAudio && !(*it)->endOfTrack()) { uint32 time = ((const AudioTrack *)*it)->getRunningTime(); if (time != 0) -- cgit v1.2.3 From 067e02e90b7fbe3406cbc7b5b08d63ae281b360c Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 21 Jul 2012 17:52:16 -0400 Subject: VIDEO: Add StreamFileAudioTrack wrapper --- video/video_decoder.cpp | 15 +++++++++++++++ video/video_decoder.h | 21 +++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 3cce2dea02..4ac914927e 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -486,6 +486,21 @@ bool AdvancedVideoDecoder::SeekableAudioTrack::seek(const Audio::Timestamp &time return stream->seek(time); } +AdvancedVideoDecoder::StreamFileAudioTrack::StreamFileAudioTrack() { + _stream = 0; +} + +AdvancedVideoDecoder::StreamFileAudioTrack::~StreamFileAudioTrack() { + delete _stream; +} + +bool AdvancedVideoDecoder::StreamFileAudioTrack::loadFromFile(const Common::String &baseName) { + // TODO: Make sure the stream isn't being played + delete _stream; + _stream = Audio::SeekableAudioStream::openStreamFile(baseName); + return _stream != 0; +} + void AdvancedVideoDecoder::addTrack(Track *track) { _tracks.push_back(track); diff --git a/video/video_decoder.h b/video/video_decoder.h index 9496148de6..3e991ade66 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -609,6 +609,27 @@ protected: virtual Audio::SeekableAudioStream *getSeekableAudioStream() const = 0; }; + /** + * A SeekableAudioTrack that constructs its SeekableAudioStream using + * SeekableAudioStream::openStreamFile() + */ + class StreamFileAudioTrack : public SeekableAudioTrack { + public: + StreamFileAudioTrack(); + ~StreamFileAudioTrack(); + + /** + * Load the track from a file with the given base name. + * + * @return true on success, false otherwise + */ + bool loadFromFile(const Common::String &baseName); + + protected: + Audio::SeekableAudioStream *_stream; + Audio::SeekableAudioStream *getSeekableAudioStream() const { return _stream; } + }; + /** * Decode enough data for the next frame and enough audio to last that long. * -- cgit v1.2.3 From 31b00ac139ee7a4fa49b876a0560ad7282f47d59 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 22 Jul 2012 04:14:58 +0100 Subject: TEENAGENT: Fix for bug #3540542 ("string truncated after diving"). This was a typo in the string offset. --- engines/teenagent/callbacks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp index 8882531d27..b0ccb8844d 100644 --- a/engines/teenagent/callbacks.cpp +++ b/engines/teenagent/callbacks.cpp @@ -3925,7 +3925,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { displayMessage(0x39ae); break; default: - displayMessage(0x39b7); + displayMessage(0x3ab7); } return true; -- cgit v1.2.3 From 4c9c22b374569e9f93b30137b57eaa2912beffc4 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 22 Jul 2012 00:39:10 -0400 Subject: VIDEO: Make seek/rewind functions in AdvancedVideoDecoder virtual This is to allow for seeking in videos where not everything is indexed --- video/video_decoder.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/video/video_decoder.h b/video/video_decoder.h index 3e991ade66..3d8b09f26e 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -306,33 +306,37 @@ public: // New API /** - * Returns if a video is rewindable or not. + * Returns if a video is rewindable or not. The default implementation + * polls each track for rewindability. */ - bool isRewindable() const; + virtual bool isRewindable() const; /** * Rewind a video to its beginning. * - * If the video is playing, it will continue to play. + * If the video is playing, it will continue to play. The default + * implementation will rewind each track. * * @return true on success, false otherwise */ - bool rewind(); + virtual bool rewind(); /** - * Returns if a video is seekable or not. + * Returns if a video is seekable or not. The default implementation + * polls each track for seekability. */ - bool isSeekable() const; + virtual bool isSeekable() const; /** * Seek to a given time in the video. * - * If the video is playing, it will continue to play. + * If the video is playing, it will continue to play. The default + * implementation will seek each track. * * @param time The time to seek to * @return true on success, false otherwise */ - bool seek(const Audio::Timestamp &time); + virtual bool seek(const Audio::Timestamp &time); /** * Begin playback of the video. -- cgit v1.2.3 From 9bf17934d3fb6ab30c64dd87dfed1e5f154bca51 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 22 Jul 2012 00:58:38 -0400 Subject: VIDEO: Take audio start time into account when syncing to audio --- video/video_decoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 4ac914927e..5946a7d79c 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -200,7 +200,7 @@ uint32 AdvancedVideoDecoder::getTime() const { uint32 time = ((const AudioTrack *)*it)->getRunningTime(); if (time != 0) - return time + _audioStartOffset.msecs(); + return time + (*it)->getStartTime().msecs() + _audioStartOffset.msecs(); } } } -- cgit v1.2.3 From 29541dc5f4dd492f7443463f709a5c6396dab9d8 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 22 Jul 2012 12:17:54 -0400 Subject: VIDEO: Hold tracks in an Array instead of a List Decoders such as AVI will need to access them by index --- video/video_decoder.cpp | 14 ++++++++++++++ video/video_decoder.h | 18 ++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 5946a7d79c..b2fcdda04c 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -519,6 +519,20 @@ void AdvancedVideoDecoder::addTrack(Track *track) { track->start(); } +AdvancedVideoDecoder::Track *AdvancedVideoDecoder::getTrack(uint track) { + if (track > _tracks.size()) + return 0; + + return _tracks[track]; +} + +const AdvancedVideoDecoder::Track *AdvancedVideoDecoder::getTrack(uint track) const { + if (track > _tracks.size()) + return 0; + + return _tracks[track]; +} + AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack() { VideoTrack *bestTrack = 0; uint32 bestTime = 0xFFFFFFFF; diff --git a/video/video_decoder.h b/video/video_decoder.h index 3d8b09f26e..2a5eebfc60 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -25,7 +25,7 @@ #include "audio/mixer.h" #include "audio/timestamp.h" // TODO: Move this to common/ ? -#include "common/list.h" +#include "common/array.h" #include "common/str.h" namespace Audio { @@ -657,9 +657,23 @@ protected: */ virtual bool useAudioSync() const { return true; } + /** + * Get the given track based on its index. + * + * @return A valid track pointer on success, 0 otherwise + */ + Track *getTrack(uint track); + + /** + * Get the given track based on its index + * + * @return A valid track pointer on success, 0 otherwise + */ + const Track *getTrack(uint track) const; + private: // Tracks owned by this AdvancedVideoDecoder - typedef Common::List TrackList; + typedef Common::Array TrackList; TrackList _tracks; VideoTrack *findNextVideoTrack(); const VideoTrack *findNextVideoTrack() const; -- cgit v1.2.3 From 7654b2036268bb56f3b08b88858f2a9e4862b056 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 22 Jul 2012 14:11:11 -0400 Subject: VIDEO: Merge the three Fixed* VideoTrack classes Avoids diamond inheritance, which makes it impossible to downcast without rtti --- engines/sci/video/seq_decoder.h | 2 +- video/video_decoder.cpp | 4 ++-- video/video_decoder.h | 30 +++++------------------------- 3 files changed, 8 insertions(+), 28 deletions(-) diff --git a/engines/sci/video/seq_decoder.h b/engines/sci/video/seq_decoder.h index 75d7ce6c3d..82254990d6 100644 --- a/engines/sci/video/seq_decoder.h +++ b/engines/sci/video/seq_decoder.h @@ -48,7 +48,7 @@ public: bool loadStream(Common::SeekableReadStream *stream); private: - class SEQVideoTrack : public FixedDurationVideoTrack { + class SEQVideoTrack : public FixedRateVideoTrack { public: SEQVideoTrack(Common::SeekableReadStream *stream, uint frameDelay); ~SEQVideoTrack(); diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index b2fcdda04c..ad176da73b 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -400,11 +400,11 @@ uint32 AdvancedVideoDecoder::FixedRateVideoTrack::getNextFrameStartTime() const return time.toInt(); } -bool AdvancedVideoDecoder::FixedLengthVideoTrack::endOfTrack() const { +bool AdvancedVideoDecoder::FixedRateVideoTrack::endOfTrack() const { return getCurFrame() >= (getFrameCount() - 1); } -Audio::Timestamp AdvancedVideoDecoder::FixedDurationVideoTrack::getDuration() const { +Audio::Timestamp AdvancedVideoDecoder::FixedRateVideoTrack::getDuration() const { // Since Audio::Timestamp doesn't support a fractional frame rate, we're currently // just converting to milliseconds. Common::Rational time = getFrameCount() * 1000; diff --git a/video/video_decoder.h b/video/video_decoder.h index 2a5eebfc60..efc8f7a37d 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -499,13 +499,17 @@ protected: /** * A VideoTrack that is played at a constant rate. + * + * If the frame count is unknown, you must override endOfTrack(). */ - class FixedRateVideoTrack : public virtual VideoTrack { + class FixedRateVideoTrack : public VideoTrack { public: FixedRateVideoTrack() {} virtual ~FixedRateVideoTrack() {} + virtual bool endOfTrack() const; uint32 getNextFrameStartTime() const; + virtual Audio::Timestamp getDuration() const; protected: /** @@ -514,30 +518,6 @@ protected: virtual Common::Rational getFrameRate() const = 0; }; - /** - * A VideoTrack with a known frame count that can be reliably - * used to figure out if the track has finished. - */ - class FixedLengthVideoTrack : public virtual VideoTrack { - public: - FixedLengthVideoTrack() {} - virtual ~FixedLengthVideoTrack() {} - - bool endOfTrack() const; - }; - - /** - * A FixedRateVideoTrack and FixedLengthVideoTrack that implements the getDuration() - * function. - */ - class FixedDurationVideoTrack : public FixedRateVideoTrack, public FixedLengthVideoTrack { - public: - FixedDurationVideoTrack() {} - virtual ~FixedDurationVideoTrack() {} - - virtual Audio::Timestamp getDuration() const; - }; - /** * An abstract representation of an audio track. */ -- cgit v1.2.3 From 0f0c6f935443212d76422959d040b87fc78d02c7 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 22 Jul 2012 14:13:20 -0400 Subject: VIDEO: Rewrite the AVI code to use AdvancedVideoDecoder In addition to using the new API, it should theoretically support multiple audio and video tracks now but that has not been tested. --- engines/sci/console.cpp | 6 +- engines/sci/engine/kvideo.cpp | 7 +- video/avi_decoder.cpp | 554 +++++++++++++++++++++--------------------- video/avi_decoder.h | 317 ++++++++++++------------ 4 files changed, 441 insertions(+), 443 deletions(-) diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 2a4ad1743d..a6a6d4496f 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -259,10 +259,12 @@ void Console::postEnter() { videoDecoder = new RobotDecoder(g_system->getMixer(), _engine->getPlatform() == Common::kPlatformMacintosh); } else if (_videoFile.hasSuffix(".duk")) { duckMode = true; - videoDecoder = new Video::AviDecoder(g_system->getMixer()); + videoDecoder = new Video::AVIDecoder(); + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); #endif } else if (_videoFile.hasSuffix(".avi")) { - videoDecoder = new Video::AviDecoder(g_system->getMixer()); + videoDecoder = new Video::AVIDecoder(); + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); } else { warning("Unrecognized video type"); } diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index bfe32a8d82..2c1532cc46 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -191,7 +191,7 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) { switch (argv[0].toUint16()) { case 0: { Common::String filename = s->_segMan->getString(argv[1]); - videoDecoder = new Video::AviDecoder(g_system->getMixer()); + videoDecoder = new Video::AVIDecoder(); if (filename.equalsIgnoreCase("gk2a.avi")) { // HACK: Switch to 16bpp graphics for Indeo3. @@ -212,6 +212,7 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) { videoDecoder = 0; } else { s->_videoState.fileName = filename; + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); } break; } @@ -407,13 +408,15 @@ reg_t kPlayDuck(EngineState *s, int argc, reg_t *argv) { s->_videoState.reset(); s->_videoState.fileName = Common::String::format("%d.duk", argv[1].toUint16()); - videoDecoder = new Video::AviDecoder(g_system->getMixer()); + videoDecoder = new Video::AVIDecoder(); if (!videoDecoder->loadFile(s->_videoState.fileName)) { warning("Could not open Duck %s", s->_videoState.fileName.c_str()); break; } + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); + if (reshowCursor) g_sci->_gfxCursor->kernelHide(); diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp index 2ea7e8d90e..375cc6f0f3 100644 --- a/video/avi_decoder.cpp +++ b/video/avi_decoder.cpp @@ -42,106 +42,128 @@ namespace Video { -/* +#define UNKNOWN_HEADER(a) error("Unknown header found -- \'%s\'", tag2str(a)) + +// IDs used throughout the AVI files +// that will be handled by this player +#define ID_RIFF MKTAG('R','I','F','F') +#define ID_AVI MKTAG('A','V','I',' ') +#define ID_LIST MKTAG('L','I','S','T') +#define ID_HDRL MKTAG('h','d','r','l') +#define ID_AVIH MKTAG('a','v','i','h') +#define ID_STRL MKTAG('s','t','r','l') +#define ID_STRH MKTAG('s','t','r','h') +#define ID_VIDS MKTAG('v','i','d','s') +#define ID_AUDS MKTAG('a','u','d','s') +#define ID_MIDS MKTAG('m','i','d','s') +#define ID_TXTS MKTAG('t','x','t','s') +#define ID_JUNK MKTAG('J','U','N','K') +#define ID_STRF MKTAG('s','t','r','f') +#define ID_MOVI MKTAG('m','o','v','i') +#define ID_REC MKTAG('r','e','c',' ') +#define ID_VEDT MKTAG('v','e','d','t') +#define ID_IDX1 MKTAG('i','d','x','1') +#define ID_STRD MKTAG('s','t','r','d') +#define ID_00AM MKTAG('0','0','A','M') +//#define ID_INFO MKTAG('I','N','F','O') + +// Codec tags +#define ID_RLE MKTAG('R','L','E',' ') +#define ID_CRAM MKTAG('C','R','A','M') +#define ID_MSVC MKTAG('m','s','v','c') +#define ID_WHAM MKTAG('W','H','A','M') +#define ID_CVID MKTAG('c','v','i','d') +#define ID_IV32 MKTAG('i','v','3','2') +#define ID_DUCK MKTAG('D','U','C','K') + static byte char2num(char c) { - return (c >= 48 && c <= 57) ? c - 48 : 0; + c = tolower((byte)c); + return (c >= 'a' && c <= 'f') ? c - 'a' + 10 : c - '0'; } -static byte getStreamNum(uint32 tag) { - return char2num((char)(tag >> 24)) * 16 + char2num((char)(tag >> 16)); +static byte getStreamIndex(uint32 tag) { + return char2num((tag >> 24) & 0xFF) << 4 | char2num((tag >> 16) & 0xFF); } -*/ static uint16 getStreamType(uint32 tag) { return tag & 0xffff; } -AviDecoder::AviDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : _mixer(mixer) { - _soundType = soundType; - - _videoCodec = NULL; +AVIDecoder::AVIDecoder(Audio::Mixer::SoundType soundType) : _soundType(soundType) { _decodedHeader = false; - _audStream = NULL; - _fileStream = NULL; - _audHandle = new Audio::SoundHandle(); - _dirtyPalette = false; - memset(_palette, 0, sizeof(_palette)); - memset(&_wvInfo, 0, sizeof(PCMWAVEFORMAT)); - memset(&_bmInfo, 0, sizeof(BITMAPINFOHEADER)); - memset(&_vidsHeader, 0, sizeof(AVIStreamHeader)); - memset(&_audsHeader, 0, sizeof(AVIStreamHeader)); - memset(&_ixInfo, 0, sizeof(AVIOLDINDEX)); + _fileStream = 0; + memset(&_ixInfo, 0, sizeof(_ixInfo)); + memset(&_header, 0, sizeof(_header)); } -AviDecoder::~AviDecoder() { +AVIDecoder::~AVIDecoder() { close(); - delete _audHandle; } -void AviDecoder::runHandle(uint32 tag) { - assert (_fileStream); +void AVIDecoder::runHandle(uint32 tag) { + assert(_fileStream); if (_fileStream->eos()) return; - debug (3, "Decoding tag %s", tag2str(tag)); + debug(3, "Decoding tag %s", tag2str(tag)); switch (tag) { - case ID_RIFF: - /*_filesize = */_fileStream->readUint32LE(); - if (_fileStream->readUint32BE() != ID_AVI) - error("RIFF file is not an AVI video"); - break; - case ID_LIST: - handleList(); - break; - case ID_AVIH: - _header.size = _fileStream->readUint32LE(); - _header.microSecondsPerFrame = _fileStream->readUint32LE(); - _header.maxBytesPerSecond = _fileStream->readUint32LE(); - _header.padding = _fileStream->readUint32LE(); - _header.flags = _fileStream->readUint32LE(); - _header.totalFrames = _fileStream->readUint32LE(); - _header.initialFrames = _fileStream->readUint32LE(); - _header.streams = _fileStream->readUint32LE(); - _header.bufferSize = _fileStream->readUint32LE(); - _header.width = _fileStream->readUint32LE(); - _header.height = _fileStream->readUint32LE(); - //Ignore 16 bytes of reserved data - _fileStream->skip(16); - break; - case ID_STRH: - handleStreamHeader(); - break; - case ID_STRD: // Extra stream info, safe to ignore - case ID_VEDT: // Unknown, safe to ignore - case ID_JUNK: // Alignment bytes, should be ignored - { - uint32 junkSize = _fileStream->readUint32LE(); - _fileStream->skip(junkSize + (junkSize & 1)); // Alignment - } break; - case ID_IDX1: - _ixInfo.size = _fileStream->readUint32LE(); - _ixInfo.indices = new AVIOLDINDEX::Index[_ixInfo.size / 16]; - debug (0, "%d Indices", (_ixInfo.size / 16)); - for (uint32 i = 0; i < (_ixInfo.size / 16); i++) { - _ixInfo.indices[i].id = _fileStream->readUint32BE(); - _ixInfo.indices[i].flags = _fileStream->readUint32LE(); - _ixInfo.indices[i].offset = _fileStream->readUint32LE(); - _ixInfo.indices[i].size = _fileStream->readUint32LE(); - debug (0, "Index %d == Tag \'%s\', Offset = %d, Size = %d", i, tag2str(_ixInfo.indices[i].id), _ixInfo.indices[i].offset, _ixInfo.indices[i].size); - } - break; - default: - error ("Unknown tag \'%s\' found", tag2str(tag)); + case ID_RIFF: + /*_filesize = */_fileStream->readUint32LE(); + if (_fileStream->readUint32BE() != ID_AVI) + error("RIFF file is not an AVI video"); + break; + case ID_LIST: + handleList(); + break; + case ID_AVIH: + _header.size = _fileStream->readUint32LE(); + _header.microSecondsPerFrame = _fileStream->readUint32LE(); + _header.maxBytesPerSecond = _fileStream->readUint32LE(); + _header.padding = _fileStream->readUint32LE(); + _header.flags = _fileStream->readUint32LE(); + _header.totalFrames = _fileStream->readUint32LE(); + _header.initialFrames = _fileStream->readUint32LE(); + _header.streams = _fileStream->readUint32LE(); + _header.bufferSize = _fileStream->readUint32LE(); + _header.width = _fileStream->readUint32LE(); + _header.height = _fileStream->readUint32LE(); + // Ignore 16 bytes of reserved data + _fileStream->skip(16); + break; + case ID_STRH: + handleStreamHeader(); + break; + case ID_STRD: // Extra stream info, safe to ignore + case ID_VEDT: // Unknown, safe to ignore + case ID_JUNK: // Alignment bytes, should be ignored + { + uint32 junkSize = _fileStream->readUint32LE(); + _fileStream->skip(junkSize + (junkSize & 1)); // Alignment + } break; + case ID_IDX1: + _ixInfo.size = _fileStream->readUint32LE(); + _ixInfo.indices = new OldIndex::Index[_ixInfo.size / 16]; + debug(0, "%d Indices", (_ixInfo.size / 16)); + for (uint32 i = 0; i < (_ixInfo.size / 16); i++) { + _ixInfo.indices[i].id = _fileStream->readUint32BE(); + _ixInfo.indices[i].flags = _fileStream->readUint32LE(); + _ixInfo.indices[i].offset = _fileStream->readUint32LE(); + _ixInfo.indices[i].size = _fileStream->readUint32LE(); + debug(0, "Index %d == Tag \'%s\', Offset = %d, Size = %d", i, tag2str(_ixInfo.indices[i].id), _ixInfo.indices[i].offset, _ixInfo.indices[i].size); + } + break; + default: + error("Unknown tag \'%s\' found", tag2str(tag)); } } -void AviDecoder::handleList() { +void AVIDecoder::handleList() { uint32 listSize = _fileStream->readUint32LE() - 4; // Subtract away listType's 4 bytes uint32 listType = _fileStream->readUint32BE(); uint32 curPos = _fileStream->pos(); - debug (0, "Found LIST of type %s", tag2str(listType)); + debug(0, "Found LIST of type %s", tag2str(listType)); while ((_fileStream->pos() - curPos) < listSize) runHandle(_fileStream->readUint32BE()); @@ -151,12 +173,14 @@ void AviDecoder::handleList() { _decodedHeader = true; } -void AviDecoder::handleStreamHeader() { +void AVIDecoder::handleStreamHeader() { AVIStreamHeader sHeader; sHeader.size = _fileStream->readUint32LE(); sHeader.streamType = _fileStream->readUint32BE(); + if (sHeader.streamType == ID_MIDS || sHeader.streamType == ID_TXTS) - error ("Unhandled MIDI/Text stream"); + error("Unhandled MIDI/Text stream"); + sHeader.streamHandler = _fileStream->readUint32BE(); sHeader.flags = _fileStream->readUint32LE(); sHeader.priority = _fileStream->readUint16LE(); @@ -174,63 +198,67 @@ void AviDecoder::handleStreamHeader() { if (_fileStream->readUint32BE() != ID_STRF) error("Could not find STRF tag"); + uint32 strfSize = _fileStream->readUint32LE(); uint32 startPos = _fileStream->pos(); if (sHeader.streamType == ID_VIDS) { - _vidsHeader = sHeader; - - _bmInfo.size = _fileStream->readUint32LE(); - _bmInfo.width = _fileStream->readUint32LE(); - assert (_header.width == _bmInfo.width); - _bmInfo.height = _fileStream->readUint32LE(); - assert (_header.height == _bmInfo.height); - _bmInfo.planes = _fileStream->readUint16LE(); - _bmInfo.bitCount = _fileStream->readUint16LE(); - _bmInfo.compression = _fileStream->readUint32BE(); - _bmInfo.sizeImage = _fileStream->readUint32LE(); - _bmInfo.xPelsPerMeter = _fileStream->readUint32LE(); - _bmInfo.yPelsPerMeter = _fileStream->readUint32LE(); - _bmInfo.clrUsed = _fileStream->readUint32LE(); - _bmInfo.clrImportant = _fileStream->readUint32LE(); - - if (_bmInfo.bitCount == 8) { - if (_bmInfo.clrUsed == 0) - _bmInfo.clrUsed = 256; - - for (uint32 i = 0; i < _bmInfo.clrUsed; i++) { - _palette[i * 3 + 2] = _fileStream->readByte(); - _palette[i * 3 + 1] = _fileStream->readByte(); - _palette[i * 3] = _fileStream->readByte(); + BitmapInfoHeader bmInfo; + bmInfo.size = _fileStream->readUint32LE(); + bmInfo.width = _fileStream->readUint32LE(); + bmInfo.height = _fileStream->readUint32LE(); + bmInfo.planes = _fileStream->readUint16LE(); + bmInfo.bitCount = _fileStream->readUint16LE(); + bmInfo.compression = _fileStream->readUint32BE(); + bmInfo.sizeImage = _fileStream->readUint32LE(); + bmInfo.xPelsPerMeter = _fileStream->readUint32LE(); + bmInfo.yPelsPerMeter = _fileStream->readUint32LE(); + bmInfo.clrUsed = _fileStream->readUint32LE(); + bmInfo.clrImportant = _fileStream->readUint32LE(); + + if (bmInfo.clrUsed == 0) + bmInfo.clrUsed = 256; + + if (sHeader.streamHandler == 0) + sHeader.streamHandler = bmInfo.compression; + + AVIVideoTrack *track = new AVIVideoTrack(_header.totalFrames, sHeader, bmInfo); + + if (bmInfo.bitCount == 8) { + byte *palette = const_cast(track->getPalette()); + for (uint32 i = 0; i < bmInfo.clrUsed; i++) { + palette[i * 3 + 2] = _fileStream->readByte(); + palette[i * 3 + 1] = _fileStream->readByte(); + palette[i * 3] = _fileStream->readByte(); _fileStream->readByte(); } - _dirtyPalette = true; + track->markPaletteDirty(); } - if (!_vidsHeader.streamHandler) - _vidsHeader.streamHandler = _bmInfo.compression; + addTrack(track); } else if (sHeader.streamType == ID_AUDS) { - _audsHeader = sHeader; - - _wvInfo.tag = _fileStream->readUint16LE(); - _wvInfo.channels = _fileStream->readUint16LE(); - _wvInfo.samplesPerSec = _fileStream->readUint32LE(); - _wvInfo.avgBytesPerSec = _fileStream->readUint32LE(); - _wvInfo.blockAlign = _fileStream->readUint16LE(); - _wvInfo.size = _fileStream->readUint16LE(); + PCMWaveFormat wvInfo; + wvInfo.tag = _fileStream->readUint16LE(); + wvInfo.channels = _fileStream->readUint16LE(); + wvInfo.samplesPerSec = _fileStream->readUint32LE(); + wvInfo.avgBytesPerSec = _fileStream->readUint32LE(); + wvInfo.blockAlign = _fileStream->readUint16LE(); + wvInfo.size = _fileStream->readUint16LE(); // AVI seems to treat the sampleSize as including the second // channel as well, so divide for our sake. - if (_wvInfo.channels == 2) - _audsHeader.sampleSize /= 2; + if (wvInfo.channels == 2) + sHeader.sampleSize /= 2; + + addTrack(new AVIAudioTrack(sHeader, wvInfo, _soundType)); } // Ensure that we're at the end of the chunk _fileStream->seek(startPos + strfSize); } -bool AviDecoder::loadStream(Common::SeekableReadStream *stream) { +bool AVIDecoder::loadStream(Common::SeekableReadStream *stream) { close(); _fileStream = stream; @@ -252,74 +280,31 @@ bool AviDecoder::loadStream(Common::SeekableReadStream *stream) { if (nextTag == ID_LIST) { _fileStream->readUint32BE(); // Skip size if (_fileStream->readUint32BE() != ID_MOVI) - error ("Expected 'movi' LIST"); - } else - error ("Expected 'movi' LIST"); - - // Now, create the codec - _videoCodec = createCodec(); - - // Initialize the video stuff too - _audStream = createAudioStream(); - if (_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); - if (_wvInfo.samplesPerSec != 0) - debug (0, "Sound Rate = %d", _wvInfo.samplesPerSec); - debug (0, "Video Codec = \'%s\'", tag2str(_vidsHeader.streamHandler)); - - if (!_videoCodec) - return false; + error("Expected 'movi' LIST"); + } else { + error("Expected 'movi' LIST"); + } return true; } -void AviDecoder::close() { - if (!_fileStream) - return; +void AVIDecoder::close() { + AdvancedVideoDecoder::close(); delete _fileStream; _fileStream = 0; - - // Deinitialize sound - _mixer->stopHandle(*_audHandle); - _audStream = 0; - _decodedHeader = false; - delete _videoCodec; - _videoCodec = 0; - delete[] _ixInfo.indices; - _ixInfo.indices = 0; - - memset(_palette, 0, sizeof(_palette)); - memset(&_wvInfo, 0, sizeof(PCMWAVEFORMAT)); - memset(&_bmInfo, 0, sizeof(BITMAPINFOHEADER)); - memset(&_vidsHeader, 0, sizeof(AVIStreamHeader)); - memset(&_audsHeader, 0, sizeof(AVIStreamHeader)); - memset(&_ixInfo, 0, sizeof(AVIOLDINDEX)); - - reset(); -} - -uint32 AviDecoder::getTime() const { - if (_audStream) - return _mixer->getSoundElapsedTime(*_audHandle); - - return FixedRateVideoDecoder::getTime(); + memset(&_ixInfo, 0, sizeof(_ixInfo)); + memset(&_header, 0, sizeof(_header)); } -const Graphics::Surface *AviDecoder::decodeNextFrame() { +void AVIDecoder::readNextPacket() { uint32 nextTag = _fileStream->readUint32BE(); if (_fileStream->eos()) - return NULL; - - if (_curFrame == -1) - _startTime = g_system->getMillis(); + return; if (nextTag == ID_LIST) { // A list of audio/video chunks @@ -327,138 +312,159 @@ const Graphics::Surface *AviDecoder::decodeNextFrame() { int32 startPos = _fileStream->pos(); if (_fileStream->readUint32BE() != ID_REC) - error ("Expected 'rec ' LIST"); - - // Decode chunks in the list and see if we get a frame - const Graphics::Surface *frame = NULL; - while (_fileStream->pos() < startPos + (int32)listSize) { - const Graphics::Surface *temp = decodeNextFrame(); - if (temp) - frame = temp; - } + error("Expected 'rec ' LIST"); - return frame; - } else if (getStreamType(nextTag) == 'wb') { - // Audio Chunk - uint32 chunkSize = _fileStream->readUint32LE(); - queueAudioBuffer(chunkSize); - _fileStream->skip(chunkSize & 1); // Alignment - } else if (getStreamType(nextTag) == 'dc' || getStreamType(nextTag) == 'id' || - getStreamType(nextTag) == 'AM' || getStreamType(nextTag) == '32' || - getStreamType(nextTag) == 'iv') { - // Compressed Frame - _curFrame++; - uint32 chunkSize = _fileStream->readUint32LE(); - - if (chunkSize == 0) // Keep last frame on screen - return NULL; - - Common::SeekableReadStream *frameData = _fileStream->readStream(chunkSize); - const Graphics::Surface *surface = _videoCodec->decodeImage(frameData); - delete frameData; - _fileStream->skip(chunkSize & 1); // Alignment - return surface; - } else if (getStreamType(nextTag) == 'pc') { - // Palette Change - _fileStream->readUint32LE(); // Chunk size, not needed here - byte firstEntry = _fileStream->readByte(); - uint16 numEntries = _fileStream->readByte(); - _fileStream->readUint16LE(); // Reserved - - // 0 entries means all colors are going to be changed - if (numEntries == 0) - numEntries = 256; - - for (uint16 i = firstEntry; i < numEntries + firstEntry; i++) { - _palette[i * 3] = _fileStream->readByte(); - _palette[i * 3 + 1] = _fileStream->readByte(); - _palette[i * 3 + 2] = _fileStream->readByte(); - _fileStream->readByte(); // Flags that don't serve us any purpose - } + // Decode chunks in the list + while (_fileStream->pos() < startPos + (int32)listSize) + readNextPacket(); - _dirtyPalette = true; + return; + } else if (nextTag == ID_JUNK || nextTag == ID_IDX1) { + runHandle(nextTag); + return; + } - // No alignment necessary. It's always even. - } else if (nextTag == ID_JUNK) { - runHandle(ID_JUNK); - } else if (nextTag == ID_IDX1) { - runHandle(ID_IDX1); - } else - error("Tag = \'%s\', %d", tag2str(nextTag), _fileStream->pos()); + Track *track = getTrack(getStreamIndex(nextTag)); - return NULL; -} + if (!track) + error("Cannot get track from tag '%s'", tag2str(nextTag)); -Codec *AviDecoder::createCodec() { - switch (_vidsHeader.streamHandler) { - case ID_CRAM: - case ID_MSVC: - case ID_WHAM: - return new MSVideo1Decoder(_bmInfo.width, _bmInfo.height, _bmInfo.bitCount); - case ID_RLE: - return new MSRLEDecoder(_bmInfo.width, _bmInfo.height, _bmInfo.bitCount); - case ID_CVID: - return new CinepakDecoder(_bmInfo.bitCount); - case ID_IV32: - return new Indeo3Decoder(_bmInfo.width, _bmInfo.height); -#ifdef VIDEO_CODECS_TRUEMOTION1_H - case ID_DUCK: - return new TrueMotion1Decoder(_bmInfo.width, _bmInfo.height); -#endif - default: - warning ("Unknown/Unhandled compression format \'%s\'", tag2str(_vidsHeader.streamHandler)); + uint32 chunkSize = _fileStream->readUint32LE(); + Common::SeekableReadStream *chunk = _fileStream->readStream(chunkSize); + _fileStream->skip(chunkSize & 1); + + if (track->getTrackType() == Track::kTrackTypeAudio) { + if (getStreamType(nextTag) != 'wb') + error("Invalid audio track tag '%s'", tag2str(nextTag)); + + ((AVIAudioTrack *)track)->queueSound(chunk); + } else { + AVIVideoTrack *videoTrack = (AVIVideoTrack *)track; + + if (getStreamType(nextTag) == 'pc') { + // Palette Change + byte firstEntry = chunk->readByte(); + uint16 numEntries = chunk->readByte(); + chunk->readUint16LE(); // Reserved + + // 0 entries means all colors are going to be changed + if (numEntries == 0) + numEntries = 256; + + byte *palette = const_cast(videoTrack->getPalette()); + + for (uint16 i = firstEntry; i < numEntries + firstEntry; i++) { + palette[i * 3] = chunk->readByte(); + palette[i * 3 + 1] = chunk->readByte(); + palette[i * 3 + 2] = chunk->readByte(); + chunk->readByte(); // Flags that don't serve us any purpose + } + + delete chunk; + videoTrack->markPaletteDirty(); + } else if (getStreamType(nextTag) == 'db') { + // TODO: Check if this really is uncompressed. Many videos + // falsely put compressed data in here. + error("Uncompressed AVI frame found"); + } else { + // Otherwise, assume it's a compressed frame + videoTrack->decodeFrame(chunk); + } } +} - return NULL; +AVIDecoder::AVIVideoTrack::AVIVideoTrack(int frameCount, const AVIStreamHeader &streamHeader, const BitmapInfoHeader &bitmapInfoHeader) + : _frameCount(frameCount), _vidsHeader(streamHeader), _bmInfo(bitmapInfoHeader) { + memset(_palette, 0, sizeof(_palette)); + _videoCodec = createCodec(); + _dirtyPalette = false; + _lastFrame = 0; + _curFrame = -1; } -Graphics::PixelFormat AviDecoder::getPixelFormat() const { - assert(_videoCodec); - return _videoCodec->getPixelFormat(); +AVIDecoder::AVIVideoTrack::~AVIVideoTrack() { + delete _videoCodec; } -Audio::QueuingAudioStream *AviDecoder::createAudioStream() { - if (_wvInfo.tag == kWaveFormatPCM || _wvInfo.tag == kWaveFormatDK3) - return Audio::makeQueuingAudioStream(_wvInfo.samplesPerSec, _wvInfo.channels == 2); - else if (_wvInfo.tag != kWaveFormatNone) // No sound - warning("Unsupported AVI audio format %d", _wvInfo.tag); +void AVIDecoder::AVIVideoTrack::decodeFrame(Common::SeekableReadStream *stream) { + if (_videoCodec) + _lastFrame = _videoCodec->decodeImage(stream); - return NULL; + delete stream; + _curFrame++; } -void AviDecoder::queueAudioBuffer(uint32 chunkSize) { - // Return if we haven't created the queue (unsupported audio format) - if (!_audStream) { - _fileStream->skip(chunkSize); - return; +Graphics::PixelFormat AVIDecoder::AVIVideoTrack::getPixelFormat() const { + if (_videoCodec) + return _videoCodec->getPixelFormat(); + + return Graphics::PixelFormat(); +} + +Codec *AVIDecoder::AVIVideoTrack::createCodec() { + switch (_vidsHeader.streamHandler) { + case ID_CRAM: + case ID_MSVC: + case ID_WHAM: + return new MSVideo1Decoder(_bmInfo.width, _bmInfo.height, _bmInfo.bitCount); + case ID_RLE: + return new MSRLEDecoder(_bmInfo.width, _bmInfo.height, _bmInfo.bitCount); + case ID_CVID: + return new CinepakDecoder(_bmInfo.bitCount); + case ID_IV32: + return new Indeo3Decoder(_bmInfo.width, _bmInfo.height); +#ifdef VIDEO_CODECS_TRUEMOTION1_H + case ID_DUCK: + return new TrueMotion1Decoder(_bmInfo.width, _bmInfo.height); +#endif + default: + warning("Unknown/Unhandled compression format \'%s\'", tag2str(_vidsHeader.streamHandler)); } - Common::SeekableReadStream *stream = _fileStream->readStream(chunkSize); + return 0; +} - if (_wvInfo.tag == kWaveFormatPCM) { - byte flags = 0; - if (_audsHeader.sampleSize == 2) - flags |= Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN; - else - flags |= Audio::FLAG_UNSIGNED; +AVIDecoder::AVIAudioTrack::AVIAudioTrack(const AVIStreamHeader &streamHeader, const PCMWaveFormat &waveFormat, Audio::Mixer::SoundType soundType) + : _audsHeader(streamHeader), _wvInfo(waveFormat), _soundType(soundType) { + _audStream = createAudioStream(); +} - if (_wvInfo.channels == 2) - flags |= Audio::FLAG_STEREO; +AVIDecoder::AVIAudioTrack::~AVIAudioTrack() { + delete _audStream; +} - _audStream->queueAudioStream(Audio::makeRawStream(stream, _wvInfo.samplesPerSec, flags, DisposeAfterUse::YES), DisposeAfterUse::YES); - } else if (_wvInfo.tag == kWaveFormatDK3) { - _audStream->queueAudioStream(Audio::makeADPCMStream(stream, DisposeAfterUse::YES, chunkSize, Audio::kADPCMDK3, _wvInfo.samplesPerSec, _wvInfo.channels, _wvInfo.blockAlign), DisposeAfterUse::YES); +void AVIDecoder::AVIAudioTrack::queueSound(Common::SeekableReadStream *stream) { + if (_audStream) { + if (_wvInfo.tag == kWaveFormatPCM) { + byte flags = 0; + if (_audsHeader.sampleSize == 2) + flags |= Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN; + else + flags |= Audio::FLAG_UNSIGNED; + + if (_wvInfo.channels == 2) + flags |= Audio::FLAG_STEREO; + + _audStream->queueAudioStream(Audio::makeRawStream(stream, _wvInfo.samplesPerSec, flags, DisposeAfterUse::YES), DisposeAfterUse::YES); + } else if (_wvInfo.tag == kWaveFormatDK3) { + _audStream->queueAudioStream(Audio::makeADPCMStream(stream, DisposeAfterUse::YES, stream->size(), Audio::kADPCMDK3, _wvInfo.samplesPerSec, _wvInfo.channels, _wvInfo.blockAlign), DisposeAfterUse::YES); + } + } else { + delete stream; } } -void AviDecoder::updateVolume() { - if (g_system->getMixer()->isSoundHandleActive(*_audHandle)) - g_system->getMixer()->setChannelVolume(*_audHandle, getVolume()); +Audio::AudioStream *AVIDecoder::AVIAudioTrack::getAudioStream() const { + return _audStream; } -void AviDecoder::updateBalance() { - if (g_system->getMixer()->isSoundHandleActive(*_audHandle)) - g_system->getMixer()->setChannelBalance(*_audHandle, getBalance()); +Audio::QueuingAudioStream *AVIDecoder::AVIAudioTrack::createAudioStream() { + if (_wvInfo.tag == kWaveFormatPCM || _wvInfo.tag == kWaveFormatDK3) + return Audio::makeQueuingAudioStream(_wvInfo.samplesPerSec, _wvInfo.channels == 2); + else if (_wvInfo.tag != kWaveFormatNone) // No sound + warning("Unsupported AVI audio format %d", _wvInfo.tag); + + return 0; } } // End of namespace Video diff --git a/video/avi_decoder.h b/video/avi_decoder.h index fb4dae6711..010702cce3 100644 --- a/video/avi_decoder.h +++ b/video/avi_decoder.h @@ -47,196 +47,183 @@ namespace Video { class Codec; -#define UNKNOWN_HEADER(a) error("Unknown header found -- \'%s\'", tag2str(a)) - -// IDs used throughout the AVI files -// that will be handled by this player -#define ID_RIFF MKTAG('R','I','F','F') -#define ID_AVI MKTAG('A','V','I',' ') -#define ID_LIST MKTAG('L','I','S','T') -#define ID_HDRL MKTAG('h','d','r','l') -#define ID_AVIH MKTAG('a','v','i','h') -#define ID_STRL MKTAG('s','t','r','l') -#define ID_STRH MKTAG('s','t','r','h') -#define ID_VIDS MKTAG('v','i','d','s') -#define ID_AUDS MKTAG('a','u','d','s') -#define ID_MIDS MKTAG('m','i','d','s') -#define ID_TXTS MKTAG('t','x','t','s') -#define ID_JUNK MKTAG('J','U','N','K') -#define ID_STRF MKTAG('s','t','r','f') -#define ID_MOVI MKTAG('m','o','v','i') -#define ID_REC MKTAG('r','e','c',' ') -#define ID_VEDT MKTAG('v','e','d','t') -#define ID_IDX1 MKTAG('i','d','x','1') -#define ID_STRD MKTAG('s','t','r','d') -#define ID_00AM MKTAG('0','0','A','M') -//#define ID_INFO MKTAG('I','N','F','O') - -// Codec tags -#define ID_RLE MKTAG('R','L','E',' ') -#define ID_CRAM MKTAG('C','R','A','M') -#define ID_MSVC MKTAG('m','s','v','c') -#define ID_WHAM MKTAG('W','H','A','M') -#define ID_CVID MKTAG('c','v','i','d') -#define ID_IV32 MKTAG('i','v','3','2') -#define ID_DUCK MKTAG('D','U','C','K') - -struct BITMAPINFOHEADER { - uint32 size; - uint32 width; - uint32 height; - uint16 planes; - uint16 bitCount; - uint32 compression; - uint32 sizeImage; - uint32 xPelsPerMeter; - uint32 yPelsPerMeter; - uint32 clrUsed; - uint32 clrImportant; -}; - -struct WAVEFORMAT { - uint16 tag; - uint16 channels; - uint32 samplesPerSec; - uint32 avgBytesPerSec; - uint16 blockAlign; -}; - -struct PCMWAVEFORMAT : public WAVEFORMAT { - uint16 size; -}; - -struct WAVEFORMATEX : public WAVEFORMAT { - uint16 bitsPerSample; - uint16 size; -}; - -struct AVIOLDINDEX { - uint32 size; - struct Index { - uint32 id; - uint32 flags; - uint32 offset; - uint32 size; - } *indices; -}; - -// Index Flags -enum IndexFlags { - AVIIF_INDEX = 0x10 -}; - -// Audio Codecs -enum { - kWaveFormatNone = 0, - kWaveFormatPCM = 1, - kWaveFormatDK3 = 98 -}; - -struct AVIHeader { - uint32 size; - uint32 microSecondsPerFrame; - uint32 maxBytesPerSecond; - uint32 padding; - uint32 flags; - uint32 totalFrames; - uint32 initialFrames; - uint32 streams; - uint32 bufferSize; - uint32 width; - uint32 height; -}; - -// Flags from the AVIHeader -enum AviFlags { - AVIF_HASINDEX = 0x00000010, - AVIF_MUSTUSEINDEX = 0x00000020, - AVIF_ISINTERLEAVED = 0x00000100, - AVIF_TRUSTCKTYPE = 0x00000800, - AVIF_WASCAPTUREFILE = 0x00010000, - AVIF_WASCOPYRIGHTED = 0x00020000 -}; - -struct AVIStreamHeader { - uint32 size; - uint32 streamType; - uint32 streamHandler; - uint32 flags; - uint16 priority; - uint16 language; - uint32 initialFrames; - uint32 scale; - uint32 rate; - uint32 start; - uint32 length; - uint32 bufferSize; - uint32 quality; - uint32 sampleSize; - Common::Rect frame; -}; - /** * Decoder for AVI videos. * * Video decoder used in engines: * - sci */ -class AviDecoder : public FixedRateVideoDecoder { +class AVIDecoder : public AdvancedVideoDecoder { public: - AviDecoder(Audio::Mixer *mixer, - Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); - virtual ~AviDecoder(); + AVIDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); + virtual ~AVIDecoder(); bool loadStream(Common::SeekableReadStream *stream); void close(); - - bool isVideoLoaded() const { return _fileStream != 0; } uint16 getWidth() const { return _header.width; } uint16 getHeight() const { return _header.height; } - uint32 getFrameCount() const { return _header.totalFrames; } - uint32 getTime() const; - const Graphics::Surface *decodeNextFrame(); - Graphics::PixelFormat getPixelFormat() const; - const byte *getPalette() { _dirtyPalette = false; return _palette; } - 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); } + void readNextPacket(); private: - Audio::Mixer *_mixer; - BITMAPINFOHEADER _bmInfo; - PCMWAVEFORMAT _wvInfo; - AVIOLDINDEX _ixInfo; - AVIHeader _header; - AVIStreamHeader _vidsHeader; - AVIStreamHeader _audsHeader; - byte _palette[3 * 256]; - bool _dirtyPalette; + struct BitmapInfoHeader { + uint32 size; + uint32 width; + uint32 height; + uint16 planes; + uint16 bitCount; + uint32 compression; + uint32 sizeImage; + uint32 xPelsPerMeter; + uint32 yPelsPerMeter; + uint32 clrUsed; + uint32 clrImportant; + }; + + struct WaveFormat { + uint16 tag; + uint16 channels; + uint32 samplesPerSec; + uint32 avgBytesPerSec; + uint16 blockAlign; + }; + + struct PCMWaveFormat : public WaveFormat { + uint16 size; + }; + + struct WaveFormatEX : public WaveFormat { + uint16 bitsPerSample; + uint16 size; + }; + + struct OldIndex { + uint32 size; + struct Index { + uint32 id; + uint32 flags; + uint32 offset; + uint32 size; + } *indices; + }; + + // Index Flags + enum IndexFlags { + AVIIF_INDEX = 0x10 + }; + + struct AVIHeader { + uint32 size; + uint32 microSecondsPerFrame; + uint32 maxBytesPerSecond; + uint32 padding; + uint32 flags; + uint32 totalFrames; + uint32 initialFrames; + uint32 streams; + uint32 bufferSize; + uint32 width; + uint32 height; + }; + + // Flags from the AVIHeader + enum AVIFlags { + AVIF_HASINDEX = 0x00000010, + AVIF_MUSTUSEINDEX = 0x00000020, + AVIF_ISINTERLEAVED = 0x00000100, + AVIF_TRUSTCKTYPE = 0x00000800, + AVIF_WASCAPTUREFILE = 0x00010000, + AVIF_WASCOPYRIGHTED = 0x00020000 + }; + + struct AVIStreamHeader { + uint32 size; + uint32 streamType; + uint32 streamHandler; + uint32 flags; + uint16 priority; + uint16 language; + uint32 initialFrames; + uint32 scale; + uint32 rate; + uint32 start; + uint32 length; + uint32 bufferSize; + uint32 quality; + uint32 sampleSize; + Common::Rect frame; + }; + + class AVIVideoTrack : public FixedRateVideoTrack { + public: + AVIVideoTrack(int frameCount, const AVIStreamHeader &streamHeader, const BitmapInfoHeader &bitmapInfoHeader); + ~AVIVideoTrack(); + + void decodeFrame(Common::SeekableReadStream *stream); + + uint16 getWidth() const { return _bmInfo.width; } + uint16 getHeight() const { return _bmInfo.height; } + Graphics::PixelFormat getPixelFormat() const; + int getCurFrame() const { return _curFrame; } + int getFrameCount() const { return _frameCount; } + const Graphics::Surface *decodeNextFrame() { return _lastFrame; } + const byte *getPalette() const { _dirtyPalette = false; return _palette; } + bool hasDirtyPalette() const { return _dirtyPalette; } + void markPaletteDirty() { _dirtyPalette = true; } + + protected: + Common::Rational getFrameRate() const { return Common::Rational(_vidsHeader.rate, _vidsHeader.scale); } + + private: + AVIStreamHeader _vidsHeader; + BitmapInfoHeader _bmInfo; + byte _palette[3 * 256]; + mutable bool _dirtyPalette; + int _frameCount, _curFrame; + + Codec *_videoCodec; + const Graphics::Surface *_lastFrame; + Codec *createCodec(); + }; + + class AVIAudioTrack : public AudioTrack { + public: + AVIAudioTrack(const AVIStreamHeader &streamHeader, const PCMWaveFormat &waveFormat, Audio::Mixer::SoundType soundType); + ~AVIAudioTrack(); + + void queueSound(Common::SeekableReadStream *stream); + Audio::Mixer::SoundType getSoundType() const { return _soundType; } + + protected: + Audio::AudioStream *getAudioStream() const; + + private: + // Audio Codecs + enum { + kWaveFormatNone = 0, + kWaveFormatPCM = 1, + kWaveFormatDK3 = 98 + }; + + AVIStreamHeader _audsHeader; + PCMWaveFormat _wvInfo; + Audio::Mixer::SoundType _soundType; + Audio::QueuingAudioStream *_audStream; + Audio::QueuingAudioStream *createAudioStream(); + }; + + OldIndex _ixInfo; + AVIHeader _header; Common::SeekableReadStream *_fileStream; bool _decodedHeader; - Codec *_videoCodec; - Codec *createCodec(); - Audio::Mixer::SoundType _soundType; void runHandle(uint32 tag); void handleList(); void handleStreamHeader(); - void handlePalChange(); - - Audio::SoundHandle *_audHandle; - Audio::QueuingAudioStream *_audStream; - Audio::QueuingAudioStream *createAudioStream(); - void queueAudioBuffer(uint32 chunkSize); }; } // End of namespace Video -- cgit v1.2.3 From 8ac70ac94a6ecfcbb74c65aac730fa707ab6fa6e Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 22 Jul 2012 21:15:49 +0100 Subject: TEENAGENT: Fix another invalid string offset. This typo caused an incorrect string output when Mark examines the car trunk when it is empty. --- engines/teenagent/callbacks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp index b0ccb8844d..46d9b7d2f9 100644 --- a/engines/teenagent/callbacks.cpp +++ b/engines/teenagent/callbacks.cpp @@ -2265,7 +2265,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { case 0x78f5: if (CHECK_FLAG(0xDB95, 1)) { - displayMessage(0x3575); + displayMessage(0x3E75); return true; } else return false; -- cgit v1.2.3 From d4231fda1cb2399e123054ddaaeca2b4c2749966 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 22 Jul 2012 23:17:36 -0400 Subject: SCI: Rewrite RobotDecoder to use the AdvancedVideoDecoder API --- engines/sci/console.cpp | 8 +- engines/sci/engine/kvideo.cpp | 9 +- engines/sci/sci.cpp | 2 +- engines/sci/video/robot_decoder.cpp | 377 +++++++++++++++++++----------------- engines/sci/video/robot_decoder.h | 129 ++++++------ 5 files changed, 282 insertions(+), 243 deletions(-) diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index a6a6d4496f..9b5ef35e92 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -251,25 +251,25 @@ void Console::postEnter() { if (_videoFile.hasSuffix(".seq")) { videoDecoder = new SEQDecoder(_videoFrameDelay); - ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); // TODO: Remove after new API is complete #ifdef ENABLE_SCI32 } else if (_videoFile.hasSuffix(".vmd")) { videoDecoder = new Video::VMDDecoder(g_system->getMixer()); } else if (_videoFile.hasSuffix(".rbt")) { - videoDecoder = new RobotDecoder(g_system->getMixer(), _engine->getPlatform() == Common::kPlatformMacintosh); + videoDecoder = new RobotDecoder(_engine->getPlatform() == Common::kPlatformMacintosh); } else if (_videoFile.hasSuffix(".duk")) { duckMode = true; videoDecoder = new Video::AVIDecoder(); - ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); #endif } else if (_videoFile.hasSuffix(".avi")) { videoDecoder = new Video::AVIDecoder(); - ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); } else { warning("Unrecognized video type"); } if (videoDecoder && videoDecoder->loadFile(_videoFile)) { + if (!_videoFile.hasSuffix(".vmd")) // TODO: Remove after new API is complete + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); + _engine->_gfxCursor->kernelHide(); #ifdef ENABLE_SCI32 diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index 2c1532cc46..456f860493 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -254,6 +254,7 @@ reg_t kRobot(EngineState *s, int argc, reg_t *argv) { int16 y = argv[5].toUint16(); warning("kRobot(init), id %d, obj %04x:%04x, flag %d, x=%d, y=%d", id, PRINT_REG(obj), flag, x, y); g_sci->_robotDecoder->load(id); + g_sci->_robotDecoder->start(); g_sci->_robotDecoder->setPos(x, y); } break; @@ -269,13 +270,13 @@ reg_t kRobot(EngineState *s, int argc, reg_t *argv) { warning("kRobot(%d)", subop); break; case 8: // sync - //if (false) { // debug: automatically skip all robot videos - if ((uint32)g_sci->_robotDecoder->getCurFrame() != g_sci->_robotDecoder->getFrameCount() - 1) { - writeSelector(s->_segMan, argv[1], SELECTOR(signal), NULL_REG); - } else { + //if (true) { // debug: automatically skip all robot videos + if (g_sci->_robotDecoder->endOfVideo()) { g_sci->_robotDecoder->close(); // Signal the engine scripts that the video is done writeSelector(s->_segMan, argv[1], SELECTOR(signal), SIGNAL_REG); + } else { + writeSelector(s->_segMan, argv[1], SELECTOR(signal), NULL_REG); } break; default: diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index d43a9d06fc..42ae00b525 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -632,7 +632,7 @@ void SciEngine::initGraphics() { _gfxPaint = _gfxPaint32; _gfxText32 = new GfxText32(_gamestate->_segMan, _gfxCache, _gfxScreen); _gfxControls32 = new GfxControls32(_gamestate->_segMan, _gfxCache, _gfxScreen, _gfxText32); - _robotDecoder = new RobotDecoder(g_system->getMixer(), getPlatform() == Common::kPlatformMacintosh); + _robotDecoder = new RobotDecoder(getPlatform() == Common::kPlatformMacintosh); _gfxFrameout = new GfxFrameout(_gamestate->_segMan, _resMan, _gfxCoordAdjuster, _gfxCache, _gfxScreen, _gfxPalette, _gfxPaint32); } else { #endif diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp index ebcfac6054..6fe4c645f4 100644 --- a/engines/sci/video/robot_decoder.cpp +++ b/engines/sci/video/robot_decoder.cpp @@ -22,11 +22,13 @@ #include "common/archive.h" #include "common/stream.h" +#include "common/substream.h" #include "common/system.h" #include "common/textconsole.h" #include "common/util.h" #include "graphics/surface.h" +#include "audio/audiostream.h" #include "audio/decoders/raw.h" #include "sci/resource.h" @@ -63,57 +65,26 @@ namespace Sci { // our graphics engine, it looks just like a part of the room. A RBT can move // around the screen and go behind other objects. (...) -#ifdef ENABLE_SCI32 - -enum robotPalTypes { +enum RobotPalTypes { kRobotPalVariable = 0, kRobotPalConstant = 1 }; -RobotDecoder::RobotDecoder(Audio::Mixer *mixer, bool isBigEndian) { - _surface = 0; - _width = 0; - _height = 0; +RobotDecoder::RobotDecoder(bool isBigEndian) { _fileStream = 0; - _audioStream = 0; - _dirtyPalette = false; _pos = Common::Point(0, 0); - _mixer = mixer; _isBigEndian = isBigEndian; + _frameTotalSize = 0; } RobotDecoder::~RobotDecoder() { close(); } -bool RobotDecoder::load(GuiResourceId id) { - // TODO: RAMA's robot 1003 cannot be played (shown at the menu screen) - - // its drawn at odd coordinates. SV can't play it either (along with some - // others), so it must be some new functionality added in RAMA's robot - // videos. Skip it for now. - if (g_sci->getGameId() == GID_RAMA && id == 1003) - return false; - - // TODO: The robot video in the Lighthouse demo gets stuck - if (g_sci->getGameId() == GID_LIGHTHOUSE && id == 16) - return false; - - Common::String fileName = Common::String::format("%d.rbt", id); - Common::SeekableReadStream *stream = SearchMan.createReadStreamForMember(fileName); - - if (!stream) { - warning("Unable to open robot file %s", fileName.c_str()); - return false; - } - - return loadStream(stream); -} - bool RobotDecoder::loadStream(Common::SeekableReadStream *stream) { close(); _fileStream = new Common::SeekableSubReadStreamEndian(stream, 0, stream->size(), _isBigEndian, DisposeAfterUse::YES); - _surface = new Graphics::Surface(); readHeaderChunk(); @@ -125,131 +96,60 @@ bool RobotDecoder::loadStream(Common::SeekableReadStream *stream) { if (_header.version < 4 || _header.version > 6) error("Unknown robot version: %d", _header.version); - if (_header.hasSound) { - _audioStream = Audio::makeQueuingAudioStream(11025, false); - _mixer->playStream(Audio::Mixer::kMusicSoundType, &_audioHandle, _audioStream, -1, getVolume(), getBalance()); - } + RobotVideoTrack *videoTrack = new RobotVideoTrack(_header.frameCount); + addTrack(videoTrack); - readPaletteChunk(_header.paletteDataSize); - readFrameSizesChunk(); - calculateVideoDimensions(); - _surface->create(_width, _height, Graphics::PixelFormat::createFormatCLUT8()); + if (_header.hasSound) + addTrack(new RobotAudioTrack()); + videoTrack->readPaletteChunk(_fileStream, _header.paletteDataSize); + readFrameSizesChunk(); + videoTrack->calculateVideoDimensions(_fileStream, _frameTotalSize); return true; } -void RobotDecoder::readHeaderChunk() { - // Header (60 bytes) - _fileStream->skip(6); - _header.version = _fileStream->readUint16(); - _header.audioChunkSize = _fileStream->readUint16(); - _header.audioSilenceSize = _fileStream->readUint16(); - _fileStream->skip(2); - _header.frameCount = _fileStream->readUint16(); - _header.paletteDataSize = _fileStream->readUint16(); - _header.unkChunkDataSize = _fileStream->readUint16(); - _fileStream->skip(5); - _header.hasSound = _fileStream->readByte(); - _fileStream->skip(34); - - // Some videos (e.g. robot 1305 in Phantasmagoria and - // robot 184 in Lighthouse) have an unknown chunk before - // the palette chunk (probably used for sound preloading). - // Skip it here. - if (_header.unkChunkDataSize) - _fileStream->skip(_header.unkChunkDataSize); -} - -void RobotDecoder::readPaletteChunk(uint16 chunkSize) { - byte *paletteData = new byte[chunkSize]; - _fileStream->read(paletteData, chunkSize); - - // SCI1.1 palette - byte palFormat = paletteData[32]; - uint16 palColorStart = paletteData[25]; - uint16 palColorCount = READ_SCI11ENDIAN_UINT16(paletteData + 29); +bool RobotDecoder::load(GuiResourceId id) { + // TODO: RAMA's robot 1003 cannot be played (shown at the menu screen) - + // its drawn at odd coordinates. SV can't play it either (along with some + // others), so it must be some new functionality added in RAMA's robot + // videos. Skip it for now. + if (g_sci->getGameId() == GID_RAMA && id == 1003) + return false; + + // TODO: The robot video in the Lighthouse demo gets stuck + if (g_sci->getGameId() == GID_LIGHTHOUSE && id == 16) + return false; - int palOffset = 37; - memset(_palette, 0, 256 * 3); + Common::String fileName = Common::String::format("%d.rbt", id); + Common::SeekableReadStream *stream = SearchMan.createReadStreamForMember(fileName); - for (uint16 colorNo = palColorStart; colorNo < palColorStart + palColorCount; colorNo++) { - if (palFormat == kRobotPalVariable) - palOffset++; - _palette[colorNo * 3 + 0] = paletteData[palOffset++]; - _palette[colorNo * 3 + 1] = paletteData[palOffset++]; - _palette[colorNo * 3 + 2] = paletteData[palOffset++]; + if (!stream) { + warning("Unable to open robot file %s", fileName.c_str()); + return false; } - _dirtyPalette = true; - delete[] paletteData; + return loadStream(stream); } +void RobotDecoder::close() { + AdvancedVideoDecoder::close(); -void RobotDecoder::readFrameSizesChunk() { - // The robot video file contains 2 tables, with one entry for each frame: - // - A table containing the size of the image in each video frame - // - A table containing the total size of each video frame. - // In v5 robots, the tables contain 16-bit integers, whereas in v6 robots, - // they contain 32-bit integers. - - _frameTotalSize = new uint32[_header.frameCount]; - - // TODO: The table reading code can probably be removed once the - // audio chunk size is figured out (check the TODO inside processNextFrame()) -#if 0 - // We don't need any of the two tables to play the video, so we ignore - // both of them. - uint16 wordSize = _header.version == 6 ? 4 : 2; - _fileStream->skip(_header.frameCount * wordSize * 2); -#else - switch (_header.version) { - case 4: - case 5: // sizes are 16-bit integers - // Skip table with frame image sizes, as we don't need it - _fileStream->skip(_header.frameCount * 2); - for (int i = 0; i < _header.frameCount; ++i) - _frameTotalSize[i] = _fileStream->readUint16(); - break; - case 6: // sizes are 32-bit integers - // Skip table with frame image sizes, as we don't need it - _fileStream->skip(_header.frameCount * 4); - for (int i = 0; i < _header.frameCount; ++i) - _frameTotalSize[i] = _fileStream->readUint32(); - break; - default: - error("Can't yet handle index table for robot version %d", _header.version); - } -#endif - - // 2 more unknown tables - _fileStream->skip(1024 + 512); + delete _fileStream; + _fileStream = 0; - // Pad to nearest 2 kilobytes - uint32 curPos = _fileStream->pos(); - if (curPos & 0x7ff) - _fileStream->seek((curPos & ~0x7ff) + 2048); + delete[] _frameTotalSize; + _frameTotalSize = 0; } -void RobotDecoder::calculateVideoDimensions() { - // This is an O(n) operation, as each frame has a different size. - // We need to know the actual frame size to have a constant video size. - uint32 pos = _fileStream->pos(); - - for (uint32 curFrame = 0; curFrame < _header.frameCount; curFrame++) { - _fileStream->skip(4); - uint16 frameWidth = _fileStream->readUint16(); - uint16 frameHeight = _fileStream->readUint16(); - if (frameWidth > _width) - _width = frameWidth; - if (frameHeight > _height) - _height = frameHeight; - _fileStream->skip(_frameTotalSize[curFrame] - 8); - } +void RobotDecoder::readNextPacket() { + // Get our track + RobotVideoTrack *videoTrack = (RobotVideoTrack *)getTrack(0); + videoTrack->increaseCurFrame(); + Graphics::Surface *surface = videoTrack->getSurface(); - _fileStream->seek(pos); -} + if (videoTrack->endOfTrack()) + return; -const Graphics::Surface *RobotDecoder::decodeNextFrame() { // Read frame image header (24 bytes) _fileStream->skip(3); byte frameScale = _fileStream->readByte(); @@ -258,23 +158,28 @@ const Graphics::Surface *RobotDecoder::decodeNextFrame() { _fileStream->skip(4); // unknown, almost always 0 uint16 frameX = _fileStream->readUint16(); uint16 frameY = _fileStream->readUint16(); + // TODO: In v4 robot files, frameX and frameY have a different meaning. // Set them both to 0 for v4 for now, so that robots in PQ:SWAT show up // correctly. if (_header.version == 4) frameX = frameY = 0; + uint16 compressedSize = _fileStream->readUint16(); uint16 frameFragments = _fileStream->readUint16(); _fileStream->skip(4); // unknown uint32 decompressedSize = frameWidth * frameHeight * frameScale / 100; + // FIXME: A frame's height + position can go off limits... why? With the // following, we cut the contents to fit the frame - uint16 scaledHeight = CLIP(decompressedSize / frameWidth, 0, _height - frameY); + uint16 scaledHeight = CLIP(decompressedSize / frameWidth, 0, surface->h - frameY); + // FIXME: Same goes for the frame's width + position. In this case, we // modify the position to fit the contents on screen. - if (frameWidth + frameX > _width) - frameX = _width - frameWidth; - assert (frameWidth + frameX <= _width && scaledHeight + frameY <= _height); + if (frameWidth + frameX > surface->w) + frameX = surface->w - frameWidth; + + assert(frameWidth + frameX <= surface->w && scaledHeight + frameY <= surface->h); DecompressorLZS lzs; byte *decompressedFrame = new byte[decompressedSize]; @@ -305,24 +210,23 @@ const Graphics::Surface *RobotDecoder::decodeNextFrame() { // Copy over the decompressed frame byte *inFrame = decompressedFrame; - byte *outFrame = (byte *)_surface->pixels; + byte *outFrame = (byte *)surface->pixels; // Black out the surface - memset(outFrame, 0, _width * _height); + memset(outFrame, 0, surface->w * surface->h); // Move to the correct y coordinate - outFrame += _width * frameY; + outFrame += surface->w * frameY; for (uint16 y = 0; y < scaledHeight; y++) { memcpy(outFrame + frameX, inFrame, frameWidth); inFrame += frameWidth; - outFrame += _width; + outFrame += surface->w; } delete[] decompressedFrame; - // +1 because we start with frame number -1 - uint32 audioChunkSize = _frameTotalSize[_curFrame + 1] - (24 + compressedSize); + uint32 audioChunkSize = _frameTotalSize[videoTrack->getCurFrame()] - (24 + compressedSize); // TODO: The audio chunk size below is usually correct, but there are some // exceptions (e.g. robot 4902 in Phantasmagoria, towards its end) @@ -337,51 +241,166 @@ const Graphics::Surface *RobotDecoder::decodeNextFrame() { // Queue the next audio frame // FIXME: For some reason, there are audio hiccups/gaps if (_header.hasSound) { - _fileStream->skip(8); // header - _audioStream->queueBuffer(g_sci->_audio->getDecodedRobotAudioFrame(_fileStream, audioChunkSize - 8), - (audioChunkSize - 8) * 2, DisposeAfterUse::NO, - Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN); + RobotAudioTrack *audioTrack = (RobotAudioTrack *)getTrack(1); + _fileStream->skip(8); // header + audioChunkSize -= 8; + audioTrack->queueBuffer(g_sci->_audio->getDecodedRobotAudioFrame(_fileStream, audioChunkSize), audioChunkSize * 2); } else { _fileStream->skip(audioChunkSize); - } - - if (_curFrame == -1) - _startTime = g_system->getMillis(); + } +} - _curFrame++; +void RobotDecoder::readHeaderChunk() { + // Header (60 bytes) + _fileStream->skip(6); + _header.version = _fileStream->readUint16(); + _header.audioChunkSize = _fileStream->readUint16(); + _header.audioSilenceSize = _fileStream->readUint16(); + _fileStream->skip(2); + _header.frameCount = _fileStream->readUint16(); + _header.paletteDataSize = _fileStream->readUint16(); + _header.unkChunkDataSize = _fileStream->readUint16(); + _fileStream->skip(5); + _header.hasSound = _fileStream->readByte(); + _fileStream->skip(34); - return _surface; + // Some videos (e.g. robot 1305 in Phantasmagoria and + // robot 184 in Lighthouse) have an unknown chunk before + // the palette chunk (probably used for sound preloading). + // Skip it here. + if (_header.unkChunkDataSize) + _fileStream->skip(_header.unkChunkDataSize); } -void RobotDecoder::close() { - if (!_fileStream) - return; +void RobotDecoder::readFrameSizesChunk() { + // The robot video file contains 2 tables, with one entry for each frame: + // - A table containing the size of the image in each video frame + // - A table containing the total size of each video frame. + // In v5 robots, the tables contain 16-bit integers, whereas in v6 robots, + // they contain 32-bit integers. - delete _fileStream; - _fileStream = 0; + _frameTotalSize = new uint32[_header.frameCount]; + // TODO: The table reading code can probably be removed once the + // audio chunk size is figured out (check the TODO inside processNextFrame()) +#if 0 + // We don't need any of the two tables to play the video, so we ignore + // both of them. + uint16 wordSize = _header.version == 6 ? 4 : 2; + _fileStream->skip(_header.frameCount * wordSize * 2); +#else + switch (_header.version) { + case 4: + case 5: // sizes are 16-bit integers + // Skip table with frame image sizes, as we don't need it + _fileStream->skip(_header.frameCount * 2); + for (int i = 0; i < _header.frameCount; ++i) + _frameTotalSize[i] = _fileStream->readUint16(); + break; + case 6: // sizes are 32-bit integers + // Skip table with frame image sizes, as we don't need it + _fileStream->skip(_header.frameCount * 4); + for (int i = 0; i < _header.frameCount; ++i) + _frameTotalSize[i] = _fileStream->readUint32(); + break; + default: + error("Can't yet handle index table for robot version %d", _header.version); + } +#endif + + // 2 more unknown tables + _fileStream->skip(1024 + 512); + + // Pad to nearest 2 kilobytes + uint32 curPos = _fileStream->pos(); + if (curPos & 0x7ff) + _fileStream->seek((curPos & ~0x7ff) + 2048); +} + +RobotDecoder::RobotVideoTrack::RobotVideoTrack(int frameCount) : _frameCount(frameCount) { + _surface = new Graphics::Surface(); + _curFrame = -1; + _dirtyPalette = false; +} + +RobotDecoder::RobotVideoTrack::~RobotVideoTrack() { _surface->free(); delete _surface; - _surface = 0; +} - if (_header.hasSound) { - _mixer->stopHandle(_audioHandle); - //delete _audioStream; _audioStream = 0; +uint16 RobotDecoder::RobotVideoTrack::getWidth() const { + return _surface->w; +} + +uint16 RobotDecoder::RobotVideoTrack::getHeight() const { + return _surface->h; +} + +Graphics::PixelFormat RobotDecoder::RobotVideoTrack::getPixelFormat() const { + return _surface->format; +} + +void RobotDecoder::RobotVideoTrack::readPaletteChunk(Common::SeekableSubReadStreamEndian *stream, uint16 chunkSize) { + byte *paletteData = new byte[chunkSize]; + stream->read(paletteData, chunkSize); + + // SCI1.1 palette + byte palFormat = paletteData[32]; + uint16 palColorStart = paletteData[25]; + uint16 palColorCount = READ_SCI11ENDIAN_UINT16(paletteData + 29); + + int palOffset = 37; + memset(_palette, 0, 256 * 3); + + for (uint16 colorNo = palColorStart; colorNo < palColorStart + palColorCount; colorNo++) { + if (palFormat == kRobotPalVariable) + palOffset++; + _palette[colorNo * 3 + 0] = paletteData[palOffset++]; + _palette[colorNo * 3 + 1] = paletteData[palOffset++]; + _palette[colorNo * 3 + 2] = paletteData[palOffset++]; } - reset(); + _dirtyPalette = true; + delete[] paletteData; } -void RobotDecoder::updateVolume() { - if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) - g_system->getMixer()->setChannelVolume(_audioHandle, getVolume()); +void RobotDecoder::RobotVideoTrack::calculateVideoDimensions(Common::SeekableSubReadStreamEndian *stream, uint32 *frameSizes) { + // This is an O(n) operation, as each frame has a different size. + // We need to know the actual frame size to have a constant video size. + uint32 pos = stream->pos(); + + uint16 width = 0, height = 0; + + for (int curFrame = 0; curFrame < _frameCount; curFrame++) { + stream->skip(4); + uint16 frameWidth = stream->readUint16(); + uint16 frameHeight = stream->readUint16(); + if (frameWidth > width) + width = frameWidth; + if (frameHeight > height) + height = frameHeight; + stream->skip(frameSizes[curFrame] - 8); + } + + stream->seek(pos); + + _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8()); } -void RobotDecoder::updateBalance() { - if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) - g_system->getMixer()->setChannelBalance(_audioHandle, getBalance()); +RobotDecoder::RobotAudioTrack::RobotAudioTrack() { + _audioStream = Audio::makeQueuingAudioStream(11025, false); } -#endif +RobotDecoder::RobotAudioTrack::~RobotAudioTrack() { + delete _audioStream; +} + +void RobotDecoder::RobotAudioTrack::queueBuffer(byte *buffer, int size) { + _audioStream->queueBuffer(buffer, size, DisposeAfterUse::YES, Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN); +} + +Audio::AudioStream *RobotDecoder::RobotAudioTrack::getAudioStream() const { + return _audioStream; +} } // End of namespace Sci diff --git a/engines/sci/video/robot_decoder.h b/engines/sci/video/robot_decoder.h index e9cefe7d91..de5b669ab8 100644 --- a/engines/sci/video/robot_decoder.h +++ b/engines/sci/video/robot_decoder.h @@ -25,84 +25,103 @@ #include "common/rational.h" #include "common/rect.h" -#include "common/stream.h" -#include "common/substream.h" -#include "audio/audiostream.h" -#include "audio/mixer.h" -#include "graphics/pixelformat.h" #include "video/video_decoder.h" -namespace Sci { +namespace Audio { +class QueuingAudioStream; +} -#ifdef ENABLE_SCI32 - -struct RobotHeader { - // 6 bytes, identifier bytes - uint16 version; - uint16 audioChunkSize; - uint16 audioSilenceSize; - // 2 bytes, unknown - uint16 frameCount; - uint16 paletteDataSize; - uint16 unkChunkDataSize; - // 5 bytes, unknown - byte hasSound; - // 34 bytes, unknown -}; +namespace Common { +class SeekableSubReadStreamEndian; +} + +namespace Sci { -class RobotDecoder : public Video::FixedRateVideoDecoder { +class RobotDecoder : public Video::AdvancedVideoDecoder { public: - RobotDecoder(Audio::Mixer *mixer, bool isBigEndian); + RobotDecoder(bool isBigEndian); virtual ~RobotDecoder(); bool loadStream(Common::SeekableReadStream *stream); bool load(GuiResourceId id); void close(); - - bool isVideoLoaded() const { return _fileStream != 0; } - uint16 getWidth() const { return _width; } - uint16 getHeight() const { return _height; } - uint32 getFrameCount() const { return _header.frameCount; } - const Graphics::Surface *decodeNextFrame(); - Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); } - const byte *getPalette() { _dirtyPalette = false; return _palette; } - bool hasDirtyPalette() const { return _dirtyPalette; } + void setPos(uint16 x, uint16 y) { _pos = Common::Point(x, y); } Common::Point getPos() const { return _pos; } protected: - // VideoDecoder API - void updateVolume(); - void updateBalance(); - - // FixedRateVideoDecoder API - Common::Rational getFrameRate() const { return Common::Rational(60, 10); } - + void readNextPacket(); + private: + class RobotVideoTrack : public FixedRateVideoTrack { + public: + RobotVideoTrack(int frameCount); + ~RobotVideoTrack(); + + uint16 getWidth() const; + uint16 getHeight() const; + Graphics::PixelFormat getPixelFormat() const; + int getCurFrame() const { return _curFrame; } + int getFrameCount() const { return _frameCount; } + const Graphics::Surface *decodeNextFrame() { return _surface; } + const byte *getPalette() const { _dirtyPalette = false; return _palette; } + bool hasDirtyPalette() const { return _dirtyPalette; } + + void readPaletteChunk(Common::SeekableSubReadStreamEndian *stream, uint16 chunkSize); + void calculateVideoDimensions(Common::SeekableSubReadStreamEndian *stream, uint32 *frameSizes); + Graphics::Surface *getSurface() { return _surface; } + void increaseCurFrame() { _curFrame++; } + + protected: + Common::Rational getFrameRate() const { return Common::Rational(60, 10); } + + private: + int _frameCount; + int _curFrame; + byte _palette[256 * 3]; + mutable bool _dirtyPalette; + Graphics::Surface *_surface; + }; + + class RobotAudioTrack : public AudioTrack { + public: + RobotAudioTrack(); + ~RobotAudioTrack(); + + Audio::Mixer::SoundType getSoundType() const { return Audio::Mixer::kMusicSoundType; } + + void queueBuffer(byte *buffer, int size); + + protected: + Audio::AudioStream *getAudioStream() const; + + private: + Audio::QueuingAudioStream *_audioStream; + }; + + struct RobotHeader { + // 6 bytes, identifier bytes + uint16 version; + uint16 audioChunkSize; + uint16 audioSilenceSize; + // 2 bytes, unknown + uint16 frameCount; + uint16 paletteDataSize; + uint16 unkChunkDataSize; + // 5 bytes, unknown + byte hasSound; + // 34 bytes, unknown + } _header; + void readHeaderChunk(); - void readPaletteChunk(uint16 chunkSize); void readFrameSizesChunk(); - void calculateVideoDimensions(); - - void freeData(); - RobotHeader _header; Common::Point _pos; bool _isBigEndian; + uint32 *_frameTotalSize; Common::SeekableSubReadStreamEndian *_fileStream; - - uint16 _width; - uint16 _height; - uint32 *_frameTotalSize; - byte _palette[256 * 3]; - bool _dirtyPalette; - Graphics::Surface *_surface; - Audio::QueuingAudioStream *_audioStream; - Audio::SoundHandle _audioHandle; - Audio::Mixer *_mixer; }; -#endif } // End of namespace Sci -- cgit v1.2.3 From 61e8fdbf1d05bbe37910a787fa53958f4aa5e7f1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 24 Jul 2012 00:16:42 +0300 Subject: SCI: Separate the early SCI11 version of kRemapColors from the SCI32 one --- engines/sci/engine/kernel.h | 1 + engines/sci/engine/kernel_tables.h | 5 ++- engines/sci/engine/kgraphics.cpp | 60 ++++--------------------------- engines/sci/engine/kgraphics32.cpp | 74 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 55 deletions(-) diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 441ea2624f..f985a69ebc 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -412,6 +412,7 @@ reg_t kListAt(EngineState *s, int argc, reg_t *argv); reg_t kString(EngineState *s, int argc, reg_t *argv); reg_t kMulDiv(EngineState *s, int argc, reg_t *argv); reg_t kCantBeHere32(EngineState *s, int argc, reg_t *argv); +reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv); // "Screen items" in SCI32 are views reg_t kAddScreenItem(EngineState *s, int argc, reg_t *argv); reg_t kUpdateScreenItem(EngineState *s, int argc, reg_t *argv); diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 825ec90fa9..f5f46285be 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -419,7 +419,10 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(PriCoord), SIG_EVERYWHERE, "i", NULL, NULL }, { MAP_CALL(Random), SIG_EVERYWHERE, "i(i)(i)", NULL, NULL }, { MAP_CALL(ReadNumber), SIG_EVERYWHERE, "r", NULL, NULL }, - { MAP_CALL(RemapColors), SIG_EVERYWHERE, "i(i)(i)(i)(i)(i)", NULL, NULL }, + { MAP_CALL(RemapColors), SIG_SCI11, SIGFOR_ALL, "i(i)(i)(i)(i)", NULL, NULL }, +#ifdef ENABLE_SCI32 + { "RemapColors", kRemapColors32, SIG_SCI32, SIGFOR_ALL, "i(i)(i)(i)(i)(i)", NULL, NULL }, +#endif { MAP_CALL(ResCheck), SIG_EVERYWHERE, "ii(iiii)", NULL, NULL }, { MAP_CALL(RespondsTo), SIG_EVERYWHERE, ".i", NULL, NULL }, { MAP_CALL(RestartGame), SIG_EVERYWHERE, "", NULL, NULL }, diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 6d938b6d22..2ce44db772 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -1221,73 +1221,25 @@ reg_t kShow(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } +// Early variant of the SCI32 remapcolors kernel function, used in the demo of QFG4 reg_t kRemapColors(EngineState *s, int argc, reg_t *argv) { uint16 operation = argv[0].toUint16(); switch (operation) { - case 0: { // Set remapping to base. 0 turns remapping off. - int16 base = (argc >= 2) ? argv[1].toSint16() : 0; - if (base != 0) // 0 is the default behavior when changing rooms in GK1, thus silencing the warning - warning("kRemapColors: Set remapping to base %d", base); + case 0: { // remap by percent + uint16 percent = argv[1].toUint16(); + warning("RemapColors(RemapByPercent) %d", percent); } break; case 1: { // unknown - // The demo of QFG4 calls this with 1+3 parameters, thus there are differences here //int16 unk1 = argv[1].toSint16(); //int16 unk2 = argv[2].toSint16(); //int16 unk3 = argv[3].toSint16(); - //uint16 unk4 = argv[4].toUint16(); - //uint16 unk5 = (argc >= 6) ? argv[5].toUint16() : 0; kStub(s, argc, argv); } break; - case 2: { // remap by percent - // This adjusts the alpha value of a specific color, and it operates on - // an RGBA palette. Since we're operating on an RGB palette, we just - // modify the color intensity instead - // TODO: From what I understand, palette remapping should be placed - // separately, so that it can be reset by case 0 above. Thus, we - // should adjust the functionality of the Palette class accordingly. - int16 color = argv[1].toSint16(); - if (color >= 10) - color -= 10; - uint16 percent = argv[2].toUint16(); // 0 - 100 - if (argc >= 4) - warning("RemapByPercent called with 4 parameters, unknown parameter is %d", argv[3].toUint16()); - warning("kRemapColors: RemapByPercent color %d by %d percent", color, percent); - // TODO: It's not correct to set intensity here - //g_sci->_gfxPalette->kernelSetIntensity(color, 255, percent, false); - } - break; - case 3: { // remap to gray - // NOTE: This adjusts the alpha value of a specific color, and it operates on - // an RGBA palette - int16 color = argv[1].toSint16(); // this is subtracted from a maximum color value, and can be offset by 10 - int16 percent = argv[2].toSint16(); // 0 - 100 - uint16 unk3 = (argc >= 4) ? argv[3].toUint16() : 0; - warning("kRemapColors: RemapToGray color %d by %d percent (unk3 = %d)", color, percent, unk3); - } - break; - case 4: { // unknown - //int16 unk1 = argv[1].toSint16(); - //uint16 unk2 = argv[2].toUint16(); - //uint16 unk3 = argv[3].toUint16(); - //uint16 unk4 = (argc >= 5) ? argv[4].toUint16() : 0; - kStub(s, argc, argv); - } - break; - case 5: { // set color intensity - // TODO: This isn't right, it should be setting a mapping table instead. - // For PQ4, we can emulate this with kernelSetIntensity(). In QFG4, this - // won't do. - //int16 mapping = argv[1].toSint16(); - uint16 intensity = argv[2].toUint16(); - // HACK for PQ4 - if (g_sci->getGameId() == GID_PQ4) - g_sci->_gfxPalette->kernelSetIntensity(0, 255, intensity, true); - - kStub(s, argc, argv); - } + case 2: // turn remapping off (unused) + error("Unused subop kRemapColors(2) has been called"); break; default: break; diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 7cfac57675..245c265ba6 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -733,6 +733,80 @@ reg_t kPalCycle(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } +reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { + uint16 operation = argv[0].toUint16(); + + switch (operation) { + case 0: { // Set remapping to base. 0 turns remapping off. + int16 base = (argc >= 2) ? argv[1].toSint16() : 0; + if (base != 0) // 0 is the default behavior when changing rooms in GK1, thus silencing the warning + warning("kRemapColors: Set remapping to base %d", base); + } + break; + case 1: { // unknown + //int16 unk1 = argv[1].toSint16(); + //int16 unk2 = argv[2].toSint16(); + //int16 unk3 = argv[3].toSint16(); + //uint16 unk4 = argv[4].toUint16(); + //uint16 unk5 = (argc >= 6) ? argv[5].toUint16() : 0; + kStub(s, argc, argv); + } + break; + case 2: { // remap by percent + // This adjusts the alpha value of a specific color, and it operates on + // an RGBA palette. Since we're operating on an RGB palette, we just + // modify the color intensity instead + // TODO: From what I understand, palette remapping should be placed + // separately, so that it can be reset by case 0 above. Thus, we + // should adjust the functionality of the Palette class accordingly. + int16 color = argv[1].toSint16(); + if (color >= 10) + color -= 10; + uint16 percent = argv[2].toUint16(); // 0 - 100 + if (argc >= 4) + warning("RemapByPercent called with 4 parameters, unknown parameter is %d", argv[3].toUint16()); + warning("kRemapColors: RemapByPercent color %d by %d percent", color, percent); + // TODO: It's not correct to set intensity here + //g_sci->_gfxPalette->kernelSetIntensity(color, 255, percent, false); + } + break; + case 3: { // remap to gray + // NOTE: This adjusts the alpha value of a specific color, and it operates on + // an RGBA palette + int16 color = argv[1].toSint16(); // this is subtracted from a maximum color value, and can be offset by 10 + int16 percent = argv[2].toSint16(); // 0 - 100 + uint16 unk3 = (argc >= 4) ? argv[3].toUint16() : 0; + warning("kRemapColors: RemapToGray color %d by %d percent (unk3 = %d)", color, percent, unk3); + } + break; + case 4: { // unknown + //int16 unk1 = argv[1].toSint16(); + //uint16 unk2 = argv[2].toUint16(); + //uint16 unk3 = argv[3].toUint16(); + //uint16 unk4 = (argc >= 5) ? argv[4].toUint16() : 0; + kStub(s, argc, argv); + } + break; + case 5: { // set color intensity + // TODO: This isn't right, it should be setting a mapping table instead. + // For PQ4, we can emulate this with kernelSetIntensity(). In QFG4, this + // won't do. + //int16 mapping = argv[1].toSint16(); + uint16 intensity = argv[2].toUint16(); + // HACK for PQ4 + if (g_sci->getGameId() == GID_PQ4) + g_sci->_gfxPalette->kernelSetIntensity(0, 255, intensity, true); + + kStub(s, argc, argv); + } + break; + default: + break; + } + + return s->r_acc; +} + #endif } // End of namespace Sci -- cgit v1.2.3 From bd281928cb6e87cfb7175189cafd2b25991f3e01 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 24 Jul 2012 03:53:44 +0300 Subject: SCI: Initial implementation of kRemapColors(kRemapByPercent) Fixes some graphics glitches in the QFG4 demo and the menus of QFG4, by implementing one of the transparency effects used mainly in SCI32. Many thanks to fuzzie for her debugging info on QFG4 demo and to wjp for his great help on the dissassembly --- engines/sci/engine/kgraphics.cpp | 7 ++++--- engines/sci/engine/kgraphics32.cpp | 21 +++++++++------------ engines/sci/graphics/palette.cpp | 23 +++++++++++++++++++++++ engines/sci/graphics/palette.h | 9 +++++++++ engines/sci/graphics/view.cpp | 10 ++++++++-- 5 files changed, 53 insertions(+), 17 deletions(-) diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 2ce44db772..bd78c56416 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -1221,17 +1221,18 @@ reg_t kShow(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } -// Early variant of the SCI32 remapcolors kernel function, used in the demo of QFG4 +// Early variant of the SCI32 kRemapColors kernel function, used in the demo of QFG4 reg_t kRemapColors(EngineState *s, int argc, reg_t *argv) { uint16 operation = argv[0].toUint16(); switch (operation) { case 0: { // remap by percent uint16 percent = argv[1].toUint16(); - warning("RemapColors(RemapByPercent) %d", percent); + g_sci->_gfxPalette->toggleRemap(true); + g_sci->_gfxPalette->setRemappingPercent(percent); } break; - case 1: { // unknown + case 1: { // set remapping base //int16 unk1 = argv[1].toSint16(); //int16 unk2 = argv[2].toSint16(); //int16 unk3 = argv[3].toSint16(); diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 245c265ba6..1b7b628e7d 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -742,8 +742,11 @@ reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { if (base != 0) // 0 is the default behavior when changing rooms in GK1, thus silencing the warning warning("kRemapColors: Set remapping to base %d", base); } + // TODO: Don't turn remapping off always + g_sci->_gfxPalette->toggleRemap(false); + g_sci->_gfxPalette->setRemappingPercent(0); break; - case 1: { // unknown + case 1: { // set remapping base //int16 unk1 = argv[1].toSint16(); //int16 unk2 = argv[2].toSint16(); //int16 unk3 = argv[3].toSint16(); @@ -753,21 +756,15 @@ reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { } break; case 2: { // remap by percent - // This adjusts the alpha value of a specific color, and it operates on - // an RGBA palette. Since we're operating on an RGB palette, we just - // modify the color intensity instead - // TODO: From what I understand, palette remapping should be placed - // separately, so that it can be reset by case 0 above. Thus, we - // should adjust the functionality of the Palette class accordingly. - int16 color = argv[1].toSint16(); + // TODO: Use the color index. The -10 offset is wrong. + /*int16 color = argv[1].toSint16(); if (color >= 10) - color -= 10; + color -= 10;*/ uint16 percent = argv[2].toUint16(); // 0 - 100 if (argc >= 4) warning("RemapByPercent called with 4 parameters, unknown parameter is %d", argv[3].toUint16()); - warning("kRemapColors: RemapByPercent color %d by %d percent", color, percent); - // TODO: It's not correct to set intensity here - //g_sci->_gfxPalette->kernelSetIntensity(color, 255, percent, false); + g_sci->_gfxPalette->toggleRemap(true); + g_sci->_gfxPalette->setRemappingPercent(percent); } break; case 3: { // remap to gray diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index ea154c5037..f16d607a29 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -100,6 +100,9 @@ GfxPalette::GfxPalette(ResourceManager *resMan, GfxScreen *screen) default: error("GfxPalette: Unknown view type"); } + + _remapOn = false; + _remappingPercent = 0; } GfxPalette::~GfxPalette() { @@ -329,6 +332,26 @@ void GfxPalette::set(Palette *newPalette, bool force, bool forceRealMerge) { } } +bool GfxPalette::isRemapColor(byte color) { + // TODO: Expand this for SCI32 (more than one remap color can be set). + // Now, it is assumed that colors 253 and 254 are the remap colors. + return _remapOn && (color == 253 || color == 254); +} + +byte GfxPalette::remapColor(byte color) { + assert(_remapOn); + + // TODO: Change this to use a table instead, like the original. + if (_remappingPercent) { + byte r = _sysPalette.colors[color].r * _remappingPercent / 100; + byte g = _sysPalette.colors[color].g * _remappingPercent / 100; + byte b = _sysPalette.colors[color].b * _remappingPercent / 100; + return kernelFindColor(r, g, b); + } else { + return color; + } +} + bool GfxPalette::insert(Palette *newPalette, Palette *destPalette) { bool paletteChanged = false; diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h index a9ea1c32de..5b9ae9e016 100644 --- a/engines/sci/graphics/palette.h +++ b/engines/sci/graphics/palette.h @@ -53,6 +53,11 @@ public: void getSys(Palette *pal); uint16 getTotalColorCount() const { return _totalScreenColors; } + void toggleRemap(bool remap) { _remapOn = remap; } + void setRemappingPercent(uint16 percent) { _remappingPercent = percent; } + bool isRemapColor(byte color); + byte remapColor(byte color); + void setOnScreen(); void copySysPaletteToScreen(); @@ -123,6 +128,10 @@ private: int _palVarySignal; uint16 _totalScreenColors; + bool _remapOn; + uint16 _remappingBaseR, _remappingBaseG, _remappingBaseB; + uint16 _remappingPercent; + void loadMacIconBarPalette(); byte *_macClut; diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp index 4e5c4da8b2..ae135d141c 100644 --- a/engines/sci/graphics/view.cpp +++ b/engines/sci/graphics/view.cpp @@ -741,8 +741,14 @@ void GfxView::draw(const Common::Rect &rect, const Common::Rect &clipRect, const const int x2 = clipRectTranslated.left + x; const int y2 = clipRectTranslated.top + y; if (!upscaledHires) { - if (priority >= _screen->getPriority(x2, y2)) - _screen->putPixel(x2, y2, drawMask, palette->mapping[color], priority, 0); + if (priority >= _screen->getPriority(x2, y2)) { + if (!_palette->isRemapColor(palette->mapping[color])) { + _screen->putPixel(x2, y2, drawMask, palette->mapping[color], priority, 0); + } else { + byte remappedColor = _palette->remapColor(_screen->getVisual(x2, y2)); + _screen->putPixel(x2, y2, drawMask, remappedColor, priority, 0); + } + } } else { // UpscaledHires means view is hires and is supposed to // get drawn onto lowres screen. -- cgit v1.2.3 From 3a780a63db79c2a1b2527e6510182a74f6fcfe12 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 23 Jul 2012 21:03:49 -0400 Subject: VIDEO: Set _startTime when rewinding and seeking --- video/video_decoder.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index ad176da73b..97f8eec7bb 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -263,6 +263,7 @@ bool AdvancedVideoDecoder::rewind() { return false; _audioStartOffset = 0; + _startTime = g_system->getMillis(); return true; } @@ -290,6 +291,7 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) { return false; _audioStartOffset = time; + _startTime = g_system->getMillis() - time.msecs(); return true; } -- cgit v1.2.3 From a652f6669e2e9225aee17431784b433397b41ae3 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 23 Jul 2012 21:04:51 -0400 Subject: VIDEO: Rewrite SmackerDecoder to use the new API --- engines/agos/animation.cpp | 12 +- engines/agos/animation.h | 4 +- engines/saga/introproc_saga2.cpp | 4 +- engines/scumm/he/animation_he.cpp | 5 +- engines/sword1/animation.cpp | 9 +- engines/sword2/animation.cpp | 9 +- engines/toon/movie.cpp | 35 ++-- engines/toon/movie.h | 14 +- engines/toon/toon.cpp | 2 +- video/smk_decoder.cpp | 391 ++++++++++++++++++++------------------ video/smk_decoder.h | 117 ++++++++---- 11 files changed, 338 insertions(+), 264 deletions(-) diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index 10c01741ae..3e8488d7d5 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -415,7 +415,7 @@ void MoviePlayerDXA::updateBalance() { MoviePlayerSMK::MoviePlayerSMK(AGOSEngine_Feeble *vm, const char *name) - : MoviePlayer(vm), SmackerDecoder(vm->_mixer) { + : MoviePlayer(vm), SmackerDecoder() { debug(0, "Creating SMK cutscene player"); memset(baseName, 0, sizeof(baseName)); @@ -431,12 +431,12 @@ bool MoviePlayerSMK::load() { if (!loadStream(videoStream)) error("Failed to load video stream from file %s", videoName.c_str()); + start(); + debug(0, "Playing video %s", videoName.c_str()); CursorMan.showMouse(false); - _firstFrameOffset = _fileStream->pos(); - return true; } @@ -477,10 +477,8 @@ void MoviePlayerSMK::handleNextFrame() { } void MoviePlayerSMK::nextFrame() { - if (_vm->_interactiveVideo == TYPE_LOOPING && endOfVideo()) { - _fileStream->seek(_firstFrameOffset); - _curFrame = -1; - } + if (_vm->_interactiveVideo == TYPE_LOOPING && endOfVideo()) + rewind(); if (!endOfVideo()) { decodeNextFrame(); diff --git a/engines/agos/animation.h b/engines/agos/animation.h index d1ff074b03..37a666b201 100644 --- a/engines/agos/animation.h +++ b/engines/agos/animation.h @@ -67,9 +67,6 @@ protected: virtual void handleNextFrame(); virtual bool processFrame() = 0; virtual void startSound() {} - -protected: - uint32 _firstFrameOffset; }; class MoviePlayerDXA : public MoviePlayer, Video::DXADecoder { @@ -93,6 +90,7 @@ private: bool processFrame(); void startSound(); void copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch); + uint32 _firstFrameOffset; }; class MoviePlayerSMK : public MoviePlayer, Video::SmackerDecoder { diff --git a/engines/saga/introproc_saga2.cpp b/engines/saga/introproc_saga2.cpp index b6470370af..15f7f4dc15 100644 --- a/engines/saga/introproc_saga2.cpp +++ b/engines/saga/introproc_saga2.cpp @@ -92,7 +92,7 @@ int Scene::FTA2EndProc(FTA2Endings whichEnding) { } void Scene::playMovie(const char *filename) { - Video::SmackerDecoder *smkDecoder = new Video::SmackerDecoder(_vm->_mixer); + Video::SmackerDecoder *smkDecoder = new Video::SmackerDecoder(); if (!smkDecoder->loadFile(filename)) return; @@ -101,6 +101,8 @@ void Scene::playMovie(const char *filename) { uint16 y = (g_system->getHeight() - smkDecoder->getHeight()) / 2; bool skipVideo = false; + smkDecoder->start(); + while (!_vm->shouldQuit() && !smkDecoder->endOfVideo() && !skipVideo) { if (smkDecoder->needsUpdate()) { const Graphics::Surface *frame = smkDecoder->decodeNextFrame(); diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp index 40e99c26a8..b37a565aab 100644 --- a/engines/scumm/he/animation_he.cpp +++ b/engines/scumm/he/animation_he.cpp @@ -40,7 +40,10 @@ MoviePlayer::MoviePlayer(ScummEngine_v90he *vm, Audio::Mixer *mixer) : _vm(vm) { _video = new Video::BinkDecoder(); else #endif - _video = new Video::SmackerDecoder(mixer); + { + _video = new Video::SmackerDecoder(); + ((Video::AdvancedVideoDecoder *)_video)->start(); + } _flags = 0; _wizResNum = 0; diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index 49c5ef7312..8f863d1e09 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -179,6 +179,13 @@ bool MoviePlayer::load(uint32 id) { break; case kVideoDecoderSMK: filename = Common::String::format("%s.smk", sequenceList[id]); + + if (_decoder->loadFile(filename)) { + ((Video::AdvancedVideoDecoder *)_decoder)->start(); // TODO: Remove after new API is complete + return true; + } else { + return false; + } break; case kVideoDecoderPSX: filename = Common::String::format("%s.str", (_vm->_systemVars.isDemo) ? sequenceList[id] : sequenceListPSX[id]); @@ -547,7 +554,7 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan * filename = Common::String::format("%s.smk", sequenceList[id]); if (Common::File::exists(filename)) { - Video::SmackerDecoder *smkDecoder = new Video::SmackerDecoder(snd); + Video::SmackerDecoder *smkDecoder = new Video::SmackerDecoder(); return new MoviePlayer(vm, textMan, resMan, snd, system, bgSoundHandle, smkDecoder, kVideoDecoderSMK); } diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index c1cf33ff09..e257ec9029 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -89,6 +89,13 @@ bool MoviePlayer::load(const char *name) { break; case kVideoDecoderSMK: filename = Common::String::format("%s.smk", name); + + if (_decoder->loadFile(filename)) { + ((Video::AdvancedVideoDecoder *)_decoder)->start(); // TODO: Remove after new API is complete + return true; + } else { + return false; + } break; case kVideoDecoderPSX: filename = Common::String::format("%s.str", name); @@ -442,7 +449,7 @@ MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, Audio::Mixer *s filename = Common::String::format("%s.smk", name); if (Common::File::exists(filename)) { - Video::SmackerDecoder *smkDecoder = new Video::SmackerDecoder(snd); + Video::SmackerDecoder *smkDecoder = new Video::SmackerDecoder(); return new MoviePlayer(vm, snd, system, bgSoundHandle, smkDecoder, kVideoDecoderSMK); } diff --git a/engines/toon/movie.cpp b/engines/toon/movie.cpp index 93e41adf57..d988a3ed60 100644 --- a/engines/toon/movie.cpp +++ b/engines/toon/movie.cpp @@ -33,6 +33,10 @@ namespace Toon { +ToonstruckSmackerDecoder::ToonstruckSmackerDecoder() : Video::SmackerDecoder() { + _lowRes = false; +} + void ToonstruckSmackerDecoder::handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize) { debugC(6, kDebugMovie, "handleAudioTrack(%d, %d, %d)", track, chunkSize, unpackedSize); @@ -40,33 +44,21 @@ void ToonstruckSmackerDecoder::handleAudioTrack(byte track, uint32 chunkSize, ui /* uint16 width = */ _fileStream->readUint16LE(); uint16 height = _fileStream->readUint16LE(); _lowRes = (height == getHeight() / 2); - } else + } else { Video::SmackerDecoder::handleAudioTrack(track, chunkSize, unpackedSize); + } } -bool ToonstruckSmackerDecoder::loadFile(const Common::String &filename) { - debugC(1, kDebugMovie, "loadFile(%s)", filename.c_str()); +bool ToonstruckSmackerDecoder::loadStream(Common::SeekableReadStream *stream) { + if (!Video::SmackerDecoder::loadStream(stream)) + return false; _lowRes = false; - - if (Video::SmackerDecoder::loadFile(filename)) { - if (_surface->h == 200) { - if (_surface) { - _surface->free(); - delete _surface; - } - _surface = new Graphics::Surface(); - _surface->create(640, 400, Graphics::PixelFormat::createFormatCLUT8()); - _header.flags = 4; - } - - return true; - } - return false; + return true; } -ToonstruckSmackerDecoder::ToonstruckSmackerDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : Video::SmackerDecoder(mixer, soundType) { - _lowRes = false; +Video::SmackerDecoder::SmackerVideoTrack *ToonstruckSmackerDecoder::createVideoTrack(uint32 width, uint32 height, uint32 frameCount, const Common::Rational &frameRate, uint32 flags, uint32 signature) const { + return Video::SmackerDecoder::createVideoTrack(width, height, frameCount, frameRate, (height == 200) ? 4 : flags, signature); } // decoder is deallocated with Movie destruction i.e. new ToonstruckSmackerDecoder is needed @@ -103,6 +95,9 @@ void Movie::play(const Common::String &video, int32 flags) { bool Movie::playVideo(bool isFirstIntroVideo) { debugC(1, kDebugMovie, "playVideo(isFirstIntroVideo: %d)", isFirstIntroVideo); + + _decoder->start(); + while (!_vm->shouldQuit() && !_decoder->endOfVideo()) { if (_decoder->needsUpdate()) { const Graphics::Surface *frame = _decoder->decodeNextFrame(); diff --git a/engines/toon/movie.h b/engines/toon/movie.h index 2cd33302f2..e795182cba 100644 --- a/engines/toon/movie.h +++ b/engines/toon/movie.h @@ -30,13 +30,17 @@ namespace Toon { class ToonstruckSmackerDecoder : public Video::SmackerDecoder { public: - ToonstruckSmackerDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kSFXSoundType); - virtual ~ToonstruckSmackerDecoder() {} - void handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize); - bool loadFile(const Common::String &filename); + ToonstruckSmackerDecoder(); + + bool loadStream(Common::SeekableReadStream *stream); bool isLowRes() { return _lowRes; } + protected: - bool _lowRes; + void handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize); + SmackerVideoTrack *createVideoTrack(uint32 width, uint32 height, uint32 frameCount, const Common::Rational &frameRate, uint32 flags, uint32 signature) const; + +private: + bool _lowRes; }; class Movie { diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index ee427652d8..9fd8415676 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -51,7 +51,7 @@ void ToonEngine::init() { _currentScriptRegion = 0; _resources = new Resources(this); _animationManager = new AnimationManager(this); - _moviePlayer = new Movie(this, new ToonstruckSmackerDecoder(_mixer)); + _moviePlayer = new Movie(this, new ToonstruckSmackerDecoder()); _hotspots = new Hotspots(this); _mainSurface = new Graphics::Surface(); diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp index 359f4cb9bd..d707ad519f 100644 --- a/video/smk_decoder.cpp +++ b/video/smk_decoder.cpp @@ -204,8 +204,7 @@ BigHuffmanTree::BigHuffmanTree(Common::BitStream &bs, int allocSize) delete _hiBytes; } -BigHuffmanTree::~BigHuffmanTree() -{ +BigHuffmanTree::~BigHuffmanTree() { delete[] _tree; } @@ -278,24 +277,17 @@ uint32 BigHuffmanTree::getCode(Common::BitStream &bs) { return v; } -SmackerDecoder::SmackerDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) - : _audioStarted(false), _audioStream(0), _mixer(mixer), _soundType(soundType) { - _surface = 0; +SmackerDecoder::SmackerDecoder(Audio::Mixer::SoundType soundType) : _soundType(soundType) { _fileStream = 0; - _dirtyPalette = false; + _firstFrameStart = 0; + _frameTypes = 0; + _frameSizes = 0; } SmackerDecoder::~SmackerDecoder() { close(); } -uint32 SmackerDecoder::getTime() const { - if (_audioStream && _audioStarted) - return _mixer->getSoundElapsedTime(_audioHandle); - - return FixedRateVideoDecoder::getTime(); -} - bool SmackerDecoder::loadStream(Common::SeekableReadStream *stream) { close(); @@ -309,16 +301,17 @@ bool SmackerDecoder::loadStream(Common::SeekableReadStream *stream) { uint32 width = _fileStream->readUint32LE(); uint32 height = _fileStream->readUint32LE(); - _frameCount = _fileStream->readUint32LE(); - int32 frameRate = _fileStream->readSint32LE(); - - // framerate contains 2 digits after the comma, so 1497 is actually 14.97 fps - if (frameRate > 0) - _frameRate = Common::Rational(1000, frameRate); - else if (frameRate < 0) - _frameRate = Common::Rational(100000, -frameRate); + uint32 frameCount = _fileStream->readUint32LE(); + int32 frameDelay = _fileStream->readSint32LE(); + + // frame rate contains 2 digits after the comma, so 1497 is actually 14.97 fps + Common::Rational frameRate; + if (frameDelay > 0) + frameRate = Common::Rational(1000, frameDelay); + else if (frameDelay < 0) + frameRate = Common::Rational(100000, -frameDelay); else - _frameRate = 1000; + frameRate = 1000; // Flags are determined by which bit is set, which can be one of the following: // 0 - set to 1 if file contains a ring frame. @@ -328,6 +321,9 @@ bool SmackerDecoder::loadStream(Common::SeekableReadStream *stream) { // before it is displayed. _header.flags = _fileStream->readUint32LE(); + SmackerVideoTrack *videoTrack = createVideoTrack(width, height, frameCount, frameRate, _header.flags, _header.signature); + addTrack(videoTrack); + // TODO: should we do any extra processing for Smacker files with ring frames? // TODO: should we do any extra processing for Y-doubled videos? Are they the @@ -374,92 +370,78 @@ bool SmackerDecoder::loadStream(Common::SeekableReadStream *stream) { warning("Unhandled Smacker v2 audio compression"); if (i == 0) - _audioStream = Audio::makeQueuingAudioStream(_header.audioInfo[0].sampleRate, _header.audioInfo[0].isStereo); + addTrack(new SmackerAudioTrack(_header.audioInfo[i], _soundType)); } } _header.dummy = _fileStream->readUint32LE(); - _frameSizes = new uint32[_frameCount]; - for (i = 0; i < _frameCount; ++i) + _frameSizes = new uint32[frameCount]; + for (i = 0; i < frameCount; ++i) _frameSizes[i] = _fileStream->readUint32LE(); - _frameTypes = new byte[_frameCount]; - for (i = 0; i < _frameCount; ++i) + _frameTypes = new byte[frameCount]; + for (i = 0; i < frameCount; ++i) _frameTypes[i] = _fileStream->readByte(); byte *huffmanTrees = (byte *) malloc(_header.treesSize); _fileStream->read(huffmanTrees, _header.treesSize); Common::BitStream8LSB bs(new Common::MemoryReadStream(huffmanTrees, _header.treesSize, DisposeAfterUse::YES), true); + videoTrack->readTrees(bs, _header.mMapSize, _header.mClrSize, _header.fullSize, _header.typeSize); - _MMapTree = new BigHuffmanTree(bs, _header.mMapSize); - _MClrTree = new BigHuffmanTree(bs, _header.mClrSize); - _FullTree = new BigHuffmanTree(bs, _header.fullSize); - _TypeTree = new BigHuffmanTree(bs, _header.typeSize); - - _surface = new Graphics::Surface(); + _firstFrameStart = _fileStream->pos(); - // Height needs to be doubled if we have flags (Y-interlaced or Y-doubled) - _surface->create(width, height * (_header.flags ? 2 : 1), Graphics::PixelFormat::createFormatCLUT8()); - - memset(_palette, 0, 3 * 256); return true; } void SmackerDecoder::close() { - if (!_fileStream) - return; - - if (_audioStream) { - if (_audioStarted) { - // The mixer will delete the stream. - _mixer->stopHandle(_audioHandle); - _audioStarted = false; - } else { - delete _audioStream; - } - _audioStream = 0; - } + AdvancedVideoDecoder::close(); delete _fileStream; _fileStream = 0; - _surface->free(); - delete _surface; - _surface = 0; - - delete _MMapTree; - delete _MClrTree; - delete _FullTree; - delete _TypeTree; + delete[] _frameTypes; + _frameTypes = 0; delete[] _frameSizes; - delete[] _frameTypes; + _frameSizes = 0; +} - reset(); +bool SmackerDecoder::rewind() { + // Call the parent method to rewind the tracks first + // In particular, only videos without sound can be rewound + if (!AdvancedVideoDecoder::rewind()) + return false; + + // And seek back to where the first frame begins + _fileStream->seek(_firstFrameStart); + return true; } -const Graphics::Surface *SmackerDecoder::decodeNextFrame() { +void SmackerDecoder::readNextPacket() { + SmackerVideoTrack *videoTrack = (SmackerVideoTrack *)getTrack(0); + + if (videoTrack->endOfTrack()) + return; + + videoTrack->increaseCurFrame(); + uint i; uint32 chunkSize = 0; uint32 dataSizeUnpacked = 0; uint32 startPos = _fileStream->pos(); - _curFrame++; - // Check if we got a frame with palette data, and // call back the virtual setPalette function to set // the current palette - if (_frameTypes[_curFrame] & 1) { - unpackPalette(); - _dirtyPalette = true; - } + if (_frameTypes[videoTrack->getCurFrame()] & 1) + videoTrack->unpackPalette(_fileStream); // Load audio tracks for (i = 0; i < 7; ++i) { - if (!(_frameTypes[_curFrame] & (2 << i))) + if (!(_frameTypes[videoTrack->getCurFrame()] & (2 << i))) continue; chunkSize = _fileStream->readUint32LE(); @@ -475,29 +457,109 @@ const Graphics::Surface *SmackerDecoder::decodeNextFrame() { handleAudioTrack(i, chunkSize, dataSizeUnpacked); } - uint32 frameSize = _frameSizes[_curFrame] & ~3; -// uint32 remainder = _frameSizes[_curFrame] & 3; + uint32 frameSize = _frameSizes[videoTrack->getCurFrame()] & ~3; +// uint32 remainder = _frameSizes[videoTrack->getCurFrame()] & 3; if (_fileStream->pos() - startPos > frameSize) error("Smacker actual frame size exceeds recorded frame size"); uint32 frameDataSize = frameSize - (_fileStream->pos() - startPos); - _frameData = (byte *)malloc(frameDataSize + 1); + byte *frameData = (byte *)malloc(frameDataSize + 1); // Padding to keep the BigHuffmanTrees from reading past the data end - _frameData[frameDataSize] = 0x00; + frameData[frameDataSize] = 0x00; + + _fileStream->read(frameData, frameDataSize); - _fileStream->read(_frameData, frameDataSize); + Common::BitStream8LSB bs(new Common::MemoryReadStream(frameData, frameDataSize + 1, DisposeAfterUse::YES), true); + videoTrack->decodeFrame(bs); - Common::BitStream8LSB bs(new Common::MemoryReadStream(_frameData, frameDataSize + 1, DisposeAfterUse::YES), true); + _fileStream->seek(startPos + frameSize); +} +void SmackerDecoder::handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize) { + if (_header.audioInfo[track].hasAudio && chunkSize > 0 && track == 0) { + // Get the audio track, which start at offset 1 (first track is video) + SmackerAudioTrack *audioTrack = (SmackerAudioTrack *)getTrack(track + 1); + + // If it's track 0, play the audio data + byte *soundBuffer = (byte *)malloc(chunkSize + 1); + // Padding to keep the SmallHuffmanTrees from reading past the data end + soundBuffer[chunkSize] = 0x00; + + _fileStream->read(soundBuffer, chunkSize); + + if (_header.audioInfo[track].compression == kCompressionRDFT || _header.audioInfo[track].compression == kCompressionDCT) { + // TODO: Compressed audio (Bink RDFT/DCT encoded) + free(soundBuffer); + return; + } else if (_header.audioInfo[track].compression == kCompressionDPCM) { + // Compressed audio (Huffman DPCM encoded) + audioTrack->queueCompressedBuffer(soundBuffer, chunkSize + 1, unpackedSize); + free(soundBuffer); + } else { + // Uncompressed audio (PCM) + audioTrack->queuePCM(soundBuffer, chunkSize); + } + } else { + // Ignore the rest of the audio tracks, if they exist + // TODO: Are there any Smacker videos with more than one audio stream? + // If yes, we should play the rest of the audio streams as well + if (chunkSize > 0) + _fileStream->skip(chunkSize); + } +} + +SmackerDecoder::SmackerVideoTrack::SmackerVideoTrack(uint32 width, uint32 height, uint32 frameCount, const Common::Rational &frameRate, uint32 flags, uint32 signature) { + _surface = new Graphics::Surface(); + _surface->create(width, height * (flags ? 2 : 1), Graphics::PixelFormat::createFormatCLUT8()); + _frameCount = frameCount; + _frameRate = frameRate; + _flags = flags; + _signature = signature; + _curFrame = -1; + _dirtyPalette = false; + _MMapTree = _MClrTree = _FullTree = _TypeTree = 0; + memset(_palette, 0, 3 * 256); +} + +SmackerDecoder::SmackerVideoTrack::~SmackerVideoTrack() { + _surface->free(); + delete _surface; + + delete _MMapTree; + delete _MClrTree; + delete _FullTree; + delete _TypeTree; +} + +uint16 SmackerDecoder::SmackerVideoTrack::getWidth() const { + return _surface->w; +} + +uint16 SmackerDecoder::SmackerVideoTrack::getHeight() const { + return _surface->h; +} + +Graphics::PixelFormat SmackerDecoder::SmackerVideoTrack::getPixelFormat() const { + return _surface->format; +} + +void SmackerDecoder::SmackerVideoTrack::readTrees(Common::BitStream &bs, uint32 mMapSize, uint32 mClrSize, uint32 fullSize, uint32 typeSize) { + _MMapTree = new BigHuffmanTree(bs, mMapSize); + _MClrTree = new BigHuffmanTree(bs, mClrSize); + _FullTree = new BigHuffmanTree(bs, fullSize); + _TypeTree = new BigHuffmanTree(bs, typeSize); +} + +void SmackerDecoder::SmackerVideoTrack::decodeFrame(Common::BitStream &bs) { _MMapTree->reset(); _MClrTree->reset(); _FullTree->reset(); _TypeTree->reset(); // Height needs to be doubled if we have flags (Y-interlaced or Y-doubled) - uint doubleY = _header.flags ? 2 : 1; + uint doubleY = _flags ? 2 : 1; uint bw = getWidth() / 4; uint bh = getHeight() / doubleY / 4; @@ -508,6 +570,7 @@ const Graphics::Surface *SmackerDecoder::decodeNextFrame() { uint type, run, j, mode; uint32 p1, p2, clr, map; byte hi, lo; + uint i; while (block < blocks) { type = _TypeTree->getCode(bs); @@ -536,7 +599,7 @@ const Graphics::Surface *SmackerDecoder::decodeNextFrame() { break; case SMK_BLOCK_FULL: // Smacker v2 has one mode, Smacker v4 has three - if (_header.signature == MKTAG('S','M','K','2')) { + if (_signature == MKTAG('S','M','K','2')) { mode = 0; } else { // 00 - mode 0 @@ -628,60 +691,75 @@ const Graphics::Surface *SmackerDecoder::decodeNextFrame() { break; } } +} - _fileStream->seek(startPos + frameSize); +void SmackerDecoder::SmackerVideoTrack::unpackPalette(Common::SeekableReadStream *stream) { + uint startPos = stream->pos(); + uint32 len = 4 * stream->readByte(); - if (_curFrame == 0) - _startTime = g_system->getMillis(); + byte *chunk = (byte *)malloc(len); + stream->read(chunk, len); + byte *p = chunk; - return _surface; -} + byte oldPalette[3 * 256]; + memcpy(oldPalette, _palette, 3 * 256); -void SmackerDecoder::handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize) { - if (_header.audioInfo[track].hasAudio && chunkSize > 0 && track == 0) { - // If it's track 0, play the audio data - byte *soundBuffer = (byte *)malloc(chunkSize + 1); - // Padding to keep the SmallHuffmanTrees from reading past the data end - soundBuffer[chunkSize] = 0x00; + byte *pal = _palette; - _fileStream->read(soundBuffer, chunkSize); + int sz = 0; + byte b0; + while (sz < 256) { + b0 = *p++; + if (b0 & 0x80) { // if top bit is 1 (0x80 = 10000000) + sz += (b0 & 0x7f) + 1; // get lower 7 bits + 1 (0x7f = 01111111) + pal += 3 * ((b0 & 0x7f) + 1); + } else if (b0 & 0x40) { // if top 2 bits are 01 (0x40 = 01000000) + byte c = (b0 & 0x3f) + 1; // get lower 6 bits + 1 (0x3f = 00111111) + uint s = 3 * *p++; + sz += c; - if (_header.audioInfo[track].compression == kCompressionRDFT || _header.audioInfo[track].compression == kCompressionDCT) { - // TODO: Compressed audio (Bink RDFT/DCT encoded) - free(soundBuffer); - return; - } else if (_header.audioInfo[track].compression == kCompressionDPCM) { - // Compressed audio (Huffman DPCM encoded) - queueCompressedBuffer(soundBuffer, chunkSize + 1, unpackedSize, track); - free(soundBuffer); - } else { - // Uncompressed audio (PCM) - byte flags = 0; - if (_header.audioInfo[track].is16Bits) - flags = flags | Audio::FLAG_16BITS; - if (_header.audioInfo[track].isStereo) - flags = flags | Audio::FLAG_STEREO; - - _audioStream->queueBuffer(soundBuffer, chunkSize, DisposeAfterUse::YES, flags); - // The sound buffer will be deleted by QueuingAudioStream - } + while (c--) { + *pal++ = oldPalette[s + 0]; + *pal++ = oldPalette[s + 1]; + *pal++ = oldPalette[s + 2]; + s += 3; + } + } else { // top 2 bits are 00 + sz++; + // get the lower 6 bits for each component (0x3f = 00111111) + byte b = b0 & 0x3f; + byte g = (*p++) & 0x3f; + byte r = (*p++) & 0x3f; + + assert(g < 0xc0 && b < 0xc0); - if (!_audioStarted) { - _mixer->playStream(_soundType, &_audioHandle, _audioStream, -1, getVolume(), getBalance()); - _audioStarted = true; + // upscale to full 8-bit color values by multiplying by 4 + *pal++ = b * 4; + *pal++ = g * 4; + *pal++ = r * 4; } - } else { - // Ignore the rest of the audio tracks, if they exist - // TODO: Are there any Smacker videos with more than one audio stream? - // If yes, we should play the rest of the audio streams as well - if (chunkSize > 0) - _fileStream->skip(chunkSize); } + + stream->seek(startPos + len); + free(chunk); + + _dirtyPalette = true; } -void SmackerDecoder::queueCompressedBuffer(byte *buffer, uint32 bufferSize, - uint32 unpackedSize, int streamNum) { +SmackerDecoder::SmackerAudioTrack::SmackerAudioTrack(const AudioInfo &audioInfo, Audio::Mixer::SoundType soundType) : + _audioInfo(audioInfo), _soundType(soundType) { + _audioStream = Audio::makeQueuingAudioStream(_audioInfo.sampleRate, _audioInfo.isStereo); +} +SmackerDecoder::SmackerAudioTrack::~SmackerAudioTrack() { + delete _audioStream; +} + +Audio::AudioStream *SmackerDecoder::SmackerAudioTrack::getAudioStream() const { + return _audioStream; +} + +void SmackerDecoder::SmackerAudioTrack::queueCompressedBuffer(byte *buffer, uint32 bufferSize, uint32 unpackedSize) { Common::BitStream8LSB audioBS(new Common::MemoryReadStream(buffer, bufferSize), true); bool dataPresent = audioBS.getBit(); @@ -689,9 +767,9 @@ void SmackerDecoder::queueCompressedBuffer(byte *buffer, uint32 bufferSize, return; bool isStereo = audioBS.getBit(); - assert(isStereo == _header.audioInfo[streamNum].isStereo); + assert(isStereo == _audioInfo.isStereo); bool is16Bits = audioBS.getBit(); - assert(is16Bits == _header.audioInfo[streamNum].is16Bits); + assert(is16Bits == _audioInfo.is16Bits); int numBytes = 1 * (isStereo ? 2 : 1) * (is16Bits ? 2 : 1); @@ -759,74 +837,21 @@ void SmackerDecoder::queueCompressedBuffer(byte *buffer, uint32 bufferSize, for (int k = 0; k < numBytes; k++) delete audioTrees[k]; - byte flags = 0; - if (_header.audioInfo[0].is16Bits) - flags = flags | Audio::FLAG_16BITS; - if (_header.audioInfo[0].isStereo) - flags = flags | Audio::FLAG_STEREO; - _audioStream->queueBuffer(unpackedBuffer, unpackedSize, DisposeAfterUse::YES, flags); - // unpackedBuffer will be deleted by QueuingAudioStream + queuePCM(unpackedBuffer, unpackedSize); } -void SmackerDecoder::unpackPalette() { - uint startPos = _fileStream->pos(); - uint32 len = 4 * _fileStream->readByte(); - - byte *chunk = (byte *)malloc(len); - _fileStream->read(chunk, len); - byte *p = chunk; - - byte oldPalette[3*256]; - memcpy(oldPalette, _palette, 3 * 256); - - byte *pal = _palette; - - int sz = 0; - byte b0; - while (sz < 256) { - b0 = *p++; - if (b0 & 0x80) { // if top bit is 1 (0x80 = 10000000) - sz += (b0 & 0x7f) + 1; // get lower 7 bits + 1 (0x7f = 01111111) - pal += 3 * ((b0 & 0x7f) + 1); - } else if (b0 & 0x40) { // if top 2 bits are 01 (0x40 = 01000000) - byte c = (b0 & 0x3f) + 1; // get lower 6 bits + 1 (0x3f = 00111111) - uint s = 3 * *p++; - sz += c; - - while (c--) { - *pal++ = oldPalette[s + 0]; - *pal++ = oldPalette[s + 1]; - *pal++ = oldPalette[s + 2]; - s += 3; - } - } else { // top 2 bits are 00 - sz++; - // get the lower 6 bits for each component (0x3f = 00111111) - byte b = b0 & 0x3f; - byte g = (*p++) & 0x3f; - byte r = (*p++) & 0x3f; - - assert(g < 0xc0 && b < 0xc0); - - // upscale to full 8-bit color values by multiplying by 4 - *pal++ = b * 4; - *pal++ = g * 4; - *pal++ = r * 4; - } - } - - _fileStream->seek(startPos + len); - free(chunk); -} +void SmackerDecoder::SmackerAudioTrack::queuePCM(byte *buffer, uint32 bufferSize) { + byte flags = 0; + if (_audioInfo.is16Bits) + flags |= Audio::FLAG_16BITS; + if (_audioInfo.isStereo) + flags |= Audio::FLAG_STEREO; -void SmackerDecoder::updateVolume() { - if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) - g_system->getMixer()->setChannelVolume(_audioHandle, getVolume()); + _audioStream->queueBuffer(buffer, bufferSize, DisposeAfterUse::YES, flags); } -void SmackerDecoder::updateBalance() { - if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) - g_system->getMixer()->setChannelBalance(_audioHandle, getBalance()); +SmackerDecoder::SmackerVideoTrack *SmackerDecoder::createVideoTrack(uint32 width, uint32 height, uint32 frameCount, const Common::Rational &frameRate, uint32 flags, uint32 signature) const { + return new SmackerVideoTrack(width, height, frameCount, frameRate, flags, signature); } } // End of namespace Video diff --git a/video/smk_decoder.h b/video/smk_decoder.h index 516882e7c8..78a4ded0fc 100644 --- a/video/smk_decoder.h +++ b/video/smk_decoder.h @@ -34,6 +34,7 @@ class QueuingAudioStream; } namespace Common { +class BitStream; class SeekableReadStream; } @@ -56,42 +57,72 @@ class BigHuffmanTree; * - sword2 * - toon */ -class SmackerDecoder : public FixedRateVideoDecoder { +class SmackerDecoder : public AdvancedVideoDecoder { public: - SmackerDecoder(Audio::Mixer *mixer, - Audio::Mixer::SoundType soundType = Audio::Mixer::kSFXSoundType); + SmackerDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kSFXSoundType); virtual ~SmackerDecoder(); - bool loadStream(Common::SeekableReadStream *stream); + virtual bool loadStream(Common::SeekableReadStream *stream); void close(); - bool isVideoLoaded() const { return _fileStream != 0; } - uint16 getWidth() const { return _surface->w; } - uint16 getHeight() const { return _surface->h; } - uint32 getFrameCount() const { return _frameCount; } - uint32 getTime() const; - const Graphics::Surface *decodeNextFrame(); - Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); } - const byte *getPalette() { _dirtyPalette = false; return _palette; } - bool hasDirtyPalette() const { return _dirtyPalette; } - virtual void handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize); + bool rewind(); protected: - Common::SeekableReadStream *_fileStream; + void readNextPacket(); + + virtual void handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize); - // VideoDecoder API - void updateVolume(); - void updateBalance(); + class SmackerVideoTrack : public FixedRateVideoTrack { + public: + SmackerVideoTrack(uint32 width, uint32 height, uint32 frameCount, const Common::Rational &frameRate, uint32 flags, uint32 signature); + ~SmackerVideoTrack(); - // FixedRateVideoDecoder API - Common::Rational getFrameRate() const { return _frameRate; } + bool isRewindable() const { return true; } + bool rewind() { _curFrame = -1; return true; } -protected: - void unpackPalette(); - // Possible runs of blocks - uint getBlockRun(int index) { return (index <= 58) ? index + 1 : 128 << (index - 59); } - void queueCompressedBuffer(byte *buffer, uint32 bufferSize, uint32 unpackedSize, int streamNum); + uint16 getWidth() const; + uint16 getHeight() const; + Graphics::PixelFormat getPixelFormat() const; + int getCurFrame() const { return _curFrame; } + int getFrameCount() const { return _frameCount; } + const Graphics::Surface *decodeNextFrame() { return _surface; } + const byte *getPalette() const { _dirtyPalette = false; return _palette; } + bool hasDirtyPalette() const { return _dirtyPalette; } + + void readTrees(Common::BitStream &bs, uint32 mMapSize, uint32 mClrSize, uint32 fullSize, uint32 typeSize); + void increaseCurFrame() { _curFrame++; } + void decodeFrame(Common::BitStream &bs); + void unpackPalette(Common::SeekableReadStream *stream); + + protected: + Common::Rational getFrameRate() const { return _frameRate; } + + Graphics::Surface *_surface; + + private: + Common::Rational _frameRate; + uint32 _flags, _signature; + + byte _palette[3 * 256]; + mutable bool _dirtyPalette; + + int _curFrame; + uint32 _frameCount; + + BigHuffmanTree *_MMapTree; + BigHuffmanTree *_MClrTree; + BigHuffmanTree *_FullTree; + BigHuffmanTree *_TypeTree; + // Possible runs of blocks + static uint getBlockRun(int index) { return (index <= 58) ? index + 1 : 128 << (index - 59); } + }; + + virtual SmackerVideoTrack *createVideoTrack(uint32 width, uint32 height, uint32 frameCount, const Common::Rational &frameRate, uint32 flags, uint32 signature) const; + + Common::SeekableReadStream *_fileStream; + +private: enum AudioCompression { kCompressionNone, kCompressionDPCM, @@ -120,6 +151,25 @@ protected: uint32 dummy; } _header; + class SmackerAudioTrack : public AudioTrack { + public: + SmackerAudioTrack(const AudioInfo &audioInfo, Audio::Mixer::SoundType soundType); + ~SmackerAudioTrack(); + + Audio::Mixer::SoundType getSoundType() const { return _soundType; } + + void queueCompressedBuffer(byte *buffer, uint32 bufferSize, uint32 unpackedSize); + void queuePCM(byte *buffer, uint32 bufferSize); + + protected: + Audio::AudioStream *getAudioStream() const; + + private: + Audio::Mixer::SoundType _soundType; + Audio::QueuingAudioStream *_audioStream; + AudioInfo _audioInfo; + }; + uint32 *_frameSizes; // The FrameTypes section of a Smacker file contains an array of bytes, where // the 8 bits of each byte describe the contents of the corresponding frame. @@ -127,25 +177,10 @@ protected: // and so on), so there can be up to 7 different audio tracks. When the lowest bit // (bit 0) is set, it denotes a frame that contains a palette record byte *_frameTypes; - byte *_frameData; - // The RGB palette - byte _palette[3 * 256]; - bool _dirtyPalette; - Common::Rational _frameRate; - uint32 _frameCount; - Graphics::Surface *_surface; + uint32 _firstFrameStart; Audio::Mixer::SoundType _soundType; - Audio::Mixer *_mixer; - bool _audioStarted; - Audio::QueuingAudioStream *_audioStream; - Audio::SoundHandle _audioHandle; - - BigHuffmanTree *_MMapTree; - BigHuffmanTree *_MClrTree; - BigHuffmanTree *_FullTree; - BigHuffmanTree *_TypeTree; }; } // End of namespace Video -- cgit v1.2.3 From 3d395545cb1514ba4a07a785e58782462a3b1a94 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 24 Jul 2012 04:07:08 +0300 Subject: SCI: Remove unused variables --- engines/sci/graphics/palette.h | 1 - 1 file changed, 1 deletion(-) diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h index 5b9ae9e016..6774094810 100644 --- a/engines/sci/graphics/palette.h +++ b/engines/sci/graphics/palette.h @@ -129,7 +129,6 @@ private: uint16 _totalScreenColors; bool _remapOn; - uint16 _remappingBaseR, _remappingBaseG, _remappingBaseB; uint16 _remappingPercent; void loadMacIconBarPalette(); -- cgit v1.2.3 From 45354676ebe14df8d382681621f1d994258dbb72 Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Mon, 23 Jul 2012 22:28:10 +0100 Subject: OPENPANDORA: Move SDL_CreateCursor hacklet from init to loadGFXMode. * Fixes a bug that can occur on load. --- backends/graphics/gph/gph-graphics.cpp | 3 +- backends/graphics/openpandora/op-graphics.cpp | 22 ++++++++++- backends/platform/openpandora/op-backend.cpp | 55 --------------------------- 3 files changed, 22 insertions(+), 58 deletions(-) diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp index 8521e88eaf..5d4baefc6e 100644 --- a/backends/graphics/gph/gph-graphics.cpp +++ b/backends/graphics/gph/gph-graphics.cpp @@ -36,7 +36,8 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = { }; GPHGraphicsManager::GPHGraphicsManager(SdlEventSource *sdlEventSource) - : SurfaceSdlGraphicsManager(sdlEventSource) { + : SurfaceSdlGraphicsManager(sdlEventSource), + _cursorDontScale(true) { } const OSystem::GraphicsMode *GPHGraphicsManager::getSupportedGraphicsModes() const { diff --git a/backends/graphics/openpandora/op-graphics.cpp b/backends/graphics/openpandora/op-graphics.cpp index 5f0301a0c8..1a3d7d3e2e 100644 --- a/backends/graphics/openpandora/op-graphics.cpp +++ b/backends/graphics/openpandora/op-graphics.cpp @@ -31,17 +31,35 @@ #include "common/mutex.h" #include "common/textconsole.h" +static SDL_Cursor *hiddenCursor; + OPGraphicsManager::OPGraphicsManager(SdlEventSource *sdlEventSource) : SurfaceSdlGraphicsManager(sdlEventSource) { } bool OPGraphicsManager::loadGFXMode() { + + uint8_t hiddenCursorData = 0; + hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0); + + /* On the OpenPandora we need to work around an SDL assumption that + returns relative mouse coordinates when you get to the screen + edges using the touchscreen. The workaround is to set a blank + SDL cursor and not disable it (Hackish I know). + + The root issues likes in the Windows Manager GRAB code in SDL. + That is why the issue is not seen on framebuffer devices like the + GP2X (there is no X window manager ;)). + */ + SDL_ShowCursor(SDL_ENABLE); + SDL_SetCursor(hiddenCursor); + /* FIXME: For now we just cheat and set the overlay to 640*480 not 800*480 and let SDL deal with the boarders (it saves cleaning up the overlay when the game screen is smaller than the overlay ;) */ - _videoMode.overlayWidth = 640; - _videoMode.overlayHeight = 480; + //_videoMode.overlayWidth = 640; + //_videoMode.overlayHeight = 480; _videoMode.fullscreen = true; if (_videoMode.screenHeight != 200 && _videoMode.screenHeight != 400) diff --git a/backends/platform/openpandora/op-backend.cpp b/backends/platform/openpandora/op-backend.cpp index dcec387f97..47cff1c740 100644 --- a/backends/platform/openpandora/op-backend.cpp +++ b/backends/platform/openpandora/op-backend.cpp @@ -54,8 +54,6 @@ /* Dump console info to files. */ #define DUMP_STDOUT -static SDL_Cursor *hiddenCursor; - OSystem_OP::OSystem_OP() : OSystem_POSIX() { @@ -179,32 +177,12 @@ void OSystem_OP::initBackend() { /* Make sure SDL knows that we have a joystick we want to use. */ ConfMan.setInt("joystick_num", 0); -// _graphicsMutex = createMutex(); - /* Pass to POSIX method to do the heavy lifting */ OSystem_POSIX::initBackend(); _inited = true; } -// enable joystick -// if (joystick_num > -1 && SDL_NumJoysticks() > 0) { -// printf("Using joystick: %s\n", SDL_JoystickName(0)); -// _joystick = SDL_JoystickOpen(joystick_num); -// } -// -// setupMixer(); - -// Note: We could implement a custom SDLTimerManager by using -// SDL_AddTimer. That might yield better timer resolution, but it would -// also change the semantics of a timer: Right now, ScummVM timers -// *never* run in parallel, due to the way they are implemented. If we -// switched to SDL_AddTimer, each timer might run in a separate thread. -// However, not all our code is prepared for that, so we can't just -// switch. Still, it's a potential future change to keep in mind. -// _timer = new DefaultTimerManager(); -// _timerID = SDL_AddTimer(10, &timer_handler, _timer); - void OSystem_OP::initSDL() { // Check if SDL has not been initialized if (!_initedSDL) { @@ -217,38 +195,7 @@ void OSystem_OP::initSDL() { if (SDL_Init(sdlFlags) == -1) error("Could not initialize SDL: %s", SDL_GetError()); - uint8_t hiddenCursorData = 0; - - hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0); - - /* On the OpenPandora we need to work around an SDL assumption that - returns relative mouse coordinates when you get to the screen - edges using the touchscreen. The workaround is to set a blank - SDL cursor and not disable it (Hackish I know). - - The root issues likes in the Windows Manager GRAB code in SDL. - That is why the issue is not seen on framebuffer devices like the - GP2X (there is no X window manager ;)). - */ - SDL_ShowCursor(SDL_ENABLE); - SDL_SetCursor(hiddenCursor); - SDL_EnableUNICODE(1); - -// memset(&_oldVideoMode, 0, sizeof(_oldVideoMode)); -// memset(&_videoMode, 0, sizeof(_videoMode)); -// memset(&_transactionDetails, 0, sizeof(_transactionDetails)); - -// _videoMode.mode = GFX_DOUBLESIZE; -// _videoMode.scaleFactor = 2; -// _videoMode.aspectRatioCorrection = ConfMan.getBool("aspect_ratio"); -// _scalerProc = Normal2x; -// _scalerType = 0; - -// _videoMode.fullscreen = true; - _initedSDL = true; - -// OSystem_POSIX::initSDL(); } } @@ -275,8 +222,6 @@ void OSystem_OP::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) { void OSystem_OP::quit() { - SDL_FreeCursor(hiddenCursor); - #ifdef DUMP_STDOUT printf("%s\n", "Debug: STDOUT and STDERR text files closed."); fclose(stdout); -- cgit v1.2.3 From 6f978ee78b19be19329adef2618d814012440071 Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Tue, 24 Jul 2012 10:05:42 +0100 Subject: OPENPANDORA: Free hiddenCursor on unloadGFXMode and cleanup screen setup. * Also remove some old cruft in the form of commented code. --- backends/graphics/openpandora/op-graphics.cpp | 27 ++++++++++++++++++++------- backends/graphics/openpandora/op-graphics.h | 23 +---------------------- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/backends/graphics/openpandora/op-graphics.cpp b/backends/graphics/openpandora/op-graphics.cpp index 1a3d7d3e2e..f371081fde 100644 --- a/backends/graphics/openpandora/op-graphics.cpp +++ b/backends/graphics/openpandora/op-graphics.cpp @@ -26,7 +26,6 @@ #include "backends/graphics/openpandora/op-graphics.h" #include "backends/events/openpandora/op-events.h" -//#include "backends/platform/openpandora/op-sdl.h" #include "graphics/scaler/aspect.h" #include "common/mutex.h" #include "common/textconsole.h" @@ -54,18 +53,32 @@ bool OPGraphicsManager::loadGFXMode() { SDL_ShowCursor(SDL_ENABLE); SDL_SetCursor(hiddenCursor); - /* FIXME: For now we just cheat and set the overlay to 640*480 not 800*480 and let SDL - deal with the boarders (it saves cleaning up the overlay when the game screen is - smaller than the overlay ;) - */ - //_videoMode.overlayWidth = 640; - //_videoMode.overlayHeight = 480; _videoMode.fullscreen = true; + _videoMode.overlayWidth = _videoMode.screenWidth * _videoMode.scaleFactor; + _videoMode.overlayHeight = _videoMode.screenHeight * _videoMode.scaleFactor; + if (_videoMode.screenHeight != 200 && _videoMode.screenHeight != 400) _videoMode.aspectRatioCorrection = false; + if (_videoMode.aspectRatioCorrection) + _videoMode.overlayHeight = real2Aspect(_videoMode.overlayHeight); + + _videoMode.hardwareWidth = _videoMode.screenWidth * _videoMode.scaleFactor; + _videoMode.hardwareHeight = effectiveScreenHeight(); + return SurfaceSdlGraphicsManager::loadGFXMode(); } +void OPGraphicsManager::unloadGFXMode() { + + uint8_t hiddenCursorData = 0; + hiddenCursor = SDL_CreateCursor(&hiddenCursorData, &hiddenCursorData, 8, 1, 0, 0); + + // Free the hidden SDL cursor created in loadGFXMode + SDL_FreeCursor(hiddenCursor); + + SurfaceSdlGraphicsManager::unloadGFXMode(); +} + #endif diff --git a/backends/graphics/openpandora/op-graphics.h b/backends/graphics/openpandora/op-graphics.h index 0b3eeae8ec..2e3d63e3ad 100644 --- a/backends/graphics/openpandora/op-graphics.h +++ b/backends/graphics/openpandora/op-graphics.h @@ -24,7 +24,6 @@ #define BACKENDS_GRAPHICS_OP_H #include "backends/graphics/surfacesdl/surfacesdl-graphics.h" -#include "graphics/scaler/aspect.h" // for aspect2Real #include "graphics/scaler/downscaler.h" enum { @@ -35,28 +34,8 @@ class OPGraphicsManager : public SurfaceSdlGraphicsManager { public: OPGraphicsManager(SdlEventSource *sdlEventSource); -// bool hasFeature(OSystem::Feature f); -// void setFeatureState(OSystem::Feature f, bool enable); -// bool getFeatureState(OSystem::Feature f); -// int getDefaultGraphicsMode() const; - -// void initSize(uint w, uint h, const Graphics::PixelFormat *format = NULL); -// const OSystem::GraphicsMode *getSupportedGraphicsModes() const; -// bool setGraphicsMode(const char *name); -// bool setGraphicsMode(int mode); -// void setGraphicsModeIntern(); -// void internUpdateScreen(); -// void showOverlay(); -// void hideOverlay(); bool loadGFXMode(); -// void drawMouse(); -// void undrawMouse(); -// virtual void warpMouse(int x, int y); - -// SurfaceSdlGraphicsManager::MousePos *getMouseCurState(); -// SurfaceSdlGraphicsManager::VideoState *getVideoMode(); - -// virtual void adjustMouseEvent(const Common::Event &event); + void unloadGFXMode(); }; #endif /* BACKENDS_GRAPHICS_OP_H */ -- cgit v1.2.3 From b157269ff432c8ed08352683c1d6c7c4c246e429 Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Tue, 24 Jul 2012 10:07:32 +0100 Subject: OPENPANDORA: Clean up old commented code. --- backends/platform/openpandora/op-backend.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/backends/platform/openpandora/op-backend.cpp b/backends/platform/openpandora/op-backend.cpp index 47cff1c740..b2d53f9fb5 100644 --- a/backends/platform/openpandora/op-backend.cpp +++ b/backends/platform/openpandora/op-backend.cpp @@ -59,11 +59,6 @@ OSystem_OP::OSystem_OP() OSystem_POSIX() { } -//static Uint32 timer_handler(Uint32 interval, void *param) { -// ((DefaultTimerManager *)param)->handler(); -// return interval; -//} - void OSystem_OP::initBackend() { assert(!_inited); @@ -77,28 +72,6 @@ void OSystem_OP::initBackend() { _graphicsManager = new OPGraphicsManager(_eventSource); } -// int joystick_num = ConfMan.getInt("joystick_num"); -// uint32 sdlFlags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER; -// -// if (ConfMan.hasKey("disable_sdl_parachute")) -// sdlFlags |= SDL_INIT_NOPARACHUTE; -// -// if (joystick_num > -1) -// sdlFlags |= SDL_INIT_JOYSTICK; -// -// if (SDL_Init(sdlFlags) == -1) { -// error("Could not initialize SDL: %s", SDL_GetError()); -// } -// - - // Create the mixer manager -// if (_mixer == 0) { -// _mixerManager = new DoubleBufferSDLMixerManager(); - - // Setup and start mixer -// _mixerManager->init(); -// } - /* Setup default save path to be workingdir/saves */ char savePath[PATH_MAX+1]; -- cgit v1.2.3 From d83764f05591ab552316fb6aa59ac92abc7c4680 Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Tue, 24 Jul 2012 10:12:54 +0100 Subject: GPH: Fix accidental commit. * I did not mean to commit any of the GPH backend with the OP stuff. Cleanup of this backend will follow later. --- backends/graphics/gph/gph-graphics.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp index 5d4baefc6e..8521e88eaf 100644 --- a/backends/graphics/gph/gph-graphics.cpp +++ b/backends/graphics/gph/gph-graphics.cpp @@ -36,8 +36,7 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = { }; GPHGraphicsManager::GPHGraphicsManager(SdlEventSource *sdlEventSource) - : SurfaceSdlGraphicsManager(sdlEventSource), - _cursorDontScale(true) { + : SurfaceSdlGraphicsManager(sdlEventSource) { } const OSystem::GraphicsMode *GPHGraphicsManager::getSupportedGraphicsModes() const { -- cgit v1.2.3 From 84e0b3a167fb282fb7e29614a9806f665af844c2 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 24 Jul 2012 13:23:45 -0400 Subject: VIDEO: Add helper functions to easily add an external audio track --- video/video_decoder.cpp | 11 +++++++++++ video/video_decoder.h | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 97f8eec7bb..1461f5dc3d 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -521,6 +521,17 @@ void AdvancedVideoDecoder::addTrack(Track *track) { track->start(); } +bool AdvancedVideoDecoder::addStreamFileTrack(const Common::String &baseName) { + StreamFileAudioTrack *track = new StreamFileAudioTrack(); + + bool result = track->loadFromFile(baseName); + + if (result) + addTrack(track); + + return result; +} + AdvancedVideoDecoder::Track *AdvancedVideoDecoder::getTrack(uint track) { if (track > _tracks.size()) return 0; diff --git a/video/video_decoder.h b/video/video_decoder.h index efc8f7a37d..616d6c4f96 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -365,6 +365,11 @@ public: */ virtual Audio::Timestamp getDuration() const; + /** + * Add an audio track from a stream file. + */ + bool addStreamFileTrack(const Common::String &baseName); + // Future API //void setRate(const Common::Rational &rate); //Common::Rational getRate() const; -- cgit v1.2.3 From 3117e4a8ff12c3a2ba4f2d4c69e8539040d49eb0 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 24 Jul 2012 13:24:01 -0400 Subject: VIDEO: Convert DXADecoder to the AdvancedVideoDecoder API --- engines/agos/animation.cpp | 80 ++++++++++++-------------- engines/agos/animation.h | 5 +- engines/sword1/animation.cpp | 74 ++++++++---------------- engines/sword1/animation.h | 32 ++++------- engines/sword1/logic.cpp | 2 +- engines/sword2/animation.cpp | 62 ++++++--------------- engines/sword2/animation.h | 30 ++++------ engines/sword2/function.cpp | 2 +- video/dxa_decoder.cpp | 130 ++++++++++++++++++++----------------------- video/dxa_decoder.h | 102 ++++++++++++++++++--------------- 10 files changed, 215 insertions(+), 304 deletions(-) diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index 3e8488d7d5..ec8293c91f 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -260,9 +260,6 @@ bool MoviePlayerDXA::load() { debug(0, "Playing video %s", videoName.c_str()); CursorMan.showMouse(false); - - _firstFrameOffset = _fileStream->pos(); - return true; } @@ -302,35 +299,6 @@ void MoviePlayerDXA::stopVideo() { } void MoviePlayerDXA::startSound() { - uint32 offset, size; - - if (getSoundTag() == MKTAG('W','A','V','E')) { - size = _fileStream->readUint32BE(); - - if (_sequenceNum) { - Common::File in; - - _fileStream->seek(size, SEEK_CUR); - - in.open("audio.wav"); - if (!in.isOpen()) { - error("Can't read offset file 'audio.wav'"); - } - - in.seek(_sequenceNum * 8, SEEK_SET); - offset = in.readUint32LE(); - size = in.readUint32LE(); - - in.seek(offset, SEEK_SET); - _bgSoundStream = Audio::makeWAVStream(in.readStream(size), DisposeAfterUse::YES); - in.close(); - } else { - _bgSoundStream = Audio::makeWAVStream(_fileStream->readStream(size), DisposeAfterUse::YES); - } - } else { - _bgSoundStream = Audio::SeekableAudioStream::openStreamFile(baseName); - } - if (_bgSoundStream != NULL) { _vm->_mixer->stopHandle(_bgSound); _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_bgSound, _bgSoundStream, -1, getVolume(), getBalance()); @@ -344,8 +312,7 @@ void MoviePlayerDXA::nextFrame() { } if (_vm->_interactiveVideo == TYPE_LOOPING && endOfVideo()) { - _fileStream->seek(_firstFrameOffset); - _curFrame = -1; + rewind(); startSound(); } @@ -374,13 +341,15 @@ bool MoviePlayerDXA::processFrame() { copyFrameToBuffer((byte *)screen->pixels, (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, screen->pitch); _vm->_system->unlockScreen(); - Common::Rational soundTime(_mixer->getSoundElapsedTime(_bgSound), 1000); - if ((_bgSoundStream == NULL) || ((soundTime * getFrameRate()).toInt() / 1000 < getCurFrame() + 1)) { + uint32 soundTime = _mixer->getSoundElapsedTime(_bgSound); + uint32 nextFrameStartTime = ((Video::AdvancedVideoDecoder::VideoTrack *)getTrack(0))->getNextFrameStartTime(); + + if ((_bgSoundStream == NULL) || soundTime < nextFrameStartTime) { if (_bgSoundStream && _mixer->isSoundHandleActive(_bgSound)) { - while (_mixer->isSoundHandleActive(_bgSound) && (soundTime * getFrameRate()).toInt() < getCurFrame()) { + while (_mixer->isSoundHandleActive(_bgSound) && soundTime < nextFrameStartTime) { _vm->_system->delayMillis(10); - soundTime = Common::Rational(_mixer->getSoundElapsedTime(_bgSound), 1000); + soundTime = _mixer->getSoundElapsedTime(_bgSound); } // In case the background sound ends prematurely, update // _ticks so that we can still fall back on the no-sound @@ -399,14 +368,35 @@ bool MoviePlayerDXA::processFrame() { return false; } -void MoviePlayerDXA::updateVolume() { - if (g_system->getMixer()->isSoundHandleActive(_bgSound)) - g_system->getMixer()->setChannelVolume(_bgSound, getVolume()); -} +void MoviePlayerDXA::readSoundData(Common::SeekableReadStream *stream) { + uint32 tag = stream->readUint32BE(); + + if (tag == MKTAG('W','A','V','E')) { + uint32 size = stream->readUint32BE(); + + if (_sequenceNum) { + Common::File in; + + stream->skip(size); + + in.open("audio.wav"); + if (!in.isOpen()) { + error("Can't read offset file 'audio.wav'"); + } + + in.seek(_sequenceNum * 8, SEEK_SET); + uint32 offset = in.readUint32LE(); + size = in.readUint32LE(); -void MoviePlayerDXA::updateBalance() { - if (g_system->getMixer()->isSoundHandleActive(_bgSound)) - g_system->getMixer()->setChannelBalance(_bgSound, getBalance()); + in.seek(offset, SEEK_SET); + _bgSoundStream = Audio::makeWAVStream(in.readStream(size), DisposeAfterUse::YES); + in.close(); + } else { + _bgSoundStream = Audio::makeWAVStream(stream->readStream(size), DisposeAfterUse::YES); + } + } else { + _bgSoundStream = Audio::SeekableAudioStream::openStreamFile(baseName); + } } /////////////////////////////////////////////////////////////////////////////// diff --git a/engines/agos/animation.h b/engines/agos/animation.h index 37a666b201..9e31fced6d 100644 --- a/engines/agos/animation.h +++ b/engines/agos/animation.h @@ -81,16 +81,13 @@ public: virtual void stopVideo(); protected: - // VideoDecoder API - void updateVolume(); - void updateBalance(); + void readSoundData(Common::SeekableReadStream *stream); private: void handleNextFrame(); bool processFrame(); void startSound(); void copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch); - uint32 _firstFrameOffset; }; class MoviePlayerSMK : public MoviePlayer, Video::SmackerDecoder { diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index 8f863d1e09..70f1e5dc03 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -37,6 +37,7 @@ #include "gui/message.h" +#include "video/dxa_decoder.h" #include "video/psx_decoder.h" #include "video/smk_decoder.h" @@ -96,9 +97,8 @@ static const char *const sequenceListPSX[20] = { // Basic movie player /////////////////////////////////////////////////////////////////////////////// -MoviePlayer::MoviePlayer(SwordEngine *vm, Text *textMan, ResMan *resMan, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Video::VideoDecoder *decoder, DecoderType decoderType) - : _vm(vm), _textMan(textMan), _resMan(resMan), _snd(snd), _bgSoundHandle(bgSoundHandle), _system(system) { - _bgSoundStream = NULL; +MoviePlayer::MoviePlayer(SwordEngine *vm, Text *textMan, ResMan *resMan, OSystem *system, Video::VideoDecoder *decoder, DecoderType decoderType) + : _vm(vm), _textMan(textMan), _resMan(resMan), _system(system) { _decoderType = decoderType; _decoder = decoder; @@ -107,7 +107,6 @@ MoviePlayer::MoviePlayer(SwordEngine *vm, Text *textMan, ResMan *resMan, Audio:: } MoviePlayer::~MoviePlayer() { - delete _bgSoundHandle; delete _decoder; } @@ -116,16 +115,12 @@ MoviePlayer::~MoviePlayer() { * @param id the id of the file */ bool MoviePlayer::load(uint32 id) { - Common::File f; Common::String filename; - if (_decoderType == kVideoDecoderDXA) - _bgSoundStream = Audio::SeekableAudioStream::openStreamFile(sequenceList[id]); - else - _bgSoundStream = NULL; - if (SwordEngine::_systemVars.showText) { + Common::File f; filename = Common::String::format("%s.txt", sequenceList[id]); + if (f.open(filename)) { Common::String line; int lineNo = 0; @@ -169,7 +164,6 @@ bool MoviePlayer::load(uint32 id) { _movieTexts.push_back(MovieText(startFrame, endFrame, ptr, color)); lastEnd = endFrame; } - f.close(); } } @@ -179,13 +173,6 @@ bool MoviePlayer::load(uint32 id) { break; case kVideoDecoderSMK: filename = Common::String::format("%s.smk", sequenceList[id]); - - if (_decoder->loadFile(filename)) { - ((Video::AdvancedVideoDecoder *)_decoder)->start(); // TODO: Remove after new API is complete - return true; - } else { - return false; - } break; case kVideoDecoderPSX: filename = Common::String::format("%s.str", (_vm->_systemVars.isDemo) ? sequenceList[id] : sequenceListPSX[id]); @@ -205,30 +192,27 @@ bool MoviePlayer::load(uint32 id) { break; } - return _decoder->loadFile(filename.c_str()); -} + if (!_decoder->loadFile(filename)) + return false; -void MoviePlayer::play() { - if (_bgSoundStream) - _snd->playStream(Audio::Mixer::kSFXSoundType, _bgSoundHandle, _bgSoundStream); + // For DXA, also add the external sound file + if (_decoderType == kVideoDecoderDXA) + ((Video::AdvancedVideoDecoder *)_decoder)->addStreamFileTrack(sequenceList[id]); - bool terminated = false; + ((Video::AdvancedVideoDecoder *)_decoder)->start(); // TODO: Remove after new API is complete + return true; +} +void MoviePlayer::play() { _textX = 0; _textY = 0; - terminated = !playVideo(); - - if (terminated) - _snd->stopHandle(*_bgSoundHandle); + playVideo(); _textMan->releaseText(2, false); _movieTexts.clear(); - while (_snd->isSoundHandleActive(*_bgSoundHandle)) - _system->delayMillis(100); - // It's tempting to call _screen->fullRefresh() here to restore the old // palette. However, that causes glitches with DXA movies, where the // previous location would be momentarily drawn, before switching to @@ -514,24 +498,12 @@ void MoviePlayer::drawFramePSX(const Graphics::Surface *frame) { scaledFrame.free(); } -DXADecoderWithSound::DXADecoderWithSound(Audio::Mixer *mixer, Audio::SoundHandle *bgSoundHandle) - : _mixer(mixer), _bgSoundHandle(bgSoundHandle) { -} - -uint32 DXADecoderWithSound::getTime() const { - if (_mixer->isSoundHandleActive(*_bgSoundHandle)) - return _mixer->getSoundElapsedTime(*_bgSoundHandle); - - return DXADecoder::getTime(); -} - /////////////////////////////////////////////////////////////////////////////// // Factory function for creating the appropriate cutscene player /////////////////////////////////////////////////////////////////////////////// -MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan *resMan, Audio::Mixer *snd, OSystem *system) { +MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan *resMan, OSystem *system) { Common::String filename; - Audio::SoundHandle *bgSoundHandle = new Audio::SoundHandle; // For the PSX version, we'll try the PlayStation stream files if (vm->isPsx()) { @@ -542,7 +514,7 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan * #ifdef USE_RGB_COLOR // All BS1 PSX videos run the videos at 2x speed Video::VideoDecoder *psxDecoder = new Video::PSXStreamDecoder(Video::PSXStreamDecoder::kCD2x); - return new MoviePlayer(vm, textMan, resMan, snd, system, bgSoundHandle, psxDecoder, kVideoDecoderPSX); + return new MoviePlayer(vm, textMan, resMan, system, psxDecoder, kVideoDecoderPSX); #else GUI::MessageDialog dialog(Common::String::format(_("PSX stream cutscene '%s' cannot be played in paletted mode"), filename.c_str()), _("OK")); dialog.runModal(); @@ -555,19 +527,19 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan * if (Common::File::exists(filename)) { Video::SmackerDecoder *smkDecoder = new Video::SmackerDecoder(); - return new MoviePlayer(vm, textMan, resMan, snd, system, bgSoundHandle, smkDecoder, kVideoDecoderSMK); + return new MoviePlayer(vm, textMan, resMan, system, smkDecoder, kVideoDecoderSMK); } filename = Common::String::format("%s.dxa", sequenceList[id]); if (Common::File::exists(filename)) { #ifdef USE_ZLIB - DXADecoderWithSound *dxaDecoder = new DXADecoderWithSound(snd, bgSoundHandle); - return new MoviePlayer(vm, textMan, resMan, snd, system, bgSoundHandle, dxaDecoder, kVideoDecoderDXA); + Video::VideoDecoder *dxaDecoder = new Video::DXADecoder(); + return new MoviePlayer(vm, textMan, resMan, system, dxaDecoder, kVideoDecoderDXA); #else GUI::MessageDialog dialog(_("DXA cutscenes found but ScummVM has been built without zlib support"), _("OK")); dialog.runModal(); - return NULL; + return 0; #endif } @@ -577,7 +549,7 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan * if (Common::File::exists(filename)) { GUI::MessageDialog dialog(_("MPEG2 cutscenes are no longer supported"), _("OK")); dialog.runModal(); - return NULL; + return 0; } if (!vm->isPsx() || scumm_stricmp(sequenceList[id], "enddemo") != 0) { @@ -586,7 +558,7 @@ MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan * dialog.runModal(); } - return NULL; + return 0; } } // End of namespace Sword1 diff --git a/engines/sword1/animation.h b/engines/sword1/animation.h index c2ed86a1a3..d0c61f5eb3 100644 --- a/engines/sword1/animation.h +++ b/engines/sword1/animation.h @@ -23,16 +23,19 @@ #ifndef SWORD1_ANIMATION_H #define SWORD1_ANIMATION_H -#include "video/dxa_decoder.h" -#include "video/video_decoder.h" - #include "common/list.h" -#include "audio/audiostream.h" - #include "sword1/screen.h" #include "sword1/sound.h" +namespace Graphics { +struct Surface; +} + +namespace Video { +class VideoDecoder; +} + namespace Sword1 { enum DecoderType { @@ -55,21 +58,9 @@ public: } }; -class DXADecoderWithSound : public Video::DXADecoder { -public: - DXADecoderWithSound(Audio::Mixer *mixer, Audio::SoundHandle *bgSoundHandle); - ~DXADecoderWithSound() {} - - uint32 getTime() const; - -private: - Audio::Mixer *_mixer; - Audio::SoundHandle *_bgSoundHandle; -}; - class MoviePlayer { public: - MoviePlayer(SwordEngine *vm, Text *textMan, ResMan *resMan, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Video::VideoDecoder *decoder, DecoderType decoderType); + MoviePlayer(SwordEngine *vm, Text *textMan, ResMan *resMan, OSystem *system, Video::VideoDecoder *decoder, DecoderType decoderType); virtual ~MoviePlayer(); bool load(uint32 id); void play(); @@ -78,7 +69,6 @@ protected: SwordEngine *_vm; Text *_textMan; ResMan *_resMan; - Audio::Mixer *_snd; OSystem *_system; Common::List _movieTexts; int _textX, _textY, _textWidth, _textHeight; @@ -88,8 +78,6 @@ protected: DecoderType _decoderType; Video::VideoDecoder *_decoder; - Audio::SoundHandle *_bgSoundHandle; - Audio::AudioStream *_bgSoundStream; bool playVideo(); void performPostProcessing(byte *screen); @@ -100,7 +88,7 @@ protected: void convertColor(byte r, byte g, byte b, float &h, float &s, float &v); }; -MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan *resMan, Audio::Mixer *snd, OSystem *system); +MoviePlayer *makeMoviePlayer(uint32 id, SwordEngine *vm, Text *textMan, ResMan *resMan, OSystem *system); } // End of namespace Sword1 diff --git a/engines/sword1/logic.cpp b/engines/sword1/logic.cpp index 8e04861edf..757d768780 100644 --- a/engines/sword1/logic.cpp +++ b/engines/sword1/logic.cpp @@ -959,7 +959,7 @@ int Logic::fnPlaySequence(Object *cpt, int32 id, int32 sequenceId, int32 d, int3 // meantime, we don't want any looping sound effects still playing. _sound->quitScreen(); - MoviePlayer *player = makeMoviePlayer(sequenceId, _vm, _textMan, _resMan, _mixer, _system); + MoviePlayer *player = makeMoviePlayer(sequenceId, _vm, _textMan, _resMan, _system); if (player) { _screen->clearScreen(); if (player->load(sequenceId)) diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index e257ec9029..e603925e73 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -40,6 +40,7 @@ #include "gui/message.h" +#include "video/dxa_decoder.h" #include "video/smk_decoder.h" #include "video/psx_decoder.h" @@ -51,9 +52,8 @@ namespace Sword2 { // Basic movie player /////////////////////////////////////////////////////////////////////////////// -MoviePlayer::MoviePlayer(Sword2Engine *vm, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Video::VideoDecoder *decoder, DecoderType decoderType) - : _vm(vm), _snd(snd), _bgSoundHandle(bgSoundHandle), _system(system) { - _bgSoundStream = NULL; +MoviePlayer::MoviePlayer(Sword2Engine *vm, OSystem *system, Video::VideoDecoder *decoder, DecoderType decoderType) + : _vm(vm), _system(system) { _decoderType = decoderType; _decoder = decoder; @@ -62,7 +62,6 @@ MoviePlayer::MoviePlayer(Sword2Engine *vm, Audio::Mixer *snd, OSystem *system, A } MoviePlayer::~MoviePlayer() { - delete _bgSoundHandle; delete _decoder; } @@ -75,11 +74,6 @@ bool MoviePlayer::load(const char *name) { if (_vm->shouldQuit()) return false; - if (_decoderType == kVideoDecoderDXA) - _bgSoundStream = Audio::SeekableAudioStream::openStreamFile(name); - else - _bgSoundStream = NULL; - _textSurface = NULL; Common::String filename; @@ -89,13 +83,6 @@ bool MoviePlayer::load(const char *name) { break; case kVideoDecoderSMK: filename = Common::String::format("%s.smk", name); - - if (_decoder->loadFile(filename)) { - ((Video::AdvancedVideoDecoder *)_decoder)->start(); // TODO: Remove after new API is complete - return true; - } else { - return false; - } break; case kVideoDecoderPSX: filename = Common::String::format("%s.str", name); @@ -114,7 +101,15 @@ bool MoviePlayer::load(const char *name) { } } - return _decoder->loadFile(filename.c_str()); + if (!_decoder->loadFile(filename)) + return false; + + // For DXA, also add the external sound file + if (_decoderType == kVideoDecoderDXA) + ((Video::AdvancedVideoDecoder *)_decoder)->addStreamFileTrack(name); + + ((Video::AdvancedVideoDecoder *)_decoder)->start(); // TODO: Remove after new API is complete + return true; } void MoviePlayer::play(MovieText *movieTexts, uint32 numMovieTexts, uint32 leadIn, uint32 leadOut) { @@ -130,24 +125,15 @@ void MoviePlayer::play(MovieText *movieTexts, uint32 numMovieTexts, uint32 leadI if (leadIn) _vm->_sound->playMovieSound(leadIn, kLeadInSound); - if (_bgSoundStream) - _snd->playStream(Audio::Mixer::kSFXSoundType, _bgSoundHandle, _bgSoundStream); - - bool terminated = false; - - terminated = !playVideo(); + bool terminated = !playVideo(); closeTextObject(_currentMovieText, NULL, 0); if (terminated) { - _snd->stopHandle(*_bgSoundHandle); _vm->_sound->stopMovieSounds(); _vm->_sound->stopSpeech(); } - while (_snd->isSoundHandleActive(*_bgSoundHandle)) - _system->delayMillis(100); - if (_decoderType == kVideoDecoderPSX) { // Need to jump back to paletted color initGraphics(640, 480, true); @@ -414,31 +400,19 @@ void MoviePlayer::drawFramePSX(const Graphics::Surface *frame) { scaledFrame.free(); } -DXADecoderWithSound::DXADecoderWithSound(Audio::Mixer *mixer, Audio::SoundHandle *bgSoundHandle) - : _mixer(mixer), _bgSoundHandle(bgSoundHandle) { -} - -uint32 DXADecoderWithSound::getTime() const { - if (_mixer->isSoundHandleActive(*_bgSoundHandle)) - return _mixer->getSoundElapsedTime(*_bgSoundHandle); - - return DXADecoder::getTime(); -} - /////////////////////////////////////////////////////////////////////////////// // Factory function for creating the appropriate cutscene player /////////////////////////////////////////////////////////////////////////////// -MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, Audio::Mixer *snd, OSystem *system, uint32 frameCount) { +MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, OSystem *system, uint32 frameCount) { Common::String filename; - Audio::SoundHandle *bgSoundHandle = new Audio::SoundHandle; filename = Common::String::format("%s.str", name); if (Common::File::exists(filename)) { #ifdef USE_RGB_COLOR Video::VideoDecoder *psxDecoder = new Video::PSXStreamDecoder(Video::PSXStreamDecoder::kCD2x, frameCount); - return new MoviePlayer(vm, snd, system, bgSoundHandle, psxDecoder, kVideoDecoderPSX); + return new MoviePlayer(vm, system, psxDecoder, kVideoDecoderPSX); #else GUI::MessageDialog dialog(_("PSX cutscenes found but ScummVM has been built without RGB color support"), _("OK")); dialog.runModal(); @@ -450,15 +424,15 @@ MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, Audio::Mixer *s if (Common::File::exists(filename)) { Video::SmackerDecoder *smkDecoder = new Video::SmackerDecoder(); - return new MoviePlayer(vm, snd, system, bgSoundHandle, smkDecoder, kVideoDecoderSMK); + return new MoviePlayer(vm, system, smkDecoder, kVideoDecoderSMK); } filename = Common::String::format("%s.dxa", name); if (Common::File::exists(filename)) { #ifdef USE_ZLIB - DXADecoderWithSound *dxaDecoder = new DXADecoderWithSound(snd, bgSoundHandle); - return new MoviePlayer(vm, snd, system, bgSoundHandle, dxaDecoder, kVideoDecoderDXA); + Video::DXADecoder *dxaDecoder = new Video::DXADecoder(); + return new MoviePlayer(vm, system, dxaDecoder, kVideoDecoderDXA); #else GUI::MessageDialog dialog(_("DXA cutscenes found but ScummVM has been built without zlib support"), _("OK")); dialog.runModal(); diff --git a/engines/sword2/animation.h b/engines/sword2/animation.h index 3d5c42b7f7..b2a243b2ca 100644 --- a/engines/sword2/animation.h +++ b/engines/sword2/animation.h @@ -25,12 +25,16 @@ #ifndef SWORD2_ANIMATION_H #define SWORD2_ANIMATION_H -#include "video/dxa_decoder.h" -#include "video/video_decoder.h" -#include "audio/mixer.h" - #include "sword2/screen.h" +namespace Graphics { +struct Surface; +} + +namespace Video { +class VideoDecoder; +} + namespace Sword2 { enum DecoderType { @@ -55,20 +59,9 @@ struct MovieText { } }; -class DXADecoderWithSound : public Video::DXADecoder { -public: - DXADecoderWithSound(Audio::Mixer *mixer, Audio::SoundHandle *bgSoundHandle); - ~DXADecoderWithSound() {} - - uint32 getTime() const; -private: - Audio::Mixer *_mixer; - Audio::SoundHandle *_bgSoundHandle; -}; - class MoviePlayer { public: - MoviePlayer(Sword2Engine *vm, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Video::VideoDecoder *decoder, DecoderType decoderType); + MoviePlayer(Sword2Engine *vm, OSystem *system, Video::VideoDecoder *decoder, DecoderType decoderType); virtual ~MoviePlayer(); bool load(const char *name); @@ -76,7 +69,6 @@ public: protected: Sword2Engine *_vm; - Audio::Mixer *_snd; OSystem *_system; MovieText *_movieTexts; uint32 _numMovieTexts; @@ -87,8 +79,6 @@ protected: DecoderType _decoderType; Video::VideoDecoder *_decoder; - Audio::SoundHandle *_bgSoundHandle; - Audio::AudioStream *_bgSoundStream; uint32 _leadOut; int _leadOutFrame; @@ -105,7 +95,7 @@ protected: uint32 getWhiteColor(); }; -MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, Audio::Mixer *snd, OSystem *system, uint32 frameCount); +MoviePlayer *makeMoviePlayer(const char *name, Sword2Engine *vm, OSystem *system, uint32 frameCount); } // End of namespace Sword2 diff --git a/engines/sword2/function.cpp b/engines/sword2/function.cpp index 836b252d6c..07fcaa094b 100644 --- a/engines/sword2/function.cpp +++ b/engines/sword2/function.cpp @@ -2139,7 +2139,7 @@ int32 Logic::fnPlaySequence(int32 *params) { uint32 frameCount = Sword2Engine::isPsx() ? params[1] : 0; - _moviePlayer = makeMoviePlayer(filename, _vm, _vm->_mixer, _vm->_system, frameCount); + _moviePlayer = makeMoviePlayer(filename, _vm, _vm->_system, frameCount); if (_moviePlayer && _moviePlayer->load(filename)) { _moviePlayer->play(_sequenceTextList, _sequenceTextLines, _smackerLeadIn, _smackerLeadOut); diff --git a/video/dxa_decoder.cpp b/video/dxa_decoder.cpp index 7d1112a59c..5ac9bd2088 100644 --- a/video/dxa_decoder.cpp +++ b/video/dxa_decoder.cpp @@ -37,41 +37,43 @@ namespace Video { DXADecoder::DXADecoder() { - _fileStream = 0; - _surface = 0; - _dirtyPalette = false; +} - _frameBuffer1 = 0; - _frameBuffer2 = 0; - _scaledBuffer = 0; +DXADecoder::~DXADecoder() { + close(); +} - _inBuffer = 0; - _inBufferSize = 0; +bool DXADecoder::loadStream(Common::SeekableReadStream *stream) { + close(); - _decompBuffer = 0; - _decompBufferSize = 0; + uint32 tag = stream->readUint32BE(); - _width = 0; - _height = 0; + if (tag != MKTAG('D','E','X','A')) { + close(); + return false; + } - _frameSize = 0; - _frameCount = 0; - _frameRate = 0; + DXAVideoTrack *track = new DXAVideoTrack(stream); + addTrack(track); - _scaleMode = S_NONE; -} + readSoundData(stream); -DXADecoder::~DXADecoder() { - close(); + track->setFrameStartPos(); + return true; } -bool DXADecoder::loadStream(Common::SeekableReadStream *stream) { - close(); +void DXADecoder::readSoundData(Common::SeekableReadStream *stream) { + // Skip over the tag by default + stream->readUint32BE(); +} +DXADecoder::DXAVideoTrack::DXAVideoTrack(Common::SeekableReadStream *stream) { _fileStream = stream; - - uint32 tag = _fileStream->readUint32BE(); - assert(tag == MKTAG('D','E','X','A')); + _curFrame = -1; + _frameStartOffset = 0; + _decompBuffer = 0; + _inBuffer = 0; + memset(_palette, 0, 256 * 3); uint8 flags = _fileStream->readByte(); _frameCount = _fileStream->readUint16BE(); @@ -105,18 +107,14 @@ bool DXADecoder::loadStream(Common::SeekableReadStream *stream) { _frameSize = _width * _height; _decompBufferSize = _frameSize; - _frameBuffer1 = (uint8 *)malloc(_frameSize); + _frameBuffer1 = new byte[_frameSize]; memset(_frameBuffer1, 0, _frameSize); - _frameBuffer2 = (uint8 *)malloc(_frameSize); + _frameBuffer2 = new byte[_frameSize]; memset(_frameBuffer2, 0, _frameSize); - if (!_frameBuffer1 || !_frameBuffer2) - error("DXADecoder: Error allocating frame buffers (size %u)", _frameSize); _scaledBuffer = 0; if (_scaleMode != S_NONE) { - _scaledBuffer = (uint8 *)malloc(_frameSize); - if (!_scaledBuffer) - error("Error allocating scale buffer (size %u)", _frameSize); + _scaledBuffer = new byte[_frameSize]; memset(_scaledBuffer, 0, _frameSize); } @@ -148,36 +146,33 @@ bool DXADecoder::loadStream(Common::SeekableReadStream *stream) { } while (tag != 0); } #endif - - // Read the sound header - _soundTag = _fileStream->readUint32BE(); - - return true; } -void DXADecoder::close() { - if (!_fileStream) - return; - +DXADecoder::DXAVideoTrack::~DXAVideoTrack() { delete _fileStream; - _fileStream = 0; - delete _surface; - _surface = 0; + delete[] _frameBuffer1; + delete[] _frameBuffer2; + delete[] _scaledBuffer; + delete[] _inBuffer; + delete[] _decompBuffer; +} - free(_frameBuffer1); - free(_frameBuffer2); - free(_scaledBuffer); - free(_inBuffer); - free(_decompBuffer); +bool DXADecoder::DXAVideoTrack::rewind() { + _curFrame = -1; + _fileStream->seek(_frameStartOffset); + return true; +} - _inBuffer = 0; - _decompBuffer = 0; +Graphics::PixelFormat DXADecoder::DXAVideoTrack::getPixelFormat() const { + return _surface->format; +} - reset(); +void DXADecoder::DXAVideoTrack::setFrameStartPos() { + _frameStartOffset = _fileStream->pos(); } -void DXADecoder::decodeZlib(byte *data, int size, int totalSize) { +void DXADecoder::DXAVideoTrack::decodeZlib(byte *data, int size, int totalSize) { #ifdef USE_ZLIB unsigned long dstLen = totalSize; Common::uncompress(data, &dstLen, _inBuffer, size); @@ -187,14 +182,13 @@ void DXADecoder::decodeZlib(byte *data, int size, int totalSize) { #define BLOCKW 4 #define BLOCKH 4 -void DXADecoder::decode12(int size) { +void DXADecoder::DXAVideoTrack::decode12(int size) { #ifdef USE_ZLIB - if (_decompBuffer == NULL) { - _decompBuffer = (byte *)malloc(_decompBufferSize); + if (!_decompBuffer) { + _decompBuffer = new byte[_decompBufferSize]; memset(_decompBuffer, 0, _decompBufferSize); - if (_decompBuffer == NULL) - error("Error allocating decomp buffer (size %u)", _decompBufferSize); } + /* decompress the input data */ decodeZlib(_decompBuffer, size, _decompBufferSize); @@ -287,15 +281,13 @@ void DXADecoder::decode12(int size) { #endif } -void DXADecoder::decode13(int size) { +void DXADecoder::DXAVideoTrack::decode13(int size) { #ifdef USE_ZLIB uint8 *codeBuf, *dataBuf, *motBuf, *maskBuf; - if (_decompBuffer == NULL) { - _decompBuffer = (byte *)malloc(_decompBufferSize); + if (!_decompBuffer) { + _decompBuffer = new byte[_decompBufferSize]; memset(_decompBuffer, 0, _decompBufferSize); - if (_decompBuffer == NULL) - error("Error allocating decomp buffer (size %u)", _decompBufferSize); } /* decompress the input data */ @@ -475,7 +467,7 @@ void DXADecoder::decode13(int size) { #endif } -const Graphics::Surface *DXADecoder::decodeNextFrame() { +const Graphics::Surface *DXADecoder::DXAVideoTrack::decodeNextFrame() { uint32 tag = _fileStream->readUint32BE(); if (tag == MKTAG('C','M','A','P')) { _fileStream->read(_palette, 256 * 3); @@ -486,11 +478,10 @@ const Graphics::Surface *DXADecoder::decodeNextFrame() { if (tag == MKTAG('F','R','A','M')) { byte type = _fileStream->readByte(); uint32 size = _fileStream->readUint32BE(); - if ((_inBuffer == NULL) || (_inBufferSize < size)) { - free(_inBuffer); - _inBuffer = (byte *)malloc(size); - if (_inBuffer == NULL) - error("Error allocating input buffer (size %u)", size); + + if (!_inBuffer || _inBufferSize < size) { + delete[] _inBuffer; + _inBuffer = new byte[size]; memset(_inBuffer, 0, size); _inBufferSize = size; } @@ -551,9 +542,6 @@ const Graphics::Surface *DXADecoder::decodeNextFrame() { _curFrame++; - if (_curFrame == 0) - _startTime = g_system->getMillis(); - return _surface; } diff --git a/video/dxa_decoder.h b/video/dxa_decoder.h index d13cd3076c..a0caca4b95 100644 --- a/video/dxa_decoder.h +++ b/video/dxa_decoder.h @@ -41,62 +41,74 @@ namespace Video { * - sword1 * - sword2 */ -class DXADecoder : public FixedRateVideoDecoder { +class DXADecoder : public AdvancedVideoDecoder { public: DXADecoder(); virtual ~DXADecoder(); bool loadStream(Common::SeekableReadStream *stream); - void close(); - - bool isVideoLoaded() const { return _fileStream != 0; } - uint16 getWidth() const { return _width; } - uint16 getHeight() const { return _height; } - uint32 getFrameCount() const { return _frameCount; } - const Graphics::Surface *decodeNextFrame(); - Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); } - const byte *getPalette() { _dirtyPalette = false; return _palette; } - bool hasDirtyPalette() const { return _dirtyPalette; } +protected: /** - * Get the sound chunk tag of the loaded DXA file + * Read the sound data out of the given DXA stream */ - uint32 getSoundTag() { return _soundTag; } - -protected: - Common::Rational getFrameRate() const { return _frameRate; } - - Common::SeekableReadStream *_fileStream; + virtual void readSoundData(Common::SeekableReadStream *stream); private: - void decodeZlib(byte *data, int size, int totalSize); - void decode12(int size); - void decode13(int size); - - enum ScaleMode { - S_NONE, - S_INTERLACED, - S_DOUBLE + class DXAVideoTrack : public FixedRateVideoTrack { + public: + DXAVideoTrack(Common::SeekableReadStream *stream); + ~DXAVideoTrack(); + + bool isRewindable() const { return true; } + bool rewind(); + + uint16 getWidth() const { return _width; } + uint16 getHeight() const { return _height; } + Graphics::PixelFormat getPixelFormat() const; + int getCurFrame() const { return _curFrame; } + int getFrameCount() const { return _frameCount; } + const Graphics::Surface *decodeNextFrame(); + const byte *getPalette() const { _dirtyPalette = false; return _palette; } + bool hasDirtyPalette() const { return _dirtyPalette; } + + void setFrameStartPos(); + + protected: + Common::Rational getFrameRate() const { return _frameRate; } + + private: + void decodeZlib(byte *data, int size, int totalSize); + void decode12(int size); + void decode13(int size); + + enum ScaleMode { + S_NONE, + S_INTERLACED, + S_DOUBLE + }; + + Common::SeekableReadStream *_fileStream; + Graphics::Surface *_surface; + + byte *_frameBuffer1; + byte *_frameBuffer2; + byte *_scaledBuffer; + byte *_inBuffer; + uint32 _inBufferSize; + byte *_decompBuffer; + uint32 _decompBufferSize; + uint16 _curHeight; + uint32 _frameSize; + ScaleMode _scaleMode; + uint16 _width, _height; + uint32 _frameRate; + uint32 _frameCount; + byte _palette[256 * 3]; + mutable bool _dirtyPalette; + int _curFrame; + uint32 _frameStartOffset; }; - - Graphics::Surface *_surface; - byte _palette[256 * 3]; - bool _dirtyPalette; - - byte *_frameBuffer1; - byte *_frameBuffer2; - byte *_scaledBuffer; - byte *_inBuffer; - uint32 _inBufferSize; - byte *_decompBuffer; - uint32 _decompBufferSize; - uint16 _curHeight; - uint32 _frameSize; - ScaleMode _scaleMode; - uint32 _soundTag; - uint16 _width, _height; - uint32 _frameRate; - uint32 _frameCount; }; } // End of namespace Video -- cgit v1.2.3 From 6f351302040be620aa039a7c605f3c23463b27db Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 24 Jul 2012 22:34:03 +0300 Subject: SCI: More work on color remapping More transparency/color mapping effects are now working (e.g. the flashlight at the Gedde tomb in GK1, the rays of light at Schloss Ritter in GK1, the torch in the QFG4 demo and the shadows in QFG4, PQ4 and KQ7) --- engines/sci/engine/kgraphics.cpp | 17 +++++----- engines/sci/engine/kgraphics32.cpp | 47 +++++++++++++--------------- engines/sci/graphics/palette.cpp | 64 ++++++++++++++++++++++++++++++-------- engines/sci/graphics/palette.h | 12 ++++--- engines/sci/graphics/view.cpp | 9 ++++-- 5 files changed, 97 insertions(+), 52 deletions(-) diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index bd78c56416..55c0202048 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -1228,15 +1228,18 @@ reg_t kRemapColors(EngineState *s, int argc, reg_t *argv) { switch (operation) { case 0: { // remap by percent uint16 percent = argv[1].toUint16(); - g_sci->_gfxPalette->toggleRemap(true); - g_sci->_gfxPalette->setRemappingPercent(percent); + g_sci->_gfxPalette->toggleRemapping(true); + g_sci->_gfxPalette->resetRemapping(); + g_sci->_gfxPalette->setRemappingPercent(254, percent); } break; - case 1: { // set remapping base - //int16 unk1 = argv[1].toSint16(); - //int16 unk2 = argv[2].toSint16(); - //int16 unk3 = argv[3].toSint16(); - kStub(s, argc, argv); + case 1: { // remap by range + uint16 from = argv[1].toUint16(); + uint16 to = argv[2].toUint16(); + uint16 base = argv[3].toUint16(); + g_sci->_gfxPalette->toggleRemapping(true); + g_sci->_gfxPalette->resetRemapping(); + g_sci->_gfxPalette->setRemappingRange(254, from, to, base); } break; case 2: // turn remapping off (unused) diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 1b7b628e7d..7240308f4a 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -737,46 +737,44 @@ reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { uint16 operation = argv[0].toUint16(); switch (operation) { - case 0: { // Set remapping to base. 0 turns remapping off. + case 0: { // turn remapping off int16 base = (argc >= 2) ? argv[1].toSint16() : 0; - if (base != 0) // 0 is the default behavior when changing rooms in GK1, thus silencing the warning - warning("kRemapColors: Set remapping to base %d", base); + if (base > 0) + warning("kRemapColors(0) called with base %d", base); + g_sci->_gfxPalette->toggleRemapping(false); + g_sci->_gfxPalette->resetRemapping(); } - // TODO: Don't turn remapping off always - g_sci->_gfxPalette->toggleRemap(false); - g_sci->_gfxPalette->setRemappingPercent(0); break; - case 1: { // set remapping base - //int16 unk1 = argv[1].toSint16(); - //int16 unk2 = argv[2].toSint16(); - //int16 unk3 = argv[3].toSint16(); - //uint16 unk4 = argv[4].toUint16(); - //uint16 unk5 = (argc >= 6) ? argv[5].toUint16() : 0; - kStub(s, argc, argv); + case 1: { // remap by range + uint16 color = argv[1].toUint16(); + uint16 from = argv[2].toUint16(); + uint16 to = argv[3].toUint16(); + uint16 base = argv[4].toUint16(); + uint16 unk5 = (argc >= 6) ? argv[5].toUint16() : 0; + if (unk5 > 0) + warning("kRemapColors(1) called with 6 parameters, unknown parameter is %d", unk5); + g_sci->_gfxPalette->toggleRemapping(true); + g_sci->_gfxPalette->setRemappingRange(color, from, to, base); } break; case 2: { // remap by percent - // TODO: Use the color index. The -10 offset is wrong. - /*int16 color = argv[1].toSint16(); - if (color >= 10) - color -= 10;*/ + uint16 color = argv[1].toUint16(); uint16 percent = argv[2].toUint16(); // 0 - 100 if (argc >= 4) warning("RemapByPercent called with 4 parameters, unknown parameter is %d", argv[3].toUint16()); - g_sci->_gfxPalette->toggleRemap(true); - g_sci->_gfxPalette->setRemappingPercent(percent); + g_sci->_gfxPalette->toggleRemapping(true); + g_sci->_gfxPalette->setRemappingPercent(color, percent); } break; case 3: { // remap to gray - // NOTE: This adjusts the alpha value of a specific color, and it operates on - // an RGBA palette int16 color = argv[1].toSint16(); // this is subtracted from a maximum color value, and can be offset by 10 int16 percent = argv[2].toSint16(); // 0 - 100 uint16 unk3 = (argc >= 4) ? argv[3].toUint16() : 0; warning("kRemapColors: RemapToGray color %d by %d percent (unk3 = %d)", color, percent, unk3); + // TODO } break; - case 4: { // unknown + case 4: { // remap to percent gray //int16 unk1 = argv[1].toSint16(); //uint16 unk2 = argv[2].toUint16(); //uint16 unk3 = argv[3].toUint16(); @@ -784,10 +782,7 @@ reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { kStub(s, argc, argv); } break; - case 5: { // set color intensity - // TODO: This isn't right, it should be setting a mapping table instead. - // For PQ4, we can emulate this with kernelSetIntensity(). In QFG4, this - // won't do. + case 5: { // don't map to range //int16 mapping = argv[1].toSint16(); uint16 intensity = argv[2].toUint16(); // HACK for PQ4 diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index f16d607a29..b5154ef860 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -102,7 +102,7 @@ GfxPalette::GfxPalette(ResourceManager *resMan, GfxScreen *screen) } _remapOn = false; - _remappingPercent = 0; + resetRemapping(); } GfxPalette::~GfxPalette() { @@ -332,24 +332,62 @@ void GfxPalette::set(Palette *newPalette, bool force, bool forceRealMerge) { } } -bool GfxPalette::isRemapColor(byte color) { - // TODO: Expand this for SCI32 (more than one remap color can be set). - // Now, it is assumed that colors 253 and 254 are the remap colors. - return _remapOn && (color == 253 || color == 254); +bool GfxPalette::isRemapMask(byte color) { + return (_remapOn && (color >= _remappingMaskFrom && color <= _remappingMaskTo)); +} + +void GfxPalette::resetRemapping() { + _remappingMaskFrom = 0; + _remappingMaskTo = 0; + _remappingPercentToSet = 0; + + for (int i = 0; i < 256; i++) { + _remappingTable[i] = i; + } +} + +void GfxPalette::setRemappingPercent(byte color, byte percent) { + // We need to defer the setup of the remapping table until something is + // shown on screen, otherwise kernelFindColor() won't find correct + // colors. The actual setup of the remapping table will be performed in + // remapColor(). + _remappingPercentToSet = percent; + + if (_remappingMaskFrom > color || _remappingMaskFrom == 0) + _remappingMaskFrom = color; + if (_remappingMaskTo < color) + _remappingMaskTo = color; +} + +void GfxPalette::setRemappingRange(byte color, byte from, byte to, byte base) { + for (int i = from; i <= to; i++) { + _remappingTable[i] = i + base; + } + + if (_remappingMaskFrom > color || _remappingMaskFrom == 0) + _remappingMaskFrom = color; + if (_remappingMaskTo < color) + _remappingMaskTo = color; } byte GfxPalette::remapColor(byte color) { assert(_remapOn); - // TODO: Change this to use a table instead, like the original. - if (_remappingPercent) { - byte r = _sysPalette.colors[color].r * _remappingPercent / 100; - byte g = _sysPalette.colors[color].g * _remappingPercent / 100; - byte b = _sysPalette.colors[color].b * _remappingPercent / 100; - return kernelFindColor(r, g, b); - } else { - return color; + // Check if we need to set remapping by percent. This can only be + // performed when something is shown on screen, so that the screen + // palette is set up and kernelFindColor() can work correctly. + if (_remappingPercentToSet) { + for (int i = 0; i < 256; i++) { + byte r = _sysPalette.colors[i].r * _remappingPercentToSet / 100; + byte g = _sysPalette.colors[i].g * _remappingPercentToSet / 100; + byte b = _sysPalette.colors[i].b * _remappingPercentToSet / 100; + _remappingTable[i] = kernelFindColor(r, g, b); + } + + _remappingPercentToSet = 0; } + + return _remappingTable[color]; } bool GfxPalette::insert(Palette *newPalette, Palette *destPalette) { diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h index 6774094810..372f3c7090 100644 --- a/engines/sci/graphics/palette.h +++ b/engines/sci/graphics/palette.h @@ -53,9 +53,11 @@ public: void getSys(Palette *pal); uint16 getTotalColorCount() const { return _totalScreenColors; } - void toggleRemap(bool remap) { _remapOn = remap; } - void setRemappingPercent(uint16 percent) { _remappingPercent = percent; } - bool isRemapColor(byte color); + void toggleRemapping(bool remap) { _remapOn = remap; } + void resetRemapping(); + void setRemappingPercent(byte color, byte percent); + void setRemappingRange(byte color, byte from, byte to, byte base); + bool isRemapMask(byte color); byte remapColor(byte color); void setOnScreen(); @@ -129,7 +131,9 @@ private: uint16 _totalScreenColors; bool _remapOn; - uint16 _remappingPercent; + byte _remappingTable[256]; + uint16 _remappingMaskFrom, _remappingMaskTo; + uint16 _remappingPercentToSet; void loadMacIconBarPalette(); byte *_macClut; diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp index ae135d141c..f68ed1443a 100644 --- a/engines/sci/graphics/view.cpp +++ b/engines/sci/graphics/view.cpp @@ -742,7 +742,7 @@ void GfxView::draw(const Common::Rect &rect, const Common::Rect &clipRect, const const int y2 = clipRectTranslated.top + y; if (!upscaledHires) { if (priority >= _screen->getPriority(x2, y2)) { - if (!_palette->isRemapColor(palette->mapping[color])) { + if (!_palette->isRemapMask(palette->mapping[color])) { _screen->putPixel(x2, y2, drawMask, palette->mapping[color], priority, 0); } else { byte remappedColor = _palette->remapColor(_screen->getVisual(x2, y2)); @@ -857,7 +857,12 @@ void GfxView::drawScaled(const Common::Rect &rect, const Common::Rect &clipRect, const int x2 = clipRectTranslated.left + x; const int y2 = clipRectTranslated.top + y; if (color != clearKey && priority >= _screen->getPriority(x2, y2)) { - _screen->putPixel(x2, y2, drawMask, palette->mapping[color], priority, 0); + if (!_palette->isRemapMask(palette->mapping[color])) { + _screen->putPixel(x2, y2, drawMask, palette->mapping[color], priority, 0); + } else { + byte remappedColor = _palette->remapColor(_screen->getVisual(x2, y2)); + _screen->putPixel(x2, y2, drawMask, remappedColor, priority, 0); + } } } } -- cgit v1.2.3 From fe3fb1873c60e7ed21c573e09030bd6d0a5018cb Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 24 Jul 2012 22:54:37 +0300 Subject: SCI: Cleanup of the palette remapping code --- engines/sci/engine/kgraphics.cpp | 2 -- engines/sci/engine/kgraphics32.cpp | 3 --- engines/sci/graphics/palette.cpp | 5 +++++ engines/sci/graphics/palette.h | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 55c0202048..da377319c0 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -1228,7 +1228,6 @@ reg_t kRemapColors(EngineState *s, int argc, reg_t *argv) { switch (operation) { case 0: { // remap by percent uint16 percent = argv[1].toUint16(); - g_sci->_gfxPalette->toggleRemapping(true); g_sci->_gfxPalette->resetRemapping(); g_sci->_gfxPalette->setRemappingPercent(254, percent); } @@ -1237,7 +1236,6 @@ reg_t kRemapColors(EngineState *s, int argc, reg_t *argv) { uint16 from = argv[1].toUint16(); uint16 to = argv[2].toUint16(); uint16 base = argv[3].toUint16(); - g_sci->_gfxPalette->toggleRemapping(true); g_sci->_gfxPalette->resetRemapping(); g_sci->_gfxPalette->setRemappingRange(254, from, to, base); } diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 7240308f4a..3d2c2af81b 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -741,7 +741,6 @@ reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { int16 base = (argc >= 2) ? argv[1].toSint16() : 0; if (base > 0) warning("kRemapColors(0) called with base %d", base); - g_sci->_gfxPalette->toggleRemapping(false); g_sci->_gfxPalette->resetRemapping(); } break; @@ -753,7 +752,6 @@ reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { uint16 unk5 = (argc >= 6) ? argv[5].toUint16() : 0; if (unk5 > 0) warning("kRemapColors(1) called with 6 parameters, unknown parameter is %d", unk5); - g_sci->_gfxPalette->toggleRemapping(true); g_sci->_gfxPalette->setRemappingRange(color, from, to, base); } break; @@ -762,7 +760,6 @@ reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { uint16 percent = argv[2].toUint16(); // 0 - 100 if (argc >= 4) warning("RemapByPercent called with 4 parameters, unknown parameter is %d", argv[3].toUint16()); - g_sci->_gfxPalette->toggleRemapping(true); g_sci->_gfxPalette->setRemappingPercent(color, percent); } break; diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index b5154ef860..5a551bab2c 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -337,6 +337,7 @@ bool GfxPalette::isRemapMask(byte color) { } void GfxPalette::resetRemapping() { + _remapOn = false; _remappingMaskFrom = 0; _remappingMaskTo = 0; _remappingPercentToSet = 0; @@ -347,6 +348,8 @@ void GfxPalette::resetRemapping() { } void GfxPalette::setRemappingPercent(byte color, byte percent) { + _remapOn = true; + // We need to defer the setup of the remapping table until something is // shown on screen, otherwise kernelFindColor() won't find correct // colors. The actual setup of the remapping table will be performed in @@ -360,6 +363,8 @@ void GfxPalette::setRemappingPercent(byte color, byte percent) { } void GfxPalette::setRemappingRange(byte color, byte from, byte to, byte base) { + _remapOn = true; + for (int i = from; i <= to; i++) { _remappingTable[i] = i + base; } diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h index 372f3c7090..134ade5e36 100644 --- a/engines/sci/graphics/palette.h +++ b/engines/sci/graphics/palette.h @@ -53,7 +53,6 @@ public: void getSys(Palette *pal); uint16 getTotalColorCount() const { return _totalScreenColors; } - void toggleRemapping(bool remap) { _remapOn = remap; } void resetRemapping(); void setRemappingPercent(byte color, byte percent); void setRemappingRange(byte color, byte from, byte to, byte base); -- cgit v1.2.3 From 37b209dac14bea6b8f08c3ee3f66e3d5772652bb Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 24 Jul 2012 22:55:34 +0300 Subject: SCI: Refresh remapping by percent whenever the screen palette changes --- engines/sci/graphics/palette.cpp | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index 5a551bab2c..cb5c0fe614 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -350,10 +350,10 @@ void GfxPalette::resetRemapping() { void GfxPalette::setRemappingPercent(byte color, byte percent) { _remapOn = true; - // We need to defer the setup of the remapping table until something is - // shown on screen, otherwise kernelFindColor() won't find correct + // We need to defer the setup of the remapping table every time the screen + // palette is changed, so that kernelFindColor() can find the correct // colors. The actual setup of the remapping table will be performed in - // remapColor(). + // copySysPaletteToScreen(). _remappingPercentToSet = percent; if (_remappingMaskFrom > color || _remappingMaskFrom == 0) @@ -377,21 +377,6 @@ void GfxPalette::setRemappingRange(byte color, byte from, byte to, byte base) { byte GfxPalette::remapColor(byte color) { assert(_remapOn); - - // Check if we need to set remapping by percent. This can only be - // performed when something is shown on screen, so that the screen - // palette is set up and kernelFindColor() can work correctly. - if (_remappingPercentToSet) { - for (int i = 0; i < 256; i++) { - byte r = _sysPalette.colors[i].r * _remappingPercentToSet / 100; - byte g = _sysPalette.colors[i].g * _remappingPercentToSet / 100; - byte b = _sysPalette.colors[i].b * _remappingPercentToSet / 100; - _remappingTable[i] = kernelFindColor(r, g, b); - } - - _remappingPercentToSet = 0; - } - return _remappingTable[color]; } @@ -557,6 +542,16 @@ void GfxPalette::copySysPaletteToScreen() { } } + // Check if we need to reset remapping by percent with the new colors. + if (_remappingPercentToSet) { + for (int i = 0; i < 256; i++) { + byte r = _sysPalette.colors[i].r * _remappingPercentToSet / 100; + byte g = _sysPalette.colors[i].g * _remappingPercentToSet / 100; + byte b = _sysPalette.colors[i].b * _remappingPercentToSet / 100; + _remappingTable[i] = kernelFindColor(r, g, b); + } + } + g_system->getPaletteManager()->setPalette(bpal, 0, 256); } -- cgit v1.2.3 From 90eb773c5d862d38f3dc834d51c5a57319c61c3f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 13 Jul 2012 17:17:58 +0200 Subject: GUI: Implement saving in the grid based save/load chooser. --- gui/ThemeEngine.h | 2 +- gui/saveload-dialog.cpp | 179 ++++++++++++++++++--- gui/saveload-dialog.h | 32 +++- gui/saveload.cpp | 4 +- gui/themes/default.inc | 40 +++++ gui/themes/scummclassic.zip | Bin 94215 -> 95181 bytes gui/themes/scummclassic/THEMERC | 2 +- gui/themes/scummclassic/classic_layout.stx | 21 +++ gui/themes/scummclassic/classic_layout_lowres.stx | 20 +++ gui/themes/scummmodern.zip | Bin 1452523 -> 1453476 bytes gui/themes/scummmodern/THEMERC | 2 +- gui/themes/scummmodern/scummmodern_layout.stx | 21 +++ .../scummmodern/scummmodern_layout_lowres.stx | 20 +++ gui/widget.cpp | 2 +- 14 files changed, 318 insertions(+), 27 deletions(-) diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index de4a92be16..6fb93d3b46 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -35,7 +35,7 @@ #include "graphics/pixelformat.h" -#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.15" +#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.16" class OSystem; diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index cf97737a1b..8f61d038e5 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -26,14 +26,15 @@ #include "gui/message.h" #include "gui/gui-manager.h" #include "gui/ThemeEval.h" +#include "gui/widgets/edittext.h" #include "graphics/scaler.h" namespace GUI { -SaveLoadChooserType getRequestedSaveLoadDialog(const bool saveMode, const MetaEngine &metaEngine) { +SaveLoadChooserType getRequestedSaveLoadDialog(const MetaEngine &metaEngine) { const Common::String &userConfig = ConfMan.get("gui_saveload_chooser", Common::ConfigManager::kApplicationDomain); - if (!saveMode && g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400 + if (g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400 && metaEngine.hasFeature(MetaEngine::kSavesSupportMetaInfo) && metaEngine.hasFeature(MetaEngine::kSavesSupportThumbnail) && userConfig.equalsIgnoreCase("grid")) { @@ -124,7 +125,7 @@ void SaveLoadChooserDialog::addChooserButtons() { _listButton = createSwitchButton("SaveLoadChooser.ListSwitch", "L", _("List view"), ThemeEngine::kImageList, kListSwitchCmd); _gridButton = createSwitchButton("SaveLoadChooser.GridSwitch", "G", _("Grid view"), ThemeEngine::kImageGrid, kGridSwitchCmd); - if (!_metaInfoSupport || !_thumbnailSupport || _saveMode || !(g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400)) + if (!_metaInfoSupport || !_thumbnailSupport || !(g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400)) _gridButton->setEnabled(false); } @@ -132,7 +133,7 @@ void SaveLoadChooserDialog::reflowLayout() { addChooserButtons(); const SaveLoadChooserType currentType = getType(); - const SaveLoadChooserType requestedType = getRequestedSaveLoadDialog(_saveMode, *_metaEngine); + const SaveLoadChooserType requestedType = getRequestedSaveLoadDialog(*_metaEngine); // Change the dialog type if there is any need for it. if (requestedType != currentType) { @@ -479,12 +480,13 @@ void SaveLoadChooserSimple::updateSaveList() { enum { kNextCmd = 'NEXT', - kPrevCmd = 'PREV' + kPrevCmd = 'PREV', + kNewSaveCmd = 'SAVE' }; -LoadChooserThumbnailed::LoadChooserThumbnailed(const Common::String &title) - : SaveLoadChooserDialog("SaveLoadChooser", false), _lines(0), _columns(0), _entriesPerPage(0), - _curPage(0), _buttons() { +LoadChooserThumbnailed::LoadChooserThumbnailed(const Common::String &title, bool saveMode) + : SaveLoadChooserDialog("SaveLoadChooser", saveMode), _lines(0), _columns(0), _entriesPerPage(0), + _curPage(0), _newSaveContainer(0), _nextFreeSaveSlot(0), _buttons() { _backgroundType = ThemeEngine::kDialogBackgroundSpecial; new StaticTextWidget(this, "SaveLoadChooser.Title", title); @@ -508,14 +510,18 @@ LoadChooserThumbnailed::~LoadChooserThumbnailed() { } const Common::String &LoadChooserThumbnailed::getResultString() const { - // FIXME: This chooser is only for loading, thus the result is never used - // anyway. But this is still an ugly hack. - return _target; + return _resultString; } void LoadChooserThumbnailed::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { if (cmd <= _entriesPerPage) { - setResult(_saveList[cmd - 1 + _curPage * _entriesPerPage].getSaveSlot()); + const SaveStateDescriptor &desc = _saveList[cmd - 1 + _curPage * _entriesPerPage]; + + if (_saveMode) { + _resultString = desc.getDescription(); + } + + setResult(desc.getSaveSlot()); close(); } @@ -532,6 +538,11 @@ void LoadChooserThumbnailed::handleCommand(GUI::CommandSender *sender, uint32 cm draw(); break; + case kNewSaveCmd: + setResult(_nextFreeSaveSlot); + close(); + break; + case kCloseCmd: setResult(-1); default: @@ -560,6 +571,30 @@ void LoadChooserThumbnailed::open() { _curPage = 0; _saveList = _metaEngine->listSaves(_target.c_str()); + _resultString.clear(); + + // Determine the next free save slot for save mode + if (_saveMode) { + int lastSlot = -1; + _nextFreeSaveSlot = -1; + for (SaveStateList::const_iterator x = _saveList.begin(); x != _saveList.end(); ++x) { + const int curSlot = x->getSaveSlot(); + + // In case there was a gap found use the slot. + if (lastSlot + 1 < curSlot) { + _nextFreeSaveSlot = lastSlot + 1; + break; + } + + lastSlot = curSlot; + } + + // Use the next available slot otherwise. + if (_nextFreeSaveSlot == -1 && lastSlot + 1 < _metaEngine->getMaximumSaveSlot()) { + _nextFreeSaveSlot = lastSlot + 1; + } + } + updateSaves(); } @@ -596,9 +631,20 @@ void LoadChooserThumbnailed::reflowLayout() { _columns = MAX(1, availableWidth / slotAreaWidth); _lines = MAX(1, availableHeight / slotAreaHeight); _entriesPerPage = _columns * _lines; + + // In save mode the first button is always "New Save", thus we need to + // adjust the entries per page here. + if (_saveMode) { + --_entriesPerPage; + } + // Recalculate the page number if (!_saveList.empty() && oldEntriesPerPage != 0) { - _curPage = (_curPage * oldEntriesPerPage) / _entriesPerPage; + if (_entriesPerPage != 0) { + _curPage = (_curPage * oldEntriesPerPage) / _entriesPerPage; + } else { + _curPage = 0; + } } const uint addX = _columns > 1 ? (availableWidth % slotAreaWidth) / (_columns - 1) : 0; @@ -608,13 +654,32 @@ void LoadChooserThumbnailed::reflowLayout() { y += defaultSpacingVertical / 2; for (uint curLine = 0; curLine < _lines; ++curLine, y += slotAreaHeight/* + addY*/) { for (uint curColumn = 0, curX = x + defaultSpacingHorizontal / 2; curColumn < _columns; ++curColumn, curX += slotAreaWidth + addX) { - ContainerWidget *container = new ContainerWidget(this, curX, y, containerWidth, containerHeight); - container->setVisible(false); - int dstY = containerFrameHeightAdd / 2; int dstX = containerFrameWidthAdd / 2; - PicButtonWidget *button = new PicButtonWidget(container, dstX, dstY, buttonWidth, buttonHeight, 0, curLine * _columns + curColumn + 1); + // In the save mode we will always create a new save button as the first button. + if (_saveMode && curLine == 0 && curColumn == 0) { + _newSaveContainer = new ContainerWidget(this, curX, y, containerWidth, containerHeight); + ButtonWidget *newSave = new ButtonWidget(_newSaveContainer, dstX, dstY, buttonWidth, buttonHeight, _("New Save"), _("Create a new save game"), kNewSaveCmd); + // In case no more slots are free, we will disable the new save button + if (_nextFreeSaveSlot == -1) { + newSave->setEnabled(false); + } + continue; + } + + ContainerWidget *container = new ContainerWidget(this, curX, y, containerWidth, containerHeight); + container->setVisible(false); + + // Command 0 cannot be used, since it won't be send. Thus we will adjust + // command number here, if required. This is only the case for load mode + // since for save mode, the first button used is index 1 anyway. + uint buttonCmd = curLine * _columns + curColumn; + if (!_saveMode) { + buttonCmd += 1; + } + + PicButtonWidget *button = new PicButtonWidget(container, dstX, dstY, buttonWidth, buttonHeight, 0, buttonCmd); dstY += buttonHeight; StaticTextWidget *description = new StaticTextWidget(container, dstX, dstY, buttonWidth, kLineHeight, Common::String(), Graphics::kTextAlignLeft); @@ -633,10 +698,41 @@ void LoadChooserThumbnailed::close() { } int LoadChooserThumbnailed::runIntern() { - return SaveLoadChooserDialog::runModal(); + int slot; + do { + const SaveLoadChooserType currentType = getType(); + const SaveLoadChooserType requestedType = getRequestedSaveLoadDialog(*_metaEngine); + + // Catch resolution changes when the save name dialog was open. + if (currentType != requestedType) { + setResult(kSwitchSaveLoadDialog); + return kSwitchSaveLoadDialog; + } + + slot = runModal(); + } while (_saveMode && slot >= 0 && !selectDescription()); + + return slot; +} + +bool LoadChooserThumbnailed::selectDescription() { + _savenameDialog.setDescription(_resultString); + _savenameDialog.setTargetSlot(getResult()); + if (_savenameDialog.runModal() == 0) { + _resultString = _savenameDialog.getDescription(); + return true; + } else { + return false; + } } void LoadChooserThumbnailed::destroyButtons() { + if (_newSaveContainer) { + removeWidget(_newSaveContainer); + delete _newSaveContainer; + _newSaveContainer = 0; + } + for (ButtonArray::iterator i = _buttons.begin(), end = _buttons.end(); i != end; ++i) { removeWidget(i->container); delete i->container; @@ -696,9 +792,17 @@ void LoadChooserThumbnailed::updateSaves() { } curButton.button->setTooltip(tooltip); + + // In save mode we disable the button, when it's write protected. + // TODO: Maybe we should not display it at all then? + if (_saveMode && desc.getWriteProtectedFlag()) { + curButton.button->setEnabled(false); + } else { + curButton.button->setEnabled(true); + } } - const uint numPages = _saveList.size() / _entriesPerPage + 1; + const uint numPages = (_entriesPerPage != 0) ? (_saveList.size() / _entriesPerPage + 1) : 1; _pageDisplay->setLabel(Common::String::format("%u/%u", _curPage + 1, numPages)); if (_curPage > 0) @@ -712,4 +816,41 @@ void LoadChooserThumbnailed::updateSaves() { _nextButton->setEnabled(false); } +SavenameDialog::SavenameDialog() + : Dialog("SavenameDialog") { + _title = new StaticTextWidget(this, "SavenameDialog.DescriptionText", Common::String()); + + new ButtonWidget(this, "SavenameDialog.Cancel", _("Cancel"), 0, kCloseCmd); + new ButtonWidget(this, "SavenameDialog.Ok", _("Ok"), 0, kOKCmd); + + _description = new EditTextWidget(this, "SavenameDialog.Description", Common::String(), 0, 0, kOKCmd); +} + +void SavenameDialog::setDescription(const Common::String &desc) { + _description->setEditString(desc); +} + +const Common::String &SavenameDialog::getDescription() { + return _description->getEditString(); +} + +void SavenameDialog::open() { + Dialog::open(); + setResult(-1); + + _title->setLabel(Common::String::format(_("Enter a description for slot %d:"), _targetSlot)); +} + +void SavenameDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { + switch (cmd) { + case kOKCmd: + setResult(0); + close(); + break; + + default: + Dialog::handleCommand(sender, cmd, data); + } +} + } // End of namespace GUI diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h index a604773142..46799ad853 100644 --- a/gui/saveload-dialog.h +++ b/gui/saveload-dialog.h @@ -36,7 +36,7 @@ enum SaveLoadChooserType { kSaveLoadDialogGrid = 1 }; -SaveLoadChooserType getRequestedSaveLoadDialog(const bool saveMode, const MetaEngine &metaEngine); +SaveLoadChooserType getRequestedSaveLoadDialog(const MetaEngine &metaEngine); class SaveLoadChooserDialog : protected Dialog { public: @@ -109,9 +109,30 @@ private: void updateSelection(bool redraw); }; + +class EditTextWidget; + +class SavenameDialog : public Dialog { +public: + SavenameDialog(); + + void setDescription(const Common::String &desc); + const Common::String &getDescription(); + + void setTargetSlot(int slot) { _targetSlot = slot; } + + virtual void open(); +protected: + virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); +private: + int _targetSlot; + StaticTextWidget *_title; + EditTextWidget *_description; +}; + class LoadChooserThumbnailed : public SaveLoadChooserDialog { public: - LoadChooserThumbnailed(const Common::String &title); + LoadChooserThumbnailed(const Common::String &title, bool saveMode); ~LoadChooserThumbnailed(); virtual const Common::String &getResultString() const; @@ -139,6 +160,13 @@ private: GUI::StaticTextWidget *_pageDisplay; + ContainerWidget *_newSaveContainer; + int _nextFreeSaveSlot; + Common::String _resultString; + + SavenameDialog _savenameDialog; + bool selectDescription(); + struct SlotButton { SlotButton() : container(0), button(0), description(0) {} SlotButton(ContainerWidget *c, PicButtonWidget *b, StaticTextWidget *d) : container(c), button(b), description(d) {} diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 12e62122fe..1eceff79cd 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -40,14 +40,14 @@ SaveLoadChooser::~SaveLoadChooser() { } void SaveLoadChooser::selectChooser(const MetaEngine &engine) { - const SaveLoadChooserType requestedType = getRequestedSaveLoadDialog(_saveMode, engine); + const SaveLoadChooserType requestedType = getRequestedSaveLoadDialog(engine); if (!_impl || _impl->getType() != requestedType) { delete _impl; _impl = 0; switch (requestedType) { case kSaveLoadDialogGrid: - _impl = new LoadChooserThumbnailed(_title); + _impl = new LoadChooserThumbnailed(_title, _saveMode); break; case kSaveLoadDialogList: diff --git a/gui/themes/default.inc b/gui/themes/default.inc index dc8d5c1a0e..bfd78db3ae 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -1386,6 +1386,26 @@ "
" "
" "
" +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " " " " " " " " " " " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " " " " " " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = 0 && x < _w && y >= 0 && y < _h) { - sendCommand(_cmd, 0); startAnimatePressedState(); + sendCommand(_cmd, 0); } } -- cgit v1.2.3 From 89b638128ff0482a01cfd3d058d87aa95faf58c3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 24 Jul 2012 23:24:17 +0200 Subject: GUI: Rename LoadChooserThumbnailed to SaveLoadChooserGrid. --- gui/saveload-dialog.cpp | 28 ++++++++++++++-------------- gui/saveload-dialog.h | 6 +++--- gui/saveload.cpp | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 8f61d038e5..2ceace2c8a 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -476,7 +476,7 @@ void SaveLoadChooserSimple::updateSaveList() { _list->setList(saveNames, &colors); } -// LoadChooserThumbnailed implementation +// SaveLoadChooserGrid implementation enum { kNextCmd = 'NEXT', @@ -484,7 +484,7 @@ enum { kNewSaveCmd = 'SAVE' }; -LoadChooserThumbnailed::LoadChooserThumbnailed(const Common::String &title, bool saveMode) +SaveLoadChooserGrid::SaveLoadChooserGrid(const Common::String &title, bool saveMode) : SaveLoadChooserDialog("SaveLoadChooser", saveMode), _lines(0), _columns(0), _entriesPerPage(0), _curPage(0), _newSaveContainer(0), _nextFreeSaveSlot(0), _buttons() { _backgroundType = ThemeEngine::kDialogBackgroundSpecial; @@ -504,16 +504,16 @@ LoadChooserThumbnailed::LoadChooserThumbnailed(const Common::String &title, bool _pageDisplay->setAlign(Graphics::kTextAlignRight); } -LoadChooserThumbnailed::~LoadChooserThumbnailed() { +SaveLoadChooserGrid::~SaveLoadChooserGrid() { removeWidget(_pageDisplay); delete _pageDisplay; } -const Common::String &LoadChooserThumbnailed::getResultString() const { +const Common::String &SaveLoadChooserGrid::getResultString() const { return _resultString; } -void LoadChooserThumbnailed::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { +void SaveLoadChooserGrid::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { if (cmd <= _entriesPerPage) { const SaveStateDescriptor &desc = _saveList[cmd - 1 + _curPage * _entriesPerPage]; @@ -550,7 +550,7 @@ void LoadChooserThumbnailed::handleCommand(GUI::CommandSender *sender, uint32 cm } } -void LoadChooserThumbnailed::handleMouseWheel(int x, int y, int direction) { +void SaveLoadChooserGrid::handleMouseWheel(int x, int y, int direction) { if (direction > 0) { if (_nextButton->isEnabled()) { ++_curPage; @@ -566,7 +566,7 @@ void LoadChooserThumbnailed::handleMouseWheel(int x, int y, int direction) { } } -void LoadChooserThumbnailed::open() { +void SaveLoadChooserGrid::open() { SaveLoadChooserDialog::open(); _curPage = 0; @@ -598,7 +598,7 @@ void LoadChooserThumbnailed::open() { updateSaves(); } -void LoadChooserThumbnailed::reflowLayout() { +void SaveLoadChooserGrid::reflowLayout() { removeWidget(_pageDisplay); if (g_gui.xmlEval()->getVar("Globals.ShowChooserPageDisplay") == 1) { _pageDisplay->init(); @@ -692,12 +692,12 @@ void LoadChooserThumbnailed::reflowLayout() { updateSaves(); } -void LoadChooserThumbnailed::close() { +void SaveLoadChooserGrid::close() { SaveLoadChooserDialog::close(); hideButtons(); } -int LoadChooserThumbnailed::runIntern() { +int SaveLoadChooserGrid::runIntern() { int slot; do { const SaveLoadChooserType currentType = getType(); @@ -715,7 +715,7 @@ int LoadChooserThumbnailed::runIntern() { return slot; } -bool LoadChooserThumbnailed::selectDescription() { +bool SaveLoadChooserGrid::selectDescription() { _savenameDialog.setDescription(_resultString); _savenameDialog.setTargetSlot(getResult()); if (_savenameDialog.runModal() == 0) { @@ -726,7 +726,7 @@ bool LoadChooserThumbnailed::selectDescription() { } } -void LoadChooserThumbnailed::destroyButtons() { +void SaveLoadChooserGrid::destroyButtons() { if (_newSaveContainer) { removeWidget(_newSaveContainer); delete _newSaveContainer; @@ -741,7 +741,7 @@ void LoadChooserThumbnailed::destroyButtons() { _buttons.clear(); } -void LoadChooserThumbnailed::hideButtons() { +void SaveLoadChooserGrid::hideButtons() { for (ButtonArray::iterator i = _buttons.begin(), end = _buttons.end(); i != end; ++i) { i->button->setGfx(0); i->setVisible(false); @@ -749,7 +749,7 @@ void LoadChooserThumbnailed::hideButtons() { } -void LoadChooserThumbnailed::updateSaves() { +void SaveLoadChooserGrid::updateSaves() { hideButtons(); for (uint i = _curPage * _entriesPerPage, curNum = 0; i < _saveList.size() && curNum < _entriesPerPage; ++i, ++curNum) { diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h index 46799ad853..351d0f682f 100644 --- a/gui/saveload-dialog.h +++ b/gui/saveload-dialog.h @@ -130,10 +130,10 @@ private: EditTextWidget *_description; }; -class LoadChooserThumbnailed : public SaveLoadChooserDialog { +class SaveLoadChooserGrid : public SaveLoadChooserDialog { public: - LoadChooserThumbnailed(const Common::String &title, bool saveMode); - ~LoadChooserThumbnailed(); + SaveLoadChooserGrid(const Common::String &title, bool saveMode); + ~SaveLoadChooserGrid(); virtual const Common::String &getResultString() const; diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 1eceff79cd..0650be388c 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -47,7 +47,7 @@ void SaveLoadChooser::selectChooser(const MetaEngine &engine) { switch (requestedType) { case kSaveLoadDialogGrid: - _impl = new LoadChooserThumbnailed(_title, _saveMode); + _impl = new SaveLoadChooserGrid(_title, _saveMode); break; case kSaveLoadDialogList: -- cgit v1.2.3 From 91196e53750f328b30703ffd09cbf3f5e877dc8e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 24 Jul 2012 23:25:10 +0200 Subject: GUI: Also disable the switch-to-list button in the choosers, when the grid one isn't available. --- gui/saveload-dialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 2ceace2c8a..159e9617ad 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -125,8 +125,10 @@ void SaveLoadChooserDialog::addChooserButtons() { _listButton = createSwitchButton("SaveLoadChooser.ListSwitch", "L", _("List view"), ThemeEngine::kImageList, kListSwitchCmd); _gridButton = createSwitchButton("SaveLoadChooser.GridSwitch", "G", _("Grid view"), ThemeEngine::kImageGrid, kGridSwitchCmd); - if (!_metaInfoSupport || !_thumbnailSupport || !(g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400)) + if (!_metaInfoSupport || !_thumbnailSupport || !(g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400)) { _gridButton->setEnabled(false); + _listButton->setEnabled(false); + } } void SaveLoadChooserDialog::reflowLayout() { -- cgit v1.2.3 From 8e791896b80009dc779770d8761abc89755fee93 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 24 Jul 2012 23:26:47 +0200 Subject: GUI: Remove an unnecessary empty line. --- gui/saveload-dialog.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 159e9617ad..f81fdc210c 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -748,7 +748,6 @@ void SaveLoadChooserGrid::hideButtons() { i->button->setGfx(0); i->setVisible(false); } - } void SaveLoadChooserGrid::updateSaves() { -- cgit v1.2.3 From bab992ab98dba252e6106161502ec2b945540ea1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 24 Jul 2012 23:27:59 +0200 Subject: GUI: Remove unecessary explicit GUI namespace uses. --- gui/saveload-dialog.cpp | 40 ++++++++++++++++++++-------------------- gui/saveload-dialog.h | 36 ++++++++++++++++++------------------ 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index f81fdc210c..9f7664b809 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -87,7 +87,7 @@ int SaveLoadChooserDialog::run(const Common::String &target, const MetaEngine *m return runIntern(); } -void SaveLoadChooserDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { +void SaveLoadChooserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kListSwitchCmd: setResult(kSwitchSaveLoadDialog); @@ -146,7 +146,7 @@ void SaveLoadChooserDialog::reflowLayout() { Dialog::reflowLayout(); } -GUI::ButtonWidget *SaveLoadChooserDialog::createSwitchButton(const Common::String &name, const char *desc, const char *tooltip, const char *image, uint32 cmd) { +ButtonWidget *SaveLoadChooserDialog::createSwitchButton(const Common::String &name, const char *desc, const char *tooltip, const char *image, uint32 cmd) { ButtonWidget *button; #ifndef DISABLE_FANCY_THEMES @@ -175,28 +175,28 @@ SaveLoadChooserSimple::SaveLoadChooserSimple(const String &title, const String & new StaticTextWidget(this, "SaveLoadChooser.Title", title); // Add choice list - _list = new GUI::ListWidget(this, "SaveLoadChooser.List"); - _list->setNumberingMode(GUI::kListNumberingZero); + _list = new ListWidget(this, "SaveLoadChooser.List"); + _list->setNumberingMode(kListNumberingZero); _list->setEditable(saveMode); - _gfxWidget = new GUI::GraphicsWidget(this, 0, 0, 10, 10); + _gfxWidget = new GraphicsWidget(this, 0, 0, 10, 10); _date = new StaticTextWidget(this, 0, 0, 10, 10, _("No date saved"), Graphics::kTextAlignCenter); _time = new StaticTextWidget(this, 0, 0, 10, 10, _("No time saved"), Graphics::kTextAlignCenter); _playtime = new StaticTextWidget(this, 0, 0, 10, 10, _("No playtime saved"), Graphics::kTextAlignCenter); // Buttons - new GUI::ButtonWidget(this, "SaveLoadChooser.Cancel", _("Cancel"), 0, kCloseCmd); - _chooseButton = new GUI::ButtonWidget(this, "SaveLoadChooser.Choose", buttonLabel, 0, kChooseCmd); + new ButtonWidget(this, "SaveLoadChooser.Cancel", _("Cancel"), 0, kCloseCmd); + _chooseButton = new ButtonWidget(this, "SaveLoadChooser.Choose", buttonLabel, 0, kChooseCmd); _chooseButton->setEnabled(false); - _deleteButton = new GUI::ButtonWidget(this, "SaveLoadChooser.Delete", _("Delete"), 0, kDelCmd); + _deleteButton = new ButtonWidget(this, "SaveLoadChooser.Delete", _("Delete"), 0, kDelCmd); _deleteButton->setEnabled(false); _delSupport = _metaInfoSupport = _thumbnailSupport = false; - _container = new GUI::ContainerWidget(this, 0, 0, 10, 10); -// _container->setHints(GUI::THEME_HINT_USE_SHADOW); + _container = new ContainerWidget(this, 0, 0, 10, 10); +// _container->setHints(THEME_HINT_USE_SHADOW); } int SaveLoadChooserSimple::runIntern() { @@ -219,8 +219,8 @@ void SaveLoadChooserSimple::handleCommand(CommandSender *sender, uint32 cmd, uin int selItem = _list->getSelected(); switch (cmd) { - case GUI::kListItemActivatedCmd: - case GUI::kListItemDoubleClickedCmd: + case kListItemActivatedCmd: + case kListItemDoubleClickedCmd: if (selItem >= 0 && _chooseButton->isEnabled()) { if (_list->isEditable() || !_list->getSelectedString().empty()) { _list->endEditMode(); @@ -240,14 +240,14 @@ void SaveLoadChooserSimple::handleCommand(CommandSender *sender, uint32 cmd, uin } close(); break; - case GUI::kListSelectionChangedCmd: + case kListSelectionChangedCmd: updateSelection(true); break; case kDelCmd: if (selItem >= 0 && _delSupport) { MessageDialog alert(_("Do you really want to delete this savegame?"), _("Delete"), _("Cancel")); - if (alert.runModal() == GUI::kMessageOK) { + if (alert.runModal() == kMessageOK) { _metaEngine->removeSaveState(_target.c_str(), _saveList[selItem].getSaveSlot()); setResult(-1); @@ -494,15 +494,15 @@ SaveLoadChooserGrid::SaveLoadChooserGrid(const Common::String &title, bool saveM new StaticTextWidget(this, "SaveLoadChooser.Title", title); // Buttons - new GUI::ButtonWidget(this, "SaveLoadChooser.Delete", _("Cancel"), 0, kCloseCmd); - _nextButton = new GUI::ButtonWidget(this, "SaveLoadChooser.Choose", _("Next"), 0, kNextCmd); + new ButtonWidget(this, "SaveLoadChooser.Delete", _("Cancel"), 0, kCloseCmd); + _nextButton = new ButtonWidget(this, "SaveLoadChooser.Choose", _("Next"), 0, kNextCmd); _nextButton->setEnabled(false); - _prevButton = new GUI::ButtonWidget(this, "SaveLoadChooser.Cancel", _("Prev"), 0, kPrevCmd); + _prevButton = new ButtonWidget(this, "SaveLoadChooser.Cancel", _("Prev"), 0, kPrevCmd); _prevButton->setEnabled(false); // Page display - _pageDisplay = new GUI::StaticTextWidget(this, "SaveLoadChooser.PageDisplay", Common::String()); + _pageDisplay = new StaticTextWidget(this, "SaveLoadChooser.PageDisplay", Common::String()); _pageDisplay->setAlign(Graphics::kTextAlignRight); } @@ -515,7 +515,7 @@ const Common::String &SaveLoadChooserGrid::getResultString() const { return _resultString; } -void SaveLoadChooserGrid::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { +void SaveLoadChooserGrid::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { if (cmd <= _entriesPerPage) { const SaveStateDescriptor &desc = _saveList[cmd - 1 + _curPage * _entriesPerPage]; @@ -842,7 +842,7 @@ void SavenameDialog::open() { _title->setLabel(Common::String::format(_("Enter a description for slot %d:"), _targetSlot)); } -void SavenameDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { +void SavenameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kOKCmd: setResult(0); diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h index 351d0f682f..05c0715fe0 100644 --- a/gui/saveload-dialog.h +++ b/gui/saveload-dialog.h @@ -47,7 +47,7 @@ public: virtual void reflowLayout(); - virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); + virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); virtual SaveLoadChooserType getType() const = 0; @@ -66,11 +66,11 @@ protected: bool _playTimeSupport; Common::String _target; - GUI::ButtonWidget *_listButton; - GUI::ButtonWidget *_gridButton; + ButtonWidget *_listButton; + ButtonWidget *_gridButton; void addChooserButtons(); - GUI::ButtonWidget *createSwitchButton(const Common::String &name, const char *desc, const char *tooltip, const char *image, uint32 cmd = 0); + ButtonWidget *createSwitchButton(const Common::String &name, const char *desc, const char *tooltip, const char *image, uint32 cmd = 0); }; class SaveLoadChooserSimple : public SaveLoadChooserDialog { @@ -79,7 +79,7 @@ class SaveLoadChooserSimple : public SaveLoadChooserDialog { public: SaveLoadChooserSimple(const String &title, const String &buttonLabel, bool saveMode); - virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); + virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); virtual const Common::String &getResultString() const; @@ -91,14 +91,14 @@ public: private: virtual int runIntern(); - GUI::ListWidget *_list; - GUI::ButtonWidget *_chooseButton; - GUI::ButtonWidget *_deleteButton; - GUI::GraphicsWidget *_gfxWidget; - GUI::ContainerWidget *_container; - GUI::StaticTextWidget *_date; - GUI::StaticTextWidget *_time; - GUI::StaticTextWidget *_playtime; + ListWidget *_list; + ButtonWidget *_chooseButton; + ButtonWidget *_deleteButton; + GraphicsWidget *_gfxWidget; + ContainerWidget *_container; + StaticTextWidget *_date; + StaticTextWidget *_time; + StaticTextWidget *_playtime; SaveStateList _saveList; String _resultString; @@ -123,7 +123,7 @@ public: virtual void open(); protected: - virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); + virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); private: int _targetSlot; StaticTextWidget *_title; @@ -145,7 +145,7 @@ public: virtual void close(); protected: - virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); + virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); virtual void handleMouseWheel(int x, int y, int direction); private: virtual int runIntern(); @@ -155,10 +155,10 @@ private: uint _curPage; SaveStateList _saveList; - GUI::ButtonWidget *_nextButton; - GUI::ButtonWidget *_prevButton; + ButtonWidget *_nextButton; + ButtonWidget *_prevButton; - GUI::StaticTextWidget *_pageDisplay; + StaticTextWidget *_pageDisplay; ContainerWidget *_newSaveContainer; int _nextFreeSaveSlot; -- cgit v1.2.3 From f006eddac56fdf4305a3d63914245b8707210725 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 24 Jul 2012 23:32:17 +0200 Subject: GUI: Let SaveLoadChooser::getResultString return a const reference. --- gui/saveload.cpp | 8 +++----- gui/saveload.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 0650be388c..d6a8688ce3 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -103,11 +103,9 @@ int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, con return ret; } -Common::String SaveLoadChooser::getResultString() const { - if (_impl) - return _impl->getResultString(); - else - return Common::String(); +const Common::String &SaveLoadChooser::getResultString() const { + assert(_impl); + return _impl->getResultString(); } } // End of namespace GUI diff --git a/gui/saveload.h b/gui/saveload.h index 26a8cd1bad..17fd99a31d 100644 --- a/gui/saveload.h +++ b/gui/saveload.h @@ -52,7 +52,7 @@ public: int runModalWithCurrentTarget(); int runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target); - Common::String getResultString() const; + const Common::String &getResultString() const; /** * Creates a default save description for the specified slot. Depending -- cgit v1.2.3 From ca225cc7e0affd4bca287def475e34dabe251d8a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 24 Jul 2012 23:34:35 +0200 Subject: GUI: Strip a trailing whitespace. --- gui/saveload-dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 9f7664b809..f59d67e490 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -604,7 +604,7 @@ void SaveLoadChooserGrid::reflowLayout() { removeWidget(_pageDisplay); if (g_gui.xmlEval()->getVar("Globals.ShowChooserPageDisplay") == 1) { _pageDisplay->init(); - } + } SaveLoadChooserDialog::reflowLayout(); destroyButtons(); -- cgit v1.2.3 From 7d519074053ab0482c1d163a626a9554b52a8783 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 24 Jul 2012 23:46:54 +0200 Subject: GUI: Add possibility to disable the grid based chooser via DISABLE_SAVELOADCHOOSER_GRID. --- gui/saveload-dialog.cpp | 60 +++++++++++++++++++++++++++++++++---------------- gui/saveload-dialog.h | 19 ++++++++++++++++ gui/saveload.cpp | 7 +++++- 3 files changed, 66 insertions(+), 20 deletions(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index f59d67e490..3c793c9e25 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -32,6 +32,7 @@ namespace GUI { +#ifndef DISABLE_SAVELOADCHOOSER_GRID SaveLoadChooserType getRequestedSaveLoadDialog(const MetaEngine &metaEngine) { const Common::String &userConfig = ConfMan.get("gui_saveload_chooser", Common::ConfigManager::kApplicationDomain); if (g_gui.getWidth() >= 640 && g_gui.getHeight() >= 400 @@ -52,19 +53,30 @@ enum { kListSwitchCmd = 'LIST', kGridSwitchCmd = 'GRID' }; +#endif // !DISABLE_SAVELOADCHOOSER_GRID SaveLoadChooserDialog::SaveLoadChooserDialog(const Common::String &dialogName, const bool saveMode) : Dialog(dialogName), _metaEngine(0), _delSupport(false), _metaInfoSupport(false), - _thumbnailSupport(false), _saveDateSupport(false), _playTimeSupport(false), _saveMode(saveMode), - _listButton(0), _gridButton(0) { + _thumbnailSupport(false), _saveDateSupport(false), _playTimeSupport(false), _saveMode(saveMode) +#ifndef DISABLE_SAVELOADCHOOSER_GRID + , _listButton(0), _gridButton(0) +#endif // !DISABLE_SAVELOADCHOOSER_GRID + { +#ifndef DISABLE_SAVELOADCHOOSER_GRID addChooserButtons(); +#endif // !DISABLE_SAVELOADCHOOSER_GRID } SaveLoadChooserDialog::SaveLoadChooserDialog(int x, int y, int w, int h, const bool saveMode) : Dialog(x, y, w, h), _metaEngine(0), _delSupport(false), _metaInfoSupport(false), - _thumbnailSupport(false), _saveDateSupport(false), _playTimeSupport(false), _saveMode(saveMode), - _listButton(0), _gridButton(0) { + _thumbnailSupport(false), _saveDateSupport(false), _playTimeSupport(false), _saveMode(saveMode) +#ifndef DISABLE_SAVELOADCHOOSER_GRID + , _listButton(0), _gridButton(0) +#endif // !DISABLE_SAVELOADCHOOSER_GRID + { +#ifndef DISABLE_SAVELOADCHOOSER_GRID addChooserButtons(); +#endif // !DISABLE_SAVELOADCHOOSER_GRID } void SaveLoadChooserDialog::open() { @@ -88,6 +100,7 @@ int SaveLoadChooserDialog::run(const Common::String &target, const MetaEngine *m } void SaveLoadChooserDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { +#ifndef DISABLE_SAVELOADCHOOSER_GRID switch (cmd) { case kListSwitchCmd: setResult(kSwitchSaveLoadDialog); @@ -108,10 +121,29 @@ void SaveLoadChooserDialog::handleCommand(CommandSender *sender, uint32 cmd, uin default: break; } +#endif // !DISABLE_SAVELOADCHOOSER_GRID return Dialog::handleCommand(sender, cmd, data); } +void SaveLoadChooserDialog::reflowLayout() { +#ifndef DISABLE_SAVELOADCHOOSER_GRID + addChooserButtons(); + + const SaveLoadChooserType currentType = getType(); + const SaveLoadChooserType requestedType = getRequestedSaveLoadDialog(*_metaEngine); + + // Change the dialog type if there is any need for it. + if (requestedType != currentType) { + setResult(kSwitchSaveLoadDialog); + close(); + } +#endif // !DISABLE_SAVELOADCHOOSER_GRID + + Dialog::reflowLayout(); +} + +#ifndef DISABLE_SAVELOADCHOOSER_GRID void SaveLoadChooserDialog::addChooserButtons() { if (_listButton) { removeWidget(_listButton); @@ -131,21 +163,6 @@ void SaveLoadChooserDialog::addChooserButtons() { } } -void SaveLoadChooserDialog::reflowLayout() { - addChooserButtons(); - - const SaveLoadChooserType currentType = getType(); - const SaveLoadChooserType requestedType = getRequestedSaveLoadDialog(*_metaEngine); - - // Change the dialog type if there is any need for it. - if (requestedType != currentType) { - setResult(kSwitchSaveLoadDialog); - close(); - } - - Dialog::reflowLayout(); -} - ButtonWidget *SaveLoadChooserDialog::createSwitchButton(const Common::String &name, const char *desc, const char *tooltip, const char *image, uint32 cmd) { ButtonWidget *button; @@ -160,6 +177,7 @@ ButtonWidget *SaveLoadChooserDialog::createSwitchButton(const Common::String &na return button; } +#endif // !DISABLE_SAVELOADCHOOSER_GRID // SaveLoadChooserSimple implementation @@ -480,6 +498,8 @@ void SaveLoadChooserSimple::updateSaveList() { // SaveLoadChooserGrid implementation +#ifndef DISABLE_SAVELOADCHOOSER_GRID + enum { kNextCmd = 'NEXT', kPrevCmd = 'PREV', @@ -854,4 +874,6 @@ void SavenameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat } } +#endif // !DISABLE_SAVELOADCHOOSER_GRID + } // End of namespace GUI diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h index 05c0715fe0..50b7d419b7 100644 --- a/gui/saveload-dialog.h +++ b/gui/saveload-dialog.h @@ -31,12 +31,22 @@ namespace GUI { #define kSwitchSaveLoadDialog -2 +// TODO: We might want to disable the grid based save/load chooser for more +// platforms, than those which define DISABLE_FANCY_THEMES. But those are +// probably not able to handle the grid chooser anyway, so disabling it +// for them is a good start. +#ifdef DISABLE_FANCY_THEMES +#define DISABLE_SAVELOADCHOOSER_GRID +#endif // DISABLE_FANCY_THEMES + +#ifndef DISABLE_SAVELOADCHOOSER_GRID enum SaveLoadChooserType { kSaveLoadDialogList = 0, kSaveLoadDialogGrid = 1 }; SaveLoadChooserType getRequestedSaveLoadDialog(const MetaEngine &metaEngine); +#endif // !DISABLE_SAVELOADCHOOSER_GRID class SaveLoadChooserDialog : protected Dialog { public: @@ -49,7 +59,9 @@ public: virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); +#ifndef DISABLE_SAVELOADCHOOSER_GRID virtual SaveLoadChooserType getType() const = 0; +#endif // !DISABLE_SAVELOADCHOOSER_GRID int run(const Common::String &target, const MetaEngine *metaEngine); virtual const Common::String &getResultString() const = 0; @@ -66,11 +78,13 @@ protected: bool _playTimeSupport; Common::String _target; +#ifndef DISABLE_SAVELOADCHOOSER_GRID ButtonWidget *_listButton; ButtonWidget *_gridButton; void addChooserButtons(); ButtonWidget *createSwitchButton(const Common::String &name, const char *desc, const char *tooltip, const char *image, uint32 cmd = 0); +#endif // !DISABLE_SAVELOADCHOOSER_GRID }; class SaveLoadChooserSimple : public SaveLoadChooserDialog { @@ -85,7 +99,9 @@ public: virtual void reflowLayout(); +#ifndef DISABLE_SAVELOADCHOOSER_GRID virtual SaveLoadChooserType getType() const { return kSaveLoadDialogList; } +#endif // !DISABLE_SAVELOADCHOOSER_GRID virtual void close(); private: @@ -109,6 +125,7 @@ private: void updateSelection(bool redraw); }; +#ifndef DISABLE_SAVELOADCHOOSER_GRID class EditTextWidget; @@ -186,6 +203,8 @@ private: void updateSaves(); }; +#endif // !DISABLE_SAVELOADCHOOSER_GRID + } // End of namespace GUI #endif diff --git a/gui/saveload.cpp b/gui/saveload.cpp index d6a8688ce3..c2bbcd9bec 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -40,6 +40,7 @@ SaveLoadChooser::~SaveLoadChooser() { } void SaveLoadChooser::selectChooser(const MetaEngine &engine) { +#ifndef DISABLE_SAVELOADCHOOSER_GRID const SaveLoadChooserType requestedType = getRequestedSaveLoadDialog(engine); if (!_impl || _impl->getType() != requestedType) { delete _impl; @@ -51,10 +52,13 @@ void SaveLoadChooser::selectChooser(const MetaEngine &engine) { break; case kSaveLoadDialogList: +#endif // !DISABLE_SAVELOADCHOOSER_GRID _impl = new SaveLoadChooserSimple(_title, _buttonLabel, _saveMode); +#ifndef DISABLE_SAVELOADCHOOSER_GRID break; } } +#endif // !DISABLE_SAVELOADCHOOSER_GRID } Common::String SaveLoadChooser::createDefaultSaveDescription(const int slot) const { @@ -91,10 +95,11 @@ int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, con int ret; do { ret = _impl->run(target, &(**plugin)); - +#ifndef DISABLE_SAVELOADCHOOSER_GRID if (ret == kSwitchSaveLoadDialog) { selectChooser(**plugin); } +#endif // !DISABLE_SAVELOADCHOOSER_GRID } while (ret < -1); // Revert to the old active domain -- cgit v1.2.3 From 537b1969bf896ee4e72e9d042e4b7f41c921d38c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 25 Jul 2012 00:58:16 +0300 Subject: SCI: Rewrite the color remapping code to support simultaneous effects Fixes the torch in the full version of QFG4 --- engines/sci/graphics/palette.cpp | 43 ++++++++++++++++++++-------------------- engines/sci/graphics/palette.h | 17 ++++++++++++---- engines/sci/graphics/view.cpp | 8 ++++---- 3 files changed, 38 insertions(+), 30 deletions(-) diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index cb5c0fe614..9b8618c0ef 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -143,8 +143,9 @@ void GfxPalette::createFromData(byte *data, int bytesLeft, Palette *paletteOut) memset(paletteOut, 0, sizeof(Palette)); // Setup 1:1 mapping - for (colorNo = 0; colorNo < 256; colorNo++) + for (colorNo = 0; colorNo < 256; colorNo++) { paletteOut->mapping[colorNo] = colorNo; + } if (bytesLeft < 37) { // This happens when loading palette of picture 0 in sq5 - the resource is broken and doesn't contain a full @@ -332,18 +333,26 @@ void GfxPalette::set(Palette *newPalette, bool force, bool forceRealMerge) { } } -bool GfxPalette::isRemapMask(byte color) { - return (_remapOn && (color >= _remappingMaskFrom && color <= _remappingMaskTo)); +byte GfxPalette::remapColor(byte remappedColor, byte screenColor) { + assert(_remapOn); + if (_remappingType[remappedColor] == kRemappingByRange) + return _remappingByRange[screenColor]; + else if (_remappingType[remappedColor] == kRemappingByPercent) + return _remappingByPercent[screenColor]; + else + error("remapColor(): Color %d isn't remapped", remappedColor); + + return 0; // should never reach here } void GfxPalette::resetRemapping() { _remapOn = false; - _remappingMaskFrom = 0; - _remappingMaskTo = 0; _remappingPercentToSet = 0; for (int i = 0; i < 256; i++) { - _remappingTable[i] = i; + _remappingType[i] = kRemappingNone; + _remappingByPercent[i] = i; + _remappingByRange[i] = i; } } @@ -356,28 +365,17 @@ void GfxPalette::setRemappingPercent(byte color, byte percent) { // copySysPaletteToScreen(). _remappingPercentToSet = percent; - if (_remappingMaskFrom > color || _remappingMaskFrom == 0) - _remappingMaskFrom = color; - if (_remappingMaskTo < color) - _remappingMaskTo = color; + _remappingType[color] = kRemappingByPercent; } void GfxPalette::setRemappingRange(byte color, byte from, byte to, byte base) { _remapOn = true; for (int i = from; i <= to; i++) { - _remappingTable[i] = i + base; + _remappingByRange[i] = i + base; } - if (_remappingMaskFrom > color || _remappingMaskFrom == 0) - _remappingMaskFrom = color; - if (_remappingMaskTo < color) - _remappingMaskTo = color; -} - -byte GfxPalette::remapColor(byte color) { - assert(_remapOn); - return _remappingTable[color]; + _remappingType[color] = kRemappingByRange; } bool GfxPalette::insert(Palette *newPalette, Palette *destPalette) { @@ -548,7 +546,7 @@ void GfxPalette::copySysPaletteToScreen() { byte r = _sysPalette.colors[i].r * _remappingPercentToSet / 100; byte g = _sysPalette.colors[i].g * _remappingPercentToSet / 100; byte b = _sysPalette.colors[i].b * _remappingPercentToSet / 100; - _remappingTable[i] = kernelFindColor(r, g, b); + _remappingByPercent[i] = kernelFindColor(r, g, b); } } @@ -1060,8 +1058,9 @@ bool GfxPalette::loadClut(uint16 clutId) { memset(&pal, 0, sizeof(Palette)); // Setup 1:1 mapping - for (int i = 0; i < 256; i++) + for (int i = 0; i < 256; i++) { pal.mapping[i] = i; + } // Now load in the palette for (int i = 1; i <= 236; i++) { diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h index 134ade5e36..9898315897 100644 --- a/engines/sci/graphics/palette.h +++ b/engines/sci/graphics/palette.h @@ -31,6 +31,12 @@ namespace Sci { class ResourceManager; class GfxScreen; +enum ColorRemappingType { + kRemappingNone = 0, + kRemappingByRange = 1, + kRemappingByPercent = 2 +}; + /** * Palette class, handles palette operations like changing intensity, setting up the palette, merging different palettes */ @@ -56,8 +62,10 @@ public: void resetRemapping(); void setRemappingPercent(byte color, byte percent); void setRemappingRange(byte color, byte from, byte to, byte base); - bool isRemapMask(byte color); - byte remapColor(byte color); + bool isRemapped(byte color) const { + return _remapOn && (_remappingType[color] != kRemappingNone); + } + byte remapColor(byte remappedColor, byte screenColor); void setOnScreen(); void copySysPaletteToScreen(); @@ -130,8 +138,9 @@ private: uint16 _totalScreenColors; bool _remapOn; - byte _remappingTable[256]; - uint16 _remappingMaskFrom, _remappingMaskTo; + ColorRemappingType _remappingType[256]; + byte _remappingByPercent[256]; + byte _remappingByRange[256]; uint16 _remappingPercentToSet; void loadMacIconBarPalette(); diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp index f68ed1443a..36aaae9232 100644 --- a/engines/sci/graphics/view.cpp +++ b/engines/sci/graphics/view.cpp @@ -742,10 +742,10 @@ void GfxView::draw(const Common::Rect &rect, const Common::Rect &clipRect, const const int y2 = clipRectTranslated.top + y; if (!upscaledHires) { if (priority >= _screen->getPriority(x2, y2)) { - if (!_palette->isRemapMask(palette->mapping[color])) { + if (!_palette->isRemapped(palette->mapping[color])) { _screen->putPixel(x2, y2, drawMask, palette->mapping[color], priority, 0); } else { - byte remappedColor = _palette->remapColor(_screen->getVisual(x2, y2)); + byte remappedColor = _palette->remapColor(palette->mapping[color], _screen->getVisual(x2, y2)); _screen->putPixel(x2, y2, drawMask, remappedColor, priority, 0); } } @@ -857,10 +857,10 @@ void GfxView::drawScaled(const Common::Rect &rect, const Common::Rect &clipRect, const int x2 = clipRectTranslated.left + x; const int y2 = clipRectTranslated.top + y; if (color != clearKey && priority >= _screen->getPriority(x2, y2)) { - if (!_palette->isRemapMask(palette->mapping[color])) { + if (!_palette->isRemapped(palette->mapping[color])) { _screen->putPixel(x2, y2, drawMask, palette->mapping[color], priority, 0); } else { - byte remappedColor = _palette->remapColor(_screen->getVisual(x2, y2)); + byte remappedColor = _palette->remapColor(palette->mapping[color], _screen->getVisual(x2, y2)); _screen->putPixel(x2, y2, drawMask, remappedColor, priority, 0); } } -- cgit v1.2.3 From 797dbfe506d5273c0385997401aa32524995df33 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 25 Jul 2012 01:16:13 +0300 Subject: SCI: Set the RemapByPercent palette initially This needs to be performed because the screen palette might not change after the call. Fixes the display of the bat in the character selection screen in the full version of QFG4 --- engines/sci/graphics/palette.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index 9b8618c0ef..68104b0ac8 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -361,10 +361,17 @@ void GfxPalette::setRemappingPercent(byte color, byte percent) { // We need to defer the setup of the remapping table every time the screen // palette is changed, so that kernelFindColor() can find the correct - // colors. The actual setup of the remapping table will be performed in - // copySysPaletteToScreen(). + // colors. Set it once here, in case the palette stays the same and update + // it on each palette change by copySysPaletteToScreen(). _remappingPercentToSet = percent; + for (int i = 0; i < 256; i++) { + byte r = _sysPalette.colors[i].r * _remappingPercentToSet / 100; + byte g = _sysPalette.colors[i].g * _remappingPercentToSet / 100; + byte b = _sysPalette.colors[i].b * _remappingPercentToSet / 100; + _remappingByPercent[i] = kernelFindColor(r, g, b); + } + _remappingType[color] = kRemappingByPercent; } -- cgit v1.2.3 From 55e508b91f840cd4f6358d1a1ff192b16ab1338c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 25 Jul 2012 01:32:34 +0300 Subject: SCI: Add a workaround for QFG4, screen 140 (character selection screen) --- engines/sci/engine/kgraphics32.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 3d2c2af81b..d3db28226a 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -738,6 +738,12 @@ reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { switch (operation) { case 0: { // turn remapping off + // WORKAROUND: Game scripts in QFG4 erroneously turn remapping off in room + // 140 (the character point allocation screen) and never turn it back on, + // even if it's clearly used in that screen. + if (g_sci->getGameId() == GID_QFG4 && s->currentRoomNumber() == 140) + return s->r_acc; + int16 base = (argc >= 2) ? argv[1].toSint16() : 0; if (base > 0) warning("kRemapColors(0) called with base %d", base); -- cgit v1.2.3 From 6ade0e145717410cd1268b01f7820d6c851c4375 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 25 Jul 2012 02:29:57 +0300 Subject: SCI: Expand an uninitialized read workaround for SQ6 --- engines/sci/engine/workarounds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 15fca0322c..ccb78776dd 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -165,7 +165,7 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = { { GID_SQ4, -1, 928, -1, "Narrator", "startText", -1, 1000, { WORKAROUND_FAKE, 1 } }, // CD: happens in the options dialog and in-game when speech and subtitles are used simultaneously { GID_SQ5, 201, 201, 0, "buttonPanel", "doVerb", -1, 0, { WORKAROUND_FAKE, 1 } }, // when looking at the orange or red button - bug #3038563 { GID_SQ6, -1, 0, 0, "SQ6", "init", -1, 2, { WORKAROUND_FAKE, 0 } }, // Demo and full version: called when the game starts (demo: room 0, full: room 100) - { GID_SQ6, 100, 64950, 0, "View", "handleEvent", -1, 0, { WORKAROUND_FAKE, 0 } }, // called when pressing "Start game" in the main menu + { GID_SQ6, -1, 64950, -1, "Feature", "handleEvent", -1, 0, { WORKAROUND_FAKE, 0 } }, // called when pressing "Start game" in the main menu, when entering the Orion's Belt bar (room 300), and perhaps other places { GID_SQ6, -1, 64964, 0, "DPath", "init", -1, 1, { WORKAROUND_FAKE, 0 } }, // during the game { GID_TORIN, -1, 64017, 0, "oFlags", "clear", -1, 0, { WORKAROUND_FAKE, 0 } }, // entering Torin's home in the French version SCI_WORKAROUNDENTRY_TERMINATOR -- cgit v1.2.3 From 09f1519d6d369e7e59102b53cfb56a731bff99fb Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 25 Jul 2012 00:39:21 -0400 Subject: VIDEO: Stop and restart tracks when seeking/rewinding --- video/video_decoder.cpp | 32 ++++++++++++++++++++++++++------ video/video_decoder.h | 4 ++++ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 1461f5dc3d..355c94abb1 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -256,12 +256,18 @@ bool AdvancedVideoDecoder::rewind() { _needsRewind = false; - // TODO: Pause status + // Stop all tracks so they can be rewound + if (_isPlaying) + stopAllTracks(); for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) if (!(*it)->rewind()) return false; + // Now that we've rewound, start all tracks again + if (_isPlaying) + startAllTracks(); + _audioStartOffset = 0; _startTime = g_system->getMillis(); return true; @@ -284,12 +290,18 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) { _needsRewind = false; - // TODO: Pause status + // Stop all tracks so they can be seeked + if (_isPlaying) + stopAllTracks(); for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) if (!(*it)->seek(time)) return false; + // Now that we've seeked, start all tracks again + if (_isPlaying) + startAllTracks(); + _audioStartOffset = time; _startTime = g_system->getMillis() - time.msecs(); return true; @@ -307,8 +319,7 @@ void AdvancedVideoDecoder::start() { if (_needsRewind) rewind(); - for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) - (*it)->start(); + startAllTracks(); } void AdvancedVideoDecoder::stop() { @@ -321,8 +332,7 @@ void AdvancedVideoDecoder::stop() { _palette = 0; _dirtyPalette = false; - for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) - (*it)->stop(); + stopAllTracks(); // Also reset the pause state. _pauseLevel = 0; @@ -584,6 +594,16 @@ const AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack return bestTrack; } +void AdvancedVideoDecoder::startAllTracks() { + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + (*it)->start(); +} + +void AdvancedVideoDecoder::stopAllTracks() { + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + (*it)->stop(); +} + ////////////////////////////////////////////// ///////////////// DEPRECATED ///////////////// ////////////////////////////////////////////// diff --git a/video/video_decoder.h b/video/video_decoder.h index 616d6c4f96..c77fb44dfe 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -670,6 +670,10 @@ private: // Palette settings from individual tracks mutable bool _dirtyPalette; const byte *_palette; + + // Internal helper functions + void stopAllTracks(); + void startAllTracks(); }; /** -- cgit v1.2.3 From 714c6ae1195ac372998c3d5b6f3739725554bf85 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 25 Jul 2012 00:44:22 -0400 Subject: VIDEO: Add internal helper function for checking on video track end status --- video/video_decoder.cpp | 8 ++++++++ video/video_decoder.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 355c94abb1..80a208fda3 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -556,6 +556,14 @@ const AdvancedVideoDecoder::Track *AdvancedVideoDecoder::getTrack(uint track) co return _tracks[track]; } +bool AdvancedVideoDecoder::endOfVideoTracks() const { + for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) + if ((*it)->getTrackType() == Track::kTrackTypeVideo && !(*it)->endOfTrack()) + return false; + + return true; +} + AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack() { VideoTrack *bestTrack = 0; uint32 bestTime = 0xFFFFFFFF; diff --git a/video/video_decoder.h b/video/video_decoder.h index c77fb44dfe..0848ad09c7 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -656,6 +656,14 @@ protected: */ const Track *getTrack(uint track) const; + /** + * Find out if all video tracks have finished + * + * This is useful if one wants to figure out if they need to buffer all + * remaining audio in a file. + */ + bool endOfVideoTracks() const; + private: // Tracks owned by this AdvancedVideoDecoder typedef Common::Array TrackList; -- cgit v1.2.3 From e7836beabb47c5415c6239cc1e344450b7bb3c8d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 25 Jul 2012 12:13:35 +0300 Subject: SCI: Silence some very chatty warnings Also, add an example room where kRemapToGray is called --- engines/sci/engine/kgraphics32.cpp | 6 ++++-- engines/sci/engine/ksound.cpp | 11 +++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index d3db28226a..685b3c0bd3 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -369,7 +369,8 @@ reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv) { case 10: // Where, called by ScrollableWindow::where // TODO // argv[2] is an unknown integer - kStub(s, argc, argv); + // Silenced the warnings because of the high amount of console spam + //kStub(s, argc, argv); break; case 11: // Go, called by ScrollableWindow::scrollTo // 2 extra parameters here @@ -770,7 +771,8 @@ reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { } break; case 3: { // remap to gray - int16 color = argv[1].toSint16(); // this is subtracted from a maximum color value, and can be offset by 10 + // Example call: QFG4 room 490 (Baba Yaga's hut) - params are color 253, 75% and 0 + int16 color = argv[1].toSint16(); int16 percent = argv[2].toSint16(); // 0 - 100 uint16 unk3 = (argc >= 4) ? argv[3].toUint16() : 0; warning("kRemapColors: RemapToGray color %d by %d percent (unk3 = %d)", color, percent, unk3); diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp index b378b4d58b..0633267db4 100644 --- a/engines/sci/engine/ksound.cpp +++ b/engines/sci/engine/ksound.cpp @@ -140,12 +140,14 @@ reg_t kDoAudio(EngineState *s, int argc, reg_t *argv) { ((argv[3].toUint16() & 0xff) << 16) | ((argv[4].toUint16() & 0xff) << 8) | (argv[5].toUint16() & 0xff); - if (argc == 8) { + // Removed warning because of the high amount of console spam + /*if (argc == 8) { + // TODO: Handle the extra 2 SCI21 params // argv[6] is always 1 // argv[7] is the contents of global 229 (0xE5) warning("kDoAudio: Play called with SCI2.1 extra parameters: %04x:%04x and %04x:%04x", PRINT_REG(argv[6]), PRINT_REG(argv[7])); - } + }*/ } else { warning("kDoAudio: Play called with an unknown number of parameters (%d)", argc); return NULL_REG; @@ -244,6 +246,11 @@ reg_t kDoAudio(EngineState *s, int argc, reg_t *argv) { // Used in Pharkas whenever a speech sample starts (takes no params) //warning("kDoAudio: Unhandled case 13, %d extra arguments passed", argc - 1); break; + case 17: + // Seems to be some sort of audio sync, used in SQ6. Silenced the + // warning due to the high level of spam it produces. (takes no params) + //warning("kDoAudio: Unhandled case 17, %d extra arguments passed", argc - 1); + break; default: warning("kDoAudio: Unhandled case %d, %d extra arguments passed", argv[0].toUint16(), argc - 1); } -- cgit v1.2.3 From 31f9e96aeef546ab5d0bf829fe427ce98a62c40f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 25 Jul 2012 12:14:33 +0300 Subject: SCI: Add a workaround for a script bug in QFG4 --- engines/sci/engine/workarounds.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index ccb78776dd..821549bb8c 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -397,6 +397,7 @@ const SciWorkaroundEntry kUnLoad_workarounds[] = { { GID_LSL6, 740, 740, 0, "showCartoon", "changeState", -1, 0, { WORKAROUND_IGNORE, 0 } }, // during ending, 4 additional parameters are passed by accident { GID_LSL6HIRES, 130, 130, 0, "recruitLarryScr", "changeState", -1, 0, { WORKAROUND_IGNORE, 0 } }, // during intro, a 3rd parameter is passed by accident { GID_SQ1, 43, 303, 0, "slotGuy", "dispose", -1, 0, { WORKAROUND_IGNORE, 0 } }, // when leaving ulence flats bar, parameter 1 is not passed - script error + { GID_QFG4, 770, 110, 0, "dreamer", "dispose", -1, 0, { WORKAROUND_IGNORE, 0 } }, // during the dream sequence, a 3rd parameter is passed by accident SCI_WORKAROUNDENTRY_TERMINATOR }; -- cgit v1.2.3 From c0cece8d1335a3397ea980d9a2abc4075656068c Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 25 Jul 2012 11:19:36 -0400 Subject: VIDEO: Add functions for default high color PixelFormat To be used by video that converts from YUV to RGB --- video/video_decoder.cpp | 6 ++++++ video/video_decoder.h | 20 +++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 80a208fda3..8b9a009b98 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -101,6 +101,12 @@ AdvancedVideoDecoder::AdvancedVideoDecoder() { _audioVolume = Audio::Mixer::kMaxChannelVolume; _audioBalance = 0; _pauseLevel = 0; + + // Find the best format for output + _defaultHighColorFormat = g_system->getScreenFormat(); + + if (_defaultHighColorFormat.bytesPerPixel == 1) + _defaultHighColorFormat = Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0); } void AdvancedVideoDecoder::close() { diff --git a/video/video_decoder.h b/video/video_decoder.h index 0848ad09c7..a6dbed8fc5 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -27,6 +27,7 @@ #include "audio/timestamp.h" // TODO: Move this to common/ ? #include "common/array.h" #include "common/str.h" +#include "graphics/pixelformat.h" namespace Audio { class AudioStream; @@ -40,7 +41,6 @@ class SeekableReadStream; } namespace Graphics { -struct PixelFormat; struct Surface; } @@ -370,6 +370,16 @@ public: */ bool addStreamFileTrack(const Common::String &baseName); + /** + * Set the default high color format for videos that convert from YUV. + * + * By default, AdvancedVideoDecoder will attempt to use the screen format + * if it's >8bpp and use a 32bpp format when not. + * + * This must be set before calling loadStream(). + */ + void setDefaultHighColorFormat(const Graphics::PixelFormat &format) { _defaultHighColorFormat = format; } + // Future API //void setRate(const Common::Rational &rate); //Common::Rational getRate() const; @@ -664,6 +674,11 @@ protected: */ bool endOfVideoTracks() const; + /** + * Get the default high color format + */ + Graphics::PixelFormat getDefaultHighColorFormat() const { return _defaultHighColorFormat; } + private: // Tracks owned by this AdvancedVideoDecoder typedef Common::Array TrackList; @@ -679,6 +694,9 @@ private: mutable bool _dirtyPalette; const byte *_palette; + // Default PixelFormat settings + Graphics::PixelFormat _defaultHighColorFormat; + // Internal helper functions void stopAllTracks(); void startAllTracks(); -- cgit v1.2.3 From 71daae7bbc03c1d9327f5353b1450f9d0d9774da Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 25 Jul 2012 17:21:36 +0200 Subject: GUI: Use "OK" instead of "Ok" in SavenameDialog. --- gui/saveload-dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 3c793c9e25..c714147488 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -842,7 +842,7 @@ SavenameDialog::SavenameDialog() _title = new StaticTextWidget(this, "SavenameDialog.DescriptionText", Common::String()); new ButtonWidget(this, "SavenameDialog.Cancel", _("Cancel"), 0, kCloseCmd); - new ButtonWidget(this, "SavenameDialog.Ok", _("Ok"), 0, kOKCmd); + new ButtonWidget(this, "SavenameDialog.Ok", _("OK"), 0, kOKCmd); _description = new EditTextWidget(this, "SavenameDialog.Description", Common::String(), 0, 0, kOKCmd); } -- cgit v1.2.3 From 57a06e383b7c3c950653a99c81c1c7fd7dcd5b1d Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 25 Jul 2012 11:22:28 -0400 Subject: VIDEO: Convert Bink to the new AdvancedVideoDecoder API --- engines/scumm/he/animation_he.cpp | 8 +- video/bink_decoder.cpp | 1056 +++++++++++++++++-------------------- video/bink_decoder.h | 420 ++++++++------- 3 files changed, 707 insertions(+), 777 deletions(-) diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp index b37a565aab..8329511c14 100644 --- a/engines/scumm/he/animation_he.cpp +++ b/engines/scumm/he/animation_he.cpp @@ -40,10 +40,7 @@ MoviePlayer::MoviePlayer(ScummEngine_v90he *vm, Audio::Mixer *mixer) : _vm(vm) { _video = new Video::BinkDecoder(); else #endif - { _video = new Video::SmackerDecoder(); - ((Video::AdvancedVideoDecoder *)_video)->start(); - } _flags = 0; _wizResNum = 0; @@ -64,11 +61,16 @@ int MoviePlayer::load(const char *filename, int flags, int image) { if (_video->isVideoLoaded()) _video->close(); + // Ensure that Bink will use our PixelFormat + ((Video::AdvancedVideoDecoder *)_video)->setDefaultHighColorFormat(g_system->getScreenFormat()); + if (!_video->loadFile(filename)) { warning("Failed to load video file %s", filename); return -1; } + ((Video::AdvancedVideoDecoder *)_video)->start(); + debug(1, "Playing video %s", filename); if (flags & 2) diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp index 538487f067..cac0b356c5 100644 --- a/video/bink_decoder.cpp +++ b/video/bink_decoder.cpp @@ -24,6 +24,7 @@ // based quite heavily on the Bink decoder found in FFmpeg. // Many thanks to Kostya Shishkov for doing the hard work. +#include "audio/audiostream.h" #include "audio/decoders/raw.h" #include "common/util.h" @@ -60,139 +61,108 @@ static const uint32 kDCStartBits = 11; namespace Video { -BinkDecoder::VideoFrame::VideoFrame() : bits(0) { -} - -BinkDecoder::VideoFrame::~VideoFrame() { - delete bits; +BinkDecoder::BinkDecoder() { + _bink = 0; } - -BinkDecoder::AudioTrack::AudioTrack() : bits(0), bands(0), rdft(0), dct(0) { +BinkDecoder::~BinkDecoder() { + close(); } -BinkDecoder::AudioTrack::~AudioTrack() { - delete bits; - - delete[] bands; - - delete rdft; - delete dct; -} +bool BinkDecoder::loadStream(Common::SeekableReadStream *stream) { + close(); + uint32 id = stream->readUint32BE(); + if ((id != kBIKfID) && (id != kBIKgID) && (id != kBIKhID) && (id != kBIKiID)) + return false; -BinkDecoder::BinkDecoder() { - _bink = 0; - _audioTrack = 0; + uint32 fileSize = stream->readUint32LE() + 8; + uint32 frameCount = stream->readUint32LE(); + uint32 largestFrameSize = stream->readUint32LE(); - for (int i = 0; i < 16; i++) - _huffman[i] = 0; + if (largestFrameSize > fileSize) { + warning("Largest frame size greater than file size"); + return false; + } - for (int i = 0; i < kSourceMAX; i++) { - _bundles[i].countLength = 0; + stream->skip(4); - _bundles[i].huffman.index = 0; - for (int j = 0; j < 16; j++) - _bundles[i].huffman.symbols[j] = j; + uint32 width = stream->readUint32LE(); + uint32 height = stream->readUint32LE(); - _bundles[i].data = 0; - _bundles[i].dataEnd = 0; - _bundles[i].curDec = 0; - _bundles[i].curPtr = 0; + uint32 frameRateNum = stream->readUint32LE(); + uint32 frameRateDen = stream->readUint32LE(); + if (frameRateNum == 0 || frameRateDen == 0) { + warning("Invalid frame rate (%d/%d)", frameRateNum, frameRateDen); + return false; } - for (int i = 0; i < 16; i++) { - _colHighHuffman[i].index = 0; - for (int j = 0; j < 16; j++) - _colHighHuffman[i].symbols[j] = j; - } + _bink = stream; - for (int i = 0; i < 4; i++) { - _curPlanes[i] = 0; - _oldPlanes[i] = 0; - } + uint32 videoFlags = _bink->readUint32LE(); - _audioStream = 0; -} + // BIKh and BIKi swap the chroma planes + addTrack(new BinkVideoTrack(width, height, getDefaultHighColorFormat(), frameCount, + Common::Rational(frameRateNum, frameRateDen), (id == kBIKhID || id == kBIKiID), videoFlags & kVideoFlagAlpha, id)); -void BinkDecoder::startAudio() { - if (_audioTrack < _audioTracks.size()) { - const AudioTrack &audio = _audioTracks[_audioTrack]; + uint32 audioTrackCount = _bink->readUint32LE(); - _audioStream = Audio::makeQueuingAudioStream(audio.outSampleRate, audio.outChannels == 2); - g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audioHandle, _audioStream, -1, getVolume(), getBalance()); - } // else no audio -} + if (audioTrackCount > 0) { + _audioTracks.reserve(audioTrackCount); -void BinkDecoder::stopAudio() { - if (_audioStream) { - g_system->getMixer()->stopHandle(_audioHandle); - _audioStream = 0; - } -} + _bink->skip(4 * audioTrackCount); -BinkDecoder::~BinkDecoder() { - close(); -} + // Reading audio track properties + for (uint32 i = 0; i < audioTrackCount; i++) { + AudioInfo track; -void BinkDecoder::close() { - reset(); + track.sampleRate = _bink->readUint16LE(); + track.flags = _bink->readUint16LE(); - // Stop audio - stopAudio(); + _audioTracks.push_back(track); - for (int i = 0; i < 4; i++) { - delete[] _curPlanes[i]; _curPlanes[i] = 0; - delete[] _oldPlanes[i]; _oldPlanes[i] = 0; + initAudioTrack(_audioTracks[i]); + } + + _bink->skip(4 * audioTrackCount); } - deinitBundles(); + // Reading video frame properties + _frames.resize(frameCount); + for (uint32 i = 0; i < frameCount; i++) { + _frames[i].offset = _bink->readUint32LE(); + _frames[i].keyFrame = _frames[i].offset & 1; - for (int i = 0; i < 16; i++) { - delete _huffman[i]; - _huffman[i] = 0; - } + _frames[i].offset &= ~1; - delete _bink; _bink = 0; - _surface.free(); + if (i != 0) + _frames[i - 1].size = _frames[i].offset - _frames[i - 1].offset; - _audioTrack = 0; + _frames[i].bits = 0; + } - for (int i = 0; i < kSourceMAX; i++) { - _bundles[i].countLength = 0; + _frames[frameCount - 1].size = _bink->size() - _frames[frameCount - 1].offset; - _bundles[i].huffman.index = 0; - for (int j = 0; j < 16; j++) - _bundles[i].huffman.symbols[j] = j; + return true; +} - _bundles[i].data = 0; - _bundles[i].dataEnd = 0; - _bundles[i].curDec = 0; - _bundles[i].curPtr = 0; - } +void BinkDecoder::close() { + AdvancedVideoDecoder::close(); - for (int i = 0; i < 16; i++) { - _colHighHuffman[i].index = 0; - for (int j = 0; j < 16; j++) - _colHighHuffman[i].symbols[j] = j; - } + delete _bink; + _bink = 0; _audioTracks.clear(); _frames.clear(); } -uint32 BinkDecoder::getTime() const { - if (_audioStream && g_system->getMixer()->isSoundHandleActive(_audioHandle)) - return g_system->getMixer()->getSoundElapsedTime(_audioHandle) + _audioStartOffset; - - return g_system->getMillis() - _startTime; -} +void BinkDecoder::readNextPacket() { + BinkVideoTrack *videoTrack = (BinkVideoTrack *)getTrack(0); -const Graphics::Surface *BinkDecoder::decodeNextFrame() { - if (endOfVideo()) - return 0; + if (videoTrack->endOfTrack()) + return; - VideoFrame &frame = _frames[_curFrame + 1]; + VideoFrame &frame = _frames[videoTrack->getCurFrame() + 1]; if (!_bink->seek(frame.offset)) error("Bad bink seek"); @@ -200,7 +170,7 @@ const Graphics::Surface *BinkDecoder::decodeNextFrame() { uint32 frameSize = frame.size; for (uint32 i = 0; i < _audioTracks.size(); i++) { - AudioTrack &audio = _audioTracks[i]; + AudioInfo &audio = _audioTracks[i]; uint32 audioPacketLength = _bink->readUint32LE(); @@ -210,24 +180,21 @@ const Graphics::Surface *BinkDecoder::decodeNextFrame() { error("Audio packet too big for the frame"); if (audioPacketLength >= 4) { + // Get our track - audio index plus one as the first track is video + BinkAudioTrack *audioTrack = (BinkAudioTrack *)getTrack(i + 1); uint32 audioPacketStart = _bink->pos(); uint32 audioPacketEnd = _bink->pos() + audioPacketLength; - if (i == _audioTrack) { - // Only play one audio track + // Number of samples in bytes + audio.sampleCount = _bink->readUint32LE() / (2 * audio.channels); - // Number of samples in bytes - audio.sampleCount = _bink->readUint32LE() / (2 * audio.channels); + audio.bits = new Common::BitStream32LELSB(new Common::SeekableSubReadStream(_bink, + audioPacketStart + 4, audioPacketEnd), true); - audio.bits = - new Common::BitStream32LELSB(new Common::SeekableSubReadStream(_bink, - audioPacketStart + 4, audioPacketEnd), true); + audioTrack->decodePacket(); - audioPacket(audio); - - delete audio.bits; - audio.bits = 0; - } + delete audio.bits; + audio.bits = 0; _bink->seek(audioPacketEnd); @@ -238,67 +205,125 @@ const Graphics::Surface *BinkDecoder::decodeNextFrame() { uint32 videoPacketStart = _bink->pos(); uint32 videoPacketEnd = _bink->pos() + frameSize; - frame.bits = - new Common::BitStream32LELSB(new Common::SeekableSubReadStream(_bink, - videoPacketStart, videoPacketEnd), true); + frame.bits = new Common::BitStream32LELSB(new Common::SeekableSubReadStream(_bink, + videoPacketStart, videoPacketEnd), true); - videoPacket(frame); + videoTrack->decodePacket(frame); delete frame.bits; frame.bits = 0; +} - _curFrame++; - if (_curFrame == 0) - _startTime = g_system->getMillis(); +BinkDecoder::VideoFrame::VideoFrame() : bits(0) { +} - return &_surface; +BinkDecoder::VideoFrame::~VideoFrame() { + delete bits; } -void BinkDecoder::audioPacket(AudioTrack &audio) { - if (!_audioStream) - return; - int outSize = audio.frameLen * audio.channels; - while (audio.bits->pos() < audio.bits->size()) { - int16 *out = (int16 *)malloc(outSize * 2); - memset(out, 0, outSize * 2); +BinkDecoder::AudioInfo::AudioInfo() : bits(0), bands(0), rdft(0), dct(0) { +} - audioBlock(audio, out); +BinkDecoder::AudioInfo::~AudioInfo() { + delete bits; - byte flags = Audio::FLAG_16BITS; - if (audio.outChannels == 2) - flags |= Audio::FLAG_STEREO; + delete[] bands; -#ifdef SCUMM_LITTLE_ENDIAN - flags |= Audio::FLAG_LITTLE_ENDIAN; -#endif + delete rdft; + delete dct; +} + +BinkDecoder::BinkVideoTrack::BinkVideoTrack(uint32 width, uint32 height, const Graphics::PixelFormat &format, uint32 frameCount, const Common::Rational &frameRate, bool swapPlanes, bool hasAlpha, uint32 id) : + _frameCount(frameCount), _frameRate(frameRate), _swapPlanes(swapPlanes), _hasAlpha(hasAlpha), _id(id) { + _curFrame = -1; + + for (int i = 0; i < 16; i++) + _huffman[i] = 0; - _audioStream->queueBuffer((byte *)out, audio.blockSize * 2, DisposeAfterUse::YES, flags); + for (int i = 0; i < kSourceMAX; i++) { + _bundles[i].countLength = 0; + + _bundles[i].huffman.index = 0; + for (int j = 0; j < 16; j++) + _bundles[i].huffman.symbols[j] = j; - if (audio.bits->pos() & 0x1F) // next data block starts at a 32-byte boundary - audio.bits->skip(32 - (audio.bits->pos() & 0x1F)); + _bundles[i].data = 0; + _bundles[i].dataEnd = 0; + _bundles[i].curDec = 0; + _bundles[i].curPtr = 0; + } + + for (int i = 0; i < 16; i++) { + _colHighHuffman[i].index = 0; + for (int j = 0; j < 16; j++) + _colHighHuffman[i].symbols[j] = j; + } + + _surface.create(width, height, format); + + // Give the planes a bit extra space + width = _surface.w + 32; + height = _surface.h + 32; + + _curPlanes[0] = new byte[ width * height ]; // Y + _curPlanes[1] = new byte[(width >> 1) * (height >> 1)]; // U, 1/4 resolution + _curPlanes[2] = new byte[(width >> 1) * (height >> 1)]; // V, 1/4 resolution + _curPlanes[3] = new byte[ width * height ]; // A + _oldPlanes[0] = new byte[ width * height ]; // Y + _oldPlanes[1] = new byte[(width >> 1) * (height >> 1)]; // U, 1/4 resolution + _oldPlanes[2] = new byte[(width >> 1) * (height >> 1)]; // V, 1/4 resolution + _oldPlanes[3] = new byte[ width * height ]; // A + + // Initialize the video with solid black + memset(_curPlanes[0], 0, width * height ); + memset(_curPlanes[1], 0, (width >> 1) * (height >> 1)); + memset(_curPlanes[2], 0, (width >> 1) * (height >> 1)); + memset(_curPlanes[3], 255, width * height ); + memset(_oldPlanes[0], 0, width * height ); + memset(_oldPlanes[1], 0, (width >> 1) * (height >> 1)); + memset(_oldPlanes[2], 0, (width >> 1) * (height >> 1)); + memset(_oldPlanes[3], 255, width * height ); + + initBundles(); + initHuffman(); +} + +BinkDecoder::BinkVideoTrack::~BinkVideoTrack() { + for (int i = 0; i < 4; i++) { + delete[] _curPlanes[i]; _curPlanes[i] = 0; + delete[] _oldPlanes[i]; _oldPlanes[i] = 0; + } + + deinitBundles(); + + for (int i = 0; i < 16; i++) { + delete _huffman[i]; + _huffman[i] = 0; } + + _surface.free(); } -void BinkDecoder::videoPacket(VideoFrame &video) { - assert(video.bits); +void BinkDecoder::BinkVideoTrack::decodePacket(VideoFrame &frame) { + assert(frame.bits); if (_hasAlpha) { if (_id == kBIKiID) - video.bits->skip(32); + frame.bits->skip(32); - decodePlane(video, 3, false); + decodePlane(frame, 3, false); } if (_id == kBIKiID) - video.bits->skip(32); + frame.bits->skip(32); for (int i = 0; i < 3; i++) { int planeIdx = ((i == 0) || !_swapPlanes) ? i : (i ^ 3); - decodePlane(video, planeIdx, i != 0); + decodePlane(frame, planeIdx, i != 0); - if (video.bits->pos() >= video.bits->size()) + if (frame.bits->pos() >= frame.bits->size()) break; } @@ -311,10 +336,11 @@ void BinkDecoder::videoPacket(VideoFrame &video) { // And swap the planes with the reference planes for (int i = 0; i < 4; i++) SWAP(_curPlanes[i], _oldPlanes[i]); -} -void BinkDecoder::decodePlane(VideoFrame &video, int planeIdx, bool isChroma) { + _curFrame++; +} +void BinkDecoder::BinkVideoTrack::decodePlane(VideoFrame &video, int planeIdx, bool isChroma) { uint32 blockWidth = isChroma ? ((_surface.w + 15) >> 4) : ((_surface.w + 7) >> 3); uint32 blockHeight = isChroma ? ((_surface.h + 15) >> 4) : ((_surface.h + 7) >> 3); uint32 width = isChroma ? (_surface.w >> 1) : _surface.w; @@ -371,48 +397,38 @@ void BinkDecoder::decodePlane(VideoFrame &video, int planeIdx, bool isChroma) { } switch (blockType) { - case kBlockSkip: - blockSkip(ctx); - break; - - case kBlockScaled: - blockScaled(ctx); - break; - - case kBlockMotion: - blockMotion(ctx); - break; - - case kBlockRun: - blockRun(ctx); - break; - - case kBlockResidue: - blockResidue(ctx); - break; - - case kBlockIntra: - blockIntra(ctx); - break; - - case kBlockFill: - blockFill(ctx); - break; - - case kBlockInter: - blockInter(ctx); - break; - - case kBlockPattern: - blockPattern(ctx); - break; - - case kBlockRaw: - blockRaw(ctx); - break; - - default: - error("Unknown block type: %d", blockType); + case kBlockSkip: + blockSkip(ctx); + break; + case kBlockScaled: + blockScaled(ctx); + break; + case kBlockMotion: + blockMotion(ctx); + break; + case kBlockRun: + blockRun(ctx); + break; + case kBlockResidue: + blockResidue(ctx); + break; + case kBlockIntra: + blockIntra(ctx); + break; + case kBlockFill: + blockFill(ctx); + break; + case kBlockInter: + blockInter(ctx); + break; + case kBlockPattern: + blockPattern(ctx); + break; + case kBlockRaw: + blockRaw(ctx); + break; + default: + error("Unknown block type: %d", blockType); } } @@ -424,7 +440,7 @@ void BinkDecoder::decodePlane(VideoFrame &video, int planeIdx, bool isChroma) { } -void BinkDecoder::readBundle(VideoFrame &video, Source source) { +void BinkDecoder::BinkVideoTrack::readBundle(VideoFrame &video, Source source) { if (source == kSourceColors) { for (int i = 0; i < 16; i++) readHuffman(video, _colHighHuffman[i]); @@ -439,12 +455,11 @@ void BinkDecoder::readBundle(VideoFrame &video, Source source) { _bundles[source].curPtr = _bundles[source].data; } -void BinkDecoder::readHuffman(VideoFrame &video, Huffman &huffman) { +void BinkDecoder::BinkVideoTrack::readHuffman(VideoFrame &video, Huffman &huffman) { huffman.index = video.bits->getBits(4); if (huffman.index == 0) { // The first tree always gives raw nibbles - for (int i = 0; i < 16; i++) huffman.symbols[i] = i; @@ -455,7 +470,6 @@ void BinkDecoder::readHuffman(VideoFrame &video, Huffman &huffman) { if (video.bits->getBit()) { // Symbol selection - memset(hasSymbol, 0, 16); uint8 length = video.bits->getBits(3); @@ -493,214 +507,29 @@ void BinkDecoder::readHuffman(VideoFrame &video, Huffman &huffman) { memcpy(huffman.symbols, in, 16); } -void BinkDecoder::mergeHuffmanSymbols(VideoFrame &video, byte *dst, const byte *src, int size) { - const byte *src2 = src + size; - int size2 = size; - - do { - if (!video.bits->getBit()) { - *dst++ = *src++; - size--; - } else { - *dst++ = *src2++; - size2--; - } - - } while (size && size2); - - while (size--) - *dst++ = *src++; - while (size2--) - *dst++ = *src2++; -} - -bool BinkDecoder::loadStream(Common::SeekableReadStream *stream) { - Graphics::PixelFormat format = g_system->getScreenFormat(); - return loadStream(stream, format); -} - -bool BinkDecoder::loadStream(Common::SeekableReadStream *stream, const Graphics::PixelFormat &format) { - close(); - - _id = stream->readUint32BE(); - if ((_id != kBIKfID) && (_id != kBIKgID) && (_id != kBIKhID) && (_id != kBIKiID)) - return false; - - uint32 fileSize = stream->readUint32LE() + 8; - uint32 frameCount = stream->readUint32LE(); - uint32 largestFrameSize = stream->readUint32LE(); - - if (largestFrameSize > fileSize) { - warning("Largest frame size greater than file size"); - return false; - } - - stream->skip(4); - - uint32 width = stream->readUint32LE(); - uint32 height = stream->readUint32LE(); - - uint32 frameRateNum = stream->readUint32LE(); - uint32 frameRateDen = stream->readUint32LE(); - if (frameRateNum == 0 || frameRateDen == 0) { - warning("Invalid frame rate (%d/%d)", frameRateNum, frameRateDen); - return false; - } - - _frameRate = Common::Rational(frameRateNum, frameRateDen); - _bink = stream; - - _videoFlags = _bink->readUint32LE(); - - uint32 audioTrackCount = _bink->readUint32LE(); - - if (audioTrackCount > 1) { - warning("More than one audio track found. Using the first one"); - - _audioTrack = 0; - } - - if (audioTrackCount > 0) { - _audioTracks.reserve(audioTrackCount); - - _bink->skip(4 * audioTrackCount); - - // Reading audio track properties - for (uint32 i = 0; i < audioTrackCount; i++) { - AudioTrack track; - - track.sampleRate = _bink->readUint16LE(); - track.flags = _bink->readUint16LE(); - - _audioTracks.push_back(track); - - initAudioTrack(_audioTracks[i]); - } - - _bink->skip(4 * audioTrackCount); - } - - // Reading video frame properties - _frames.resize(frameCount); - for (uint32 i = 0; i < frameCount; i++) { - _frames[i].offset = _bink->readUint32LE(); - _frames[i].keyFrame = _frames[i].offset & 1; - - _frames[i].offset &= ~1; - - if (i != 0) - _frames[i - 1].size = _frames[i].offset - _frames[i - 1].offset; - - _frames[i].bits = 0; - } - - _frames[frameCount - 1].size = _bink->size() - _frames[frameCount - 1].offset; - - _hasAlpha = _videoFlags & kVideoFlagAlpha; - _swapPlanes = (_id == kBIKhID) || (_id == kBIKiID); // BIKh and BIKi swap the chroma planes - - _surface.create(width, height, format); - - // Give the planes a bit extra space - width = _surface.w + 32; - height = _surface.h + 32; - - _curPlanes[0] = new byte[ width * height ]; // Y - _curPlanes[1] = new byte[(width >> 1) * (height >> 1)]; // U, 1/4 resolution - _curPlanes[2] = new byte[(width >> 1) * (height >> 1)]; // V, 1/4 resolution - _curPlanes[3] = new byte[ width * height ]; // A - _oldPlanes[0] = new byte[ width * height ]; // Y - _oldPlanes[1] = new byte[(width >> 1) * (height >> 1)]; // U, 1/4 resolution - _oldPlanes[2] = new byte[(width >> 1) * (height >> 1)]; // V, 1/4 resolution - _oldPlanes[3] = new byte[ width * height ]; // A - - // Initialize the video with solid black - memset(_curPlanes[0], 0, width * height ); - memset(_curPlanes[1], 0, (width >> 1) * (height >> 1)); - memset(_curPlanes[2], 0, (width >> 1) * (height >> 1)); - memset(_curPlanes[3], 255, width * height ); - memset(_oldPlanes[0], 0, width * height ); - memset(_oldPlanes[1], 0, (width >> 1) * (height >> 1)); - memset(_oldPlanes[2], 0, (width >> 1) * (height >> 1)); - memset(_oldPlanes[3], 255, width * height ); - - initBundles(); - initHuffman(); - - startAudio(); - _audioStartOffset = 0; - - return true; -} - -void BinkDecoder::initAudioTrack(AudioTrack &audio) { - audio.sampleCount = 0; - audio.bits = 0; - - audio.channels = ((audio.flags & kAudioFlagStereo) != 0) ? 2 : 1; - audio.codec = ((audio.flags & kAudioFlagDCT ) != 0) ? kAudioCodecDCT : kAudioCodecRDFT; - - if (audio.channels > kAudioChannelsMax) - error("Too many audio channels: %d", audio.channels); - - uint32 frameLenBits; - // Calculate frame length - if (audio.sampleRate < 22050) - frameLenBits = 9; - else if(audio.sampleRate < 44100) - frameLenBits = 10; - else - frameLenBits = 11; - - audio.frameLen = 1 << frameLenBits; - - audio.outSampleRate = audio.sampleRate; - audio.outChannels = audio.channels; - - if (audio.codec == kAudioCodecRDFT) { - // RDFT audio already interleaves the samples correctly - - if (audio.channels == 2) - frameLenBits++; - - audio.sampleRate *= audio.channels; - audio.frameLen *= audio.channels; - audio.channels = 1; - } - - audio.overlapLen = audio.frameLen / 16; - audio.blockSize = (audio.frameLen - audio.overlapLen) * audio.channels; - audio.root = 2.0 / sqrt((double)audio.frameLen); - - uint32 sampleRateHalf = (audio.sampleRate + 1) / 2; - - // Calculate number of bands - for (audio.bandCount = 1; audio.bandCount < 25; audio.bandCount++) - if (sampleRateHalf <= binkCriticalFreqs[audio.bandCount - 1]) - break; - - audio.bands = new uint32[audio.bandCount + 1]; - - // Populate bands - audio.bands[0] = 1; - for (uint32 i = 1; i < audio.bandCount; i++) - audio.bands[i] = binkCriticalFreqs[i - 1] * (audio.frameLen / 2) / sampleRateHalf; - audio.bands[audio.bandCount] = audio.frameLen / 2; - - audio.first = true; +void BinkDecoder::BinkVideoTrack::mergeHuffmanSymbols(VideoFrame &video, byte *dst, const byte *src, int size) { + const byte *src2 = src + size; + int size2 = size; - for (uint8 i = 0; i < audio.channels; i++) - audio.coeffsPtr[i] = audio.coeffs + i * audio.frameLen; + do { + if (!video.bits->getBit()) { + *dst++ = *src++; + size--; + } else { + *dst++ = *src2++; + size2--; + } - audio.codec = ((audio.flags & kAudioFlagDCT) != 0) ? kAudioCodecDCT : kAudioCodecRDFT; + } while (size && size2); - if (audio.codec == kAudioCodecRDFT) - audio.rdft = new Common::RDFT(frameLenBits, Common::RDFT::DFT_C2R); - else if (audio.codec == kAudioCodecDCT) - audio.dct = new Common::DCT(frameLenBits, Common::DCT::DCT_III); + while (size--) + *dst++ = *src++; + + while (size2--) + *dst++ = *src2++; } -void BinkDecoder::initBundles() { +void BinkDecoder::BinkVideoTrack::initBundles() { uint32 bw = (_surface.w + 7) >> 3; uint32 bh = (_surface.h + 7) >> 3; uint32 blocks = bw * bh; @@ -729,21 +558,21 @@ void BinkDecoder::initBundles() { } } -void BinkDecoder::deinitBundles() { +void BinkDecoder::BinkVideoTrack::deinitBundles() { for (int i = 0; i < kSourceMAX; i++) delete[] _bundles[i].data; } -void BinkDecoder::initHuffman() { +void BinkDecoder::BinkVideoTrack::initHuffman() { for (int i = 0; i < 16; i++) _huffman[i] = new Common::Huffman(binkHuffmanLengths[i][15], 16, binkHuffmanCodes[i], binkHuffmanLengths[i]); } -byte BinkDecoder::getHuffmanSymbol(VideoFrame &video, Huffman &huffman) { +byte BinkDecoder::BinkVideoTrack::getHuffmanSymbol(VideoFrame &video, Huffman &huffman) { return huffman.symbols[_huffman[huffman.index]->getSymbol(*video.bits)]; } -int32 BinkDecoder::getBundleValue(Source source) { +int32 BinkDecoder::BinkVideoTrack::getBundleValue(Source source) { if ((source < kSourceXOff) || (source == kSourceRun)) return *_bundles[source].curPtr++; @@ -757,7 +586,7 @@ int32 BinkDecoder::getBundleValue(Source source) { return ret; } -uint32 BinkDecoder::readBundleCount(VideoFrame &video, Bundle &bundle) { +uint32 BinkDecoder::BinkVideoTrack::readBundleCount(VideoFrame &video, Bundle &bundle) { if (!bundle.curDec || (bundle.curDec > bundle.curPtr)) return 0; @@ -768,7 +597,7 @@ uint32 BinkDecoder::readBundleCount(VideoFrame &video, Bundle &bundle) { return n; } -void BinkDecoder::blockSkip(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockSkip(DecodeContext &ctx) { byte *dest = ctx.dest; byte *prev = ctx.prev; @@ -776,7 +605,7 @@ void BinkDecoder::blockSkip(DecodeContext &ctx) { memcpy(dest, prev, 8); } -void BinkDecoder::blockScaledSkip(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockScaledSkip(DecodeContext &ctx) { byte *dest = ctx.dest; byte *prev = ctx.prev; @@ -784,7 +613,7 @@ void BinkDecoder::blockScaledSkip(DecodeContext &ctx) { memcpy(dest, prev, 16); } -void BinkDecoder::blockScaledRun(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockScaledRun(DecodeContext &ctx) { const uint8 *scan = binkPatterns[ctx.video->bits->getBits(4)]; int i = 0; @@ -820,7 +649,7 @@ void BinkDecoder::blockScaledRun(DecodeContext &ctx) { ctx.dest[ctx.coordScaledMap4[*scan]] = getBundleValue(kSourceColors); } -void BinkDecoder::blockScaledIntra(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockScaledIntra(DecodeContext &ctx) { int16 block[64]; memset(block, 0, 64 * sizeof(int16)); @@ -841,7 +670,7 @@ void BinkDecoder::blockScaledIntra(DecodeContext &ctx) { } } -void BinkDecoder::blockScaledFill(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockScaledFill(DecodeContext &ctx) { byte v = getBundleValue(kSourceColors); byte *dest = ctx.dest; @@ -849,7 +678,7 @@ void BinkDecoder::blockScaledFill(DecodeContext &ctx) { memset(dest, v, 16); } -void BinkDecoder::blockScaledPattern(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockScaledPattern(DecodeContext &ctx) { byte col[2]; for (int i = 0; i < 2; i++) @@ -865,7 +694,7 @@ void BinkDecoder::blockScaledPattern(DecodeContext &ctx) { } } -void BinkDecoder::blockScaledRaw(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockScaledRaw(DecodeContext &ctx) { byte row[8]; byte *dest1 = ctx.dest; @@ -880,32 +709,27 @@ void BinkDecoder::blockScaledRaw(DecodeContext &ctx) { } } -void BinkDecoder::blockScaled(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockScaled(DecodeContext &ctx) { BlockType blockType = (BlockType) getBundleValue(kSourceSubBlockTypes); switch (blockType) { - case kBlockRun: - blockScaledRun(ctx); - break; - - case kBlockIntra: - blockScaledIntra(ctx); - break; - - case kBlockFill: - blockScaledFill(ctx); - break; - - case kBlockPattern: - blockScaledPattern(ctx); - break; - - case kBlockRaw: - blockScaledRaw(ctx); - break; - - default: - error("Invalid 16x16 block type: %d", blockType); + case kBlockRun: + blockScaledRun(ctx); + break; + case kBlockIntra: + blockScaledIntra(ctx); + break; + case kBlockFill: + blockScaledFill(ctx); + break; + case kBlockPattern: + blockScaledPattern(ctx); + break; + case kBlockRaw: + blockScaledRaw(ctx); + break; + default: + error("Invalid 16x16 block type: %d", blockType); } ctx.blockX += 1; @@ -913,7 +737,7 @@ void BinkDecoder::blockScaled(DecodeContext &ctx) { ctx.prev += 8; } -void BinkDecoder::blockMotion(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockMotion(DecodeContext &ctx) { int8 xOff = getBundleValue(kSourceXOff); int8 yOff = getBundleValue(kSourceYOff); @@ -926,7 +750,7 @@ void BinkDecoder::blockMotion(DecodeContext &ctx) { memcpy(dest, prev, 8); } -void BinkDecoder::blockRun(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockRun(DecodeContext &ctx) { const uint8 *scan = binkPatterns[ctx.video->bits->getBits(4)]; int i = 0; @@ -953,7 +777,7 @@ void BinkDecoder::blockRun(DecodeContext &ctx) { ctx.dest[ctx.coordMap[*scan++]] = getBundleValue(kSourceColors); } -void BinkDecoder::blockResidue(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockResidue(DecodeContext &ctx) { blockMotion(ctx); byte v = ctx.video->bits->getBits(7); @@ -970,7 +794,7 @@ void BinkDecoder::blockResidue(DecodeContext &ctx) { dst[j] += src[j]; } -void BinkDecoder::blockIntra(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockIntra(DecodeContext &ctx) { int16 block[64]; memset(block, 0, 64 * sizeof(int16)); @@ -981,7 +805,7 @@ void BinkDecoder::blockIntra(DecodeContext &ctx) { IDCTPut(ctx, block); } -void BinkDecoder::blockFill(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockFill(DecodeContext &ctx) { byte v = getBundleValue(kSourceColors); byte *dest = ctx.dest; @@ -989,7 +813,7 @@ void BinkDecoder::blockFill(DecodeContext &ctx) { memset(dest, v, 8); } -void BinkDecoder::blockInter(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockInter(DecodeContext &ctx) { blockMotion(ctx); int16 block[64]; @@ -1002,7 +826,7 @@ void BinkDecoder::blockInter(DecodeContext &ctx) { IDCTAdd(ctx, block); } -void BinkDecoder::blockPattern(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockPattern(DecodeContext &ctx) { byte col[2]; for (int i = 0; i < 2; i++) @@ -1017,7 +841,7 @@ void BinkDecoder::blockPattern(DecodeContext &ctx) { } } -void BinkDecoder::blockRaw(DecodeContext &ctx) { +void BinkDecoder::BinkVideoTrack::blockRaw(DecodeContext &ctx) { byte *dest = ctx.dest; byte *data = _bundles[kSourceColors].curPtr; for (int i = 0; i < 8; i++, dest += ctx.pitch, data += 8) @@ -1026,7 +850,7 @@ void BinkDecoder::blockRaw(DecodeContext &ctx) { _bundles[kSourceColors].curPtr += 64; } -void BinkDecoder::readRuns(VideoFrame &video, Bundle &bundle) { +void BinkDecoder::BinkVideoTrack::readRuns(VideoFrame &video, Bundle &bundle) { uint32 n = readBundleCount(video, bundle); if (n == 0) return; @@ -1046,7 +870,7 @@ void BinkDecoder::readRuns(VideoFrame &video, Bundle &bundle) { *bundle.curDec++ = getHuffmanSymbol(video, bundle.huffman); } -void BinkDecoder::readMotionValues(VideoFrame &video, Bundle &bundle) { +void BinkDecoder::BinkVideoTrack::readMotionValues(VideoFrame &video, Bundle &bundle) { uint32 n = readBundleCount(video, bundle); if (n == 0) return; @@ -1083,7 +907,7 @@ void BinkDecoder::readMotionValues(VideoFrame &video, Bundle &bundle) { } const uint8 rleLens[4] = { 4, 8, 12, 32 }; -void BinkDecoder::readBlockTypes(VideoFrame &video, Bundle &bundle) { +void BinkDecoder::BinkVideoTrack::readBlockTypes(VideoFrame &video, Bundle &bundle) { uint32 n = readBundleCount(video, bundle); if (n == 0) return; @@ -1120,7 +944,7 @@ void BinkDecoder::readBlockTypes(VideoFrame &video, Bundle &bundle) { } while (bundle.curDec < decEnd); } -void BinkDecoder::readPatterns(VideoFrame &video, Bundle &bundle) { +void BinkDecoder::BinkVideoTrack::readPatterns(VideoFrame &video, Bundle &bundle) { uint32 n = readBundleCount(video, bundle); if (n == 0) return; @@ -1138,7 +962,7 @@ void BinkDecoder::readPatterns(VideoFrame &video, Bundle &bundle) { } -void BinkDecoder::readColors(VideoFrame &video, Bundle &bundle) { +void BinkDecoder::BinkVideoTrack::readColors(VideoFrame &video, Bundle &bundle) { uint32 n = readBundleCount(video, bundle); if (n == 0) return; @@ -1182,7 +1006,7 @@ void BinkDecoder::readColors(VideoFrame &video, Bundle &bundle) { } } -void BinkDecoder::readDCS(VideoFrame &video, Bundle &bundle, int startBits, bool hasSign) { +void BinkDecoder::BinkVideoTrack::readDCS(VideoFrame &video, Bundle &bundle, int startBits, bool hasSign) { uint32 length = readBundleCount(video, bundle); if (length == 0) return; @@ -1228,7 +1052,7 @@ void BinkDecoder::readDCS(VideoFrame &video, Bundle &bundle, int startBits, bool } /** Reads 8x8 block of DCT coefficients. */ -void BinkDecoder::readDCTCoeffs(VideoFrame &video, int16 *block, bool isIntra) { +void BinkDecoder::BinkVideoTrack::readDCTCoeffs(VideoFrame &video, int16 *block, bool isIntra) { int coefCount = 0; int coefIdx[64]; @@ -1326,7 +1150,7 @@ void BinkDecoder::readDCTCoeffs(VideoFrame &video, int16 *block, bool isIntra) { } /** Reads 8x8 block with residue after motion compensation. */ -void BinkDecoder::readResidue(VideoFrame &video, int16 *block, int masksCount) { +void BinkDecoder::BinkVideoTrack::readResidue(VideoFrame &video, int16 *block, int masksCount) { int nzCoeff[64]; int nzCoeffCount = 0; @@ -1417,63 +1241,170 @@ void BinkDecoder::readResidue(VideoFrame &video, int16 *block, int masksCount) { } } -float BinkDecoder::getFloat(AudioTrack &audio) { - int power = audio.bits->getBits(5); +#define A1 2896 /* (1/sqrt(2))<<12 */ +#define A2 2217 +#define A3 3784 +#define A4 -5352 - float f = ldexp((float)audio.bits->getBits(23), power - 23); +#define IDCT_TRANSFORM(dest,s0,s1,s2,s3,s4,s5,s6,s7,d0,d1,d2,d3,d4,d5,d6,d7,munge,src) {\ + const int a0 = (src)[s0] + (src)[s4]; \ + const int a1 = (src)[s0] - (src)[s4]; \ + const int a2 = (src)[s2] + (src)[s6]; \ + const int a3 = (A1*((src)[s2] - (src)[s6])) >> 11; \ + const int a4 = (src)[s5] + (src)[s3]; \ + const int a5 = (src)[s5] - (src)[s3]; \ + const int a6 = (src)[s1] + (src)[s7]; \ + const int a7 = (src)[s1] - (src)[s7]; \ + const int b0 = a4 + a6; \ + const int b1 = (A3*(a5 + a7)) >> 11; \ + const int b2 = ((A4*a5) >> 11) - b0 + b1; \ + const int b3 = (A1*(a6 - a4) >> 11) - b2; \ + const int b4 = ((A2*a7) >> 11) + b3 - b1; \ + (dest)[d0] = munge(a0+a2 +b0); \ + (dest)[d1] = munge(a1+a3-a2+b2); \ + (dest)[d2] = munge(a1-a3+a2+b3); \ + (dest)[d3] = munge(a0-a2 -b4); \ + (dest)[d4] = munge(a0-a2 +b4); \ + (dest)[d5] = munge(a1-a3+a2-b3); \ + (dest)[d6] = munge(a1+a3-a2-b2); \ + (dest)[d7] = munge(a0+a2 -b0); \ +} +/* end IDCT_TRANSFORM macro */ - if (audio.bits->getBit()) - f = -f; +#define MUNGE_NONE(x) (x) +#define IDCT_COL(dest,src) IDCT_TRANSFORM(dest,0,8,16,24,32,40,48,56,0,8,16,24,32,40,48,56,MUNGE_NONE,src) - return f; +#define MUNGE_ROW(x) (((x) + 0x7F)>>8) +#define IDCT_ROW(dest,src) IDCT_TRANSFORM(dest,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,MUNGE_ROW,src) + +static inline void IDCTCol(int16 *dest, const int16 *src) { + if ((src[8] | src[16] | src[24] | src[32] | src[40] | src[48] | src[56]) == 0) { + dest[ 0] = + dest[ 8] = + dest[16] = + dest[24] = + dest[32] = + dest[40] = + dest[48] = + dest[56] = src[0]; + } else { + IDCT_COL(dest, src); + } +} + +void BinkDecoder::BinkVideoTrack::IDCT(int16 *block) { + int i; + int16 temp[64]; + + for (i = 0; i < 8; i++) + IDCTCol(&temp[i], &block[i]); + for (i = 0; i < 8; i++) { + IDCT_ROW( (&block[8*i]), (&temp[8*i]) ); + } +} + +void BinkDecoder::BinkVideoTrack::IDCTAdd(DecodeContext &ctx, int16 *block) { + int i, j; + + IDCT(block); + byte *dest = ctx.dest; + for (i = 0; i < 8; i++, dest += ctx.pitch, block += 8) + for (j = 0; j < 8; j++) + dest[j] += block[j]; +} + +void BinkDecoder::BinkVideoTrack::IDCTPut(DecodeContext &ctx, int16 *block) { + int i; + int16 temp[64]; + for (i = 0; i < 8; i++) + IDCTCol(&temp[i], &block[i]); + for (i = 0; i < 8; i++) { + IDCT_ROW( (&ctx.dest[i*ctx.pitch]), (&temp[8*i]) ); + } +} + +BinkDecoder::BinkAudioTrack::BinkAudioTrack(BinkDecoder::AudioInfo &audio) : _audioInfo(&audio) { + _audioStream = Audio::makeQueuingAudioStream(_audioInfo->outSampleRate, _audioInfo->outChannels == 2); +} + +BinkDecoder::BinkAudioTrack::~BinkAudioTrack() { + delete _audioStream; +} + +Audio::AudioStream *BinkDecoder::BinkAudioTrack::getAudioStream() const { + return _audioStream; +} + +void BinkDecoder::BinkAudioTrack::decodePacket() { + int outSize = _audioInfo->frameLen * _audioInfo->channels; + + while (_audioInfo->bits->pos() < _audioInfo->bits->size()) { + int16 *out = (int16 *)malloc(outSize * 2); + memset(out, 0, outSize * 2); + + audioBlock(out); + + byte flags = Audio::FLAG_16BITS; + if (_audioInfo->outChannels == 2) + flags |= Audio::FLAG_STEREO; + +#ifdef SCUMM_LITTLE_ENDIAN + flags |= Audio::FLAG_LITTLE_ENDIAN; +#endif + + _audioStream->queueBuffer((byte *)out, _audioInfo->blockSize * 2, DisposeAfterUse::YES, flags); + + if (_audioInfo->bits->pos() & 0x1F) // next data block starts at a 32-byte boundary + _audioInfo->bits->skip(32 - (_audioInfo->bits->pos() & 0x1F)); + } } -void BinkDecoder::audioBlock(AudioTrack &audio, int16 *out) { - if (audio.codec == kAudioCodecDCT) - audioBlockDCT (audio); - else if (audio.codec == kAudioCodecRDFT) - audioBlockRDFT(audio); +void BinkDecoder::BinkAudioTrack::audioBlock(int16 *out) { + if (_audioInfo->codec == kAudioCodecDCT) + audioBlockDCT (); + else if (_audioInfo->codec == kAudioCodecRDFT) + audioBlockRDFT(); - floatToInt16Interleave(out, const_cast(audio.coeffsPtr), audio.frameLen, audio.channels); + floatToInt16Interleave(out, const_cast(_audioInfo->coeffsPtr), _audioInfo->frameLen, _audioInfo->channels); - if (!audio.first) { - int count = audio.overlapLen * audio.channels; + if (!_audioInfo->first) { + int count = _audioInfo->overlapLen * _audioInfo->channels; int shift = Common::intLog2(count); for (int i = 0; i < count; i++) { - out[i] = (audio.prevCoeffs[i] * (count - i) + out[i] * i) >> shift; + out[i] = (_audioInfo->prevCoeffs[i] * (count - i) + out[i] * i) >> shift; } } - memcpy(audio.prevCoeffs, out + audio.blockSize, audio.overlapLen * audio.channels * sizeof(*out)); + memcpy(_audioInfo->prevCoeffs, out + _audioInfo->blockSize, _audioInfo->overlapLen * _audioInfo->channels * sizeof(*out)); - audio.first = false; + _audioInfo->first = false; } -void BinkDecoder::audioBlockDCT(AudioTrack &audio) { - audio.bits->skip(2); +void BinkDecoder::BinkAudioTrack::audioBlockDCT() { + _audioInfo->bits->skip(2); - for (uint8 i = 0; i < audio.channels; i++) { - float *coeffs = audio.coeffsPtr[i]; + for (uint8 i = 0; i < _audioInfo->channels; i++) { + float *coeffs = _audioInfo->coeffsPtr[i]; - readAudioCoeffs(audio, coeffs); + readAudioCoeffs(coeffs); coeffs[0] /= 0.5; - audio.dct->calc(coeffs); + _audioInfo->dct->calc(coeffs); - for (uint32 j = 0; j < audio.frameLen; j++) - coeffs[j] *= (audio.frameLen / 2.0); + for (uint32 j = 0; j < _audioInfo->frameLen; j++) + coeffs[j] *= (_audioInfo->frameLen / 2.0); } } -void BinkDecoder::audioBlockRDFT(AudioTrack &audio) { - for (uint8 i = 0; i < audio.channels; i++) { - float *coeffs = audio.coeffsPtr[i]; +void BinkDecoder::BinkAudioTrack::audioBlockRDFT() { + for (uint8 i = 0; i < _audioInfo->channels; i++) { + float *coeffs = _audioInfo->coeffsPtr[i]; - readAudioCoeffs(audio, coeffs); + readAudioCoeffs(coeffs); - audio.rdft->calc(coeffs); + _audioInfo->rdft->calc(coeffs); } } @@ -1481,56 +1412,56 @@ static const uint8 rleLengthTab[16] = { 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 32, 64 }; -void BinkDecoder::readAudioCoeffs(AudioTrack &audio, float *coeffs) { - coeffs[0] = getFloat(audio) * audio.root; - coeffs[1] = getFloat(audio) * audio.root; +void BinkDecoder::BinkAudioTrack::readAudioCoeffs(float *coeffs) { + coeffs[0] = getFloat() * _audioInfo->root; + coeffs[1] = getFloat() * _audioInfo->root; float quant[25]; - for (uint32 i = 0; i < audio.bandCount; i++) { - int value = audio.bits->getBits(8); + for (uint32 i = 0; i < _audioInfo->bandCount; i++) { + int value = _audioInfo->bits->getBits(8); // 0.066399999 / log10(M_E) - quant[i] = exp(MIN(value, 95) * 0.15289164787221953823f) * audio.root; + quant[i] = exp(MIN(value, 95) * 0.15289164787221953823f) * _audioInfo->root; } float q = 0.0; // Find band (k) int k; - for (k = 0; audio.bands[k] < 1; k++) + for (k = 0; _audioInfo->bands[k] < 1; k++) q = quant[k]; // Parse coefficients uint32 i = 2; - while (i < audio.frameLen) { + while (i < _audioInfo->frameLen) { uint32 j = 0; - if (audio.bits->getBit()) - j = i + rleLengthTab[audio.bits->getBits(4)] * 8; + if (_audioInfo->bits->getBit()) + j = i + rleLengthTab[_audioInfo->bits->getBits(4)] * 8; else j = i + 8; - j = MIN(j, audio.frameLen); + j = MIN(j, _audioInfo->frameLen); - int width = audio.bits->getBits(4); + int width = _audioInfo->bits->getBits(4); if (width == 0) { memset(coeffs + i, 0, (j - i) * sizeof(*coeffs)); i = j; - while (audio.bands[k] * 2 < i) + while (_audioInfo->bands[k] * 2 < i) q = quant[k++]; } else { while (i < j) { - if (audio.bands[k] * 2 == i) + if (_audioInfo->bands[k] * 2 == i) q = quant[k++]; - int coeff = audio.bits->getBits(width); + int coeff = _audioInfo->bits->getBits(width); if (coeff) { - if (audio.bits->getBit()) + if (_audioInfo->bits->getBit()) coeffs[i] = -q * coeff; else coeffs[i] = q * coeff; @@ -1548,10 +1479,10 @@ void BinkDecoder::readAudioCoeffs(AudioTrack &audio, float *coeffs) { } static inline int floatToInt16One(float src) { - return (int16) CLIP((int) floor(src + 0.5), -32768, 32767); + return (int16)CLIP((int)floor(src + 0.5), -32768, 32767); } -void BinkDecoder::floatToInt16Interleave(int16 *dst, const float **src, uint32 length, uint8 channels) { +void BinkDecoder::BinkAudioTrack::floatToInt16Interleave(int16 *dst, const float **src, uint32 length, uint8 channels) { if (channels == 2) { for (uint32 i = 0; i < length; i++) { dst[2 * i ] = floatToInt16One(src[0][i]); @@ -1564,97 +1495,84 @@ void BinkDecoder::floatToInt16Interleave(int16 *dst, const float **src, uint32 l } } -#define A1 2896 /* (1/sqrt(2))<<12 */ -#define A2 2217 -#define A3 3784 -#define A4 -5352 +float BinkDecoder::BinkAudioTrack::getFloat() { + int power = _audioInfo->bits->getBits(5); -#define IDCT_TRANSFORM(dest,s0,s1,s2,s3,s4,s5,s6,s7,d0,d1,d2,d3,d4,d5,d6,d7,munge,src) {\ - const int a0 = (src)[s0] + (src)[s4]; \ - const int a1 = (src)[s0] - (src)[s4]; \ - const int a2 = (src)[s2] + (src)[s6]; \ - const int a3 = (A1*((src)[s2] - (src)[s6])) >> 11; \ - const int a4 = (src)[s5] + (src)[s3]; \ - const int a5 = (src)[s5] - (src)[s3]; \ - const int a6 = (src)[s1] + (src)[s7]; \ - const int a7 = (src)[s1] - (src)[s7]; \ - const int b0 = a4 + a6; \ - const int b1 = (A3*(a5 + a7)) >> 11; \ - const int b2 = ((A4*a5) >> 11) - b0 + b1; \ - const int b3 = (A1*(a6 - a4) >> 11) - b2; \ - const int b4 = ((A2*a7) >> 11) + b3 - b1; \ - (dest)[d0] = munge(a0+a2 +b0); \ - (dest)[d1] = munge(a1+a3-a2+b2); \ - (dest)[d2] = munge(a1-a3+a2+b3); \ - (dest)[d3] = munge(a0-a2 -b4); \ - (dest)[d4] = munge(a0-a2 +b4); \ - (dest)[d5] = munge(a1-a3+a2-b3); \ - (dest)[d6] = munge(a1+a3-a2-b2); \ - (dest)[d7] = munge(a0+a2 -b0); \ + float f = ldexp((float)_audioInfo->bits->getBits(23), power - 23); + + if (_audioInfo->bits->getBit()) + f = -f; + + return f; } -/* end IDCT_TRANSFORM macro */ -#define MUNGE_NONE(x) (x) -#define IDCT_COL(dest,src) IDCT_TRANSFORM(dest,0,8,16,24,32,40,48,56,0,8,16,24,32,40,48,56,MUNGE_NONE,src) +void BinkDecoder::initAudioTrack(AudioInfo &audio) { + audio.sampleCount = 0; + audio.bits = 0; -#define MUNGE_ROW(x) (((x) + 0x7F)>>8) -#define IDCT_ROW(dest,src) IDCT_TRANSFORM(dest,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,MUNGE_ROW,src) + audio.channels = ((audio.flags & kAudioFlagStereo) != 0) ? 2 : 1; + audio.codec = ((audio.flags & kAudioFlagDCT ) != 0) ? kAudioCodecDCT : kAudioCodecRDFT; -static inline void IDCTCol(int16 *dest, const int16 *src) -{ - if ((src[8] | src[16] | src[24] | src[32] | src[40] | src[48] | src[56]) == 0) { - dest[ 0] = - dest[ 8] = - dest[16] = - dest[24] = - dest[32] = - dest[40] = - dest[48] = - dest[56] = src[0]; - } else { - IDCT_COL(dest, src); - } -} + if (audio.channels > kAudioChannelsMax) + error("Too many audio channels: %d", audio.channels); -void BinkDecoder::IDCT(int16 *block) { - int i; - int16 temp[64]; + uint32 frameLenBits; + // Calculate frame length + if (audio.sampleRate < 22050) + frameLenBits = 9; + else if(audio.sampleRate < 44100) + frameLenBits = 10; + else + frameLenBits = 11; - for (i = 0; i < 8; i++) - IDCTCol(&temp[i], &block[i]); - for (i = 0; i < 8; i++) { - IDCT_ROW( (&block[8*i]), (&temp[8*i]) ); - } -} + audio.frameLen = 1 << frameLenBits; -void BinkDecoder::IDCTAdd(DecodeContext &ctx, int16 *block) { - int i, j; + audio.outSampleRate = audio.sampleRate; + audio.outChannels = audio.channels; - IDCT(block); - byte *dest = ctx.dest; - for (i = 0; i < 8; i++, dest += ctx.pitch, block += 8) - for (j = 0; j < 8; j++) - dest[j] += block[j]; -} + if (audio.codec == kAudioCodecRDFT) { + // RDFT audio already interleaves the samples correctly -void BinkDecoder::IDCTPut(DecodeContext &ctx, int16 *block) { - int i; - int16 temp[64]; - for (i = 0; i < 8; i++) - IDCTCol(&temp[i], &block[i]); - for (i = 0; i < 8; i++) { - IDCT_ROW( (&ctx.dest[i*ctx.pitch]), (&temp[8*i]) ); + if (audio.channels == 2) + frameLenBits++; + + audio.sampleRate *= audio.channels; + audio.frameLen *= audio.channels; + audio.channels = 1; } -} -void BinkDecoder::updateVolume() { - if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) - g_system->getMixer()->setChannelVolume(_audioHandle, getVolume()); -} + audio.overlapLen = audio.frameLen / 16; + audio.blockSize = (audio.frameLen - audio.overlapLen) * audio.channels; + audio.root = 2.0 / sqrt((double)audio.frameLen); + + uint32 sampleRateHalf = (audio.sampleRate + 1) / 2; + + // Calculate number of bands + for (audio.bandCount = 1; audio.bandCount < 25; audio.bandCount++) + if (sampleRateHalf <= binkCriticalFreqs[audio.bandCount - 1]) + break; + + audio.bands = new uint32[audio.bandCount + 1]; + + // Populate bands + audio.bands[0] = 1; + for (uint32 i = 1; i < audio.bandCount; i++) + audio.bands[i] = binkCriticalFreqs[i - 1] * (audio.frameLen / 2) / sampleRateHalf; + audio.bands[audio.bandCount] = audio.frameLen / 2; + + audio.first = true; + + for (uint8 i = 0; i < audio.channels; i++) + audio.coeffsPtr[i] = audio.coeffs + i * audio.frameLen; + + audio.codec = ((audio.flags & kAudioFlagDCT) != 0) ? kAudioCodecDCT : kAudioCodecRDFT; + + if (audio.codec == kAudioCodecRDFT) + audio.rdft = new Common::RDFT(frameLenBits, Common::RDFT::DFT_C2R); + else if (audio.codec == kAudioCodecDCT) + audio.dct = new Common::DCT(frameLenBits, Common::DCT::DCT_III); -void BinkDecoder::updateBalance() { - if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) - g_system->getMixer()->setChannelBalance(_audioHandle, getBalance()); + addTrack(new BinkAudioTrack(audio)); } } // End of namespace Video diff --git a/video/bink_decoder.h b/video/bink_decoder.h index a5e1b10270..836238ce99 100644 --- a/video/bink_decoder.h +++ b/video/bink_decoder.h @@ -31,22 +31,27 @@ #ifndef VIDEO_BINK_DECODER_H #define VIDEO_BINK_DECODER_H -#include "audio/audiostream.h" -#include "audio/mixer.h" #include "common/array.h" #include "common/rational.h" -#include "graphics/surface.h" - #include "video/video_decoder.h" +namespace Audio { +class AudioStream; +class QueuingAudioStream; +} + namespace Common { - class SeekableReadStream; - class BitStream; - class Huffman; +class SeekableReadStream; +class BitStream; +class Huffman; - class RDFT; - class DCT; +class RDFT; +class DCT; +} + +namespace Graphics { +struct Surface; } namespace Video { @@ -57,92 +62,28 @@ namespace Video { * Video decoder used in engines: * - scumm (he) */ -class BinkDecoder : public FixedRateVideoDecoder { +class BinkDecoder : public AdvancedVideoDecoder { public: BinkDecoder(); ~BinkDecoder(); - // VideoDecoder API bool loadStream(Common::SeekableReadStream *stream); void close(); - bool isVideoLoaded() const { return _bink != 0; } - uint16 getWidth() const { return _surface.w; } - uint16 getHeight() const { return _surface.h; } - Graphics::PixelFormat getPixelFormat() const { return _surface.format; } - uint32 getFrameCount() const { return _frames.size(); } - uint32 getTime() const; - const Graphics::Surface *decodeNextFrame(); - - // FixedRateVideoDecoder - Common::Rational getFrameRate() const { return _frameRate; } - - // Bink specific - bool loadStream(Common::SeekableReadStream *stream, const Graphics::PixelFormat &format); protected: - // VideoDecoder API - void updateVolume(); - void updateBalance(); + void readNextPacket(); +private: static const int kAudioChannelsMax = 2; static const int kAudioBlockSizeMax = (kAudioChannelsMax << 11); - /** IDs for different data types used in Bink video codec. */ - enum Source { - kSourceBlockTypes = 0, ///< 8x8 block types. - kSourceSubBlockTypes , ///< 16x16 block types (a subset of 8x8 block types). - kSourceColors , ///< Pixel values used for different block types. - kSourcePattern , ///< 8-bit values for 2-color pattern fill. - kSourceXOff , ///< X components of motion value. - kSourceYOff , ///< Y components of motion value. - kSourceIntraDC , ///< DC values for intrablocks with DCT. - kSourceInterDC , ///< DC values for interblocks with DCT. - kSourceRun , ///< Run lengths for special fill block. - - kSourceMAX - }; - - /** Bink video block types. */ - enum BlockType { - kBlockSkip = 0, ///< Skipped block. - kBlockScaled , ///< Block has size 16x16. - kBlockMotion , ///< Block is copied from previous frame with some offset. - kBlockRun , ///< Block is composed from runs of colors with custom scan order. - kBlockResidue , ///< Motion block with some difference added. - kBlockIntra , ///< Intra DCT block. - kBlockFill , ///< Block is filled with single color. - kBlockInter , ///< Motion block with DCT applied to the difference. - kBlockPattern , ///< Block is filled with two colors following custom pattern. - kBlockRaw ///< Uncoded 8x8 block. - }; - - /** Data structure for decoding and tranlating Huffman'd data. */ - struct Huffman { - int index; ///< Index of the Huffman codebook to use. - byte symbols[16]; ///< Huffman symbol => Bink symbol tranlation list. - }; - - /** Data structure used for decoding a single Bink data type. */ - struct Bundle { - int countLengths[2]; ///< Lengths of number of entries to decode (in bits). - int countLength; ///< Length of number of entries to decode (in bits) for the current plane. - - Huffman huffman; ///< Huffman codebook. - - byte *data; ///< Buffer for decoded symbols. - byte *dataEnd; ///< Buffer end. - - byte *curDec; ///< Pointer to the data that wasn't yet decoded. - byte *curPtr; ///< Pointer to the data that wasn't yet read. - }; - enum AudioCodec { kAudioCodecDCT, kAudioCodecRDFT }; /** An audio track. */ - struct AudioTrack { + struct AudioInfo { uint16 flags; uint32 sampleRate; @@ -177,8 +118,8 @@ protected: Common::RDFT *rdft; Common::DCT *dct; - AudioTrack(); - ~AudioTrack(); + AudioInfo(); + ~AudioInfo(); }; /** A video frame. */ @@ -194,149 +135,218 @@ protected: ~VideoFrame(); }; - /** A decoder state. */ - struct DecodeContext { - VideoFrame *video; + class BinkVideoTrack : public FixedRateVideoTrack { + public: + BinkVideoTrack(uint32 width, uint32 height, const Graphics::PixelFormat &format, uint32 frameCount, const Common::Rational &frameRate, bool swapPlanes, bool hasAlpha, uint32 id); + ~BinkVideoTrack(); + + uint16 getWidth() const { return _surface.w; } + uint16 getHeight() const { return _surface.h; } + Graphics::PixelFormat getPixelFormat() const { return _surface.format; } + int getCurFrame() const { return _curFrame; } + int getFrameCount() const { return _frameCount; } + const Graphics::Surface *decodeNextFrame() { return &_surface; } + + /** Decode a video packet. */ + void decodePacket(VideoFrame &frame); + + protected: + Common::Rational getFrameRate() const { return _frameRate; } - uint32 planeIdx; + private: + /** A decoder state. */ + struct DecodeContext { + VideoFrame *video; + + uint32 planeIdx; - uint32 blockX; - uint32 blockY; + uint32 blockX; + uint32 blockY; - byte *dest; - byte *prev; + byte *dest; + byte *prev; - byte *destStart, *destEnd; - byte *prevStart, *prevEnd; + byte *destStart, *destEnd; + byte *prevStart, *prevEnd; - uint32 pitch; + uint32 pitch; - int coordMap[64]; - int coordScaledMap1[64]; - int coordScaledMap2[64]; - int coordScaledMap3[64]; - int coordScaledMap4[64]; + int coordMap[64]; + int coordScaledMap1[64]; + int coordScaledMap2[64]; + int coordScaledMap3[64]; + int coordScaledMap4[64]; + }; + + /** IDs for different data types used in Bink video codec. */ + enum Source { + kSourceBlockTypes = 0, ///< 8x8 block types. + kSourceSubBlockTypes , ///< 16x16 block types (a subset of 8x8 block types). + kSourceColors , ///< Pixel values used for different block types. + kSourcePattern , ///< 8-bit values for 2-color pattern fill. + kSourceXOff , ///< X components of motion value. + kSourceYOff , ///< Y components of motion value. + kSourceIntraDC , ///< DC values for intrablocks with DCT. + kSourceInterDC , ///< DC values for interblocks with DCT. + kSourceRun , ///< Run lengths for special fill block. + + kSourceMAX + }; + + /** Bink video block types. */ + enum BlockType { + kBlockSkip = 0, ///< Skipped block. + kBlockScaled , ///< Block has size 16x16. + kBlockMotion , ///< Block is copied from previous frame with some offset. + kBlockRun , ///< Block is composed from runs of colors with custom scan order. + kBlockResidue , ///< Motion block with some difference added. + kBlockIntra , ///< Intra DCT block. + kBlockFill , ///< Block is filled with single color. + kBlockInter , ///< Motion block with DCT applied to the difference. + kBlockPattern , ///< Block is filled with two colors following custom pattern. + kBlockRaw ///< Uncoded 8x8 block. + }; + + /** Data structure for decoding and tranlating Huffman'd data. */ + struct Huffman { + int index; ///< Index of the Huffman codebook to use. + byte symbols[16]; ///< Huffman symbol => Bink symbol tranlation list. + }; + + /** Data structure used for decoding a single Bink data type. */ + struct Bundle { + int countLengths[2]; ///< Lengths of number of entries to decode (in bits). + int countLength; ///< Length of number of entries to decode (in bits) for the current plane. + + Huffman huffman; ///< Huffman codebook. + + byte *data; ///< Buffer for decoded symbols. + byte *dataEnd; ///< Buffer end. + + byte *curDec; ///< Pointer to the data that wasn't yet decoded. + byte *curPtr; ///< Pointer to the data that wasn't yet read. + }; + + int _curFrame; + int _frameCount; + + Graphics::Surface _surface; + + uint32 _id; ///< The BIK FourCC. + + bool _hasAlpha; ///< Do video frames have alpha? + bool _swapPlanes; ///< Are the planes ordered (A)YVU instead of (A)YUV? + + Common::Rational _frameRate; + + Bundle _bundles[kSourceMAX]; ///< Bundles for decoding all data types. + + Common::Huffman *_huffman[16]; ///< The 16 Huffman codebooks used in Bink decoding. + + /** Huffman codebooks to use for decoding high nibbles in color data types. */ + Huffman _colHighHuffman[16]; + /** Value of the last decoded high nibble in color data types. */ + int _colLastVal; + + byte *_curPlanes[4]; ///< The 4 color planes, YUVA, current frame. + byte *_oldPlanes[4]; ///< The 4 color planes, YUVA, last frame. + + /** Initialize the bundles. */ + void initBundles(); + /** Deinitialize the bundles. */ + void deinitBundles(); + + /** Initialize the Huffman decoders. */ + void initHuffman(); + + /** Decode a plane. */ + void decodePlane(VideoFrame &video, int planeIdx, bool isChroma); + + /** Read/Initialize a bundle for decoding a plane. */ + void readBundle(VideoFrame &video, Source source); + + /** Read the symbols for a Huffman code. */ + void readHuffman(VideoFrame &video, Huffman &huffman); + /** Merge two Huffman symbol lists. */ + void mergeHuffmanSymbols(VideoFrame &video, byte *dst, const byte *src, int size); + + /** Read and translate a symbol out of a Huffman code. */ + byte getHuffmanSymbol(VideoFrame &video, Huffman &huffman); + + /** Get a direct value out of a bundle. */ + int32 getBundleValue(Source source); + /** Read a count value out of a bundle. */ + uint32 readBundleCount(VideoFrame &video, Bundle &bundle); + + // Handle the block types + void blockSkip (DecodeContext &ctx); + void blockScaledSkip (DecodeContext &ctx); + void blockScaledRun (DecodeContext &ctx); + void blockScaledIntra (DecodeContext &ctx); + void blockScaledFill (DecodeContext &ctx); + void blockScaledPattern(DecodeContext &ctx); + void blockScaledRaw (DecodeContext &ctx); + void blockScaled (DecodeContext &ctx); + void blockMotion (DecodeContext &ctx); + void blockRun (DecodeContext &ctx); + void blockResidue (DecodeContext &ctx); + void blockIntra (DecodeContext &ctx); + void blockFill (DecodeContext &ctx); + void blockInter (DecodeContext &ctx); + void blockPattern (DecodeContext &ctx); + void blockRaw (DecodeContext &ctx); + + // Read the bundles + void readRuns (VideoFrame &video, Bundle &bundle); + void readMotionValues(VideoFrame &video, Bundle &bundle); + void readBlockTypes (VideoFrame &video, Bundle &bundle); + void readPatterns (VideoFrame &video, Bundle &bundle); + void readColors (VideoFrame &video, Bundle &bundle); + void readDCS (VideoFrame &video, Bundle &bundle, int startBits, bool hasSign); + void readDCTCoeffs (VideoFrame &video, int16 *block, bool isIntra); + void readResidue (VideoFrame &video, int16 *block, int masksCount); + + // Bink video IDCT + void IDCT(int16 *block); + void IDCTPut(DecodeContext &ctx, int16 *block); + void IDCTAdd(DecodeContext &ctx, int16 *block); }; - Common::SeekableReadStream *_bink; + class BinkAudioTrack : public AudioTrack { + public: + BinkAudioTrack(AudioInfo &audio); + ~BinkAudioTrack(); + + /** Decode an audio packet. */ + void decodePacket(); - uint32 _id; ///< The BIK FourCC. + protected: + Audio::AudioStream *getAudioStream() const; - Common::Rational _frameRate; + private: + AudioInfo *_audioInfo; + Audio::QueuingAudioStream *_audioStream; - Graphics::Surface _surface; + float getFloat(); - Audio::SoundHandle _audioHandle; - Audio::QueuingAudioStream *_audioStream; - int32 _audioStartOffset; + /** Decode an audio block. */ + void audioBlock(int16 *out); + /** Decode a DCT'd audio block. */ + void audioBlockDCT(); + /** Decode a RDFT'd audio block. */ + void audioBlockRDFT(); - uint32 _videoFlags; ///< Video frame features. + void readAudioCoeffs(float *coeffs); - bool _hasAlpha; ///< Do video frames have alpha? - bool _swapPlanes; ///< Are the planes ordered (A)YVU instead of (A)YUV? + static void floatToInt16Interleave(int16 *dst, const float **src, uint32 length, uint8 channels); + }; + + Common::SeekableReadStream *_bink; - Common::Array _audioTracks; ///< All audio tracks. + Common::Array _audioTracks; ///< All audio tracks. Common::Array _frames; ///< All video frames. - uint32 _audioTrack; ///< Audio track to use. - - Common::Huffman *_huffman[16]; ///< The 16 Huffman codebooks used in Bink decoding. - - Bundle _bundles[kSourceMAX]; ///< Bundles for decoding all data types. - - /** Huffman codebooks to use for decoding high nibbles in color data types. */ - Huffman _colHighHuffman[16]; - /** Value of the last decoded high nibble in color data types. */ - int _colLastVal; - - byte *_curPlanes[4]; ///< The 4 color planes, YUVA, current frame. - byte *_oldPlanes[4]; ///< The 4 color planes, YUVA, last frame. - - - /** Initialize the bundles. */ - void initBundles(); - /** Deinitialize the bundles. */ - void deinitBundles(); - - /** Initialize the Huffman decoders. */ - void initHuffman(); - - /** Decode an audio packet. */ - void audioPacket(AudioTrack &audio); - /** Decode a video packet. */ - virtual void videoPacket(VideoFrame &video); - - /** Decode a plane. */ - void decodePlane(VideoFrame &video, int planeIdx, bool isChroma); - - /** Read/Initialize a bundle for decoding a plane. */ - void readBundle(VideoFrame &video, Source source); - - /** Read the symbols for a Huffman code. */ - void readHuffman(VideoFrame &video, Huffman &huffman); - /** Merge two Huffman symbol lists. */ - void mergeHuffmanSymbols(VideoFrame &video, byte *dst, const byte *src, int size); - - /** Read and translate a symbol out of a Huffman code. */ - byte getHuffmanSymbol(VideoFrame &video, Huffman &huffman); - - /** Get a direct value out of a bundle. */ - int32 getBundleValue(Source source); - /** Read a count value out of a bundle. */ - uint32 readBundleCount(VideoFrame &video, Bundle &bundle); - - // Handle the block types - void blockSkip (DecodeContext &ctx); - void blockScaledSkip (DecodeContext &ctx); - void blockScaledRun (DecodeContext &ctx); - void blockScaledIntra (DecodeContext &ctx); - void blockScaledFill (DecodeContext &ctx); - void blockScaledPattern(DecodeContext &ctx); - void blockScaledRaw (DecodeContext &ctx); - void blockScaled (DecodeContext &ctx); - void blockMotion (DecodeContext &ctx); - void blockRun (DecodeContext &ctx); - void blockResidue (DecodeContext &ctx); - void blockIntra (DecodeContext &ctx); - void blockFill (DecodeContext &ctx); - void blockInter (DecodeContext &ctx); - void blockPattern (DecodeContext &ctx); - void blockRaw (DecodeContext &ctx); - - // Read the bundles - void readRuns (VideoFrame &video, Bundle &bundle); - void readMotionValues(VideoFrame &video, Bundle &bundle); - void readBlockTypes (VideoFrame &video, Bundle &bundle); - void readPatterns (VideoFrame &video, Bundle &bundle); - void readColors (VideoFrame &video, Bundle &bundle); - void readDCS (VideoFrame &video, Bundle &bundle, int startBits, bool hasSign); - void readDCTCoeffs (VideoFrame &video, int16 *block, bool isIntra); - void readResidue (VideoFrame &video, int16 *block, int masksCount); - - void initAudioTrack(AudioTrack &audio); - - float getFloat(AudioTrack &audio); - - /** Decode an audio block. */ - void audioBlock (AudioTrack &audio, int16 *out); - /** Decode a DCT'd audio block. */ - void audioBlockDCT (AudioTrack &audio); - /** Decode a RDFT'd audio block. */ - void audioBlockRDFT(AudioTrack &audio); - - void readAudioCoeffs(AudioTrack &audio, float *coeffs); - - void floatToInt16Interleave(int16 *dst, const float **src, uint32 length, uint8 channels); - - // Bink video IDCT - void IDCT(int16 *block); - void IDCTPut(DecodeContext &ctx, int16 *block); - void IDCTAdd(DecodeContext &ctx, int16 *block); - - /** Start playing the audio track */ - void startAudio(); - /** Stop playing the audio track */ - void stopAudio(); + void initAudioTrack(AudioInfo &audio); }; } // End of namespace Video -- cgit v1.2.3 From 50a93c2e711f169089f6cfc0e09b82be0cce3210 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 25 Jul 2012 21:07:19 +0200 Subject: GRAPHICS: Small formatting fixes in iff.cpp. --- graphics/iff.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/graphics/iff.cpp b/graphics/iff.cpp index 7434a6bebc..4011126bd3 100644 --- a/graphics/iff.cpp +++ b/graphics/iff.cpp @@ -68,7 +68,7 @@ void ILBMDecoder::loadBitmap(uint32 mode, byte *buffer, Common::ReadStream *stre Graphics::PackBitsReadStream packStream(*stream); // setup a buffer to hold enough data to build a line in the output - uint32 scanlineWidth = ((_header.width + 15)/16) << 1; + uint32 scanlineWidth = ((_header.width + 15) / 16) << 1; byte *scanline = new byte[scanlineWidth * _header.depth]; for (uint i = 0; i < _header.height; ++i) { @@ -82,7 +82,7 @@ void ILBMDecoder::loadBitmap(uint32 mode, byte *buffer, Common::ReadStream *stre out += outPitch; } - delete []scanline; + delete[] scanline; break; } @@ -121,15 +121,12 @@ void ILBMDecoder::planarToChunky(byte *out, uint32 outPitch, byte *in, uint32 in // then output the pixel according to the requested packing if (!packPlanes) { out[x] = pix; - } else - if (nPlanes == 1) { - out[x/8] |= (pix << (x & 7)); - } else - if (nPlanes == 2) { - out[x/4] |= (pix << ((x & 3) << 1)); - } else - if (nPlanes == 4) { - out[x/2] |= (pix << ((x & 1) << 2)); + } else if (nPlanes == 1) { + out[x / 8] |= (pix << (x & 7)); + } else if (nPlanes == 2) { + out[x / 4] |= (pix << ((x & 3) << 1)); + } else if (nPlanes == 4) { + out[x / 2] |= (pix << ((x & 1) << 2)); } } @@ -187,7 +184,7 @@ struct PBMLoader { _surface = &surface; _colors = colors; Common::IFFParser parser(&input); - Common::Functor1Mem< Common::IFFChunk&, bool, PBMLoader > c(this, &PBMLoader::callback); + Common::Functor1Mem c(this, &PBMLoader::callback); parser.parse(c); } @@ -251,7 +248,7 @@ uint32 PackBitsReadStream::read(void *dataPtr, uint32 dataSize) { for (uint32 j = 0; j < lenW; j++) { *out++ = _input->readByte(); } - for ( ; lenR > lenW; lenR--) { + for (; lenR > lenW; lenR--) { _input->readByte(); } } else { // len > 128 -- cgit v1.2.3 From c7d99c155d28cdd609075278e94aaf91563297e4 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 25 Jul 2012 21:09:15 +0200 Subject: KYRA: Fix delete[] formatting. --- engines/kyra/eobcommon.cpp | 4 ++-- engines/kyra/screen_eob.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/kyra/eobcommon.cpp b/engines/kyra/eobcommon.cpp index a63f123258..fadb1066e0 100644 --- a/engines/kyra/eobcommon.cpp +++ b/engines/kyra/eobcommon.cpp @@ -770,7 +770,7 @@ void EoBCoreEngine::releaseItemsAndDecorationsShapes() { if (_spellShapes) { for (int i = 0; i < 4; i++) { if (_spellShapes[i]) - delete [] _spellShapes[i]; + delete[] _spellShapes[i]; } delete[] _spellShapes; } @@ -820,7 +820,7 @@ void EoBCoreEngine::releaseItemsAndDecorationsShapes() { if (_firebeamShapes[i]) delete[] _firebeamShapes[i]; } - delete []_firebeamShapes; + delete[] _firebeamShapes; } delete[] _redSplatShape; diff --git a/engines/kyra/screen_eob.cpp b/engines/kyra/screen_eob.cpp index e06ca42c40..ae75c111b4 100644 --- a/engines/kyra/screen_eob.cpp +++ b/engines/kyra/screen_eob.cpp @@ -607,7 +607,7 @@ uint8 *Screen_EoB::encodeShape(uint16 x, uint16 y, uint16 w, uint16 h, bool enco srcLineStart += SCREEN_W; src = srcLineStart; } - delete [] colorMap; + delete[] colorMap; } return shp; -- cgit v1.2.3 From 93d4eb14ad4a7ae1404a7c374925a7d7a6ad4143 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 25 Jul 2012 21:09:46 +0200 Subject: MOHAWK: Fix delete[] formatting. --- engines/mohawk/riven.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp index e54d6fefa2..32613c6185 100644 --- a/engines/mohawk/riven.cpp +++ b/engines/mohawk/riven.cpp @@ -646,7 +646,7 @@ Common::String MohawkEngine_Riven::getName(uint16 nameResource, uint16 nameID) { } delete nameStream; - delete [] stringOffsets; + delete[] stringOffsets; return name; } -- cgit v1.2.3 From d98b4621908215c74fbd307044381c0e7533bb55 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 25 Jul 2012 21:10:43 +0200 Subject: PARALLACTION: Fix delete[] formatting. --- engines/parallaction/disk_br.cpp | 2 +- engines/parallaction/disk_ns.cpp | 2 +- engines/parallaction/graphics.cpp | 2 +- engines/parallaction/graphics.h | 2 +- engines/parallaction/sound_ns.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp index 5e39c893db..ee981a2c7d 100644 --- a/engines/parallaction/disk_br.cpp +++ b/engines/parallaction/disk_br.cpp @@ -617,7 +617,7 @@ GfxObj* AmigaDisk_br::loadStatic(const char* name) { } } - delete []shadow; + delete[] shadow; delete stream; } diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp index 839b2c6834..8d4afd6847 100644 --- a/engines/parallaction/disk_ns.cpp +++ b/engines/parallaction/disk_ns.cpp @@ -832,7 +832,7 @@ void AmigaDisk_ns::decodeCnv(byte *data, uint16 numFrames, uint16 width, uint16 assert(buf); stream->read(buf, rawsize); unpackBitmap(data, buf, numFrames, bytesPerPlane, height); - delete []buf; + delete[] buf; } #undef NUM_PLANES diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 6868505c52..9855830478 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -766,7 +766,7 @@ Gfx::~Gfx() { freeLabels(); - delete []_unpackedBitmap; + delete[] _unpackedBitmap; return; } diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h index b43dd193b5..f8cb4b3647 100644 --- a/engines/parallaction/graphics.h +++ b/engines/parallaction/graphics.h @@ -144,7 +144,7 @@ public: ~Cnv() { if (_freeData) - delete []_data; + delete[] _data; } byte* getFramePtr(uint16 index) { diff --git a/engines/parallaction/sound_ns.cpp b/engines/parallaction/sound_ns.cpp index 3cc25b36b0..dcc71e4f2f 100644 --- a/engines/parallaction/sound_ns.cpp +++ b/engines/parallaction/sound_ns.cpp @@ -237,7 +237,7 @@ AmigaSoundMan_ns::~AmigaSoundMan_ns() { stopSfx(2); stopSfx(3); - delete []beepSoundBuffer; + delete[] beepSoundBuffer; } Audio::AudioStream *AmigaSoundMan_ns::loadChannelData(const char *filename, Channel *ch, bool looping) { -- cgit v1.2.3 From 155118dc1e85d4bbb1b678d6835d68c3e01f85f3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 25 Jul 2012 21:11:04 +0200 Subject: SWORD1: Fix delete[] formatting. --- engines/sword1/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp index 3574074b00..61bf5257ab 100644 --- a/engines/sword1/sound.cpp +++ b/engines/sword1/sound.cpp @@ -142,7 +142,7 @@ void Sound::checkSpeechFileEndianness() { be_diff_sum += fabs((double)(be_value - prev_be_value)); prev_be_value = be_value; } - delete [] data; + delete[] data; } // Set the big endian flag _bigEndianSpeech = (be_diff_sum < le_diff_sum); -- cgit v1.2.3 From 3351707b2dbaba0d6b4bd21d4f62c2653f5a9354 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 25 Jul 2012 21:11:22 +0200 Subject: TOON: Fix delete[] formatting. --- engines/toon/audio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/toon/audio.cpp b/engines/toon/audio.cpp index 77822ab078..bc0e051057 100644 --- a/engines/toon/audio.cpp +++ b/engines/toon/audio.cpp @@ -326,7 +326,7 @@ bool AudioStreamInstance::readPacket() { } if (numDecompressedBytes > _bufferMaxSize) { - delete [] _buffer; + delete[] _buffer; _bufferMaxSize = numDecompressedBytes; _buffer = new int16[numDecompressedBytes]; } -- cgit v1.2.3 From dc8d9f4c9f7498f501b567262d0e90229b973e6e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 25 Jul 2012 21:11:45 +0200 Subject: SCI: Fix delete[] formatting. --- engines/sci/graphics/font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/graphics/font.cpp b/engines/sci/graphics/font.cpp index fcdd057509..30184cc091 100644 --- a/engines/sci/graphics/font.cpp +++ b/engines/sci/graphics/font.cpp @@ -54,7 +54,7 @@ GfxFontFromResource::GfxFontFromResource(ResourceManager *resMan, GfxScreen *scr } GfxFontFromResource::~GfxFontFromResource() { - delete []_chars; + delete[] _chars; _resMan->unlockResource(_resource); } -- cgit v1.2.3 From 321197e9629e6bfebac5e7909549df54a5b035ea Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 26 Jul 2012 01:53:48 +0100 Subject: TEENAGENT: Fix typo in processCallback() address. 0x50c5 is invalid, replaced with valid 0x505c. --- engines/teenagent/callbacks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp index 46d9b7d2f9..934727a478 100644 --- a/engines/teenagent/callbacks.cpp +++ b/engines/teenagent/callbacks.cpp @@ -2252,7 +2252,7 @@ bool TeenAgentEngine::processCallback(uint16 addr) { return true; case 0x78e0: - processCallback(0x50c5); + processCallback(0x505c); return false; case 0x78e7: -- cgit v1.2.3 From c0beaf2337bdadc8b18425c9a38182ba30910174 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 26 Jul 2012 11:05:50 +0300 Subject: SCI: Differentiate between screen width and pitch This properly addresses the odd screen width (630) in Phantasmagoria 1 --- engines/sci/graphics/frameout.cpp | 36 +++++++++++-------------- engines/sci/graphics/screen.cpp | 55 +++++++++++++++++++++------------------ engines/sci/graphics/screen.h | 1 + 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index fedae2eb6f..0098728e5d 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -125,23 +125,17 @@ void GfxFrameout::kernelAddPlane(reg_t object) { if (_planes.empty()) { // There has to be another way for sierra sci to do this or maybe script resolution is compiled into // interpreter (TODO) - uint16 tmpRunningWidth = readSelectorValue(_segMan, object, SELECTOR(resX)); - uint16 tmpRunningHeight = readSelectorValue(_segMan, object, SELECTOR(resY)); + uint16 scriptWidth = readSelectorValue(_segMan, object, SELECTOR(resX)); + uint16 scriptHeight = readSelectorValue(_segMan, object, SELECTOR(resY)); - // The above can be 0 in SCI3 (e.g. Phantasmagoria 2) - if (tmpRunningWidth == 0 && tmpRunningHeight == 0) { - tmpRunningWidth = 320; - tmpRunningHeight = 200; - } - - // HACK: Phantasmagoria 1 sets a window size of 630x450. - // We can't set a width of 630, as that messes up the pitch, so we hack - // the internal script width here - if (g_sci->getGameId() == GID_PHANTASMAGORIA) { - tmpRunningWidth = 325; + // Phantasmagoria 2 doesn't specify a script width/height + if (g_sci->getGameId() == GID_PHANTASMAGORIA2) { + scriptWidth = 640; + scriptHeight = 480; } - _coordAdjuster->setScriptsResolution(tmpRunningWidth, tmpRunningHeight); + assert(scriptWidth > 0 && scriptHeight > 0); + _coordAdjuster->setScriptsResolution(scriptWidth, scriptHeight); } // Import of QfG character files dialog is shown in QFG4. @@ -704,13 +698,13 @@ void GfxFrameout::kernelFrameout() { // TODO: maybe we should clip the cels rect with this, i'm not sure // the only currently known usage is game menu of gk1 } else if (view) { - if ((itemEntry->scaleX == 128) && (itemEntry->scaleY == 128)) - view->getCelRect(itemEntry->loopNo, itemEntry->celNo, - itemEntry->x, itemEntry->y, itemEntry->z, itemEntry->celRect); - else - view->getCelScaledRect(itemEntry->loopNo, itemEntry->celNo, - itemEntry->x, itemEntry->y, itemEntry->z, itemEntry->scaleX, - itemEntry->scaleY, itemEntry->celRect); + if ((itemEntry->scaleX == 128) && (itemEntry->scaleY == 128)) + view->getCelRect(itemEntry->loopNo, itemEntry->celNo, + itemEntry->x, itemEntry->y, itemEntry->z, itemEntry->celRect); + else + view->getCelScaledRect(itemEntry->loopNo, itemEntry->celNo, + itemEntry->x, itemEntry->y, itemEntry->z, itemEntry->scaleX, + itemEntry->scaleY, itemEntry->celRect); Common::Rect nsRect = itemEntry->celRect; // Translate back to actual coordinate within scrollable plane diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp index 3030fb4386..246b6bfff9 100644 --- a/engines/sci/graphics/screen.cpp +++ b/engines/sci/graphics/screen.cpp @@ -53,23 +53,35 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) { #ifdef ENABLE_SCI32 // GK1 Mac uses a 640x480 resolution too - if (g_sci->getGameId() == GID_GK1 && g_sci->getPlatform() == Common::kPlatformMacintosh) - _upscaledHires = GFX_SCREEN_UPSCALED_640x480; + if (g_sci->getPlatform() == Common::kPlatformMacintosh) { + if (g_sci->getGameId() == GID_GK1) + _upscaledHires = GFX_SCREEN_UPSCALED_640x480; + } #endif if (_resMan->detectHires()) { _width = 640; + _pitch = 640; _height = 480; } else { _width = 320; + _pitch = 320; _height = getLowResScreenHeight(); } +#ifdef ENABLE_SCI32 + // Phantasmagoria 1 sets a window area of 630x450 + if (g_sci->getGameId() == GID_PHANTASMAGORIA) { + _width = 630; + _height = 450; + } +#endif + // Japanese versions of games use hi-res font on upscaled version of the game. if ((g_sci->getLanguage() == Common::JA_JPN) && (getSciVersion() <= SCI_VERSION_1_1)) _upscaledHires = GFX_SCREEN_UPSCALED_640x400; - _pixels = _width * _height; + _pixels = _pitch * _height; switch (_upscaledHires) { case GFX_SCREEN_UPSCALED_640x400: @@ -91,19 +103,12 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) { _upscaledMapping[i] = (i * 12) / 5; break; default: - _displayWidth = _width; + _displayWidth = _pitch; _displayHeight = _height; memset(&_upscaledMapping, 0, sizeof(_upscaledMapping) ); break; } - // Phantasmagoria 1 sets a window area of 630x450 - if (g_sci->getGameId() == GID_PHANTASMAGORIA) { - // TODO: Also set width to 630 (can't be set right now, as it messes up - // the pitch). For now, a hack has been placed in GfxFrameout::kernelAddPlane() - _height = 450; - } - _displayPixels = _displayWidth * _displayHeight; _visualScreen = (byte *)calloc(_pixels, 1); _priorityScreen = (byte *)calloc(_pixels, 1); @@ -214,7 +219,7 @@ byte GfxScreen::getDrawingMask(byte color, byte prio, byte control) { } void GfxScreen::putPixel(int x, int y, byte drawMask, byte color, byte priority, byte control) { - int offset = y * _width + x; + int offset = y * _pitch + x; if (drawMask & GFX_SCREEN_MASK_VISUAL) { _visualScreen[offset] = color; @@ -247,7 +252,7 @@ void GfxScreen::putFontPixel(int startingY, int x, int y, byte color) { // Do not scale ourselves, but put it on the display directly putPixelOnDisplay(x, y + startingY, color); } else { - int offset = (startingY + y) * _width + x; + int offset = (startingY + y) * _pitch + x; _visualScreen[offset] = color; if (!_upscaledHires) { @@ -349,19 +354,19 @@ void GfxScreen::putKanjiChar(Graphics::FontSJIS *commonFont, int16 x, int16 y, u } byte GfxScreen::getVisual(int x, int y) { - return _visualScreen[y * _width + x]; + return _visualScreen[y * _pitch + x]; } byte GfxScreen::getPriority(int x, int y) { - return _priorityScreen[y * _width + x]; + return _priorityScreen[y * _pitch + x]; } byte GfxScreen::getControl(int x, int y) { - return _controlScreen[y * _width + x]; + return _controlScreen[y * _pitch + x]; } byte GfxScreen::isFillMatch(int16 x, int16 y, byte screenMask, byte t_color, byte t_pri, byte t_con, bool isEGA) { - int offset = y * _width + x; + int offset = y * _pitch + x; byte match = 0; if (screenMask & GFX_SCREEN_MASK_VISUAL) { @@ -422,14 +427,14 @@ void GfxScreen::bitsSave(Common::Rect rect, byte mask, byte *memoryPtr) { memcpy(memoryPtr, (void *)&mask, sizeof(mask)); memoryPtr += sizeof(mask); if (mask & GFX_SCREEN_MASK_VISUAL) { - bitsSaveScreen(rect, _visualScreen, _width, memoryPtr); + bitsSaveScreen(rect, _visualScreen, _pitch, memoryPtr); bitsSaveDisplayScreen(rect, memoryPtr); } if (mask & GFX_SCREEN_MASK_PRIORITY) { - bitsSaveScreen(rect, _priorityScreen, _width, memoryPtr); + bitsSaveScreen(rect, _priorityScreen, _pitch, memoryPtr); } if (mask & GFX_SCREEN_MASK_CONTROL) { - bitsSaveScreen(rect, _controlScreen, _width, memoryPtr); + bitsSaveScreen(rect, _controlScreen, _pitch, memoryPtr); } if (mask & GFX_SCREEN_MASK_DISPLAY) { if (!_upscaledHires) @@ -482,14 +487,14 @@ void GfxScreen::bitsRestore(byte *memoryPtr) { memcpy((void *)&mask, memoryPtr, sizeof(mask)); memoryPtr += sizeof(mask); if (mask & GFX_SCREEN_MASK_VISUAL) { - bitsRestoreScreen(rect, memoryPtr, _visualScreen, _width); + bitsRestoreScreen(rect, memoryPtr, _visualScreen, _pitch); bitsRestoreDisplayScreen(rect, memoryPtr); } if (mask & GFX_SCREEN_MASK_PRIORITY) { - bitsRestoreScreen(rect, memoryPtr, _priorityScreen, _width); + bitsRestoreScreen(rect, memoryPtr, _priorityScreen, _pitch); } if (mask & GFX_SCREEN_MASK_CONTROL) { - bitsRestoreScreen(rect, memoryPtr, _controlScreen, _width); + bitsRestoreScreen(rect, memoryPtr, _controlScreen, _pitch); } if (mask & GFX_SCREEN_MASK_DISPLAY) { if (!_upscaledHires) @@ -567,7 +572,7 @@ void GfxScreen::dither(bool addToFlag) { if (!_unditheringEnabled) { // Do dithering on visual and display-screen for (y = 0; y < _height; y++) { - for (x = 0; x < _width; x++) { + for (x = 0; x < _pitch; x++) { color = *visualPtr; if (color & 0xF0) { color ^= color << 4; @@ -592,7 +597,7 @@ void GfxScreen::dither(bool addToFlag) { memset(&_ditheredPicColors, 0, sizeof(_ditheredPicColors)); // Do dithering on visual screen and put decoded but undithered byte onto display-screen for (y = 0; y < _height; y++) { - for (x = 0; x < _width; x++) { + for (x = 0; x < _pitch; x++) { color = *visualPtr; if (color & 0xF0) { color ^= color << 4; diff --git a/engines/sci/graphics/screen.h b/engines/sci/graphics/screen.h index 73ea596ba1..01fb899edb 100644 --- a/engines/sci/graphics/screen.h +++ b/engines/sci/graphics/screen.h @@ -132,6 +132,7 @@ public: private: uint16 _width; + uint16 _pitch; uint16 _height; uint _pixels; uint16 _displayWidth; -- cgit v1.2.3 From 34d00f59365cf05a8817ade955a6440ab3019860 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 26 Jul 2012 11:06:19 +0300 Subject: SCI: Add some debug code to op_line --- engines/sci/engine/vm.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 5a2a39def2..3f43966976 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -1173,6 +1173,7 @@ void run_vm(EngineState *s) { case op_line: // 0x3f (63) // Debug opcode (line number) + //debug("Script %d, line %d", scr->getScriptNumber(), opparams[0]); break; case op_lag: // 0x40 (64) -- cgit v1.2.3 From 7eded163d8088d97f65e482f63e9ecd194d00c68 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 27 Jul 2012 01:30:37 +0300 Subject: SCI: Add support for kCD(0) with a parameter It's now possible to start a chapter in Phantasmagoria 1 --- engines/sci/engine/kfile.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 786276221c..f7cc4f44b5 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -197,8 +197,15 @@ reg_t kCD(EngineState *s, int argc, reg_t *argv) { // TODO: Stub switch (argv[0].toUint16()) { case 0: - // Return whether the contents of disc argv[1] is available. - return TRUE_REG; + if (argc == 1) { + // Check if a disc is in the drive + return TRUE_REG; + } else { + // Check if the specified disc is in the drive + // and return the current disc number. We just + // return the requested disc number. + return argv[1]; + } case 1: // Return the current CD number return make_reg(0, 1); -- cgit v1.2.3 From 831e1b27dc5b114eaceb49bad08576b3bdf81ab5 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 27 Jul 2012 01:31:12 +0300 Subject: SCI: Add a workaround for a bug in Phantasmagoria 1 --- engines/sci/engine/workarounds.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index 821549bb8c..fea3aed9ae 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -40,6 +40,7 @@ const SciWorkaroundEntry arithmeticWorkarounds[] = { { GID_MOTHERGOOSE256, -1, 999, 0, "Event", "new", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_and: constantly during the game (SCI1 version) { GID_MOTHERGOOSE256, -1, 4, 0, "rm004", "doit", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_or: when going north and reaching the castle (rooms 4 and 37) - bug #3038228 { GID_MOTHERGOOSEHIRES,90, 90, 0, "newGameButton", "select", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_ge: MUMG Deluxe, when selecting "New Game" in the main menu. It tries to compare an integer with a list. Needs to return false for the game to continue. + { GID_PHANTASMAGORIA, 902, 0, 0, "", "export 7", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_shr: when starting a chapter in Phantasmagoria { GID_QFG1VGA, 301, 928, 0, "Blink", "init", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_div: when entering the inn, gets called with 1 parameter, but 2nd parameter is used for div which happens to be an object { GID_QFG2, 200, 200, 0, "astro", "messages", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_lsi: when getting asked for your name by the astrologer bug #3039879 { GID_GK1, 800,64992, 0, "Fwd", "doit", -1, 0, { WORKAROUND_FAKE, 1 } }, // op_gt: when Mosely finds Gabriel and Grace near the end of the game, compares the Grooper object with 7 -- cgit v1.2.3 From af6e98ba0108fc87c5aea2e85a1aef80443937b5 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 26 Jul 2012 23:20:25 -0400 Subject: VIDEO: Ignore finished video tracks in findNextVideoTrack() --- video/video_decoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 8b9a009b98..9282cd82d0 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -575,7 +575,7 @@ AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack() { uint32 bestTime = 0xFFFFFFFF; for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) { - if ((*it)->getTrackType() == Track::kTrackTypeVideo) { + if ((*it)->getTrackType() == Track::kTrackTypeVideo && !(*it)->endOfTrack()) { VideoTrack *track = (VideoTrack *)*it; uint32 time = track->getNextFrameStartTime(); @@ -594,7 +594,7 @@ const AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack uint32 bestTime = 0xFFFFFFFF; for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) { - if ((*it)->getTrackType() == Track::kTrackTypeVideo) { + if ((*it)->getTrackType() == Track::kTrackTypeVideo && !(*it)->endOfTrack()) { const VideoTrack *track = (const VideoTrack *)*it; uint32 time = track->getNextFrameStartTime(); -- cgit v1.2.3 From 2eeee33bd878a5cd385b4423f6867d0e6a3ed0b6 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 26 Jul 2012 23:24:54 -0400 Subject: VIDEO: Move findNextVideoTrack() to protected --- video/video_decoder.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/video/video_decoder.h b/video/video_decoder.h index a6dbed8fc5..dfe0fff66b 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -679,12 +679,20 @@ protected: */ Graphics::PixelFormat getDefaultHighColorFormat() const { return _defaultHighColorFormat; } + /** + * Find the video track with the lowest start time for the next frame + */ + VideoTrack *findNextVideoTrack(); + + /** + * Find the video track with the lowest start time for the next frame + */ + const VideoTrack *findNextVideoTrack() const; + private: // Tracks owned by this AdvancedVideoDecoder typedef Common::Array TrackList; TrackList _tracks; - VideoTrack *findNextVideoTrack(); - const VideoTrack *findNextVideoTrack() const; // Current playback status bool _isPlaying, _needsRewind; -- cgit v1.2.3 From 84462fa088d64acc2a7b2811f88a5a292abe00db Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 26 Jul 2012 23:36:21 -0400 Subject: VIDEO: Document more of AdvancedVideoDecoder --- video/video_decoder.h | 83 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 77 insertions(+), 6 deletions(-) diff --git a/video/video_decoder.h b/video/video_decoder.h index dfe0fff66b..0c569692fc 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -265,7 +265,7 @@ protected: */ virtual void updateBalance() {} - int32 _curFrame; + int32 _curFrame; // This variable is now deprecated. int32 _startTime; // FIXME: These are protected until the new API takes over this one @@ -500,15 +500,56 @@ protected: TrackType getTrackType() const { return kTrackTypeVideo; } - // TODO: Document + /** + * Get the width of this track + */ virtual uint16 getWidth() const = 0; + + /** + * Get the height of this track + */ virtual uint16 getHeight() const = 0; + + /** + * Get the pixel format of this track + */ virtual Graphics::PixelFormat getPixelFormat() const = 0; + + /** + * Get the current frame of this track + * + * @see VideoDecoder::getCurFrame() + */ virtual int getCurFrame() const = 0; + + /** + * Get the frame count of this track + * + * @note If the frame count is unknown, return 0 (which is also + * the default implementation of the function). However, one must + * also implement endOfTrack() in that case. + */ virtual int getFrameCount() const { return 0; } + + /** + * Get the start time of the next frame in milliseconds since + * the start of the video + */ virtual uint32 getNextFrameStartTime() const = 0; + + /** + * Decode the next frame + */ virtual const Graphics::Surface *decodeNextFrame() = 0; + + /** + * Get the palette currently in use by this track + */ virtual const byte *getPalette() const { return 0; } + + /** + * Does the palette currently in use by this track need to be updated? + */ virtual bool hasDirtyPalette() const { return false; } }; @@ -547,19 +588,43 @@ protected: void start(); void stop(); - // TODO: Document + /** + * Get the volume for this track + */ byte getVolume() const { return _volume; } + + /** + * Set the volume for this track + */ void setVolume(byte volume); + + /** + * Get the balance for this track + */ int8 getBalance() const { return _balance; } + + /** + * Set the balance for this track + */ void setBalance(int8 balance); + + /** + * Get the time the AudioStream behind this track has been + * running + */ uint32 getRunningTime() const; + /** + * Get the sound type to be used when playing this audio track + */ virtual Audio::Mixer::SoundType getSoundType() const { return Audio::Mixer::kPlainSoundType; } protected: void pauseIntern(bool pause); - // TODO: Document + /** + * Get the AudioStream that is the representation of this AudioTrack + */ virtual Audio::AudioStream *getAudioStream() const = 0; private: @@ -583,7 +648,10 @@ protected: protected: Audio::AudioStream *getAudioStream() const; - // TODO: Document + /** + * Get the RewindableAudioStream pointer to be used by this class + * for rewind() and getAudioStream() + */ virtual Audio::RewindableAudioStream *getRewindableAudioStream() const = 0; }; @@ -604,7 +672,10 @@ protected: protected: Audio::AudioStream *getAudioStream() const; - // TODO: Document + /** + * Get the SeekableAudioStream pointer to be used by this class + * for seek(), getDuration(), and getAudioStream() + */ virtual Audio::SeekableAudioStream *getSeekableAudioStream() const = 0; }; -- cgit v1.2.3 From df5d6f7d08c30afa270fd7d3e2d0f885eaf3c7bc Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 26 Jul 2012 23:42:35 -0400 Subject: VIDEO: Force an update after a seek --- video/video_decoder.cpp | 8 +++++++- video/video_decoder.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 9282cd82d0..9d6d40f7fb 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -101,6 +101,7 @@ AdvancedVideoDecoder::AdvancedVideoDecoder() { _audioVolume = Audio::Mixer::kMaxChannelVolume; _audioBalance = 0; _pauseLevel = 0; + _needsUpdate = false; // Find the best format for output _defaultHighColorFormat = g_system->getScreenFormat(); @@ -124,6 +125,7 @@ void AdvancedVideoDecoder::close() { _audioVolume = Audio::Mixer::kMaxChannelVolume; _audioBalance = 0; _pauseLevel = 0; + _needsUpdate = false; } bool AdvancedVideoDecoder::isVideoLoaded() const { @@ -155,6 +157,8 @@ Graphics::PixelFormat AdvancedVideoDecoder::getPixelFormat() const { } const Graphics::Surface *AdvancedVideoDecoder::decodeNextFrame() { + _needsUpdate = false; + readNextPacket(); VideoTrack *track = findNextVideoTrack(); @@ -215,7 +219,7 @@ uint32 AdvancedVideoDecoder::getTime() const { } uint32 AdvancedVideoDecoder::getTimeToNextFrame() const { - if (endOfVideo()) + if (endOfVideo() || _needsUpdate) return 0; const VideoTrack *track = findNextVideoTrack(); @@ -310,6 +314,7 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) { _audioStartOffset = time; _startTime = g_system->getMillis() - time.msecs(); + _needsUpdate = true; return true; } @@ -337,6 +342,7 @@ void AdvancedVideoDecoder::stop() { _audioStartOffset = 0; _palette = 0; _dirtyPalette = false; + _needsUpdate = false; stopAllTracks(); diff --git a/video/video_decoder.h b/video/video_decoder.h index 0c569692fc..ffeecd326d 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -766,7 +766,7 @@ private: TrackList _tracks; // Current playback status - bool _isPlaying, _needsRewind; + bool _isPlaying, _needsRewind, _needsUpdate; Audio::Timestamp _audioStartOffset; // Palette settings from individual tracks -- cgit v1.2.3 From 1f67c9dbbed5e92d8b9cb8f4d729366463a05937 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 26 Jul 2012 23:44:40 -0400 Subject: VIDEO: Reset pause time when seeking/rewinding --- video/video_decoder.cpp | 2 ++ video/video_decoder.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 9d6d40f7fb..77eab3a6e1 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -280,6 +280,7 @@ bool AdvancedVideoDecoder::rewind() { _audioStartOffset = 0; _startTime = g_system->getMillis(); + resetPauseStartTime(); return true; } @@ -314,6 +315,7 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) { _audioStartOffset = time; _startTime = g_system->getMillis() - time.msecs(); + resetPauseStartTime(); _needsUpdate = true; return true; } diff --git a/video/video_decoder.h b/video/video_decoder.h index ffeecd326d..f0427668a6 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -249,7 +249,6 @@ protected: /** * Reset the pause start time (which should be called when seeking) - * @note This function is now deprecated. There is no replacement. */ void resetPauseStartTime(); -- cgit v1.2.3 From 2c4518d6154a0ae9772fe19a629f05c750ab19c8 Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 22 Jul 2012 19:22:49 -0400 Subject: LASTEXPRESS: Move some macros to entity.h --- engines/lastexpress/entities/entity.h | 23 +++++++++++++++++++++++ engines/lastexpress/entities/entity_intern.h | 20 -------------------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 5ba78abc17..7ff574ddbe 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -41,6 +41,29 @@ class Sequence; class SequenceFrame; struct SavePoint; + +////////////////////////////////////////////////////////////////////////// +// Callbacks +#define ENTITY_CALLBACK(class, name, pointer) \ + Common::Functor1Mem(pointer, &class::name) + +#define ADD_CALLBACK_FUNCTION(class, name) \ + _callbacks.push_back(new ENTITY_CALLBACK(class, name, this)); + +#define ADD_NULL_FUNCTION() \ + _callbacks.push_back(new ENTITY_CALLBACK(Entity, nullfunction, this)); + +////////////////////////////////////////////////////////////////////////// +// Parameters macros +////////////////////////////////////////////////////////////////////////// +#define CURRENT_PARAM(index, id) \ + ((EntityData::EntityParametersIIII*)_data->getCurrentParameters(index))->param##id + +#define ENTITY_PARAM(index, id) \ + ((EntityData::EntityParametersIIII*)_data->getParameters(8, index))->param##id + + + class EntityData : Common::Serializable { public: diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 64814a1b40..576765620f 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -25,17 +25,6 @@ namespace LastExpress { -////////////////////////////////////////////////////////////////////////// -// Callbacks -#define ENTITY_CALLBACK(class, name, pointer) \ - Common::Functor1Mem(pointer, &class::name) - -#define ADD_CALLBACK_FUNCTION(class, name) \ - _callbacks.push_back(new ENTITY_CALLBACK(class, name, this)); - -#define ADD_NULL_FUNCTION() \ - _callbacks.push_back(new ENTITY_CALLBACK(Entity, nullfunction, this)); - ////////////////////////////////////////////////////////////////////////// // Declaration ////////////////////////////////////////////////////////////////////////// @@ -307,15 +296,6 @@ void class::setup_##name() { \ getEntities()->resetState(entity); \ ((class *)getEntities()->get(entity))->function(); -////////////////////////////////////////////////////////////////////////// -// Parameters macros (for default IIII parameters) -////////////////////////////////////////////////////////////////////////// -#define CURRENT_PARAM(index, id) \ - ((EntityData::EntityParametersIIII*)_data->getCurrentParameters(index))->param##id - -#define ENTITY_PARAM(index, id) \ - ((EntityData::EntityParametersIIII*)_data->getParameters(8, index))->param##id - ////////////////////////////////////////////////////////////////////////// // Time check macros ////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 5d4a8f1e15c9b90209cbd4572ef17552cc06d65c Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 22 Jul 2012 20:27:23 -0400 Subject: LASTEXPRESS: Remove use of function wrappers in shared entity functions --- engines/lastexpress/entities/alouan.cpp | 8 ++++---- engines/lastexpress/entities/coudert.cpp | 20 ++++++++++---------- engines/lastexpress/entities/entity.cpp | 20 ++++++++++---------- engines/lastexpress/entities/entity.h | 22 ++++++++-------------- engines/lastexpress/entities/hadija.cpp | 8 ++++---- engines/lastexpress/entities/mertens.cpp | 20 ++++++++++---------- 6 files changed, 46 insertions(+), 52 deletions(-) diff --git a/engines/lastexpress/entities/alouan.cpp b/engines/lastexpress/entities/alouan.cpp index 8e56ae4c5b..589b712b16 100644 --- a/engines/lastexpress/entities/alouan.cpp +++ b/engines/lastexpress/entities/alouan.cpp @@ -86,22 +86,22 @@ IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(6, Alouan, compartment6) - Entity::goToCompartment(savepoint, kObjectCompartment6, kPosition_4070, "621Cf", "621Df", WRAP_ENTER_FUNCTION(Alouan, setup_enterExitCompartment)); + Entity::goToCompartment(savepoint, kObjectCompartment6, kPosition_4070, "621Cf", "621Df"); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(7, Alouan, compartment8) - Entity::goToCompartment(savepoint, kObjectCompartment8, kPosition_2740, "621Ch", "621Dh", WRAP_ENTER_FUNCTION(Alouan, setup_enterExitCompartment)); + Entity::goToCompartment(savepoint, kObjectCompartment8, kPosition_2740, "621Ch", "621Dh"); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(8, Alouan, compartment6to8) - Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment6, kPosition_4070, "621Bf", kObjectCompartment8, kPosition_2740, "621Ah", WRAP_ENTER_FUNCTION(Alouan, setup_enterExitCompartment), WRAP_UPDATE_FUNCTION(Alouan, setup_updateEntity)); + Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment6, kPosition_4070, "621Bf", kObjectCompartment8, kPosition_2740, "621Ah"); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(9, Alouan, compartment8to6) - Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment8, kPosition_2740, "621Bh", kObjectCompartment6, kPosition_4070, "621Af", WRAP_ENTER_FUNCTION(Alouan, setup_enterExitCompartment), WRAP_UPDATE_FUNCTION(Alouan, setup_updateEntity)); + Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment8, kPosition_2740, "621Bh", kObjectCompartment6, kPosition_4070, "621Af"); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp index 77cddddf48..e79d4cdff7 100644 --- a/engines/lastexpress/entities/coudert.cpp +++ b/engines/lastexpress/entities/coudert.cpp @@ -115,7 +115,7 @@ IMPLEMENT_FUNCTION_S(2, Coudert, bloodJacket) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); + Entity::savegameBloodJacket(); break; case kActionExitCompartment: @@ -142,7 +142,7 @@ IMPLEMENT_FUNCTION_SI(3, Coudert, enterExitCompartment, ObjectIndex) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); + Entity::savegameBloodJacket(); return; case kActionCallback: @@ -168,7 +168,7 @@ IMPLEMENT_FUNCTION(4, Coudert, callbackActionOnDirection) break; } - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); + Entity::savegameBloodJacket(); break; case kActionExitCompartment: @@ -191,7 +191,7 @@ IMPLEMENT_FUNCTION_SIII(5, Coudert, enterExitCompartment2, ObjectIndex, EntityPo break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); + Entity::savegameBloodJacket(); return; case kActionCallback: @@ -212,7 +212,7 @@ IMPLEMENT_FUNCTION_S(6, Coudert, playSound) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); + Entity::savegameBloodJacket(); break; case kActionEndSound: @@ -241,7 +241,7 @@ IMPLEMENT_FUNCTION_NOSETUP(7, Coudert, playSound16) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); + Entity::savegameBloodJacket(); break; case kActionEndSound: @@ -354,7 +354,7 @@ IMPLEMENT_FUNCTION_I(10, Coudert, updateFromTime, uint32) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); + Entity::savegameBloodJacket(); UPDATE_PARAM(params->param2, getState()->time, params->param1); @@ -377,7 +377,7 @@ IMPLEMENT_FUNCTION_I(11, Coudert, updateFromTicks, uint32) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); + Entity::savegameBloodJacket(); UPDATE_PARAM(params->param2, getState()->timeTicks, params->param1); @@ -451,7 +451,7 @@ IMPLEMENT_FUNCTION_II(13, Coudert, function13, bool, EntityIndex) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); + Entity::savegameBloodJacket(); if (!params->param2 && !params->param3) { @@ -573,7 +573,7 @@ IMPLEMENT_FUNCTION_I(14, Coudert, function14, EntityIndex) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Coudert, setup_savegame)); + Entity::savegameBloodJacket(); break; case kActionDefault: diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 1ad6d08035..4c661a4915 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -254,7 +254,7 @@ void Entity::savegame(const SavePoint &savepoint) { } } -void Entity::savegameBloodJacket(SaveFunction *saveFunction) { +void Entity::savegameBloodJacket() { if (getProgress().jacket == kJacketBlood && getEntities()->isDistanceBetweenEntities(_entityIndex, kEntityPlayer, 1000) && !getEntities()->isInsideCompartments(kEntityPlayer) @@ -266,11 +266,11 @@ void Entity::savegameBloodJacket(SaveFunction *saveFunction) { break; case kEntityCoudert: - (*saveFunction)(kSavegameTypeEvent, kEventCoudertBloodJacket); + setup_savegame(kSavegameTypeEvent, kEventCoudertBloodJacket); break; case kEntityMertens: - (*saveFunction)(kSavegameTypeEvent, kEventCoudertBloodJacket); + setup_savegame(kSavegameTypeEvent, kEventCoudertBloodJacket); break; } } @@ -488,7 +488,7 @@ void Entity::enterExitCompartment(const SavePoint &savepoint, EntityPosition pos } } -void Entity::goToCompartment(const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, Common::String sequenceTo, Entity::EnterFunction *enterFunction) { +void Entity::goToCompartment(const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, Common::String sequenceTo) { switch (savepoint.action) { default: break; @@ -496,7 +496,7 @@ void Entity::goToCompartment(const SavePoint &savepoint, ObjectIndex compartment case kActionDefault: getData()->entityPosition = positionFrom; setCallback(1); - (*enterFunction)(sequenceFrom.c_str(), compartmentFrom); + setup_enterExitCompartment(sequenceFrom.c_str(), compartmentFrom); break; case kActionCallback: @@ -506,7 +506,7 @@ void Entity::goToCompartment(const SavePoint &savepoint, ObjectIndex compartment case 1: setCallback(2); - (*enterFunction)(sequenceTo.c_str(), compartmentFrom); + setup_enterExitCompartment(sequenceTo.c_str(), compartmentFrom); break; case 2: @@ -519,7 +519,7 @@ void Entity::goToCompartment(const SavePoint &savepoint, ObjectIndex compartment } } -void Entity::goToCompartmentFromCompartment(const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, ObjectIndex compartmentTo, EntityPosition positionTo, Common::String sequenceTo, Entity::EnterFunction *enterFunction, Entity::UpdateFunction *updateFunction) { +void Entity::goToCompartmentFromCompartment(const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, ObjectIndex compartmentTo, EntityPosition positionTo, Common::String sequenceTo) { switch (savepoint.action) { default: break; @@ -528,7 +528,7 @@ void Entity::goToCompartmentFromCompartment(const SavePoint &savepoint, ObjectIn getData()->entityPosition = positionFrom; getData()->location = kLocationOutsideCompartment; setCallback(1); - (*enterFunction)(sequenceFrom.c_str(), compartmentFrom); + setup_enterExitCompartment(sequenceFrom.c_str(), compartmentFrom); break; case kActionCallback: @@ -538,12 +538,12 @@ void Entity::goToCompartmentFromCompartment(const SavePoint &savepoint, ObjectIn case 1: setCallback(2); - (*updateFunction)(kCarGreenSleeping, positionTo); + setup_updateEntity(kCarGreenSleeping, positionTo); break; case 2: setCallback(3); - (*enterFunction)(sequenceTo.c_str(), compartmentTo); + setup_enterExitCompartment(sequenceTo.c_str(), compartmentTo); break; case 3: diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 7ff574ddbe..77c3793890 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -689,6 +689,11 @@ public: virtual void setup_chapter4() = 0; virtual void setup_chapter5() = 0; + // Shared functions + virtual void setup_savegame(SavegameType, uint32) { error("[Entity::setup_savegame] Trying to call the parent setup function. Use the specific entity function directly"); } + virtual void setup_enterExitCompartment(const char *, ObjectIndex) { error("[Entity::setup_enterExitCompartment] Trying to call the parent setup function. Use the specific entity function directly"); } + virtual void setup_updateEntity(CarIndex, EntityPosition) { error("[Entity::setup_updateEntity] Trying to call the parent setup function. Use the specific entity function directly"); } + // Serializable void saveLoadWithSerializer(Common::Serializer &ser) { _data->saveLoadWithSerializer(ser); } @@ -701,14 +706,6 @@ protected: EntityData *_data; Common::Array _callbacks; - typedef Common::Functor2 EnterFunction; - typedef Common::Functor2 UpdateFunction; - typedef Common::Functor2 SaveFunction; - - #define WRAP_ENTER_FUNCTION(className, method) new Common::Functor2Mem(this, &className::method) - #define WRAP_UPDATE_FUNCTION(className, method) new Common::Functor2Mem(this, &className::method) - #define WRAP_SAVE_FUNCTION(className, method) new Common::Functor2Mem(this, &className::method) - /** * Saves the game * @@ -723,7 +720,7 @@ protected: * * @param saveFunction The setup function to call to save the game */ - void savegameBloodJacket(SaveFunction *saveFunction); + void savegameBloodJacket(); /** * Play sound @@ -836,9 +833,8 @@ protected: * @param positionFrom The position from. * @param sequenceFrom The sequence from. * @param sequenceTo The sequence to. - * @param enterFunction The enter/exit compartment function. */ - void goToCompartment(const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, Common::String sequenceTo, EnterFunction *enterFunction); + void goToCompartment(const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, Common::String sequenceTo); /** * Go to compartment from compartment. @@ -850,10 +846,8 @@ protected: * @param compartmentTo The compartment to. * @param positionTo The position to. * @param sequenceTo The sequence to. - * @param enterFunction The enter/exit compartment function. - * @param updateFunction The update entity function. */ - void goToCompartmentFromCompartment(const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, ObjectIndex compartmentTo, EntityPosition positionTo, Common::String sequenceTo, Entity::EnterFunction *enterFunction, Entity::UpdateFunction *updateFunction); + void goToCompartmentFromCompartment(const SavePoint &savepoint, ObjectIndex compartmentFrom, EntityPosition positionFrom, Common::String sequenceFrom, ObjectIndex compartmentTo, EntityPosition positionTo, Common::String sequenceTo); /** * Updates the position diff --git a/engines/lastexpress/entities/hadija.cpp b/engines/lastexpress/entities/hadija.cpp index 2dd239d4c9..8d757d54fd 100644 --- a/engines/lastexpress/entities/hadija.cpp +++ b/engines/lastexpress/entities/hadija.cpp @@ -86,22 +86,22 @@ IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(6, Hadija, compartment6) - Entity::goToCompartment(savepoint, kObjectCompartment6, kPosition_4070, "619Cf", "619Df", WRAP_ENTER_FUNCTION(Hadija, setup_enterExitCompartment)); + Entity::goToCompartment(savepoint, kObjectCompartment6, kPosition_4070, "619Cf", "619Df"); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(7, Hadija, compartment8) - Entity::goToCompartment(savepoint, kObjectCompartment8, kPosition_2740, "619Ch", "619Dh", WRAP_ENTER_FUNCTION(Hadija, setup_enterExitCompartment)); + Entity::goToCompartment(savepoint, kObjectCompartment8, kPosition_2740, "619Ch", "619Dh"); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(8, Hadija, compartment6to8) - Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment6, kPosition_4070, "619Bf", kObjectCompartment8, kPosition_2740, "619Ah", WRAP_ENTER_FUNCTION(Hadija, setup_enterExitCompartment), WRAP_UPDATE_FUNCTION(Hadija, setup_updateEntity)); + Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment6, kPosition_4070, "619Bf", kObjectCompartment8, kPosition_2740, "619Ah"); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_FUNCTION(9, Hadija, compartment8to6) - Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment8, kPosition_2740, "619Bh", kObjectCompartment6, kPosition_4070, "619Af", WRAP_ENTER_FUNCTION(Hadija, setup_enterExitCompartment), WRAP_UPDATE_FUNCTION(Hadija, setup_updateEntity)); + Entity::goToCompartmentFromCompartment(savepoint, kObjectCompartment8, kPosition_2740, "619Bh", kObjectCompartment6, kPosition_4070, "619Af"); IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp index 328c8e88d8..37e7bf5ca6 100644 --- a/engines/lastexpress/entities/mertens.cpp +++ b/engines/lastexpress/entities/mertens.cpp @@ -107,7 +107,7 @@ IMPLEMENT_FUNCTION_S(2, Mertens, bloodJacket) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); + Entity::savegameBloodJacket(); break; case kActionExitCompartment: @@ -134,7 +134,7 @@ IMPLEMENT_FUNCTION_SI(3, Mertens, enterExitCompartment, ObjectIndex) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); + Entity::savegameBloodJacket(); return; case kActionCallback: @@ -155,7 +155,7 @@ IMPLEMENT_FUNCTION_SI(4, Mertens, enterExitCompartment2, ObjectIndex) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); + Entity::savegameBloodJacket(); return; case kAction4: @@ -181,7 +181,7 @@ IMPLEMENT_FUNCTION_SIII(5, Mertens, enterExitCompartment3, ObjectIndex, EntityPo break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); + Entity::savegameBloodJacket(); break; case kActionExitCompartment: @@ -223,7 +223,7 @@ IMPLEMENT_FUNCTION(6, Mertens, callbackActionOnDirection) break; } - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); + Entity::savegameBloodJacket(); break; case kActionExitCompartment: @@ -246,7 +246,7 @@ IMPLEMENT_FUNCTION_S(7, Mertens, playSound) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); + Entity::savegameBloodJacket(); break; case kActionEndSound: @@ -273,7 +273,7 @@ IMPLEMENT_FUNCTION_S(8, Mertens, playSound16) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); + Entity::savegameBloodJacket(); break; case kActionEndSound: @@ -462,7 +462,7 @@ IMPLEMENT_FUNCTION_I(11, Mertens, function11, uint32) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); + Entity::savegameBloodJacket(); UPDATE_PARAM(params->param2, getState()->time, params->param1) @@ -530,7 +530,7 @@ IMPLEMENT_FUNCTION_II(13, Mertens, function13, bool, bool) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); + Entity::savegameBloodJacket(); if (!params->param2 && !params->param3) { UPDATE_PARAM_PROC(params->param4, getState()->timeTicks, 75) @@ -652,7 +652,7 @@ IMPLEMENT_FUNCTION_I(14, Mertens, function14, EntityIndex) break; case kActionNone: - Entity::savegameBloodJacket(WRAP_SAVE_FUNCTION(Mertens, setup_savegame)); + Entity::savegameBloodJacket(); break; case kActionDefault: -- cgit v1.2.3 From c589e69ec9f29e59fc4358e5045fcc613f9ab6a8 Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 22 Jul 2012 21:14:48 -0400 Subject: LASTEXPRESS: Replace TIME_CHECK_CALLBACK_ACTION macro --- engines/lastexpress/entities/boutarel.cpp | 3 ++- engines/lastexpress/entities/entity.cpp | 10 ++++++++++ engines/lastexpress/entities/entity.h | 1 + engines/lastexpress/entities/entity_intern.h | 7 ------- engines/lastexpress/entities/gendarmes.cpp | 3 ++- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/engines/lastexpress/entities/boutarel.cpp b/engines/lastexpress/entities/boutarel.cpp index 95ec37bf50..ab5f019c49 100644 --- a/engines/lastexpress/entities/boutarel.cpp +++ b/engines/lastexpress/entities/boutarel.cpp @@ -476,7 +476,8 @@ IMPLEMENT_FUNCTION_IS(17, Boutarel, function17, TimeValue) break; case kActionNone: - TIME_CHECK_CALLBACK_ACTION(params->param1, params->param6); + if (Entity::timeCheckCallbackAction((TimeValue)params->param1, params->param6)) + break; if (params->param5) { UPDATE_PARAM(params->param7, getState()->timeTicks, 90) diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 4c661a4915..9cb6825f79 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -611,4 +611,14 @@ void Entity::timeCheckObject(TimeValue timeValue, uint ¶meter, ObjectIndex o } } +bool Entity::timeCheckCallbackAction(TimeValue timeValue, uint ¶meter) { + if (getState()->time > timeValue && !parameter) { + parameter = 1; + callbackAction(); + return true; + } + + return false; +} + } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 77c3793890..fb5c958464 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -871,6 +871,7 @@ protected: void timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action); void timeCheckObject(TimeValue timeValue, uint ¶meter, ObjectIndex index, ObjectLocation location); + bool timeCheckCallbackAction(TimeValue timeValue, uint ¶meter); }; diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 576765620f..cb4f7b941b 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -347,13 +347,6 @@ void class::setup_##name() { \ break; \ } -#define TIME_CHECK_CALLBACK_ACTION(timeValue, parameter) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - callbackAction(); \ - break; \ - } - #define TIME_CHECK_PLAYSOUND_UPDATEPOSITION(timeValue, parameter, callback, sound, position) \ if (getState()->time > timeValue && !parameter) { \ parameter = 1; \ diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp index 877c0c29b3..fe9f6f0aa5 100644 --- a/engines/lastexpress/entities/gendarmes.cpp +++ b/engines/lastexpress/entities/gendarmes.cpp @@ -551,7 +551,8 @@ void Gendarmes::arrest(const SavePoint &savepoint, bool shouldPlaySound, SoundFl case kActionNone: if (checkCallback) { EXPOSE_PARAMS(EntityData::EntityParametersIIII); - TIME_CHECK_CALLBACK_ACTION(params->param1, params->param2); + if (Entity::timeCheckCallbackAction((TimeValue)params->param1, params->param2)) + break; } if (shouldUpdateEntity) { -- cgit v1.2.3 From 2e20e1d1e259dc6d9de8a90fa8417245f5a481b4 Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 22 Jul 2012 21:41:28 -0400 Subject: LASTEXPRESS: Replace TIME_CHECK_PLAYSOUND_UPDATEPOSITION macro --- engines/lastexpress/entities/entity.cpp | 13 +++++++++++++ engines/lastexpress/entities/entity.h | 2 ++ engines/lastexpress/entities/entity_intern.h | 9 --------- engines/lastexpress/entities/hadija.cpp | 3 ++- engines/lastexpress/entities/yasmin.cpp | 6 ++++-- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 9cb6825f79..43f039df43 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -621,4 +621,17 @@ bool Entity::timeCheckCallbackAction(TimeValue timeValue, uint ¶meter) { return false; } +bool Entity::timeCheckPlaySoundUpdatePosition(TimeValue timeValue, uint ¶meter, byte callback, const char* sound, EntityPosition position) { + if (getState()->time > timeValue && !parameter) { + parameter = 1; + getData()->entityPosition = position; + setCallback(callback); + setup_playSound(sound); + return true; + } + + return false; +} + + } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index fb5c958464..3370659c6e 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -693,6 +693,7 @@ public: virtual void setup_savegame(SavegameType, uint32) { error("[Entity::setup_savegame] Trying to call the parent setup function. Use the specific entity function directly"); } virtual void setup_enterExitCompartment(const char *, ObjectIndex) { error("[Entity::setup_enterExitCompartment] Trying to call the parent setup function. Use the specific entity function directly"); } virtual void setup_updateEntity(CarIndex, EntityPosition) { error("[Entity::setup_updateEntity] Trying to call the parent setup function. Use the specific entity function directly"); } + virtual void setup_playSound(const char*) { error("[Entity::setup_playSound] Trying to call the parent setup function. Use the specific entity function directly"); } // Serializable void saveLoadWithSerializer(Common::Serializer &ser) { _data->saveLoadWithSerializer(ser); } @@ -872,6 +873,7 @@ protected: void timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action); void timeCheckObject(TimeValue timeValue, uint ¶meter, ObjectIndex index, ObjectLocation location); bool timeCheckCallbackAction(TimeValue timeValue, uint ¶meter); + bool timeCheckPlaySoundUpdatePosition(TimeValue timeValue, uint ¶meter, byte callback, const char* sound, EntityPosition position); }; diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index cb4f7b941b..15a0a37c2f 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -347,15 +347,6 @@ void class::setup_##name() { \ break; \ } -#define TIME_CHECK_PLAYSOUND_UPDATEPOSITION(timeValue, parameter, callback, sound, position) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - getData()->entityPosition = position; \ - setCallback(callback); \ - setup_playSound(sound); \ - break; \ - } - #define TIME_CHECK_CAR(timeValue, parameter, callback, function) {\ if ((getState()->time <= timeValue && !getEntities()->isPlayerInCar(kCarGreenSleeping)) || !parameter) \ parameter = (uint)getState()->time + 75; \ diff --git a/engines/lastexpress/entities/hadija.cpp b/engines/lastexpress/entities/hadija.cpp index 8d757d54fd..4e72ce56f1 100644 --- a/engines/lastexpress/entities/hadija.cpp +++ b/engines/lastexpress/entities/hadija.cpp @@ -130,7 +130,8 @@ IMPLEMENT_FUNCTION(11, Hadija, chapter1Handler) break; case kActionNone: - TIME_CHECK_PLAYSOUND_UPDATEPOSITION(kTimeParisEpernay, params->param1, 1, "Har1100", kPosition_4840); + if (Entity::timeCheckPlaySoundUpdatePosition(kTimeParisEpernay, params->param1, 1, "Har1100", kPosition_4840)) + break; label_callback1: TIME_CHECK_CALLBACK(kTime1084500, params->param2, 2, setup_compartment6to8); diff --git a/engines/lastexpress/entities/yasmin.cpp b/engines/lastexpress/entities/yasmin.cpp index ebf90744f5..6fb1936303 100644 --- a/engines/lastexpress/entities/yasmin.cpp +++ b/engines/lastexpress/entities/yasmin.cpp @@ -204,7 +204,8 @@ IMPLEMENT_FUNCTION(9, Yasmin, chapter1Handler) case kActionNone: TIME_CHECK_CALLBACK(kTime1093500, params->param1, 1, setup_function6); TIME_CHECK_CALLBACK(kTime1161000, params->param2, 3, setup_function7); - TIME_CHECK_PLAYSOUND_UPDATEPOSITION(kTime1162800, params->param3, 4, "Har1102", kPosition_4070); + if (Entity::timeCheckPlaySoundUpdatePosition(kTime1162800, params->param3, 4, "Har1102", kPosition_4070)) + break; TIME_CHECK_CALLBACK_1(kTime1165500, params->param4, 5, setup_playSound, "Har1104"); TIME_CHECK_CALLBACK_1(kTime1174500, params->param5, 6, setup_playSound, "Har1106"); TIME_CHECK_CALLBACK(kTime1183500, params->param6, 7, setup_function6); @@ -226,7 +227,8 @@ IMPLEMENT_FUNCTION(9, Yasmin, chapter1Handler) // Fallback to case 3 case 3: - TIME_CHECK_PLAYSOUND_UPDATEPOSITION(kTime1162800, params->param3, 4, "Har1102", kPosition_4070); + if (Entity::timeCheckPlaySoundUpdatePosition(kTime1162800, params->param3, 4, "Har1102", kPosition_4070)) + break; // Fallback to case 4 case 4: -- cgit v1.2.3 From 95503250f82c71b4ca6849c5eb5581d3c6645202 Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 22 Jul 2012 22:24:27 -0400 Subject: LASTEXPRESS: Replace UPDATE_PARAM macro --- engines/lastexpress/entities/abbot.cpp | 21 +++++++++----- engines/lastexpress/entities/alexei.cpp | 13 ++++++--- engines/lastexpress/entities/alouan.cpp | 4 ++- engines/lastexpress/entities/anna.cpp | 43 +++++++++++++++++++--------- engines/lastexpress/entities/august.cpp | 24 ++++++++++------ engines/lastexpress/entities/boutarel.cpp | 7 +++-- engines/lastexpress/entities/chapters.cpp | 3 +- engines/lastexpress/entities/cooks.cpp | 9 ++++-- engines/lastexpress/entities/coudert.cpp | 33 ++++++++++++++------- engines/lastexpress/entities/entity.cpp | 20 +++++++++++-- engines/lastexpress/entities/entity.h | 2 ++ engines/lastexpress/entities/entity_intern.h | 7 ----- engines/lastexpress/entities/gendarmes.cpp | 3 +- engines/lastexpress/entities/hadija.cpp | 4 ++- engines/lastexpress/entities/kahina.cpp | 3 +- engines/lastexpress/entities/mahmud.cpp | 9 ++++-- engines/lastexpress/entities/max.cpp | 15 ++++++---- engines/lastexpress/entities/mertens.cpp | 21 +++++++++----- engines/lastexpress/entities/milos.cpp | 18 ++++++++---- engines/lastexpress/entities/mmeboutarel.cpp | 15 ++++++---- engines/lastexpress/entities/pascale.cpp | 3 +- engines/lastexpress/entities/rebecca.cpp | 10 +++++-- engines/lastexpress/entities/salko.cpp | 6 ++-- engines/lastexpress/entities/tatiana.cpp | 16 +++++++---- engines/lastexpress/entities/vassili.cpp | 9 ++++-- engines/lastexpress/entities/verges.cpp | 3 +- engines/lastexpress/entities/vesna.cpp | 9 ++++-- engines/lastexpress/entities/yasmin.cpp | 4 ++- 28 files changed, 226 insertions(+), 108 deletions(-) diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp index 9280068fae..c224b57abc 100644 --- a/engines/lastexpress/entities/abbot.cpp +++ b/engines/lastexpress/entities/abbot.cpp @@ -514,7 +514,8 @@ IMPLEMENT_FUNCTION(24, Abbot, function24) break; case kActionNone: - UPDATE_PARAM(params->param1, getState()->time, 900); + if (!Entity::updateParameter(params->param1, getState()->time, 900)) + break; setup_function25(); break; @@ -615,7 +616,8 @@ IMPLEMENT_FUNCTION(26, Abbot, function26) break; case kActionNone: - UPDATE_PARAM(params->param2, getState()->time, 4500); + if (!Entity::updateParameter(params->param2, getState()->time, 4500)) + break; if (getEntities()->isSomebodyInsideRestaurantOrSalon()) setup_function27(); @@ -862,7 +864,8 @@ IMPLEMENT_FUNCTION(31, Abbot, function31) if (!params->param1) break; - UPDATE_PARAM(params->param5, getState()->time, 450); + if (!Entity::updateParameter(params->param5, getState()->time, 450)) + break; setCallback(6); setup_callbackActionRestaurantOrSalon(); @@ -918,7 +921,8 @@ IMPLEMENT_FUNCTION(31, Abbot, function31) getSavePoints()->push(kEntityAbbot, kEntityAlexei, kAction122288808); params->param1 = 1; - UPDATE_PARAM(params->param5, getState()->time, 450); + if (!Entity::updateParameter(params->param5, getState()->time, 450)) + break; setCallback(6); setup_callbackActionRestaurantOrSalon(); @@ -1161,7 +1165,8 @@ IMPLEMENT_FUNCTION(36, Abbot, function36) break; case 2: - UPDATE_PARAM(params->param4, getState()->time, 900); + if (!Entity::updateParameter(params->param4, getState()->time, 900)) + break; getSound()->playSound(kEntityAbbot, "Abb3042"); break; @@ -1426,7 +1431,8 @@ label_callback_1: TIME_CHECK(kTime2466000, params->param5, setup_function44); if (params->param3) { - UPDATE_PARAM(params->param6, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param6, getState()->timeTicks, 75)) + break; params->param2 = 1; params->param3 = 0; @@ -1748,7 +1754,8 @@ IMPLEMENT_FUNCTION(49, Abbot, pickBomb) break; case kActionNone: - UPDATE_PARAM(params->param1, getState()->timeTicks, 150); + if (!Entity::updateParameter(params->param1, getState()->timeTicks, 150)) + break; getSavePoints()->push(kEntityAbbot, kEntityAbbot, kAction157489665); break; diff --git a/engines/lastexpress/entities/alexei.cpp b/engines/lastexpress/entities/alexei.cpp index 437c31c476..c77b103f4d 100644 --- a/engines/lastexpress/entities/alexei.cpp +++ b/engines/lastexpress/entities/alexei.cpp @@ -314,7 +314,8 @@ IMPLEMENT_FUNCTION_IS(16, Alexei, function16, TimeValue) } if (params->param5) { - UPDATE_PARAM(CURRENT_PARAM(1, 1), getState()->timeTicks, 75); + if (!Entity::updateParameter(CURRENT_PARAM(1, 1), getState()->timeTicks, 75)) + break; params->param5 = 0; params->param6 = 1; @@ -482,7 +483,9 @@ IMPLEMENT_FUNCTION(18, Alexei, chapter1Handler) } if (params->param1) { - UPDATE_PARAM(params->param3, getState()->timeTicks, 90); + if (!Entity::updateParameter(params->param3, getState()->timeTicks, 90)) + break; + getScenes()->loadSceneFromPosition(kCarRestaurant, 61); } else { params->param3 = 0; @@ -1348,7 +1351,8 @@ IMPLEMENT_FUNCTION(35, Alexei, function35) UPDATE_PARAM_PROC_END label_callback_3: - UPDATE_PARAM(params->param4, getState()->time, 9000); + if (!Entity::updateParameter(params->param4, getState()->time, 9000)) + break; setCallback(4); setup_callbackActionRestaurantOrSalon(); @@ -1397,7 +1401,8 @@ IMPLEMENT_FUNCTION(36, Alexei, function36) if (params->param3 || params->param2) break; - UPDATE_PARAM(params->param4, getState()->timeTicks, params->param1); + if (!Entity::updateParameter(params->param4, getState()->timeTicks, params->param1)) + break; getEntities()->drawSequenceRight(kEntityAlexei, "124B"); diff --git a/engines/lastexpress/entities/alouan.cpp b/engines/lastexpress/entities/alouan.cpp index 589b712b16..7549aaf6e6 100644 --- a/engines/lastexpress/entities/alouan.cpp +++ b/engines/lastexpress/entities/alouan.cpp @@ -438,7 +438,9 @@ IMPLEMENT_FUNCTION(22, Alouan, function22) break; case kActionNone: - UPDATE_PARAM(params->param1, getState()->time, 2700); + if (!Entity::updateParameter(params->param1, getState()->time, 2700)) + break; + setup_function23(); break; diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp index 806beaee9d..80a5144bbe 100644 --- a/engines/lastexpress/entities/anna.cpp +++ b/engines/lastexpress/entities/anna.cpp @@ -207,7 +207,8 @@ IMPLEMENT_FUNCTION(12, Anna, function12) } if (params->param4) { - UPDATE_PARAM(params->param8, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param8, getState()->timeTicks, 75)) + break; params->param4 = 0; params->param5 = 1; @@ -427,7 +428,8 @@ IMPLEMENT_FUNCTION_IS(15, Anna, function15, TimeValue) } if (params->param5) { - UPDATE_PARAM(params->param8, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param8, getState()->timeTicks, 75)) + break; params->param5 = 0; params->param6 = 1; @@ -675,7 +677,8 @@ IMPLEMENT_FUNCTION_I(18, Anna, function18, TimeValue) } if (params->param3) { - UPDATE_PARAM(params->param7, getState()->timeTicks, 90); + if (!Entity::updateParameter(params->param7, getState()->timeTicks, 90)) + break; getScenes()->loadSceneFromPosition(kCarRestaurant, 61); } else { @@ -1157,7 +1160,8 @@ IMPLEMENT_FUNCTION(29, Anna, function29) } if (params->param1) { - UPDATE_PARAM(params->param4, getState()->timeTicks, 90); + if (!Entity::updateParameter(params->param4, getState()->timeTicks, 90)) + break; getScenes()->loadSceneFromPosition(kCarRestaurant, 55); } else { @@ -1279,7 +1283,9 @@ IMPLEMENT_FUNCTION(30, Anna, function30) } if (params->param1) { - UPDATE_PARAM(params->param5, getState()->timeTicks, 90); + if (!Entity::updateParameter(params->param5, getState()->timeTicks, 90)) + break; + getScenes()->loadSceneFromPosition(kCarRestaurant, 55); } else { params->param5 = 0; @@ -1483,7 +1489,8 @@ IMPLEMENT_FUNCTION(35, Anna, function35) if (!params->param1) break; - UPDATE_PARAM(params->param3, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param3, getState()->timeTicks, 75)) + break; switch (params->param2) { default: @@ -1797,7 +1804,8 @@ IMPLEMENT_FUNCTION(41, Anna, function41) break; case kActionNone: - UPDATE_PARAM(params->param2, getState()->time, 2700); + if (!Entity::updateParameter(params->param2, getState()->time, 2700)) + break; params->param5++; switch (params->param5) { @@ -2399,7 +2407,8 @@ IMPLEMENT_FUNCTION(53, Anna, function53) } if (params->param1) { - UPDATE_PARAM(params->param7, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param7, getState()->timeTicks, 75)) + break; CursorStyle cursor = getEntities()->isInsideCompartment(kEntityMax, kCarRedSleeping, kPosition_4070) ? kCursorHand : kCursorNormal; @@ -2545,7 +2554,8 @@ IMPLEMENT_FUNCTION(54, Anna, function54) } if (params->param1) { - UPDATE_PARAM(params->param7, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param7, getState()->timeTicks, 75)) + break; CursorStyle cursor = getEntities()->isInsideCompartment(kEntityMax, kCarRedSleeping, kPosition_4070) ? kCursorHand : kCursorNormal; @@ -2892,7 +2902,8 @@ IMPLEMENT_FUNCTION(59, Anna, function59) } if (params->param1) { - UPDATE_PARAM(params->param5, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param5, getState()->timeTicks, 75)) + break; CursorStyle style = getEntities()->isInsideCompartment(kEntityMax, kCarRedSleeping, kPosition_4070) ? kCursorHand : kCursorNormal; getObjects()->update(kObjectCompartmentF, kEntityAnna, kObjectLocation1, kCursorNormal, style); @@ -3275,7 +3286,8 @@ IMPLEMENT_FUNCTION(67, Anna, chapter4Handler) label_next: if (params->param1) { - UPDATE_PARAM(params->param5, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param5, getState()->timeTicks, 75)) + break; params->param1 = 0; params->param2 = 1; @@ -3405,7 +3417,8 @@ IMPLEMENT_FUNCTION(69, Anna, function69) case kActionNone: if (params->param1) { - UPDATE_PARAM(params->param2, getState()->time, 4500); + if (!Entity::updateParameter(params->param2, getState()->time, 4500)) + break; getData()->car = kCarRedSleeping; getData()->entityPosition = kPosition_9270; @@ -3909,7 +3922,8 @@ IMPLEMENT_FUNCTION(80, Anna, function80) break; case kActionNone: - UPDATE_PARAM(params->param1, getState()->timeTicks, 450); + if (!Entity::updateParameter(params->param1, getState()->timeTicks, 450)) + break; getSound()->playSound(kEntityPlayer, "Kro5001", kFlagDefault); break; @@ -3978,7 +3992,8 @@ IMPLEMENT_FUNCTION(81, Anna, finalSequence) break; case kActionNone: - UPDATE_PARAM(params->param1, getState()->timeTicks, 180); + if (!Entity::updateParameter(params->param1, getState()->timeTicks, 180)) + break; getSound()->playSound(kEntityTrain, "LIB069"); getLogic()->gameOver(kSavegameTypeIndex, 2, kSceneNone, true); diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp index f255d041f8..d874c666f7 100644 --- a/engines/lastexpress/entities/august.cpp +++ b/engines/lastexpress/entities/august.cpp @@ -840,7 +840,8 @@ label_callback_9: break; if (getObjects()->get(kObjectCompartment1).location == kObjectLocation1) { - UPDATE_PARAM(CURRENT_PARAM(1, 2), getState()->timeTicks, 75); + if (!Entity::updateParameter(CURRENT_PARAM(1, 2), getState()->timeTicks, 75)) + break; getObjects()->update(kObjectCompartment1, kEntityAugust, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorNormal); @@ -1483,7 +1484,8 @@ IMPLEMENT_FUNCTION(30, August, restaurant) break; case kActionNone: - UPDATE_PARAM(params->param3, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param3, getState()->timeTicks, 75)) + break; getData()->inventoryItem = kItemInvalid; break; @@ -1654,7 +1656,8 @@ IMPLEMENT_FUNCTION(32, August, function32) } if (params->param3) { - UPDATE_PARAM(params->param8, getState()->timeTicks, 90); + if (!Entity::updateParameter(params->param8, getState()->timeTicks, 90)) + break; getScenes()->loadSceneFromPosition(kCarRestaurant, 55); } else { @@ -2768,7 +2771,8 @@ IMPLEMENT_FUNCTION(54, August, function54) getData()->inventoryItem = kItemInvalid; if (!params->param2 && params->param1) { - UPDATE_PARAM(params->param5, getState()->time, params->param1); + if (!Entity::updateParameter(params->param5, getState()->time, params->param1)) + break; getData()->inventoryItem = kItemNone; setup_function55(); @@ -3044,7 +3048,8 @@ IMPLEMENT_FUNCTION(60, August, function60) if (!params->param1) break; - UPDATE_PARAM(params->param3, getState()->time, 9000); + if (!Entity::updateParameter(params->param3, getState()->time, 9000)) + break; setCallback(1); setup_callbackActionRestaurantOrSalon(); @@ -3140,7 +3145,8 @@ IMPLEMENT_FUNCTION(62, August, function62) break; case kActionNone: - UPDATE_PARAM(params->param1, getState()->time, 900); + if (!Entity::updateParameter(params->param1, getState()->time, 900)) + break; getSound()->playSound(kEntityAugust, "Aug4003A"); @@ -3229,7 +3235,8 @@ IMPLEMENT_FUNCTION(63, August, function63) break; } - UPDATE_PARAM(params->param5, getState()->timeTicks, params->param1); + if (!Entity::updateParameter(params->param5, getState()->timeTicks, params->param1)) + break; params->param2 = (params->param6 < 1 ? 1 : 0); @@ -3386,7 +3393,8 @@ IMPLEMENT_FUNCTION(68, August, function68) case kActionNone: if (params->param1) { - UPDATE_PARAM(params->param4, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param4, getState()->timeTicks, 75)) + break; params->param1 = 0; params->param2 = 1; diff --git a/engines/lastexpress/entities/boutarel.cpp b/engines/lastexpress/entities/boutarel.cpp index ab5f019c49..ab8a0b9003 100644 --- a/engines/lastexpress/entities/boutarel.cpp +++ b/engines/lastexpress/entities/boutarel.cpp @@ -480,7 +480,9 @@ IMPLEMENT_FUNCTION_IS(17, Boutarel, function17, TimeValue) break; if (params->param5) { - UPDATE_PARAM(params->param7, getState()->timeTicks, 90) + if (!Entity::updateParameter(params->param7, getState()->timeTicks, 90)) + break; + getScenes()->loadSceneFromPosition(kCarRestaurant, 51); } else { params->param7 = 0; @@ -515,7 +517,8 @@ IMPLEMENT_FUNCTION_I(18, Boutarel, function18, TimeValue) } if (params->param2) { - UPDATE_PARAM(params->param5, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param5, getState()->timeTicks, 75)) + break; params->param2 = 0; params->param3 = 1; diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp index b4978165b9..76165800f2 100644 --- a/engines/lastexpress/entities/chapters.cpp +++ b/engines/lastexpress/entities/chapters.cpp @@ -809,7 +809,8 @@ IMPLEMENT_FUNCTION(12, Chapters, chapter2Handler) if (!getProgress().isTrainRunning) break; - UPDATE_PARAM(params->param2, getState()->timeTicks, params->param1); + if (!Entity::updateParameter(params->param2, getState()->timeTicks, params->param1)) + break; getSound()->playLocomotiveSound(); diff --git a/engines/lastexpress/entities/cooks.cpp b/engines/lastexpress/entities/cooks.cpp index 63494e6062..a3fb69aeb9 100644 --- a/engines/lastexpress/entities/cooks.cpp +++ b/engines/lastexpress/entities/cooks.cpp @@ -260,7 +260,8 @@ IMPLEMENT_FUNCTION(6, Cooks, chapter1Handler) break; case kActionNone: - UPDATE_PARAM(params->param4, getState()->time, params->param2); + if (!Entity::updateParameter(params->param4, getState()->time, params->param2)) + break; // Broken plate sound getSound()->playSound(kEntityPlayer, "LIB122", getSound()->getSoundFlag(kEntityCooks)); @@ -373,7 +374,8 @@ IMPLEMENT_FUNCTION(9, Cooks, chapter2Handler) break; case kActionNone: - UPDATE_PARAM(params->param3, getState()->time, params->param1); + if (!Entity::updateParameter(params->param3, getState()->time, params->param1)) + break; // Broken plate sound getSound()->playSound(kEntityPlayer, "LIB122", getSound()->getSoundFlag(kEntityCooks)); @@ -524,7 +526,8 @@ IMPLEMENT_FUNCTION(13, Cooks, chapter4Handler) break; case kActionNone: - UPDATE_PARAM(params->param3, getState()->time, params->param1) + if (!Entity::updateParameter(params->param3, getState()->time, params->param1)) + break; // Broken plate sound getSound()->playSound(kEntityPlayer, "LIB122", getSound()->getSoundFlag(kEntityCooks)); diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp index e79d4cdff7..c589b8f0f8 100644 --- a/engines/lastexpress/entities/coudert.cpp +++ b/engines/lastexpress/entities/coudert.cpp @@ -356,7 +356,8 @@ IMPLEMENT_FUNCTION_I(10, Coudert, updateFromTime, uint32) case kActionNone: Entity::savegameBloodJacket(); - UPDATE_PARAM(params->param2, getState()->time, params->param1); + if (!Entity::updateParameter(params->param2, getState()->time, params->param1)) + break; callbackAction(); break; @@ -379,7 +380,8 @@ IMPLEMENT_FUNCTION_I(11, Coudert, updateFromTicks, uint32) case kActionNone: Entity::savegameBloodJacket(); - UPDATE_PARAM(params->param2, getState()->timeTicks, params->param1); + if (!Entity::updateParameter(params->param2, getState()->timeTicks, params->param1)) + break; callbackAction(); break; @@ -476,7 +478,8 @@ IMPLEMENT_FUNCTION_II(13, Coudert, function13, bool, EntityIndex) } } - UPDATE_PARAM(params->param5, getState()->timeTicks, 225); + if (!Entity::updateParameter(params->param5, getState()->timeTicks, 225)) + break; getData()->inventoryItem = kItemNone; setCallback(5); @@ -909,7 +912,8 @@ IMPLEMENT_FUNCTION_II(20, Coudert, function20, ObjectIndex, ObjectIndex) getSound()->playSound(kEntityPlayer, "ZFX1004", getSound()->getSoundFlag(kEntityCoudert)); UPDATE_PARAM_PROC_END - UPDATE_PARAM(CURRENT_PARAM(1, 4), getState()->time, 900); + if (!Entity::updateParameter(CURRENT_PARAM(1, 4), getState()->time, 900)) + break; getObjects()->updateLocation2((ObjectIndex)params->param1, kObjectLocation1); @@ -988,7 +992,8 @@ IMPLEMENT_FUNCTION(21, Coudert, function21) case kActionNone: if (!params->param1) { - UPDATE_PARAM(params->param2, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param2, getState()->timeTicks, 75)) + break; setCallback(3); setup_enterExitCompartment("627Zh", kObjectCompartmentH); @@ -1089,7 +1094,8 @@ IMPLEMENT_FUNCTION(22, Coudert, function22) case kActionNone: if (!params->param1) { - UPDATE_PARAM(params->param2, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param2, getState()->timeTicks, 75)) + break; setCallback(3); setup_enterExitCompartment("627Rg", kObjectCompartmentG); @@ -1300,7 +1306,8 @@ IMPLEMENT_FUNCTION(26, Coudert, function26) case kActionNone: if (params->param1) { - UPDATE_PARAM(params->param2, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param2, getState()->timeTicks, 75)) + break; setCallback(3); setup_enterExitCompartment2("627Zd", kObjectCompartmentD, kPosition_5790, kPosition_6130); @@ -1391,7 +1398,8 @@ IMPLEMENT_FUNCTION(27, Coudert, function27) case kActionNone: if (!params->param1) { - UPDATE_PARAM(params->param2, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param2, getState()->timeTicks, 75)) + break; setCallback(3); setup_enterExitCompartment2("627Rc", kObjectCompartmentC, kPosition_6470, kPosition_6130); @@ -1891,7 +1899,8 @@ IMPLEMENT_FUNCTION_I(35, Coudert, function35, bool) getScenes()->loadSceneFromPosition(kCarRestaurant, 65); } - UPDATE_PARAM(params->param2, getState()->time, 2700); + if (!Entity::updateParameter(params->param2, getState()->time, 2700)) + break; getSavePoints()->push(kEntityCoudert, kEntityMax, kActionMaxFreeFromCage); @@ -3558,7 +3567,8 @@ label_callback_5: label_callback_6: if (getState()->time > kTime2538000 && !ENTITY_PARAM(0, 1) && !ENTITY_PARAM(2, 1)) { - UPDATE_PARAM(params->param7, getState()->time, 2700); + if (!Entity::updateParameter(params->param7, getState()->time, 2700)) + break; ENTITY_PARAM(0, 2) = 0; ENTITY_PARAM(0, 1) = 1; @@ -4023,7 +4033,8 @@ IMPLEMENT_FUNCTION(62, Coudert, function62) case kActionNone: if (params->param1) { - UPDATE_PARAM(params->param4, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param4, getState()->timeTicks, 75)) + break; params->param1 = 0; params->param2 = 1; diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 43f039df43..1989c4607b 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -346,7 +346,9 @@ void Entity::updateFromTicks(const SavePoint &savepoint) { break; case kActionNone: - UPDATE_PARAM(params->param2, getState()->timeTicks, params->param1) + if (Entity::updateParameter(params->param2, getState()->timeTicks, params->param1)) + break; + callbackAction(); break; } @@ -360,7 +362,9 @@ void Entity::updateFromTime(const SavePoint &savepoint) { break; case kActionNone: - UPDATE_PARAM(params->param2, getState()->time, params->param1) + if (Entity::updateParameter(params->param2, getState()->time, params->param1)) + break; + callbackAction(); break; } @@ -597,6 +601,18 @@ void Entity::callbackAction() { // Helper functions ////////////////////////////////////////////////////////////////////////// +bool Entity::updateParameter(uint ¶meter, uint timeValue, uint delta) { + if (!parameter) + parameter = (uint)(timeValue + delta); + + if (parameter >= timeValue) + return false; + + parameter = kTimeInvalid; + + return true; +} + void Entity::timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action) { if (getState()->time > timeValue && !parameter) { parameter = 1; diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 3370659c6e..139f8ec418 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -870,6 +870,8 @@ protected: // Helper functions ////////////////////////////////////////////////////////////////////////// + bool updateParameter(uint ¶meter, uint time, uint delta); + void timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action); void timeCheckObject(TimeValue timeValue, uint ¶meter, ObjectIndex index, ObjectLocation location); bool timeCheckCallbackAction(TimeValue timeValue, uint ¶meter); diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 15a0a37c2f..23f5e49120 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -361,13 +361,6 @@ void class::setup_##name() { \ ////////////////////////////////////////////////////////////////////////// // Param update ////////////////////////////////////////////////////////////////////////// -#define UPDATE_PARAM(parameter, type, value) { \ - if (!parameter) \ - parameter = (uint)(type + value); \ - if (parameter >= type) \ - break; \ - parameter = kTimeInvalid; \ -} // Todo: replace with UPDATE_PARAM_PROC as appropriate #define UPDATE_PARAM_GOTO(parameter, type, value, label) { \ diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp index fe9f6f0aa5..22697b396c 100644 --- a/engines/lastexpress/entities/gendarmes.cpp +++ b/engines/lastexpress/entities/gendarmes.cpp @@ -266,7 +266,8 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje getSound()->playSound(kEntityGendarmes, "POL1046A", kFlagDefault); } - UPDATE_PARAM(params->param7, getState()->timeTicks, 300); + if (!Entity::updateParameter(params->param7, getState()->timeTicks, 300)) + break; if (!params->param4 && getEntities()->isOutsideAlexeiWindow()) { getObjects()->update((ObjectIndex)params->param3, kEntityPlayer, kObjectLocationNone, kCursorHandKnock, kCursorHand); diff --git a/engines/lastexpress/entities/hadija.cpp b/engines/lastexpress/entities/hadija.cpp index 4e72ce56f1..62badc46a6 100644 --- a/engines/lastexpress/entities/hadija.cpp +++ b/engines/lastexpress/entities/hadija.cpp @@ -466,7 +466,9 @@ IMPLEMENT_FUNCTION(22, Hadija, function22) break; case kActionNone: - UPDATE_PARAM(params->param1, getState()->time, 2700); + if (!Entity::updateParameter(params->param1, getState()->time, 2700)) + break; + setup_function23(); break; diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp index 6bb2e6b90a..2124de1687 100644 --- a/engines/lastexpress/entities/kahina.cpp +++ b/engines/lastexpress/entities/kahina.cpp @@ -794,7 +794,8 @@ label_callback_2: if (getEvent(kEventKahinaAskSpeakFirebird) && !getEvent(kEventKronosConversationFirebird) && getEntities()->isInsideTrainCar(kEntityPlayer, kCarKronos)) { - UPDATE_PARAM(params->param4, getState()->time, 900); + if (!Entity::updateParameter(params->param4, getState()->time, 900)) + break; setCallback(3); setup_savegame(kSavegameTypeEvent, kEventKronosConversationFirebird); diff --git a/engines/lastexpress/entities/mahmud.cpp b/engines/lastexpress/entities/mahmud.cpp index ebe754bfa4..1e7df5c870 100644 --- a/engines/lastexpress/entities/mahmud.cpp +++ b/engines/lastexpress/entities/mahmud.cpp @@ -84,7 +84,8 @@ IMPLEMENT_FUNCTION_SIII(4, Mahmud, enterExitCompartment2, ObjectIndex, uint32, O break; case kActionNone: - UPDATE_PARAM(params->param7, getState()->timeTicks, params->param5); + if (!Entity::updateParameter(params->param7, getState()->timeTicks, params->param5)) + break; if (!getScenes()->checkPosition(kSceneNone, SceneManager::kCheckPositionLookingUp)) getScenes()->loadSceneFromObject((ObjectIndex)params->param6, true); @@ -144,7 +145,8 @@ IMPLEMENT_FUNCTION_II(10, Mahmud, function10, ObjectIndex, bool) break; case kActionNone: - UPDATE_PARAM(params->param6, getState()->time, 13500); + if (!Entity::updateParameter(params->param6, getState()->time, 13500)) + break; getObjects()->update(kObjectCompartment5, kEntityTrain, kObjectLocation3, kCursorHandKnock, kCursorHand); getObjects()->update(kObjectCompartment6, kEntityTrain, kObjectLocation3, kCursorHandKnock, kCursorHand); @@ -570,7 +572,8 @@ IMPLEMENT_FUNCTION(14, Mahmud, chaptersHandler) } if (params->param5) { - UPDATE_PARAM(params->param8, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param8, getState()->timeTicks, 75)) + break; params->param4 = 1; params->param5 = 0; diff --git a/engines/lastexpress/entities/max.cpp b/engines/lastexpress/entities/max.cpp index cecfe64dc6..5c43346cde 100644 --- a/engines/lastexpress/entities/max.cpp +++ b/engines/lastexpress/entities/max.cpp @@ -89,7 +89,8 @@ IMPLEMENT_FUNCTION(6, Max, chapter12_handler) break; case kActionNone: - UPDATE_PARAM(params->param2, getState()->time, params->param1); + if (!Entity::updateParameter(params->param2, getState()->time, params->param1)) + break; if (!getSoundQueue()->isBuffered(kEntityMax)) getSound()->playSound(kEntityMax, "Max1122"); @@ -123,7 +124,8 @@ IMPLEMENT_FUNCTION(7, Max, function7) break; case kActionNone: - UPDATE_PARAM(params->param2, getState()->time, params->param1) + if (!Entity::updateParameter(params->param2, getState()->time, params->param1)) + break; if (!getSoundQueue()->isBuffered(kEntityMax)) getSound()->playSound(kEntityMax, "Max1122"); @@ -212,7 +214,8 @@ IMPLEMENT_FUNCTION(8, Max, chapter4Handler) break; case kActionNone: - UPDATE_PARAM(params->param3, getState()->time, params->param2); + if (!Entity::updateParameter(params->param3, getState()->time, params->param2)) + break; if (!getSoundQueue()->isBuffered(kEntityMax)) getSound()->playSound(kEntityMax, "Max3101"); @@ -390,7 +393,8 @@ IMPLEMENT_FUNCTION(13, Max, chapter3Handler) break; } - UPDATE_PARAM(params->param3, getState()->time, params->param1); + if (!Entity::updateParameter(params->param3, getState()->time, params->param1)) + break; if (!getSoundQueue()->isBuffered(kEntityMax)) getSound()->playSound(kEntityMax, "Max1122"); @@ -512,7 +516,8 @@ IMPLEMENT_FUNCTION(15, Max, function15) } if (!params->param1) { - UPDATE_PARAM(params->param3, getState()->time, 900); + if (!Entity::updateParameter(params->param3, getState()->time, 900)) + break; getSavePoints()->push(kEntityMax, kEntityCoudert, kAction157026693); } diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp index 37e7bf5ca6..c093ac4b30 100644 --- a/engines/lastexpress/entities/mertens.cpp +++ b/engines/lastexpress/entities/mertens.cpp @@ -464,7 +464,8 @@ IMPLEMENT_FUNCTION_I(11, Mertens, function11, uint32) case kActionNone: Entity::savegameBloodJacket(); - UPDATE_PARAM(params->param2, getState()->time, params->param1) + if (!Entity::updateParameter(params->param2, getState()->time, params->param1)) + break; callbackAction(); break; @@ -1062,7 +1063,8 @@ IMPLEMENT_FUNCTION_II(21, Mertens, function21, ObjectIndex, ObjectIndex) getSound()->playSound(kEntityPlayer, "ZFX1004", getSound()->getSoundFlag(kEntityMertens)); UPDATE_PARAM_PROC_END - UPDATE_PARAM(CURRENT_PARAM(1, 5), getState()->time, 900); + if (!Entity::updateParameter(CURRENT_PARAM(1, 5), getState()->time, 900)) + break; // Update objects getObjects()->updateLocation2((ObjectIndex)params->param1, kObjectLocation1); @@ -1286,7 +1288,8 @@ IMPLEMENT_FUNCTION(24, Mertens, function24) case kActionNone: if (!params->param1) { - UPDATE_PARAM(params->param2, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param2, getState()->timeTicks, 75)) + break; setCallback(3); setup_enterExitCompartment3("601Rc", kObjectCompartment3, kPosition_6470, kPosition_6130); @@ -1389,7 +1392,8 @@ IMPLEMENT_FUNCTION(25, Mertens, function25) case kActionNone: if (!params->param1) { - UPDATE_PARAM(params->param2, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param2, getState()->timeTicks, 75)) + break; setCallback(3); setup_enterExitCompartment3("601Zb", kObjectCompartment2, kPosition_7500, kPositionNone); @@ -1626,7 +1630,8 @@ label_callback10: if (params->param3 >= getState()->timeTicks) { label_callback11: - UPDATE_PARAM(params->param4, getState()->timeTicks, 375); + if (!Entity::updateParameter(params->param4, getState()->timeTicks, 375)) + break; getSound()->playSound(kEntityPlayer, "LIB033"); @@ -3736,7 +3741,8 @@ label_callback_7: label_callback_8: if (getState()->time > kTime2538000 && !ENTITY_PARAM(0, 1) && !ENTITY_PARAM(2, 1)) { - UPDATE_PARAM(params->param6, getState()->time, 2700); + if (!Entity::updateParameter(params->param6, getState()->time, 2700)) + break; getEntities()->drawSequenceLeft(kEntityMertens, "601E"); @@ -3990,7 +3996,8 @@ IMPLEMENT_FUNCTION(53, Mertens, function53) case kActionNone: if (params->param1) { - UPDATE_PARAM(params->param4, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param4, getState()->timeTicks, 75)) + break; params->param1 = 0; params->param2 = 0; diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp index c33a8b887e..8ebb23b024 100644 --- a/engines/lastexpress/entities/milos.cpp +++ b/engines/lastexpress/entities/milos.cpp @@ -434,7 +434,8 @@ IMPLEMENT_FUNCTION(14, Milos, function14) if (CURRENT_PARAM(1, 1) < getState()->timeTicks) { if (getObjects()->get(kObjectCompartment1).location == kObjectLocation1) { - UPDATE_PARAM(CURRENT_PARAM(1, 2), getState()->timeTicks, 75); + if (!Entity::updateParameter(CURRENT_PARAM(1, 2), getState()->timeTicks, 75)) + break; getObjects()->update(kObjectCompartment1, kEntityMilos, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorNormal); @@ -505,7 +506,8 @@ IMPLEMENT_FUNCTION(14, Milos, function14) } label_callback_12: - UPDATE_PARAM(CURRENT_PARAM(1, 4), getState()->timeTicks, 75); + if (!Entity::updateParameter(CURRENT_PARAM(1, 4), getState()->timeTicks, 75)) + break; getEntities()->exitCompartment(kEntityMilos, kObjectCompartment1, true); @@ -736,7 +738,8 @@ IMPLEMENT_FUNCTION(15, Milos, chapter1Handler) } if (getEntities()->isPlayerPosition(kCarRestaurant, 70) && !params->param2) { - UPDATE_PARAM(params->param5, getState()->timeTicks, 45); + if (!Entity::updateParameter(params->param5, getState()->timeTicks, 45)) + break; setCallback(2); setup_draw("009C"); @@ -951,7 +954,8 @@ IMPLEMENT_FUNCTION(21, Milos, function21) break; case kActionNone: - UPDATE_PARAM(params->param2, getState()->time, 4500); + if (!Entity::updateParameter(params->param2, getState()->time, 4500)) + break; params->param1 = 1; break; @@ -1116,7 +1120,8 @@ IMPLEMENT_FUNCTION(24, Milos, function24) } if (params->param1) { - UPDATE_PARAM(params->param5, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param5, getState()->timeTicks, 75)) + break; params->param1 = 0; params->param2 = 1; @@ -1289,7 +1294,8 @@ IMPLEMENT_FUNCTION(25, Milos, function25) } if (params->param1) { - UPDATE_PARAM(params->param4, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param4, getState()->timeTicks, 75)) + break; params->param1 = 0; params->param2 = 1; diff --git a/engines/lastexpress/entities/mmeboutarel.cpp b/engines/lastexpress/entities/mmeboutarel.cpp index ace8637556..323e686ec3 100644 --- a/engines/lastexpress/entities/mmeboutarel.cpp +++ b/engines/lastexpress/entities/mmeboutarel.cpp @@ -427,7 +427,8 @@ label_callback_1: TIME_CHECK(kTime1094400, params->param8, setup_function14); if (params->param4) { - UPDATE_PARAM(CURRENT_PARAM(1, 1), getState()->timeTicks, 75); + if (!Entity::updateParameter(CURRENT_PARAM(1, 1), getState()->timeTicks, 75)) + break; params->param3 = 1; params->param4 = 0; @@ -587,7 +588,8 @@ IMPLEMENT_FUNCTION(15, MmeBoutarel, function15) label_callback_5: if (params->param2) { - UPDATE_PARAM(params->param5, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param5, getState()->timeTicks, 75)) + break; params->param1 = 1; params->param2 = 0; @@ -1016,7 +1018,8 @@ IMPLEMENT_FUNCTION(23, MmeBoutarel, chapter4Handler) case kActionNone: if (params->param1) { - UPDATE_PARAM(params->param2, getState()->time, 900); + if (!Entity::updateParameter(params->param2, getState()->time, 900)) + break; getObjects()->update(kObjectCompartmentD, kEntityPlayer, kObjectLocation1, kCursorKeepValue, kCursorKeepValue); @@ -1065,7 +1068,8 @@ IMPLEMENT_FUNCTION(24, MmeBoutarel, function24) TIME_CHECK(kTime2470500, params->param4, setup_function25); if (params->param2) { - UPDATE_PARAM(params->param5, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param5, getState()->timeTicks, 75)) + break; params->param1 = 1; params->param2 = 0; @@ -1208,7 +1212,8 @@ IMPLEMENT_FUNCTION(28, MmeBoutarel, function28) case kActionNone: if (params->param1) { - UPDATE_PARAM(params->param3, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param3, getState()->timeTicks, 75)) + break; params->param1 = 0; params->param2 = 1; diff --git a/engines/lastexpress/entities/pascale.cpp b/engines/lastexpress/entities/pascale.cpp index 6620634ade..e74cf3490f 100644 --- a/engines/lastexpress/entities/pascale.cpp +++ b/engines/lastexpress/entities/pascale.cpp @@ -1126,7 +1126,8 @@ IMPLEMENT_FUNCTION(33, Pascale, function33) label_callback1: if (params->param1) { - UPDATE_PARAM(params->param6, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param6, getState()->timeTicks, 75)) + break; params->param1 = 0; params->param2 = 2; diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp index 3ef266994f..a890ebf258 100644 --- a/engines/lastexpress/entities/rebecca.cpp +++ b/engines/lastexpress/entities/rebecca.cpp @@ -708,7 +708,9 @@ label_callback_4: label_callback_5: if (params->param2) { - UPDATE_PARAM(params->param6, getState()->timeTicks, 90); + if (!Entity::updateParameter(params->param6, getState()->timeTicks, 90)) + break; + getScenes()->loadSceneFromPosition(kCarRestaurant, 55); } else { params->param6 = 0; @@ -966,7 +968,8 @@ IMPLEMENT_FUNCTION(26, Rebecca, function26) TIME_CHECK_CALLBACK_3(kTime1224000, params->param2, 1, setup_updatePosition, "118H", kCarRestaurant, 52); if (params->param1) { - UPDATE_PARAM(params->param3, getState()->timeTicks, 90); + if (!Entity::updateParameter(params->param3, getState()->timeTicks, 90)) + break; getScenes()->loadSceneFromPosition(kCarRestaurant, 51); } @@ -1753,7 +1756,8 @@ IMPLEMENT_FUNCTION(48, Rebecca, function48) case kActionNone: if (params->param1) { - UPDATE_PARAM(params->param3, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param3, getState()->timeTicks, 75)) + break; params->param1 = 0; params->param2 = 1; diff --git a/engines/lastexpress/entities/salko.cpp b/engines/lastexpress/entities/salko.cpp index 70a26b515a..b799564b46 100644 --- a/engines/lastexpress/entities/salko.cpp +++ b/engines/lastexpress/entities/salko.cpp @@ -299,7 +299,8 @@ IMPLEMENT_FUNCTION(15, Salko, chapter3Handler) case kActionNone: if (getState()->time < kTime2200500) { - UPDATE_PARAM(params->param1, getState()->time, 81000); + if (!Entity::updateParameter(params->param1, getState()->time, 81000)) + break; setCallback(1); setup_function16(); @@ -329,7 +330,8 @@ IMPLEMENT_FUNCTION(16, Salko, function16) } label_callback3: - UPDATE_PARAM(params->param1, getState()->time, 4500); + if (!Entity::updateParameter(params->param1, getState()->time, 4500)) + break; getSavePoints()->push(kEntitySalko, kEntitySalko, kAction101169464); break; diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp index b15a0a18b2..76068aad24 100644 --- a/engines/lastexpress/entities/tatiana.cpp +++ b/engines/lastexpress/entities/tatiana.cpp @@ -249,7 +249,8 @@ IMPLEMENT_FUNCTION_I(16, Tatiana, function16, uint32) } if (params->param2) { - UPDATE_PARAM(params->param5, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param5, getState()->timeTicks, 75)) + break; params->param2 = 0; params->param3 = 1; @@ -443,7 +444,9 @@ label_tatiana_chapter1_2: Entity::timeCheckSavepoint(kTime1084500, params->param7, kEntityTatiana, kEntityPascale, kAction257489762); if (params->param1) { - UPDATE_PARAM(params->param8, getState()->timeTicks, 90); + if (!Entity::updateParameter(params->param8, getState()->timeTicks, 90)) + break; + getScenes()->loadSceneFromPosition(kCarRestaurant, 65); } else { params->param8 = 0; @@ -1292,7 +1295,8 @@ IMPLEMENT_FUNCTION(37, Tatiana, function37) } if (params->param1) { - UPDATE_PARAM(params->param5, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param5, getState()->timeTicks, 75)) + break; getObjects()->update(kObjectCompartmentB, kEntityTatiana, kObjectLocation1, kCursorNormal, kCursorNormal); getObjects()->update(kObject49, kEntityTatiana, kObjectLocation1, kCursorNormal, kCursorNormal); @@ -1401,7 +1405,8 @@ IMPLEMENT_FUNCTION(38, Tatiana, function38) break; case kActionNone: - UPDATE_PARAM(params->param1, getState()->time, 450); + if (!Entity::updateParameter(params->param1, getState()->time, 450)) + break; getEntities()->exitCompartment(kEntityTatiana, kObjectCompartmentF, true); @@ -2197,7 +2202,8 @@ IMPLEMENT_FUNCTION(54, Tatiana, function54) } if (params->param1 > 3) { - UPDATE_PARAM(params->param3, getState()->timeTicks, 225); + if (!Entity::updateParameter(params->param3, getState()->timeTicks, 225)) + break; params->param1 = 0; params->param3 = 0; diff --git a/engines/lastexpress/entities/vassili.cpp b/engines/lastexpress/entities/vassili.cpp index 5079fdb252..6504df7928 100644 --- a/engines/lastexpress/entities/vassili.cpp +++ b/engines/lastexpress/entities/vassili.cpp @@ -400,7 +400,8 @@ IMPLEMENT_FUNCTION(13, Vassili, sleeping) case kActionNone: if (getEntities()->isInsideCompartment(kEntityPlayer, kCarRedSleeping, kPosition_8200)) { - UPDATE_PARAM(params->param3, getState()->timeTicks, params->param1); + if (!Entity::updateParameter(params->param3, getState()->timeTicks, params->param1)) + break; setCallback(1); setup_draw("303B"); @@ -459,7 +460,8 @@ IMPLEMENT_FUNCTION(15, Vassili, stealEgg) case kActionNone: if (getEntities()->isInsideCompartment(kEntityPlayer, kCarRedSleeping, kPosition_8200)) { - UPDATE_PARAM(params->param3, getState()->timeTicks, params->param1); + if (!Entity::updateParameter(params->param3, getState()->timeTicks, params->param1)) + break; setCallback(1); setup_draw("303B"); @@ -543,7 +545,8 @@ IMPLEMENT_FUNCTION(17, Vassili, chapter4Handler) case kActionNone: if (getEntities()->isInsideCompartment(kEntityPlayer, kCarRedSleeping, kPosition_8200)) { - UPDATE_PARAM(params->param3, getState()->timeTicks, params->param1); + if (!Entity::updateParameter(params->param3, getState()->timeTicks, params->param1)) + break; setCallback(1); setup_draw("303B"); diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp index bdd758a5be..f459b6f8e7 100644 --- a/engines/lastexpress/entities/verges.cpp +++ b/engines/lastexpress/entities/verges.cpp @@ -244,7 +244,8 @@ IMPLEMENT_FUNCTION_IIS(10, Verges, function10, CarIndex, EntityPosition) } if (params->param6) { - UPDATE_PARAM(params->param8, getState()->timeTicks, 75); + if (!Entity::updateParameter(params->param8, getState()->timeTicks, 75)) + break; getSound()->playSound(kEntityVerges, (char *)¶ms->seq); diff --git a/engines/lastexpress/entities/vesna.cpp b/engines/lastexpress/entities/vesna.cpp index b0ee9bcbc1..6889be4335 100644 --- a/engines/lastexpress/entities/vesna.cpp +++ b/engines/lastexpress/entities/vesna.cpp @@ -162,7 +162,8 @@ IMPLEMENT_FUNCTION(11, Vesna, function11) case kActionNone: if (parameters->param3) { - UPDATE_PARAM(parameters->param7, getState()->timeTicks, 75); + if (!Entity::updateParameter(parameters->param7, getState()->timeTicks, 75)) + break; parameters->param2 = 1; parameters->param3 = 0; @@ -511,7 +512,8 @@ IMPLEMENT_FUNCTION(20, Vesna, chapter3Handler) } if (parameters->param2) { - UPDATE_PARAM(parameters->param8, getState()->timeTicks, 75); + if (!Entity::updateParameter(parameters->param8, getState()->timeTicks, 75)) + break; parameters->param1 = 1; parameters->param2 = 0; @@ -1086,7 +1088,8 @@ IMPLEMENT_FUNCTION(30, Vesna, function30) UPDATE_PARAM_PROC_END } - UPDATE_PARAM(params->param4, getState()->timeTicks, 180); + if (!Entity::updateParameter(params->param4, getState()->timeTicks, 180)) + break; setCallback(1); setup_savegame(kSavegameTypeEvent, kEventCathVesnaTrainTopKilled); diff --git a/engines/lastexpress/entities/yasmin.cpp b/engines/lastexpress/entities/yasmin.cpp index 6fb1936303..f2b4d2edd1 100644 --- a/engines/lastexpress/entities/yasmin.cpp +++ b/engines/lastexpress/entities/yasmin.cpp @@ -445,7 +445,9 @@ IMPLEMENT_FUNCTION(20, Yasmin, function20) break; case kActionNone: - UPDATE_PARAM(params->param1, getState()->time, 2700); + if (!Entity::updateParameter(params->param1, getState()->time, 2700)) + break; + setup_function21(); break; -- cgit v1.2.3 From e13290a0286e86ee5c76f62ad74cb945a22cb38d Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 22 Jul 2012 22:43:11 -0400 Subject: LASTEXPRESS: Replace UPDATE_PARAM_CHECK macro --- engines/lastexpress/entities/alexei.cpp | 4 ++-- engines/lastexpress/entities/entity.cpp | 10 ++++++++++ engines/lastexpress/entities/entity.h | 1 + engines/lastexpress/entities/entity_intern.h | 6 ------ engines/lastexpress/entities/rebecca.cpp | 2 +- engines/lastexpress/entities/tatiana.cpp | 2 +- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/engines/lastexpress/entities/alexei.cpp b/engines/lastexpress/entities/alexei.cpp index c77b103f4d..a2564dd924 100644 --- a/engines/lastexpress/entities/alexei.cpp +++ b/engines/lastexpress/entities/alexei.cpp @@ -251,7 +251,7 @@ IMPLEMENT_FUNCTION(15, Alexei, function15) break; case kActionNone: - UPDATE_PARAM_CHECK(params->param2, getState()->time, params->param1) + if (Entity::updateParameterCheck(params->param2, getState()->time, params->param1)) { if (getEntities()->isSomebodyInsideRestaurantOrSalon()) { getData()->location = kLocationOutsideCompartment; @@ -689,7 +689,7 @@ IMPLEMENT_FUNCTION(21, Alexei, function21) break; case kActionNone: - UPDATE_PARAM_CHECK(params->param2, getState()->time, params->param1) + if (Entity::updateParameterCheck(params->param2, getState()->time, params->param1)) { getData()->location = kLocationOutsideCompartment; getData()->inventoryItem = kItemNone; diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 1989c4607b..664b3fa70b 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -613,6 +613,16 @@ bool Entity::updateParameter(uint ¶meter, uint timeValue, uint delta) { return true; } +bool Entity::updateParameterCheck(uint ¶meter, uint timeValue, uint delta) { + if (parameter && parameter >= timeValue) + return false; + + if (!parameter) + parameter = (uint)(timeValue + delta); + + return true; +} + void Entity::timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action) { if (getState()->time > timeValue && !parameter) { parameter = 1; diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 139f8ec418..ce8aa168a4 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -871,6 +871,7 @@ protected: ////////////////////////////////////////////////////////////////////////// bool updateParameter(uint ¶meter, uint time, uint delta); + bool updateParameterCheck(uint ¶meter, uint time, uint delta); void timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action); void timeCheckObject(TimeValue timeValue, uint ¶meter, ObjectIndex index, ObjectLocation location); diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 23f5e49120..4b97556a75 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -388,12 +388,6 @@ void class::setup_##name() { \ #define UPDATE_PARAM_PROC_END } -// Updating parameter with an added check (and code inside the check) -#define UPDATE_PARAM_CHECK(parameter, type, value) \ - if (!parameter || parameter < type) { \ - if (!parameter) \ - parameter = (uint)(type + value); - } // End of namespace LastExpress #endif // LASTEXPRESS_ENTITY_INTERN_H diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp index a890ebf258..96deaaf97f 100644 --- a/engines/lastexpress/entities/rebecca.cpp +++ b/engines/lastexpress/entities/rebecca.cpp @@ -697,7 +697,7 @@ IMPLEMENT_FUNCTION(22, Rebecca, chapter1Handler) if (params->param4 >= getState()->time) { label_callback_4: if (params->param1) { - UPDATE_PARAM_CHECK(params->param5, getState()->time, 900) + if (Entity::updateParameterCheck(params->param5, getState()->time, 900)) { if (getEntities()->isInSalon(kEntityPlayer)) { setCallback(5); setup_playSound("REB1013"); diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp index 76068aad24..9c2c582130 100644 --- a/engines/lastexpress/entities/tatiana.cpp +++ b/engines/lastexpress/entities/tatiana.cpp @@ -1023,7 +1023,7 @@ IMPLEMENT_FUNCTION(32, Tatiana, chapter3Handler) } if (parameters->param4 && parameters->param5) { - UPDATE_PARAM_CHECK(parameters->param4, getState()->time, 6300) + if (Entity::updateParameterCheck(parameters->param4, getState()->time, 6300)) { if (getEntities()->isSomebodyInsideRestaurantOrSalon()) { getData()->location = kLocationOutsideCompartment; -- cgit v1.2.3 From 8de4cb654782107100aaa3063cac79460546ed67 Mon Sep 17 00:00:00 2001 From: Julien Date: Mon, 23 Jul 2012 01:15:20 -0400 Subject: LASTEXPRESS: Replace UPDATE_PARAM_PROC and UPDATE_PARAM_PROC_TIME macros --- engines/lastexpress/entities/abbot.cpp | 4 ++-- engines/lastexpress/entities/alexei.cpp | 12 +++++------ engines/lastexpress/entities/anna.cpp | 32 ++++++++++++++-------------- engines/lastexpress/entities/august.cpp | 20 ++++++++--------- engines/lastexpress/entities/boutarel.cpp | 8 +++---- engines/lastexpress/entities/chapters.cpp | 20 ++++++++--------- engines/lastexpress/entities/cooks.cpp | 4 ++-- engines/lastexpress/entities/coudert.cpp | 12 +++++------ engines/lastexpress/entities/entity.cpp | 26 ++++++++++++++++------ engines/lastexpress/entities/entity.h | 5 +++-- engines/lastexpress/entities/entity_intern.h | 17 --------------- engines/lastexpress/entities/francois.cpp | 8 +++---- engines/lastexpress/entities/kahina.cpp | 24 ++++++++++----------- engines/lastexpress/entities/kronos.cpp | 8 +++---- engines/lastexpress/entities/mertens.cpp | 20 ++++++++--------- engines/lastexpress/entities/milos.cpp | 16 +++++++------- engines/lastexpress/entities/mmeboutarel.cpp | 8 +++---- engines/lastexpress/entities/pascale.cpp | 4 ++-- engines/lastexpress/entities/rebecca.cpp | 4 ++-- engines/lastexpress/entities/servers0.cpp | 12 +++++------ engines/lastexpress/entities/servers1.cpp | 4 ++-- engines/lastexpress/entities/tatiana.cpp | 20 ++++++++--------- engines/lastexpress/entities/vesna.cpp | 4 ++-- 23 files changed, 145 insertions(+), 147 deletions(-) diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp index c224b57abc..7916f88662 100644 --- a/engines/lastexpress/entities/abbot.cpp +++ b/engines/lastexpress/entities/abbot.cpp @@ -1650,12 +1650,12 @@ IMPLEMENT_FUNCTION(48, Abbot, function48) if (ENTITY_PARAM(0, 1)) getData()->inventoryItem = kItemInvalid; - UPDATE_PARAM_PROC(params->param1, getState()->time, 1800) + if (Entity::updateParameter(params->param1, getState()->time, 1800)) { getData()->inventoryItem = kItemNone; setCallback(4); setup_updatePosition("126C", kCarRedSleeping, 52); - UPDATE_PARAM_PROC_END + } TIME_CHECK_CALLBACK_INVENTORY(kTime2533500, params->param2, 5, setup_callbackActionRestaurantOrSalon); break; diff --git a/engines/lastexpress/entities/alexei.cpp b/engines/lastexpress/entities/alexei.cpp index a2564dd924..b31a9956bc 100644 --- a/engines/lastexpress/entities/alexei.cpp +++ b/engines/lastexpress/entities/alexei.cpp @@ -751,7 +751,7 @@ IMPLEMENT_FUNCTION(22, Alexei, function22) break; case kActionNone: - UPDATE_PARAM_PROC(params->param2, getState()->time, params->param2) + if (Entity::updateParameter(params->param2, getState()->time, params->param2)) { if (getEntities()->isSomebodyInsideRestaurantOrSalon()) { getData()->location = kLocationOutsideCompartment; getData()->inventoryItem = kItemNone; @@ -760,7 +760,7 @@ IMPLEMENT_FUNCTION(22, Alexei, function22) setup_updatePosition("103D", kCarRestaurant, 52); break; } - UPDATE_PARAM_PROC_END + } if (params->param3 == kTimeInvalid || getState()->time <= kTime1111500) break; @@ -1333,22 +1333,22 @@ IMPLEMENT_FUNCTION(35, Alexei, function35) case kActionNone: if (getEntities()->isInSalon(kEntityPlayer)) { - UPDATE_PARAM_PROC(params->param2, getState()->time, 2700) + if (Entity::updateParameter(params->param2, getState()->time, 2700)) { setCallback(1); setup_callbackActionRestaurantOrSalon(); break; - UPDATE_PARAM_PROC_END + } } else { params->param2 = 0; } - UPDATE_PARAM_PROC(params->param3, getState()->time, params->param1) + if (Entity::updateParameter(params->param3, getState()->time, params->param1)) { if (getEntities()->isSomebodyInsideRestaurantOrSalon()) { setCallback(3); setup_function15(); break; } - UPDATE_PARAM_PROC_END + } label_callback_3: if (!Entity::updateParameter(params->param4, getState()->time, 9000)) diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp index 80a5144bbe..ab7163a67c 100644 --- a/engines/lastexpress/entities/anna.cpp +++ b/engines/lastexpress/entities/anna.cpp @@ -198,12 +198,12 @@ IMPLEMENT_FUNCTION(12, Anna, function12) params->param2 = 1; if (params->param6) { - UPDATE_PARAM_PROC(params->param7, getState()->timeTicks, 75) + if (Entity::updateParameter(params->param7, getState()->timeTicks, 75)) { getSavePoints()->push(kEntityAnna, kEntityAnna, kActionEndSound); params->param6 = 0; params->param7 = 0; - UPDATE_PARAM_PROC_END + } } if (params->param4) { @@ -669,11 +669,11 @@ IMPLEMENT_FUNCTION_I(18, Anna, function18, TimeValue) } if (params->param5 && !params->param4) { - UPDATE_PARAM_PROC(params->param6, getState()->time, 900) + if (Entity::updateParameter(params->param6, getState()->time, 900)) { params->param2 |= kItemScarf; params->param5 = 0; params->param6 = 0; - UPDATE_PARAM_PROC_END + } } if (params->param3) { @@ -1152,11 +1152,11 @@ IMPLEMENT_FUNCTION(29, Anna, function29) case kActionNone: if (params->param2) { - UPDATE_PARAM_PROC(params->param3, getState()->time, 900) + if (Entity::updateParameter(params->param3, getState()->time, 900)) { getData()->inventoryItem = (InventoryItem)(getData()->inventoryItem | kItemScarf); params->param2 = 0; params->param3 = 0; - UPDATE_PARAM_PROC_END + } } if (params->param1) { @@ -1415,11 +1415,11 @@ IMPLEMENT_FUNCTION(34, Anna, function34) case kActionNone: if (!params->param1 && getEntities()->isPlayerPosition(kCarRedSleeping, 60)) { - UPDATE_PARAM_PROC(params->param2, getState()->time, 150) + if (Entity::updateParameter(params->param2, getState()->time, 150)) { setCallback(1); setup_draw("419B"); break; - UPDATE_PARAM_PROC_END + } } label_callback_1: @@ -2098,11 +2098,11 @@ IMPLEMENT_FUNCTION(48, Anna, function48) break; if (params->param3 != kTimeInvalid && getState()->time > kTime1969200) { - UPDATE_PARAM_PROC_TIME(kTime1983600, (!getEntities()->isInRestaurant(kEntityPlayer) || getSoundQueue()->isBuffered(kEntityBoutarel)), params->param3, 150) + if (Entity::updateParameterTime(kTime1983600, (!getEntities()->isInRestaurant(kEntityPlayer) || getSoundQueue()->isBuffered(kEntityBoutarel)), params->param3, 150)) { setCallback(3); setup_playSound("Aug3007A"); break; - UPDATE_PARAM_PROC_END + } } label_callback_4: @@ -2392,18 +2392,18 @@ IMPLEMENT_FUNCTION(53, Anna, function53) case kActionNone: if (getProgress().field_48 && params->param5 != kTimeInvalid) { - UPDATE_PARAM_PROC_TIME(kTime2065500, !getEntities()->isPlayerInCar(kCarRedSleeping), params->param5, 150) + if (Entity::updateParameterTime(kTime2065500, !getEntities()->isPlayerInCar(kCarRedSleeping), params->param5, 150)) { setup_function54(); break; - UPDATE_PARAM_PROC_END + } } if (params->param3) { - UPDATE_PARAM_PROC(params->param6, getState()->time, 9000) + if (Entity::updateParameter(params->param6, getState()->time, 9000)) { params->param4 = !params->param4; getEntities()->drawSequenceLeft(kEntityAnna, params->param4 ? "417B" : "417A"); params->param6 = 0; - UPDATE_PARAM_PROC_END + } } if (params->param1) { @@ -2546,11 +2546,11 @@ IMPLEMENT_FUNCTION(54, Anna, function54) if (params->param3) { TIME_CHECK(kTime2079000, params->param5, setup_function55); - UPDATE_PARAM_PROC(params->param6, getState()->time, 9000) + if (Entity::updateParameter(params->param6, getState()->time, 9000)) { params->param4 = !params->param4; getEntities()->drawSequenceLeft(kEntityAnna, params->param4 ? "417B" : "417A"); params->param6 = 0; - UPDATE_PARAM_PROC_END + } } if (params->param1) { diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp index d874c666f7..5ae8d11b95 100644 --- a/engines/lastexpress/entities/august.cpp +++ b/engines/lastexpress/entities/august.cpp @@ -538,10 +538,10 @@ label_continue: break; if (params->param6) { - UPDATE_PARAM_PROC(CURRENT_PARAM(1, 1), getState()->time, 6300) + if (Entity::updateParameter(CURRENT_PARAM(1, 1), getState()->time, 6300)) { params->param6 = 0; CURRENT_PARAM(1, 1) = 0; - UPDATE_PARAM_PROC_END + } } if (!params->param4 @@ -804,7 +804,7 @@ IMPLEMENT_FUNCTION_I(23, August, function23, TimeValue) } label_callback_8: - UPDATE_PARAM_PROC(CURRENT_PARAM(1, 4), getState()->timeTicks, 75) + if (Entity::updateParameter(CURRENT_PARAM(1, 4), getState()->timeTicks, 75)) { getEntities()->exitCompartment(kEntityAugust, kObjectCompartment1, true); if (getProgress().eventCorpseMovedFromFloor) { @@ -820,7 +820,7 @@ label_callback_8: setup_savegame(kSavegameTypeEvent, kEventAugustFindCorpse); } break; - UPDATE_PARAM_PROC_END + } label_callback_9: if (params->param3 && params->param1 < getState()->time && !CURRENT_PARAM(1, 5)) { @@ -1634,9 +1634,9 @@ IMPLEMENT_FUNCTION(32, August, function32) break; case kActionNone: - UPDATE_PARAM_PROC_TIME(kTime1179000, (!getEntities()->isInSalon(kEntityAnna) || getEntities()->isInSalon(kEntityPlayer)), params->param6, 0); + if (Entity::updateParameterTime(kTime1179000, (!getEntities()->isInSalon(kEntityAnna) || getEntities()->isInSalon(kEntityPlayer)), params->param6, 0)) { getSavePoints()->push(kEntityAugust, kEntityAnna, kAction123712592); - UPDATE_PARAM_PROC_END + } if (params->param1 && getEntities()->isSomebodyInsideRestaurantOrSalon()) { if (!params->param4) { @@ -1645,13 +1645,13 @@ IMPLEMENT_FUNCTION(32, August, function32) } if (params->param7 != kTimeInvalid && params->param4 < getState()->time) { - UPDATE_PARAM_PROC_TIME(params->param5, getEntities()->isInSalon(kEntityPlayer), params->param7, 0); + if (Entity::updateParameterTime((TimeValue)params->param5, getEntities()->isInSalon(kEntityPlayer), params->param7, 0)) { getData()->location = kLocationOutsideCompartment; setCallback(5); setup_updatePosition("109D", kCarRestaurant, 56); break; - UPDATE_PARAM_PROC_END + } } } @@ -3224,9 +3224,9 @@ IMPLEMENT_FUNCTION(63, August, function63) break; case kActionNone: - UPDATE_PARAM_PROC(params->param3, getState()->time, 1800) + if (Entity::updateParameter(params->param3, getState()->time, 1800)) { getData()->inventoryItem = kItemInvalid; - UPDATE_PARAM_PROC_END + } if (getState()->time > kTime2488500 && !params->param4) { params->param4 = 1; diff --git a/engines/lastexpress/entities/boutarel.cpp b/engines/lastexpress/entities/boutarel.cpp index ab8a0b9003..2a8c6603a4 100644 --- a/engines/lastexpress/entities/boutarel.cpp +++ b/engines/lastexpress/entities/boutarel.cpp @@ -646,11 +646,11 @@ IMPLEMENT_FUNCTION(20, Boutarel, function20) break; if (!params->param2) { - UPDATE_PARAM_PROC(params->param3, getState()->time, 4500) + if (Entity::updateParameter(params->param3, getState()->time, 4500)) { setCallback(3); setup_playSound("MRB1078A"); break; - UPDATE_PARAM_PROC_END + } } TIME_CHECK_CALLBACK_1(kTime1138500, params->param4, 4, setup_function14, false); @@ -936,9 +936,9 @@ IMPLEMENT_FUNCTION(29, Boutarel, function29) break; case kActionNone: - UPDATE_PARAM_PROC(params->param2, getState()->time, 450) + if (Entity::updateParameter(params->param2, getState()->time, 450)) { getSavePoints()->push(kEntityBoutarel, kEntityServers1, kAction256200848); - UPDATE_PARAM_PROC_END + } if (!params->param1) break; diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp index 76165800f2..c5631173b4 100644 --- a/engines/lastexpress/entities/chapters.cpp +++ b/engines/lastexpress/entities/chapters.cpp @@ -393,13 +393,13 @@ IMPLEMENT_FUNCTION(8, Chapters, chapter1Handler) if (!getProgress().isTrainRunning || getState()->time >= kTime1458000) goto label_processStations; - UPDATE_PARAM_PROC(params->param6, getState()->timeTicks, params->param2) + if (Entity::updateParameter(params->param6, getState()->timeTicks, params->param2)) { // Play sound FX getSound()->playLocomotiveSound(); params->param2 = 225 * (4 * rnd(5) + 20); params->param6 = 0; - UPDATE_PARAM_PROC_END + } label_processStations: // Process stations @@ -896,15 +896,15 @@ IMPLEMENT_FUNCTION(15, Chapters, chapter3Handler) case kActionNone: if (getProgress().isTrainRunning) { - UPDATE_PARAM_PROC(params->param4, getState()->timeTicks, params->param1) + if (Entity::updateParameter(params->param4, getState()->timeTicks, params->param1)) { getSound()->playLocomotiveSound(); params->param1 = 225 * (4 * rnd(5) + 20); params->param4 = 0; - UPDATE_PARAM_PROC_END + } } - UPDATE_PARAM_PROC(params->param5, getState()->timeTicks, params->param2) + if (Entity::updateParameter(params->param5, getState()->timeTicks, params->param2)) { switch (rnd(2)) { default: break; @@ -920,7 +920,7 @@ IMPLEMENT_FUNCTION(15, Chapters, chapter3Handler) params->param2 = 225 * (4 * rnd(6) + 8); params->param5 = 0; - UPDATE_PARAM_PROC_END + } TIME_CHECK_CALLBACK_2(kTimeEnterSalzbourg, params->param6, 1, setup_enterStation, "Salzburg", kCitySalzbourg); @@ -1195,15 +1195,15 @@ IMPLEMENT_FUNCTION(19, Chapters, chapter4Handler) case kActionNone: if (getProgress().isTrainRunning) { - UPDATE_PARAM_PROC(params->param6, getState()->timeTicks, params->param4); + if (Entity::updateParameter(params->param6, getState()->timeTicks, params->param4)) { getSound()->playLocomotiveSound(); params->param4 = 225 * (4 * rnd(5) + 20); params->param6 = 0; - UPDATE_PARAM_PROC_END + } } - UPDATE_PARAM_PROC(params->param7, getState()->timeTicks, params->param5) + if (Entity::updateParameter(params->param7, getState()->timeTicks, params->param5)) { switch (rnd(2)) { default: break; @@ -1219,7 +1219,7 @@ IMPLEMENT_FUNCTION(19, Chapters, chapter4Handler) params->param5 = 225 * (4 * rnd(6) + 8); params->param7 = 0; - UPDATE_PARAM_PROC_END + } TIME_CHECK_CALLBACK_2(kTimeEnterPoszony, params->param8, 1, setup_enterStation, "Pozsony", kCityPoszony); diff --git a/engines/lastexpress/entities/cooks.cpp b/engines/lastexpress/entities/cooks.cpp index a3fb69aeb9..62a1e0fdb6 100644 --- a/engines/lastexpress/entities/cooks.cpp +++ b/engines/lastexpress/entities/cooks.cpp @@ -434,12 +434,12 @@ IMPLEMENT_FUNCTION(11, Cooks, chapter3Handler) break; case kActionNone: - UPDATE_PARAM_PROC(params->param4, getState()->time, params->param2) + if (Entity::updateParameter(params->param4, getState()->time, params->param2)) { // Broken plate sound getSound()->playSound(kEntityPlayer, "LIB122", getSound()->getSoundFlag(kEntityCooks)); params->param2 = 225 * (4 * rnd(30) + 120); params->param4 = 0; - UPDATE_PARAM_PROC_END + } if (getState()->time > kTime2079000 && !params->param5) { params->param1 = 0; diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp index c589b8f0f8..4458632f2d 100644 --- a/engines/lastexpress/entities/coudert.cpp +++ b/engines/lastexpress/entities/coudert.cpp @@ -908,9 +908,9 @@ IMPLEMENT_FUNCTION_II(20, Coudert, function20, ObjectIndex, ObjectIndex) break; case kActionNone: - UPDATE_PARAM_PROC(CURRENT_PARAM(1, 3), getState()->time, 300) + if (Entity::updateParameter(CURRENT_PARAM(1, 3), getState()->time, 300)) { getSound()->playSound(kEntityPlayer, "ZFX1004", getSound()->getSoundFlag(kEntityCoudert)); - UPDATE_PARAM_PROC_END + } if (!Entity::updateParameter(CURRENT_PARAM(1, 4), getState()->time, 900)) break; @@ -2281,14 +2281,14 @@ label_callback_9: label_callback_10: if (getState()->time > kTime1189800 && !ENTITY_PARAM(0, 1) && !ENTITY_PARAM(2, 1)) { - UPDATE_PARAM_PROC(params->param3, getState()->time, 2700); + if (Entity::updateParameter(params->param3, getState()->time, 2700)) { ENTITY_PARAM(0, 2) = 1; ENTITY_PARAM(0, 1) = 1; getEntities()->drawSequenceLeft(kEntityCoudert, "697F"); params->param3 = 0; - UPDATE_PARAM_PROC_END + } } if (!ENTITY_PARAM(0, 2)) @@ -3539,11 +3539,11 @@ label_callback_1: params->param2 = (uint)(getState()->time + 4500); if (params->param3 != kTimeInvalid) { - UPDATE_PARAM_PROC_TIME(params->param2, !getEntities()->isPlayerInCar(kCarRedSleeping), params->param3, 0) + if (Entity::updateParameterTime((TimeValue)params->param2, !getEntities()->isPlayerInCar(kCarRedSleeping), params->param3, 0)) { setCallback(2); setup_function55(); break; - UPDATE_PARAM_PROC_END + } } } diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 664b3fa70b..04ae6493c3 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -601,11 +601,11 @@ void Entity::callbackAction() { // Helper functions ////////////////////////////////////////////////////////////////////////// -bool Entity::updateParameter(uint ¶meter, uint timeValue, uint delta) { +bool Entity::updateParameter(uint ¶meter, uint timeType, uint delta) { if (!parameter) - parameter = (uint)(timeValue + delta); + parameter = (uint)(timeType + delta); - if (parameter >= timeValue) + if (parameter >= timeType) return false; parameter = kTimeInvalid; @@ -613,12 +613,26 @@ bool Entity::updateParameter(uint ¶meter, uint timeValue, uint delta) { return true; } -bool Entity::updateParameterCheck(uint ¶meter, uint timeValue, uint delta) { - if (parameter && parameter >= timeValue) +bool Entity::updateParameterTime(TimeValue timeValue, bool check, uint ¶meter, uint delta) { + if (getState()->time <= timeValue) { + if (check || !parameter) + parameter = (uint)(getState()->time + delta); + } + + if (parameter >= getState()->time && getState()->time <= timeValue) + return false; + + parameter = kTimeInvalid; + + return true; +} + +bool Entity::updateParameterCheck(uint ¶meter, uint timeType, uint delta) { + if (parameter && parameter >= timeType) return false; if (!parameter) - parameter = (uint)(timeValue + delta); + parameter = (uint)(timeType + delta); return true; } diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index ce8aa168a4..73114a1436 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -870,8 +870,9 @@ protected: // Helper functions ////////////////////////////////////////////////////////////////////////// - bool updateParameter(uint ¶meter, uint time, uint delta); - bool updateParameterCheck(uint ¶meter, uint time, uint delta); + bool updateParameter(uint ¶meter, uint timeType, uint delta); + bool updateParameterCheck(uint ¶meter, uint timeType, uint delta); + bool updateParameterTime(TimeValue timeValue, bool check, uint ¶meter, uint delta); void timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action); void timeCheckObject(TimeValue timeValue, uint ¶meter, ObjectIndex index, ObjectLocation location); diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 4b97556a75..c4fc36a8ee 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -371,23 +371,6 @@ void class::setup_##name() { \ parameter = kTimeInvalid; \ } -// Updating parameter with code inside the check -#define UPDATE_PARAM_PROC(parameter, type, value) \ - if (!parameter) \ - parameter = (uint)(type + value); \ - if (parameter < type) { \ - parameter = kTimeInvalid; - -#define UPDATE_PARAM_PROC_TIME(timeValue, test, parameter, value) \ - if (getState()->time <= timeValue) { \ - if (test || !parameter) \ - parameter = (uint)(getState()->time + value); \ - } \ - if (parameter < getState()->time || getState()->time > timeValue) { \ - parameter = kTimeInvalid; - -#define UPDATE_PARAM_PROC_END } - } // End of namespace LastExpress #endif // LASTEXPRESS_ENTITY_INTERN_H diff --git a/engines/lastexpress/entities/francois.cpp b/engines/lastexpress/entities/francois.cpp index b99dbe466b..e4d401d202 100644 --- a/engines/lastexpress/entities/francois.cpp +++ b/engines/lastexpress/entities/francois.cpp @@ -278,7 +278,7 @@ IMPLEMENT_FUNCTION_I(11, Francois, function11, TimeValue) case kActionNone: if (!getSoundQueue()->isBuffered(kEntityFrancois)) { - UPDATE_PARAM_PROC(CURRENT_PARAM(1, 1), getState()->timeTicks, params->param6) + if (Entity::updateParameter(CURRENT_PARAM(1, 1), getState()->timeTicks, params->param6)) { switch (rnd(7)) { default: break; @@ -311,7 +311,7 @@ IMPLEMENT_FUNCTION_I(11, Francois, function11, TimeValue) params->param6 = 15 * rnd(7); CURRENT_PARAM(1, 1) = 0; - UPDATE_PARAM_PROC_END + } } if (!getEntities()->hasValidFrame(kEntityFrancois) || !getEntities()->isWalkingOppositeToPlayer(kEntityFrancois)) @@ -998,11 +998,11 @@ label_callback_5: } if (params->param5 != kTimeInvalid) { - UPDATE_PARAM_PROC_TIME(kTimeEnd, !getEntities()->isDistanceBetweenEntities(kEntityFrancois, kEntityPlayer, 2000), params->param5, 75); + if (Entity::updateParameterTime(kTimeEnd, !getEntities()->isDistanceBetweenEntities(kEntityFrancois, kEntityPlayer, 2000), params->param5, 75)) { setCallback(6); setup_playSound("Fra2010"); break; - UPDATE_PARAM_PROC_END + } } label_callback_6: diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp index 2124de1687..08f845f5ba 100644 --- a/engines/lastexpress/entities/kahina.cpp +++ b/engines/lastexpress/entities/kahina.cpp @@ -394,10 +394,10 @@ IMPLEMENT_FUNCTION(15, Kahina, function15) case kActionNone: if (params->param2 != kTimeInvalid) { - UPDATE_PARAM_PROC_TIME(params->param1, !getEntities()->isPlayerInCar(kCarRedSleeping), params->param2, 0) + if (Entity::updateParameterTime((TimeValue)params->param1, !getEntities()->isPlayerInCar(kCarRedSleeping), params->param2, 0)) { setCallback(9); setup_updateEntity(kCarRedSleeping, kPosition_4070); - UPDATE_PARAM_PROC_END + } } break; @@ -580,18 +580,18 @@ IMPLEMENT_FUNCTION(17, Kahina, chapter2Handler) case kActionNone: if (params->param1) { - UPDATE_PARAM_PROC(params->param2, getState()->time, 9000) + if (Entity::updateParameter(params->param2, getState()->time, 9000)) { params->param1 = 1; params->param2 = 0; - UPDATE_PARAM_PROC_END + } } if (getEvent(kEventKahinaAskSpeakFirebird) && getEvent(kEventKronosConversationFirebird) && getEntities()->isInsideTrainCar(kEntityPlayer, kCarKronos)) { - UPDATE_PARAM_PROC(params->param3, getState()->time, 900) + if (Entity::updateParameter(params->param3, getState()->time, 900)) { setCallback(1); setup_savegame(kSavegameTypeEvent, kEventKronosConversationFirebird); break; - UPDATE_PARAM_PROC_END + } } label_callback_3: @@ -785,10 +785,10 @@ label_callback_2: } if (!params->param1) { - UPDATE_PARAM_PROC(params->param3, getState()->time, 9000) + if (Entity::updateParameter(params->param3, getState()->time, 9000)) { params->param1 = 1; params->param3 = 0; - UPDATE_PARAM_PROC_END + } } if (getEvent(kEventKahinaAskSpeakFirebird) @@ -927,11 +927,11 @@ IMPLEMENT_FUNCTION(21, Kahina, function21) params->param3 = (uint)getState()->time + 4500; if (params->param6 != kTimeInvalid) { - UPDATE_PARAM_PROC_TIME(params->param3, (getEntities()->isPlayerPosition(kCarKronos, 80) || getEntities()->isPlayerPosition(kCarKronos, 88)), params->param5, 0) + if (Entity::updateParameterTime((TimeValue)params->param3, (getEntities()->isPlayerPosition(kCarKronos, 80) || getEntities()->isPlayerPosition(kCarKronos, 88)), params->param5, 0)) { setCallback(2); setup_function23(); break; - UPDATE_PARAM_PROC_END + } } } @@ -942,14 +942,14 @@ label_callback_2: params->param4 = (uint)getState()->time + 4500; if (params->param6 != kTimeInvalid) { - UPDATE_PARAM_PROC_TIME(params->param3, (getEntities()->isPlayerPosition(kCarKronos, 80) || getEntities()->isPlayerPosition(kCarKronos, 88)), params->param6, 0) + if (Entity::updateParameterTime((TimeValue)params->param3, (getEntities()->isPlayerPosition(kCarKronos, 80) || getEntities()->isPlayerPosition(kCarKronos, 88)), params->param6, 0)) { getSound()->playSound(kEntityPlayer, "LIB014", getSound()->getSoundFlag(kEntityKahina)); getSound()->playSound(kEntityPlayer, "LIB015", getSound()->getSoundFlag(kEntityKahina)); getEntities()->drawSequenceLeft(kEntityKahina, "202a"); params->param2 = 0; - UPDATE_PARAM_PROC_END + } } } diff --git a/engines/lastexpress/entities/kronos.cpp b/engines/lastexpress/entities/kronos.cpp index c9fe0dcde1..5dd790ce12 100644 --- a/engines/lastexpress/entities/kronos.cpp +++ b/engines/lastexpress/entities/kronos.cpp @@ -293,10 +293,10 @@ IMPLEMENT_FUNCTION(15, Kronos, function15) case kActionNone: if (params->param1 && !getEntities()->isInSalon(kEntityBoutarel)) { - UPDATE_PARAM_PROC(params->param2, getState()->timeTicks, 75) + if (Entity::updateParameter(params->param2, getState()->timeTicks, 75)) { setup_function16(); break; - UPDATE_PARAM_PROC_END + } } if (params->param3 != kTimeInvalid && getState()->time > kTime2002500) { @@ -526,9 +526,9 @@ IMPLEMENT_FUNCTION(20, Kronos, function20) } if (CURRENT_PARAM(1, 2) != kTimeInvalid && params->param7 < getState()->time) { - UPDATE_PARAM_PROC_TIME(params->param8, !params->param1, CURRENT_PARAM(1, 2), 450) + if (Entity::updateParameterTime((TimeValue)params->param8, !params->param1, CURRENT_PARAM(1, 2), 450)) { getSavePoints()->push(kEntityKronos, kEntityKahina, kAction237555748); - UPDATE_PARAM_PROC_END + } } if (!params->param1) diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp index c093ac4b30..9d9225f49b 100644 --- a/engines/lastexpress/entities/mertens.cpp +++ b/engines/lastexpress/entities/mertens.cpp @@ -534,20 +534,20 @@ IMPLEMENT_FUNCTION_II(13, Mertens, function13, bool, bool) Entity::savegameBloodJacket(); if (!params->param2 && !params->param3) { - UPDATE_PARAM_PROC(params->param4, getState()->timeTicks, 75) + if (Entity::updateParameter(params->param4, getState()->timeTicks, 75)) { getData()->inventoryItem = kItemNone; setCallback(5); setup_function18(); break; - UPDATE_PARAM_PROC_END + } } - UPDATE_PARAM_PROC(params->param5, getState()->timeTicks, 225) + if (Entity::updateParameter(params->param5, getState()->timeTicks, 225)) { getData()->inventoryItem = kItemNone; setCallback(6); setup_function18(); break; - UPDATE_PARAM_PROC_END + } getData()->inventoryItem = (getProgress().chapter == kChapter1 && !ENTITY_PARAM(2, 1) @@ -1059,9 +1059,9 @@ IMPLEMENT_FUNCTION_II(21, Mertens, function21, ObjectIndex, ObjectIndex) break; case kActionNone: - UPDATE_PARAM_PROC(CURRENT_PARAM(1, 4), getState()->time, 300) + if (Entity::updateParameter(CURRENT_PARAM(1, 4), getState()->time, 300)) { getSound()->playSound(kEntityPlayer, "ZFX1004", getSound()->getSoundFlag(kEntityMertens)); - UPDATE_PARAM_PROC_END + } if (!Entity::updateParameter(CURRENT_PARAM(1, 5), getState()->time, 900)) break; @@ -1616,13 +1616,13 @@ IMPLEMENT_FUNCTION_I(27, Mertens, tylerCompartment, MertensActionType) break; } - UPDATE_PARAM_PROC(params->param2, getState()->timeTicks, 150) + if (Entity::updateParameter(params->param2, getState()->timeTicks, 150)) { getObjects()->update(kObjectCompartment1, kEntityPlayer, getObjects()->get(kObjectCompartment1).location, kCursorNormal, kCursorNormal); setCallback(10); setup_playSound16("CON1018A"); break; - UPDATE_PARAM_PROC_END + } label_callback10: if (!params->param3) @@ -3025,11 +3025,11 @@ IMPLEMENT_FUNCTION(42, Mertens, function42) label_callback_8: if (getState()->time > kTime1215000 && !ENTITY_PARAM(0, 1) && !ENTITY_PARAM(2, 1)) { - UPDATE_PARAM_PROC(params->param5, getState()->time, 2700) + if (Entity::updateParameter(params->param5, getState()->time, 2700)) { getEntities()->drawSequenceLeft(kEntityMertens, "601E"); ENTITY_PARAM(0, 1) = 1; params->param5 = 0; - UPDATE_PARAM_PROC_END + } } if (ENTITY_PARAM(0, 8)) { diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp index 8ebb23b024..5c5d481938 100644 --- a/engines/lastexpress/entities/milos.cpp +++ b/engines/lastexpress/entities/milos.cpp @@ -176,11 +176,11 @@ IMPLEMENT_FUNCTION_I(11, Milos, function11, TimeValue) } if (params->param2) { - UPDATE_PARAM_PROC(params->param8, getState()->timeTicks, 75) + if (Entity::updateParameter(params->param8, getState()->timeTicks, 75)) { params->param2 = 0; params->param3 = 1; getObjects()->update(kObjectCompartmentG, kEntityMilos, kObjectLocation1, kCursorNormal, kCursorNormal); - UPDATE_PARAM_PROC_END + } } params->param8 = 0; @@ -189,10 +189,10 @@ IMPLEMENT_FUNCTION_I(11, Milos, function11, TimeValue) break; if (params->param6) { - UPDATE_PARAM_PROC(CURRENT_PARAM(1, 1), getState()->time, 4500) + if (Entity::updateParameter(CURRENT_PARAM(1, 1), getState()->time, 4500)) { params->param6 = 0; CURRENT_PARAM(1, 1) = 0; - UPDATE_PARAM_PROC_END + } } if (!getProgress().field_CC) { @@ -730,11 +730,11 @@ IMPLEMENT_FUNCTION(15, Milos, chapter1Handler) } if (getEntities()->isPlayerPosition(kCarRestaurant, 61) && !params->param1) { - UPDATE_PARAM_PROC(params->param4, getState()->timeTicks, 45) + if (Entity::updateParameter(params->param4, getState()->timeTicks, 45)) { setCallback(1); setup_draw("009C"); break; - UPDATE_PARAM_PROC_END + } } if (getEntities()->isPlayerPosition(kCarRestaurant, 70) && !params->param2) { @@ -1287,10 +1287,10 @@ IMPLEMENT_FUNCTION(25, Milos, function25) case kActionNone: if (!getEvent(kEventMilosCompartmentVisitTyler) && !getProgress().field_54 && !ENTITY_PARAM(0, 4)) { - UPDATE_PARAM_PROC(params->param3, getState()->time, 13500) + if (Entity::updateParameter(params->param3, getState()->time, 13500)) { getSavePoints()->push(kEntityMilos, kEntityVesna, kAction155913424); params->param3 = 0; - UPDATE_PARAM_PROC_END + } } if (params->param1) { diff --git a/engines/lastexpress/entities/mmeboutarel.cpp b/engines/lastexpress/entities/mmeboutarel.cpp index 323e686ec3..888adeb372 100644 --- a/engines/lastexpress/entities/mmeboutarel.cpp +++ b/engines/lastexpress/entities/mmeboutarel.cpp @@ -400,7 +400,7 @@ IMPLEMENT_FUNCTION(13, MmeBoutarel, function13) case kActionNone: if (!getSoundQueue()->isBuffered(kEntityMmeBoutarel) && params->param6 != kTimeInvalid) { - UPDATE_PARAM_PROC_TIME(params->param1, !getEntities()->isDistanceBetweenEntities(kEntityMmeBoutarel, kEntityPlayer, 2000), params->param6, 0) + if (Entity::updateParameterTime((TimeValue)params->param1, !getEntities()->isDistanceBetweenEntities(kEntityMmeBoutarel, kEntityPlayer, 2000), params->param6, 0)) { getObjects()->update(kObjectCompartmentD, kEntityPlayer, kObjectLocation1, kCursorNormal, kCursorNormal); getObjects()->update(kObject51, kEntityPlayer, kObjectLocation1, kCursorNormal, kCursorNormal); @@ -412,16 +412,16 @@ IMPLEMENT_FUNCTION(13, MmeBoutarel, function13) setCallback(1); setup_playSound("MME1037"); break; - UPDATE_PARAM_PROC_END + } } label_callback_1: if (getProgress().field_24 && params->param7 != kTimeInvalid) { - UPDATE_PARAM_PROC_TIME(kTime1093500, (!params->param5 || !getEntities()->isPlayerInCar(kCarRedSleeping)), params->param7, 0) + if (Entity::updateParameterTime(kTime1093500, (!params->param5 || !getEntities()->isPlayerInCar(kCarRedSleeping)), params->param7, 0)) { setCallback(2); setup_function11(); break; - UPDATE_PARAM_PROC_END + } } TIME_CHECK(kTime1094400, params->param8, setup_function14); diff --git a/engines/lastexpress/entities/pascale.cpp b/engines/lastexpress/entities/pascale.cpp index e74cf3490f..6e9f992390 100644 --- a/engines/lastexpress/entities/pascale.cpp +++ b/engines/lastexpress/entities/pascale.cpp @@ -1115,13 +1115,13 @@ IMPLEMENT_FUNCTION(33, Pascale, function33) case kActionNone: if (params->param4) { - UPDATE_PARAM_PROC(params->param5, getState()->time, 4500) + if (Entity::updateParameter(params->param5, getState()->time, 4500)) { getObjects()->update(kObjectCompartmentG, kEntityPascale, kObjectLocation1, kCursorNormal, kCursorNormal); setCallback(1); setup_playSound("Wat5010"); break; - UPDATE_PARAM_PROC_END + } } label_callback1: diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp index 96deaaf97f..c0c22fa1da 100644 --- a/engines/lastexpress/entities/rebecca.cpp +++ b/engines/lastexpress/entities/rebecca.cpp @@ -498,14 +498,14 @@ IMPLEMENT_FUNCTION_I(20, Rebecca, function20, TimeValue) if (!params->param2) { params->param6 = 0; } else { - UPDATE_PARAM_PROC(params->param6, getState()->timeTicks, 75) + if (Entity::updateParameter(params->param6, getState()->timeTicks, 75)) { params->param2 = 0; params->param3 = 1; getObjects()->update(kObjectCompartmentE, kEntityRebecca, kObjectLocation1, kCursorNormal, kCursorNormal); getObjects()->update(kObject52, kEntityRebecca, kObjectLocation1, kCursorNormal, kCursorNormal); params->param6 = 0; - UPDATE_PARAM_PROC_END + } } if (getProgress().chapter == kChapter1 && !ENTITY_PARAM(0, 3)) { diff --git a/engines/lastexpress/entities/servers0.cpp b/engines/lastexpress/entities/servers0.cpp index 56fc0e6056..73e0d34722 100644 --- a/engines/lastexpress/entities/servers0.cpp +++ b/engines/lastexpress/entities/servers0.cpp @@ -312,17 +312,17 @@ IMPLEMENT_FUNCTION(20, Servers0, chapter1Handler) case kActionNone: if (params->param2) { - UPDATE_PARAM_PROC(params->param3, getState()->time, 2700); + if (Entity::updateParameter(params->param3, getState()->time, 2700)) { ENTITY_PARAM(0, 4) = 1; params->param2 = 0; - UPDATE_PARAM_PROC_END + } } if (params->param1) { - UPDATE_PARAM_PROC(params->param4, getState()->time, 4500) + if (Entity::updateParameter(params->param4, getState()->time, 4500)) { ENTITY_PARAM(0, 5) = 1; params->param1 = 0; - UPDATE_PARAM_PROC_END + } } if (!getEntities()->isInKitchen(kEntityServers0) && !getEntities()->isSomebodyInsideRestaurantOrSalon()) @@ -733,10 +733,10 @@ IMPLEMENT_FUNCTION(32, Servers0, chapter4Handler) break; case kActionNone: - UPDATE_PARAM_PROC(params->param2, getState()->time, 3600) + if (Entity::updateParameter(params->param2, getState()->time, 3600)) { ENTITY_PARAM(1, 8) = 1; params->param1 = 0; - UPDATE_PARAM_PROC_END + } if (!getEntities()->isInKitchen(kEntityServers1) || !getEntities()->isSomebodyInsideRestaurantOrSalon()) break; diff --git a/engines/lastexpress/entities/servers1.cpp b/engines/lastexpress/entities/servers1.cpp index 24bf678f3a..a8f4c0233c 100644 --- a/engines/lastexpress/entities/servers1.cpp +++ b/engines/lastexpress/entities/servers1.cpp @@ -563,10 +563,10 @@ IMPLEMENT_FUNCTION(26, Servers1, chapter4Handler) case kActionNone: if (params->param2) { - UPDATE_PARAM_PROC(params->param2, getState()->time, 900) + if (Entity::updateParameter(params->param2, getState()->time, 900)) { ENTITY_PARAM(1, 5) = 1; params->param1 = 0; - UPDATE_PARAM_PROC_END + } } if (!getEntities()->isInKitchen(kEntityServers1) || !getEntities()->isSomebodyInsideRestaurantOrSalon()) diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp index 9c2c582130..992d38e017 100644 --- a/engines/lastexpress/entities/tatiana.cpp +++ b/engines/lastexpress/entities/tatiana.cpp @@ -374,10 +374,10 @@ IMPLEMENT_FUNCTION(18, Tatiana, function18) } if (!params->param1) { - UPDATE_PARAM_PROC(params->param3, getState()->time, 4500) + if (Entity::updateParameter(params->param3, getState()->time, 4500)) { getEntities()->drawSequenceRight(kEntityTatiana, "806DS"); params->param1 = 1; - UPDATE_PARAM_PROC_END + } } } @@ -424,20 +424,20 @@ IMPLEMENT_FUNCTION(19, Tatiana, chapter1Handler) if (getSoundQueue()->isBuffered(kEntityTatiana) || !params->param4 || params->param3 == 2 || getSoundQueue()->isBuffered("TAT1066")) goto label_tatiana_chapter1_2; - UPDATE_PARAM_PROC(params->param5, getState()->timeTicks, 450) + if (Entity::updateParameter(params->param5, getState()->timeTicks, 450)) { getSound()->playSound(kEntityTatiana, params->param3 ? "TAT1069B" : "TAT1069A"); getProgress().field_64 = 1; params->param3++; params->param5 = 0; - UPDATE_PARAM_PROC_END + } if (getEntities()->isPlayerPosition(kCarRestaurant, 71)) { - UPDATE_PARAM_PROC(params->param6, getState()->timeTicks, 75) + if (Entity::updateParameter(params->param6, getState()->timeTicks, 75)) { getSound()->playSound(kEntityTatiana, params->param3 ? "TAT1069B" : "TAT1069A"); getProgress().field_64 = 1; params->param3++; params->param6 = 0; - UPDATE_PARAM_PROC_END + } } label_tatiana_chapter1_2: @@ -615,7 +615,7 @@ IMPLEMENT_FUNCTION(22, Tatiana, function22) if (params->param1 == kTimeInvalid || getState()->time <= kTime1179000) goto label_update; - UPDATE_PARAM_PROC_TIME(kTime1233000, ((!getEvent(kEventTatianaAskMatchSpeakRussian) && !getEvent(kEventTatianaAskMatch)) || getEntities()->isInGreenCarEntrance(kEntityPlayer)), params->param1, 0) + if (Entity::updateParameterTime(kTime1233000, ((!getEvent(kEventTatianaAskMatchSpeakRussian) && !getEvent(kEventTatianaAskMatch)) || getEntities()->isInGreenCarEntrance(kEntityPlayer)), params->param1, 0)) { label_update: if (!getEvent(kEventTatianaAskMatchSpeakRussian) && !getEvent(kEventTatianaAskMatch) @@ -624,7 +624,7 @@ label_update: getObjects()->update(kObject25, kEntityTatiana, kObjectLocation1, kCursorNormal, kCursorForward); getObjects()->update(kObjectTrainTimeTable, kEntityTatiana, kObjectLocation1, kCursorNormal, kCursorForward); } - UPDATE_PARAM_PROC_END + } params->param1 = kTimeInvalid; @@ -1284,13 +1284,13 @@ IMPLEMENT_FUNCTION(37, Tatiana, function37) params->param3 = (uint)getState()->time + 900; if (params->param4 != kTimeInvalid && params->param3 < getState()->time) { - UPDATE_PARAM_PROC_TIME(kTime2227500, !getEntities()->isPlayerInCar(kCarRedSleeping), params->param4, 450) + if (Entity::updateParameterTime(kTime2227500, !getEntities()->isPlayerInCar(kCarRedSleeping), params->param4, 450)) { getProgress().field_5C = 1; if (getEntities()->isInsideCompartment(kEntityAnna, kCarRedSleeping, kPosition_4070)) { setup_function38(); break; } - UPDATE_PARAM_PROC_END + } } } diff --git a/engines/lastexpress/entities/vesna.cpp b/engines/lastexpress/entities/vesna.cpp index 6889be4335..f54f0f3231 100644 --- a/engines/lastexpress/entities/vesna.cpp +++ b/engines/lastexpress/entities/vesna.cpp @@ -1082,10 +1082,10 @@ IMPLEMENT_FUNCTION(30, Vesna, function30) case kActionNone: if (!params->param1) { - UPDATE_PARAM_PROC(params->param3, getState()->timeTicks, 120) + if (Entity::updateParameter(params->param3, getState()->timeTicks, 120)) { getSound()->playSound(kEntityVesna, "Ves50001", kFlagDefault); params->param1 = 1; - UPDATE_PARAM_PROC_END + } } if (!Entity::updateParameter(params->param4, getState()->timeTicks, 180)) -- cgit v1.2.3 From 82ad017a8e8614ca4c4141c4d1a8fd2a9c45010d Mon Sep 17 00:00:00 2001 From: Julien Date: Mon, 23 Jul 2012 01:23:41 -0400 Subject: LASTEXPRESS: Replace UPDATE_PARAM_GOTO macro --- engines/lastexpress/entities/anna.cpp | 3 ++- engines/lastexpress/entities/august.cpp | 3 ++- engines/lastexpress/entities/entity_intern.h | 13 ------------- engines/lastexpress/entities/tatiana.cpp | 3 ++- engines/lastexpress/entities/train.cpp | 16 +++++++++------- engines/lastexpress/entities/vassili.cpp | 3 ++- 6 files changed, 17 insertions(+), 24 deletions(-) diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp index ab7163a67c..0f326792eb 100644 --- a/engines/lastexpress/entities/anna.cpp +++ b/engines/lastexpress/entities/anna.cpp @@ -3277,7 +3277,8 @@ IMPLEMENT_FUNCTION(67, Anna, chapter4Handler) case kActionNone: if (getEntities()->isPlayerPosition(kCarRedSleeping, 46)) { - UPDATE_PARAM_GOTO(params->param4, getState()->timeTicks, 30, label_next); + if (!Entity::updateParameter(params->param4, getState()->timeTicks, 30)) + goto label_next; getScenes()->loadSceneFromPosition(kCarRedSleeping, 8); } diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp index 5ae8d11b95..e863fe1d87 100644 --- a/engines/lastexpress/entities/august.cpp +++ b/engines/lastexpress/entities/august.cpp @@ -523,7 +523,8 @@ IMPLEMENT_FUNCTION_I(21, August, function21, TimeValue) } if (params->param2) { - UPDATE_PARAM_GOTO(params->param8, getState()->timeTicks, 75, label_continue); + if (!Entity::updateParameter(params->param8, getState()->timeTicks, 75)) + goto label_continue; params->param2 = 0; params->param3 = 1; diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index c4fc36a8ee..4a7aabff28 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -358,19 +358,6 @@ void class::setup_##name() { \ } \ } -////////////////////////////////////////////////////////////////////////// -// Param update -////////////////////////////////////////////////////////////////////////// - -// Todo: replace with UPDATE_PARAM_PROC as appropriate -#define UPDATE_PARAM_GOTO(parameter, type, value, label) { \ - if (!parameter) \ - parameter = (uint)(type + value); \ - if (parameter >= type) \ - goto label; \ - parameter = kTimeInvalid; \ -} - } // End of namespace LastExpress #endif // LASTEXPRESS_ENTITY_INTERN_H diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp index 992d38e017..b7c26bdd1c 100644 --- a/engines/lastexpress/entities/tatiana.cpp +++ b/engines/lastexpress/entities/tatiana.cpp @@ -1955,7 +1955,8 @@ IMPLEMENT_FUNCTION(48, Tatiana, function48) if (!params->param1 || getSoundQueue()->isBuffered(kEntityTatiana)) goto label_end; - UPDATE_PARAM_GOTO(params->param2, getState()->timeTicks, 5 * (3 * rnd(5) + 30), label_end); + if (!Entity::updateParameter(params->param2, getState()->timeTicks, 5 * (3 * rnd(5) + 30))) + goto label_end; getSound()->playSound(kEntityTatiana, "LIB012", kFlagDefault); params->param2 = 0; diff --git a/engines/lastexpress/entities/train.cpp b/engines/lastexpress/entities/train.cpp index 0830dffbef..e3f530ef25 100644 --- a/engines/lastexpress/entities/train.cpp +++ b/engines/lastexpress/entities/train.cpp @@ -267,18 +267,20 @@ IMPLEMENT_FUNCTION(8, Train, process) if ((getEntities()->isPlayerInCar(kCarGreenSleeping) || getEntities()->isPlayerInCar(kCarRedSleeping)) && params->param4 && !params->param5) { - params->param4 -= 1; + params->param4 -= 1; - if (!params->param4 && getProgress().jacket == kJacketGreen) { + if (!params->param4 && getProgress().jacket == kJacketGreen) { - getAction()->playAnimation(isNight() ? kEventCathSmokeNight : kEventCathSmokeDay); - params->param5 = 1; - getScenes()->processScene(); - } + getAction()->playAnimation(isNight() ? kEventCathSmokeNight : kEventCathSmokeDay); + params->param5 = 1; + getScenes()->processScene(); + } } if (params->param6) { - UPDATE_PARAM_GOTO(params1->param7, getState()->time, 900, label_process); + if (!Entity::updateParameter(params1->param7, getState()->time, 900)) + goto label_process; + getScenes()->loadSceneFromPosition(kCarRestaurant, 58); } diff --git a/engines/lastexpress/entities/vassili.cpp b/engines/lastexpress/entities/vassili.cpp index 6504df7928..5344e705f5 100644 --- a/engines/lastexpress/entities/vassili.cpp +++ b/engines/lastexpress/entities/vassili.cpp @@ -144,7 +144,8 @@ IMPLEMENT_FUNCTION(6, Vassili, function6) case kActionNone: if (getEntities()->isInsideCompartment(kEntityPlayer, kCarRedSleeping, kPosition_8200)) { - UPDATE_PARAM_GOTO(params->param3, getState()->timeTicks, params->param1, label_function7); + if (!Entity::updateParameter(params->param3, getState()->timeTicks, params->param1)) + goto label_function7; setCallback(1); setup_draw("303B"); -- cgit v1.2.3 From e985f7374fd20efc4574bc8320967deef7489d5a Mon Sep 17 00:00:00 2001 From: Julien Date: Mon, 23 Jul 2012 01:25:03 -0400 Subject: LASTEXPRESS: Move Entity function declaration macros to entity.h --- engines/lastexpress/entities/entity.h | 31 +++++++++++++++++++++++++++- engines/lastexpress/entities/entity_intern.h | 30 --------------------------- 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 73114a1436..76abab6c2f 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -41,9 +41,38 @@ class Sequence; class SequenceFrame; struct SavePoint; +////////////////////////////////////////////////////////////////////////// +// Declaration +////////////////////////////////////////////////////////////////////////// +#define DECLARE_FUNCTION(name) \ + void setup_##name(); \ + void name(const SavePoint &savepoint); + +#define DECLARE_FUNCTION_1(name, param1) \ + void setup_##name(param1); \ + void name(const SavePoint &savepoint); + +#define DECLARE_FUNCTION_2(name, param1, param2) \ + void setup_##name(param1, param2); \ + void name(const SavePoint &savepoint); + +#define DECLARE_FUNCTION_3(name, param1, param2, param3) \ + void setup_##name(param1, param2, param3); \ + void name(const SavePoint &savepoint); + +#define DECLARE_FUNCTION_4(name, param1, param2, param3, param4) \ + void setup_##name(param1, param2, param3, param4); \ + void name(const SavePoint &savepoint); + +#define DECLARE_FUNCTION_NOSETUP(name) \ + void name(const SavePoint &savepoint); + +#define DECLARE_NULL_FUNCTION() \ + void setup_nullfunction(); ////////////////////////////////////////////////////////////////////////// // Callbacks +////////////////////////////////////////////////////////////////////////// #define ENTITY_CALLBACK(class, name, pointer) \ Common::Functor1Mem(pointer, &class::name) @@ -63,7 +92,7 @@ struct SavePoint; ((EntityData::EntityParametersIIII*)_data->getParameters(8, index))->param##id - +////////////////////////////////////////////////////////////////////////// class EntityData : Common::Serializable { public: diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 4a7aabff28..e62eeb0c56 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -25,36 +25,6 @@ namespace LastExpress { -////////////////////////////////////////////////////////////////////////// -// Declaration -////////////////////////////////////////////////////////////////////////// - -#define DECLARE_FUNCTION(name) \ - void setup_##name(); \ - void name(const SavePoint &savepoint); - -#define DECLARE_FUNCTION_1(name, param1) \ - void setup_##name(param1); \ - void name(const SavePoint &savepoint); - -#define DECLARE_FUNCTION_2(name, param1, param2) \ - void setup_##name(param1, param2); \ - void name(const SavePoint &savepoint); - -#define DECLARE_FUNCTION_3(name, param1, param2, param3) \ - void setup_##name(param1, param2, param3); \ - void name(const SavePoint &savepoint); - -#define DECLARE_FUNCTION_4(name, param1, param2, param3, param4) \ - void setup_##name(param1, param2, param3, param4); \ - void name(const SavePoint &savepoint); - -#define DECLARE_FUNCTION_NOSETUP(name) \ - void name(const SavePoint &savepoint); - -#define DECLARE_NULL_FUNCTION() \ - void setup_nullfunction(); - ////////////////////////////////////////////////////////////////////////// // Setup ////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 8545991739848d878e61ff058e8fa1326261e634 Mon Sep 17 00:00:00 2001 From: Julien Date: Mon, 23 Jul 2012 14:28:41 -0400 Subject: LASTEXPRESS: Remove several TIME_CHECK* macros --- engines/lastexpress/entities/abbot.cpp | 9 ++--- engines/lastexpress/entities/alexei.cpp | 4 +-- engines/lastexpress/entities/alouan.cpp | 32 +++++++++++------ engines/lastexpress/entities/anna.cpp | 9 ++--- engines/lastexpress/entities/august.cpp | 8 ++--- engines/lastexpress/entities/boutarel.cpp | 7 ++-- engines/lastexpress/entities/cooks.cpp | 2 +- engines/lastexpress/entities/coudert.cpp | 29 ++++++++++------ engines/lastexpress/entities/entity.cpp | 51 ++++++++++++++++++++++++++++ engines/lastexpress/entities/entity.h | 8 +++++ engines/lastexpress/entities/entity_intern.h | 35 ------------------- engines/lastexpress/entities/francois.cpp | 28 +++++++++------ engines/lastexpress/entities/gendarmes.cpp | 2 +- engines/lastexpress/entities/hadija.cpp | 50 +++++++++++++++++---------- engines/lastexpress/entities/ivo.cpp | 4 +-- engines/lastexpress/entities/kahina.cpp | 4 +-- engines/lastexpress/entities/kronos.cpp | 9 +++-- engines/lastexpress/entities/mahmud.cpp | 5 +-- engines/lastexpress/entities/max.cpp | 2 +- engines/lastexpress/entities/mertens.cpp | 22 +++++++----- engines/lastexpress/entities/milos.cpp | 2 +- engines/lastexpress/entities/mmeboutarel.cpp | 8 +++-- engines/lastexpress/entities/rebecca.cpp | 11 +++--- engines/lastexpress/entities/salko.cpp | 2 +- engines/lastexpress/entities/sophie.cpp | 2 +- engines/lastexpress/entities/tatiana.cpp | 2 +- engines/lastexpress/entities/vassili.cpp | 2 +- engines/lastexpress/entities/verges.cpp | 10 +++--- engines/lastexpress/entities/vesna.cpp | 2 +- engines/lastexpress/entities/yasmin.cpp | 46 +++++++++++++++++-------- 30 files changed, 251 insertions(+), 156 deletions(-) diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp index 7916f88662..e0fe429520 100644 --- a/engines/lastexpress/entities/abbot.cpp +++ b/engines/lastexpress/entities/abbot.cpp @@ -691,7 +691,7 @@ IMPLEMENT_FUNCTION(28, Abbot, function28) break; case kActionNone: - TIME_CHECK_CALLBACK(kTime2052000, params->param1, 1, setup_function29); + Entity::timeCheckCallback(kTime2052000, params->param1, 1, WRAP_SETUP_FUNCTION(Abbot, setup_function29)); break; case kActionDefault: @@ -1428,7 +1428,8 @@ IMPLEMENT_FUNCTION(43, Abbot, function43) } label_callback_1: - TIME_CHECK(kTime2466000, params->param5, setup_function44); + if (Entity::timeCheck(kTime2466000, params->param5, WRAP_SETUP_FUNCTION(Abbot, setup_function44))) + break; if (params->param3) { if (!Entity::updateParameter(params->param6, getState()->timeTicks, 75)) @@ -1657,7 +1658,7 @@ IMPLEMENT_FUNCTION(48, Abbot, function48) setup_updatePosition("126C", kCarRedSleeping, 52); } - TIME_CHECK_CALLBACK_INVENTORY(kTime2533500, params->param2, 5, setup_callbackActionRestaurantOrSalon); + Entity::timeCheckCallbackInventory(kTime2533500, params->param2, 5, WRAP_SETUP_FUNCTION(Abbot, setup_callbackActionRestaurantOrSalon)); break; case kAction1: @@ -1709,7 +1710,7 @@ IMPLEMENT_FUNCTION(48, Abbot, function48) getEntities()->drawSequenceLeft(kEntityAbbot, "126B"); params->param1 = 0; - TIME_CHECK_CALLBACK_INVENTORY(kTime2533500, params->param2, 5, setup_callbackActionRestaurantOrSalon); + Entity::timeCheckCallbackInventory(kTime2533500, params->param2, 5, WRAP_SETUP_FUNCTION(Abbot, setup_callbackActionRestaurantOrSalon)); break; case 5: diff --git a/engines/lastexpress/entities/alexei.cpp b/engines/lastexpress/entities/alexei.cpp index b31a9956bc..115c890f6f 100644 --- a/engines/lastexpress/entities/alexei.cpp +++ b/engines/lastexpress/entities/alexei.cpp @@ -446,7 +446,7 @@ IMPLEMENT_FUNCTION(17, Alexei, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler) + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Alexei, setup_chapter1Handler)); break; case kActionDefault: @@ -978,7 +978,7 @@ IMPLEMENT_FUNCTION(26, Alexei, function26) break; case kActionNone: - TIME_CHECK(kTime1512000, params->param1, setup_function27) + Entity::timeCheck(kTime1512000, params->param1, WRAP_SETUP_FUNCTION(Alexei, setup_function27)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/alouan.cpp b/engines/lastexpress/entities/alouan.cpp index 7549aaf6e6..2f086de46b 100644 --- a/engines/lastexpress/entities/alouan.cpp +++ b/engines/lastexpress/entities/alouan.cpp @@ -111,7 +111,7 @@ IMPLEMENT_FUNCTION(10, Alouan, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Alouan, setup_chapter1Handler)); break; case kActionDefault: @@ -131,7 +131,8 @@ IMPLEMENT_FUNCTION(11, Alouan, chapter1Handler) case kActionNone: - TIME_CHECK_CALLBACK(kTime1096200, params->param1, 1, setup_compartment8to6); + if (Entity::timeCheckCallback(kTime1096200, params->param1, 1, WRAP_SETUP_FUNCTION(Alouan, setup_compartment8to6))) + break; label_callback1: if (getState()->time > kTime1162800 && !params->param2) { @@ -281,21 +282,27 @@ IMPLEMENT_FUNCTION(16, Alouan, chapter3Handler) break; case kActionNone: - TIME_CHECK_CALLBACK(kTimeCitySalzbourg, params->param1, 1, setup_compartment8to6); + if (Entity::timeCheckCallback(kTimeCitySalzbourg, params->param1, 1, WRAP_SETUP_FUNCTION(Alouan, setup_compartment8to6))) + break; label_callback1: - if (params->param2 != kTimeInvalid && getState()->time > kTime1989000) - TIME_CHECK_CAR(kTime2119500, params->param5, 5, setup_compartment8); + if (params->param2 != kTimeInvalid && getState()->time > kTime1989000) { + if (Entity::timeCheckCar(kTime2119500, params->param5, 5, WRAP_SETUP_FUNCTION(Alouan, setup_compartment8))) + break; + } label_callback2: TIME_CHECK_CALLBACK_1(kTime2052000, params->param3, 3, setup_playSound, "Har1005"); label_callback3: - TIME_CHECK_CALLBACK(kTime2133000, params->param4, 4, setup_compartment6to8); + if (Entity::timeCheckCallback(kTime2133000, params->param4, 4, WRAP_SETUP_FUNCTION(Alouan, setup_compartment6to8))) + break; label_callback4: - if (params->param5 != kTimeInvalid && getState()->time > kTime2151000) - TIME_CHECK_CAR(kTime2241000, params->param5, 5, setup_compartment8); + if (params->param5 != kTimeInvalid && getState()->time > kTime2151000) { + if (Entity::timeCheckCar(kTime2241000, params->param5, 5, WRAP_SETUP_FUNCTION(Alouan, setup_compartment8))) + break; + } break; case kActionDefault: @@ -352,11 +359,14 @@ IMPLEMENT_FUNCTION(18, Alouan, chapter4Handler) break; case kActionNone: - if (params->param1 != kTimeInvalid) - TIME_CHECK_CAR(kTime2443500, params->param1, 1, setup_compartment8); + if (params->param1 != kTimeInvalid) { + if (Entity::timeCheckCar(kTime2443500, params->param1, 1, WRAP_SETUP_FUNCTION(Alouan, setup_compartment8))) + break; + } label_callback1: - TIME_CHECK_CALLBACK(kTime2455200, params->param2, 2, setup_compartment8to6); + if (Entity::timeCheckCallback(kTime2455200, params->param2, 2, WRAP_SETUP_FUNCTION(Alouan, setup_compartment8to6))) + break; label_callback2: if (getState()->time > kTime2475000 && !params->param3) { diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp index 0f326792eb..f8768032b5 100644 --- a/engines/lastexpress/entities/anna.cpp +++ b/engines/lastexpress/entities/anna.cpp @@ -547,7 +547,7 @@ IMPLEMENT_FUNCTION(16, Anna, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Anna, setup_chapter1Handler)); break; case kActionDefault: @@ -1423,7 +1423,7 @@ IMPLEMENT_FUNCTION(34, Anna, function34) } label_callback_1: - TIME_CHECK(kTime1489500, params->param3, setup_function35); + Entity::timeCheck(kTime1489500, params->param3, WRAP_SETUP_FUNCTION(Anna, setup_function35)); break; case kActionKnock: @@ -2544,7 +2544,8 @@ IMPLEMENT_FUNCTION(54, Anna, function54) case kActionNone: if (params->param3) { - TIME_CHECK(kTime2079000, params->param5, setup_function55); + if (Entity::timeCheck(kTime2079000, params->param5, WRAP_SETUP_FUNCTION(Anna, setup_function55))) + break; if (Entity::updateParameter(params->param6, getState()->time, 9000)) { params->param4 = !params->param4; @@ -3429,7 +3430,7 @@ IMPLEMENT_FUNCTION(69, Anna, function69) break; } - TIME_CHECK_CALLBACK(kTime2535300, params->param3, 4, setup_callbackActionRestaurantOrSalon); + Entity::timeCheckCallback(kTime2535300, params->param3, 4, WRAP_SETUP_FUNCTION(Anna, setup_callbackActionRestaurantOrSalon)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp index e863fe1d87..0412da69ac 100644 --- a/engines/lastexpress/entities/august.cpp +++ b/engines/lastexpress/entities/august.cpp @@ -752,7 +752,7 @@ IMPLEMENT_FUNCTION(22, August, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(August, setup_chapter1Handler)); break; case kActionDefault: @@ -1966,7 +1966,7 @@ IMPLEMENT_FUNCTION(38, August, function38) case kActionNone: Entity::timeCheckSavepoint(kTime1801800, params->param1, kEntityAugust, kEntityRebecca, kAction155980128); - TIME_CHECK_CALLBACK(kTime1820700, params->param2, 3, setup_callbackActionRestaurantOrSalon); + Entity::timeCheckCallback(kTime1820700, params->param2, 3, WRAP_SETUP_FUNCTION(August, setup_callbackActionRestaurantOrSalon)); break; case kActionDefault: @@ -2404,7 +2404,7 @@ IMPLEMENT_FUNCTION_END IMPLEMENT_FUNCTION(46, August, function46) switch (savepoint.action) { default: - TIME_CHECK_CALLBACK(kTime2088000, params->param1, 1, setup_function47); + Entity::timeCheckCallback(kTime2088000, params->param1, 1, WRAP_SETUP_FUNCTION(August, setup_function47)); break; case kActionNone: @@ -2489,7 +2489,7 @@ IMPLEMENT_FUNCTION(48, August, function48) break; case kActionNone: - TIME_CHECK(kTimeCityLinz, params->param1, setup_function49); + Entity::timeCheck(kTimeCityLinz, params->param1, WRAP_SETUP_FUNCTION(August, setup_function49)); break; case kActionKnock: diff --git a/engines/lastexpress/entities/boutarel.cpp b/engines/lastexpress/entities/boutarel.cpp index 2a8c6603a4..3c13cb121e 100644 --- a/engines/lastexpress/entities/boutarel.cpp +++ b/engines/lastexpress/entities/boutarel.cpp @@ -617,7 +617,7 @@ IMPLEMENT_FUNCTION(19, Boutarel, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Boutarel, setup_chapter1Handler)); break; case kActionDefault: @@ -1047,7 +1047,7 @@ IMPLEMENT_FUNCTION(32, Boutarel, chapter4Handler) break; case kActionNone: - TIME_CHECK(kTime2367000, params->param1, setup_function33); + Entity::timeCheck(kTime2367000, params->param1, WRAP_SETUP_FUNCTION(Boutarel, setup_function33)); break; case kActionDefault: @@ -1113,7 +1113,8 @@ IMPLEMENT_FUNCTION(34, Boutarel, function34) break; case kActionNone: - TIME_CHECK(kTime2470500, params->param1, setup_function35); + if (Entity::timeCheck(kTime2470500, params->param1, WRAP_SETUP_FUNCTION(Boutarel, setup_function35))) + break; if (getState()->time > kTime2457000 && getEvent(kEventAugustDrink)) { getSavePoints()->push(kEntityBoutarel, kEntityAbbot, kAction159003408); diff --git a/engines/lastexpress/entities/cooks.cpp b/engines/lastexpress/entities/cooks.cpp index 62a1e0fdb6..5e8a2df8cb 100644 --- a/engines/lastexpress/entities/cooks.cpp +++ b/engines/lastexpress/entities/cooks.cpp @@ -239,7 +239,7 @@ IMPLEMENT_FUNCTION(5, Cooks, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Cooks, setup_chapter1Handler)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp index 4458632f2d..b604277903 100644 --- a/engines/lastexpress/entities/coudert.cpp +++ b/engines/lastexpress/entities/coudert.cpp @@ -1963,7 +1963,7 @@ IMPLEMENT_FUNCTION(36, Coudert, chapter1) break; case kActionNone: - TIME_CHECK_CALLBACK(kTimeChapter1, params->param1, 1, setup_chapter1Handler) + Entity::timeCheckCallback(kTimeChapter1, params->param1, 1, WRAP_SETUP_FUNCTION(Coudert, setup_chapter1Handler)); break; case kActionDefault: @@ -2825,22 +2825,28 @@ label_callback_12: } label_callback_13: - TIME_CHECK_CALLBACK(kTime2088900, params->param1, 14, setup_function32); + if (Entity::timeCheckCallback(kTime2088900, params->param1, 14, WRAP_SETUP_FUNCTION(Coudert, setup_function32))) + break; label_callback_14: - TIME_CHECK_CALLBACK(kTime2119500, params->param2, 15, setup_function32); + if (Entity::timeCheckCallback(kTime2119500, params->param2, 15, WRAP_SETUP_FUNCTION(Coudert, setup_function32))) + break; label_callback_15: - TIME_CHECK_CALLBACK(kTime2138400, params->param3, 16, setup_function32); + if (Entity::timeCheckCallback(kTime2138400, params->param3, 16, WRAP_SETUP_FUNCTION(Coudert, setup_function32))) + break; label_callback_16: - TIME_CHECK_CALLBACK(kTime2147400, params->param4, 17, setup_function32); + if (Entity::timeCheckCallback(kTime2147400, params->param4, 17, WRAP_SETUP_FUNCTION(Coudert, setup_function32))) + break; label_callback_17: - TIME_CHECK_CALLBACK(kTime2160000, params->param5, 18, setup_function32); + if (Entity::timeCheckCallback(kTime2160000, params->param5, 18, WRAP_SETUP_FUNCTION(Coudert, setup_function32))) + break; label_callback_18: - TIME_CHECK_CALLBACK(kTime2205000, params->param6, 19, setup_function32); + if (Entity::timeCheckCallback(kTime2205000, params->param6, 19, WRAP_SETUP_FUNCTION(Coudert, setup_function32))) + break; label_callback_19: if (ENTITY_PARAM(0, 2)) { @@ -3556,13 +3562,16 @@ label_callback_2: label_callback_3: if (!params->param1) { - TIME_CHECK_CALLBACK(kTime2394000, params->param4, 4, setup_function56); + if (Entity::timeCheckCallback(kTime2394000, params->param4, 4, WRAP_SETUP_FUNCTION(Coudert, setup_function56))) + break; label_callback_4: - TIME_CHECK_CALLBACK(kTime2434500, params->param5, 5, setup_function32); + if (Entity::timeCheckCallback(kTime2434500, params->param5, 5, WRAP_SETUP_FUNCTION(Coudert, setup_function32))) + break; label_callback_5: - TIME_CHECK_CALLBACK(kTime2448000, params->param6, 6, setup_function32); + if (Entity::timeCheckCallback(kTime2448000, params->param6, 6, WRAP_SETUP_FUNCTION(Coudert, setup_function32))) + break; } label_callback_6: diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 04ae6493c3..48856a7bc4 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -637,6 +637,57 @@ bool Entity::updateParameterCheck(uint ¶meter, uint timeType, uint delta) { return true; } +bool Entity::timeCheck(TimeValue timeValue, uint ¶meter, Common::Functor0 *function) { + if (getState()->time > timeValue && !parameter) { + parameter = 1; + (*function)(); + + return true; + } + + return false; +} + +bool Entity::timeCheckCallback(TimeValue timeValue, uint ¶meter, byte callback, Common::Functor0 *function) { + if (getState()->time > timeValue && !parameter) { + parameter = 1; + setCallback(callback); + (*function)(); + + return true; + } + + return false; +} + +bool Entity::timeCheckCallbackInventory(TimeValue timeValue, uint ¶meter, byte callback, Common::Functor0 *function) { + if (getState()->time > timeValue && !parameter) { + parameter = 1; + getData()->inventoryItem = kItemNone; + setCallback(callback); + (*function)(); + + return true; + } + + return false; +} + +bool Entity::timeCheckCar(TimeValue timeValue, uint ¶meter, byte callback, Common::Functor0 *function) { + if ((getState()->time <= timeValue && !getEntities()->isPlayerInCar(kCarGreenSleeping)) || !parameter) + parameter = (uint)getState()->time + 75; + + if (getState()->time > timeValue || parameter < getState()->time) { + parameter = kTimeInvalid; + setCallback(callback); + (*function)(); + + return true; + } + + return false; +} + void Entity::timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action) { if (getState()->time > timeValue && !parameter) { parameter = 1; diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 76abab6c2f..6e55e21b74 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -82,6 +82,9 @@ struct SavePoint; #define ADD_NULL_FUNCTION() \ _callbacks.push_back(new ENTITY_CALLBACK(Entity, nullfunction, this)); +#define WRAP_SETUP_FUNCTION(className, method) \ + new Common::Functor0Mem(this, &className::method) + ////////////////////////////////////////////////////////////////////////// // Parameters macros ////////////////////////////////////////////////////////////////////////// @@ -903,10 +906,15 @@ protected: bool updateParameterCheck(uint ¶meter, uint timeType, uint delta); bool updateParameterTime(TimeValue timeValue, bool check, uint ¶meter, uint delta); + bool timeCheck(TimeValue timeValue, uint ¶meter, Common::Functor0 *function); + bool timeCheckCallback(TimeValue timeValue, uint ¶meter, byte callback, Common::Functor0 *function); + bool timeCheckCallbackInventory(TimeValue timeValue, uint ¶meter, byte callback, Common::Functor0 *function); + bool timeCheckCar(TimeValue timeValue, uint ¶meter, byte callback, Common::Functor0 *function); void timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action); void timeCheckObject(TimeValue timeValue, uint ¶meter, ObjectIndex index, ObjectLocation location); bool timeCheckCallbackAction(TimeValue timeValue, uint ¶meter); bool timeCheckPlaySoundUpdatePosition(TimeValue timeValue, uint ¶meter, byte callback, const char* sound, EntityPosition position); + }; diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index e62eeb0c56..1d6c462a88 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -269,21 +269,6 @@ void class::setup_##name() { \ ////////////////////////////////////////////////////////////////////////// // Time check macros ////////////////////////////////////////////////////////////////////////// -#define TIME_CHECK(timeValue, parameter, function) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - function(); \ - break; \ - } - -#define TIME_CHECK_CALLBACK(timeValue, parameter, callback, function) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - setCallback(callback); \ - function(); \ - break; \ - } - #define TIME_CHECK_CALLBACK_1(timeValue, parameter, callback, function, param1) \ if (getState()->time > timeValue && !parameter) { \ parameter = 1; \ @@ -308,26 +293,6 @@ void class::setup_##name() { \ break; \ } -#define TIME_CHECK_CALLBACK_INVENTORY(timeValue, parameter, callback, function) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - getData()->inventoryItem = kItemNone; \ - setCallback(callback); \ - function(); \ - break; \ - } - -#define TIME_CHECK_CAR(timeValue, parameter, callback, function) {\ - if ((getState()->time <= timeValue && !getEntities()->isPlayerInCar(kCarGreenSleeping)) || !parameter) \ - parameter = (uint)getState()->time + 75; \ - if (getState()->time > timeValue || parameter < getState()->time) { \ - parameter = kTimeInvalid; \ - setCallback(callback); \ - function(); \ - break; \ - } \ -} - } // End of namespace LastExpress #endif // LASTEXPRESS_ENTITY_INTERN_H diff --git a/engines/lastexpress/entities/francois.cpp b/engines/lastexpress/entities/francois.cpp index e4d401d202..89fdcaf668 100644 --- a/engines/lastexpress/entities/francois.cpp +++ b/engines/lastexpress/entities/francois.cpp @@ -848,7 +848,7 @@ IMPLEMENT_FUNCTION(17, Francois, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Francois, setup_chapter1Handler)); break; case kActionDefault: @@ -883,7 +883,7 @@ IMPLEMENT_FUNCTION(19, Francois, function19) break; case kActionNone: - TIME_CHECK_CALLBACK(kTime1161000, params->param1, 2, setup_function12); + Entity::timeCheckCallback(kTime1161000, params->param1, 2, WRAP_SETUP_FUNCTION(Francois, setup_function12)); break; case kAction101107728: @@ -981,7 +981,8 @@ label_callback_1: TIME_CHECK_CALLBACK_1(kTime1764000, params->param1, 2, setup_playSound, "Fra2011"); label_callback_2: - TIME_CHECK_CALLBACK(kTime1800000, params->param2, 3, setup_function13); + if (Entity::timeCheckCallback(kTime1800000, params->param2, 3, WRAP_SETUP_FUNCTION(Francois, setup_function13))) + break; label_callback_3: if (!getInventory()->hasItem(kItemWhistle) && getInventory()->get(kItemWhistle)->location != kObjectLocation3) { @@ -1085,25 +1086,32 @@ IMPLEMENT_FUNCTION(25, Francois, chapter3Handler) } label_callback_2: - TIME_CHECK_CALLBACK(kTime2025000, params->param3, 3, setup_function12); + if (Entity::timeCheckCallback(kTime2025000, params->param3, 3, WRAP_SETUP_FUNCTION(Francois, setup_function12))) + break; label_callback_3: - TIME_CHECK_CALLBACK(kTime2052000, params->param4, 4, setup_function12); + if (Entity::timeCheckCallback(kTime2052000, params->param4, 4, WRAP_SETUP_FUNCTION(Francois, setup_function12))) + break; label_callback_4: - TIME_CHECK_CALLBACK(kTime2079000, params->param5, 5, setup_function12); + if (Entity::timeCheckCallback(kTime2079000, params->param5, 5, WRAP_SETUP_FUNCTION(Francois, setup_function12))) + break; label_callback_5: - TIME_CHECK_CALLBACK(kTime2092500, params->param6, 6, setup_function12); + if (Entity::timeCheckCallback(kTime2092500, params->param6, 6, WRAP_SETUP_FUNCTION(Francois, setup_function12))) + break; label_callback_6: - TIME_CHECK_CALLBACK(kTime2173500, params->param7, 7, setup_function12); + if (Entity::timeCheckCallback(kTime2173500, params->param7, 7, WRAP_SETUP_FUNCTION(Francois, setup_function12))) + break; label_callback_7: - TIME_CHECK_CALLBACK(kTime2182500, params->param8, 8, setup_function12); + if (Entity::timeCheckCallback(kTime2182500, params->param8, 8, WRAP_SETUP_FUNCTION(Francois, setup_function12))) + break; label_callback_8: - TIME_CHECK_CALLBACK(kTime2241000, CURRENT_PARAM(1, 1), 9, setup_function12); + if (Entity::timeCheckCallback(kTime2241000, CURRENT_PARAM(1, 1), 9, WRAP_SETUP_FUNCTION(Francois, setup_function12))) + break; label_callback_9: if (!getInventory()->hasItem(kItemWhistle) && getInventory()->get(kItemWhistle)->location != kObjectLocation3) { diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp index 22697b396c..a912fa4ecb 100644 --- a/engines/lastexpress/entities/gendarmes.cpp +++ b/engines/lastexpress/entities/gendarmes.cpp @@ -66,7 +66,7 @@ IMPLEMENT_FUNCTION(2, Gendarmes, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Gendarmes, setup_chapter1Handler)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/hadija.cpp b/engines/lastexpress/entities/hadija.cpp index 62badc46a6..e9abcd888a 100644 --- a/engines/lastexpress/entities/hadija.cpp +++ b/engines/lastexpress/entities/hadija.cpp @@ -111,7 +111,7 @@ IMPLEMENT_FUNCTION(10, Hadija, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Hadija, setup_chapter1Handler)); break; case kActionDefault: @@ -134,7 +134,8 @@ IMPLEMENT_FUNCTION(11, Hadija, chapter1Handler) break; label_callback1: - TIME_CHECK_CALLBACK(kTime1084500, params->param2, 2, setup_compartment6to8); + if (Entity::timeCheckCallback(kTime1084500, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6to8))) + break; label_callback2: if (params->param3 != kTimeInvalid && getState()->time > kTime1093500) { @@ -162,7 +163,8 @@ label_callback2: } label_callback3: - TIME_CHECK_CALLBACK(kTime1156500, params->param4, 4, setup_compartment8to6); + if (Entity::timeCheckCallback(kTime1156500, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6))) + break; label_callback4: if (params->param5 != kTimeInvalid && getState()->time > kTime1165500) { @@ -252,7 +254,7 @@ IMPLEMENT_FUNCTION(14, Hadija, chapter2Handler) } if (params->param2 == kTimeInvalid || getState()->time <= kTime1786500) { - TIME_CHECK_CALLBACK(kTime1822500, params->param3, 2, setup_compartment8to6); + Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6)); break; } @@ -262,7 +264,7 @@ IMPLEMENT_FUNCTION(14, Hadija, chapter2Handler) params->param2 = (uint)getState()->time + 75; if (params->param2 >= getState()->time) { - TIME_CHECK_CALLBACK(kTime1822500, params->param3, 2, setup_compartment8to6); + Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6)); break; } } @@ -279,7 +281,7 @@ IMPLEMENT_FUNCTION(14, Hadija, chapter2Handler) break; case 1: - TIME_CHECK_CALLBACK(kTime1822500, params->param3, 2, setup_compartment8to6); + Entity::timeCheckCallback(kTime1822500, params->param3, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6)); break; case 2: @@ -319,20 +321,26 @@ IMPLEMENT_FUNCTION(16, Hadija, chapter3Handler) break; case kActionNone: - TIME_CHECK_CALLBACK(kTime1998000, params->param1, 1, setup_compartment6to8); + if (Entity::timeCheckCallback(kTime1998000, params->param1, 1, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6to8))) + break; label_callback1: - TIME_CHECK_CALLBACK(kTime2020500, params->param2, 2, setup_compartment8to6); + if (Entity::timeCheckCallback(kTime2020500, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6))) + break; label_callback2: - TIME_CHECK_CALLBACK(kTime2079000, params->param3, 3, setup_compartment6to8); + if (Entity::timeCheckCallback(kTime2079000, params->param3, 3, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6to8))) + break; label_callback3: - TIME_CHECK_CALLBACK(kTime2187000, params->param4, 4, setup_compartment8to6); + if (Entity::timeCheckCallback(kTime2187000, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6))) + break; label_callback4: - if (params->param5 != kTimeInvalid && getState()->time > kTime2196000) - TIME_CHECK_CAR(kTime2254500, params->param5, 5, setup_compartment6); + if (params->param5 != kTimeInvalid && getState()->time > kTime2196000) { + if (Entity::timeCheckCar(kTime2254500, params->param5, 5, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6))) + break; + } break; case kActionDefault: @@ -385,18 +393,24 @@ IMPLEMENT_FUNCTION(18, Hadija, chapter4Handler) break; case kActionNone: - if (params->param1 != kTimeInvalid) - TIME_CHECK_CAR(kTime1714500, params->param1, 1, setup_compartment6); + if (params->param1 != kTimeInvalid) { + if (Entity::timeCheckCar(kTime1714500, params->param1, 1, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6))) + break; + } label_callback1: - TIME_CHECK_CALLBACK(kTime2367000, params->param2, 2, setup_compartment6to8); + if (Entity::timeCheckCallback(kTime2367000, params->param2, 2, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6to8))) + break; label_callback2: - TIME_CHECK_CALLBACK(kTime2421000, params->param3, 3, setup_compartment8to6); + if (Entity::timeCheckCallback(kTime2421000, params->param3, 3, WRAP_SETUP_FUNCTION(Hadija, setup_compartment8to6))) + break; label_callback3: - if (params->param4 != kTimeInvalid && getState()->time > kTime2425500) - TIME_CHECK_CAR(kTime2484000, params->param4, 4, setup_compartment6); + if (params->param4 != kTimeInvalid && getState()->time > kTime2425500) { + if (Entity::timeCheckCar(kTime2484000, params->param4, 4, WRAP_SETUP_FUNCTION(Hadija, setup_compartment6))) + break; + } break; case kActionCallback: diff --git a/engines/lastexpress/entities/ivo.cpp b/engines/lastexpress/entities/ivo.cpp index cb0fb92b74..c53f4689fb 100644 --- a/engines/lastexpress/entities/ivo.cpp +++ b/engines/lastexpress/entities/ivo.cpp @@ -246,7 +246,7 @@ IMPLEMENT_FUNCTION(14, Ivo, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Ivo, setup_chapter1Handler)); break; case kActionDefault: @@ -371,7 +371,7 @@ IMPLEMENT_FUNCTION(18, Ivo, chapter2) break; case kActionNone: - TIME_CHECK(kTime1777500, params->param1, setup_function19); + Entity::timeCheck(kTime1777500, params->param1, WRAP_SETUP_FUNCTION(Ivo, setup_function19)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp index 08f845f5ba..7860836a26 100644 --- a/engines/lastexpress/entities/kahina.cpp +++ b/engines/lastexpress/entities/kahina.cpp @@ -247,7 +247,7 @@ IMPLEMENT_FUNCTION(10, Kahina, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Kahina, setup_chapter1Handler)); break; case kActionDefault: @@ -280,7 +280,7 @@ IMPLEMENT_FUNCTION(12, Kahina, function12) break; case kActionNone: - TIME_CHECK(kTime1485000, params->param2, setup_function13); + Entity::timeCheck(kTime1485000, params->param2, WRAP_SETUP_FUNCTION(Kahina, setup_function13)); break; case kActionKnock: diff --git a/engines/lastexpress/entities/kronos.cpp b/engines/lastexpress/entities/kronos.cpp index 5dd790ce12..26ce3ca424 100644 --- a/engines/lastexpress/entities/kronos.cpp +++ b/engines/lastexpress/entities/kronos.cpp @@ -126,7 +126,7 @@ IMPLEMENT_FUNCTION(7, Kronos, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Kronos, setup_chapter1Handler)); break; case kActionDefault: @@ -147,7 +147,7 @@ IMPLEMENT_FUNCTION(8, Kronos, chapter1Handler) break; case kActionNone: - TIME_CHECK(kTime1489500, params->param2, setup_function11); + Entity::timeCheck(kTime1489500, params->param2, WRAP_SETUP_FUNCTION(Kronos, setup_function11)); break; case kAction171849314: @@ -189,7 +189,7 @@ IMPLEMENT_FUNCTION(10, Kronos, function10) break; case kActionNone: - TIME_CHECK(kTime1489500, params->param1, setup_function11); + Entity::timeCheck(kTime1489500, params->param1, WRAP_SETUP_FUNCTION(Kronos, setup_function11)); break; case kActionDefault: @@ -405,8 +405,7 @@ IMPLEMENT_FUNCTION(18, Kronos, function18) params->param2 = 1; } - TIME_CHECK(kTime2106000, params->param3, setup_function19) - else { + if (!Entity::timeCheck(kTime2106000, params->param3, WRAP_SETUP_FUNCTION(Kronos, setup_function19))) { if (params->param1 && getEntities()->isInKronosSanctum(kEntityPlayer)) { setCallback(1); setup_savegame(kSavegameTypeEvent, kEventKahinaPunchSuite4); diff --git a/engines/lastexpress/entities/mahmud.cpp b/engines/lastexpress/entities/mahmud.cpp index 1e7df5c870..af86ef8cdd 100644 --- a/engines/lastexpress/entities/mahmud.cpp +++ b/engines/lastexpress/entities/mahmud.cpp @@ -560,7 +560,8 @@ IMPLEMENT_FUNCTION(14, Mahmud, chaptersHandler) if (!params->param2 && getProgress().chapter == kChapter1) { - TIME_CHECK_CALLBACK(kTime1098000, params->param6, 1, setup_function13); + if (Entity::timeCheckCallback(kTime1098000, params->param6, 1, WRAP_SETUP_FUNCTION(Mahmud, setup_function13))) + break; if (!getSoundQueue()->isBuffered("HAR1104") && getState()->time > kTime1167300 && !params->param7) { params->param7 = 1; @@ -733,7 +734,7 @@ IMPLEMENT_FUNCTION(15, Mahmud, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chaptersHandler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Mahmud, setup_chaptersHandler)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/max.cpp b/engines/lastexpress/entities/max.cpp index 5c43346cde..abd2aae9e4 100644 --- a/engines/lastexpress/entities/max.cpp +++ b/engines/lastexpress/entities/max.cpp @@ -324,7 +324,7 @@ IMPLEMENT_FUNCTION(10, Max, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter12_handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Max, setup_chapter12_handler)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp index 9d9225f49b..b6ea86cd0e 100644 --- a/engines/lastexpress/entities/mertens.cpp +++ b/engines/lastexpress/entities/mertens.cpp @@ -2498,7 +2498,7 @@ IMPLEMENT_FUNCTION(34, Mertens, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Mertens, setup_chapter1Handler)); break; case kActionDefault: @@ -3535,16 +3535,18 @@ label_callback_6: TIME_CHECK_CALLBACK_1(kTime1971000, params->param1, 7, setup_function28, "CON3012"); label_callback_7: - TIME_CHECK_CALLBACK(kTime2117700, params->param2, 8, setup_function32); + if (Entity::timeCheckCallback(kTime2117700, params->param2, 8, WRAP_SETUP_FUNCTION(Mertens, setup_function32))) + break; label_callback_8: TIME_CHECK_CALLBACK_1(kTime2124000, params->param3, 9, setup_function28, "CON2010"); label_callback_9: - TIME_CHECK_CALLBACK(kTime2146500, params->param4, 10, setup_function32); + if (Entity::timeCheckCallback(kTime2146500, params->param4, 10, WRAP_SETUP_FUNCTION(Mertens, setup_function32))) + break; label_callback_10: - TIME_CHECK_CALLBACK(kTime2169000, params->param5, 11, setup_function32); + Entity::timeCheckCallback(kTime2169000, params->param5, 11, WRAP_SETUP_FUNCTION(Mertens, setup_function32)); break; case kAction11: @@ -3727,16 +3729,20 @@ label_callback_3: label_callback_4: if (!params->param1) { - TIME_CHECK_CALLBACK(kTime2403000, params->param2, 5, setup_function49); + if (Entity::timeCheckCallback(kTime2403000, params->param2, 5, WRAP_SETUP_FUNCTION(Mertens, setup_function49))) + break; label_callback_5: - TIME_CHECK_CALLBACK(kTime2430000, params->param3, 6, setup_function32); + if (Entity::timeCheckCallback(kTime2430000, params->param3, 6, WRAP_SETUP_FUNCTION(Mertens, setup_function32))) + break; label_callback_6: - TIME_CHECK_CALLBACK(kTime2439000, params->param4, 7, setup_function32); + if (Entity::timeCheckCallback(kTime2439000, params->param4, 7, WRAP_SETUP_FUNCTION(Mertens, setup_function32))) + break; label_callback_7: - TIME_CHECK_CALLBACK(kTime2448000, params->param5, 8, setup_function32); + if (Entity::timeCheckCallback(kTime2448000, params->param5, 8, WRAP_SETUP_FUNCTION(Mertens, setup_function32))) + break; } label_callback_8: diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp index 5c5d481938..519a613497 100644 --- a/engines/lastexpress/entities/milos.cpp +++ b/engines/lastexpress/entities/milos.cpp @@ -362,7 +362,7 @@ IMPLEMENT_FUNCTION(12, Milos, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Milos, setup_chapter1Handler)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/mmeboutarel.cpp b/engines/lastexpress/entities/mmeboutarel.cpp index 888adeb372..950644cb8f 100644 --- a/engines/lastexpress/entities/mmeboutarel.cpp +++ b/engines/lastexpress/entities/mmeboutarel.cpp @@ -244,7 +244,7 @@ IMPLEMENT_FUNCTION(10, MmeBoutarel, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(MmeBoutarel, setup_chapter1Handler)); break; case kActionDefault: @@ -424,7 +424,8 @@ label_callback_1: } } - TIME_CHECK(kTime1094400, params->param8, setup_function14); + if (Entity::timeCheck(kTime1094400, params->param8, WRAP_SETUP_FUNCTION(MmeBoutarel, setup_function14))) + break; if (params->param4) { if (!Entity::updateParameter(CURRENT_PARAM(1, 1), getState()->timeTicks, 75)) @@ -1065,7 +1066,8 @@ IMPLEMENT_FUNCTION(24, MmeBoutarel, function24) break; case kActionNone: - TIME_CHECK(kTime2470500, params->param4, setup_function25); + if (Entity::timeCheck(kTime2470500, params->param4, WRAP_SETUP_FUNCTION(MmeBoutarel, setup_function25))) + break; if (params->param2) { if (!Entity::updateParameter(params->param5, getState()->timeTicks, 75)) diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp index c0c22fa1da..5ad8a1b985 100644 --- a/engines/lastexpress/entities/rebecca.cpp +++ b/engines/lastexpress/entities/rebecca.cpp @@ -655,7 +655,7 @@ IMPLEMENT_FUNCTION(21, Rebecca, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Rebecca, setup_chapter1Handler)); break; case kActionDefault: @@ -848,7 +848,8 @@ IMPLEMENT_FUNCTION(24, Rebecca, function24) if (!params->param1) break; - TIME_CHECK_CALLBACK(kTime1165500, params->param3, 6, setup_function19); + if (Entity::timeCheckCallback(kTime1165500, params->param3, 6, WRAP_SETUP_FUNCTION(Rebecca, setup_function19))) + break; if (params->param4 != kTimeInvalid) { if (getState()->time <= kTime1161000) { @@ -1224,7 +1225,7 @@ IMPLEMENT_FUNCTION(34, Rebecca, function34) params->param2 = (uint)getState()->time; if (params->param2 >= getState()->time) { - TIME_CHECK_CALLBACK(kTime2052000, params->param3, 1, setup_function19); + Entity::timeCheckCallback(kTime2052000, params->param3, 1, WRAP_SETUP_FUNCTION(Rebecca, setup_function19)); break; } } @@ -1234,7 +1235,7 @@ IMPLEMENT_FUNCTION(34, Rebecca, function34) getSavePoints()->push(kEntityRebecca, kEntityServers0, kAction223712416); } - TIME_CHECK_CALLBACK(kTime2052000, params->param3, 1, setup_function19); + Entity::timeCheckCallback(kTime2052000, params->param3, 1, WRAP_SETUP_FUNCTION(Rebecca, setup_function19)); break; case kActionEndSound: @@ -1633,7 +1634,7 @@ label_next: label_callback_2: if (params->param2) - TIME_CHECK_CALLBACK(kTime2443500, params->param5, 3, setup_function19); + Entity::timeCheckCallback(kTime2443500, params->param5, 3, WRAP_SETUP_FUNCTION(Rebecca, setup_function19)); break; case kActionEndSound: diff --git a/engines/lastexpress/entities/salko.cpp b/engines/lastexpress/entities/salko.cpp index b799564b46..e8b4b4247b 100644 --- a/engines/lastexpress/entities/salko.cpp +++ b/engines/lastexpress/entities/salko.cpp @@ -156,7 +156,7 @@ IMPLEMENT_FUNCTION(9, Salko, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Salko, setup_chapter1Handler)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/sophie.cpp b/engines/lastexpress/entities/sophie.cpp index 10c414763c..170090005f 100644 --- a/engines/lastexpress/entities/sophie.cpp +++ b/engines/lastexpress/entities/sophie.cpp @@ -179,7 +179,7 @@ IMPLEMENT_FUNCTION(4, Sophie, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chaptersHandler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Sophie, setup_chaptersHandler)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp index b7c26bdd1c..432def6253 100644 --- a/engines/lastexpress/entities/tatiana.cpp +++ b/engines/lastexpress/entities/tatiana.cpp @@ -341,7 +341,7 @@ IMPLEMENT_FUNCTION(17, Tatiana, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Tatiana, setup_chapter1Handler)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/vassili.cpp b/engines/lastexpress/entities/vassili.cpp index 5344e705f5..4695f8831f 100644 --- a/engines/lastexpress/entities/vassili.cpp +++ b/engines/lastexpress/entities/vassili.cpp @@ -83,7 +83,7 @@ IMPLEMENT_FUNCTION(4, Vassili, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Vassili, setup_chapter1Handler)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp index f459b6f8e7..dfeae21338 100644 --- a/engines/lastexpress/entities/verges.cpp +++ b/engines/lastexpress/entities/verges.cpp @@ -572,7 +572,7 @@ IMPLEMENT_FUNCTION(18, Verges, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Verges, setup_chapter1Handler)); break; case kActionDefault: @@ -910,7 +910,8 @@ label_callback3: TIME_CHECK_CALLBACK_1(kTimeChapter1, params->param7, 4, setup_function9, "TRA1001"); label_callback4: - TIME_CHECK_CALLBACK(kTime1089000, params->param8, 5, setup_function12); + if (Entity::timeCheckCallback(kTime1089000, params->param8, 5, WRAP_SETUP_FUNCTION(Verges, setup_function12))) + break; params->param8 = 1; @@ -1445,7 +1446,8 @@ label_callback_4: TIME_CHECK_CALLBACK_1(kTime1998000, params->param2, 5, setup_function9, "Tra3010a"); label_callback_5: - TIME_CHECK_CALLBACK(kTime2016000, params->param3, 6, setup_function35); + if (Entity::timeCheckCallback(kTime2016000, params->param3, 6, WRAP_SETUP_FUNCTION(Verges, setup_function35))) + break; label_callback_6: TIME_CHECK_CALLBACK_1(kTime2070000, params->param4, 7, setup_function9, "Tra3002"); @@ -1457,7 +1459,7 @@ label_callback_8: TIME_CHECK_CALLBACK_1(kTime2173500, params->param6, 9, setup_function30, "Tra3012"); label_callback_9: - TIME_CHECK_CALLBACK(kTime2218500, params->param7, 10, setup_function32); + Entity::timeCheckCallback(kTime2218500, params->param7, 10, WRAP_SETUP_FUNCTION(Verges, setup_function32)); break; case kActionOpenDoor: diff --git a/engines/lastexpress/entities/vesna.cpp b/engines/lastexpress/entities/vesna.cpp index f54f0f3231..f29bce8b2b 100644 --- a/engines/lastexpress/entities/vesna.cpp +++ b/engines/lastexpress/entities/vesna.cpp @@ -255,7 +255,7 @@ IMPLEMENT_FUNCTION(12, Vesna, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Vesna, setup_chapter1Handler)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/yasmin.cpp b/engines/lastexpress/entities/yasmin.cpp index f2b4d2edd1..acacbb547b 100644 --- a/engines/lastexpress/entities/yasmin.cpp +++ b/engines/lastexpress/entities/yasmin.cpp @@ -184,7 +184,7 @@ IMPLEMENT_FUNCTION(8, Yasmin, chapter1) break; case kActionNone: - TIME_CHECK(kTimeChapter1, params->param1, setup_chapter1Handler); + Entity::timeCheck(kTimeChapter1, params->param1, WRAP_SETUP_FUNCTION(Yasmin, setup_chapter1Handler)); break; case kActionDefault: @@ -202,13 +202,20 @@ IMPLEMENT_FUNCTION(9, Yasmin, chapter1Handler) break; case kActionNone: - TIME_CHECK_CALLBACK(kTime1093500, params->param1, 1, setup_function6); - TIME_CHECK_CALLBACK(kTime1161000, params->param2, 3, setup_function7); + if (Entity::timeCheckCallback(kTime1093500, params->param1, 1, WRAP_SETUP_FUNCTION(Yasmin, setup_function6))) + break; + + if (Entity::timeCheckCallback(kTime1161000, params->param2, 3, WRAP_SETUP_FUNCTION(Yasmin, setup_function7))) + break; + if (Entity::timeCheckPlaySoundUpdatePosition(kTime1162800, params->param3, 4, "Har1102", kPosition_4070)) break; + TIME_CHECK_CALLBACK_1(kTime1165500, params->param4, 5, setup_playSound, "Har1104"); + TIME_CHECK_CALLBACK_1(kTime1174500, params->param5, 6, setup_playSound, "Har1106"); - TIME_CHECK_CALLBACK(kTime1183500, params->param6, 7, setup_function6); + + Entity::timeCheckCallback(kTime1183500, params->param6, 7, WRAP_SETUP_FUNCTION(Yasmin, setup_function6)); break; case kActionCallback: @@ -223,7 +230,8 @@ IMPLEMENT_FUNCTION(9, Yasmin, chapter1Handler) break; case 2: - TIME_CHECK_CALLBACK(kTime1161000, params->param2, 3, setup_function7); + if (Entity::timeCheckCallback(kTime1161000, params->param2, 3, WRAP_SETUP_FUNCTION(Yasmin, setup_function7))) + break; // Fallback to case 3 case 3: @@ -240,7 +248,7 @@ IMPLEMENT_FUNCTION(9, Yasmin, chapter1Handler) // Fallback to case 6 case 6: - TIME_CHECK_CALLBACK(kTime1183500, params->param6, 7, setup_function6); + Entity::timeCheckCallback(kTime1183500, params->param6, 7, WRAP_SETUP_FUNCTION(Yasmin, setup_function6)); break; } break; @@ -281,7 +289,8 @@ IMPLEMENT_FUNCTION(12, Yasmin, chapter2Handler) break; case kActionNone: - TIME_CHECK_CALLBACK(kTime1759500, params->param1, 1, setup_function7); + if (Entity::timeCheckCallback(kTime1759500, params->param1, 1, WRAP_SETUP_FUNCTION(Yasmin, setup_function7))) + break; if (getState()->time > kTime1800000 && !params->param2) { params->param2 = 1; @@ -334,9 +343,13 @@ IMPLEMENT_FUNCTION(14, Yasmin, chapter3Handler) break; case kActionNone: - TIME_CHECK_CALLBACK(kTime2062800, params->param1, 1, setup_function6); - TIME_CHECK_CALLBACK(kTime2106000, params->param2, 2, setup_function7); - TIME_CHECK_CALLBACK(kTime2160000, params->param3, 3, setup_function6); + if (Entity::timeCheckCallback(kTime2062800, params->param1, 1, WRAP_SETUP_FUNCTION(Yasmin, setup_function6))) + break; + + if (Entity::timeCheckCallback(kTime2106000, params->param2, 2, WRAP_SETUP_FUNCTION(Yasmin, setup_function7))) + break; + + Entity::timeCheckCallback(kTime2160000, params->param3, 3, WRAP_SETUP_FUNCTION(Yasmin, setup_function6)); break; case kActionCallback: @@ -345,11 +358,12 @@ IMPLEMENT_FUNCTION(14, Yasmin, chapter3Handler) break; case 1: - TIME_CHECK_CALLBACK(kTime2106000, params->param2, 2, setup_function7); + if (Entity::timeCheckCallback(kTime2106000, params->param2, 2, WRAP_SETUP_FUNCTION(Yasmin, setup_function7))) + break; // Fallback to case 2 case 2: - TIME_CHECK_CALLBACK(kTime2160000, params->param3, 3, setup_function6); + Entity::timeCheckCallback(kTime2160000, params->param3, 3, WRAP_SETUP_FUNCTION(Yasmin, setup_function6)); break; } break; @@ -381,8 +395,10 @@ IMPLEMENT_FUNCTION(16, Yasmin, chapter4Handler) break; case kActionNone: - TIME_CHECK_CALLBACK(kTime2457000, params->param1, 1, setup_function7); - TIME_CHECK_CALLBACK(kTime2479500, params->param2, 3, setup_function6); + if (Entity::timeCheckCallback(kTime2457000, params->param1, 1, WRAP_SETUP_FUNCTION(Yasmin, setup_function7))) + break; + + Entity::timeCheckCallback(kTime2479500, params->param2, 3, WRAP_SETUP_FUNCTION(Yasmin, setup_function6)); break; case kActionCallback: @@ -397,7 +413,7 @@ IMPLEMENT_FUNCTION(16, Yasmin, chapter4Handler) break; case 2: - TIME_CHECK_CALLBACK(kTime2479500, params->param2, 3, setup_function6); + Entity::timeCheckCallback(kTime2479500, params->param2, 3, WRAP_SETUP_FUNCTION(Yasmin, setup_function6)); break; } break; -- cgit v1.2.3 From 552e8d45b265f29d16a02d7a5b01803d1143ef94 Mon Sep 17 00:00:00 2001 From: Julien Date: Mon, 23 Jul 2012 14:31:33 -0400 Subject: LASTEXPRESS: Switch some warnings to debug console output --- engines/lastexpress/data/animation.cpp | 2 +- engines/lastexpress/game/action.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp index 12968520bb..ce42acb8fe 100644 --- a/engines/lastexpress/data/animation.cpp +++ b/engines/lastexpress/data/animation.cpp @@ -248,7 +248,7 @@ void Animation::processChunkAudio(Common::SeekableReadStream *in, const Chunk &c // Read Snd header uint32 header1 = in->readUint32LE(); uint16 header2 = in->readUint16LE(); - warning("Start ADPCM: %d, %d", header1, header2); + debugC(4, kLastExpressDebugSound, "Start ADPCM: %d, %d", header1, header2); size -= 6; } diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp index 0ce75f16a4..1e5bc0ffd7 100644 --- a/engines/lastexpress/game/action.cpp +++ b/engines/lastexpress/game/action.cpp @@ -1739,14 +1739,14 @@ CursorStyle Action::getCursor(const SceneHotspot &hotspot) const { return kCursorBackward; case SceneHotspot::kActionKnockOnDoor: - warning("================================= DOOR %03d =================================", object); + debugC(2, kLastExpressDebugScenes, "================================= DOOR %03d =================================", object); if (object >= kObjectMax) return kCursorNormal; else return (CursorStyle)getObjects()->get(object).cursor; case SceneHotspot::kAction12: - warning("================================= OBJECT %03d =================================", object); + debugC(2, kLastExpressDebugScenes, "================================= OBJECT %03d =================================", object); if (object >= kObjectMax) return kCursorNormal; @@ -1756,7 +1756,7 @@ CursorStyle Action::getCursor(const SceneHotspot &hotspot) const { return kCursorNormal; case SceneHotspot::kActionPickItem: - warning("================================= ITEM %03d =================================", object); + debugC(2, kLastExpressDebugScenes, "================================= ITEM %03d =================================", object); if (object >= kObjectCompartmentA) return kCursorNormal; @@ -1767,7 +1767,7 @@ CursorStyle Action::getCursor(const SceneHotspot &hotspot) const { return kCursorNormal; case SceneHotspot::kActionDropItem: - warning("================================= ITEM %03d =================================", object); + debugC(2, kLastExpressDebugScenes, "================================= ITEM %03d =================================", object); if (object >= kObjectCompartmentA) return kCursorNormal; @@ -1884,7 +1884,7 @@ LABEL_KEY: // Handle compartment action case SceneHotspot::kActionCompartment: case SceneHotspot::kActionExitCompartment: - warning("================================= DOOR %03d =================================", object); + debugC(2, kLastExpressDebugScenes, "================================= DOOR %03d =================================", object); if (object >= kObjectMax) return kCursorNormal; -- cgit v1.2.3 From 7974b62b716343ff979447957b140f8e2b79f03c Mon Sep 17 00:00:00 2001 From: Julien Date: Mon, 23 Jul 2012 16:02:41 -0400 Subject: LASTEXPRESS: Reduce nesting in Entities::processEntity() --- engines/lastexpress/game/entities.cpp | 52 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp index 4cdefcd334..29cc7d889c 100644 --- a/engines/lastexpress/game/entities.cpp +++ b/engines/lastexpress/game/entities.cpp @@ -751,43 +751,41 @@ label_nosequence: if (data->frame->getInfo()->field_30 > (data->field_49B + 1) || (data->direction == kDirectionLeft && data->sequence->count() == 1)) { ++data->field_49B; - } else { - if (data->frame->getInfo()->field_30 > data->field_49B && !data->frame->getInfo()->keepPreviousFrame) { - ++data->field_49B; - } else { - if (data->frame->getInfo()->keepPreviousFrame == 1) - keepPreviousFrame = true; + } else if (data->frame->getInfo()->field_30 <= data->field_49B || data->frame->getInfo()->keepPreviousFrame) { + if (data->frame->getInfo()->keepPreviousFrame == 1) + keepPreviousFrame = true; - // Increment current frame - ++data->currentFrame; + // Increment current frame + ++data->currentFrame; - if (data->currentFrame > (int16)(data->sequence->count() - 1) || (data->field_4A9 && checkSequenceFromPosition(entityIndex))) { - - if (data->direction == kDirectionLeft) { - data->currentFrame = 0; - } else { - keepPreviousFrame = true; - drawNextSequence(entityIndex); + if (data->currentFrame > (int16)(data->sequence->count() - 1) || (data->field_4A9 && checkSequenceFromPosition(entityIndex))) { - if (getFlags()->flag_entities_0 || data->doProcessEntity) - return; + if (data->direction == kDirectionLeft) { + data->currentFrame = 0; + } else { + keepPreviousFrame = true; + drawNextSequence(entityIndex); - if (!data->sequence2) { - updateEntityPosition(entityIndex); - data->doProcessEntity = false; - return; - } + if (getFlags()->flag_entities_0 || data->doProcessEntity) + return; - copySequenceData(entityIndex); + if (!data->sequence2) { + updateEntityPosition(entityIndex); + data->doProcessEntity = false; + return; } + copySequenceData(entityIndex); } - processFrame(entityIndex, keepPreviousFrame, false); - - if (getFlags()->flag_entities_0 || data->doProcessEntity) - return; } + + processFrame(entityIndex, keepPreviousFrame, false); + + if (getFlags()->flag_entities_0 || data->doProcessEntity) + return; + } else { + ++data->field_49B; } incrementDirectionCounter(data); -- cgit v1.2.3 From 7450ae23fb3c7afcaa33a35390e4c2c03238a024 Mon Sep 17 00:00:00 2001 From: Julien Date: Tue, 24 Jul 2012 22:24:59 -0400 Subject: LASTEXPRESS: Move RESET_ENTITY_STATE macro to entity.h --- engines/lastexpress/entities/entity.h | 8 ++++++++ engines/lastexpress/entities/entity_intern.h | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 6e55e21b74..785e355481 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -94,6 +94,14 @@ struct SavePoint; #define ENTITY_PARAM(index, id) \ ((EntityData::EntityParametersIIII*)_data->getParameters(8, index))->param##id +////////////////////////////////////////////////////////////////////////// +// Misc +////////////////////////////////////////////////////////////////////////// +#define RESET_ENTITY_STATE(entity, class, function) \ + getEntities()->resetState(entity); \ + ((class *)getEntities()->get(entity))->function(); + + ////////////////////////////////////////////////////////////////////////// class EntityData : Common::Serializable { diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 1d6c462a88..306dbf8376 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -259,13 +259,6 @@ void class::setup_##name() { \ debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d, %s, %s) - action: %s", params->param1, params->param2, (char *)¶ms->seq1, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); -////////////////////////////////////////////////////////////////////////// -// Misc -////////////////////////////////////////////////////////////////////////// -#define RESET_ENTITY_STATE(entity, class, function) \ - getEntities()->resetState(entity); \ - ((class *)getEntities()->get(entity))->function(); - ////////////////////////////////////////////////////////////////////////// // Time check macros ////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 37770212c0be36de982e16448fb62aa370a70f6a Mon Sep 17 00:00:00 2001 From: Julien Date: Tue, 24 Jul 2012 22:39:52 -0400 Subject: LASTEXPRESS: Remove TIME_CHECK_CALLBACK_2 macro --- engines/lastexpress/entities/chapters.cpp | 72 +++++++++++++++++++++------- engines/lastexpress/entities/chapters.h | 1 + engines/lastexpress/entities/entity_intern.h | 8 ---- engines/lastexpress/entities/rebecca.cpp | 8 +++- 4 files changed, 63 insertions(+), 26 deletions(-) diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp index c5631173b4..ac9387bd78 100644 --- a/engines/lastexpress/entities/chapters.cpp +++ b/engines/lastexpress/entities/chapters.cpp @@ -403,11 +403,18 @@ IMPLEMENT_FUNCTION(8, Chapters, chapter1Handler) label_processStations: // Process stations - TIME_CHECK_CALLBACK_2(kTime1039500, params->param7, 1, setup_savegame, kSavegameTypeTime, kTimeNone); + if (getState()->time > kTime1039500 && !params->param7) { + params->param7 = 1; + setCallback(1); + setup_savegame(kSavegameTypeTime, kTimeNone); + + break; + } label_enter_epernay: // Entering Epernay station - TIME_CHECK_CALLBACK_2(kTimeEnterEpernay, params->param8, 1, setup_enterStation, "Epernay", kCityEpernay); + if (timeCheckEnterStation(kTimeEnterEpernay, params->param8, 1, "Epernay", kCityEpernay)) + break; label_exit_epernay: // Exiting Epernay station @@ -437,7 +444,8 @@ label_enter_chalons: goto label_exit_strasbourg; // Entering Chalons station - TIME_CHECK_CALLBACK_2(kTimeEnterChalons, CURRENT_PARAM(1, 3), 5, setup_enterStation, "Chalons", kCityChalons); + if (timeCheckEnterStation(kTimeEnterChalons, CURRENT_PARAM(1, 3), 5, "Chalons", kCityChalons)) + break; label_exit_chalons: // Exiting Chalons station @@ -445,7 +453,8 @@ label_exit_chalons: label_enter_barleduc: // Entering Bar-Le-Duc station - TIME_CHECK_CALLBACK_2(kTimeCityBarLeDuc, CURRENT_PARAM(1, 5), 7, setup_enterStation, "BarLeDuc", kCityBarleduc); + if (timeCheckEnterStation(kTimeCityBarLeDuc, CURRENT_PARAM(1, 5), 7, "BarLeDuc", kCityBarleduc)) + break; label_exit_barleduc: // Exiting Bar-Le-Duc station @@ -458,7 +467,8 @@ label_enter_nancy: } // Entering Nancy station - TIME_CHECK_CALLBACK_2(kTimeCityNancy, CURRENT_PARAM(1, 8), 9, setup_enterStation, "Nancy", kCityNancy); + if (timeCheckEnterStation(kTimeCityNancy, CURRENT_PARAM(1, 8), 9, "Nancy", kCityNancy)) + break; label_exit_nancy: // Exiting Nancy station @@ -466,7 +476,8 @@ label_exit_nancy: label_enter_luneville: // Entering Luneville station - TIME_CHECK_CALLBACK_2(kTimeCityLuneville, CURRENT_PARAM(2, 2), 11, setup_enterStation, "Luneville", kCityLuneville); + if (timeCheckEnterStation(kTimeCityLuneville, CURRENT_PARAM(2, 2), 11, "Luneville", kCityLuneville)) + break; label_exit_luneville: // Exiting Luneville station @@ -474,7 +485,8 @@ label_exit_luneville: label_enter_avricourt: // Entering Avricourt station - TIME_CHECK_CALLBACK_2(kTimeCityAvricourt, CURRENT_PARAM(2, 4), 13, setup_enterStation, "Avricourt", kCityAvricourt); + if (timeCheckEnterStation(kTimeCityAvricourt, CURRENT_PARAM(2, 4), 13, "Avricourt", kCityAvricourt)) + break; label_exit_avricourt: // Exiting Avricourt station @@ -482,14 +494,21 @@ label_exit_avricourt: label_enter_deutschavricourt: // Entering Deutsch-Avricourt station - TIME_CHECK_CALLBACK_2(kTimeCityDeutschAvricourt, CURRENT_PARAM(2, 6), 15, setup_enterStation, "DeutschA", kCityDeutschAvricourt); + if (timeCheckEnterStation(kTimeCityDeutschAvricourt, CURRENT_PARAM(2, 6), 15, "DeutschA", kCityDeutschAvricourt)) + break; label_exit_deutschavricourt: // Exiting Avricourt station TIME_CHECK_CALLBACK_1(kTimeExitDeutschAvricourt, CURRENT_PARAM(2, 7), 16, setup_exitStation, "DeutschA"); label_enter_strasbourg: - TIME_CHECK_CALLBACK_2(kTimeCityStrasbourg, CURRENT_PARAM(2, 8), 17, setup_savegame, kSavegameTypeTime, kTimeNone); + if (getState()->time > kTimeCityStrasbourg && !CURRENT_PARAM(2, 8)) { + CURRENT_PARAM(2, 8) = 1; + setCallback(17); + setup_savegame(kSavegameTypeTime, kTimeNone); + + break; + } label_exit_strasbourg: // Exiting Strasbourg station @@ -497,7 +516,8 @@ label_exit_strasbourg: label_enter_badenoos: // Entering Baden Oos station - TIME_CHECK_CALLBACK_2(kTimeCityBadenOos, CURRENT_PARAM(3, 2), 20, setup_enterStation, "BadenOos", kCityBadenOos); + if (timeCheckEnterStation(kTimeCityBadenOos, CURRENT_PARAM(3, 2), 20, "BadenOos", kCityBadenOos)) + break; label_exit_badenoos: // Exiting Baden Oos station @@ -922,25 +942,29 @@ IMPLEMENT_FUNCTION(15, Chapters, chapter3Handler) params->param5 = 0; } - TIME_CHECK_CALLBACK_2(kTimeEnterSalzbourg, params->param6, 1, setup_enterStation, "Salzburg", kCitySalzbourg); + if (timeCheckEnterStation(kTimeEnterSalzbourg, params->param6, 1, "Salzburg", kCitySalzbourg)) + break; label_callback_1: TIME_CHECK_CALLBACK_1(kTimeExitSalzbourg, params->param7, 2, setup_exitStation, "Salzburg"); label_callback_2: - TIME_CHECK_CALLBACK_2(kTimeEnterAttnangPuchheim, params->param8, 3, setup_enterStation, "Attnang", kCityAttnangPuchheim); + if (timeCheckEnterStation(kTimeEnterAttnangPuchheim, params->param8, 3, "Attnang", kCityAttnangPuchheim)) + break; label_callback_3: TIME_CHECK_CALLBACK_1(kTimeExitAttnangPuchheim, CURRENT_PARAM(1, 1), 4, setup_exitStation, "Attnang"); label_callback_4: - TIME_CHECK_CALLBACK_2(kTimeEnterWels, CURRENT_PARAM(1, 2), 5, setup_enterStation, "Wels", kCityWels); + if (timeCheckEnterStation(kTimeEnterWels, CURRENT_PARAM(1, 2), 5, "Wels", kCityWels)) + break; label_callback_5: TIME_CHECK_CALLBACK_1(kTimeEnterWels, CURRENT_PARAM(1, 3), 6, setup_exitStation, "Wels"); label_callback_6: - TIME_CHECK_CALLBACK_2(kTimeEnterLinz, CURRENT_PARAM(1, 4), 7, setup_enterStation, "Linz", kCityLinz); + if (timeCheckEnterStation(kTimeEnterLinz, CURRENT_PARAM(1, 4), 7, "Linz", kCityLinz)) + break; label_callback_7: TIME_CHECK_CALLBACK_1(kTimeCityLinz, CURRENT_PARAM(1, 5), 8, setup_exitStation, "Linz"); @@ -951,7 +975,7 @@ label_callback_8: getState()->timeDelta = 5; } - TIME_CHECK_CALLBACK_2(kTimeCityVienna, CURRENT_PARAM(1, 7), 9, setup_enterStation, "Vienna", kCityVienna); + timeCheckEnterStation(kTimeCityVienna, CURRENT_PARAM(1, 7), 9, "Vienna", kCityVienna); break; case kActionEndSound: @@ -1221,7 +1245,8 @@ IMPLEMENT_FUNCTION(19, Chapters, chapter4Handler) params->param7 = 0; } - TIME_CHECK_CALLBACK_2(kTimeEnterPoszony, params->param8, 1, setup_enterStation, "Pozsony", kCityPoszony); + if (timeCheckEnterStation(kTimeEnterPoszony, params->param8, 1, "Pozsony", kCityPoszony)) + break; label_exitPozsony: TIME_CHECK_CALLBACK_1(kTimeExitPoszony, CURRENT_PARAM(1, 1), 2, setup_exitStation, "Pozsony"); @@ -1237,7 +1262,8 @@ label_enterGalanta: if (params->param1) goto label_callback_4; - TIME_CHECK_CALLBACK_2(kTimeEnterGalanta, CURRENT_PARAM(1, 3), 3, setup_enterStation, "Galanta", kCityGalanta); + if (timeCheckEnterStation(kTimeEnterGalanta, CURRENT_PARAM(1, 3), 3, "Galanta", kCityGalanta)) + break; label_exitGalanta: TIME_CHECK_CALLBACK_1(kTimeExitGalanta, CURRENT_PARAM(1, 4), 4, setup_exitStation, "Galanta"); @@ -1817,4 +1843,16 @@ void Chapters::playSteam() { ENTITY_PARAM(0, 2) = 0; } +bool Chapters::timeCheckEnterStation(TimeValue timeValue, uint ¶meter, byte callback, const char *sequence, CityIndex cityIndex) { + if (getState()->time > timeValue && !parameter) { + parameter = 1; + setCallback(callback); + setup_enterStation(sequence, cityIndex); + + return true; + } + + return false; +} + } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/chapters.h b/engines/lastexpress/entities/chapters.h index 62b8af9270..51e6444506 100644 --- a/engines/lastexpress/entities/chapters.h +++ b/engines/lastexpress/entities/chapters.h @@ -154,6 +154,7 @@ public: DECLARE_FUNCTION(chapter5Handler) private: + bool timeCheckEnterStation(TimeValue timeValue, uint ¶meter, byte callback, const char *sequence, CityIndex cityIndex); void enterExitStation(const SavePoint &savepoint, bool isEnteringStation); void enterExitHelper(bool isEnteringStation); void playSteam(); diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 306dbf8376..9818a20d64 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -270,14 +270,6 @@ void class::setup_##name() { \ break; \ } -#define TIME_CHECK_CALLBACK_2(timeValue, parameter, callback, function, param1, param2) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - setCallback(callback); \ - function(param1, param2); \ - break; \ - } - #define TIME_CHECK_CALLBACK_3(timeValue, parameter, callback, function, param1, param2, param3) \ if (getState()->time > timeValue && !parameter) { \ parameter = 1; \ diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp index 5ad8a1b985..0dc201be71 100644 --- a/engines/lastexpress/entities/rebecca.cpp +++ b/engines/lastexpress/entities/rebecca.cpp @@ -774,7 +774,13 @@ IMPLEMENT_FUNCTION(23, Rebecca, function23) break; case kActionNone: - TIME_CHECK_CALLBACK_2(kTime1111500, params->param2, 3, setup_enterExitCompartment, "623De", kObjectCompartmentE); + if (getState()->time > kTime1111500 && !params->param2) { + params->param2 = 1; + setCallback(3); + setup_enterExitCompartment("623De", kObjectCompartmentE); + + break; + } break; case kActionDefault: -- cgit v1.2.3 From b6b98483c5117ee3cee0a52607e5f5f4acb7def7 Mon Sep 17 00:00:00 2001 From: Julien Date: Tue, 24 Jul 2012 22:47:42 -0400 Subject: LASTEXPRESS: Remove TIME_CHECK_CALLBACK_3 macro --- engines/lastexpress/entities/entity_intern.h | 8 -------- engines/lastexpress/entities/francois.cpp | 30 +++++++++++++++++++++++----- engines/lastexpress/entities/francois.h | 3 +++ engines/lastexpress/entities/rebecca.cpp | 7 ++++++- engines/lastexpress/entities/verges.cpp | 7 ++++++- 5 files changed, 40 insertions(+), 15 deletions(-) diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 9818a20d64..f12f34ac74 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -270,14 +270,6 @@ void class::setup_##name() { \ break; \ } -#define TIME_CHECK_CALLBACK_3(timeValue, parameter, callback, function, param1, param2, param3) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - setCallback(callback); \ - function(param1, param2, param3); \ - break; \ - } - } // End of namespace LastExpress #endif // LASTEXPRESS_ENTITY_INTERN_H diff --git a/engines/lastexpress/entities/francois.cpp b/engines/lastexpress/entities/francois.cpp index 89fdcaf668..c39eb1197c 100644 --- a/engines/lastexpress/entities/francois.cpp +++ b/engines/lastexpress/entities/francois.cpp @@ -1007,10 +1007,11 @@ label_callback_5: } label_callback_6: - TIME_CHECK_CALLBACK_3(kTime1782000, params->param6, 7, setup_function14, kObjectCompartmentC, kPosition_6470, "c"); + if (timeCheckCallbackCompartment(kTime1782000, params->param6, 7, kObjectCompartmentC, kPosition_6470, "c")) + break; label_callback_7: - TIME_CHECK_CALLBACK_3(kTime1813500, params->param7, 8, setup_function14, kObjectCompartmentF, kPosition_4070, "f"); + timeCheckCallbackCompartment(kTime1813500, params->param7, 8, kObjectCompartmentF, kPosition_4070, "f"); break; case kActionCallback: @@ -1136,13 +1137,15 @@ label_callback_11: } label_callback_12: - TIME_CHECK_CALLBACK_3(kTime2040300, CURRENT_PARAM(1, 5), 13, setup_function14, kObjectCompartmentE, kPosition_4840, "e"); + if (timeCheckCallbackCompartment(kTime2040300, CURRENT_PARAM(1, 5), 13, kObjectCompartmentE, kPosition_4840, "e")) + break; label_callback_13: - TIME_CHECK_CALLBACK_3(kTime2040300, CURRENT_PARAM(1, 6), 14, setup_function14, kObjectCompartmentF, kPosition_4070, "f"); + if (timeCheckCallbackCompartment(kTime2040300, CURRENT_PARAM(1, 6), 14, kObjectCompartmentF, kPosition_4070, "f")) + break; label_callback_14: - TIME_CHECK_CALLBACK_3(kTime2040300, CURRENT_PARAM(1, 7), 15, setup_function14, kObjectCompartmentB, kPosition_7500, "b"); + timeCheckCallbackCompartment(kTime2040300, CURRENT_PARAM(1, 7), 15, kObjectCompartmentB, kPosition_7500, "b"); } } break; @@ -1298,4 +1301,21 @@ IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// IMPLEMENT_NULL_FUNCTION(31, Francois) + +////////////////////////////////////////////////////////////////////////// +// Helper functions +////////////////////////////////////////////////////////////////////////// +bool Francois::timeCheckCallbackCompartment(TimeValue timeValue, uint ¶meter, byte callback, ObjectIndex compartment, EntityPosition position, const char* sequenceSuffix) { + if (getState()->time > timeValue && !parameter) { + parameter = 1; + setCallback(callback); + setup_function14(compartment, position, sequenceSuffix); + + return true; + } + + return false; +} + + } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/francois.h b/engines/lastexpress/entities/francois.h index 19eca6fb50..09715dba67 100644 --- a/engines/lastexpress/entities/francois.h +++ b/engines/lastexpress/entities/francois.h @@ -160,6 +160,9 @@ public: DECLARE_FUNCTION(function30) DECLARE_NULL_FUNCTION() + +private: + bool timeCheckCallbackCompartment(TimeValue timeValue, uint ¶meter, byte callback, ObjectIndex compartment, EntityPosition position, const char* sequenceSuffix); }; } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp index 0dc201be71..79d13a93f5 100644 --- a/engines/lastexpress/entities/rebecca.cpp +++ b/engines/lastexpress/entities/rebecca.cpp @@ -972,7 +972,12 @@ IMPLEMENT_FUNCTION(26, Rebecca, function26) break; case kActionNone: - TIME_CHECK_CALLBACK_3(kTime1224000, params->param2, 1, setup_updatePosition, "118H", kCarRestaurant, 52); + if (getState()->time > kTime1224000 && !params->param2) { + params->param2 = 1; + setCallback(1); + setup_updatePosition("118H", kCarRestaurant, 52); + break; + } if (params->param1) { if (!Entity::updateParameter(params->param3, getState()->timeTicks, 90)) diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp index dfeae21338..e6526870d7 100644 --- a/engines/lastexpress/entities/verges.cpp +++ b/engines/lastexpress/entities/verges.cpp @@ -1280,7 +1280,12 @@ IMPLEMENT_FUNCTION(32, Verges, function32) break; case kActionNone: - TIME_CHECK_CALLBACK_3(kTime2263500, params->param1, 5, setup_function10, kCarRedSleeping, kPosition_9460, "TRA3006"); + if (getState()->time > kTime2263500 && !params->param1) { + params->param1 = 1; + setCallback(5); + setup_function10(kCarRedSleeping, kPosition_9460, "TRA3006"); + break; + } break; case kActionDefault: -- cgit v1.2.3 From 938961e23737e5ff19aee61e1ec6dd6e19ca0529 Mon Sep 17 00:00:00 2001 From: Julien Date: Wed, 25 Jul 2012 17:55:17 -0400 Subject: LASTEXPRESS: Remove TIME_CHECK_CALLBACK_1 macro --- engines/lastexpress/entities/alouan.cpp | 3 +- engines/lastexpress/entities/august.cpp | 2 +- engines/lastexpress/entities/boutarel.cpp | 12 +++---- engines/lastexpress/entities/chapters.cpp | 54 ++++++++++++++++++++-------- engines/lastexpress/entities/chapters.h | 1 + engines/lastexpress/entities/entity.cpp | 24 +++++++++++++ engines/lastexpress/entities/entity.h | 8 +++++ engines/lastexpress/entities/entity_intern.h | 12 ------- engines/lastexpress/entities/francois.cpp | 29 +++++++++++---- engines/lastexpress/entities/francois.h | 1 + engines/lastexpress/entities/mertens.cpp | 6 ++-- engines/lastexpress/entities/rebecca.cpp | 3 +- engines/lastexpress/entities/verges.cpp | 54 ++++++++++++++++++---------- engines/lastexpress/entities/yasmin.cpp | 12 ++++--- 14 files changed, 155 insertions(+), 66 deletions(-) diff --git a/engines/lastexpress/entities/alouan.cpp b/engines/lastexpress/entities/alouan.cpp index 2f086de46b..e834e1f7cb 100644 --- a/engines/lastexpress/entities/alouan.cpp +++ b/engines/lastexpress/entities/alouan.cpp @@ -292,7 +292,8 @@ label_callback1: } label_callback2: - TIME_CHECK_CALLBACK_1(kTime2052000, params->param3, 3, setup_playSound, "Har1005"); + if (Entity::timeCheckCallback(kTime2052000, params->param3, 3, "Har1005", WRAP_SETUP_FUNCTION_S(Alouan, setup_playSound))) + break; label_callback3: if (Entity::timeCheckCallback(kTime2133000, params->param4, 4, WRAP_SETUP_FUNCTION(Alouan, setup_compartment6to8))) diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp index 0412da69ac..67d810fde2 100644 --- a/engines/lastexpress/entities/august.cpp +++ b/engines/lastexpress/entities/august.cpp @@ -1906,7 +1906,7 @@ IMPLEMENT_FUNCTION(37, August, function37) break; case kActionNone: - TIME_CHECK_CALLBACK_1(kTime1791000, params->param2, 5, setup_function20, true); + Entity::timeCheckCallback(kTime1791000, params->param2, 5, true, WRAP_SETUP_FUNCTION_B(August, setup_function20)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/boutarel.cpp b/engines/lastexpress/entities/boutarel.cpp index 3c13cb121e..219ddf901b 100644 --- a/engines/lastexpress/entities/boutarel.cpp +++ b/engines/lastexpress/entities/boutarel.cpp @@ -653,7 +653,7 @@ IMPLEMENT_FUNCTION(20, Boutarel, function20) } } - TIME_CHECK_CALLBACK_1(kTime1138500, params->param4, 4, setup_function14, false); + Entity::timeCheckCallback(kTime1138500, params->param4, 4, false, WRAP_SETUP_FUNCTION_B(Boutarel, setup_function14)); break; case kActionDefault: @@ -678,7 +678,7 @@ IMPLEMENT_FUNCTION(20, Boutarel, function20) break; case 3: - TIME_CHECK_CALLBACK_1(kTime1138500, params->param4, 4, setup_function14, false); + Entity::timeCheckCallback(kTime1138500, params->param4, 4, false, WRAP_SETUP_FUNCTION_B(Boutarel, setup_function14)); break; case 4: @@ -836,7 +836,7 @@ IMPLEMENT_FUNCTION(24, Boutarel, chapter2Handler) break; case kActionNone: - TIME_CHECK_CALLBACK_1(kTime1759500, params->param2, 1, setup_function14, false); + Entity::timeCheckCallback(kTime1759500, params->param2, 1, false, WRAP_SETUP_FUNCTION_B(Boutarel, setup_function14)); break; case kActionDefault: @@ -961,7 +961,7 @@ IMPLEMENT_FUNCTION(29, Boutarel, function29) } } - TIME_CHECK_CALLBACK_1(kTime2002500, params->param4, 1, setup_function14, true); + Entity::timeCheckCallback(kTime2002500, params->param4, 1, true, WRAP_SETUP_FUNCTION_B(Boutarel, setup_function14)); break; case kActionDefault: @@ -974,7 +974,7 @@ IMPLEMENT_FUNCTION(29, Boutarel, function29) break; case 1: - TIME_CHECK_CALLBACK_1(kTime2002500, params->param4, 1, setup_function14, true); + Entity::timeCheckCallback(kTime2002500, params->param4, 1, true, WRAP_SETUP_FUNCTION_B(Boutarel, setup_function14)); break; case 2: @@ -1065,7 +1065,7 @@ IMPLEMENT_FUNCTION(33, Boutarel, function33) case kActionNone: if (params->param1) - TIME_CHECK_CALLBACK_1(kTime2389500, params->param2, 3, setup_function14, false); + Entity::timeCheckCallback(kTime2389500, params->param2, 3, false, WRAP_SETUP_FUNCTION_B(Boutarel, setup_function14)); break; case kActionDefault: diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp index ac9387bd78..a2f3a3d871 100644 --- a/engines/lastexpress/entities/chapters.cpp +++ b/engines/lastexpress/entities/chapters.cpp @@ -449,7 +449,8 @@ label_enter_chalons: label_exit_chalons: // Exiting Chalons station - TIME_CHECK_CALLBACK_1(kTimeExitChalons, CURRENT_PARAM(1, 4), 6, setup_exitStation, "Chalons"); + if (timeCheckExitStation(kTimeExitChalons, CURRENT_PARAM(1, 4), 6, "Chalons")) + break; label_enter_barleduc: // Entering Bar-Le-Duc station @@ -458,7 +459,8 @@ label_enter_barleduc: label_exit_barleduc: // Exiting Bar-Le-Duc station - TIME_CHECK_CALLBACK_1(kTimeExitBarLeDuc, CURRENT_PARAM(1, 6), 8, setup_exitStation, "BarLeDuc"); + if (timeCheckExitStation(kTimeExitBarLeDuc, CURRENT_PARAM(1, 6), 8, "BarLeDuc")) + break; label_enter_nancy: if (getState()->time > kTime1260000 && !CURRENT_PARAM(1, 7)) { @@ -472,7 +474,8 @@ label_enter_nancy: label_exit_nancy: // Exiting Nancy station - TIME_CHECK_CALLBACK_1(kTimeExitNancy, CURRENT_PARAM(2, 1), 10, setup_exitStation, "Nancy"); + if (timeCheckExitStation(kTimeExitNancy, CURRENT_PARAM(2, 1), 10, "Nancy")) + break; label_enter_luneville: // Entering Luneville station @@ -481,7 +484,8 @@ label_enter_luneville: label_exit_luneville: // Exiting Luneville station - TIME_CHECK_CALLBACK_1(kTimeExitLuneville, CURRENT_PARAM(2, 3), 12, setup_exitStation, "Luneville"); + if (timeCheckExitStation(kTimeExitLuneville, CURRENT_PARAM(2, 3), 12, "Luneville")) + break; label_enter_avricourt: // Entering Avricourt station @@ -490,7 +494,8 @@ label_enter_avricourt: label_exit_avricourt: // Exiting Avricourt station - TIME_CHECK_CALLBACK_1(kTimeExitAvricourt, CURRENT_PARAM(2, 5), 14, setup_exitStation, "Avricourt"); + if (timeCheckExitStation(kTimeExitAvricourt, CURRENT_PARAM(2, 5), 14, "Avricourt")) + break; label_enter_deutschavricourt: // Entering Deutsch-Avricourt station @@ -499,7 +504,8 @@ label_enter_deutschavricourt: label_exit_deutschavricourt: // Exiting Avricourt station - TIME_CHECK_CALLBACK_1(kTimeExitDeutschAvricourt, CURRENT_PARAM(2, 7), 16, setup_exitStation, "DeutschA"); + if (timeCheckExitStation(kTimeExitDeutschAvricourt, CURRENT_PARAM(2, 7), 16, "DeutschA")) + break; label_enter_strasbourg: if (getState()->time > kTimeCityStrasbourg && !CURRENT_PARAM(2, 8)) { @@ -512,7 +518,8 @@ label_enter_strasbourg: label_exit_strasbourg: // Exiting Strasbourg station - TIME_CHECK_CALLBACK_1(kTimeExitStrasbourg, CURRENT_PARAM(3, 1), 19, setup_exitStation, "Strasbou"); + if (timeCheckExitStation(kTimeExitStrasbourg, CURRENT_PARAM(3, 1), 19, "Strasbou")) + break; label_enter_badenoos: // Entering Baden Oos station @@ -521,7 +528,8 @@ label_enter_badenoos: label_exit_badenoos: // Exiting Baden Oos station - TIME_CHECK_CALLBACK_1(kTimeExitBadenOos, CURRENT_PARAM(3, 3), 21, setup_exitStation, "BadenOos"); + if (timeCheckExitStation(kTimeExitBadenOos, CURRENT_PARAM(3, 3), 21, "BadenOos")) + break; label_chapter1_next: if (getState()->time > kTimeChapter1End3 && ! CURRENT_PARAM(3, 4)) { @@ -946,28 +954,32 @@ IMPLEMENT_FUNCTION(15, Chapters, chapter3Handler) break; label_callback_1: - TIME_CHECK_CALLBACK_1(kTimeExitSalzbourg, params->param7, 2, setup_exitStation, "Salzburg"); + if (timeCheckExitStation(kTimeExitSalzbourg, params->param7, 2, "Salzburg")) + break; label_callback_2: if (timeCheckEnterStation(kTimeEnterAttnangPuchheim, params->param8, 3, "Attnang", kCityAttnangPuchheim)) break; label_callback_3: - TIME_CHECK_CALLBACK_1(kTimeExitAttnangPuchheim, CURRENT_PARAM(1, 1), 4, setup_exitStation, "Attnang"); + if (timeCheckExitStation(kTimeExitAttnangPuchheim, CURRENT_PARAM(1, 1), 4, "Attnang")) + break; label_callback_4: if (timeCheckEnterStation(kTimeEnterWels, CURRENT_PARAM(1, 2), 5, "Wels", kCityWels)) break; label_callback_5: - TIME_CHECK_CALLBACK_1(kTimeEnterWels, CURRENT_PARAM(1, 3), 6, setup_exitStation, "Wels"); + if (timeCheckExitStation(kTimeEnterWels, CURRENT_PARAM(1, 3), 6, "Wels")) + break; label_callback_6: if (timeCheckEnterStation(kTimeEnterLinz, CURRENT_PARAM(1, 4), 7, "Linz", kCityLinz)) break; label_callback_7: - TIME_CHECK_CALLBACK_1(kTimeCityLinz, CURRENT_PARAM(1, 5), 8, setup_exitStation, "Linz"); + if (timeCheckExitStation(kTimeCityLinz, CURRENT_PARAM(1, 5), 8, "Linz")) + break; label_callback_8: if (getState()->time > kTime2187000 && !CURRENT_PARAM(1, 6)) { @@ -1249,7 +1261,8 @@ IMPLEMENT_FUNCTION(19, Chapters, chapter4Handler) break; label_exitPozsony: - TIME_CHECK_CALLBACK_1(kTimeExitPoszony, CURRENT_PARAM(1, 1), 2, setup_exitStation, "Pozsony"); + if (timeCheckExitStation(kTimeExitPoszony, CURRENT_PARAM(1, 1), 2, "Pozsony")) + break; label_enterGalanta: if (getObjects()->get(kObjectCompartment1).location2 == kObjectLocation1) { @@ -1266,7 +1279,8 @@ label_enterGalanta: break; label_exitGalanta: - TIME_CHECK_CALLBACK_1(kTimeExitGalanta, CURRENT_PARAM(1, 4), 4, setup_exitStation, "Galanta"); + if (timeCheckExitStation(kTimeExitGalanta, CURRENT_PARAM(1, 4), 4, "Galanta")) + break; label_callback_4: if (getState()->time > kTime2470500 && !CURRENT_PARAM(1, 5)) { @@ -1855,4 +1869,16 @@ bool Chapters::timeCheckEnterStation(TimeValue timeValue, uint ¶meter, byte return false; } +bool Chapters::timeCheckExitStation(TimeValue timeValue, uint ¶meter, byte callback, const char *sequence) { + if (getState()->time > timeValue && !parameter) { + parameter = 1; + setCallback(callback); + setup_exitStation(sequence); + + return true; + } + + return false; +} + } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/chapters.h b/engines/lastexpress/entities/chapters.h index 51e6444506..a9a53523d4 100644 --- a/engines/lastexpress/entities/chapters.h +++ b/engines/lastexpress/entities/chapters.h @@ -155,6 +155,7 @@ public: private: bool timeCheckEnterStation(TimeValue timeValue, uint ¶meter, byte callback, const char *sequence, CityIndex cityIndex); + bool timeCheckExitStation(TimeValue timeValue, uint ¶meter, byte callback, const char *sequence); void enterExitStation(const SavePoint &savepoint, bool isEnteringStation); void enterExitHelper(bool isEnteringStation); void playSteam(); diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 48856a7bc4..9160b6db95 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -660,6 +660,30 @@ bool Entity::timeCheckCallback(TimeValue timeValue, uint ¶meter, byte callba return false; } +bool Entity::timeCheckCallback(TimeValue timeValue, uint ¶meter, byte callback, const char *str, Common::Functor1 *function) { + if (getState()->time > timeValue && !parameter) { + parameter = 1; + setCallback(callback); + (*function)(str); + + return true; + } + + return false; +} + +bool Entity::timeCheckCallback(TimeValue timeValue, uint ¶meter, byte callback, bool check, Common::Functor1 *function) { + if (getState()->time > timeValue && !parameter) { + parameter = 1; + setCallback(callback); + (*function)(check); + + return true; + } + + return false; +} + bool Entity::timeCheckCallbackInventory(TimeValue timeValue, uint ¶meter, byte callback, Common::Functor0 *function) { if (getState()->time > timeValue && !parameter) { parameter = 1; diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 785e355481..3141559081 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -85,6 +85,12 @@ struct SavePoint; #define WRAP_SETUP_FUNCTION(className, method) \ new Common::Functor0Mem(this, &className::method) +#define WRAP_SETUP_FUNCTION_S(className, method) \ + new Common::Functor1Mem(this, &className::method) + +#define WRAP_SETUP_FUNCTION_B(className, method) \ + new Common::Functor1Mem(this, &className::method) + ////////////////////////////////////////////////////////////////////////// // Parameters macros ////////////////////////////////////////////////////////////////////////// @@ -916,6 +922,8 @@ protected: bool timeCheck(TimeValue timeValue, uint ¶meter, Common::Functor0 *function); bool timeCheckCallback(TimeValue timeValue, uint ¶meter, byte callback, Common::Functor0 *function); + bool timeCheckCallback(TimeValue timeValue, uint ¶meter, byte callback, const char *str, Common::Functor1 *function); + bool timeCheckCallback(TimeValue timeValue, uint ¶meter, byte callback, bool check, Common::Functor1 *function); bool timeCheckCallbackInventory(TimeValue timeValue, uint ¶meter, byte callback, Common::Functor0 *function); bool timeCheckCar(TimeValue timeValue, uint ¶meter, byte callback, Common::Functor0 *function); void timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action); diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index f12f34ac74..01e997f52e 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -258,18 +258,6 @@ void class::setup_##name() { \ EXPOSE_PARAMS(EntityData::EntityParametersIISS) \ debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d, %s, %s) - action: %s", params->param1, params->param2, (char *)¶ms->seq1, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); - -////////////////////////////////////////////////////////////////////////// -// Time check macros -////////////////////////////////////////////////////////////////////////// -#define TIME_CHECK_CALLBACK_1(timeValue, parameter, callback, function, param1) \ - if (getState()->time > timeValue && !parameter) { \ - parameter = 1; \ - setCallback(callback); \ - function(param1); \ - break; \ - } - } // End of namespace LastExpress #endif // LASTEXPRESS_ENTITY_INTERN_H diff --git a/engines/lastexpress/entities/francois.cpp b/engines/lastexpress/entities/francois.cpp index c39eb1197c..d2bbc9854c 100644 --- a/engines/lastexpress/entities/francois.cpp +++ b/engines/lastexpress/entities/francois.cpp @@ -866,7 +866,7 @@ IMPLEMENT_FUNCTION(18, Francois, chapter1Handler) break; case kActionNone: - TIME_CHECK_CALLBACK_1(kTimeParisEpernay, params->param1, 1, setup_function11, kTime1093500); + timeCheckCallback(kTimeParisEpernay, params->param1, 1, kTime1093500); break; case kActionCallback: @@ -978,7 +978,8 @@ IMPLEMENT_FUNCTION(23, Francois, function23) } label_callback_1: - TIME_CHECK_CALLBACK_1(kTime1764000, params->param1, 2, setup_playSound, "Fra2011"); + if (Entity::timeCheckCallback(kTime1764000, params->param1, 2, "Fra2011", WRAP_SETUP_FUNCTION_S(Francois, setup_playSound))) + break; label_callback_2: if (Entity::timeCheckCallback(kTime1800000, params->param2, 3, WRAP_SETUP_FUNCTION(Francois, setup_function13))) @@ -986,10 +987,12 @@ label_callback_2: label_callback_3: if (!getInventory()->hasItem(kItemWhistle) && getInventory()->get(kItemWhistle)->location != kObjectLocation3) { - TIME_CHECK_CALLBACK_1(kTime1768500, params->param3, 4, setup_function11, kTime1773000); + if (timeCheckCallback(kTime1768500, params->param3, 4, kTime1773000)) + break; label_callback_4: - TIME_CHECK_CALLBACK_1(kTime1827000, params->param4, 5, setup_function11, kTime1831500); + if (timeCheckCallback(kTime1827000, params->param4, 5, kTime1831500)) + break; } label_callback_5: @@ -1116,10 +1119,12 @@ label_callback_8: label_callback_9: if (!getInventory()->hasItem(kItemWhistle) && getInventory()->get(kItemWhistle)->location != kObjectLocation3) { - TIME_CHECK_CALLBACK_1(kTime2011500, CURRENT_PARAM(1, 2), 10, setup_function11, kTime2016000); + if (timeCheckCallback(kTime2011500, CURRENT_PARAM(1, 2), 10, kTime2016000)) + break; label_callback_10: - TIME_CHECK_CALLBACK_1(kTime2115000, CURRENT_PARAM(1, 3), 11, setup_function11, kTime2119500); + if (timeCheckCallback(kTime2115000, CURRENT_PARAM(1, 3), 11, kTime2119500)) + break; } label_callback_11: @@ -1317,5 +1322,17 @@ bool Francois::timeCheckCallbackCompartment(TimeValue timeValue, uint ¶meter return false; } +bool Francois::timeCheckCallback(TimeValue timeValue, uint ¶meter, byte callback, TimeValue timeValue2) { + if (getState()->time > timeValue && !parameter) { + parameter = 1; + setCallback(callback); + setup_function11(timeValue2); + + return true; + } + + return false; +} + } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/francois.h b/engines/lastexpress/entities/francois.h index 09715dba67..5a4ff4b8b2 100644 --- a/engines/lastexpress/entities/francois.h +++ b/engines/lastexpress/entities/francois.h @@ -163,6 +163,7 @@ public: private: bool timeCheckCallbackCompartment(TimeValue timeValue, uint ¶meter, byte callback, ObjectIndex compartment, EntityPosition position, const char* sequenceSuffix); + bool timeCheckCallback(TimeValue timeValue, uint ¶meter, byte callback, TimeValue timeValue2); }; } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp index b6ea86cd0e..97dd293793 100644 --- a/engines/lastexpress/entities/mertens.cpp +++ b/engines/lastexpress/entities/mertens.cpp @@ -3532,14 +3532,16 @@ label_callback_5: } label_callback_6: - TIME_CHECK_CALLBACK_1(kTime1971000, params->param1, 7, setup_function28, "CON3012"); + if (Entity::timeCheckCallback(kTime1971000, params->param1, 7, "CON3012", WRAP_SETUP_FUNCTION_S(Mertens, setup_function28))) + break; label_callback_7: if (Entity::timeCheckCallback(kTime2117700, params->param2, 8, WRAP_SETUP_FUNCTION(Mertens, setup_function32))) break; label_callback_8: - TIME_CHECK_CALLBACK_1(kTime2124000, params->param3, 9, setup_function28, "CON2010"); + if (Entity::timeCheckCallback(kTime2124000, params->param3, 9, "CON2010", WRAP_SETUP_FUNCTION_S(Mertens, setup_function28))) + break; label_callback_9: if (Entity::timeCheckCallback(kTime2146500, params->param4, 10, WRAP_SETUP_FUNCTION(Mertens, setup_function32))) diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp index 79d13a93f5..5bcb6aef85 100644 --- a/engines/lastexpress/entities/rebecca.cpp +++ b/engines/lastexpress/entities/rebecca.cpp @@ -683,7 +683,8 @@ IMPLEMENT_FUNCTION(22, Rebecca, chapter1Handler) break; case kActionNone: - TIME_CHECK_CALLBACK_1(kTime1084500, params->param3, 1, setup_playSound, "REB1015"); + if (Entity::timeCheckCallback(kTime1084500, params->param3, 1, "REB1015", WRAP_SETUP_FUNCTION_S(Rebecca, setup_playSound))) + break; if (params->param4 == kTimeInvalid) goto label_callback_4; diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp index e6526870d7..867f122d8f 100644 --- a/engines/lastexpress/entities/verges.cpp +++ b/engines/lastexpress/entities/verges.cpp @@ -907,7 +907,8 @@ label_callback3: if (params->param6) goto label_callback12; - TIME_CHECK_CALLBACK_1(kTimeChapter1, params->param7, 4, setup_function9, "TRA1001"); + if (Entity::timeCheckCallback(kTimeChapter1, params->param7, 4, "TRA1001", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback4: if (Entity::timeCheckCallback(kTime1089000, params->param8, 5, WRAP_SETUP_FUNCTION(Verges, setup_function12))) @@ -922,16 +923,20 @@ label_callback4: } label_callback8: - TIME_CHECK_CALLBACK_1(kTime1107000, CURRENT_PARAM(1, 1), 9, setup_function9, "TRA1001A"); + if (Entity::timeCheckCallback(kTime1107000, CURRENT_PARAM(1, 1), 9, "TRA1001A", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback9: - TIME_CHECK_CALLBACK_1(kTime1134000, CURRENT_PARAM(1, 2), 10, setup_function9, "TRA1002"); + if (Entity::timeCheckCallback(kTime1134000, CURRENT_PARAM(1, 2), 10, "TRA1002", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback10: - TIME_CHECK_CALLBACK_1(kTime1165500, CURRENT_PARAM(1, 3), 11, setup_function9, "TRA1003"); + if (Entity::timeCheckCallback(kTime1165500, CURRENT_PARAM(1, 3), 11, "TRA1003", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback11: - TIME_CHECK_CALLBACK_1(kTime1225800, CURRENT_PARAM(1, 4), 12, setup_function9, "TRA1004"); + if (Entity::timeCheckCallback(kTime1225800, CURRENT_PARAM(1, 4), 12, "TRA1004", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback12: if (ENTITY_PARAM(0, 5) && !params->param2) { @@ -1083,7 +1088,8 @@ IMPLEMENT_FUNCTION(28, Verges, chapter2Handler) } label_callback_1: - TIME_CHECK_CALLBACK_1(kTime1818900, params->param1, 2, setup_function9, "Tra2177"); + if (Entity::timeCheckCallback(kTime1818900, params->param1, 2, "Tra2177", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback_2: if (params->param2 == kTimeInvalid || !getState()->time) @@ -1445,23 +1451,28 @@ label_callback_2: } label_callback_3: - TIME_CHECK_CALLBACK_1(kTime1971000, params->param1, 4, setup_function9, "Tra3001"); + if (Entity::timeCheckCallback(kTime1971000, params->param1, 4, "Tra3001", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback_4: - TIME_CHECK_CALLBACK_1(kTime1998000, params->param2, 5, setup_function9, "Tra3010a"); + if (Entity::timeCheckCallback(kTime1998000, params->param2, 5, "Tra3010a", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback_5: if (Entity::timeCheckCallback(kTime2016000, params->param3, 6, WRAP_SETUP_FUNCTION(Verges, setup_function35))) break; label_callback_6: - TIME_CHECK_CALLBACK_1(kTime2070000, params->param4, 7, setup_function9, "Tra3002"); + if (Entity::timeCheckCallback(kTime2070000, params->param4, 7, "Tra3002", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback_7: - TIME_CHECK_CALLBACK_1(kTime2142000, params->param5, 8, setup_function9, "Tra3003"); + if (Entity::timeCheckCallback(kTime2142000, params->param5, 8, "Tra3003", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback_8: - TIME_CHECK_CALLBACK_1(kTime2173500, params->param6, 9, setup_function30, "Tra3012"); + if (Entity::timeCheckCallback(kTime2173500, params->param6, 9, "Tra3012", WRAP_SETUP_FUNCTION_S(Verges, setup_function30))) + break; label_callback_9: Entity::timeCheckCallback(kTime2218500, params->param7, 10, WRAP_SETUP_FUNCTION(Verges, setup_function32)); @@ -1611,27 +1622,32 @@ label_callback_1: } label_callback_2: - TIME_CHECK_CALLBACK_1(kTime2349000, params->param1, 3, setup_function9, "Tra1001"); + if (Entity::timeCheckCallback(kTime2349000, params->param1, 3, "Tra1001", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback_3: - TIME_CHECK_CALLBACK_1(kTime2378700, params->param2, 4, setup_function9, "Tra4001"); + if (Entity::timeCheckCallback(kTime2378700, params->param2, 4, "Tra4001", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback_4: - TIME_CHECK_CALLBACK_1(kTime2403000, params->param3, 5, setup_function9, "Tra1001A"); + if (Entity::timeCheckCallback(kTime2403000, params->param3, 5, "Tra1001A", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback_5: - TIME_CHECK_CALLBACK_1(kTime2414700, params->param4, 6, setup_function9, "Tra4002"); + if (Entity::timeCheckCallback(kTime2414700, params->param4, 6, "Tra4002", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback_6: - TIME_CHECK_CALLBACK_1(kTime2484000, params->param5, 7, setup_function9, "Tra4003"); + if (Entity::timeCheckCallback(kTime2484000, params->param5, 7, "Tra4003", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; label_callback_7: - TIME_CHECK_CALLBACK_1(kTime2511000, params->param6, 8, setup_function9, "Tra4004"); + if (Entity::timeCheckCallback(kTime2511000, params->param6, 8, "Tra4004", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + break; } label_callback_8: - TIME_CHECK_CALLBACK_1(kTime2538000, params->param7, 9, setup_function9, "Tra4005"); - + Entity::timeCheckCallback(kTime2538000, params->param7, 9, "Tra4005", WRAP_SETUP_FUNCTION_S(Verges, setup_function9)); break; case kActionOpenDoor: diff --git a/engines/lastexpress/entities/yasmin.cpp b/engines/lastexpress/entities/yasmin.cpp index acacbb547b..1d280f51e0 100644 --- a/engines/lastexpress/entities/yasmin.cpp +++ b/engines/lastexpress/entities/yasmin.cpp @@ -211,9 +211,11 @@ IMPLEMENT_FUNCTION(9, Yasmin, chapter1Handler) if (Entity::timeCheckPlaySoundUpdatePosition(kTime1162800, params->param3, 4, "Har1102", kPosition_4070)) break; - TIME_CHECK_CALLBACK_1(kTime1165500, params->param4, 5, setup_playSound, "Har1104"); + if (Entity::timeCheckCallback(kTime1165500, params->param4, 5, "Har1104", WRAP_SETUP_FUNCTION_S(Yasmin, setup_playSound))) + break; - TIME_CHECK_CALLBACK_1(kTime1174500, params->param5, 6, setup_playSound, "Har1106"); + if (Entity::timeCheckCallback(kTime1174500, params->param5, 6, "Har1106", WRAP_SETUP_FUNCTION_S(Yasmin, setup_playSound))) + break; Entity::timeCheckCallback(kTime1183500, params->param6, 7, WRAP_SETUP_FUNCTION(Yasmin, setup_function6)); break; @@ -240,11 +242,13 @@ IMPLEMENT_FUNCTION(9, Yasmin, chapter1Handler) // Fallback to case 4 case 4: - TIME_CHECK_CALLBACK_1(kTime1165500, params->param4, 5, setup_playSound, "Har1104"); + if (Entity::timeCheckCallback(kTime1165500, params->param4, 5, "Har1104", WRAP_SETUP_FUNCTION_S(Yasmin, setup_playSound))) + break; // Fallback to case 5 case 5: - TIME_CHECK_CALLBACK_1(kTime1174500, params->param5, 6, setup_playSound, "Har1106"); + if (Entity::timeCheckCallback(kTime1174500, params->param5, 6, "Har1106", WRAP_SETUP_FUNCTION_S(Yasmin, setup_playSound))) + break; // Fallback to case 6 case 6: -- cgit v1.2.3 From 813c2bb96587966cc49d34daef3bb5b5930427f1 Mon Sep 17 00:00:00 2001 From: Julien Date: Wed, 25 Jul 2012 21:34:13 -0400 Subject: LASTEXPRESS: Merge the remaining macros in entity_intern.h into entity.h --- engines/lastexpress/entities/abbot.h | 1 - engines/lastexpress/entities/alexei.h | 1 - engines/lastexpress/entities/alouan.h | 1 - engines/lastexpress/entities/anna.h | 1 - engines/lastexpress/entities/august.h | 1 - engines/lastexpress/entities/boutarel.h | 1 - engines/lastexpress/entities/chapters.h | 1 - engines/lastexpress/entities/cooks.h | 1 - engines/lastexpress/entities/coudert.h | 2 - engines/lastexpress/entities/entity.cpp | 2 - engines/lastexpress/entities/entity.h | 232 +++++++++++++++++++++++++++ engines/lastexpress/entities/entity39.h | 1 - engines/lastexpress/entities/entity_intern.h | 232 --------------------------- engines/lastexpress/entities/francois.h | 1 - engines/lastexpress/entities/gendarmes.h | 1 - engines/lastexpress/entities/hadija.h | 1 - engines/lastexpress/entities/ivo.h | 1 - engines/lastexpress/entities/kahina.h | 1 - engines/lastexpress/entities/kronos.h | 1 - engines/lastexpress/entities/mahmud.h | 1 - engines/lastexpress/entities/max.h | 1 - engines/lastexpress/entities/mertens.h | 1 - engines/lastexpress/entities/milos.h | 1 - engines/lastexpress/entities/mmeboutarel.h | 1 - engines/lastexpress/entities/pascale.h | 1 - engines/lastexpress/entities/rebecca.h | 1 - engines/lastexpress/entities/salko.h | 1 - engines/lastexpress/entities/servers0.h | 1 - engines/lastexpress/entities/servers1.h | 1 - engines/lastexpress/entities/sophie.h | 1 - engines/lastexpress/entities/tables.h | 1 - engines/lastexpress/entities/tatiana.h | 1 - engines/lastexpress/entities/train.h | 1 - engines/lastexpress/entities/vassili.h | 1 - engines/lastexpress/entities/verges.h | 1 - engines/lastexpress/entities/vesna.h | 1 - engines/lastexpress/entities/yasmin.h | 1 - 37 files changed, 232 insertions(+), 269 deletions(-) diff --git a/engines/lastexpress/entities/abbot.h b/engines/lastexpress/entities/abbot.h index 462f5a491e..ce52bb68ce 100644 --- a/engines/lastexpress/entities/abbot.h +++ b/engines/lastexpress/entities/abbot.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_ABBOT_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/alexei.h b/engines/lastexpress/entities/alexei.h index 262826ae42..9792385863 100644 --- a/engines/lastexpress/entities/alexei.h +++ b/engines/lastexpress/entities/alexei.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_ALEXEI_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/alouan.h b/engines/lastexpress/entities/alouan.h index c6a6beddd9..91254a449a 100644 --- a/engines/lastexpress/entities/alouan.h +++ b/engines/lastexpress/entities/alouan.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_ALOUAN_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/anna.h b/engines/lastexpress/entities/anna.h index 72c6db4bd9..205ff9d42c 100644 --- a/engines/lastexpress/entities/anna.h +++ b/engines/lastexpress/entities/anna.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_ANNA_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/august.h b/engines/lastexpress/entities/august.h index 2cbb31b968..606321955b 100644 --- a/engines/lastexpress/entities/august.h +++ b/engines/lastexpress/entities/august.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_AUGUST_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/boutarel.h b/engines/lastexpress/entities/boutarel.h index 5eb264631c..04838f6527 100644 --- a/engines/lastexpress/entities/boutarel.h +++ b/engines/lastexpress/entities/boutarel.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_BOUTAREL_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/chapters.h b/engines/lastexpress/entities/chapters.h index a9a53523d4..ddb3de3bea 100644 --- a/engines/lastexpress/entities/chapters.h +++ b/engines/lastexpress/entities/chapters.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_CHAPTERS_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/cooks.h b/engines/lastexpress/entities/cooks.h index 3ab7d35161..f01d0b2ca0 100644 --- a/engines/lastexpress/entities/cooks.h +++ b/engines/lastexpress/entities/cooks.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_COOKS_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/coudert.h b/engines/lastexpress/entities/coudert.h index 45d13ce9bb..8303c80a32 100644 --- a/engines/lastexpress/entities/coudert.h +++ b/engines/lastexpress/entities/coudert.h @@ -24,8 +24,6 @@ #define LASTEXPRESS_COUDERT_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" - namespace LastExpress { class LastExpressEngine; diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 9160b6db95..a9ceaa16a9 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -22,8 +22,6 @@ #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" - #include "lastexpress/data/sequence.h" #include "lastexpress/game/action.h" diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 3141559081..634e4000b3 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -107,6 +107,238 @@ struct SavePoint; getEntities()->resetState(entity); \ ((class *)getEntities()->get(entity))->function(); +////////////////////////////////////////////////////////////////////////// +// Setup +////////////////////////////////////////////////////////////////////////// + +#define IMPLEMENT_SETUP(class, callback_class, name, index) \ +void class::setup_##name() { \ + BEGIN_SETUP(callback_class, name, index, EntityData::EntityParametersIIII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::setup_" #name "()"); \ + END_SETUP() \ +} + +#define BEGIN_SETUP(class, name, index, type) \ + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); \ + _data->setCurrentCallback(index); \ + _data->resetCurrentParameters(); + +#define END_SETUP() \ + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); + + +////////////////////////////////////////////////////////////////////////// +// Implementation +////////////////////////////////////////////////////////////////////////// + +// Expose parameters and check validity +#define EXPOSE_PARAMS(type) \ + type *params = (type *)_data->getCurrentParameters(); \ + if (!params) \ + error("[EXPOSE_PARAMS] Trying to call an entity function with invalid parameters"); \ + + +// function signature without setup (we keep the index for consistency but never use it) +#define IMPLEMENT_FUNCTION_NOSETUP(index, class, name) \ + void class::name(const SavePoint &savepoint) { \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(index=" #index ")"); + +// simple setup with no parameters +#define IMPLEMENT_FUNCTION(index, class, name) \ + IMPLEMENT_SETUP(class, class, name, index) \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "() - action: %s", ACTION_NAME(savepoint.action)); + +#define IMPLEMENT_FUNCTION_END } + +// nullfunction call +#define IMPLEMENT_NULL_FUNCTION(index, class) \ + IMPLEMENT_SETUP(class, Entity, nullfunction, index) + +// setup with one uint parameter +#define IMPLEMENT_FUNCTION_I(index, class, name, paramType) \ + void class::setup_##name(paramType param1) { \ + BEGIN_SETUP(class, name, index, EntityData::EntityParametersIIII) \ + EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \ + params->param1 = (unsigned int)param1; \ + END_SETUP() \ + } \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d) - action: %s", params->param1, ACTION_NAME(savepoint.action)); + +// setup with two uint parameters +#define IMPLEMENT_FUNCTION_II(index, class, name, paramType1, paramType2) \ + void class::setup_##name(paramType1 param1, paramType2 param2) { \ + BEGIN_SETUP(class, name, index, EntityData::EntityParametersIIII) \ + EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \ + params->param1 = param1; \ + params->param2 = param2; \ + END_SETUP() \ + } \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d) - action: %s", params->param1, params->param2, ACTION_NAME(savepoint.action)); + +// setup with three uint parameters +#define IMPLEMENT_FUNCTION_III(index, class, name, paramType1, paramType2, paramType3) \ + void class::setup_##name(paramType1 param1, paramType2 param2, paramType3 param3) { \ + BEGIN_SETUP(class, name, index, EntityData::EntityParametersIIII) \ + EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \ + params->param1 = param1; \ + params->param2 = param2; \ + params->param3 = param3; \ + END_SETUP() \ + } \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d, %d) - action: %s", params->param1, params->param2, params->param3, ACTION_NAME(savepoint.action)); + +// setup with one char *parameter +#define IMPLEMENT_FUNCTION_S(index, class, name) \ + void class::setup_##name(const char *seq1) { \ + BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \ + EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ + strncpy((char *)¶ms->seq1, seq1, 12); \ + END_SETUP() \ + } \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s) - action: %s", (char *)¶ms->seq1, ACTION_NAME(savepoint.action)); + +// setup with one char *parameter and one uint +#define IMPLEMENT_FUNCTION_SI(index, class, name, paramType2) \ + void class::setup_##name(const char *seq1, paramType2 param4) { \ + BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \ + EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ + strncpy((char *)¶ms->seq1, seq1, 12); \ + params->param4 = param4; \ + END_SETUP() \ + } \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d) - action: %s", (char *)¶ms->seq1, params->param4, ACTION_NAME(savepoint.action)); + +// setup with one char *parameter and two uints +#define IMPLEMENT_FUNCTION_SII(index, class, name, paramType2, paramType3) \ + void class::setup_##name(const char *seq1, paramType2 param4, paramType3 param5) { \ + BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \ + EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ + strncpy((char *)¶ms->seq1, seq1, 12); \ + params->param4 = param4; \ + params->param5 = param5; \ + END_SETUP() \ + } \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d, %d) - action: %s", (char *)¶ms->seq1, params->param4, params->param5, ACTION_NAME(savepoint.action)); + +// setup with one char *parameter and three uints +#define IMPLEMENT_FUNCTION_SIII(index, class, name, paramType2, paramType3, paramType4) \ + void class::setup_##name(const char *seq, paramType2 param4, paramType3 param5, paramType4 param6) { \ + BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIII) \ + EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII*)_data->getCurrentParameters(); \ + strncpy((char *)¶ms->seq, seq, 12); \ + params->param4 = param4; \ + params->param5 = param5; \ + params->param6 = param6; \ + END_SETUP() \ + } \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersSIII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d, %d, %d) - action: %s", (char *)¶ms->seq, params->param4, params->param5, params->param6, ACTION_NAME(savepoint.action)); + +#define IMPLEMENT_FUNCTION_SIIS(index, class, name, paramType2, paramType3) \ + void class::setup_##name(const char *seq1, paramType2 param4, paramType3 param5, const char *seq2) { \ + BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \ + EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ + strncpy((char *)¶ms->seq1, seq1, 12); \ + params->param4 = param4; \ + params->param5 = param5; \ + strncpy((char *)¶ms->seq2, seq2, 12); \ + END_SETUP() \ + } \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d, %d, %s) - action: %s", (char *)¶ms->seq1, params->param4, params->param5, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); + +#define IMPLEMENT_FUNCTION_SS(index, class, name) \ + void class::setup_##name(const char *seq1, const char *seq2) { \ + BEGIN_SETUP(class, name, index, EntityData::EntityParametersSSII) \ + EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); \ + strncpy((char *)¶ms->seq1, seq1, 12); \ + strncpy((char *)¶ms->seq2, seq2, 12); \ + END_SETUP() \ + } \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersSSII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %s) - action: %s", (char *)¶ms->seq1, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); + +#define IMPLEMENT_FUNCTION_SSI(index, class, name, paramType3) \ + void class::setup_##name(const char *seq1, const char *seq2, paramType3 param7) { \ + BEGIN_SETUP(class, name, index, EntityData::EntityParametersSSII) \ + EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); \ + strncpy((char *)¶ms->seq1, seq1, 12); \ + strncpy((char *)¶ms->seq2, seq2, 12); \ + params->param7 = param7; \ + END_SETUP() \ + } \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersSSII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %s, %d) - action: %s", (char *)¶ms->seq1, (char *)¶ms->seq2, params->param7, ACTION_NAME(savepoint.action)); + +#define IMPLEMENT_FUNCTION_IS(index, class, name, paramType) \ + void class::setup_##name(paramType param1, const char *seq) { \ + BEGIN_SETUP(class, name, index, EntityData::EntityParametersISII) \ + EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII*)_data->getCurrentParameters(); \ + params->param1 = (unsigned int)param1; \ + strncpy((char *)¶ms->seq, seq, 12); \ + END_SETUP() \ + } \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersISII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %s) - action: %s", params->param1, (char *)¶ms->seq, ACTION_NAME(savepoint.action)); + +#define IMPLEMENT_FUNCTION_ISS(index, class, name, paramType) \ + void class::setup_##name(paramType param1, const char *seq1, const char *seq2) { \ + BEGIN_SETUP(class, name, index, EntityData::EntityParametersISSI) \ + EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI*)_data->getCurrentParameters(); \ + params->param1 = param1; \ + strncpy((char *)¶ms->seq1, seq1, 12); \ + strncpy((char *)¶ms->seq2, seq2, 12); \ + END_SETUP() \ + } \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersISSI) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %s, %s) - action: %s", params->param1, (char *)¶ms->seq1, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); + +#define IMPLEMENT_FUNCTION_IIS(index, class, name, paramType1, paramType2) \ + void class::setup_##name(paramType1 param1, paramType2 param2, const char *seq) { \ + BEGIN_SETUP(class, name, index, EntityData::EntityParametersIISI) \ + EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI*)_data->getCurrentParameters(); \ + params->param1 = param1; \ + params->param2 = param2; \ + strncpy((char *)¶ms->seq, seq, 12); \ + END_SETUP() \ + } \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersIISI) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d, %s) - action: %s", params->param1, params->param2, (char *)¶ms->seq, ACTION_NAME(savepoint.action)); + +#define IMPLEMENT_FUNCTION_IISS(index, class, name, paramType1, paramType2) \ + void class::setup_##name(paramType1 param1, paramType2 param2, const char *seq1, const char *seq2) { \ + BEGIN_SETUP(class, name, index, EntityData::EntityParametersIISS) \ + EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS*)_data->getCurrentParameters(); \ + params->param1 = param1; \ + params->param2 = param2; \ + strncpy((char *)¶ms->seq1, seq1, 12); \ + strncpy((char *)¶ms->seq2, seq2, 12); \ + END_SETUP() \ + } \ + void class::name(const SavePoint &savepoint) { \ + EXPOSE_PARAMS(EntityData::EntityParametersIISS) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d, %s, %s) - action: %s", params->param1, params->param2, (char *)¶ms->seq1, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); ////////////////////////////////////////////////////////////////////////// diff --git a/engines/lastexpress/entities/entity39.h b/engines/lastexpress/entities/entity39.h index 148bca5c33..54b65408c7 100644 --- a/engines/lastexpress/entities/entity39.h +++ b/engines/lastexpress/entities/entity39.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_ENTITY39_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h index 01e997f52e..fd803676a9 100644 --- a/engines/lastexpress/entities/entity_intern.h +++ b/engines/lastexpress/entities/entity_intern.h @@ -25,238 +25,6 @@ namespace LastExpress { -////////////////////////////////////////////////////////////////////////// -// Setup -////////////////////////////////////////////////////////////////////////// - -#define IMPLEMENT_SETUP(class, callback_class, name, index) \ -void class::setup_##name() { \ - BEGIN_SETUP(callback_class, name, index, EntityData::EntityParametersIIII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::setup_" #name "()"); \ - END_SETUP() \ -} - -#define BEGIN_SETUP(class, name, index, type) \ - _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); \ - _data->setCurrentCallback(index); \ - _data->resetCurrentParameters(); - -#define END_SETUP() \ - _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); - - -////////////////////////////////////////////////////////////////////////// -// Implementation -////////////////////////////////////////////////////////////////////////// - -// Expose parameters and check validity -#define EXPOSE_PARAMS(type) \ - type *params = (type *)_data->getCurrentParameters(); \ - if (!params) \ - error("[EXPOSE_PARAMS] Trying to call an entity function with invalid parameters"); \ - - -// function signature without setup (we keep the index for consistency but never use it) -#define IMPLEMENT_FUNCTION_NOSETUP(index, class, name) \ - void class::name(const SavePoint &savepoint) { \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(index=" #index ")"); - -// simple setup with no parameters -#define IMPLEMENT_FUNCTION(index, class, name) \ - IMPLEMENT_SETUP(class, class, name, index) \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "() - action: %s", ACTION_NAME(savepoint.action)); - -#define IMPLEMENT_FUNCTION_END } - -// nullfunction call -#define IMPLEMENT_NULL_FUNCTION(index, class) \ - IMPLEMENT_SETUP(class, Entity, nullfunction, index) - -// setup with one uint parameter -#define IMPLEMENT_FUNCTION_I(index, class, name, paramType) \ - void class::setup_##name(paramType param1) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersIIII) \ - EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \ - params->param1 = (unsigned int)param1; \ - END_SETUP() \ - } \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d) - action: %s", params->param1, ACTION_NAME(savepoint.action)); - -// setup with two uint parameters -#define IMPLEMENT_FUNCTION_II(index, class, name, paramType1, paramType2) \ - void class::setup_##name(paramType1 param1, paramType2 param2) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersIIII) \ - EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \ - params->param1 = param1; \ - params->param2 = param2; \ - END_SETUP() \ - } \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d) - action: %s", params->param1, params->param2, ACTION_NAME(savepoint.action)); - -// setup with three uint parameters -#define IMPLEMENT_FUNCTION_III(index, class, name, paramType1, paramType2, paramType3) \ - void class::setup_##name(paramType1 param1, paramType2 param2, paramType3 param3) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersIIII) \ - EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \ - params->param1 = param1; \ - params->param2 = param2; \ - params->param3 = param3; \ - END_SETUP() \ - } \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d, %d) - action: %s", params->param1, params->param2, params->param3, ACTION_NAME(savepoint.action)); - -// setup with one char *parameter -#define IMPLEMENT_FUNCTION_S(index, class, name) \ - void class::setup_##name(const char *seq1) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \ - EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - END_SETUP() \ - } \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s) - action: %s", (char *)¶ms->seq1, ACTION_NAME(savepoint.action)); - -// setup with one char *parameter and one uint -#define IMPLEMENT_FUNCTION_SI(index, class, name, paramType2) \ - void class::setup_##name(const char *seq1, paramType2 param4) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \ - EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - params->param4 = param4; \ - END_SETUP() \ - } \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d) - action: %s", (char *)¶ms->seq1, params->param4, ACTION_NAME(savepoint.action)); - -// setup with one char *parameter and two uints -#define IMPLEMENT_FUNCTION_SII(index, class, name, paramType2, paramType3) \ - void class::setup_##name(const char *seq1, paramType2 param4, paramType3 param5) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \ - EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - params->param4 = param4; \ - params->param5 = param5; \ - END_SETUP() \ - } \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d, %d) - action: %s", (char *)¶ms->seq1, params->param4, params->param5, ACTION_NAME(savepoint.action)); - -// setup with one char *parameter and three uints -#define IMPLEMENT_FUNCTION_SIII(index, class, name, paramType2, paramType3, paramType4) \ - void class::setup_##name(const char *seq, paramType2 param4, paramType3 param5, paramType4 param6) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIII) \ - EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII*)_data->getCurrentParameters(); \ - strncpy((char *)¶ms->seq, seq, 12); \ - params->param4 = param4; \ - params->param5 = param5; \ - params->param6 = param6; \ - END_SETUP() \ - } \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersSIII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d, %d, %d) - action: %s", (char *)¶ms->seq, params->param4, params->param5, params->param6, ACTION_NAME(savepoint.action)); - -#define IMPLEMENT_FUNCTION_SIIS(index, class, name, paramType2, paramType3) \ - void class::setup_##name(const char *seq1, paramType2 param4, paramType3 param5, const char *seq2) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \ - EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - params->param4 = param4; \ - params->param5 = param5; \ - strncpy((char *)¶ms->seq2, seq2, 12); \ - END_SETUP() \ - } \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d, %d, %s) - action: %s", (char *)¶ms->seq1, params->param4, params->param5, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); - -#define IMPLEMENT_FUNCTION_SS(index, class, name) \ - void class::setup_##name(const char *seq1, const char *seq2) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersSSII) \ - EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - strncpy((char *)¶ms->seq2, seq2, 12); \ - END_SETUP() \ - } \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersSSII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %s) - action: %s", (char *)¶ms->seq1, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); - -#define IMPLEMENT_FUNCTION_SSI(index, class, name, paramType3) \ - void class::setup_##name(const char *seq1, const char *seq2, paramType3 param7) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersSSII) \ - EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - strncpy((char *)¶ms->seq2, seq2, 12); \ - params->param7 = param7; \ - END_SETUP() \ - } \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersSSII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %s, %d) - action: %s", (char *)¶ms->seq1, (char *)¶ms->seq2, params->param7, ACTION_NAME(savepoint.action)); - -#define IMPLEMENT_FUNCTION_IS(index, class, name, paramType) \ - void class::setup_##name(paramType param1, const char *seq) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersISII) \ - EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII*)_data->getCurrentParameters(); \ - params->param1 = (unsigned int)param1; \ - strncpy((char *)¶ms->seq, seq, 12); \ - END_SETUP() \ - } \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersISII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %s) - action: %s", params->param1, (char *)¶ms->seq, ACTION_NAME(savepoint.action)); - -#define IMPLEMENT_FUNCTION_ISS(index, class, name, paramType) \ - void class::setup_##name(paramType param1, const char *seq1, const char *seq2) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersISSI) \ - EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI*)_data->getCurrentParameters(); \ - params->param1 = param1; \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - strncpy((char *)¶ms->seq2, seq2, 12); \ - END_SETUP() \ - } \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersISSI) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %s, %s) - action: %s", params->param1, (char *)¶ms->seq1, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); - -#define IMPLEMENT_FUNCTION_IIS(index, class, name, paramType1, paramType2) \ - void class::setup_##name(paramType1 param1, paramType2 param2, const char *seq) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersIISI) \ - EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI*)_data->getCurrentParameters(); \ - params->param1 = param1; \ - params->param2 = param2; \ - strncpy((char *)¶ms->seq, seq, 12); \ - END_SETUP() \ - } \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersIISI) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d, %s) - action: %s", params->param1, params->param2, (char *)¶ms->seq, ACTION_NAME(savepoint.action)); - -#define IMPLEMENT_FUNCTION_IISS(index, class, name, paramType1, paramType2) \ - void class::setup_##name(paramType1 param1, paramType2 param2, const char *seq1, const char *seq2) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersIISS) \ - EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS*)_data->getCurrentParameters(); \ - params->param1 = param1; \ - params->param2 = param2; \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - strncpy((char *)¶ms->seq2, seq2, 12); \ - END_SETUP() \ - } \ - void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersIISS) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d, %s, %s) - action: %s", params->param1, params->param2, (char *)¶ms->seq1, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/francois.h b/engines/lastexpress/entities/francois.h index 5a4ff4b8b2..51270fa4b6 100644 --- a/engines/lastexpress/entities/francois.h +++ b/engines/lastexpress/entities/francois.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_FRANCOIS_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/gendarmes.h b/engines/lastexpress/entities/gendarmes.h index d999cfc1fd..a761643531 100644 --- a/engines/lastexpress/entities/gendarmes.h +++ b/engines/lastexpress/entities/gendarmes.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_GENDARMES_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" #include "lastexpress/sound/sound.h" diff --git a/engines/lastexpress/entities/hadija.h b/engines/lastexpress/entities/hadija.h index d2495955e0..545f21ee03 100644 --- a/engines/lastexpress/entities/hadija.h +++ b/engines/lastexpress/entities/hadija.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_HADIJA_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/ivo.h b/engines/lastexpress/entities/ivo.h index cd5cb7b6be..75814336e0 100644 --- a/engines/lastexpress/entities/ivo.h +++ b/engines/lastexpress/entities/ivo.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_IVO_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/kahina.h b/engines/lastexpress/entities/kahina.h index b25053e339..7479cf76f9 100644 --- a/engines/lastexpress/entities/kahina.h +++ b/engines/lastexpress/entities/kahina.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_KAHINA_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/kronos.h b/engines/lastexpress/entities/kronos.h index 4c61b98620..a7693fcd46 100644 --- a/engines/lastexpress/entities/kronos.h +++ b/engines/lastexpress/entities/kronos.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_KRONOS_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/mahmud.h b/engines/lastexpress/entities/mahmud.h index 5feb95cba5..685100f078 100644 --- a/engines/lastexpress/entities/mahmud.h +++ b/engines/lastexpress/entities/mahmud.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_MAHMUD_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/max.h b/engines/lastexpress/entities/max.h index 17b58475aa..acd8235e89 100644 --- a/engines/lastexpress/entities/max.h +++ b/engines/lastexpress/entities/max.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_MAX_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/mertens.h b/engines/lastexpress/entities/mertens.h index 55c2a76140..4cc58fd4ba 100644 --- a/engines/lastexpress/entities/mertens.h +++ b/engines/lastexpress/entities/mertens.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_MERTENS_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/milos.h b/engines/lastexpress/entities/milos.h index d58d717f8a..e8f95dc5ff 100644 --- a/engines/lastexpress/entities/milos.h +++ b/engines/lastexpress/entities/milos.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_MILOS_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/mmeboutarel.h b/engines/lastexpress/entities/mmeboutarel.h index 772451ba15..0f6e6349fe 100644 --- a/engines/lastexpress/entities/mmeboutarel.h +++ b/engines/lastexpress/entities/mmeboutarel.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_MMEBOUTAREL_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/pascale.h b/engines/lastexpress/entities/pascale.h index 333ebcae3e..eaf0f3ba0c 100644 --- a/engines/lastexpress/entities/pascale.h +++ b/engines/lastexpress/entities/pascale.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_PASCALE_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/rebecca.h b/engines/lastexpress/entities/rebecca.h index e91ee30d4d..885632f884 100644 --- a/engines/lastexpress/entities/rebecca.h +++ b/engines/lastexpress/entities/rebecca.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_REBECCA_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/salko.h b/engines/lastexpress/entities/salko.h index 6308211053..6ca73e39f6 100644 --- a/engines/lastexpress/entities/salko.h +++ b/engines/lastexpress/entities/salko.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_SALKO_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/servers0.h b/engines/lastexpress/entities/servers0.h index 2e9165a410..4c35637d65 100644 --- a/engines/lastexpress/entities/servers0.h +++ b/engines/lastexpress/entities/servers0.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_SERVERS0_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/servers1.h b/engines/lastexpress/entities/servers1.h index 13b30696f0..c8f667ec5c 100644 --- a/engines/lastexpress/entities/servers1.h +++ b/engines/lastexpress/entities/servers1.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_SERVERS1_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/sophie.h b/engines/lastexpress/entities/sophie.h index 47cfa8065c..188788bb9b 100644 --- a/engines/lastexpress/entities/sophie.h +++ b/engines/lastexpress/entities/sophie.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_SOPHIE_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/tables.h b/engines/lastexpress/entities/tables.h index 7fcfc0499e..c213aac978 100644 --- a/engines/lastexpress/entities/tables.h +++ b/engines/lastexpress/entities/tables.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_TABLES_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/tatiana.h b/engines/lastexpress/entities/tatiana.h index c457d49b1e..8ec69db5e9 100644 --- a/engines/lastexpress/entities/tatiana.h +++ b/engines/lastexpress/entities/tatiana.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_TATIANA_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/train.h b/engines/lastexpress/entities/train.h index ea9e1d7a07..4b8bc10c1a 100644 --- a/engines/lastexpress/entities/train.h +++ b/engines/lastexpress/entities/train.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_TRAIN_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/vassili.h b/engines/lastexpress/entities/vassili.h index 843a065174..d006770f7b 100644 --- a/engines/lastexpress/entities/vassili.h +++ b/engines/lastexpress/entities/vassili.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_VASSILI_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/verges.h b/engines/lastexpress/entities/verges.h index 17a3c8ac40..82381043d3 100644 --- a/engines/lastexpress/entities/verges.h +++ b/engines/lastexpress/entities/verges.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_VERGES_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/vesna.h b/engines/lastexpress/entities/vesna.h index a09664096d..025d45882e 100644 --- a/engines/lastexpress/entities/vesna.h +++ b/engines/lastexpress/entities/vesna.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_VESNA_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/yasmin.h b/engines/lastexpress/entities/yasmin.h index e943a8b158..b1413f5c2f 100644 --- a/engines/lastexpress/entities/yasmin.h +++ b/engines/lastexpress/entities/yasmin.h @@ -24,7 +24,6 @@ #define LASTEXPRESS_YASMIN_H #include "lastexpress/entities/entity.h" -#include "lastexpress/entities/entity_intern.h" namespace LastExpress { -- cgit v1.2.3 From 2d6f7992351c9737f71964ad64c307fa6d1543cf Mon Sep 17 00:00:00 2001 From: Julien Date: Wed, 25 Jul 2012 21:55:18 -0400 Subject: LASTEXPRESS: Cleanup unused arguments from BEGIN_SETUP macro --- engines/lastexpress/entities/entity.h | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 634e4000b3..6a32fb6de0 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -111,14 +111,14 @@ struct SavePoint; // Setup ////////////////////////////////////////////////////////////////////////// -#define IMPLEMENT_SETUP(class, callback_class, name, index) \ +#define IMPLEMENT_SETUP(class, name, index) \ void class::setup_##name() { \ - BEGIN_SETUP(callback_class, name, index, EntityData::EntityParametersIIII) \ + BEGIN_SETUP(index, EntityData::EntityParametersIIII) \ debugC(6, kLastExpressDebugLogic, "Entity: " #class "::setup_" #name "()"); \ END_SETUP() \ } -#define BEGIN_SETUP(class, name, index, type) \ +#define BEGIN_SETUP(index, type) \ _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); \ _data->setCurrentCallback(index); \ _data->resetCurrentParameters(); @@ -145,7 +145,7 @@ void class::setup_##name() { \ // simple setup with no parameters #define IMPLEMENT_FUNCTION(index, class, name) \ - IMPLEMENT_SETUP(class, class, name, index) \ + IMPLEMENT_SETUP(class, name, index) \ void class::name(const SavePoint &savepoint) { \ EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "() - action: %s", ACTION_NAME(savepoint.action)); @@ -154,12 +154,12 @@ void class::setup_##name() { \ // nullfunction call #define IMPLEMENT_NULL_FUNCTION(index, class) \ - IMPLEMENT_SETUP(class, Entity, nullfunction, index) + IMPLEMENT_SETUP(class, nullfunction, index) // setup with one uint parameter #define IMPLEMENT_FUNCTION_I(index, class, name, paramType) \ void class::setup_##name(paramType param1) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersIIII) \ + BEGIN_SETUP(index, EntityData::EntityParametersIIII) \ EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \ params->param1 = (unsigned int)param1; \ END_SETUP() \ @@ -171,7 +171,7 @@ void class::setup_##name() { \ // setup with two uint parameters #define IMPLEMENT_FUNCTION_II(index, class, name, paramType1, paramType2) \ void class::setup_##name(paramType1 param1, paramType2 param2) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersIIII) \ + BEGIN_SETUP(index, EntityData::EntityParametersIIII) \ EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \ params->param1 = param1; \ params->param2 = param2; \ @@ -184,7 +184,7 @@ void class::setup_##name() { \ // setup with three uint parameters #define IMPLEMENT_FUNCTION_III(index, class, name, paramType1, paramType2, paramType3) \ void class::setup_##name(paramType1 param1, paramType2 param2, paramType3 param3) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersIIII) \ + BEGIN_SETUP(index, EntityData::EntityParametersIIII) \ EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \ params->param1 = param1; \ params->param2 = param2; \ @@ -198,7 +198,7 @@ void class::setup_##name() { \ // setup with one char *parameter #define IMPLEMENT_FUNCTION_S(index, class, name) \ void class::setup_##name(const char *seq1) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \ + BEGIN_SETUP(index, EntityData::EntityParametersSIIS) \ EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ strncpy((char *)¶ms->seq1, seq1, 12); \ END_SETUP() \ @@ -210,7 +210,7 @@ void class::setup_##name() { \ // setup with one char *parameter and one uint #define IMPLEMENT_FUNCTION_SI(index, class, name, paramType2) \ void class::setup_##name(const char *seq1, paramType2 param4) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \ + BEGIN_SETUP(index, EntityData::EntityParametersSIIS) \ EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ strncpy((char *)¶ms->seq1, seq1, 12); \ params->param4 = param4; \ @@ -223,7 +223,7 @@ void class::setup_##name() { \ // setup with one char *parameter and two uints #define IMPLEMENT_FUNCTION_SII(index, class, name, paramType2, paramType3) \ void class::setup_##name(const char *seq1, paramType2 param4, paramType3 param5) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \ + BEGIN_SETUP(index, EntityData::EntityParametersSIIS) \ EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ strncpy((char *)¶ms->seq1, seq1, 12); \ params->param4 = param4; \ @@ -237,7 +237,7 @@ void class::setup_##name() { \ // setup with one char *parameter and three uints #define IMPLEMENT_FUNCTION_SIII(index, class, name, paramType2, paramType3, paramType4) \ void class::setup_##name(const char *seq, paramType2 param4, paramType3 param5, paramType4 param6) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIII) \ + BEGIN_SETUP(index, EntityData::EntityParametersSIII) \ EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII*)_data->getCurrentParameters(); \ strncpy((char *)¶ms->seq, seq, 12); \ params->param4 = param4; \ @@ -251,7 +251,7 @@ void class::setup_##name() { \ #define IMPLEMENT_FUNCTION_SIIS(index, class, name, paramType2, paramType3) \ void class::setup_##name(const char *seq1, paramType2 param4, paramType3 param5, const char *seq2) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersSIIS) \ + BEGIN_SETUP(index, EntityData::EntityParametersSIIS) \ EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ strncpy((char *)¶ms->seq1, seq1, 12); \ params->param4 = param4; \ @@ -265,7 +265,7 @@ void class::setup_##name() { \ #define IMPLEMENT_FUNCTION_SS(index, class, name) \ void class::setup_##name(const char *seq1, const char *seq2) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersSSII) \ + BEGIN_SETUP(index, EntityData::EntityParametersSSII) \ EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); \ strncpy((char *)¶ms->seq1, seq1, 12); \ strncpy((char *)¶ms->seq2, seq2, 12); \ @@ -277,7 +277,7 @@ void class::setup_##name() { \ #define IMPLEMENT_FUNCTION_SSI(index, class, name, paramType3) \ void class::setup_##name(const char *seq1, const char *seq2, paramType3 param7) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersSSII) \ + BEGIN_SETUP(index, EntityData::EntityParametersSSII) \ EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); \ strncpy((char *)¶ms->seq1, seq1, 12); \ strncpy((char *)¶ms->seq2, seq2, 12); \ @@ -290,7 +290,7 @@ void class::setup_##name() { \ #define IMPLEMENT_FUNCTION_IS(index, class, name, paramType) \ void class::setup_##name(paramType param1, const char *seq) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersISII) \ + BEGIN_SETUP(index, EntityData::EntityParametersISII) \ EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII*)_data->getCurrentParameters(); \ params->param1 = (unsigned int)param1; \ strncpy((char *)¶ms->seq, seq, 12); \ @@ -302,7 +302,7 @@ void class::setup_##name() { \ #define IMPLEMENT_FUNCTION_ISS(index, class, name, paramType) \ void class::setup_##name(paramType param1, const char *seq1, const char *seq2) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersISSI) \ + BEGIN_SETUP(index, EntityData::EntityParametersISSI) \ EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI*)_data->getCurrentParameters(); \ params->param1 = param1; \ strncpy((char *)¶ms->seq1, seq1, 12); \ @@ -315,7 +315,7 @@ void class::setup_##name() { \ #define IMPLEMENT_FUNCTION_IIS(index, class, name, paramType1, paramType2) \ void class::setup_##name(paramType1 param1, paramType2 param2, const char *seq) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersIISI) \ + BEGIN_SETUP(index, EntityData::EntityParametersIISI) \ EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI*)_data->getCurrentParameters(); \ params->param1 = param1; \ params->param2 = param2; \ @@ -328,7 +328,7 @@ void class::setup_##name() { \ #define IMPLEMENT_FUNCTION_IISS(index, class, name, paramType1, paramType2) \ void class::setup_##name(paramType1 param1, paramType2 param2, const char *seq1, const char *seq2) { \ - BEGIN_SETUP(class, name, index, EntityData::EntityParametersIISS) \ + BEGIN_SETUP(index, EntityData::EntityParametersIISS) \ EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS*)_data->getCurrentParameters(); \ params->param1 = param1; \ params->param2 = param2; \ -- cgit v1.2.3 From b4b4a7d127194cf29fdfcf5ee7b41b875d26b37e Mon Sep 17 00:00:00 2001 From: Julien Date: Thu, 26 Jul 2012 16:26:35 -0400 Subject: LASTEXPRESS: Replace setup macros by functions --- engines/lastexpress/entities/entity.cpp | 40 ++++ engines/lastexpress/entities/entity.h | 375 +++++++++++++++++++++----------- 2 files changed, 285 insertions(+), 130 deletions(-) diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index a9ceaa16a9..8595978390 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -595,6 +595,46 @@ void Entity::callbackAction() { getSavePoints()->call(_entityIndex, _entityIndex, kActionCallback); } +////////////////////////////////////////////////////////////////////////// +// Setup functions +////////////////////////////////////////////////////////////////////////// +void Entity::setup(const char *name, uint index) { + debugC(6, kLastExpressDebugLogic, "Entity: %s()", name); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + +void Entity::setupS(const char *name, uint index, const char *seq1) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%s)", name, seq1); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); + strncpy((char *)¶ms->seq1, seq1, 12); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + +void Entity::setupSS(const char *name, uint index, const char *seq1, const char *seq2) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %s)", name, seq1, seq2); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); + strncpy((char *)¶ms->seq1, seq1, 12); + strncpy((char *)¶ms->seq2, seq2, 12); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + ////////////////////////////////////////////////////////////////////////// // Helper functions ////////////////////////////////////////////////////////////////////////// diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 6a32fb6de0..18039e9432 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -107,26 +107,6 @@ struct SavePoint; getEntities()->resetState(entity); \ ((class *)getEntities()->get(entity))->function(); -////////////////////////////////////////////////////////////////////////// -// Setup -////////////////////////////////////////////////////////////////////////// - -#define IMPLEMENT_SETUP(class, name, index) \ -void class::setup_##name() { \ - BEGIN_SETUP(index, EntityData::EntityParametersIIII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::setup_" #name "()"); \ - END_SETUP() \ -} - -#define BEGIN_SETUP(index, type) \ - _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); \ - _data->setCurrentCallback(index); \ - _data->resetCurrentParameters(); - -#define END_SETUP() \ - _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); - - ////////////////////////////////////////////////////////////////////////// // Implementation ////////////////////////////////////////////////////////////////////////// @@ -137,7 +117,6 @@ void class::setup_##name() { \ if (!params) \ error("[EXPOSE_PARAMS] Trying to call an entity function with invalid parameters"); \ - // function signature without setup (we keep the index for consistency but never use it) #define IMPLEMENT_FUNCTION_NOSETUP(index, class, name) \ void class::name(const SavePoint &savepoint) { \ @@ -145,7 +124,9 @@ void class::setup_##name() { \ // simple setup with no parameters #define IMPLEMENT_FUNCTION(index, class, name) \ - IMPLEMENT_SETUP(class, name, index) \ + void class::setup_##name() { \ + Entity::setup(#class "::setup_" #name, index); \ + } \ void class::name(const SavePoint &savepoint) { \ EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "() - action: %s", ACTION_NAME(savepoint.action)); @@ -154,191 +135,128 @@ void class::setup_##name() { \ // nullfunction call #define IMPLEMENT_NULL_FUNCTION(index, class) \ - IMPLEMENT_SETUP(class, nullfunction, index) + void class::setup_nullfunction() { \ + Entity::setup(#class "::setup_nullfunction", index); \ + } // setup with one uint parameter #define IMPLEMENT_FUNCTION_I(index, class, name, paramType) \ void class::setup_##name(paramType param1) { \ - BEGIN_SETUP(index, EntityData::EntityParametersIIII) \ - EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \ - params->param1 = (unsigned int)param1; \ - END_SETUP() \ + Entity::setupI(#class "::setup_" #name, index, param1); \ } \ void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d) - action: %s", params->param1, ACTION_NAME(savepoint.action)); + EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d) - action: %s", params->param1, ACTION_NAME(savepoint.action)); // setup with two uint parameters #define IMPLEMENT_FUNCTION_II(index, class, name, paramType1, paramType2) \ void class::setup_##name(paramType1 param1, paramType2 param2) { \ - BEGIN_SETUP(index, EntityData::EntityParametersIIII) \ - EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \ - params->param1 = param1; \ - params->param2 = param2; \ - END_SETUP() \ + Entity::setupII(#class "::setup_" #name, index, param1, param2); \ } \ void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d) - action: %s", params->param1, params->param2, ACTION_NAME(savepoint.action)); + EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d) - action: %s", params->param1, params->param2, ACTION_NAME(savepoint.action)); // setup with three uint parameters #define IMPLEMENT_FUNCTION_III(index, class, name, paramType1, paramType2, paramType3) \ void class::setup_##name(paramType1 param1, paramType2 param2, paramType3 param3) { \ - BEGIN_SETUP(index, EntityData::EntityParametersIIII) \ - EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); \ - params->param1 = param1; \ - params->param2 = param2; \ - params->param3 = param3; \ - END_SETUP() \ + Entity::setupIII(#class "::setup_" #name, index, param1, param2, param3); \ } \ void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d, %d) - action: %s", params->param1, params->param2, params->param3, ACTION_NAME(savepoint.action)); + EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d, %d) - action: %s", params->param1, params->param2, params->param3, ACTION_NAME(savepoint.action)); // setup with one char *parameter #define IMPLEMENT_FUNCTION_S(index, class, name) \ void class::setup_##name(const char *seq1) { \ - BEGIN_SETUP(index, EntityData::EntityParametersSIIS) \ - EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - END_SETUP() \ + Entity::setupS(#class "::setup_" #name, index, seq1); \ } \ void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s) - action: %s", (char *)¶ms->seq1, ACTION_NAME(savepoint.action)); + EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s) - action: %s", (char *)¶ms->seq1, ACTION_NAME(savepoint.action)); // setup with one char *parameter and one uint #define IMPLEMENT_FUNCTION_SI(index, class, name, paramType2) \ void class::setup_##name(const char *seq1, paramType2 param4) { \ - BEGIN_SETUP(index, EntityData::EntityParametersSIIS) \ - EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - params->param4 = param4; \ - END_SETUP() \ + Entity::setupSI(#class "::setup_" #name, index, seq1, param4); \ } \ void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d) - action: %s", (char *)¶ms->seq1, params->param4, ACTION_NAME(savepoint.action)); + EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d) - action: %s", (char *)¶ms->seq1, params->param4, ACTION_NAME(savepoint.action)); // setup with one char *parameter and two uints #define IMPLEMENT_FUNCTION_SII(index, class, name, paramType2, paramType3) \ void class::setup_##name(const char *seq1, paramType2 param4, paramType3 param5) { \ - BEGIN_SETUP(index, EntityData::EntityParametersSIIS) \ - EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - params->param4 = param4; \ - params->param5 = param5; \ - END_SETUP() \ + Entity::setupSII(#class "::setup_" #name, index, seq1, param4, param5); \ } \ void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d, %d) - action: %s", (char *)¶ms->seq1, params->param4, params->param5, ACTION_NAME(savepoint.action)); + EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d, %d) - action: %s", (char *)¶ms->seq1, params->param4, params->param5, ACTION_NAME(savepoint.action)); // setup with one char *parameter and three uints #define IMPLEMENT_FUNCTION_SIII(index, class, name, paramType2, paramType3, paramType4) \ void class::setup_##name(const char *seq, paramType2 param4, paramType3 param5, paramType4 param6) { \ - BEGIN_SETUP(index, EntityData::EntityParametersSIII) \ - EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII*)_data->getCurrentParameters(); \ - strncpy((char *)¶ms->seq, seq, 12); \ - params->param4 = param4; \ - params->param5 = param5; \ - params->param6 = param6; \ - END_SETUP() \ + Entity::setupSIII(#class "::setup_" #name, index, seq, param4, param5, param6); \ } \ void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersSIII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d, %d, %d) - action: %s", (char *)¶ms->seq, params->param4, params->param5, params->param6, ACTION_NAME(savepoint.action)); + EXPOSE_PARAMS(EntityData::EntityParametersSIII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d, %d, %d) - action: %s", (char *)¶ms->seq, params->param4, params->param5, params->param6, ACTION_NAME(savepoint.action)); #define IMPLEMENT_FUNCTION_SIIS(index, class, name, paramType2, paramType3) \ void class::setup_##name(const char *seq1, paramType2 param4, paramType3 param5, const char *seq2) { \ - BEGIN_SETUP(index, EntityData::EntityParametersSIIS) \ - EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - params->param4 = param4; \ - params->param5 = param5; \ - strncpy((char *)¶ms->seq2, seq2, 12); \ - END_SETUP() \ + Entity::setupSIIS(#class "::setup_" #name, index, seq1, param4, param5, seq2); \ } \ void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d, %d, %s) - action: %s", (char *)¶ms->seq1, params->param4, params->param5, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); + EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %d, %d, %s) - action: %s", (char *)¶ms->seq1, params->param4, params->param5, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); #define IMPLEMENT_FUNCTION_SS(index, class, name) \ void class::setup_##name(const char *seq1, const char *seq2) { \ - BEGIN_SETUP(index, EntityData::EntityParametersSSII) \ - EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - strncpy((char *)¶ms->seq2, seq2, 12); \ - END_SETUP() \ + Entity::setupSS(#class "::setup_" #name, index, seq1, seq2); \ } \ void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersSSII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %s) - action: %s", (char *)¶ms->seq1, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); + EXPOSE_PARAMS(EntityData::EntityParametersSSII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %s) - action: %s", (char *)¶ms->seq1, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); #define IMPLEMENT_FUNCTION_SSI(index, class, name, paramType3) \ void class::setup_##name(const char *seq1, const char *seq2, paramType3 param7) { \ - BEGIN_SETUP(index, EntityData::EntityParametersSSII) \ - EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - strncpy((char *)¶ms->seq2, seq2, 12); \ - params->param7 = param7; \ - END_SETUP() \ + Entity::setupSSI(#class "::setup_" #name, index, seq1, seq2, param7); \ } \ void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersSSII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %s, %d) - action: %s", (char *)¶ms->seq1, (char *)¶ms->seq2, params->param7, ACTION_NAME(savepoint.action)); + EXPOSE_PARAMS(EntityData::EntityParametersSSII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%s, %s, %d) - action: %s", (char *)¶ms->seq1, (char *)¶ms->seq2, params->param7, ACTION_NAME(savepoint.action)); #define IMPLEMENT_FUNCTION_IS(index, class, name, paramType) \ void class::setup_##name(paramType param1, const char *seq) { \ - BEGIN_SETUP(index, EntityData::EntityParametersISII) \ - EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII*)_data->getCurrentParameters(); \ - params->param1 = (unsigned int)param1; \ - strncpy((char *)¶ms->seq, seq, 12); \ - END_SETUP() \ + Entity::setupIS(#class "::setup_" #name, index, param1, seq); \ } \ void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersISII) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %s) - action: %s", params->param1, (char *)¶ms->seq, ACTION_NAME(savepoint.action)); + EXPOSE_PARAMS(EntityData::EntityParametersISII) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %s) - action: %s", params->param1, (char *)¶ms->seq, ACTION_NAME(savepoint.action)); #define IMPLEMENT_FUNCTION_ISS(index, class, name, paramType) \ void class::setup_##name(paramType param1, const char *seq1, const char *seq2) { \ - BEGIN_SETUP(index, EntityData::EntityParametersISSI) \ - EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI*)_data->getCurrentParameters(); \ - params->param1 = param1; \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - strncpy((char *)¶ms->seq2, seq2, 12); \ - END_SETUP() \ + Entity::setupISS(#class "::setup_" #name, index, param1, seq1, seq2); \ } \ void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersISSI) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %s, %s) - action: %s", params->param1, (char *)¶ms->seq1, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); + EXPOSE_PARAMS(EntityData::EntityParametersISSI) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %s, %s) - action: %s", params->param1, (char *)¶ms->seq1, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); #define IMPLEMENT_FUNCTION_IIS(index, class, name, paramType1, paramType2) \ void class::setup_##name(paramType1 param1, paramType2 param2, const char *seq) { \ - BEGIN_SETUP(index, EntityData::EntityParametersIISI) \ - EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI*)_data->getCurrentParameters(); \ - params->param1 = param1; \ - params->param2 = param2; \ - strncpy((char *)¶ms->seq, seq, 12); \ - END_SETUP() \ + Entity::setupIIS(#class "::setup_" #name, index, param1, param2, seq); \ } \ void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersIISI) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d, %s) - action: %s", params->param1, params->param2, (char *)¶ms->seq, ACTION_NAME(savepoint.action)); + EXPOSE_PARAMS(EntityData::EntityParametersIISI) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d, %s) - action: %s", params->param1, params->param2, (char *)¶ms->seq, ACTION_NAME(savepoint.action)); #define IMPLEMENT_FUNCTION_IISS(index, class, name, paramType1, paramType2) \ void class::setup_##name(paramType1 param1, paramType2 param2, const char *seq1, const char *seq2) { \ - BEGIN_SETUP(index, EntityData::EntityParametersIISS) \ - EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS*)_data->getCurrentParameters(); \ - params->param1 = param1; \ - params->param2 = param2; \ - strncpy((char *)¶ms->seq1, seq1, 12); \ - strncpy((char *)¶ms->seq2, seq2, 12); \ - END_SETUP() \ + Entity::setupIISS(#class "::setup_" #name, index, param1, param2, seq1, seq2); \ } \ void class::name(const SavePoint &savepoint) { \ - EXPOSE_PARAMS(EntityData::EntityParametersIISS) \ - debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d, %s, %s) - action: %s", params->param1, params->param2, (char *)¶ms->seq1, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); + EXPOSE_PARAMS(EntityData::EntityParametersIISS) \ + debugC(6, kLastExpressDebugLogic, "Entity: " #class "::" #name "(%d, %d, %s, %s) - action: %s", params->param1, params->param2, (char *)¶ms->seq1, (char *)¶ms->seq2, ACTION_NAME(savepoint.action)); ////////////////////////////////////////////////////////////////////////// @@ -1144,6 +1062,203 @@ protected: */ void callbackAction(); + ////////////////////////////////////////////////////////////////////////// + // Setup functions + ////////////////////////////////////////////////////////////////////////// + void setup(const char *name, uint index); + void setupS(const char *name, uint index, const char *seq1); + void setupSS(const char *name, uint index, const char *seq1, const char *seq2); + + template + void setupI(const char *name, uint index, T param1) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%d)", name, param1); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); + params->param1 = (unsigned int)param1; + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); + } + + template + void setupII(const char *name, uint index, T1 param1, T2 param2) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %d)", name, param1, param2); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); + params->param1 = param1; + params->param2 = param2; + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); + } + + template + void setupIII(const char *name, uint index, T1 param1, T2 param2, T3 param3) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %d, %d)", name, param1, param2, param3); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); + params->param1 = param1; + params->param2 = param2; + params->param3 = param3; + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); + } + + template + void setupSI(const char *name, uint index, const char *seq1, T param4) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %d)", name, seq1, param4); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); + strncpy((char *)¶ms->seq1, seq1, 12); + params->param4 = param4; + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); + } + + template + void setupSII(const char *name, uint index, const char *seq1, T1 param4, T2 param5) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %d, %d)", name, seq1, param4, param5); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); + strncpy((char *)¶ms->seq1, seq1, 12); + params->param4 = param4; + params->param5 = param5; + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); + } + + template + void setupSIII(const char *name, uint index, const char *seq, T1 param4, T2 param5, T3 param6) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %d, %d, %d)", name, seq, param4, param5, param6); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII*)_data->getCurrentParameters(); + strncpy((char *)¶ms->seq, seq, 12); + params->param4 = param4; + params->param5 = param5; + params->param6 = param6; + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); + } + + template + void setupSIIS(const char *name, uint index, const char *seq1, T1 param4, T2 param5, const char *seq2) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %d, %d, %s)", name, seq1, param4, param5, seq2); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); + strncpy((char *)¶ms->seq1, seq1, 12); + params->param4 = param4; + params->param5 = param5; + strncpy((char *)¶ms->seq2, seq2, 12); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); + } + + template + void setupSSI(const char *name, uint index, const char *seq1, const char *seq2, T param7) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %s, %d)", name, seq1, seq2, param7); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); + strncpy((char *)¶ms->seq1, seq1, 12); + strncpy((char *)¶ms->seq2, seq2, 12); + params->param7 = param7; + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); + } + + template + void setupIS(const char *name, uint index, T param1, const char *seq) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %s)", name, param1, seq); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII*)_data->getCurrentParameters(); + params->param1 = (unsigned int)param1; + strncpy((char *)¶ms->seq, seq, 12); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); + } + + template + void setupISS(const char *name, uint index, T param1, const char *seq1, const char *seq2) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %s, %s)", name, param1, seq1, seq2); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI*)_data->getCurrentParameters(); + params->param1 = param1; + strncpy((char *)¶ms->seq1, seq1, 12); + strncpy((char *)¶ms->seq2, seq2, 12); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); + } + + template + void setupIIS(const char *name, uint index, T1 param1, T2 param2, const char *seq) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %d, %s)", name, param1, param2, seq); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI*)_data->getCurrentParameters(); + params->param1 = param1; + params->param2 = param2; + strncpy((char *)¶ms->seq, seq, 12); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); + } + + template + void setupIISS(const char *name, uint index, T1 param1, T2 param2, const char *seq1, const char *seq2) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %d, %s, %s)", name, param1, param2, seq1, seq2); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS*)_data->getCurrentParameters(); + params->param1 = param1; + params->param2 = param2; + strncpy((char *)¶ms->seq1, seq1, 12); + strncpy((char *)¶ms->seq2, seq2, 12); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); + } + ////////////////////////////////////////////////////////////////////////// // Helper functions ////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 3d6807b35905a951688508d3b696ee48c1453c4d Mon Sep 17 00:00:00 2001 From: Julien Date: Thu, 26 Jul 2012 17:19:58 -0400 Subject: LASTEXPRESS: Implement Logic::resetState() --- engines/lastexpress/game/logic.cpp | 7 +++++-- engines/lastexpress/game/scenes.cpp | 31 +++++++++++++++++++------------ engines/lastexpress/game/scenes.h | 1 + 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/engines/lastexpress/game/logic.cpp b/engines/lastexpress/game/logic.cpp index 5f220479d1..c8e4c22ec5 100644 --- a/engines/lastexpress/game/logic.cpp +++ b/engines/lastexpress/game/logic.cpp @@ -408,9 +408,12 @@ void Logic::eventTick(const Common::Event &) { * Resets the game state. */ void Logic::resetState() { - getState()->scene = kSceneDefault; + getScenes()->setCoordinates(Common::Rect(80, 0, 559, 479)); - warning("[Logic::resetState] Not implemented! You need to restart the engine until this is implemented."); + SAFE_DELETE(_entities); + SAFE_DELETE(_state); + _entities = new Entities(_engine); + _state = new State(_engine); } /** diff --git a/engines/lastexpress/game/scenes.cpp b/engines/lastexpress/game/scenes.cpp index 254b0fdb58..447e8714b0 100644 --- a/engines/lastexpress/game/scenes.cpp +++ b/engines/lastexpress/game/scenes.cpp @@ -739,24 +739,31 @@ void SceneManager::resetQueue() { _queue.clear(); } -void SceneManager::setCoordinates(SequenceFrame *frame) { +void SceneManager::setCoordinates(Common::Rect rect) { + _flagCoordinates = true; - if (!frame || frame->getInfo()->subType == 3) - return; + if (_coords.right > rect.right) + _coords.right = rect.right; - _flagCoordinates = true; + if (_coords.bottom > rect.bottom) + _coords.bottom = rect.bottom; - if (_coords.right > (int)frame->getInfo()->xPos1) - _coords.right = (int16)frame->getInfo()->xPos1; + if (_coords.left < rect.left) + _coords.left = rect.left; - if (_coords.bottom > (int)frame->getInfo()->yPos1) - _coords.bottom = (int16)frame->getInfo()->yPos1; + if (_coords.top < rect.top) + _coords.top = rect.top; +} + +void SceneManager::setCoordinates(SequenceFrame *frame) { - if (_coords.left < (int)frame->getInfo()->xPos2) - _coords.left = (int16)frame->getInfo()->xPos2; + if (!frame || frame->getInfo()->subType == 3) + return; - if (_coords.top < (int)frame->getInfo()->yPos2) - _coords.top = (int16)frame->getInfo()->yPos2; + setCoordinates(Common::Rect((int16)frame->getInfo()->xPos1, + (int16)frame->getInfo()->yPos1, + (int16)frame->getInfo()->xPos2, + (int16)frame->getInfo()->yPos2)); } void SceneManager::resetCoordinates() { diff --git a/engines/lastexpress/game/scenes.h b/engines/lastexpress/game/scenes.h index 172dde2683..a866c65111 100644 --- a/engines/lastexpress/game/scenes.h +++ b/engines/lastexpress/game/scenes.h @@ -79,6 +79,7 @@ public: void removeAndRedraw(SequenceFrame **frame, bool doRedraw); void resetQueue(); void setCoordinates(SequenceFrame *frame); + void setCoordinates(Common::Rect rect); // Helpers SceneIndex getSceneIndexFromPosition(CarIndex car, Position position, int param3 = -1); -- cgit v1.2.3 From 115a4d36ba673579bd683cac90828f22606f7468 Mon Sep 17 00:00:00 2001 From: Julien Date: Thu, 26 Jul 2012 17:19:58 -0400 Subject: LASTEXPRESS: Move includes to header for setup function templates --- engines/lastexpress/entities/entity.cpp | 5 +---- engines/lastexpress/entities/entity.h | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 8595978390..02822256d0 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -28,12 +28,9 @@ #include "lastexpress/game/entities.h" #include "lastexpress/game/logic.h" #include "lastexpress/game/object.h" -#include "lastexpress/game/scenes.h" -#include "lastexpress/game/state.h" #include "lastexpress/game/savegame.h" #include "lastexpress/game/savepoint.h" - -#include "lastexpress/lastexpress.h" +#include "lastexpress/game/scenes.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 18039e9432..872eae188e 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -26,7 +26,9 @@ #include "lastexpress/shared.h" #include "lastexpress/sound/sound.h" +#include "lastexpress/game/state.h" +#include "lastexpress/lastexpress.h" #include "lastexpress/helpers.h" #include "common/array.h" -- cgit v1.2.3 From 6aeda2638b9bdfbbef3b0fb89c1c776415e13c2c Mon Sep 17 00:00:00 2001 From: Littleboy Date: Fri, 27 Jul 2012 00:54:24 -0400 Subject: LASTEXPRESS: More include re-organization --- engines/lastexpress/debug.cpp | 1 + engines/lastexpress/entities/entity.cpp | 2 -- engines/lastexpress/entities/entity.h | 9 +++++---- engines/lastexpress/fight/fight.cpp | 3 +++ engines/lastexpress/game/inventory.cpp | 3 +++ engines/lastexpress/game/logic.cpp | 1 + engines/lastexpress/game/logic.h | 2 -- engines/lastexpress/game/object.cpp | 1 + engines/lastexpress/game/savegame.cpp | 1 + engines/lastexpress/game/savepoint.cpp | 12 ++++++------ engines/lastexpress/game/savepoint.h | 7 +++---- engines/lastexpress/lastexpress.cpp | 2 ++ engines/lastexpress/menu/menu.cpp | 1 + engines/lastexpress/sound/queue.cpp | 2 ++ 14 files changed, 29 insertions(+), 18 deletions(-) diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp index f64b172f73..13a8a77ca9 100644 --- a/engines/lastexpress/debug.cpp +++ b/engines/lastexpress/debug.cpp @@ -34,6 +34,7 @@ #include "lastexpress/game/action.h" #include "lastexpress/game/beetle.h" +#include "lastexpress/game/entities.h" #include "lastexpress/game/inventory.h" #include "lastexpress/game/logic.h" #include "lastexpress/game/object.h" diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 02822256d0..0842a7a78c 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -26,10 +26,8 @@ #include "lastexpress/game/action.h" #include "lastexpress/game/entities.h" -#include "lastexpress/game/logic.h" #include "lastexpress/game/object.h" #include "lastexpress/game/savegame.h" -#include "lastexpress/game/savepoint.h" #include "lastexpress/game/scenes.h" namespace LastExpress { diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 872eae188e..e890bba0b5 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -25,9 +25,12 @@ #include "lastexpress/shared.h" -#include "lastexpress/sound/sound.h" +#include "lastexpress/game/logic.h" +#include "lastexpress/game/savepoint.h" #include "lastexpress/game/state.h" +#include "lastexpress/sound/sound.h" + #include "lastexpress/lastexpress.h" #include "lastexpress/helpers.h" @@ -864,9 +867,6 @@ private: class Entity : Common::Serializable { public: - - typedef Common::Functor1 Callback; - Entity(LastExpressEngine *engine, EntityIndex index); virtual ~Entity(); @@ -900,6 +900,7 @@ public: protected: LastExpressEngine *_engine; + typedef Common::Functor1 Callback; EntityIndex _entityIndex; EntityData *_data; diff --git a/engines/lastexpress/fight/fight.cpp b/engines/lastexpress/fight/fight.cpp index 22d9da80be..b00c1732e7 100644 --- a/engines/lastexpress/fight/fight.cpp +++ b/engines/lastexpress/fight/fight.cpp @@ -31,6 +31,7 @@ #include "lastexpress/data/cursor.h" #include "lastexpress/data/sequence.h" +#include "lastexpress/game/entities.h" #include "lastexpress/game/inventory.h" #include "lastexpress/game/logic.h" #include "lastexpress/game/object.h" @@ -38,8 +39,10 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" +#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" +#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp index 70536b7a6d..a36553c768 100644 --- a/engines/lastexpress/game/inventory.cpp +++ b/engines/lastexpress/game/inventory.cpp @@ -26,6 +26,7 @@ #include "lastexpress/data/scene.h" #include "lastexpress/data/snd.h" +#include "lastexpress/game/entities.h" #include "lastexpress/game/logic.h" #include "lastexpress/game/scenes.h" #include "lastexpress/game/state.h" @@ -33,8 +34,10 @@ #include "lastexpress/menu/menu.h" #include "lastexpress/sound/queue.h" +#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" +#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/game/logic.cpp b/engines/lastexpress/game/logic.cpp index c8e4c22ec5..795f165766 100644 --- a/engines/lastexpress/game/logic.cpp +++ b/engines/lastexpress/game/logic.cpp @@ -36,6 +36,7 @@ // Game #include "lastexpress/game/action.h" #include "lastexpress/game/beetle.h" +#include "lastexpress/game/entities.h" #include "lastexpress/game/inventory.h" #include "lastexpress/game/object.h" #include "lastexpress/game/savegame.h" diff --git a/engines/lastexpress/game/logic.h b/engines/lastexpress/game/logic.h index 8b7dcef942..84b64a998b 100644 --- a/engines/lastexpress/game/logic.h +++ b/engines/lastexpress/game/logic.h @@ -25,8 +25,6 @@ #include "lastexpress/shared.h" -#include "lastexpress/game/entities.h" - #include "lastexpress/eventhandler.h" #include "common/events.h" diff --git a/engines/lastexpress/game/object.cpp b/engines/lastexpress/game/object.cpp index 91dcfcfb4a..48df91ea6d 100644 --- a/engines/lastexpress/game/object.cpp +++ b/engines/lastexpress/game/object.cpp @@ -22,6 +22,7 @@ #include "lastexpress/game/object.h" +#include "lastexpress/game/entities.h" #include "lastexpress/game/logic.h" #include "lastexpress/game/scenes.h" #include "lastexpress/game/state.h" diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp index 76cfe9525f..4c268d84c6 100644 --- a/engines/lastexpress/game/savegame.cpp +++ b/engines/lastexpress/game/savegame.cpp @@ -22,6 +22,7 @@ #include "lastexpress/game/savegame.h" +#include "lastexpress/game/entities.h" #include "lastexpress/game/inventory.h" #include "lastexpress/game/logic.h" #include "lastexpress/game/object.h" diff --git a/engines/lastexpress/game/savepoint.cpp b/engines/lastexpress/game/savepoint.cpp index 0b5ff42679..557468e222 100644 --- a/engines/lastexpress/game/savepoint.cpp +++ b/engines/lastexpress/game/savepoint.cpp @@ -94,7 +94,7 @@ void SavePoints::process() { if (!updateEntityFromData(savepoint)) { // Call requested callback - Entity::Callback *callback = getCallback(savepoint.entity1); + Callback *callback = getCallback(savepoint.entity1); if (callback && callback->isValid()) { debugC(8, kLastExpressDebugLogic, "Savepoint: entity1=%s, action=%s, entity2=%s", ENTITY_NAME(savepoint.entity1), ACTION_NAME(savepoint.action), ENTITY_NAME(savepoint.entity2)); (*callback)(savepoint); @@ -125,7 +125,7 @@ void SavePoints::addData(EntityIndex entity, ActionIndex action, uint32 param) { ////////////////////////////////////////////////////////////////////////// // Callbacks ////////////////////////////////////////////////////////////////////////// -void SavePoints::setCallback(EntityIndex index, Entity::Callback *callback) { +void SavePoints::setCallback(EntityIndex index, Callback *callback) { if (index >= 40) error("[SavePoints::setCallback] Attempting to use an invalid entity index. Valid values 0-39, was %d", index); @@ -135,7 +135,7 @@ void SavePoints::setCallback(EntityIndex index, Entity::Callback *callback) { _callbacks[index] = callback; } -Entity::Callback *SavePoints::getCallback(EntityIndex index) const { +Callback *SavePoints::getCallback(EntityIndex index) const { if (index >= 40) error("[SavePoints::getCallback] Attempting to use an invalid entity index. Valid values 0-39, was %d", index); @@ -149,7 +149,7 @@ void SavePoints::call(EntityIndex entity2, EntityIndex entity1, ActionIndex acti point.entity2 = entity2; point.param.intValue = param; - Entity::Callback *callback = getCallback(entity1); + Callback *callback = getCallback(entity1); if (callback != NULL && callback->isValid()) { debugC(8, kLastExpressDebugLogic, "Savepoint: entity1=%s, action=%s, entity2=%s, param=%d", ENTITY_NAME(entity1), ACTION_NAME(action), ENTITY_NAME(entity2), param); (*callback)(point); @@ -163,7 +163,7 @@ void SavePoints::call(EntityIndex entity2, EntityIndex entity1, ActionIndex acti point.entity2 = entity2; strcpy((char *)&point.param.charValue, param); - Entity::Callback *callback = getCallback(entity1); + Callback *callback = getCallback(entity1); if (callback != NULL && callback->isValid()) { debugC(8, kLastExpressDebugLogic, "Savepoint: entity1=%s, action=%s, entity2=%s, param=%s", ENTITY_NAME(entity1), ACTION_NAME(action), ENTITY_NAME(entity2), param); (*callback)(point); @@ -180,7 +180,7 @@ void SavePoints::callAndProcess() { bool isRunning = getFlags()->isGameRunning; while (isRunning) { - Entity::Callback *callback = getCallback(index); + Callback *callback = getCallback(index); if (callback != NULL && callback->isValid()) { (*callback)(savepoint); isRunning = getFlags()->isGameRunning; diff --git a/engines/lastexpress/game/savepoint.h b/engines/lastexpress/game/savepoint.h index a3303b4b8a..181676cc1f 100644 --- a/engines/lastexpress/game/savepoint.h +++ b/engines/lastexpress/game/savepoint.h @@ -74,10 +74,9 @@ struct SavePoint { } }; -class SavePoints : Common::Serializable { -private: - typedef Common::Functor1 Callback; +typedef Common::Functor1 Callback; +class SavePoints : Common::Serializable { public: struct SavePointData { @@ -112,7 +111,7 @@ public: void addData(EntityIndex entity, ActionIndex action, uint32 param); // Callbacks - void setCallback(EntityIndex index, Entity::Callback *callback); + void setCallback(EntityIndex index, Callback *callback); Callback *getCallback(EntityIndex entity) const; void call(EntityIndex entity2, EntityIndex entity1, ActionIndex action, uint32 param = 0) const; void call(EntityIndex entity2, EntityIndex entity1, ActionIndex action, const char *param) const; diff --git a/engines/lastexpress/lastexpress.cpp b/engines/lastexpress/lastexpress.cpp index 74d1969e01..01d2634dec 100644 --- a/engines/lastexpress/lastexpress.cpp +++ b/engines/lastexpress/lastexpress.cpp @@ -32,8 +32,10 @@ #include "lastexpress/menu/menu.h" #include "lastexpress/sound/queue.h" +#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" +#include "lastexpress/helpers.h" #include "lastexpress/resource.h" #include "common/config-manager.h" diff --git a/engines/lastexpress/menu/menu.cpp b/engines/lastexpress/menu/menu.cpp index 3254bed130..7095389f74 100644 --- a/engines/lastexpress/menu/menu.cpp +++ b/engines/lastexpress/menu/menu.cpp @@ -30,6 +30,7 @@ #include "lastexpress/fight/fight.h" +#include "lastexpress/game/entities.h" #include "lastexpress/game/inventory.h" #include "lastexpress/game/logic.h" #include "lastexpress/game/savegame.h" diff --git a/engines/lastexpress/sound/queue.cpp b/engines/lastexpress/sound/queue.cpp index 1fbb4138e3..7b3dbcf2d9 100644 --- a/engines/lastexpress/sound/queue.cpp +++ b/engines/lastexpress/sound/queue.cpp @@ -26,7 +26,9 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/entry.h" +#include "lastexpress/sound/sound.h" +#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" namespace LastExpress { -- cgit v1.2.3 From 7423885f699aff327129a73da3d99f2f860e354f Mon Sep 17 00:00:00 2001 From: Littleboy Date: Fri, 27 Jul 2012 01:14:30 -0400 Subject: LASTEXPRESS: Remove entity include in savepoint.h --- engines/lastexpress/game/savepoint.h | 3 +-- engines/lastexpress/sound/entry.cpp | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/lastexpress/game/savepoint.h b/engines/lastexpress/game/savepoint.h index 181676cc1f..005133891a 100644 --- a/engines/lastexpress/game/savepoint.h +++ b/engines/lastexpress/game/savepoint.h @@ -23,9 +23,8 @@ #ifndef LASTEXPRESS_SAVEPOINT_H #define LASTEXPRESS_SAVEPOINT_H -#include "lastexpress/entities/entity.h" - #include "lastexpress/helpers.h" +#include "lastexpress/shared.h" #include "common/array.h" #include "common/list.h" diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp index 3d2b05895f..d689447ff9 100644 --- a/engines/lastexpress/sound/entry.cpp +++ b/engines/lastexpress/sound/entry.cpp @@ -27,6 +27,7 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" +#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" #include "lastexpress/lastexpress.h" -- cgit v1.2.3 From a364ef8f0fca2675f791a29ef231385e29945939 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 27 Jul 2012 11:01:21 -0400 Subject: VIDEO: Remove Track::getStartTime() That should be handled internally instead --- video/video_decoder.cpp | 17 ++++------------- video/video_decoder.h | 6 ------ 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 77eab3a6e1..cea3960fee 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -210,7 +210,7 @@ uint32 AdvancedVideoDecoder::getTime() const { uint32 time = ((const AudioTrack *)*it)->getRunningTime(); if (time != 0) - return time + (*it)->getStartTime().msecs() + _audioStartOffset.msecs(); + return time + _audioStartOffset.msecs(); } } } @@ -364,15 +364,10 @@ Audio::Timestamp AdvancedVideoDecoder::getDuration() const { Audio::Timestamp maxDuration(0, 1000); for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) { - Audio::Timestamp startTime = (*it)->getStartTime(); Audio::Timestamp duration = (*it)->getDuration(); - if (duration.totalNumberOfFrames() != 0) { - // HACK: Timestamp's + operator doesn't do framerate conversion :( - duration = duration + startTime.convertToFramerate(duration.framerate()); - if (duration > maxDuration) - maxDuration = duration; - } + if (duration > maxDuration) + maxDuration = duration; } return maxDuration; @@ -406,11 +401,7 @@ bool AdvancedVideoDecoder::Track::isRewindable() const { } bool AdvancedVideoDecoder::Track::rewind() { - return seek(getStartTime()); -} - -Audio::Timestamp AdvancedVideoDecoder::Track::getStartTime() const { - return Audio::Timestamp(0, 1000); + return seek(Audio::Timestamp(0, 1000)); } Audio::Timestamp AdvancedVideoDecoder::Track::getDuration() const { diff --git a/video/video_decoder.h b/video/video_decoder.h index f0427668a6..18517c9ad2 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -466,12 +466,6 @@ protected: */ bool isPaused() const { return _paused; } - /** - * Get the start time of the track (starting from the beginning of the - * movie). - */ - virtual Audio::Timestamp getStartTime() const; - /** * Get the duration of the track (starting from this track's start time). * -- cgit v1.2.3 From 90b72e31e4a9f2a23d912d31343ba25f27da7b3e Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 27 Jul 2012 11:01:42 -0400 Subject: VIDEO: Cleanup AdvancedVideoDecoder --- video/video_decoder.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index cea3960fee..131c86fdb8 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -111,7 +111,7 @@ AdvancedVideoDecoder::AdvancedVideoDecoder() { } void AdvancedVideoDecoder::close() { - if (_isPlaying) + if (isPlaying()) stop(); for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) @@ -250,7 +250,7 @@ bool AdvancedVideoDecoder::endOfVideo() const { } bool AdvancedVideoDecoder::isRewindable() const { - if (_tracks.empty()) + if (!isVideoLoaded()) return false; for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) @@ -267,7 +267,7 @@ bool AdvancedVideoDecoder::rewind() { _needsRewind = false; // Stop all tracks so they can be rewound - if (_isPlaying) + if (isPlaying()) stopAllTracks(); for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) @@ -275,7 +275,7 @@ bool AdvancedVideoDecoder::rewind() { return false; // Now that we've rewound, start all tracks again - if (_isPlaying) + if (isPlaying()) startAllTracks(); _audioStartOffset = 0; @@ -285,7 +285,7 @@ bool AdvancedVideoDecoder::rewind() { } bool AdvancedVideoDecoder::isSeekable() const { - if (_tracks.empty()) + if (!isVideoLoaded()) return false; for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) @@ -302,7 +302,7 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) { _needsRewind = false; // Stop all tracks so they can be seeked - if (_isPlaying) + if (isPlaying()) stopAllTracks(); for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) @@ -310,7 +310,7 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) { return false; // Now that we've seeked, start all tracks again - if (_isPlaying) + if (isPlaying()) startAllTracks(); _audioStartOffset = time; @@ -321,7 +321,7 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) { } void AdvancedVideoDecoder::start() { - if (_isPlaying || !isVideoLoaded()) + if (isPlaying() || !isVideoLoaded()) return; _isPlaying = true; @@ -336,7 +336,7 @@ void AdvancedVideoDecoder::start() { } void AdvancedVideoDecoder::stop() { - if (!_isPlaying) + if (!isPlaying()) return; _isPlaying = false; -- cgit v1.2.3 From 21d3fa71aff686f5b64361ae3410268fc0ab5968 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 27 Jul 2012 11:14:46 -0400 Subject: VIDEO: Add functions for getting TrackList iterators internally --- video/video_decoder.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/video/video_decoder.h b/video/video_decoder.h index 18517c9ad2..eff5a7c396 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -753,9 +753,24 @@ protected: */ const VideoTrack *findNextVideoTrack() const; + /** + * Typedef helpers for accessing tracks + */ + typedef Common::Array TrackList; + typedef TrackList::iterator TrackListIterator; + + /** + * Get the begin iterator of the tracks + */ + TrackListIterator getTrackListBegin() { return _tracks.begin(); } + + /** + * Get the end iterator of the tracks + */ + TrackListIterator getTrackListEnd() { return _tracks.end(); } + private: // Tracks owned by this AdvancedVideoDecoder - typedef Common::Array TrackList; TrackList _tracks; // Current playback status -- cgit v1.2.3 From 991710d0a158bfce4e54bd240482a4e3044271d3 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 27 Jul 2012 11:32:51 -0400 Subject: VIDEO: Adapt QuickTimeDecoder to the AdvancedVideoDecoder API --- common/quicktime.h | 1 + engines/mohawk/video.cpp | 13 +- engines/mohawk/video.h | 4 +- engines/sci/engine/kvideo.cpp | 4 +- video/qt_decoder.cpp | 650 +++++++++++++++--------------------------- video/qt_decoder.h | 183 +++--------- 6 files changed, 286 insertions(+), 569 deletions(-) diff --git a/common/quicktime.h b/common/quicktime.h index 974502d075..08ca35ad51 100644 --- a/common/quicktime.h +++ b/common/quicktime.h @@ -35,6 +35,7 @@ #include "common/scummsys.h" #include "common/stream.h" #include "common/rational.h" +#include "common/types.h" namespace Common { class MacResManager; diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index 18d609c513..3b4e61646d 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -207,7 +207,7 @@ bool VideoManager::updateMovies() { // Remove any videos that are over if (_videoStreams[i].endOfVideo()) { if (_videoStreams[i].loop) { - _videoStreams[i]->seekToTime(_videoStreams[i].start); + _videoStreams[i]->seek(_videoStreams[i].start); } else { // Check the video time one last time before deleting it _vm->doVideoTimer(i, true); @@ -394,6 +394,8 @@ VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool entry.loop = loop; entry.enabled = true; + entry->start(); + // Search for any deleted videos so we can take a formerly used slot for (uint32 i = 0; i < _videoStreams.size(); i++) if (!_videoStreams[i].video) { @@ -430,6 +432,7 @@ VideoHandle VideoManager::createVideoHandle(const Common::String &filename, uint entry->loadStream(file); entry->setVolume(volume); + entry->start(); // Search for any deleted videos so we can take a formerly used slot for (uint32 i = 0; i < _videoStreams.size(); i++) @@ -492,7 +495,7 @@ uint32 VideoManager::getTime(VideoHandle handle) { uint32 VideoManager::getDuration(VideoHandle handle) { assert(handle != NULL_VID_HANDLE); - return _videoStreams[handle]->getDuration(); + return _videoStreams[handle]->getDuration().msecs(); } bool VideoManager::endOfVideo(VideoHandle handle) { @@ -512,13 +515,13 @@ void VideoManager::setVideoBounds(VideoHandle handle, Audio::Timestamp start, Au assert(handle != NULL_VID_HANDLE); _videoStreams[handle].start = start; _videoStreams[handle].end = end; - _videoStreams[handle]->seekToTime(start); + _videoStreams[handle]->seek(start); } void VideoManager::drawVideoFrame(VideoHandle handle, Audio::Timestamp time) { assert(handle != NULL_VID_HANDLE); _videoStreams[handle].end = Audio::Timestamp(0xffffffff, 1); - _videoStreams[handle]->seekToTime(time); + _videoStreams[handle]->seek(time); updateMovies(); delete _videoStreams[handle].video; _videoStreams[handle].clear(); @@ -526,7 +529,7 @@ void VideoManager::drawVideoFrame(VideoHandle handle, Audio::Timestamp time) { void VideoManager::seekToTime(VideoHandle handle, Audio::Timestamp time) { assert(handle != NULL_VID_HANDLE); - _videoStreams[handle]->seekToTime(time); + _videoStreams[handle]->seek(time); } void VideoManager::setVideoLooping(VideoHandle handle, bool loop) { diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h index 98bcadfb53..937cd0f2dd 100644 --- a/engines/mohawk/video.h +++ b/engines/mohawk/video.h @@ -45,7 +45,7 @@ struct MLSTRecord { struct VideoEntry { // Playback variables - Video::SeekableVideoDecoder *video; + Video::AdvancedVideoDecoder *video; uint16 x; uint16 y; bool loop; @@ -57,7 +57,7 @@ struct VideoEntry { int id; // Internal Mohawk files // Helper functions - Video::SeekableVideoDecoder *operator->() const { assert(video); return video; } // TODO: Remove this eventually + Video::AdvancedVideoDecoder *operator->() const { assert(video); return video; } // TODO: Remove this eventually void clear(); bool endOfVideo(); }; diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index 456f860493..da63aa3a8d 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -170,8 +170,6 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) { delete videoDecoder; videoDecoder = 0; } - - ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); // TODO: Remove after new API is complete } } else { // Windows AVI @@ -212,7 +210,6 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) { videoDecoder = 0; } else { s->_videoState.fileName = filename; - ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); } break; } @@ -222,6 +219,7 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) { } if (videoDecoder) { + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); // TODO: Remove after new API is complete playVideo(videoDecoder, s->_videoState); // HACK: Switch back to 8bpp if we played a true color video. diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index aba545abc0..70dcdff9c6 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -33,14 +33,12 @@ #include "audio/audiostream.h" #include "common/debug.h" -#include "common/endian.h" #include "common/memstream.h" #include "common/system.h" #include "common/textconsole.h" #include "common/util.h" // Video codecs -#include "video/codecs/codec.h" #include "video/codecs/cinepak.h" #include "video/codecs/mjpeg.h" #include "video/codecs/qtrle.h" @@ -56,97 +54,43 @@ namespace Video { //////////////////////////////////////////// QuickTimeDecoder::QuickTimeDecoder() { - _setStartTime = false; _scaledSurface = 0; - _dirtyPalette = false; - _palette = 0; _width = _height = 0; - _needUpdate = false; } QuickTimeDecoder::~QuickTimeDecoder() { close(); } -int32 QuickTimeDecoder::getCurFrame() const { - // TODO: This is rather simplistic and doesn't take edits that - // repeat sections of the media into account. Doing that - // over-complicates things and shouldn't be necessary, but - // it would be nice to have in the future. - - int32 frame = -1; - - for (uint32 i = 0; i < _handlers.size(); i++) - if (_handlers[i]->getTrackType() == TrackHandler::kTrackTypeVideo) - frame += ((VideoTrackHandler *)_handlers[i])->getCurFrame() + 1; - - return frame; -} - -uint32 QuickTimeDecoder::getFrameCount() const { - uint32 count = 0; - - for (uint32 i = 0; i < _handlers.size(); i++) - if (_handlers[i]->getTrackType() == TrackHandler::kTrackTypeVideo) - count += ((VideoTrackHandler *)_handlers[i])->getFrameCount(); - - return count; -} - -void QuickTimeDecoder::startAudio() { - updateAudioBuffer(); - - for (uint32 i = 0; i < _audioTracks.size(); i++) { - g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audioHandles[i], _audioTracks[i], -1, getVolume(), getBalance(), DisposeAfterUse::NO); +bool QuickTimeDecoder::loadFile(const Common::String &filename) { + if (!Common::QuickTimeParser::parseFile(filename)) + return false; - // Pause the audio again if we're still paused - if (isPaused()) - g_system->getMixer()->pauseHandle(_audioHandles[i], true); - } + init(); + return true; } -void QuickTimeDecoder::stopAudio() { - for (uint32 i = 0; i < _audioHandles.size(); i++) - g_system->getMixer()->stopHandle(_audioHandles[i]); -} +bool QuickTimeDecoder::loadStream(Common::SeekableReadStream *stream) { + if (!Common::QuickTimeParser::parseStream(stream)) + return false; -void QuickTimeDecoder::pauseVideoIntern(bool pause) { - for (uint32 i = 0; i < _audioHandles.size(); i++) - g_system->getMixer()->pauseHandle(_audioHandles[i], pause); + init(); + return true; } -QuickTimeDecoder::VideoTrackHandler *QuickTimeDecoder::findNextVideoTrack() const { - VideoTrackHandler *bestTrack = 0; - uint32 bestTime = 0xffffffff; - - for (uint32 i = 0; i < _handlers.size(); i++) { - if (_handlers[i]->getTrackType() == TrackHandler::kTrackTypeVideo && !_handlers[i]->endOfTrack()) { - VideoTrackHandler *track = (VideoTrackHandler *)_handlers[i]; - uint32 time = track->getNextFrameStartTime(); +void QuickTimeDecoder::close() { + AdvancedVideoDecoder::close(); + Common::QuickTimeParser::close(); - if (time < bestTime) { - bestTime = time; - bestTrack = track; - } - } + if (_scaledSurface) { + _scaledSurface->free(); + delete _scaledSurface; + _scaledSurface = 0; } - - return bestTrack; } const Graphics::Surface *QuickTimeDecoder::decodeNextFrame() { - if (!_nextVideoTrack) - return 0; - - const Graphics::Surface *frame = _nextVideoTrack->decodeNextFrame(); - - if (!_setStartTime) { - _startTime = g_system->getMillis(); - _setStartTime = true; - } - - _nextVideoTrack = findNextVideoTrack(); - _needUpdate = false; + const Graphics::Surface *frame = AdvancedVideoDecoder::decodeNextFrame(); // Update audio buffers too // (needs to be done after we find the next track) @@ -166,138 +110,7 @@ const Graphics::Surface *QuickTimeDecoder::decodeNextFrame() { return frame; } -void QuickTimeDecoder::scaleSurface(const Graphics::Surface *src, Graphics::Surface *dst, Common::Rational scaleFactorX, Common::Rational scaleFactorY) { - assert(src && dst); - - for (int32 j = 0; j < dst->h; j++) - for (int32 k = 0; k < dst->w; k++) - memcpy(dst->getBasePtr(k, j), src->getBasePtr((k * scaleFactorX).toInt() , (j * scaleFactorY).toInt()), src->format.bytesPerPixel); -} - -bool QuickTimeDecoder::endOfVideo() const { - if (!isVideoLoaded()) - return true; - - for (uint32 i = 0; i < _handlers.size(); i++) - if (!_handlers[i]->endOfTrack()) - return false; - - return true; -} - -uint32 QuickTimeDecoder::getTime() const { - // Try to base sync off an active audio track - for (uint32 i = 0; i < _audioHandles.size(); i++) { - if (g_system->getMixer()->isSoundHandleActive(_audioHandles[i])) { - uint32 time = g_system->getMixer()->getSoundElapsedTime(_audioHandles[i]) + _audioStartOffset.msecs(); - if (Audio::Timestamp(time, 1000) < _audioTracks[i]->getLength()) - return time; - } - } - - // Just use time elapsed since the beginning - return SeekableVideoDecoder::getTime(); -} - -uint32 QuickTimeDecoder::getTimeToNextFrame() const { - if (_needUpdate) - return 0; - - if (_nextVideoTrack) { - uint32 nextFrameStartTime = _nextVideoTrack->getNextFrameStartTime(); - - if (nextFrameStartTime == 0) - return 0; - - // TODO: Add support for rate modification - - uint32 elapsedTime = getTime(); - - if (elapsedTime < nextFrameStartTime) - return nextFrameStartTime - elapsedTime; - } - - return 0; -} - -bool QuickTimeDecoder::loadFile(const Common::String &filename) { - if (!Common::QuickTimeParser::parseFile(filename)) - return false; - - init(); - return true; -} - -bool QuickTimeDecoder::loadStream(Common::SeekableReadStream *stream) { - if (!Common::QuickTimeParser::parseStream(stream)) - return false; - - init(); - 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(); - - _startTime = 0; - _setStartTime = false; - - // Initialize all the audio tracks - if (!_audioTracks.empty()) { - _audioHandles.resize(_audioTracks.size()); - - for (uint32 i = 0; i < _audioTracks.size(); i++) - _handlers.push_back(new AudioTrackHandler(this, _audioTracks[i])); - } - - // Initialize all the video tracks - for (uint32 i = 0; i < _tracks.size(); i++) { - if (_tracks[i]->codecType == CODEC_TYPE_VIDEO) { - for (uint32 j = 0; j < _tracks[i]->sampleDescs.size(); j++) - ((VideoSampleDesc *)_tracks[i]->sampleDescs[j])->initCodec(); - - _handlers.push_back(new VideoTrackHandler(this, _tracks[i])); - } - } - - // Prepare the first video track - _nextVideoTrack = findNextVideoTrack(); - - if (_nextVideoTrack) { - if (_scaleFactorX != 1 || _scaleFactorY != 1) { - // We have to take the scale into consideration when setting width/height - _width = (_nextVideoTrack->getWidth() / _scaleFactorX).toInt(); - _height = (_nextVideoTrack->getHeight() / _scaleFactorY).toInt(); - } else { - _width = _nextVideoTrack->getWidth().toInt(); - _height = _nextVideoTrack->getHeight().toInt(); - } - - _needUpdate = true; - } else { - _needUpdate = false; - } - - // Now start any audio - if (!_audioTracks.empty()) { - startAudio(); - _audioStartOffset = Audio::Timestamp(0); - } -} - -Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Track *track, uint32 format) { +Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format) { if (track->codecType == CODEC_TYPE_VIDEO) { debug(0, "Video Codec FourCC: \'%s\'", tag2str(format)); @@ -395,61 +208,52 @@ Common::QuickTimeParser::SampleDesc *QuickTimeDecoder::readSampleDesc(Track *tra return Audio::QuickTimeAudioDecoder::readSampleDesc(track, format); } -void QuickTimeDecoder::close() { - stopAudio(); - freeAllTrackHandlers(); - - if (_scaledSurface) { - _scaledSurface->free(); - delete _scaledSurface; - _scaledSurface = 0; - } - - _width = _height = 0; - - Common::QuickTimeParser::close(); - SeekableVideoDecoder::reset(); -} - -void QuickTimeDecoder::freeAllTrackHandlers() { - for (uint32 i = 0; i < _handlers.size(); i++) - delete _handlers[i]; - - _handlers.clear(); -} +void QuickTimeDecoder::init() { + Audio::QuickTimeAudioDecoder::init(); -void QuickTimeDecoder::seekToTime(const Audio::Timestamp &time) { - stopAudio(); - _audioStartOffset = time; + // Initialize all the audio tracks + for (uint32 i = 0; i < _audioTracks.size(); i++) + addTrack(new AudioTrackHandler(this, _audioTracks[i])); - // Sets all tracks to this time - for (uint32 i = 0; i < _handlers.size(); i++) - _handlers[i]->seekToTime(time); + // Initialize all the video tracks + Common::Array &tracks = Common::QuickTimeParser::_tracks; + for (uint32 i = 0; i < tracks.size(); i++) { + if (tracks[i]->codecType == CODEC_TYPE_VIDEO) { + for (uint32 j = 0; j < tracks[i]->sampleDescs.size(); j++) + ((VideoSampleDesc *)tracks[i]->sampleDescs[j])->initCodec(); - startAudio(); + addTrack(new VideoTrackHandler(this, tracks[i])); + } + } - // Reset our start time - _startTime = g_system->getMillis() - time.msecs(); - _setStartTime = true; - resetPauseStartTime(); + // Prepare the first video track + VideoTrackHandler *nextVideoTrack = (VideoTrackHandler *)findNextVideoTrack(); - // Reset the next video track too - _nextVideoTrack = findNextVideoTrack(); - _needUpdate = _nextVideoTrack != 0; + if (nextVideoTrack) { + if (_scaleFactorX != 1 || _scaleFactorY != 1) { + // We have to take the scale into consideration when setting width/height + _width = (nextVideoTrack->getScaledWidth() / _scaleFactorX).toInt(); + _height = (nextVideoTrack->getScaledHeight() / _scaleFactorY).toInt(); + } else { + _width = nextVideoTrack->getWidth(); + _height = nextVideoTrack->getHeight(); + } + } } void QuickTimeDecoder::updateAudioBuffer() { // Updates the audio buffers for all audio tracks - for (uint32 i = 0; i < _handlers.size(); i++) - if (_handlers[i]->getTrackType() == TrackHandler::kTrackTypeAudio) - ((AudioTrackHandler *)_handlers[i])->updateBuffer(); + for (TrackListIterator it = getTrackListBegin(); it != getTrackListEnd(); it++) + if ((*it)->getTrackType() == AdvancedVideoDecoder::Track::kTrackTypeAudio) + ((AudioTrackHandler *)*it)->updateBuffer(); } -Graphics::PixelFormat QuickTimeDecoder::getPixelFormat() const { - if (_nextVideoTrack) - return _nextVideoTrack->getPixelFormat(); +void QuickTimeDecoder::scaleSurface(const Graphics::Surface *src, Graphics::Surface *dst, const Common::Rational &scaleFactorX, const Common::Rational &scaleFactorY) { + assert(src && dst); - return Graphics::PixelFormat(); + for (int32 j = 0; j < dst->h; j++) + for (int32 k = 0; k < dst->w; k++) + memcpy(dst->getBasePtr(k, j), src->getBasePtr((k * scaleFactorX).toInt() , (j * scaleFactorY).toInt()), src->format.bytesPerPixel); } QuickTimeDecoder::VideoSampleDesc::VideoSampleDesc(Common::QuickTimeParser::Track *parentTrack, uint32 codecTag) : Common::QuickTimeParser::SampleDesc(parentTrack, codecTag) { @@ -504,25 +308,8 @@ void QuickTimeDecoder::VideoSampleDesc::initCodec() { } } -bool QuickTimeDecoder::endOfVideoTracks() const { - for (uint32 i = 0; i < _handlers.size(); i++) - if (_handlers[i]->getTrackType() == TrackHandler::kTrackTypeVideo && !_handlers[i]->endOfTrack()) - return false; - - return true; -} - -QuickTimeDecoder::TrackHandler::TrackHandler(QuickTimeDecoder *decoder, Track *parent) : _decoder(decoder), _parent(parent), _fd(_decoder->_fd) { - _curEdit = 0; -} - -bool QuickTimeDecoder::TrackHandler::endOfTrack() { - // A track is over when we've finished going through all edits - return _curEdit == _parent->editCount; -} - QuickTimeDecoder::AudioTrackHandler::AudioTrackHandler(QuickTimeDecoder *decoder, QuickTimeAudioTrack *audioTrack) - : TrackHandler(decoder, audioTrack->getParent()), _audioTrack(audioTrack) { + : _decoder(decoder), _audioTrack(audioTrack) { } void QuickTimeDecoder::AudioTrackHandler::updateBuffer() { @@ -532,21 +319,20 @@ void QuickTimeDecoder::AudioTrackHandler::updateBuffer() { _audioTrack->queueAudio(Audio::Timestamp(_decoder->getTimeToNextFrame() + 500, 1000)); } -bool QuickTimeDecoder::AudioTrackHandler::endOfTrack() { - return _audioTrack->endOfData(); -} - -void QuickTimeDecoder::AudioTrackHandler::seekToTime(Audio::Timestamp time) { - _audioTrack->seek(time); +Audio::SeekableAudioStream *QuickTimeDecoder::AudioTrackHandler::getSeekableAudioStream() const { + return _audioTrack; } -QuickTimeDecoder::VideoTrackHandler::VideoTrackHandler(QuickTimeDecoder *decoder, Common::QuickTimeParser::Track *parent) : TrackHandler(decoder, parent) { +QuickTimeDecoder::VideoTrackHandler::VideoTrackHandler(QuickTimeDecoder *decoder, Common::QuickTimeParser::Track *parent) : _decoder(decoder), _parent(parent) { + _curEdit = 0; enterNewEditList(false); _holdNextFrameStartTime = false; _curFrame = -1; _durationOverride = -1; _scaledSurface = 0; + _curPalette = 0; + _dirtyPalette = false; } QuickTimeDecoder::VideoTrackHandler::~VideoTrackHandler() { @@ -556,6 +342,88 @@ QuickTimeDecoder::VideoTrackHandler::~VideoTrackHandler() { } } +bool QuickTimeDecoder::VideoTrackHandler::endOfTrack() const { + // A track is over when we've finished going through all edits + return _curEdit == _parent->editCount; +} + +bool QuickTimeDecoder::VideoTrackHandler::seek(const Audio::Timestamp &requestedTime) { + // First, figure out what edit we're in + Audio::Timestamp time = requestedTime.convertToFramerate(_parent->timeScale); + + // Continue until we get to where we need to be + for (_curEdit = 0; !endOfTrack(); _curEdit++) + if ((uint32)time.totalNumberOfFrames() >= getCurEditTimeOffset() && (uint32)time.totalNumberOfFrames() < getCurEditTimeOffset() + getCurEditTrackDuration()) + break; + + // This track is done + if (endOfTrack()) + return true; + + enterNewEditList(false); + + // One extra check for the end of a track + if (endOfTrack()) + return true; + + // Now we're in the edit and need to figure out what frame we need + while (getRateAdjustedFrameTime() < (uint32)time.totalNumberOfFrames()) { + _curFrame++; + if (_durationOverride >= 0) { + _nextFrameStartTime += _durationOverride; + _durationOverride = -1; + } else { + _nextFrameStartTime += getFrameDuration(); + } + } + + // All that's left is to figure out what our starting time is going to be + // Compare the starting point for the frame to where we need to be + _holdNextFrameStartTime = getRateAdjustedFrameTime() != (uint32)time.totalNumberOfFrames(); + + // If we went past the time, go back a frame + if (_holdNextFrameStartTime) + _curFrame--; + + // Handle the keyframe here + int32 destinationFrame = _curFrame + 1; + + assert(destinationFrame < (int32)_parent->frameCount); + _curFrame = findKeyFrame(destinationFrame) - 1; + while (_curFrame < destinationFrame - 1) + bufferNextFrame(); + + return true; +} + +Audio::Timestamp QuickTimeDecoder::VideoTrackHandler::getDuration() const { + return Audio::Timestamp(0, _parent->duration, _decoder->_timeScale); +} + +uint16 QuickTimeDecoder::VideoTrackHandler::getWidth() const { + return getScaledWidth().toInt(); +} + +uint16 QuickTimeDecoder::VideoTrackHandler::getHeight() const { + return getScaledHeight().toInt(); +} + +Graphics::PixelFormat QuickTimeDecoder::VideoTrackHandler::getPixelFormat() const { + return ((VideoSampleDesc *)_parent->sampleDescs[0])->_videoCodec->getPixelFormat(); +} + +int QuickTimeDecoder::VideoTrackHandler::getFrameCount() const { + return _parent->frameCount; +} + +uint32 QuickTimeDecoder::VideoTrackHandler::getNextFrameStartTime() const { + if (endOfTrack()) + return 0; + + // Convert to milliseconds so the tracks can be compared + return getRateAdjustedFrameTime() * 1000 / _parent->timeScale; +} + const Graphics::Surface *QuickTimeDecoder::VideoTrackHandler::decodeNextFrame() { if (endOfTrack()) return 0; @@ -586,7 +454,7 @@ const Graphics::Surface *QuickTimeDecoder::VideoTrackHandler::decodeNextFrame() if (frame && (_parent->scaleFactorX != 1 || _parent->scaleFactorY != 1)) { if (!_scaledSurface) { _scaledSurface = new Graphics::Surface(); - _scaledSurface->create(getWidth().toInt(), getHeight().toInt(), getPixelFormat()); + _scaledSurface->create(getScaledWidth().toInt(), getScaledHeight().toInt(), getPixelFormat()); } _decoder->scaleSurface(frame, _scaledSurface, _parent->scaleFactorX, _parent->scaleFactorY); @@ -596,6 +464,85 @@ const Graphics::Surface *QuickTimeDecoder::VideoTrackHandler::decodeNextFrame() return frame; } +Common::Rational QuickTimeDecoder::VideoTrackHandler::getScaledWidth() const { + return Common::Rational(_parent->width) / _parent->scaleFactorX; +} + +Common::Rational QuickTimeDecoder::VideoTrackHandler::getScaledHeight() const { + return Common::Rational(_parent->height) / _parent->scaleFactorY; +} + +Common::SeekableReadStream *QuickTimeDecoder::VideoTrackHandler::getNextFramePacket(uint32 &descId) { + // First, we have to track down which chunk holds the sample and which sample in the chunk contains the frame we are looking for. + int32 totalSampleCount = 0; + int32 sampleInChunk = 0; + int32 actualChunk = -1; + uint32 sampleToChunkIndex = 0; + + for (uint32 i = 0; i < _parent->chunkCount; i++) { + if (sampleToChunkIndex < _parent->sampleToChunkCount && i >= _parent->sampleToChunk[sampleToChunkIndex].first) + sampleToChunkIndex++; + + totalSampleCount += _parent->sampleToChunk[sampleToChunkIndex - 1].count; + + if (totalSampleCount > _curFrame) { + actualChunk = i; + descId = _parent->sampleToChunk[sampleToChunkIndex - 1].id; + sampleInChunk = _parent->sampleToChunk[sampleToChunkIndex - 1].count - totalSampleCount + _curFrame; + break; + } + } + + if (actualChunk < 0) { + warning("Could not find data for frame %d", _curFrame); + return 0; + } + + // Next seek to that frame + Common::SeekableReadStream *stream = _decoder->_fd; + stream->seek(_parent->chunkOffsets[actualChunk]); + + // Then, if the chunk holds more than one frame, seek to where the frame we want is located + for (int32 i = _curFrame - sampleInChunk; i < _curFrame; i++) { + if (_parent->sampleSize != 0) + stream->skip(_parent->sampleSize); + else + stream->skip(_parent->sampleSizes[i]); + } + + // Finally, read in the raw data for the frame + //debug("Frame Data[%d]: Offset = %d, Size = %d", _curFrame, stream->pos(), _parent->sampleSizes[_curFrame]); + + if (_parent->sampleSize != 0) + return stream->readStream(_parent->sampleSize); + + return stream->readStream(_parent->sampleSizes[_curFrame]); +} + +uint32 QuickTimeDecoder::VideoTrackHandler::getFrameDuration() { + uint32 curFrameIndex = 0; + for (int32 i = 0; i < _parent->timeToSampleCount; i++) { + curFrameIndex += _parent->timeToSample[i].count; + if ((uint32)_curFrame < curFrameIndex) { + // Ok, now we have what duration this frame has. + return _parent->timeToSample[i].duration; + } + } + + // This should never occur + error("Cannot find duration for frame %d", _curFrame); + return 0; +} + +uint32 QuickTimeDecoder::VideoTrackHandler::findKeyFrame(uint32 frame) const { + for (int i = _parent->keyframeCount - 1; i >= 0; i--) + if (_parent->keyframes[i] <= frame) + return _parent->keyframes[i]; + + // If none found, we'll assume the requested frame is a key frame + return frame; +} + void QuickTimeDecoder::VideoTrackHandler::enterNewEditList(bool bufferFrames) { // Bypass all empty edit lists first while (!endOfTrack() && _parent->editList[_curEdit].mediaTime == -1) @@ -667,166 +614,25 @@ const Graphics::Surface *QuickTimeDecoder::VideoTrackHandler::bufferNextFrame() if (entry->_videoCodec->containsPalette()) { // The codec itself contains a palette if (entry->_videoCodec->hasDirtyPalette()) { - _decoder->_palette = entry->_videoCodec->getPalette(); - _decoder->_dirtyPalette = true; + _curPalette = entry->_videoCodec->getPalette(); + _dirtyPalette = true; } } else { // Check if the video description has been updated byte *palette = entry->_palette; - if (palette !=_decoder-> _palette) { - _decoder->_palette = palette; - _decoder->_dirtyPalette = true; - } - } - - return frame; -} - -uint32 QuickTimeDecoder::VideoTrackHandler::getNextFrameStartTime() { - if (endOfTrack()) - return 0; - - // Convert to milliseconds so the tracks can be compared - return getRateAdjustedFrameTime() * 1000 / _parent->timeScale; -} - -uint32 QuickTimeDecoder::VideoTrackHandler::getFrameCount() { - return _parent->frameCount; -} - -uint32 QuickTimeDecoder::VideoTrackHandler::getFrameDuration() { - uint32 curFrameIndex = 0; - for (int32 i = 0; i < _parent->timeToSampleCount; i++) { - curFrameIndex += _parent->timeToSample[i].count; - if ((uint32)_curFrame < curFrameIndex) { - // Ok, now we have what duration this frame has. - return _parent->timeToSample[i].duration; - } - } - - // This should never occur - error("Cannot find duration for frame %d", _curFrame); - return 0; -} - -Common::SeekableReadStream *QuickTimeDecoder::VideoTrackHandler::getNextFramePacket(uint32 &descId) { - // First, we have to track down which chunk holds the sample and which sample in the chunk contains the frame we are looking for. - int32 totalSampleCount = 0; - int32 sampleInChunk = 0; - int32 actualChunk = -1; - uint32 sampleToChunkIndex = 0; - - for (uint32 i = 0; i < _parent->chunkCount; i++) { - if (sampleToChunkIndex < _parent->sampleToChunkCount && i >= _parent->sampleToChunk[sampleToChunkIndex].first) - sampleToChunkIndex++; - - totalSampleCount += _parent->sampleToChunk[sampleToChunkIndex - 1].count; - - if (totalSampleCount > _curFrame) { - actualChunk = i; - descId = _parent->sampleToChunk[sampleToChunkIndex - 1].id; - sampleInChunk = _parent->sampleToChunk[sampleToChunkIndex - 1].count - totalSampleCount + _curFrame; - break; + if (palette != _curPalette) { + _curPalette = palette; + _dirtyPalette = true; } } - if (actualChunk < 0) { - warning("Could not find data for frame %d", _curFrame); - return 0; - } - - // Next seek to that frame - _fd->seek(_parent->chunkOffsets[actualChunk]); - - // Then, if the chunk holds more than one frame, seek to where the frame we want is located - for (int32 i = _curFrame - sampleInChunk; i < _curFrame; i++) { - if (_parent->sampleSize != 0) - _fd->skip(_parent->sampleSize); - else - _fd->skip(_parent->sampleSizes[i]); - } - - // Finally, read in the raw data for the frame - //debug("Frame Data[%d]: Offset = %d, Size = %d", _curFrame, _fd->pos(), _parent->sampleSizes[_curFrame]); - - if (_parent->sampleSize != 0) - return _fd->readStream(_parent->sampleSize); - - return _fd->readStream(_parent->sampleSizes[_curFrame]); -} - -uint32 QuickTimeDecoder::VideoTrackHandler::findKeyFrame(uint32 frame) const { - for (int i = _parent->keyframeCount - 1; i >= 0; i--) - if (_parent->keyframes[i] <= frame) - return _parent->keyframes[i]; - - // If none found, we'll assume the requested frame is a key frame return frame; } -void QuickTimeDecoder::VideoTrackHandler::seekToTime(Audio::Timestamp time) { - // First, figure out what edit we're in - time = time.convertToFramerate(_parent->timeScale); - - // Continue until we get to where we need to be - for (_curEdit = 0; !endOfTrack(); _curEdit++) - if ((uint32)time.totalNumberOfFrames() >= getCurEditTimeOffset() && (uint32)time.totalNumberOfFrames() < getCurEditTimeOffset() + getCurEditTrackDuration()) - break; - - // This track is done - if (endOfTrack()) - return; - - enterNewEditList(false); - - // One extra check for the end of a track - if (endOfTrack()) - return; - - // Now we're in the edit and need to figure out what frame we need - while (getRateAdjustedFrameTime() < (uint32)time.totalNumberOfFrames()) { - _curFrame++; - if (_durationOverride >= 0) { - _nextFrameStartTime += _durationOverride; - _durationOverride = -1; - } else { - _nextFrameStartTime += getFrameDuration(); - } - } - - // All that's left is to figure out what our starting time is going to be - // Compare the starting point for the frame to where we need to be - _holdNextFrameStartTime = getRateAdjustedFrameTime() != (uint32)time.totalNumberOfFrames(); - - // If we went past the time, go back a frame - if (_holdNextFrameStartTime) - _curFrame--; - - // Handle the keyframe here - int32 destinationFrame = _curFrame + 1; - - assert(destinationFrame < (int32)_parent->frameCount); - _curFrame = findKeyFrame(destinationFrame) - 1; - while (_curFrame < destinationFrame - 1) - bufferNextFrame(); -} - -Common::Rational QuickTimeDecoder::VideoTrackHandler::getWidth() const { - return Common::Rational(_parent->width) / _parent->scaleFactorX; -} - -Common::Rational QuickTimeDecoder::VideoTrackHandler::getHeight() const { - return Common::Rational(_parent->height) / _parent->scaleFactorY; -} - -Graphics::PixelFormat QuickTimeDecoder::VideoTrackHandler::getPixelFormat() const { - return ((VideoSampleDesc *)_parent->sampleDescs[0])->_videoCodec->getPixelFormat(); -} - uint32 QuickTimeDecoder::VideoTrackHandler::getRateAdjustedFrameTime() const { // Figure out what time the next frame is at taking the edit list rate into account - uint32 convertedTime = (Common::Rational(_nextFrameStartTime - getCurEditTimeOffset()) / _parent->editList[_curEdit].mediaRate).toInt(); + uint32 convertedTime = (Common::Rational(_nextFrameStartTime - getCurEditTimeOffset()) / _parent->editList[_curEdit].mediaRate).toInt(); return convertedTime + getCurEditTimeOffset(); } diff --git a/video/qt_decoder.h b/video/qt_decoder.h index ce32562d64..7a251b8580 100644 --- a/video/qt_decoder.h +++ b/video/qt_decoder.h @@ -31,16 +31,17 @@ #ifndef VIDEO_QT_DECODER_H #define VIDEO_QT_DECODER_H -#include "audio/mixer.h" #include "audio/decoders/quicktime_intern.h" #include "common/scummsys.h" -#include "common/rational.h" -#include "graphics/pixelformat.h" #include "video/video_decoder.h" namespace Common { - class Rational; +class Rational; +} + +namespace Graphics { +struct PixelFormat; } namespace Video { @@ -54,68 +55,33 @@ class Codec; * - mohawk * - sci */ -class QuickTimeDecoder : public SeekableVideoDecoder, public Audio::QuickTimeAudioDecoder { +class QuickTimeDecoder : public AdvancedVideoDecoder, public Audio::QuickTimeAudioDecoder { public: QuickTimeDecoder(); virtual ~QuickTimeDecoder(); - /** - * Returns the width of the video - * @return the width of the video - */ - uint16 getWidth() const { return _width; } - - /** - * Returns the height of the video - * @return the height of the video - */ - uint16 getHeight() const { return _height; } - - /** - * Returns the amount of frames in the video - * @return the amount of frames in the video - */ - uint32 getFrameCount() const; - - /** - * Load a video file - * @param filename the filename to load - */ bool loadFile(const Common::String &filename); - - /** - * Load a QuickTime video file from a SeekableReadStream - * @param stream the stream to load - */ bool loadStream(Common::SeekableReadStream *stream); - - /** - * Close a QuickTime encoded video file - */ void close(); + uint16 getWidth() const { return _width; } + uint16 getHeight() const { return _height; } + const Graphics::Surface *decodeNextFrame(); + Audio::Timestamp getDuration() const { return Audio::Timestamp(0, _duration, _timeScale); } - /** - * Returns the palette of the video - * @return the palette of the video - */ - const byte *getPalette() { _dirtyPalette = false; return _palette; } - bool hasDirtyPalette() const { return _dirtyPalette; } +protected: + Common::QuickTimeParser::SampleDesc *readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format); - int32 getCurFrame() const; +private: + void init(); - bool isVideoLoaded() const { return isOpen(); } - const Graphics::Surface *decodeNextFrame(); - bool endOfVideo() const; - uint32 getTime() const; - uint32 getTimeToNextFrame() const; - Graphics::PixelFormat getPixelFormat() const; + void updateAudioBuffer(); - // SeekableVideoDecoder API - void seekToFrame(uint32 frame); - void seekToTime(const Audio::Timestamp &time); - uint32 getDuration() const { return _duration * 1000 / _timeScale; } + uint16 _width, _height; + + Graphics::Surface *_scaledSurface; + void scaleSurface(const Graphics::Surface *src, Graphics::Surface *dst, + const Common::Rational &scaleFactorX, const Common::Rational &scaleFactorY); -protected: class VideoSampleDesc : public Common::QuickTimeParser::SampleDesc { public: VideoSampleDesc(Common::QuickTimeParser::Track *parentTrack, uint32 codecTag); @@ -131,110 +97,59 @@ protected: Codec *_videoCodec; }; - Common::QuickTimeParser::SampleDesc *readSampleDesc(Track *track, uint32 format); - - // VideoDecoder API - void updateVolume(); - void updateBalance(); - -private: - void init(); - - void startAudio(); - void stopAudio(); - void updateAudioBuffer(); - void readNextAudioChunk(); - Common::Array _audioHandles; - Audio::Timestamp _audioStartOffset; - - Codec *createCodec(uint32 codecTag, byte bitsPerPixel); - uint32 findKeyFrame(uint32 frame) const; - - bool _dirtyPalette; - const byte *_palette; - bool _setStartTime; - bool _needUpdate; - - uint16 _width, _height; - - Graphics::Surface *_scaledSurface; - void scaleSurface(const Graphics::Surface *src, Graphics::Surface *dst, - Common::Rational scaleFactorX, Common::Rational scaleFactorY); - - void pauseVideoIntern(bool pause); - bool endOfVideoTracks() const; - - // The TrackHandler is a class that wraps around a QuickTime Track - // and handles playback in this decoder class. - class TrackHandler { - public: - TrackHandler(QuickTimeDecoder *decoder, Track *parent); - virtual ~TrackHandler() {} - - enum TrackType { - kTrackTypeAudio, - kTrackTypeVideo - }; - - virtual TrackType getTrackType() const = 0; - - virtual void seekToTime(Audio::Timestamp time) = 0; - - virtual bool endOfTrack(); - - protected: - uint32 _curEdit; - QuickTimeDecoder *_decoder; - Common::SeekableReadStream *_fd; - Track *_parent; - }; - // The AudioTrackHandler is currently just a wrapper around some // QuickTimeDecoder functions. - class AudioTrackHandler : public TrackHandler { + class AudioTrackHandler : public SeekableAudioTrack { public: AudioTrackHandler(QuickTimeDecoder *decoder, QuickTimeAudioTrack *audioTrack); - TrackType getTrackType() const { return kTrackTypeAudio; } void updateBuffer(); - void seekToTime(Audio::Timestamp time); - bool endOfTrack(); + + protected: + Audio::SeekableAudioStream *getSeekableAudioStream() const; private: + QuickTimeDecoder *_decoder; QuickTimeAudioTrack *_audioTrack; }; // The VideoTrackHandler is the bridge between the time of playback // and the media for the given track. It calculates when to start // tracks and at what rate to play the media using the edit list. - class VideoTrackHandler : public TrackHandler { + class VideoTrackHandler : public VideoTrack { public: - VideoTrackHandler(QuickTimeDecoder *decoder, Track *parent); + VideoTrackHandler(QuickTimeDecoder *decoder, Common::QuickTimeParser::Track *parent); ~VideoTrackHandler(); - TrackType getTrackType() const { return kTrackTypeVideo; } - - const Graphics::Surface *decodeNextFrame(); - - uint32 getNextFrameStartTime(); - - uint32 getFrameCount(); - - int32 getCurFrame() { return _curFrame; } + bool endOfTrack() const; + bool isSeekable() const { return true; } + bool seek(const Audio::Timestamp &time); + Audio::Timestamp getDuration() const; + uint16 getWidth() const; + uint16 getHeight() const; Graphics::PixelFormat getPixelFormat() const; + int getCurFrame() const { return _curFrame; } + int getFrameCount() const; + uint32 getNextFrameStartTime() const; + const Graphics::Surface *decodeNextFrame(); + const byte *getPalette() const { _dirtyPalette = false; return _curPalette; } + bool hasDirtyPalette() const { return _curPalette; } - void seekToTime(Audio::Timestamp time); - - Common::Rational getWidth() const; - Common::Rational getHeight() const; + Common::Rational getScaledWidth() const; + Common::Rational getScaledHeight() const; private: + QuickTimeDecoder *_decoder; + Common::QuickTimeParser::Track *_parent; + uint32 _curEdit; int32 _curFrame; uint32 _nextFrameStartTime; Graphics::Surface *_scaledSurface; bool _holdNextFrameStartTime; int32 _durationOverride; + const byte *_curPalette; + mutable bool _dirtyPalette; Common::SeekableReadStream *getNextFramePacket(uint32 &descId); uint32 getFrameDuration(); @@ -245,12 +160,6 @@ private: uint32 getCurEditTimeOffset() const; uint32 getCurEditTrackDuration() const; }; - - Common::Array _handlers; - VideoTrackHandler *_nextVideoTrack; - VideoTrackHandler *findNextVideoTrack() const; - - void freeAllTrackHandlers(); }; } // End of namespace Video -- cgit v1.2.3 From 9cca8ac9f2f9162d4201d59c9ed8be5ae2a32a2b Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 27 Jul 2012 11:47:49 -0400 Subject: VIDEO: Remove now unused Rewindable and Seekable classes --- video/video_decoder.h | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/video/video_decoder.h b/video/video_decoder.h index eff5a7c396..3f5dc2c2ff 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -809,45 +809,6 @@ private: uint32 getFrameBeginTime(uint32 frame) const; }; -/** - * A VideoDecoder that can be rewound back to the beginning. - * @note This class is now deprecated. Use AdvancedVideoDecoder instead. - */ -class RewindableVideoDecoder : public virtual VideoDecoder { -public: - /** - * Rewind to the beginning of the video. - */ - virtual void rewind() = 0; -}; - -/** - * A VideoDecoder that can seek to a frame or point in time. - * @note This class is now deprecated. Use AdvancedVideoDecoder instead. - */ -class SeekableVideoDecoder : public virtual RewindableVideoDecoder { -public: - /** - * Seek to the specified time. - */ - virtual void seekToTime(const Audio::Timestamp &time) = 0; - - /** - * Seek to the specified time (in ms). - */ - void seekToTime(uint32 msecs) { seekToTime(Audio::Timestamp(msecs, 1000)); } - - /** - * Implementation of RewindableVideoDecoder::rewind(). - */ - virtual void rewind() { seekToTime(0); } - - /** - * Get the total duration of the video (in ms). - */ - virtual uint32 getDuration() const = 0; -}; - } // End of namespace Video #endif -- cgit v1.2.3 From e91001a1642ee8ba8b834f1908247c12d194e0b2 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Fri, 27 Jul 2012 13:36:21 -0400 Subject: LASTEXPRESS: Remove templated resetCurrentParameters() function --- engines/lastexpress/entities/entity.cpp | 6 ++-- engines/lastexpress/entities/entity.h | 59 ++++++++++++++++----------------- 2 files changed, 32 insertions(+), 33 deletions(-) diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 0842a7a78c..aff9445326 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -598,7 +598,7 @@ void Entity::setup(const char *name, uint index) { _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersIIII); _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); } @@ -608,7 +608,7 @@ void Entity::setupS(const char *name, uint index, const char *seq1) { _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersSIIS); EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); strncpy((char *)¶ms->seq1, seq1, 12); @@ -621,7 +621,7 @@ void Entity::setupSS(const char *name, uint index, const char *seq1, const char _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersSSII); EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); strncpy((char *)¶ms->seq1, seq1, 12); diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index e890bba0b5..e2514a6146 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -122,6 +122,13 @@ struct SavePoint; if (!params) \ error("[EXPOSE_PARAMS] Trying to call an entity function with invalid parameters"); \ +#define RESET_PARAMS(data, type) do { \ + EntityData::EntityCallParameters *callParameters = data->getCurrentCallParameters(); \ + callParameters->clear(); \ + for (int i = 0; i < 4; i++) \ + callParameters->parameters[i] = new type(); \ +} while (false) + // function signature without setup (we keep the index for consistency but never use it) #define IMPLEMENT_FUNCTION_NOSETUP(index, class, name) \ void class::name(const SavePoint &savepoint) { \ @@ -835,29 +842,21 @@ public: EntityData() {} - template - void resetCurrentParameters() { - EntityCallParameters *params = &_parameters[_data.currentCall]; - params->clear(); - - for (int i = 0; i < 4; i++) - params->parameters[i] = new T(); - } - - EntityCallData *getCallData() { return &_data; } + EntityCallData *getCallData() { return &_data; } - EntityParameters *getParameters(uint callback, byte index) const; - EntityParameters *getCurrentParameters(byte index = 0) { return getParameters(_data.currentCall, index); } + EntityParameters *getParameters(uint callback, byte index) const; + EntityParameters *getCurrentParameters(byte index = 0) { return getParameters(_data.currentCall, index); } + EntityCallParameters *getCurrentCallParameters() { return &_parameters[_data.currentCall]; } - int getCallback(uint callback) const; - int getCurrentCallback() { return getCallback(_data.currentCall); } - void setCallback(uint callback, byte index); - void setCurrentCallback(uint index) { setCallback(_data.currentCall, index); } + int getCallback(uint callback) const; + int getCurrentCallback() { return getCallback(_data.currentCall); } + void setCallback(uint callback, byte index); + void setCurrentCallback(uint index) { setCallback(_data.currentCall, index); } - void updateParameters(uint32 index) const; + void updateParameters(uint32 index) const; // Serializable - void saveLoadWithSerializer(Common::Serializer &ser); + void saveLoadWithSerializer(Common::Serializer &ser); private: @@ -1078,7 +1077,7 @@ protected: _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersIIII); EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); params->param1 = (unsigned int)param1; @@ -1092,7 +1091,7 @@ protected: _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersIIII); EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); params->param1 = param1; @@ -1107,7 +1106,7 @@ protected: _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersIIII); EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); params->param1 = param1; @@ -1123,7 +1122,7 @@ protected: _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersSIIS); EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); strncpy((char *)¶ms->seq1, seq1, 12); @@ -1138,7 +1137,7 @@ protected: _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersSIIS); EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); strncpy((char *)¶ms->seq1, seq1, 12); @@ -1154,7 +1153,7 @@ protected: _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersSIII); EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII*)_data->getCurrentParameters(); strncpy((char *)¶ms->seq, seq, 12); @@ -1171,7 +1170,7 @@ protected: _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersSIIS); EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); strncpy((char *)¶ms->seq1, seq1, 12); @@ -1188,7 +1187,7 @@ protected: _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersSSII); EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); strncpy((char *)¶ms->seq1, seq1, 12); @@ -1204,7 +1203,7 @@ protected: _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersISII); EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII*)_data->getCurrentParameters(); params->param1 = (unsigned int)param1; @@ -1219,7 +1218,7 @@ protected: _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersISSI); EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI*)_data->getCurrentParameters(); params->param1 = param1; @@ -1235,7 +1234,7 @@ protected: _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersIISI); EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI*)_data->getCurrentParameters(); params->param1 = param1; @@ -1251,7 +1250,7 @@ protected: _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - _data->resetCurrentParameters(); + RESET_PARAMS(_data, EntityData::EntityParametersIISS); EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS*)_data->getCurrentParameters(); params->param1 = param1; -- cgit v1.2.3 From 94e2ea10cd9f5caf7a560b7f1def0f23da9046a5 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Fri, 27 Jul 2012 13:41:48 -0400 Subject: LASTEXPRESS: Add menu-related warnings and turn some warnings into errors --- engines/lastexpress/game/action.cpp | 2 +- engines/lastexpress/game/savegame.cpp | 2 +- engines/lastexpress/menu/menu.cpp | 4 ++-- engines/lastexpress/sound/entry.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp index 1e5bc0ffd7..4d1c786167 100644 --- a/engines/lastexpress/game/action.cpp +++ b/engines/lastexpress/game/action.cpp @@ -404,7 +404,7 @@ SceneIndex Action::processHotspot(const SceneHotspot &hotspot) { ////////////////////////////////////////////////////////////////////////// // Action 0 IMPLEMENT_ACTION(dummy) - warning("[Action::action_dummy] Dummy action function called (hotspot action: %d)", hotspot.action); + error("[Action::action_dummy] Dummy action function called (hotspot action: %d)", hotspot.action); return kSceneInvalid; } diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp index 4c268d84c6..a8fb5c55f7 100644 --- a/engines/lastexpress/game/savegame.cpp +++ b/engines/lastexpress/game/savegame.cpp @@ -257,7 +257,7 @@ void SaveLoad::saveGame(SavegameType type, EntityIndex entity, uint32 value) { entry.saveLoadWithSerializer(ser); if (!entry.isValid()) { - warning("[SaveLoad::saveGame] Invalid entry. This savegame might be corrupted"); + error("[SaveLoad::saveGame] Invalid entry. This savegame might be corrupted"); _savegame->seek(header.offset); } else if (getState()->time < entry.time || (type == kSavegameTypeTickInterval && getState()->time == entry.time)) { // Not ready to save a game, skipping! diff --git a/engines/lastexpress/menu/menu.cpp b/engines/lastexpress/menu/menu.cpp index 7095389f74..6a453aee99 100644 --- a/engines/lastexpress/menu/menu.cpp +++ b/engines/lastexpress/menu/menu.cpp @@ -864,7 +864,7 @@ void Menu::init(bool doSavegame, SavegameType type, uint32 value) { doSavegame = false; } else { - // TODO rename saves? + warning("[Menu::initGame] Renaming saves not implemented"); } // Create a new savegame if needed @@ -875,7 +875,7 @@ void Menu::init(bool doSavegame, SavegameType type, uint32 value) { getSaveLoad()->saveGame(kSavegameTypeEvent2, kEntityPlayer, kEventNone); if (!getGlobalTimer()) { - // TODO: remove existing savegame temp file + warning("[Menu::initGame] Removing temporary saves not implemented"); } // Init savegame & menu values diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp index d689447ff9..f2a063e45f 100644 --- a/engines/lastexpress/sound/entry.cpp +++ b/engines/lastexpress/sound/entry.cpp @@ -117,7 +117,7 @@ void SoundEntry::close() { void SoundEntry::play() { if (!_stream) { - warning("[SoundEntry::play] stream has been disposed"); + error("[SoundEntry::play] stream has been disposed"); return; } -- cgit v1.2.3 From d8acba294d7898ffff70ea679579cd8ae5eab0a7 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Fri, 27 Jul 2012 16:07:23 -0400 Subject: LASTEXPRESS: Add IgnoreSubtype option to AnimFrame --- engines/lastexpress/data/animation.cpp | 2 +- engines/lastexpress/data/sequence.cpp | 2 +- engines/lastexpress/data/sequence.h | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp index ce42acb8fe..7618259e69 100644 --- a/engines/lastexpress/data/animation.cpp +++ b/engines/lastexpress/data/animation.cpp @@ -230,7 +230,7 @@ AnimFrame *Animation::processChunkFrame(Common::SeekableReadStream *in, const Ch i.read(str, false); // Decode the frame - AnimFrame *f = new AnimFrame(str, i); + AnimFrame *f = new AnimFrame(str, i, true); // Delete the temporary chunk buffer delete str; diff --git a/engines/lastexpress/data/sequence.cpp b/engines/lastexpress/data/sequence.cpp index e1e0d9bee8..a5bcba84cd 100644 --- a/engines/lastexpress/data/sequence.cpp +++ b/engines/lastexpress/data/sequence.cpp @@ -76,7 +76,7 @@ void FrameInfo::read(Common::SeekableReadStream *in, bool isSequence) { // AnimFrame -AnimFrame::AnimFrame(Common::SeekableReadStream *in, const FrameInfo &f) : _palette(NULL) { +AnimFrame::AnimFrame(Common::SeekableReadStream *in, const FrameInfo &f, bool ignoreSubtype) : _palette(NULL), _ignoreSubtype(ignoreSubtype) { _palSize = 1; // TODO: use just the needed rectangle _image.create(640, 480, Graphics::PixelFormat::createFormatCLUT8()); diff --git a/engines/lastexpress/data/sequence.h b/engines/lastexpress/data/sequence.h index 9987eae48e..610a55cebf 100644 --- a/engines/lastexpress/data/sequence.h +++ b/engines/lastexpress/data/sequence.h @@ -49,8 +49,9 @@ byte {1} - Compression type byte {1} - Subtype (determines which set of decompression functions will be called) => 0, 1, 2, 3 byte {1} - Unknown + byte {1} - Keep previous frame while drawing + byte {1} - Unknown byte {1} - Unknown - uint16 {2} - Unknown byte {1} - Sound action byte {1} - Unknown uint32 {4} - positionId @@ -129,7 +130,7 @@ struct FrameInfo { class AnimFrame : public Drawable { public: - AnimFrame(Common::SeekableReadStream *in, const FrameInfo &f); + AnimFrame(Common::SeekableReadStream *in, const FrameInfo &f, bool ignoreSubtype = false); ~AnimFrame(); Common::Rect draw(Graphics::Surface *s); @@ -146,6 +147,7 @@ private: uint16 _palSize; uint16 *_palette; Common::Rect _rect; + bool _ignoreSubtype; }; class Sequence { -- cgit v1.2.3 From 839ad1303f67b83f4383fb448463363e1e9f64fc Mon Sep 17 00:00:00 2001 From: Littleboy Date: Fri, 27 Jul 2012 19:58:51 -0400 Subject: LASTEXPRESS: Fix some formatting issues --- engines/lastexpress/entities/entity.h | 26 +++++++++++++------------- engines/lastexpress/game/entities.cpp | 2 +- engines/lastexpress/game/scenes.cpp | 2 +- engines/lastexpress/sound/sound.cpp | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index e2514a6146..0b1db137a6 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -275,7 +275,7 @@ struct SavePoint; class EntityData : Common::Serializable { public: - struct EntityParameters : Common::Serializable{ + struct EntityParameters : Common::Serializable { virtual ~EntityParameters() {} virtual Common::String toString() = 0; @@ -1079,7 +1079,7 @@ protected: _data->setCurrentCallback(index); RESET_PARAMS(_data, EntityData::EntityParametersIIII); - EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); + EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters(); params->param1 = (unsigned int)param1; _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); @@ -1093,7 +1093,7 @@ protected: _data->setCurrentCallback(index); RESET_PARAMS(_data, EntityData::EntityParametersIIII); - EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); + EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters(); params->param1 = param1; params->param2 = param2; @@ -1108,7 +1108,7 @@ protected: _data->setCurrentCallback(index); RESET_PARAMS(_data, EntityData::EntityParametersIIII); - EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII*)_data->getCurrentParameters(); + EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters(); params->param1 = param1; params->param2 = param2; params->param3 = param3; @@ -1124,7 +1124,7 @@ protected: _data->setCurrentCallback(index); RESET_PARAMS(_data, EntityData::EntityParametersSIIS); - EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); + EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters(); strncpy((char *)¶ms->seq1, seq1, 12); params->param4 = param4; @@ -1139,7 +1139,7 @@ protected: _data->setCurrentCallback(index); RESET_PARAMS(_data, EntityData::EntityParametersSIIS); - EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); + EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters(); strncpy((char *)¶ms->seq1, seq1, 12); params->param4 = param4; params->param5 = param5; @@ -1155,7 +1155,7 @@ protected: _data->setCurrentCallback(index); RESET_PARAMS(_data, EntityData::EntityParametersSIII); - EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII*)_data->getCurrentParameters(); + EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII *)_data->getCurrentParameters(); strncpy((char *)¶ms->seq, seq, 12); params->param4 = param4; params->param5 = param5; @@ -1172,7 +1172,7 @@ protected: _data->setCurrentCallback(index); RESET_PARAMS(_data, EntityData::EntityParametersSIIS); - EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); + EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters(); strncpy((char *)¶ms->seq1, seq1, 12); params->param4 = param4; params->param5 = param5; @@ -1189,7 +1189,7 @@ protected: _data->setCurrentCallback(index); RESET_PARAMS(_data, EntityData::EntityParametersSSII); - EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); + EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII *)_data->getCurrentParameters(); strncpy((char *)¶ms->seq1, seq1, 12); strncpy((char *)¶ms->seq2, seq2, 12); params->param7 = param7; @@ -1205,7 +1205,7 @@ protected: _data->setCurrentCallback(index); RESET_PARAMS(_data, EntityData::EntityParametersISII); - EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII*)_data->getCurrentParameters(); + EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII *)_data->getCurrentParameters(); params->param1 = (unsigned int)param1; strncpy((char *)¶ms->seq, seq, 12); @@ -1220,7 +1220,7 @@ protected: _data->setCurrentCallback(index); RESET_PARAMS(_data, EntityData::EntityParametersISSI); - EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI*)_data->getCurrentParameters(); + EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI *)_data->getCurrentParameters(); params->param1 = param1; strncpy((char *)¶ms->seq1, seq1, 12); strncpy((char *)¶ms->seq2, seq2, 12); @@ -1236,7 +1236,7 @@ protected: _data->setCurrentCallback(index); RESET_PARAMS(_data, EntityData::EntityParametersIISI); - EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI*)_data->getCurrentParameters(); + EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI *)_data->getCurrentParameters(); params->param1 = param1; params->param2 = param2; strncpy((char *)¶ms->seq, seq, 12); @@ -1252,7 +1252,7 @@ protected: _data->setCurrentCallback(index); RESET_PARAMS(_data, EntityData::EntityParametersIISS); - EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS*)_data->getCurrentParameters(); + EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS *)_data->getCurrentParameters(); params->param1 = param1; params->param2 = param2; strncpy((char *)¶ms->seq1, seq1, 12); diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp index 29cc7d889c..51db635bed 100644 --- a/engines/lastexpress/game/entities.cpp +++ b/engines/lastexpress/game/entities.cpp @@ -2278,7 +2278,7 @@ label_process_entity: if (getScenes()->checkPosition(kSceneNone, SceneManager::kCheckPositionLookingUp)) { getSavePoints()->push(kEntityPlayer, entity, kActionExcuseMeCath); - } else if (getScenes()->checkPosition(kSceneNone, SceneManager::kCheckPositionLookingDown) || getScenes()->checkCurrentPosition(false)){ + } else if (getScenes()->checkPosition(kSceneNone, SceneManager::kCheckPositionLookingDown) || getScenes()->checkCurrentPosition(false)) { getSavePoints()->push(kEntityPlayer, entity, kActionExcuseMe); if (getScenes()->checkCurrentPosition(false)) diff --git a/engines/lastexpress/game/scenes.cpp b/engines/lastexpress/game/scenes.cpp index 447e8714b0..3cda900757 100644 --- a/engines/lastexpress/game/scenes.cpp +++ b/engines/lastexpress/game/scenes.cpp @@ -489,7 +489,7 @@ bool SceneManager::checkCurrentPosition(bool doCheckOtherCars) const { if (position == 99) return true; - switch (car){ + switch (car) { default: break; diff --git a/engines/lastexpress/sound/sound.cpp b/engines/lastexpress/sound/sound.cpp index 4f6a7b8f93..319f7cd4f4 100644 --- a/engines/lastexpress/sound/sound.cpp +++ b/engines/lastexpress/sound/sound.cpp @@ -674,7 +674,7 @@ const char *SoundManager::getDialogName(EntityIndex entity) const { ////////////////////////////////////////////////////////////////////////// // Letters & Messages ////////////////////////////////////////////////////////////////////////// -void SoundManager::readText(int id){ +void SoundManager::readText(int id) { if (!_queue->isBuffered(kEntityTables4)) return; -- cgit v1.2.3 From 7084f6a46498cb81d0960fe46d44ae17f2784476 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Fri, 27 Jul 2012 20:05:00 -0400 Subject: CONFIGURE: Add MSCV11 handling to ideprojects target --- ports.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports.mk b/ports.mk index 357a7e297a..9a20331924 100644 --- a/ports.mk +++ b/ports.mk @@ -293,6 +293,8 @@ endif @cd $(srcdir)/dists/msvc9 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 9 >/dev/null && git add -f *.sln *.vcproj *.vsprops @echo Creating MSVC10 project files... @cd $(srcdir)/dists/msvc10 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 10 >/dev/null && git add -f *.sln *.vcxproj *.vcxproj.filters *.props + @echo Creating MSVC11 project files... + @cd $(srcdir)/dists/msvc11 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 11 >/dev/null && git add -f *.sln *.vcxproj *.vcxproj.filters *.props @echo @echo All is done. @echo Now run -- cgit v1.2.3 From 42c9b405f1d7a6e4e3a117579a126f290c6d895a Mon Sep 17 00:00:00 2001 From: Littleboy Date: Fri, 27 Jul 2012 23:23:17 -0400 Subject: LASTEXPRESS: Untemplatize setup functions --- engines/lastexpress/entities/entity.cpp | 190 ++++++++++++++++++++++++- engines/lastexpress/entities/entity.h | 242 +++++--------------------------- 2 files changed, 217 insertions(+), 215 deletions(-) diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index aff9445326..4b1fda9c12 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -598,7 +598,49 @@ void Entity::setup(const char *name, uint index) { _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersIIII); + _data->resetCurrentParameters(); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + +void Entity::setupI(const char *name, uint index, uint param1) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%u)", name, param1); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters(); + params->param1 = (unsigned int)param1; + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + +void Entity::setupII(const char *name, uint index, uint param1, uint param2) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%u, %u)", name, param1, param2); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters(); + params->param1 = param1; + params->param2 = param2; + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + +void Entity::setupIII(const char *name, uint index, uint param1, uint param2, uint param3) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%u, %u, %u)", name, param1, param2, param3); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters(); + params->param1 = param1; + params->param2 = param2; + params->param3 = param3; _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); } @@ -608,10 +650,10 @@ void Entity::setupS(const char *name, uint index, const char *seq1) { _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersSIIS); + _data->resetCurrentParameters(); EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS*)_data->getCurrentParameters(); - strncpy((char *)¶ms->seq1, seq1, 12); + strncpy(params->seq1, seq1, 12); _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); } @@ -621,11 +663,147 @@ void Entity::setupSS(const char *name, uint index, const char *seq1, const char _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersSSII); + _data->resetCurrentParameters(); EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII*)_data->getCurrentParameters(); - strncpy((char *)¶ms->seq1, seq1, 12); - strncpy((char *)¶ms->seq2, seq2, 12); + strncpy(params->seq1, seq1, 12); + strncpy(params->seq2, seq2, 12); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + +void Entity::setupSI(const char *name, uint index, const char *seq1, uint param4) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %u)", name, seq1, param4); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters(); + strncpy(params->seq1, seq1, 12); + params->param4 = param4; + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + +void Entity::setupSII(const char *name, uint index, const char *seq1, uint param4, uint param5) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %u, %u)", name, seq1, param4, param5); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters(); + strncpy(params->seq1, seq1, 12); + params->param4 = param4; + params->param5 = param5; + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + +void Entity::setupSIII(const char *name, uint index, const char *seq, uint param4, uint param5, uint param6) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %u, %u, %u)", name, seq, param4, param5, param6); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII *)_data->getCurrentParameters(); + strncpy(params->seq, seq, 12); + params->param4 = param4; + params->param5 = param5; + params->param6 = param6; + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + +void Entity::setupSIIS(const char *name, uint index, const char *seq1, uint param4, uint param5, const char *seq2) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %u, %u, %s)", name, seq1, param4, param5, seq2); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters(); + strncpy(params->seq1, seq1, 12); + params->param4 = param4; + params->param5 = param5; + strncpy(params->seq2, seq2, 12); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + +void Entity::setupSSI(const char *name, uint index, const char *seq1, const char *seq2, uint param7) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %s, %u)", name, seq1, seq2, param7); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII *)_data->getCurrentParameters(); + strncpy(params->seq1, seq1, 12); + strncpy(params->seq2, seq2, 12); + params->param7 = param7; + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + +void Entity::setupIS(const char *name, uint index, uint param1, const char *seq) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%u, %s)", name, param1, seq); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII *)_data->getCurrentParameters(); + params->param1 = (unsigned int)param1; + strncpy(params->seq, seq, 12); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + +void Entity::setupISS(const char *name, uint index, uint param1, const char *seq1, const char *seq2) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%u, %s, %s)", name, param1, seq1, seq2); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI *)_data->getCurrentParameters(); + params->param1 = param1; + strncpy(params->seq1, seq1, 12); + strncpy(params->seq2, seq2, 12); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + +void Entity::setupIIS(const char *name, uint index, uint param1, uint param2, const char *seq) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%u, %u, %s)", name, param1, param2, seq); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI *)_data->getCurrentParameters(); + params->param1 = param1; + params->param2 = param2; + strncpy(params->seq, seq, 12); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); +} + +void Entity::setupIISS(const char *name, uint index, uint param1, uint param2, const char *seq1, const char *seq2) { + debugC(6, kLastExpressDebugLogic, "Entity: %s(%u, %u, %s, %s)", name, param1, param2, seq1, seq2); + + _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); + _data->setCurrentCallback(index); + _data->resetCurrentParameters(); + + EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS *)_data->getCurrentParameters(); + params->param1 = param1; + params->param2 = param2; + strncpy(params->seq1, seq1, 12); + strncpy(params->seq2, seq2, 12); _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); } diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 0b1db137a6..3601f34f6f 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -122,13 +122,6 @@ struct SavePoint; if (!params) \ error("[EXPOSE_PARAMS] Trying to call an entity function with invalid parameters"); \ -#define RESET_PARAMS(data, type) do { \ - EntityData::EntityCallParameters *callParameters = data->getCurrentCallParameters(); \ - callParameters->clear(); \ - for (int i = 0; i < 4; i++) \ - callParameters->parameters[i] = new type(); \ -} while (false) - // function signature without setup (we keep the index for consistency but never use it) #define IMPLEMENT_FUNCTION_NOSETUP(index, class, name) \ void class::name(const SavePoint &savepoint) { \ @@ -154,7 +147,7 @@ struct SavePoint; // setup with one uint parameter #define IMPLEMENT_FUNCTION_I(index, class, name, paramType) \ void class::setup_##name(paramType param1) { \ - Entity::setupI(#class "::setup_" #name, index, param1); \ + Entity::setupI(#class "::setup_" #name, index, param1); \ } \ void class::name(const SavePoint &savepoint) { \ EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ @@ -163,7 +156,7 @@ struct SavePoint; // setup with two uint parameters #define IMPLEMENT_FUNCTION_II(index, class, name, paramType1, paramType2) \ void class::setup_##name(paramType1 param1, paramType2 param2) { \ - Entity::setupII(#class "::setup_" #name, index, param1, param2); \ + Entity::setupII(#class "::setup_" #name, index, param1, param2); \ } \ void class::name(const SavePoint &savepoint) { \ EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ @@ -172,7 +165,7 @@ struct SavePoint; // setup with three uint parameters #define IMPLEMENT_FUNCTION_III(index, class, name, paramType1, paramType2, paramType3) \ void class::setup_##name(paramType1 param1, paramType2 param2, paramType3 param3) { \ - Entity::setupIII(#class "::setup_" #name, index, param1, param2, param3); \ + Entity::setupIII(#class "::setup_" #name, index, param1, param2, param3); \ } \ void class::name(const SavePoint &savepoint) { \ EXPOSE_PARAMS(EntityData::EntityParametersIIII) \ @@ -190,7 +183,7 @@ struct SavePoint; // setup with one char *parameter and one uint #define IMPLEMENT_FUNCTION_SI(index, class, name, paramType2) \ void class::setup_##name(const char *seq1, paramType2 param4) { \ - Entity::setupSI(#class "::setup_" #name, index, seq1, param4); \ + Entity::setupSI(#class "::setup_" #name, index, seq1, param4); \ } \ void class::name(const SavePoint &savepoint) { \ EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ @@ -199,7 +192,7 @@ struct SavePoint; // setup with one char *parameter and two uints #define IMPLEMENT_FUNCTION_SII(index, class, name, paramType2, paramType3) \ void class::setup_##name(const char *seq1, paramType2 param4, paramType3 param5) { \ - Entity::setupSII(#class "::setup_" #name, index, seq1, param4, param5); \ + Entity::setupSII(#class "::setup_" #name, index, seq1, param4, param5); \ } \ void class::name(const SavePoint &savepoint) { \ EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ @@ -208,7 +201,7 @@ struct SavePoint; // setup with one char *parameter and three uints #define IMPLEMENT_FUNCTION_SIII(index, class, name, paramType2, paramType3, paramType4) \ void class::setup_##name(const char *seq, paramType2 param4, paramType3 param5, paramType4 param6) { \ - Entity::setupSIII(#class "::setup_" #name, index, seq, param4, param5, param6); \ + Entity::setupSIII(#class "::setup_" #name, index, seq, param4, param5, param6); \ } \ void class::name(const SavePoint &savepoint) { \ EXPOSE_PARAMS(EntityData::EntityParametersSIII) \ @@ -216,7 +209,7 @@ struct SavePoint; #define IMPLEMENT_FUNCTION_SIIS(index, class, name, paramType2, paramType3) \ void class::setup_##name(const char *seq1, paramType2 param4, paramType3 param5, const char *seq2) { \ - Entity::setupSIIS(#class "::setup_" #name, index, seq1, param4, param5, seq2); \ + Entity::setupSIIS(#class "::setup_" #name, index, seq1, param4, param5, seq2); \ } \ void class::name(const SavePoint &savepoint) { \ EXPOSE_PARAMS(EntityData::EntityParametersSIIS) \ @@ -232,7 +225,7 @@ struct SavePoint; #define IMPLEMENT_FUNCTION_SSI(index, class, name, paramType3) \ void class::setup_##name(const char *seq1, const char *seq2, paramType3 param7) { \ - Entity::setupSSI(#class "::setup_" #name, index, seq1, seq2, param7); \ + Entity::setupSSI(#class "::setup_" #name, index, seq1, seq2, param7); \ } \ void class::name(const SavePoint &savepoint) { \ EXPOSE_PARAMS(EntityData::EntityParametersSSII) \ @@ -240,7 +233,7 @@ struct SavePoint; #define IMPLEMENT_FUNCTION_IS(index, class, name, paramType) \ void class::setup_##name(paramType param1, const char *seq) { \ - Entity::setupIS(#class "::setup_" #name, index, param1, seq); \ + Entity::setupIS(#class "::setup_" #name, index, param1, seq); \ } \ void class::name(const SavePoint &savepoint) { \ EXPOSE_PARAMS(EntityData::EntityParametersISII) \ @@ -248,7 +241,7 @@ struct SavePoint; #define IMPLEMENT_FUNCTION_ISS(index, class, name, paramType) \ void class::setup_##name(paramType param1, const char *seq1, const char *seq2) { \ - Entity::setupISS(#class "::setup_" #name, index, param1, seq1, seq2); \ + Entity::setupISS(#class "::setup_" #name, index, param1, seq1, seq2); \ } \ void class::name(const SavePoint &savepoint) { \ EXPOSE_PARAMS(EntityData::EntityParametersISSI) \ @@ -256,7 +249,7 @@ struct SavePoint; #define IMPLEMENT_FUNCTION_IIS(index, class, name, paramType1, paramType2) \ void class::setup_##name(paramType1 param1, paramType2 param2, const char *seq) { \ - Entity::setupIIS(#class "::setup_" #name, index, param1, param2, seq); \ + Entity::setupIIS(#class "::setup_" #name, index, param1, param2, seq); \ } \ void class::name(const SavePoint &savepoint) { \ EXPOSE_PARAMS(EntityData::EntityParametersIISI) \ @@ -264,7 +257,7 @@ struct SavePoint; #define IMPLEMENT_FUNCTION_IISS(index, class, name, paramType1, paramType2) \ void class::setup_##name(paramType1 param1, paramType2 param2, const char *seq1, const char *seq2) { \ - Entity::setupIISS(#class "::setup_" #name, index, param1, param2, seq1, seq2); \ + Entity::setupIISS(#class "::setup_" #name, index, param1, param2, seq1, seq2); \ } \ void class::name(const SavePoint &savepoint) { \ EXPOSE_PARAMS(EntityData::EntityParametersIISS) \ @@ -842,6 +835,15 @@ public: EntityData() {} + template + void resetCurrentParameters() { + EntityCallParameters *params = &_parameters[_data.currentCall]; + params->clear(); + + for (int i = 0; i < 4; i++) + params->parameters[i] = new T(); + } + EntityCallData *getCallData() { return &_data; } EntityParameters *getParameters(uint callback, byte index) const; @@ -1068,198 +1070,20 @@ protected: // Setup functions ////////////////////////////////////////////////////////////////////////// void setup(const char *name, uint index); + void setupI(const char *name, uint index, uint param1); + void setupII(const char *name, uint index, uint param1, uint param2); + void setupIII(const char *name, uint index, uint param1, uint param2, uint param3); void setupS(const char *name, uint index, const char *seq1); void setupSS(const char *name, uint index, const char *seq1, const char *seq2); - - template - void setupI(const char *name, uint index, T param1) { - debugC(6, kLastExpressDebugLogic, "Entity: %s(%d)", name, param1); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); - _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersIIII); - - EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters(); - params->param1 = (unsigned int)param1; - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); - } - - template - void setupII(const char *name, uint index, T1 param1, T2 param2) { - debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %d)", name, param1, param2); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); - _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersIIII); - - EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters(); - params->param1 = param1; - params->param2 = param2; - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); - } - - template - void setupIII(const char *name, uint index, T1 param1, T2 param2, T3 param3) { - debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %d, %d)", name, param1, param2, param3); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); - _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersIIII); - - EntityData::EntityParametersIIII *params = (EntityData::EntityParametersIIII *)_data->getCurrentParameters(); - params->param1 = param1; - params->param2 = param2; - params->param3 = param3; - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); - } - - template - void setupSI(const char *name, uint index, const char *seq1, T param4) { - debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %d)", name, seq1, param4); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); - _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersSIIS); - - EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters(); - strncpy((char *)¶ms->seq1, seq1, 12); - params->param4 = param4; - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); - } - - template - void setupSII(const char *name, uint index, const char *seq1, T1 param4, T2 param5) { - debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %d, %d)", name, seq1, param4, param5); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); - _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersSIIS); - - EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters(); - strncpy((char *)¶ms->seq1, seq1, 12); - params->param4 = param4; - params->param5 = param5; - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); - } - - template - void setupSIII(const char *name, uint index, const char *seq, T1 param4, T2 param5, T3 param6) { - debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %d, %d, %d)", name, seq, param4, param5, param6); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); - _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersSIII); - - EntityData::EntityParametersSIII *params = (EntityData::EntityParametersSIII *)_data->getCurrentParameters(); - strncpy((char *)¶ms->seq, seq, 12); - params->param4 = param4; - params->param5 = param5; - params->param6 = param6; - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); - } - - template - void setupSIIS(const char *name, uint index, const char *seq1, T1 param4, T2 param5, const char *seq2) { - debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %d, %d, %s)", name, seq1, param4, param5, seq2); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); - _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersSIIS); - - EntityData::EntityParametersSIIS *params = (EntityData::EntityParametersSIIS *)_data->getCurrentParameters(); - strncpy((char *)¶ms->seq1, seq1, 12); - params->param4 = param4; - params->param5 = param5; - strncpy((char *)¶ms->seq2, seq2, 12); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); - } - - template - void setupSSI(const char *name, uint index, const char *seq1, const char *seq2, T param7) { - debugC(6, kLastExpressDebugLogic, "Entity: %s(%s, %s, %d)", name, seq1, seq2, param7); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); - _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersSSII); - - EntityData::EntityParametersSSII *params = (EntityData::EntityParametersSSII *)_data->getCurrentParameters(); - strncpy((char *)¶ms->seq1, seq1, 12); - strncpy((char *)¶ms->seq2, seq2, 12); - params->param7 = param7; - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); - } - - template - void setupIS(const char *name, uint index, T param1, const char *seq) { - debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %s)", name, param1, seq); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); - _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersISII); - - EntityData::EntityParametersISII *params = (EntityData::EntityParametersISII *)_data->getCurrentParameters(); - params->param1 = (unsigned int)param1; - strncpy((char *)¶ms->seq, seq, 12); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); - } - - template - void setupISS(const char *name, uint index, T param1, const char *seq1, const char *seq2) { - debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %s, %s)", name, param1, seq1, seq2); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); - _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersISSI); - - EntityData::EntityParametersISSI *params = (EntityData::EntityParametersISSI *)_data->getCurrentParameters(); - params->param1 = param1; - strncpy((char *)¶ms->seq1, seq1, 12); - strncpy((char *)¶ms->seq2, seq2, 12); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); - } - - template - void setupIIS(const char *name, uint index, T1 param1, T2 param2, const char *seq) { - debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %d, %s)", name, param1, param2, seq); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); - _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersIISI); - - EntityData::EntityParametersIISI *params = (EntityData::EntityParametersIISI *)_data->getCurrentParameters(); - params->param1 = param1; - params->param2 = param2; - strncpy((char *)¶ms->seq, seq, 12); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); - } - - template - void setupIISS(const char *name, uint index, T1 param1, T2 param2, const char *seq1, const char *seq2) { - debugC(6, kLastExpressDebugLogic, "Entity: %s(%d, %d, %s, %s)", name, param1, param2, seq1, seq2); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->setCallback(_entityIndex, _callbacks[index]); - _data->setCurrentCallback(index); - RESET_PARAMS(_data, EntityData::EntityParametersIISS); - - EntityData::EntityParametersIISS *params = (EntityData::EntityParametersIISS *)_data->getCurrentParameters(); - params->param1 = param1; - params->param2 = param2; - strncpy((char *)¶ms->seq1, seq1, 12); - strncpy((char *)¶ms->seq2, seq2, 12); - - _engine->getGameLogic()->getGameState()->getGameSavePoints()->call(_entityIndex, _entityIndex, kActionDefault); - } + void setupSI(const char *name, uint index, const char *seq1, uint param4); + void setupSII(const char *name, uint index, const char *seq1, uint param4, uint param5); + void setupSIII(const char *name, uint index, const char *seq, uint param4, uint param5, uint param6); + void setupSIIS(const char *name, uint index, const char *seq1, uint param4, uint param5, const char *seq2); + void setupSSI(const char *name, uint index, const char *seq1, const char *seq2, uint param7); + void setupIS(const char *name, uint index, uint param1, const char *seq); + void setupISS(const char *name, uint index, uint param1, const char *seq1, const char *seq2); + void setupIIS(const char *name, uint index, uint param1, uint param2, const char *seq); + void setupIISS(const char *name, uint index, uint param1, uint param2, const char *seq1, const char *seq2); ////////////////////////////////////////////////////////////////////////// // Helper functions -- cgit v1.2.3 From 1bfd55535fc4b1e25bfeafbaf1bfcb6a3443a40e Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sat, 28 Jul 2012 00:58:34 -0400 Subject: LASTEXPRESS: Disable sound filter reset on each decoded block The filter id should be computed from the sound entry status for each decoded block. The current code was resulting in blocks being skipped. --- engines/lastexpress/data/snd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/lastexpress/data/snd.cpp b/engines/lastexpress/data/snd.cpp index 51d0815c1e..a77e4a06c6 100644 --- a/engines/lastexpress/data/snd.cpp +++ b/engines/lastexpress/data/snd.cpp @@ -378,7 +378,7 @@ public: // Get current filter _currentFilterId = _nextFilterId; - _nextFilterId = -1; + //_nextFilterId = -1; // FIXME: the filter id should be recomputed based on the sound entry status for each block // No filter: skip decoding if (_currentFilterId == -1) -- cgit v1.2.3 From 7bf0bfb12297f9e867090586baf60aba0b872896 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sat, 28 Jul 2012 17:51:43 -0400 Subject: LASTEXPRESS: Implement menu egg blinking --- engines/lastexpress/game/inventory.cpp | 75 +++++++++++++++++++--------------- engines/lastexpress/game/inventory.h | 12 ++---- engines/lastexpress/game/logic.cpp | 2 +- 3 files changed, 46 insertions(+), 43 deletions(-) diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp index a36553c768..52c00ece31 100644 --- a/engines/lastexpress/game/inventory.cpp +++ b/engines/lastexpress/game/inventory.cpp @@ -28,6 +28,7 @@ #include "lastexpress/game/entities.h" #include "lastexpress/game/logic.h" +#include "lastexpress/game/savegame.h" #include "lastexpress/game/scenes.h" #include "lastexpress/game/state.h" @@ -45,7 +46,7 @@ namespace LastExpress { Inventory::Inventory(LastExpressEngine *engine) : _engine(engine), _selectedItem(kItemNone), _highlightedItemIndex(0), _itemsShown(0), - _showingHourGlass(false), _blinkingEgg(false), _blinkingTime(0), _blinkingInterval(_defaultBlinkingInterval), _blinkingBrightness(1), + _showingHourGlass(false), _blinkingDirection(1), _blinkingBrightness(0), _useMagnifier(false), _portraitHighlighted(false), _isOpened(false), _eggHightlighted(false), _itemScene(NULL) { //_inventoryRect = Common::Rect(0, 0, 32, 32); @@ -163,13 +164,11 @@ void Inventory::handleMouseEvent(const Common::Event &ev) { getMenu()->show(true, kSavegameTypeIndex, 0); - } else if (ev.type == Common::EVENT_RBUTTONDOWN) { - if (getGlobalTimer()) { - if (getSoundQueue()->isBuffered("TIMER")) - getSoundQueue()->removeFromQueue("TIMER"); + } else if (ev.type == Common::EVENT_RBUTTONDOWN && getGlobalTimer()) { + if (getSoundQueue()->isBuffered("TIMER")) + getSoundQueue()->removeFromQueue("TIMER"); - setGlobalTimer(900); - } + setGlobalTimer(900); } } @@ -181,7 +180,7 @@ void Inventory::handleMouseEvent(const Common::Event &ev) { if (_highlightedItemIndex) drawHighlight(_highlightedItemIndex, true); } else { - // The user released the mouse button, we need to update the inventory state (clear hightlight and items) + // The user released the mouse button, we need to update the inventory state (clear highlight and items) drawItem((CursorStyle)getProgress().portrait, 0, 0, 1); _engine->getGraphicsManager()->clear(GraphicsManager::kBackgroundInventory, Common::Rect(0, 44, 32, (int16)(40 * _itemsShown + 40))); _isOpened = false; @@ -227,12 +226,11 @@ void Inventory::handleMouseEvent(const Common::Event &ev) { if (getFlags()->mouseLeftPressed) { if (getState()->sceneUseBackup) { - if (getState()->sceneBackup2 - && getFirstExaminableItem() == _selectedItem) { - SceneIndex sceneIndex = getState()->sceneBackup2; - getState()->sceneBackup2 = kSceneNone; + if (getState()->sceneBackup2 && getFirstExaminableItem() == _selectedItem) { + SceneIndex sceneIndex = getState()->sceneBackup2; + getState()->sceneBackup2 = kSceneNone; - getScenes()->loadScene(sceneIndex); + getScenes()->loadScene(sceneIndex); } } else { getState()->sceneBackup = getState()->scene; @@ -622,37 +620,48 @@ void Inventory::drawEgg() const { } // Blinking egg: we need to blink the egg for delta time, with the blinking getting faster until it's always lit. -void Inventory::drawBlinkingEgg() { +void Inventory::drawBlinkingEgg(uint ticks) { + uint globalTimer = getGlobalTimer(); + uint timerValue = (getProgress().jacket == kJacketGreen) ? 450 : 225; - warning("[Inventory::drawBlinkingEgg] Blinking not implemented"); + if (globalTimer == timerValue || globalTimer == 900) { + _blinkingBrightness = 0; + _blinkingDirection = 1; + } - //// TODO show egg (with or without mouseover) + globalTimer = globalTimer <= ticks ? 0 : globalTimer - ticks; + setGlobalTimer(globalTimer); - //// Play timer sound - //if (getGlobalTimer() < 90) { - // if (getGlobalTimer() + ticks >= 90) - // getSound()->playSoundWithSubtitles("TIMER.SND", 50331664, kEntityPlayer); + if (getFlags()->flag_0 + || (globalTimer % 5) == 0 + || (globalTimer <= 500 && (globalTimer % ((globalTimer + 100) / 100)) == 0)) + blinkEgg(); - // if (getSoundQueue()->isBuffered("TIMER")) - // setGlobalTimer(0); - //} + if (globalTimer < 90) { + if ((globalTimer + ticks) >= 90) + getSound()->playSoundWithSubtitles("TIMER", (SoundFlag)(kFlagType13|kFlagDefault), kEntityPlayer); - //// Restore egg to standard brightness - //if (!getGlobalTimer()) { - // - //} + if (!getSoundQueue()->isBuffered("TIMER")) + setGlobalTimer(0); + } + if (globalTimer == 0) { + drawItem((CursorStyle)(getMenu()->getGameId() + 39), 608, 448, _menuEggRect.contains(getCoords()) ? 1 : -1); - //drawItem(608, 448, getMenu()->getGameId() + 39, _blinkingBrightness) + askForRedraw(); - //// TODO if delta time > _blinkingInterval, update egg & ask for redraw then adjust blinking time and remaining time - // + getSaveLoad()->saveGame(kSavegameTypeAuto, kEntityChapters, 0); + } +} - //// Reset values and stop blinking - //if (_blinkingTime == 0) - // blinkEgg(false); +void Inventory::blinkEgg() { + drawItem((CursorStyle)(getMenu()->getGameId() + 39), 608, 448, (_blinkingBrightness == 0) ? -1 : _blinkingBrightness); askForRedraw(); + + _blinkingBrightness += _blinkingDirection; + if (_blinkingBrightness == 0 || _blinkingBrightness == 3) + _blinkingDirection = -_blinkingDirection; } void Inventory::drawItem(CursorStyle id, uint16 x, uint16 y, int16 brightnessIndex) const { diff --git a/engines/lastexpress/game/inventory.h b/engines/lastexpress/game/inventory.h index 15dd29053d..b1019a43c6 100644 --- a/engines/lastexpress/game/inventory.h +++ b/engines/lastexpress/game/inventory.h @@ -106,11 +106,10 @@ public: // UI Control void show(); - void blinkEgg(bool enabled); void showHourGlass() const; void setPortrait(InventoryItem item) const; void drawEgg() const; - void drawBlinkingEgg(); + void drawBlinkingEgg(uint ticks = 1); // Handle inventory UI events. void handleMouseEvent(const Common::Event &ev); @@ -133,8 +132,6 @@ public: Common::String toString(); private: - static const uint32 _defaultBlinkingInterval = 250; ///< Default blinking interval in ms - LastExpressEngine *_engine; InventoryEntry _entries[32]; @@ -144,9 +141,7 @@ private: uint32 _itemsShown; bool _showingHourGlass; - bool _blinkingEgg; - uint32 _blinkingTime; - uint32 _blinkingInterval; + int16 _blinkingDirection; uint16 _blinkingBrightness; // Flags @@ -157,8 +152,6 @@ private: Scene *_itemScene; - // Important rects - //Common::Rect _inventoryRect; Common::Rect _menuEggRect; Common::Rect _selectedItemRect; @@ -173,6 +166,7 @@ private: bool isItemSceneParameter(InventoryItem item) const; void drawItem(CursorStyle id, uint16 x, uint16 y, int16 brighnessIndex = -1) const; + void blinkEgg(); void drawSelectedItem(); void clearSelectedItem() const; diff --git a/engines/lastexpress/game/logic.cpp b/engines/lastexpress/game/logic.cpp index 795f165766..135b7d3480 100644 --- a/engines/lastexpress/game/logic.cpp +++ b/engines/lastexpress/game/logic.cpp @@ -313,7 +313,7 @@ void Logic::eventTick(const Common::Event &) { ////////////////////////////////////////////////////////////////////////// // Draw the blinking egg if needed if (getGlobalTimer() && !getFlags()->shouldDrawEggOrHourGlass) - getInventory()->drawBlinkingEgg(); + getInventory()->drawBlinkingEgg(ticks); ////////////////////////////////////////////////////////////////////////// // Adjust time and save game if needed -- cgit v1.2.3 From 5fcf8c268167667c88a977ad243a7582bbf412e5 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 29 Jul 2012 16:41:51 +0200 Subject: DOCS: Replace tab character with spaces in our README. --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 8d4ca4bc22..bbca0ec0cd 100644 --- a/README +++ b/README @@ -2125,7 +2125,7 @@ Lands of Lore: The Throne of Chaos adds the following non-standard keywords: Space Quest IV CD adds the following non-standard keyword: silver_cursors bool If true, an alternate set of silver mouse cursors - is used instead of the original golden ones + is used instead of the original golden ones Simon the Sorcerer 1 and 2 add the following non-standard keywords: -- cgit v1.2.3 From dd10e7191e4b373513e5a6fa73daa6312bd81f62 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 29 Jul 2012 12:30:34 -0400 Subject: VIDEO: Move Track's start()/stop() functions to AudioTrack --- video/video_decoder.cpp | 26 ++++++++++++++------------ video/video_decoder.h | 22 ++++++++++------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 131c86fdb8..84ce8144a0 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -268,7 +268,7 @@ bool AdvancedVideoDecoder::rewind() { // Stop all tracks so they can be rewound if (isPlaying()) - stopAllTracks(); + stopAudio(); for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) if (!(*it)->rewind()) @@ -276,7 +276,7 @@ bool AdvancedVideoDecoder::rewind() { // Now that we've rewound, start all tracks again if (isPlaying()) - startAllTracks(); + startAudio(); _audioStartOffset = 0; _startTime = g_system->getMillis(); @@ -303,7 +303,7 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) { // Stop all tracks so they can be seeked if (isPlaying()) - stopAllTracks(); + stopAudio(); for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) if (!(*it)->seek(time)) @@ -311,7 +311,7 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) { // Now that we've seeked, start all tracks again if (isPlaying()) - startAllTracks(); + startAudio(); _audioStartOffset = time; _startTime = g_system->getMillis() - time.msecs(); @@ -332,7 +332,7 @@ void AdvancedVideoDecoder::start() { if (_needsRewind) rewind(); - startAllTracks(); + startAudio(); } void AdvancedVideoDecoder::stop() { @@ -346,7 +346,7 @@ void AdvancedVideoDecoder::stop() { _dirtyPalette = false; _needsUpdate = false; - stopAllTracks(); + stopAudio(); // Also reset the pause state. _pauseLevel = 0; @@ -532,8 +532,8 @@ void AdvancedVideoDecoder::addTrack(Track *track) { track->pause(true); // Start the track if we're playing - if (isPlaying()) - track->start(); + if (isPlaying() && track->getTrackType() == Track::kTrackTypeAudio) + ((AudioTrack *)track)->start(); } bool AdvancedVideoDecoder::addStreamFileTrack(const Common::String &baseName) { @@ -607,14 +607,16 @@ const AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack return bestTrack; } -void AdvancedVideoDecoder::startAllTracks() { +void AdvancedVideoDecoder::startAudio() { for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) - (*it)->start(); + if ((*it)->getTrackType() == Track::kTrackTypeAudio) + ((AudioTrack *)*it)->start(); } -void AdvancedVideoDecoder::stopAllTracks() { +void AdvancedVideoDecoder::stopAudio() { for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) - (*it)->stop(); + if ((*it)->getTrackType() == Track::kTrackTypeAudio) + ((AudioTrack *)*it)->stop(); } ////////////////////////////////////////////// diff --git a/video/video_decoder.h b/video/video_decoder.h index 3f5dc2c2ff..ad9825cb25 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -446,16 +446,6 @@ protected: */ virtual bool seek(const Audio::Timestamp &time) { return false; } - /** - * Start playback of the track. - */ - virtual void start() {} - - /** - * Stop playback of the track. - */ - virtual void stop() {} - /** * Set the pause status of the track. */ @@ -578,7 +568,15 @@ protected: TrackType getTrackType() const { return kTrackTypeAudio; } virtual bool endOfTrack() const; + + /** + * Start playing this track + */ void start(); + + /** + * Stop playing this track + */ void stop(); /** @@ -785,8 +783,8 @@ private: Graphics::PixelFormat _defaultHighColorFormat; // Internal helper functions - void stopAllTracks(); - void startAllTracks(); + void stopAudio(); + void startAudio(); }; /** -- cgit v1.2.3 From e58724a180b965e16eec816fd6bcb2bb71607307 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 29 Jul 2012 14:27:03 -0400 Subject: MOHAWK: Remove Myst ME Macintosh "support" The Mac version of Myst ME is actually not Mohawk and is instead closer to the engine used in Myst3. --- engines/mohawk/detection_tables.h | 18 ----- engines/mohawk/myst.cpp | 44 ++---------- engines/mohawk/myst_graphics.cpp | 136 ++++++++--------------------------- engines/mohawk/myst_graphics.h | 15 ---- engines/mohawk/myst_stacks/intro.cpp | 25 ++----- 5 files changed, 43 insertions(+), 195 deletions(-) diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h index 5acc1bb179..55814af1c3 100644 --- a/engines/mohawk/detection_tables.h +++ b/engines/mohawk/detection_tables.h @@ -203,24 +203,6 @@ static const MohawkGameDescription gameDescriptions[] = { 0, }, - // Myst Masterpiece Edition - // English Windows - // From clone2727 - { - { - "myst", - "Masterpiece Edition", - AD_ENTRY1("MYST.DAT", "c4cae9f143b5947262e6cb2397e1617e"), - Common::EN_ANY, - Common::kPlatformMacintosh, - ADGF_UNSTABLE, - GUIO1(GUIO_NOASPECT) - }, - GType_MYST, - GF_ME, - 0, - }, - // Myst Masterpiece Edition // German Windows // From DrMcCoy (Included in "Myst: Die Trilogie") diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp index 0efd412bd0..9c0e642203 100644 --- a/engines/mohawk/myst.cpp +++ b/engines/mohawk/myst.cpp @@ -98,11 +98,6 @@ MohawkEngine_Myst::MohawkEngine_Myst(OSystem *syst, const MohawkGameDescription _view.soundListVolume = NULL; _view.scriptResCount = 0; _view.scriptResources = NULL; - - if ((getFeatures() & GF_ME) && getPlatform() == Common::kPlatformMacintosh) { - const Common::FSNode gameDataDir(ConfMan.get("path")); - SearchMan.addSubDirectoryMatching(gameDataDir, "CD Data"); - } } MohawkEngine_Myst::~MohawkEngine_Myst() { @@ -205,11 +200,6 @@ static const char *mystFiles[] = { // qtw/myst/libelev.mov: libup.mov is basically the same with sound Common::String MohawkEngine_Myst::wrapMovieFilename(const Common::String &movieName, uint16 stack) { - // The Macintosh release of Myst ME stores its videos in a different folder - // WORKAROUND: The gear rotation videos are not in the CD Data folder. See above comments. - if ((getFeatures() & GF_ME) && getPlatform() == Common::kPlatformMacintosh && !movieName.matchString("cl1wg?")) - return Common::String("CD Data/m/") + movieName + ".mov"; - Common::String prefix; switch (stack) { @@ -498,52 +488,32 @@ void MohawkEngine_Myst::changeToStack(uint16 stack, uint16 card, uint16 linkSrcS if (!_mhk[0]->openFile(mystFiles[_curStack])) error("Could not open %s", mystFiles[_curStack]); - if (getPlatform() == Common::kPlatformMacintosh) - _gfx->loadExternalPictureFile(_curStack); - _runExitScript = false; // Clear the resource cache and the image cache _cache.clear(); _gfx->clearCache(); - // Play Flyby Entry Movie on Masterpiece Edition. The Macintosh version is currently hooked - // up to the Cinepak versions of the video (the 'c' suffix) until the SVQ1 decoder is completed. + // Play Flyby Entry Movie on Masterpiece Edition. const char *flyby = 0; if (getFeatures() & GF_ME) { switch (_curStack) { case kSeleniticStack: - if (getPlatform() == Common::kPlatformMacintosh) - flyby = "FLY_SEc"; - else - flyby = "selenitic flyby"; + flyby = "selenitic flyby"; break; case kStoneshipStack: - if (getPlatform() == Common::kPlatformMacintosh) - flyby = "FLY_STc"; - else - flyby = "stoneship flyby"; + flyby = "stoneship flyby"; break; // Myst Flyby Movie not used in Original Masterpiece Edition Engine case kMystStack: - if (_tweaksEnabled) { - if (getPlatform() == Common::kPlatformMacintosh) - flyby = "FLY_MYc"; - else - flyby = "myst flyby"; - } + if (_tweaksEnabled) + flyby = "myst flyby"; break; case kMechanicalStack: - if (getPlatform() == Common::kPlatformMacintosh) - flyby = "FLY_MEc"; - else - flyby = "mech age flyby"; + flyby = "mech age flyby"; break; case kChannelwoodStack: - if (getPlatform() == Common::kPlatformMacintosh) - flyby = "FLY_CHc"; - else - flyby = "channelwood flyby"; + flyby = "channelwood flyby"; break; default: break; diff --git a/engines/mohawk/myst_graphics.cpp b/engines/mohawk/myst_graphics.cpp index ae80dd5538..2df0f7e6ba 100644 --- a/engines/mohawk/myst_graphics.cpp +++ b/engines/mohawk/myst_graphics.cpp @@ -49,8 +49,6 @@ MystGraphics::MystGraphics(MohawkEngine_Myst* vm) : GraphicsManager(), _vm(vm) { if (_pixelFormat.bytesPerPixel == 1) error("Myst requires greater than 256 colors to run"); - _pictureFile.entries = NULL; - // Initialize our buffer _backBuffer = new Graphics::Surface(); _backBuffer->create(_vm->_system->getWidth(), _vm->_system->getHeight(), _pixelFormat); @@ -61,122 +59,50 @@ MystGraphics::MystGraphics(MohawkEngine_Myst* vm) : GraphicsManager(), _vm(vm) { MystGraphics::~MystGraphics() { delete _bmpDecoder; - delete[] _pictureFile.entries; _backBuffer->free(); delete _backBuffer; } -static const char *s_picFileNames[] = { - "CHpics", - "", - "", - "DUpics", - "INpics", - "", - "MEpics", - "MYpics", - "SEpics", - "", - "", - "STpics" -}; - -void MystGraphics::loadExternalPictureFile(uint16 stack) { - if (_vm->getPlatform() != Common::kPlatformMacintosh) - return; - - if (_pictureFile.picFile.isOpen()) - _pictureFile.picFile.close(); - delete[] _pictureFile.entries; - - if (!scumm_stricmp(s_picFileNames[stack], "")) - return; - - if (!_pictureFile.picFile.open(s_picFileNames[stack])) - error ("Could not open external picture file \'%s\'", s_picFileNames[stack]); - - _pictureFile.pictureCount = _pictureFile.picFile.readUint32BE(); - _pictureFile.entries = new PictureFile::PictureEntry[_pictureFile.pictureCount]; - - for (uint32 i = 0; i < _pictureFile.pictureCount; i++) { - _pictureFile.entries[i].offset = _pictureFile.picFile.readUint32BE(); - _pictureFile.entries[i].size = _pictureFile.picFile.readUint32BE(); - _pictureFile.entries[i].id = _pictureFile.picFile.readUint16BE(); - _pictureFile.entries[i].type = _pictureFile.picFile.readUint16BE(); - _pictureFile.entries[i].width = _pictureFile.picFile.readUint16BE(); - _pictureFile.entries[i].height = _pictureFile.picFile.readUint16BE(); +MohawkSurface *MystGraphics::decodeImage(uint16 id) { + // We need to grab the image from the current stack archive, however, we don't know + // if it's a PICT or WDIB resource. If it's Myst ME it's most likely a PICT, and if it's + // original it's definitely a WDIB. However, Myst ME throws us another curve ball in + // that PICT resources can contain WDIB's instead of PICT's. + Common::SeekableReadStream *dataStream = NULL; + + if (_vm->getFeatures() & GF_ME && _vm->hasResource(ID_PICT, id)) { + // The PICT resource exists. However, it could still contain a MystBitmap + // instead of a PICT image... + dataStream = _vm->getResource(ID_PICT, id); + } else { + // No PICT, so the WDIB must exist. Let's go grab it. + dataStream = _vm->getResource(ID_WDIB, id); } -} -MohawkSurface *MystGraphics::decodeImage(uint16 id) { - MohawkSurface *mhkSurface = 0; + bool isPict = false; - // Myst ME uses JPEG/PICT images instead of compressed Windows Bitmaps for room images, - // though there are a few weird ones that use that format. For further nonsense with images, - // the Macintosh version stores images in external "picture files." We check them before - // going to check for a PICT resource. - if (_vm->getFeatures() & GF_ME && _vm->getPlatform() == Common::kPlatformMacintosh && _pictureFile.picFile.isOpen()) { - for (uint32 i = 0; i < _pictureFile.pictureCount; i++) - if (_pictureFile.entries[i].id == id) { - if (_pictureFile.entries[i].type == 0) { - Graphics::JPEGDecoder jpeg; - Common::SeekableSubReadStream subStream(&_pictureFile.picFile, _pictureFile.entries[i].offset, _pictureFile.entries[i].offset + _pictureFile.entries[i].size); - - if (!jpeg.loadStream(subStream)) - error("Could not decode Myst ME Mac JPEG"); - - mhkSurface = new MohawkSurface(jpeg.getSurface()->convertTo(_pixelFormat)); - } else if (_pictureFile.entries[i].type == 1) { - Graphics::PICTDecoder pict; - Common::SeekableSubReadStream subStream(&_pictureFile.picFile, _pictureFile.entries[i].offset, _pictureFile.entries[i].offset + _pictureFile.entries[i].size); - - if (!pict.loadStream(subStream)) - error("Could not decode Myst ME Mac PICT"); - - mhkSurface = new MohawkSurface(pict.getSurface()->convertTo(_pixelFormat)); - } else - error ("Unknown Picture File type %d", _pictureFile.entries[i].type); - break; - } + if (_vm->getFeatures() & GF_ME) { + // Here we detect whether it's really a PICT or a WDIB. Since a MystBitmap + // would be compressed, there's no way to detect for the BM without a hack. + // So, we search for the PICT version opcode for detection. + dataStream->seek(512 + 10); // 512 byte pict header + isPict = (dataStream->readUint32BE() == 0x001102FF); + dataStream->seek(0); } - // We're not using the external Mac files, so it's time to delve into the main Mohawk - // archives. However, we still don't know if it's a PICT or WDIB resource. If it's Myst - // ME it's most likely a PICT, and if it's original it's definitely a WDIB. However, - // Myst ME throws us another curve ball in that PICT resources can contain WDIB's instead - // of PICT's. - if (!mhkSurface) { - bool isPict = false; - Common::SeekableReadStream *dataStream = NULL; - - if (_vm->getFeatures() & GF_ME && _vm->hasResource(ID_PICT, id)) { - // The PICT resource exists. However, it could still contain a MystBitmap - // instead of a PICT image... - dataStream = _vm->getResource(ID_PICT, id); - } else // No PICT, so the WDIB must exist. Let's go grab it. - dataStream = _vm->getResource(ID_WDIB, id); - - if (_vm->getFeatures() & GF_ME) { - // Here we detect whether it's really a PICT or a WDIB. Since a MystBitmap - // would be compressed, there's no way to detect for the BM without a hack. - // So, we search for the PICT version opcode for detection. - dataStream->seek(512 + 10); // 512 byte pict header - isPict = (dataStream->readUint32BE() == 0x001102FF); - dataStream->seek(0); - } + MohawkSurface *mhkSurface = 0; - if (isPict) { - Graphics::PICTDecoder pict; + if (isPict) { + Graphics::PICTDecoder pict; - if (!pict.loadStream(*dataStream)) - error("Could not decode Myst ME PICT"); + if (!pict.loadStream(*dataStream)) + error("Could not decode Myst ME PICT"); - mhkSurface = new MohawkSurface(pict.getSurface()->convertTo(_pixelFormat)); - } else { - mhkSurface = _bmpDecoder->decodeImage(dataStream); - mhkSurface->convertToTrueColor(); - } + mhkSurface = new MohawkSurface(pict.getSurface()->convertTo(_pixelFormat)); + } else { + mhkSurface = _bmpDecoder->decodeImage(dataStream); + mhkSurface->convertToTrueColor(); } assert(mhkSurface); diff --git a/engines/mohawk/myst_graphics.h b/engines/mohawk/myst_graphics.h index 20fd46c5b9..de8fe521e6 100644 --- a/engines/mohawk/myst_graphics.h +++ b/engines/mohawk/myst_graphics.h @@ -43,7 +43,6 @@ public: MystGraphics(MohawkEngine_Myst*); ~MystGraphics(); - void loadExternalPictureFile(uint16 stack); void copyImageSectionToScreen(uint16 image, Common::Rect src, Common::Rect dest); void copyImageSectionToBackBuffer(uint16 image, Common::Rect src, Common::Rect dest); void copyImageToScreen(uint16 image, Common::Rect dest); @@ -66,20 +65,6 @@ private: MohawkEngine_Myst *_vm; MystBitmap *_bmpDecoder; - struct PictureFile { - uint32 pictureCount; - struct PictureEntry { - uint32 offset; - uint32 size; - uint16 id; - uint16 type; - uint16 width; - uint16 height; - } *entries; - - Common::File picFile; - } _pictureFile; - Graphics::Surface *_backBuffer; Graphics::PixelFormat _pixelFormat; Common::Rect _viewport; diff --git a/engines/mohawk/myst_stacks/intro.cpp b/engines/mohawk/myst_stacks/intro.cpp index a5f608dbbf..545b97d956 100644 --- a/engines/mohawk/myst_stacks/intro.cpp +++ b/engines/mohawk/myst_stacks/intro.cpp @@ -100,12 +100,8 @@ void Intro::introMovies_run() { switch (_introStep) { case 0: - // Play the Mattel (or UbiSoft) logo in the Myst ME Mac version - if ((_vm->getFeatures() & GF_ME) && _vm->getPlatform() == Common::kPlatformMacintosh) { - _vm->_video->playMovie(_vm->wrapMovieFilename("mattel", kIntroStack)); - _introStep = 1; - } else - _introStep = 2; + _introStep = 1; + _vm->_video->playMovie(_vm->wrapMovieFilename("broder", kIntroStack)); break; case 1: if (!_vm->_video->isVideoPlaying()) @@ -113,10 +109,7 @@ void Intro::introMovies_run() { break; case 2: _introStep = 3; - if ((_vm->getFeatures() & GF_ME) && _vm->getPlatform() == Common::kPlatformMacintosh) - _vm->_video->playMovie(_vm->wrapMovieFilename("presto", kIntroStack)); - else - _vm->_video->playMovie(_vm->wrapMovieFilename("broder", kIntroStack)); + _vm->_video->playMovie(_vm->wrapMovieFilename("cyanlogo", kIntroStack)); break; case 3: if (!_vm->_video->isVideoPlaying()) @@ -124,21 +117,13 @@ void Intro::introMovies_run() { break; case 4: _introStep = 5; - _vm->_video->playMovie(_vm->wrapMovieFilename("cyanlogo", kIntroStack)); - break; - case 5: - if (!_vm->_video->isVideoPlaying()) - _introStep = 6; - break; - case 6: - _introStep = 7; if (!(_vm->getFeatures() & GF_DEMO)) // The demo doesn't have the intro video _vm->_video->playMovie(_vm->wrapMovieFilename("intro", kIntroStack)); break; - case 7: + case 5: if (!_vm->_video->isVideoPlaying()) - _introStep = 8; + _introStep = 6; break; default: if (_vm->getFeatures() & GF_DEMO) -- cgit v1.2.3 From 3b6398cd40838b7b2679eb597d453e3e81b1e6ef Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Sun, 29 Jul 2012 21:04:53 +0100 Subject: GPH: Clean up initialisation code and start event manager after log files are setup (if needed). --- backends/platform/gph/gph-backend.cpp | 49 +++++++++++++++++++++-------------- backends/platform/gph/gph.h | 9 ++++--- 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/backends/platform/gph/gph-backend.cpp b/backends/platform/gph/gph-backend.cpp index 49a1edf411..485780b472 100644 --- a/backends/platform/gph/gph-backend.cpp +++ b/backends/platform/gph/gph-backend.cpp @@ -20,6 +20,8 @@ * */ +#if defined(GPH_DEVICE) + // Disable symbol overrides so that we can use system headers. #define FORBIDDEN_SYMBOL_ALLOW_ALL @@ -32,8 +34,6 @@ #include "backends/saves/default/default-saves.h" #include "backends/timer/default/default-timer.h" -#include "base/main.h" - #include "common/archive.h" #include "common/config-manager.h" #include "common/debug.h" @@ -64,23 +64,6 @@ void OSystem_GPH::initBackend() { assert(!_inited); - // Create the events manager - if (_eventSource == 0) - _eventSource = new GPHEventSource(); - - // Create the graphics manager - if (_graphicsManager == 0) { - _graphicsManager = new GPHGraphicsManager(_eventSource); - } - - // Create the mixer manager - if (_mixer == 0) { - _mixerManager = new DoubleBufferSDLMixerManager(); - - // Setup and start mixer - _mixerManager->init(); - } - /* Setup default save path to be workingdir/saves */ char savePath[PATH_MAX+1]; @@ -165,16 +148,42 @@ void OSystem_GPH::initBackend() { /* Make sure that aspect ratio correction is enabled on the 1st run to stop users asking me what the 'wasted space' at the bottom is ;-). */ ConfMan.registerDefault("aspect_ratio", true); + ConfMan.registerDefault("fullscreen", true); /* Make sure SDL knows that we have a joystick we want to use. */ ConfMan.setInt("joystick_num", 0); + // Create the events manager + if (_eventSource == 0) + _eventSource = new GPHEventSource(); + + // Create the graphics manager + if (_graphicsManager == 0) { + _graphicsManager = new GPHGraphicsManager(_eventSource); + } + /* Pass to POSIX method to do the heavy lifting */ OSystem_POSIX::initBackend(); _inited = true; } +void OSystem_GPH::initSDL() { + // Check if SDL has not been initialized + if (!_initedSDL) { + + uint32 sdlFlags = SDL_INIT_EVENTTHREAD; + if (ConfMan.hasKey("disable_sdl_parachute")) + sdlFlags |= SDL_INIT_NOPARACHUTE; + + // Initialize SDL (SDL Subsystems are initiliazed in the corresponding sdl managers) + if (SDL_Init(sdlFlags) == -1) + error("Could not initialize SDL: %s", SDL_GetError()); + + _initedSDL = true; + } +} + void OSystem_GPH::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) { /* Setup default extra data paths for engine data files and plugins */ @@ -222,3 +231,5 @@ void OSystem_GPH::quit() { OSystem_POSIX::quit(); } + +#endif diff --git a/backends/platform/gph/gph.h b/backends/platform/gph/gph.h index 80f43f0bab..90a798154f 100644 --- a/backends/platform/gph/gph.h +++ b/backends/platform/gph/gph.h @@ -26,13 +26,11 @@ #if defined(GPH_DEVICE) #include "backends/base-backend.h" -#include "backends/platform/sdl/sdl.h" +#include "backends/platform/sdl/sdl-sys.h" #include "backends/platform/sdl/posix/posix.h" #include "backends/events/gph/gph-events.h" #include "backends/graphics/gph/gph-graphics.h" -#define __GP2XWIZ__ - #ifndef PATH_MAX #define PATH_MAX 255 #endif @@ -45,6 +43,11 @@ public: void addSysArchivesToSearchSet(Common::SearchSet &s, int priority); void initBackend(); void quit(); + +protected: + bool _inited; + bool _initedSDL; + virtual void initSDL(); }; #endif -- cgit v1.2.3 From 9c2018c5a890c5276249f2b93be274a564efd7bb Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Sun, 29 Jul 2012 21:08:46 +0100 Subject: OPENPANDORA: Start event manager after log files are setup (if needed). --- backends/platform/openpandora/op-backend.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/backends/platform/openpandora/op-backend.cpp b/backends/platform/openpandora/op-backend.cpp index b2d53f9fb5..354aa24b24 100644 --- a/backends/platform/openpandora/op-backend.cpp +++ b/backends/platform/openpandora/op-backend.cpp @@ -63,15 +63,6 @@ void OSystem_OP::initBackend() { assert(!_inited); - // Create the events manager - if (_eventSource == 0) - _eventSource = new OPEventSource(); - - // Create the graphics manager - if (_graphicsManager == 0) { - _graphicsManager = new OPGraphicsManager(_eventSource); - } - /* Setup default save path to be workingdir/saves */ char savePath[PATH_MAX+1]; @@ -150,6 +141,15 @@ void OSystem_OP::initBackend() { /* Make sure SDL knows that we have a joystick we want to use. */ ConfMan.setInt("joystick_num", 0); + // Create the events manager + if (_eventSource == 0) + _eventSource = new OPEventSource(); + + // Create the graphics manager + if (_graphicsManager == 0) { + _graphicsManager = new OPGraphicsManager(_eventSource); + } + /* Pass to POSIX method to do the heavy lifting */ OSystem_POSIX::initBackend(); -- cgit v1.2.3 From 53a066d09954c78d783f72690e4d523107926939 Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Sun, 29 Jul 2012 21:11:32 +0100 Subject: GPH: Use SDLPluginProvider not POSIXPluginProvider. --- backends/platform/gph/gph-main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/platform/gph/gph-main.cpp b/backends/platform/gph/gph-main.cpp index 2c43af151f..876de0f358 100644 --- a/backends/platform/gph/gph-main.cpp +++ b/backends/platform/gph/gph-main.cpp @@ -21,7 +21,7 @@ */ #include "backends/platform/gph/gph.h" -#include "backends/plugins/posix/posix-provider.h" +#include "backends/plugins/sdl/sdl-provider.h" #include "base/main.h" #if defined(GPH_DEVICE) @@ -36,7 +36,7 @@ int main(int argc, char *argv[]) { ((OSystem_GPH *)g_system)->init(); #ifdef DYNAMIC_MODULES - PluginManager::instance().addPluginProvider(new POSIXPluginProvider()); + PluginManager::instance().addPluginProvider(new SDLPluginProvider()); #endif // Invoke the actual ScummVM main entry point: -- cgit v1.2.3 From 9a0ba7124fe6faee0d4c89ca10964df18740f105 Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Sun, 29 Jul 2012 21:12:25 +0100 Subject: OPENPANDORA: Cleanup. --- backends/platform/openpandora/op-sdl.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/backends/platform/openpandora/op-sdl.h b/backends/platform/openpandora/op-sdl.h index 8cccbb5f86..1eddad5c4a 100644 --- a/backends/platform/openpandora/op-sdl.h +++ b/backends/platform/openpandora/op-sdl.h @@ -31,8 +31,6 @@ #include "backends/events/openpandora/op-events.h" #include "backends/graphics/openpandora/op-graphics.h" -//#define MIXER_DOUBLE_BUFFERING 1 - #ifndef PATH_MAX #define PATH_MAX 255 #endif -- cgit v1.2.3 From dd35e72a7eefa922eba68dd28e8a18cbb98c0b16 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 27 Jun 2012 19:58:20 +0200 Subject: GOB: Return proper errors in GobEngine::run() --- engines/gob/gob.cpp | 29 +++++++++++++++-------------- engines/gob/gob.h | 6 +++--- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 3d8a18ed38..3202b5e23d 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -274,15 +274,15 @@ void GobEngine::setTrueColor(bool trueColor) { } Common::Error GobEngine::run() { - if (!initGameParts()) { - GUIErrorMessage("GobEngine::init(): Unknown version of game engine"); - return Common::kUnknownError; - } + Common::Error err; - if (!initGraphics()) { - GUIErrorMessage("GobEngine::init(): Failed to set up graphics"); - return Common::kUnknownError; - } + err = initGameParts(); + if (err.getCode() != Common::kNoError) + return err; + + err = initGraphics(); + if (err.getCode() != Common::kNoError) + return err; // On some systems it's not safe to run CD audio games from the CD. if (isCD()) @@ -392,7 +392,7 @@ void GobEngine::pauseGame() { pauseEngineIntern(false); } -bool GobEngine::initGameParts() { +Common::Error GobEngine::initGameParts() { _resourceSizeWorkaround = false; // just detect some devices some of which will be always there if the music is not disabled @@ -605,9 +605,10 @@ bool GobEngine::initGameParts() { _scenery = new Scenery_v2(this); _saveLoad = new SaveLoad_v2(this, _targetName.c_str()); break; + default: deinitGameParts(); - return false; + return Common::kUnsupportedGameidError; } // Setup mixer @@ -615,7 +616,7 @@ bool GobEngine::initGameParts() { _inter->setupOpcodes(); - return true; + return Common::kNoError; } void GobEngine::deinitGameParts() { @@ -637,10 +638,10 @@ void GobEngine::deinitGameParts() { delete _dataIO; _dataIO = 0; } -bool GobEngine::initGraphics() { +Common::Error GobEngine::initGraphics() { if (is800x600()) { warning("GobEngine::initGraphics(): 800x600 games currently unsupported"); - return false; + return Common::kUnsupportedGameidError; } else if (is640x480()) { _width = 640; _height = 480; @@ -664,7 +665,7 @@ bool GobEngine::initGraphics() { _global->_primarySurfDesc = SurfacePtr(new Surface(_width, _height, _pixelFormat.bytesPerPixel)); - return true; + return Common::kNoError; } } // End of namespace Gob diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 52f3ba8f2d..d3d2bf1576 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -176,10 +176,10 @@ private: virtual void pauseEngineIntern(bool pause); virtual void syncSoundSettings(); - bool initGameParts(); - void deinitGameParts(); + Common::Error initGameParts(); + Common::Error initGraphics(); - bool initGraphics(); + void deinitGameParts(); public: static const Common::Language _gobToScummVMLang[]; -- cgit v1.2.3 From 2d05974b5cfef94be9e3edad02e66169a215db4c Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 29 Jun 2012 19:09:56 +0200 Subject: GOB: const correctness in SoundBlaster::playComposition() --- engines/gob/inter_bargon.cpp | 4 ++-- engines/gob/sound/sound.cpp | 2 +- engines/gob/sound/sound.h | 2 +- engines/gob/sound/soundblaster.cpp | 2 +- engines/gob/sound/soundblaster.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/gob/inter_bargon.cpp b/engines/gob/inter_bargon.cpp index 134203fa9d..029f7c697b 100644 --- a/engines/gob/inter_bargon.cpp +++ b/engines/gob/inter_bargon.cpp @@ -119,7 +119,7 @@ void Inter_Bargon::oBargon_intro2(OpGobParams ¶ms) { MouseButtons buttons; SurfacePtr surface; SoundDesc samples[4]; - int16 comp[5] = { 0, 1, 2, 3, -1 }; + static const int16 comp[5] = { 0, 1, 2, 3, -1 }; static const char *const sndFiles[] = {"1INTROII.snd", "2INTROII.snd", "1INTRO3.snd", "2INTRO3.snd"}; surface = _vm->_video->initSurfDesc(320, 200); @@ -167,8 +167,8 @@ void Inter_Bargon::oBargon_intro3(OpGobParams ¶ms) { MouseButtons buttons; Video::Color *palBak; SoundDesc samples[2]; - int16 comp[3] = { 0, 1, -1 }; byte *palettes[4]; + static const int16 comp[3] = { 0, 1, -1 }; static const char *const sndFiles[] = {"1INTROIV.snd", "2INTROIV.snd"}; static const char *const palFiles[] = {"2ou2.clt", "2ou3.clt", "2ou4.clt", "2ou5.clt"}; diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 403bd632a1..69a668e5fb 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -458,7 +458,7 @@ void Sound::blasterStop(int16 fadeLength, SoundDesc *sndDesc) { _blaster->stopSound(fadeLength, sndDesc); } -void Sound::blasterPlayComposition(int16 *composition, int16 freqVal, +void Sound::blasterPlayComposition(const int16 *composition, int16 freqVal, SoundDesc *sndDescs, int8 sndCount) { if (!_blaster) return; diff --git a/engines/gob/sound/sound.h b/engines/gob/sound/sound.h index 6ad0ec5483..7beffb5dc7 100644 --- a/engines/gob/sound/sound.h +++ b/engines/gob/sound/sound.h @@ -60,7 +60,7 @@ public: int16 frequency, int16 fadeLength = 0); void blasterStop(int16 fadeLength, SoundDesc *sndDesc = 0); - void blasterPlayComposition(int16 *composition, int16 freqVal, + void blasterPlayComposition(const int16 *composition, int16 freqVal, SoundDesc *sndDescs = 0, int8 sndCount = kSoundsCount); void blasterStopComposition(); void blasterRepeatComposition(int32 repCount); diff --git a/engines/gob/sound/soundblaster.cpp b/engines/gob/sound/soundblaster.cpp index 19c2346448..f267eee32d 100644 --- a/engines/gob/sound/soundblaster.cpp +++ b/engines/gob/sound/soundblaster.cpp @@ -88,7 +88,7 @@ void SoundBlaster::nextCompositionPos() { _compositionPos = -1; } -void SoundBlaster::playComposition(int16 *composition, int16 freqVal, +void SoundBlaster::playComposition(const int16 *composition, int16 freqVal, SoundDesc *sndDescs, int8 sndCount) { _compositionSamples = sndDescs; diff --git a/engines/gob/sound/soundblaster.h b/engines/gob/sound/soundblaster.h index c740ba2269..3c4968d611 100644 --- a/engines/gob/sound/soundblaster.h +++ b/engines/gob/sound/soundblaster.h @@ -41,7 +41,7 @@ public: int16 frequency, int16 fadeLength = 0); void stopSound(int16 fadeLength, SoundDesc *sndDesc = 0); - void playComposition(int16 *composition, int16 freqVal, + void playComposition(const int16 *composition, int16 freqVal, SoundDesc *sndDescs = 0, int8 sndCount = 60); void stopComposition(); void endComposition(); -- cgit v1.2.3 From 945115f09927ff2e9e7d5197524bb929f4ba5561 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 27 Jun 2012 19:45:04 +0200 Subject: GOB: Don't crash when the engine wasn't fully initialized on exit --- engines/gob/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index 0d1953322f..de0c3f2d5c 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -64,7 +64,7 @@ void Environments::clear() { // Deleting unique variables, script and resources for (uint i = 0; i < kEnvironmentCount; i++) { - if (_environments[i].variables == _vm->_inter->_variables) + if (_vm->_inter && (_environments[i].variables == _vm->_inter->_variables)) continue; if (!has(_environments[i].variables, i + 1)) -- cgit v1.2.3 From 099a76ea20fa0f8290815f988d2202b6702d589b Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 28 Jun 2012 01:30:29 +0200 Subject: GOB: Don't crash when there's no _inter object --- engines/gob/draw.cpp | 6 +++--- engines/gob/gob.cpp | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index fe59b11f76..9253a0a242 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -256,7 +256,7 @@ void Draw::blitInvalidated() { if (_cursorIndex == 4) blitCursor(); - if (_vm->_inter->_terminate) + if (_vm->_inter && _vm->_inter->_terminate) return; if (_noInvalidated && !_applyPal) @@ -446,7 +446,7 @@ void Draw::printTextCentered(int16 id, int16 left, int16 top, int16 right, adjustCoords(1, &left, &top); adjustCoords(1, &right, &bottom); - uint16 centerOffset = _vm->_game->_script->getFunctionOffset(TOTFile::kFunctionCenter); + uint16 centerOffset = _vm->_game->_script ? _vm->_game->_script->getFunctionOffset(TOTFile::kFunctionCenter) : 0; if (centerOffset != 0) { _vm->_game->_script->call(centerOffset); @@ -505,7 +505,7 @@ void Draw::oPlaytoons_sub_F_1B(uint16 id, int16 left, int16 top, int16 right, in adjustCoords(1, &left, &top); adjustCoords(1, &right, &bottom); - uint16 centerOffset = _vm->_game->_script->getFunctionOffset(TOTFile::kFunctionCenter); + uint16 centerOffset = _vm->_game->_script ? _vm->_game->_script->getFunctionOffset(TOTFile::kFunctionCenter) : 0; if (centerOffset != 0) { _vm->_game->_script->call(centerOffset); diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 3202b5e23d..ef9a7112f9 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -368,11 +368,12 @@ void GobEngine::pauseEngineIntern(bool pause) { _game->_startTimeKey += duration; _draw->_cursorTimeKey += duration; - if (_inter->_soundEndTimeKey != 0) + if (_inter && (_inter->_soundEndTimeKey != 0)) _inter->_soundEndTimeKey += duration; } - _vidPlayer->pauseAll(pause); + if (_vidPlayer) + _vidPlayer->pauseAll(pause); _mixer->pauseAll(pause); } -- cgit v1.2.3 From 1cb6cc0218382bbf5fe487fd0e84d233e56592bb Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 28 Jun 2012 01:31:59 +0200 Subject: GOB: Don't crash when drawPackedSprite() can't open the sprite --- engines/gob/video.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index 3b1c6423bb..f1f014cce0 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -332,6 +332,10 @@ void Video::drawPackedSprite(byte *sprBuf, int16 width, int16 height, void Video::drawPackedSprite(const char *path, Surface &dest, int width) { int32 size; byte *data = _vm->_dataIO->getFile(path, size); + if (!data) { + warning("Video::drawPackedSprite(): Failed to open sprite \"%s\"", path); + return; + } drawPackedSprite(data, width, dest.getHeight(), 0, 0, 0, dest); delete[] data; -- cgit v1.2.3 From b5fa752b78c63bedcb53d38fb11244b7e99f9941 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 28 Jun 2012 17:37:58 +0200 Subject: GOB: Keep the mouse responsive while waiting for the frame to end --- engines/gob/minigames/geisha/penetration.cpp | 2 +- engines/gob/util.cpp | 20 ++++++++++++++------ engines/gob/util.h | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 3be9f1f651..05695e5dbb 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -505,7 +505,7 @@ bool Penetration::play(bool hasAccessPass, bool hasMaxEnergy, bool testMode) { // Draw, fade in if necessary and wait for the end of the frame _vm->_draw->blitInvalidated(); fadeIn(); - _vm->_util->waitEndFrame(); + _vm->_util->waitEndFrame(false); // Handle the input checkInput(); diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index 64dfcf9b12..5d6ae78872 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -367,21 +367,29 @@ void Util::notifyNewAnim() { _startFrameTime = getTimeKey(); } -void Util::waitEndFrame() { +void Util::waitEndFrame(bool handleInput) { int32 time; - _vm->_video->waitRetrace(); - time = getTimeKey() - _startFrameTime; if ((time > 1000) || (time < 0)) { + _vm->_video->retrace(); _startFrameTime = getTimeKey(); return; } - int32 toWait = _frameWaitTime - time; + int32 toWait = 0; + do { + if (toWait > 0) + delay(MIN(toWait, 10)); + + if (handleInput) + processInput(); + + _vm->_video->retrace(); - if (toWait > 0) - delay(toWait); + time = getTimeKey() - _startFrameTime; + toWait = _frameWaitTime - time; + } while (toWait > 0); _startFrameTime = getTimeKey(); } diff --git a/engines/gob/util.h b/engines/gob/util.h index b26a78ab2c..30bff72325 100644 --- a/engines/gob/util.h +++ b/engines/gob/util.h @@ -124,7 +124,7 @@ public: int16 getFrameRate(); void setFrameRate(int16 rate); void notifyNewAnim(); - void waitEndFrame(); + void waitEndFrame(bool handleInput = true); void setScrollOffset(int16 x = -1, int16 y = -1); static void insertStr(const char *str1, char *str2, int16 pos); -- cgit v1.2.3 From 00fa997039525eeeacc34734e9a12e53f7b847dd Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 30 Jun 2012 01:46:24 +0200 Subject: GOB: Move drawString into Font --- engines/gob/draw.cpp | 15 ---------- engines/gob/draw.h | 2 -- engines/gob/draw_fascin.cpp | 4 +-- engines/gob/draw_playtoons.cpp | 4 +-- engines/gob/draw_v2.cpp | 4 +-- engines/gob/inter_v5.cpp | 10 +++---- engines/gob/minigames/geisha/penetration.cpp | 45 +++++++++++----------------- engines/gob/video.cpp | 17 +++++++++++ engines/gob/video.h | 3 ++ 9 files changed, 49 insertions(+), 55 deletions(-) diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index 9253a0a242..3932987e0a 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -425,21 +425,6 @@ int Draw::stringLength(const char *str, uint16 fontIndex) { return len; } -void Draw::drawString(const char *str, int16 x, int16 y, int16 color1, int16 color2, - int16 transp, Surface &dest, const Font &font) { - - while (*str != '\0') { - const int16 charRight = x + font.getCharWidth(*str); - const int16 charBottom = y + font.getCharHeight(); - - if ((charRight <= dest.getWidth()) && (charBottom <= dest.getHeight())) - font.drawLetter(dest, *str, x, y, color1, color2, transp); - - x += font.getCharWidth(*str); - str++; - } -} - void Draw::printTextCentered(int16 id, int16 left, int16 top, int16 right, int16 bottom, const char *str, int16 fontIndex, int16 color) { diff --git a/engines/gob/draw.h b/engines/gob/draw.h index e7af1f9af3..b51c6466e0 100644 --- a/engines/gob/draw.h +++ b/engines/gob/draw.h @@ -194,8 +194,6 @@ public: adjustCoords(adjust, (int16 *)coord1, (int16 *)coord2); } int stringLength(const char *str, uint16 fontIndex); - void drawString(const char *str, int16 x, int16 y, int16 color1, int16 color2, - int16 transp, Surface &dest, const Font &font); void printTextCentered(int16 id, int16 left, int16 top, int16 right, int16 bottom, const char *str, int16 fontIndex, int16 color); void oPlaytoons_sub_F_1B( uint16 id, int16 left, int16 top, int16 right, int16 bottom, char *paramStr, int16 var3, int16 var4, int16 shortId); diff --git a/engines/gob/draw_fascin.cpp b/engines/gob/draw_fascin.cpp index 54cd52b660..12009d7ee5 100644 --- a/engines/gob/draw_fascin.cpp +++ b/engines/gob/draw_fascin.cpp @@ -222,8 +222,8 @@ void Draw_Fascination::spriteOperation(int16 operation) { _destSpriteX, _destSpriteY, _frontColor, _backColor, _transparency); } } else { - drawString(_textToPrint, _destSpriteX, _destSpriteY, _frontColor, - _backColor, _transparency, *_spritesArray[_destSurface], *font); + font->drawString(_textToPrint, _destSpriteX, _destSpriteY, _frontColor, + _backColor, _transparency, *_spritesArray[_destSurface]); _destSpriteX += len * font->getCharWidth(); } } else { diff --git a/engines/gob/draw_playtoons.cpp b/engines/gob/draw_playtoons.cpp index a443f81ccf..76e2ae591c 100644 --- a/engines/gob/draw_playtoons.cpp +++ b/engines/gob/draw_playtoons.cpp @@ -283,8 +283,8 @@ void Draw_Playtoons::spriteOperation(int16 operation) { _destSpriteX, _destSpriteY, _frontColor, _backColor, _transparency); } } else { - drawString(_textToPrint, _destSpriteX, _destSpriteY, _frontColor, - _backColor, _transparency, *_spritesArray[_destSurface], *font); + font->drawString(_textToPrint, _destSpriteX, _destSpriteY, _frontColor, + _backColor, _transparency, *_spritesArray[_destSurface]); _destSpriteX += len * font->getCharWidth(); } } else { diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index b637ecbd2b..ac43c7b86a 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -831,8 +831,8 @@ void Draw_v2::spriteOperation(int16 operation) { getColor(_backColor), _transparency); } } else { - drawString(_textToPrint, _destSpriteX, _destSpriteY, getColor(_frontColor), - getColor(_backColor), _transparency, *_spritesArray[_destSurface], *font); + font->drawString(_textToPrint, _destSpriteX, _destSpriteY, getColor(_frontColor), + getColor(_backColor), _transparency, *_spritesArray[_destSurface]); _destSpriteX += len * font->getCharWidth(); } } else { diff --git a/engines/gob/inter_v5.cpp b/engines/gob/inter_v5.cpp index c0e8978afd..24905b08d1 100644 --- a/engines/gob/inter_v5.cpp +++ b/engines/gob/inter_v5.cpp @@ -281,7 +281,7 @@ void Inter_v5::o5_getSystemCDSpeed(OpGobParams ¶ms) { Font *font; if ((font = _vm->_draw->loadFont("SPEED.LET"))) { - _vm->_draw->drawString("100 %", 402, 89, 112, 144, 0, *_vm->_draw->_backSurface, *font); + font->drawString("100 %", 402, 89, 112, 144, 0, *_vm->_draw->_backSurface); _vm->_draw->forceBlit(); delete font; @@ -293,7 +293,7 @@ void Inter_v5::o5_getSystemRAM(OpGobParams ¶ms) { Font *font; if ((font = _vm->_draw->loadFont("SPEED.LET"))) { - _vm->_draw->drawString("100 %", 402, 168, 112, 144, 0, *_vm->_draw->_backSurface, *font); + font->drawString("100 %", 402, 168, 112, 144, 0, *_vm->_draw->_backSurface); _vm->_draw->forceBlit(); delete font; @@ -305,7 +305,7 @@ void Inter_v5::o5_getSystemCPUSpeed(OpGobParams ¶ms) { Font *font; if ((font = _vm->_draw->loadFont("SPEED.LET"))) { - _vm->_draw->drawString("100 %", 402, 248, 112, 144, 0, *_vm->_draw->_backSurface, *font); + font->drawString("100 %", 402, 248, 112, 144, 0, *_vm->_draw->_backSurface); _vm->_draw->forceBlit(); delete font; @@ -317,7 +317,7 @@ void Inter_v5::o5_getSystemDrawSpeed(OpGobParams ¶ms) { Font *font; if ((font = _vm->_draw->loadFont("SPEED.LET"))) { - _vm->_draw->drawString("100 %", 402, 326, 112, 144, 0, *_vm->_draw->_backSurface, *font); + font->drawString("100 %", 402, 326, 112, 144, 0, *_vm->_draw->_backSurface); _vm->_draw->forceBlit(); delete font; @@ -329,7 +329,7 @@ void Inter_v5::o5_totalSystemSpecs(OpGobParams ¶ms) { Font *font; if ((font = _vm->_draw->loadFont("SPEED.LET"))) { - _vm->_draw->drawString("100 %", 402, 405, 112, 144, 0, *_vm->_draw->_backSurface, *font); + font->drawString("100 %", 402, 405, 112, 144, 0, *_vm->_draw->_backSurface); _vm->_draw->forceBlit(); delete font; diff --git a/engines/gob/minigames/geisha/penetration.cpp b/engines/gob/minigames/geisha/penetration.cpp index 05695e5dbb..c8c4f2bba7 100644 --- a/engines/gob/minigames/geisha/penetration.cpp +++ b/engines/gob/minigames/geisha/penetration.cpp @@ -778,29 +778,24 @@ void Penetration::drawFloorText() { else if (_floor == 2) floorString = strings[kString1stBasement]; + Surface &surface = *_vm->_draw->_backSurface; + if (floorString) - _vm->_draw->drawString(floorString, 10, 15, kColorFloorText, kColorBlack, 1, - *_vm->_draw->_backSurface, *font); + font->drawString(floorString, 10, 15, kColorFloorText, kColorBlack, 1, surface); if (_exits.size() > 0) { int exitCount = kString2Exits; if (_exits.size() == 1) exitCount = kString1Exit; - _vm->_draw->drawString(strings[kStringYouHave] , 10, 38, kColorExitText, kColorBlack, 1, - *_vm->_draw->_backSurface, *font); - _vm->_draw->drawString(strings[exitCount] , 10, 53, kColorExitText, kColorBlack, 1, - *_vm->_draw->_backSurface, *font); - _vm->_draw->drawString(strings[kStringToReach] , 10, 68, kColorExitText, kColorBlack, 1, - *_vm->_draw->_backSurface, *font); - _vm->_draw->drawString(strings[kStringUpperLevel1], 10, 84, kColorExitText, kColorBlack, 1, - *_vm->_draw->_backSurface, *font); - _vm->_draw->drawString(strings[kStringUpperLevel2], 10, 98, kColorExitText, kColorBlack, 1, - *_vm->_draw->_backSurface, *font); + font->drawString(strings[kStringYouHave] , 10, 38, kColorExitText, kColorBlack, 1, surface); + font->drawString(strings[exitCount] , 10, 53, kColorExitText, kColorBlack, 1, surface); + font->drawString(strings[kStringToReach] , 10, 68, kColorExitText, kColorBlack, 1, surface); + font->drawString(strings[kStringUpperLevel1], 10, 84, kColorExitText, kColorBlack, 1, surface); + font->drawString(strings[kStringUpperLevel2], 10, 98, kColorExitText, kColorBlack, 1, surface); } else - _vm->_draw->drawString(strings[kStringNoExit], 10, 53, kColorExitText, kColorBlack, 1, - *_vm->_draw->_backSurface, *font); + font->drawString(strings[kStringNoExit], 10, 53, kColorExitText, kColorBlack, 1, surface); } void Penetration::drawEndText() { @@ -814,21 +809,17 @@ void Penetration::drawEndText() { if (!font) return; + Surface &surface = *_vm->_draw->_backSurface; + const char **strings = kStrings[getLanguage()]; - _vm->_draw->drawString(strings[kStringLevel0] , 11, 21, kColorExitText, kColorBlack, 1, - *_vm->_draw->_backSurface, *font); - _vm->_draw->drawString(strings[kStringPenetration], 11, 42, kColorExitText, kColorBlack, 1, - *_vm->_draw->_backSurface, *font); - _vm->_draw->drawString(strings[kStringSuccessful] , 11, 58, kColorExitText, kColorBlack, 1, - *_vm->_draw->_backSurface, *font); - - _vm->_draw->drawString(strings[kStringDanger] , 11, 82, kColorFloorText, kColorBlack, 1, - *_vm->_draw->_backSurface, *font); - _vm->_draw->drawString(strings[kStringGynoides] , 11, 98, kColorFloorText, kColorBlack, 1, - *_vm->_draw->_backSurface, *font); - _vm->_draw->drawString(strings[kStringActivated], 11, 113, kColorFloorText, kColorBlack, 1, - *_vm->_draw->_backSurface, *font); + font->drawString(strings[kStringLevel0] , 11, 21, kColorExitText, kColorBlack, 1, surface); + font->drawString(strings[kStringPenetration], 11, 42, kColorExitText, kColorBlack, 1, surface); + font->drawString(strings[kStringSuccessful] , 11, 58, kColorExitText, kColorBlack, 1, surface); + + font->drawString(strings[kStringDanger] , 11, 82, kColorFloorText, kColorBlack, 1, surface); + font->drawString(strings[kStringGynoides] , 11, 98, kColorFloorText, kColorBlack, 1, surface); + font->drawString(strings[kStringActivated], 11, 113, kColorFloorText, kColorBlack, 1, surface); _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, kTextAreaLeft, kTextAreaTop, kTextAreaRight, kTextAreaBigBottom); _vm->_draw->blitInvalidated(); diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index f1f014cce0..8bcf14e040 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -134,6 +134,23 @@ void Font::drawLetter(Surface &surf, uint8 c, uint16 x, uint16 y, } } +void Font::drawString(const Common::String &str, int16 x, int16 y, int16 color1, int16 color2, + bool transp, Surface &dest) const { + + const char *s = str.c_str(); + + while (*s != '\0') { + const int16 charRight = x + getCharWidth(*s); + const int16 charBottom = y + getCharHeight(); + + if ((x >= 0) && (y >= 0) && (charRight <= dest.getWidth()) && (charBottom <= dest.getHeight())) + drawLetter(dest, *s, x, y, color1, color2, transp); + + x += getCharWidth(*s); + s++; + } +} + const byte *Font::getCharData(uint8 c) const { if (_endItem == 0) { warning("Font::getCharData(): _endItem == 0"); diff --git a/engines/gob/video.h b/engines/gob/video.h index ecbb579c5f..a8c1480a6b 100644 --- a/engines/gob/video.h +++ b/engines/gob/video.h @@ -46,6 +46,9 @@ public: void drawLetter(Surface &surf, uint8 c, uint16 x, uint16 y, uint32 color1, uint32 color2, bool transp) const; + void drawString(const Common::String &str, int16 x, int16 y, int16 color1, int16 color2, + bool transp, Surface &dest) const; + private: const byte *_dataPtr; const byte *_data; -- cgit v1.2.3 From bba2028fbaa1c2b3b2b89badd6bf8f36cbbe1cc1 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 27 Jun 2012 19:11:28 +0200 Subject: GOB: Move the method definitions out of the GobMetaEngine class definition --- engines/gob/detection/detection.cpp | 71 ++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 28 deletions(-) diff --git a/engines/gob/detection/detection.cpp b/engines/gob/detection/detection.cpp index 14da54637b..8b4fab4409 100644 --- a/engines/gob/detection/detection.cpp +++ b/engines/gob/detection/detection.cpp @@ -30,43 +30,51 @@ class GobMetaEngine : public AdvancedMetaEngine { public: - GobMetaEngine() : AdvancedMetaEngine(Gob::gameDescriptions, sizeof(Gob::GOBGameDescription), gobGames) { - _singleid = "gob"; - _guioptions = GUIO1(GUIO_NOLAUNCHLOAD); - } - - virtual GameDescriptor findGame(const char *gameid) const { - return Engines::findGameID(gameid, _gameids, obsoleteGameIDsTable); - } + GobMetaEngine(); - virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { - ADFilePropertiesMap filesProps; + virtual GameDescriptor findGame(const char *gameid) const; - const ADGameDescription *game = detectGameFilebased(allFiles, fslist, Gob::fileBased, &filesProps); - if (!game) - return 0; + virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const; - reportUnknown(fslist.begin()->getParent(), filesProps); - return game; - } - - virtual const char *getName() const { - return "Gob"; - } - - virtual const char *getOriginalCopyright() const { - return "Goblins Games (C) Coktel Vision"; - } + virtual const char *getName() const; + virtual const char *getOriginalCopyright() const; virtual bool hasFeature(MetaEngineFeature f) const; - virtual Common::Error createInstance(OSystem *syst, Engine **engine) const { - Engines::upgradeTargetIfNecessary(obsoleteGameIDsTable); - return AdvancedMetaEngine::createInstance(syst, engine); - } + virtual Common::Error createInstance(OSystem *syst, Engine **engine) const; virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const; }; +GobMetaEngine::GobMetaEngine() : + AdvancedMetaEngine(Gob::gameDescriptions, sizeof(Gob::GOBGameDescription), gobGames) { + + _singleid = "gob"; + _guioptions = GUIO1(GUIO_NOLAUNCHLOAD); +} + +GameDescriptor GobMetaEngine::findGame(const char *gameid) const { + return Engines::findGameID(gameid, _gameids, obsoleteGameIDsTable); +} + +const ADGameDescription *GobMetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { + ADFilePropertiesMap filesProps; + + const ADGameDescription *game = detectGameFilebased(allFiles, fslist, Gob::fileBased, &filesProps); + if (!game) + return 0; + + reportUnknown(fslist.begin()->getParent(), filesProps); + return game; +} + +const char *GobMetaEngine::getName() const { + return "Gob"; +} + +const char *GobMetaEngine::getOriginalCopyright() const { + return "Goblins Games (C) Coktel Vision"; +} + bool GobMetaEngine::hasFeature(MetaEngineFeature f) const { return false; } @@ -75,6 +83,12 @@ bool Gob::GobEngine::hasFeature(EngineFeature f) const { return (f == kSupportsRTL); } + +Common::Error GobMetaEngine::createInstance(OSystem *syst, Engine **engine) const { + Engines::upgradeTargetIfNecessary(obsoleteGameIDsTable); + return AdvancedMetaEngine::createInstance(syst, engine); +} + bool GobMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const { const Gob::GOBGameDescription *gd = (const Gob::GOBGameDescription *)desc; if (gd) { @@ -84,6 +98,7 @@ bool GobMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameD return gd != 0; } + #if PLUGIN_ENABLED_DYNAMIC(GOB) REGISTER_PLUGIN_DYNAMIC(GOB, PLUGIN_TYPE_ENGINE, GobMetaEngine); #else -- cgit v1.2.3 From 4a380ce668c45e5eaba1cdba9406d0c7fe7f3635 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 24 Jun 2012 21:36:58 +0200 Subject: GOB: Add detection tables for Baba Yaga and Abracadabra --- engines/gob/detection/tables.h | 4 + engines/gob/detection/tables_ajworld.h | 1 - engines/gob/detection/tables_fallback.h | 25 +- engines/gob/detection/tables_onceupon.h | 518 ++++++++++++++++++++++++++++++++ engines/gob/gob.h | 3 + 5 files changed, 545 insertions(+), 6 deletions(-) create mode 100644 engines/gob/detection/tables_onceupon.h diff --git a/engines/gob/detection/tables.h b/engines/gob/detection/tables.h index 5d211ac7d8..271f75af79 100644 --- a/engines/gob/detection/tables.h +++ b/engines/gob/detection/tables.h @@ -48,7 +48,10 @@ static const PlainGameDescriptor gobGames[] = { {"gob2cd", "Gobliins 2 CD"}, {"ween", "Ween: The Prophecy"}, {"bargon", "Bargon Attack"}, + {"babayaga", "Once Upon A Time: Baba Yaga"}, + {"abracadabra", "Once Upon A Time: Abracadabra"}, {"littlered", "Once Upon A Time: Little Red Riding Hood"}, + {"onceupon", "Once Upon A Time"}, {"ajworld", "A.J.'s World of Discovery"}, {"gob3", "Goblins Quest 3"}, {"gob3cd", "Goblins Quest 3 CD"}, @@ -94,6 +97,7 @@ static const GOBGameDescription gameDescriptions[] = { #include "gob/detection/tables_ween.h" // Ween: The Prophecy #include "gob/detection/tables_bargon.h" // Bargon Attack #include "gob/detection/tables_littlered.h" // Once Upon A Time: Little Red Riding Hood + #include "gob/detection/tables_onceupon.h" // Once Upon A Time: Baba Yaga and Abracadabra #include "gob/detection/tables_lit.h" // Lost in Time #include "gob/detection/tables_fascin.h" // Fascination #include "gob/detection/tables_geisha.h" // Geisha diff --git a/engines/gob/detection/tables_ajworld.h b/engines/gob/detection/tables_ajworld.h index c78d11a6ad..d86bdb16be 100644 --- a/engines/gob/detection/tables_ajworld.h +++ b/engines/gob/detection/tables_ajworld.h @@ -1,4 +1,3 @@ - /* ScummVM - Graphic Adventure Engine * * ScummVM is the legal property of its developers, whose names diff --git a/engines/gob/detection/tables_fallback.h b/engines/gob/detection/tables_fallback.h index 2853ee7b4f..0e0aa92ae1 100644 --- a/engines/gob/detection/tables_fallback.h +++ b/engines/gob/detection/tables_fallback.h @@ -361,6 +361,20 @@ static const GOBGameDescription fallbackDescs[] = { 0, 0, 0 }, { //24 + { + "onceupon", + "unknown", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformUnknown, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeOnceUponATime, + kFeaturesEGA, + 0, 0, 0 + }, + { //25 { "adi2", "", @@ -374,7 +388,7 @@ static const GOBGameDescription fallbackDescs[] = { kFeatures640x480, "adi2.stk", 0, 0 }, - { //25 + { //26 { "adi4", "", @@ -388,7 +402,7 @@ static const GOBGameDescription fallbackDescs[] = { kFeatures640x480, "adif41.stk", 0, 0 }, - { //26 + { //27 { "coktelplayer", "unknown", @@ -430,9 +444,10 @@ static const ADFileBasedFallback fileBased[] = { { &fallbackDescs[21].desc, { "disk1.stk", "disk2.stk", "disk3.stk", 0 } }, { &fallbackDescs[22].desc, { "intro.stk", "stk2.stk", "stk3.stk", 0 } }, { &fallbackDescs[23].desc, { "intro.stk", "stk2.stk", "stk3.stk", "mod.babayaga", 0 } }, - { &fallbackDescs[24].desc, { "adi2.stk", 0 } }, - { &fallbackDescs[25].desc, { "adif41.stk", "adim41.stk", 0 } }, - { &fallbackDescs[26].desc, { "coktelplayer.scn", 0 } }, + { &fallbackDescs[24].desc, { "stk1.stk", "stk2.stk", "stk3.stk", 0 } }, + { &fallbackDescs[25].desc, { "adi2.stk", 0 } }, + { &fallbackDescs[26].desc, { "adif41.stk", "adim41.stk", 0 } }, + { &fallbackDescs[27].desc, { "coktelplayer.scn", 0 } }, { 0, { 0 } } }; diff --git a/engines/gob/detection/tables_onceupon.h b/engines/gob/detection/tables_onceupon.h new file mode 100644 index 0000000000..366024d43c --- /dev/null +++ b/engines/gob/detection/tables_onceupon.h @@ -0,0 +1,518 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* Detection tables for Once Upon A Time: Baba Yaga and Abracadabra. */ + +#ifndef GOB_DETECTION_TABLES_ONCEUPON_H +#define GOB_DETECTION_TABLES_ONCEUPON_H + +// -- Once Upon A Time: Abracadabra, Amiga -- + +{ + { + "abracadabra", + "", + { + {"stk1.stk", 0, "a8e963eea170155548e5bc1d0f07d50d", 209806}, + {"stk2.stk", 0, "e4b21818af03930dc9cab2ad4c93cb5b", 362106}, + {"stk3.stk", 0, "76874ad92782f9b2de57beafc05ec877", 353482}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAbracadabra, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "abracadabra", + "", + { + {"stk1.stk", 0, "a8e963eea170155548e5bc1d0f07d50d", 209806}, + {"stk2.stk", 0, "e4b21818af03930dc9cab2ad4c93cb5b", 362106}, + {"stk3.stk", 0, "76874ad92782f9b2de57beafc05ec877", 353482}, + {0, 0, 0, 0} + }, + DE_DEU, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAbracadabra, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "abracadabra", + "", + { + {"stk1.stk", 0, "a8e963eea170155548e5bc1d0f07d50d", 209806}, + {"stk2.stk", 0, "e4b21818af03930dc9cab2ad4c93cb5b", 362106}, + {"stk3.stk", 0, "76874ad92782f9b2de57beafc05ec877", 353482}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAbracadabra, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "abracadabra", + "", + { + {"stk1.stk", 0, "a8e963eea170155548e5bc1d0f07d50d", 209806}, + {"stk2.stk", 0, "e4b21818af03930dc9cab2ad4c93cb5b", 362106}, + {"stk3.stk", 0, "76874ad92782f9b2de57beafc05ec877", 353482}, + {0, 0, 0, 0} + }, + IT_ITA, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAbracadabra, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "abracadabra", + "", + { + {"stk1.stk", 0, "a8e963eea170155548e5bc1d0f07d50d", 209806}, + {"stk2.stk", 0, "e4b21818af03930dc9cab2ad4c93cb5b", 362106}, + {"stk3.stk", 0, "76874ad92782f9b2de57beafc05ec877", 353482}, + {0, 0, 0, 0} + }, + ES_ESP, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAbracadabra, + kFeaturesEGA, + 0, 0, 0 +}, + +// -- Once Upon A Time: Abracadabra, Atari ST -- + +{ + { + "abracadabra", + "", + { + {"stk1.stk", 0, "a8e963eea170155548e5bc1d0f07d50d", 209806}, + {"stk2.stk", 0, "c6440aaf068ec3149ae89bc5c41ebf02", 362123}, + {"stk3.stk", 0, "5af3c1202ba6fcf8dad2b2125e1c1383", 353257}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAbracadabra, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "abracadabra", + "", + { + {"stk1.stk", 0, "a8e963eea170155548e5bc1d0f07d50d", 209806}, + {"stk2.stk", 0, "c6440aaf068ec3149ae89bc5c41ebf02", 362123}, + {"stk3.stk", 0, "5af3c1202ba6fcf8dad2b2125e1c1383", 353257}, + {0, 0, 0, 0} + }, + DE_DEU, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAbracadabra, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "abracadabra", + "", + { + {"stk1.stk", 0, "a8e963eea170155548e5bc1d0f07d50d", 209806}, + {"stk2.stk", 0, "c6440aaf068ec3149ae89bc5c41ebf02", 362123}, + {"stk3.stk", 0, "5af3c1202ba6fcf8dad2b2125e1c1383", 353257}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAbracadabra, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "abracadabra", + "", + { + {"stk1.stk", 0, "a8e963eea170155548e5bc1d0f07d50d", 209806}, + {"stk2.stk", 0, "c6440aaf068ec3149ae89bc5c41ebf02", 362123}, + {"stk3.stk", 0, "5af3c1202ba6fcf8dad2b2125e1c1383", 353257}, + {0, 0, 0, 0} + }, + IT_ITA, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAbracadabra, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "abracadabra", + "", + { + {"stk1.stk", 0, "a8e963eea170155548e5bc1d0f07d50d", 209806}, + {"stk2.stk", 0, "c6440aaf068ec3149ae89bc5c41ebf02", 362123}, + {"stk3.stk", 0, "5af3c1202ba6fcf8dad2b2125e1c1383", 353257}, + {0, 0, 0, 0} + }, + ES_ESP, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAbracadabra, + kFeaturesEGA, + 0, 0, 0 +}, + +// -- Once Upon A Time: Baba Yaga, DOS EGA Floppy -- + +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "3c777f43e6fb49fde9222543447e135a", 204813}, + {"stk2.stk", 0, "6cf0b009dd185a8f589e91a1f9c33df5", 361582}, + {"stk3.stk", 0, "6473183ca4db1b5b5cea047f9af59a26", 328925}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "3c777f43e6fb49fde9222543447e135a", 204813}, + {"stk2.stk", 0, "6cf0b009dd185a8f589e91a1f9c33df5", 361582}, + {"stk3.stk", 0, "6473183ca4db1b5b5cea047f9af59a26", 328925}, + {0, 0, 0, 0} + }, + DE_DEU, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "3c777f43e6fb49fde9222543447e135a", 204813}, + {"stk2.stk", 0, "6cf0b009dd185a8f589e91a1f9c33df5", 361582}, + {"stk3.stk", 0, "6473183ca4db1b5b5cea047f9af59a26", 328925}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "3c777f43e6fb49fde9222543447e135a", 204813}, + {"stk2.stk", 0, "6cf0b009dd185a8f589e91a1f9c33df5", 361582}, + {"stk3.stk", 0, "6473183ca4db1b5b5cea047f9af59a26", 328925}, + {0, 0, 0, 0} + }, + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "3c777f43e6fb49fde9222543447e135a", 204813}, + {"stk2.stk", 0, "6cf0b009dd185a8f589e91a1f9c33df5", 361582}, + {"stk3.stk", 0, "6473183ca4db1b5b5cea047f9af59a26", 328925}, + {0, 0, 0, 0} + }, + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 +}, + +// -- Once Upon A Time: Baba Yaga, Amiga -- + +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "bcc823d2888057031e54716ed1b3c80e", 205090}, + {"stk2.stk", 0, "f76bf7c2ff60d816d69962d1a593207c", 362122}, + {"stk3.stk", 0, "6227d1aefdf39d88dcf83e38bea2a9af", 328922}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "bcc823d2888057031e54716ed1b3c80e", 205090}, + {"stk2.stk", 0, "f76bf7c2ff60d816d69962d1a593207c", 362122}, + {"stk3.stk", 0, "6227d1aefdf39d88dcf83e38bea2a9af", 328922}, + {0, 0, 0, 0} + }, + DE_DEU, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "bcc823d2888057031e54716ed1b3c80e", 205090}, + {"stk2.stk", 0, "f76bf7c2ff60d816d69962d1a593207c", 362122}, + {"stk3.stk", 0, "6227d1aefdf39d88dcf83e38bea2a9af", 328922}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "bcc823d2888057031e54716ed1b3c80e", 205090}, + {"stk2.stk", 0, "f76bf7c2ff60d816d69962d1a593207c", 362122}, + {"stk3.stk", 0, "6227d1aefdf39d88dcf83e38bea2a9af", 328922}, + {0, 0, 0, 0} + }, + IT_ITA, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "bcc823d2888057031e54716ed1b3c80e", 205090}, + {"stk2.stk", 0, "f76bf7c2ff60d816d69962d1a593207c", 362122}, + {"stk3.stk", 0, "6227d1aefdf39d88dcf83e38bea2a9af", 328922}, + {0, 0, 0, 0} + }, + ES_ESP, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesEGA, + 0, 0, 0 +}, + +// -- Once Upon A Time: Baba Yaga, Atari ST -- + +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "17a4e3e7a18cc97231c92d280c7878a1", 205095}, + {"stk2.stk", 0, "bfbc380e5461f63af28e9e6b10f334b5", 362128}, + {"stk3.stk", 0, "6227d1aefdf39d88dcf83e38bea2a9af", 328922}, + {0, 0, 0, 0} + }, + FR_FRA, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "17a4e3e7a18cc97231c92d280c7878a1", 205095}, + {"stk2.stk", 0, "bfbc380e5461f63af28e9e6b10f334b5", 362128}, + {"stk3.stk", 0, "6227d1aefdf39d88dcf83e38bea2a9af", 328922}, + {0, 0, 0, 0} + }, + DE_DEU, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "17a4e3e7a18cc97231c92d280c7878a1", 205095}, + {"stk2.stk", 0, "bfbc380e5461f63af28e9e6b10f334b5", 362128}, + {"stk3.stk", 0, "6227d1aefdf39d88dcf83e38bea2a9af", 328922}, + {0, 0, 0, 0} + }, + EN_ANY, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "17a4e3e7a18cc97231c92d280c7878a1", 205095}, + {"stk2.stk", 0, "bfbc380e5461f63af28e9e6b10f334b5", 362128}, + {"stk3.stk", 0, "6227d1aefdf39d88dcf83e38bea2a9af", 328922}, + {0, 0, 0, 0} + }, + IT_ITA, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesEGA, + 0, 0, 0 +}, +{ + { + "babayaga", + "", + { + {"stk1.stk", 0, "17a4e3e7a18cc97231c92d280c7878a1", 205095}, + {"stk2.stk", 0, "bfbc380e5461f63af28e9e6b10f334b5", 362128}, + {"stk3.stk", 0, "6227d1aefdf39d88dcf83e38bea2a9af", 328922}, + {0, 0, 0, 0} + }, + ES_ESP, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesEGA, + 0, 0, 0 +}, + +#endif // GOB_DETECTION_TABLES_ONCEUPON_H diff --git a/engines/gob/gob.h b/engines/gob/gob.h index d3d2bf1576..5d4c3d7c55 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -129,7 +129,10 @@ enum GameType { kGameTypeAdi4, kGameTypeAdibou2, kGameTypeAdibou1, + kGameTypeAbracadabra, + kGameTypeBabaYaga, kGameTypeLittleRed, + kGameTypeOnceUponATime, // Need more inspection to see if Baba Yaga or Abracadabra kGameTypeAJWorld }; -- cgit v1.2.3 From 55c75756ea3c38cdd7074caff7085e35a658c9e7 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 27 Jun 2012 20:48:39 +0200 Subject: GOB: Add a more complex detection for Once Upon A Time titles The hard-coded Once Upon A Time titles, Abracadabra and Baba Yaga, are impossible to distinguish by file name alone. The same is true for the each three platforms, DOS, Amiga and Atari ST. We do need to know exactly which game and platform a specific path holds, though, because they're a) completely hard-coded b) the data files have platform-specific endianness Therefore, when the filename-based fallback detector finds one of those games, we open the archives and look inside them. We detect the specific game by looking at which animal names are present; and the platform by inspecting the endianness of the title screen's DEC file, in addition to the existence of a MOD file to distinguish the Atari ST from the Amiga version. --- engines/gob/detection/detection.cpp | 95 ++++++++++++++++++++++++++- engines/gob/detection/tables_fallback.h | 110 ++++++++++++++++++++++++++++++++ 2 files changed, 203 insertions(+), 2 deletions(-) diff --git a/engines/gob/detection/detection.cpp b/engines/gob/detection/detection.cpp index 8b4fab4409..8fb0052a5b 100644 --- a/engines/gob/detection/detection.cpp +++ b/engines/gob/detection/detection.cpp @@ -25,6 +25,7 @@ #include "engines/obsolete.h" #include "gob/gob.h" +#include "gob/dataio.h" #include "gob/detection/tables.h" @@ -43,6 +44,12 @@ public: virtual Common::Error createInstance(OSystem *syst, Engine **engine) const; virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const; + +private: + /** + * Inspect the game archives to detect which Once Upon A Time game this is. + */ + static const Gob::GOBGameDescription *detectOnceUponATime(const Common::FSList &fslist); }; GobMetaEngine::GobMetaEngine() : @@ -59,12 +66,96 @@ GameDescriptor GobMetaEngine::findGame(const char *gameid) const { const ADGameDescription *GobMetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { ADFilePropertiesMap filesProps; - const ADGameDescription *game = detectGameFilebased(allFiles, fslist, Gob::fileBased, &filesProps); + const Gob::GOBGameDescription *game; + game = (const Gob::GOBGameDescription *)detectGameFilebased(allFiles, fslist, Gob::fileBased, &filesProps); if (!game) return 0; + if (game->gameType == Gob::kGameTypeOnceUponATime) { + game = detectOnceUponATime(fslist); + if (!game) + return 0; + } + reportUnknown(fslist.begin()->getParent(), filesProps); - return game; + return (const ADGameDescription *)game; +} + +const Gob::GOBGameDescription *GobMetaEngine::detectOnceUponATime(const Common::FSList &fslist) { + // Add the game path to the search manager + SearchMan.clear(); + SearchMan.addDirectory(fslist.begin()->getParent().getPath(), fslist.begin()->getParent()); + + // Open the archives + Gob::DataIO dataIO; + if (!dataIO.openArchive("stk1.stk", true) || + !dataIO.openArchive("stk2.stk", true) || + !dataIO.openArchive("stk3.stk", true)) { + + SearchMan.clear(); + return 0; + } + + Gob::OnceUponATime gameType = Gob::kOnceUponATimeInvalid; + Gob::OnceUponATimePlatform platform = Gob::kOnceUponATimePlatformInvalid; + + // If these animal files are present, it's Abracadabra + if (dataIO.hasFile("arai.anm") && + dataIO.hasFile("crab.anm") && + dataIO.hasFile("crap.anm") && + dataIO.hasFile("drag.anm") && + dataIO.hasFile("guep.anm") && + dataIO.hasFile("loup.anm") && + dataIO.hasFile("mous.anm") && + dataIO.hasFile("rhin.anm") && + dataIO.hasFile("saut.anm") && + dataIO.hasFile("scor.anm")) + gameType = Gob::kOnceUponATimeAbracadabra; + + // If these animal files are present, it's Baba Yaga + if (dataIO.hasFile("abei.anm") && + dataIO.hasFile("arai.anm") && + dataIO.hasFile("drag.anm") && + dataIO.hasFile("fauc.anm") && + dataIO.hasFile("gren.anm") && + dataIO.hasFile("rena.anm") && + dataIO.hasFile("sang.anm") && + dataIO.hasFile("serp.anm") && + dataIO.hasFile("tort.anm") && + dataIO.hasFile("vaut.anm")) + gameType = Gob::kOnceUponATimeBabaYaga; + + // Detect the platform by endianness and existence of a MOD file + Common::SeekableReadStream *villeDEC = dataIO.getFile("ville.dec"); + if (villeDEC && (villeDEC->size() > 6)) { + byte data[6]; + + if (villeDEC->read(data, 6) == 6) { + if (!memcmp(data, "\000\000\000\001\000\007", 6)) { + // Big endian -> Amiga or Atari ST + + if (dataIO.hasFile("mod.babayaga")) + platform = Gob::kOnceUponATimePlatformAmiga; + else + platform = Gob::kOnceUponATimePlatformAtariST; + + } else if (!memcmp(data, "\000\000\001\000\007\000", 6)) + // Little endian -> DOS + platform = Gob::kOnceUponATimePlatformDOS; + } + + delete villeDEC; + } + + SearchMan.clear(); + + if ((gameType == Gob::kOnceUponATimeInvalid) || (platform == Gob::kOnceUponATimePlatformInvalid)) { + warning("GobMetaEngine::detectOnceUponATime(): Detection failed (%d, %d)", + (int) gameType, (int) platform); + return 0; + } + + return &Gob::fallbackOnceUpon[gameType][platform]; } const char *GobMetaEngine::getName() const { diff --git a/engines/gob/detection/tables_fallback.h b/engines/gob/detection/tables_fallback.h index 0e0aa92ae1..05f579c08c 100644 --- a/engines/gob/detection/tables_fallback.h +++ b/engines/gob/detection/tables_fallback.h @@ -23,6 +23,8 @@ #ifndef GOB_DETECTION_TABLES_FALLBACK_H #define GOB_DETECTION_TABLES_FALLBACK_H +// -- Tables for the filename-based fallback -- + static const GOBGameDescription fallbackDescs[] = { { //0 { @@ -451,4 +453,112 @@ static const ADFileBasedFallback fileBased[] = { { 0, { 0 } } }; +// -- Tables for detecting the specific Once Upon A Time game -- + +enum OnceUponATime { + kOnceUponATimeInvalid = -1, + kOnceUponATimeAbracadabra = 0, + kOnceUponATimeBabaYaga = 1, + kOnceUponATimeMAX +}; + +enum OnceUponATimePlatform { + kOnceUponATimePlatformInvalid = -1, + kOnceUponATimePlatformDOS = 0, + kOnceUponATimePlatformAmiga = 1, + kOnceUponATimePlatformAtariST = 2, + kOnceUponATimePlatformMAX +}; + +static const GOBGameDescription fallbackOnceUpon[kOnceUponATimeMAX][kOnceUponATimePlatformMAX] = { + { // kOnceUponATimeAbracadabra + { // kOnceUponATimePlatformDOS + { + "abracadabra", + "", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAbracadabra, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 + }, + { // kOnceUponATimePlatformAmiga + { + "abracadabra", + "", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAbracadabra, + kFeaturesEGA, + 0, 0, 0 + }, + { // kOnceUponATimePlatformAtariST + { + "abracadabra", + "", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeAbracadabra, + kFeaturesEGA, + 0, 0, 0 + } + }, + { // kOnceUponATimeBabaYaga + { // kOnceUponATimePlatformDOS + { + "babayaga", + "", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesAdLib | kFeaturesEGA, + 0, 0, 0 + }, + { // kOnceUponATimePlatformAmiga + { + "babayaga", + "", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformAmiga, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesEGA, + 0, 0, 0 + }, + { // kOnceUponATimePlatformAtariST + { + "babayaga", + "", + AD_ENTRY1(0, 0), + UNK_LANG, + kPlatformAtariST, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeBabaYaga, + kFeaturesEGA, + 0, 0, 0 + } + } +}; + #endif // GOB_DETECTION_TABLES_FALLBACK_H -- cgit v1.2.3 From 4819468d9ad8218d04a2e4563ef71d7d00964515 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 28 Jun 2012 00:07:29 +0200 Subject: GOB: Add PreGob stubs for the Once Upon A Time games --- engines/gob/gob.cpp | 33 ++++++++++++++++++++-- engines/gob/gob.h | 2 ++ engines/gob/init.cpp | 14 ++++++++- engines/gob/module.mk | 4 +++ engines/gob/pregob/onceupon/abracadabra.cpp | 43 ++++++++++++++++++++++++++++ engines/gob/pregob/onceupon/abracadabra.h | 44 +++++++++++++++++++++++++++++ engines/gob/pregob/onceupon/babayaga.cpp | 43 ++++++++++++++++++++++++++++ engines/gob/pregob/onceupon/babayaga.h | 44 +++++++++++++++++++++++++++++ engines/gob/pregob/onceupon/onceupon.cpp | 37 ++++++++++++++++++++++++ engines/gob/pregob/onceupon/onceupon.h | 42 +++++++++++++++++++++++++++ engines/gob/pregob/pregob.cpp | 35 +++++++++++++++++++++++ engines/gob/pregob/pregob.h | 43 ++++++++++++++++++++++++++++ 12 files changed, 380 insertions(+), 4 deletions(-) create mode 100644 engines/gob/pregob/onceupon/abracadabra.cpp create mode 100644 engines/gob/pregob/onceupon/abracadabra.h create mode 100644 engines/gob/pregob/onceupon/babayaga.cpp create mode 100644 engines/gob/pregob/onceupon/babayaga.h create mode 100644 engines/gob/pregob/onceupon/onceupon.cpp create mode 100644 engines/gob/pregob/onceupon/onceupon.h create mode 100644 engines/gob/pregob/pregob.cpp create mode 100644 engines/gob/pregob/pregob.h diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index ef9a7112f9..02aea63377 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -48,6 +48,10 @@ #include "gob/videoplayer.h" #include "gob/save/saveload.h" +#include "gob/pregob/pregob.h" +#include "gob/pregob/onceupon/abracadabra.h" +#include "gob/pregob/onceupon/babayaga.h" + namespace Gob { #define MAX_TIME_DELTA 100 @@ -115,7 +119,7 @@ GobEngine::GobEngine(OSystem *syst) : Engine(syst), _rnd("gob") { _vidPlayer = 0; _init = 0; _inter = 0; _map = 0; _palAnim = 0; _scenery = 0; _draw = 0; _util = 0; _video = 0; - _saveLoad = 0; + _saveLoad = 0; _preGob = 0; _pauseStart = 0; @@ -398,7 +402,6 @@ Common::Error GobEngine::initGameParts() { // just detect some devices some of which will be always there if the music is not disabled _noMusic = MidiDriver::getMusicType(MidiDriver::detectDevice(MDT_PCSPK | MDT_MIDI | MDT_ADLIB)) == MT_NULL ? true : false; - _saveLoad = 0; _global = new Global(this); _util = new Util(this); @@ -607,6 +610,28 @@ Common::Error GobEngine::initGameParts() { _saveLoad = new SaveLoad_v2(this, _targetName.c_str()); break; + case kGameTypeAbracadabra: + _init = new Init_v2(this); + _video = new Video_v2(this); + _mult = new Mult_v2(this); + _draw = new Draw_v2(this); + _map = new Map_v2(this); + _goblin = new Goblin_v2(this); + _scenery = new Scenery_v2(this); + _preGob = new OnceUpon::Abracadabra(this); + break; + + case kGameTypeBabaYaga: + _init = new Init_v2(this); + _video = new Video_v2(this); + _mult = new Mult_v2(this); + _draw = new Draw_v2(this); + _map = new Map_v2(this); + _goblin = new Goblin_v2(this); + _scenery = new Scenery_v2(this); + _preGob = new OnceUpon::BabaYaga(this); + break; + default: deinitGameParts(); return Common::kUnsupportedGameidError; @@ -615,12 +640,14 @@ Common::Error GobEngine::initGameParts() { // Setup mixer syncSoundSettings(); - _inter->setupOpcodes(); + if (_inter) + _inter->setupOpcodes(); return Common::kNoError; } void GobEngine::deinitGameParts() { + delete _preGob; _preGob = 0; delete _saveLoad; _saveLoad = 0; delete _mult; _mult = 0; delete _vidPlayer; _vidPlayer = 0; diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 5d4c3d7c55..9b919098d6 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -75,6 +75,7 @@ class Scenery; class Util; class SaveLoad; class GobConsole; +class PreGob; #define WRITE_VAR_UINT32(var, val) _vm->_inter->_variables->writeVar32(var, val) #define WRITE_VAR_UINT16(var, val) _vm->_inter->_variables->writeVar16(var, val) @@ -223,6 +224,7 @@ public: Inter *_inter; SaveLoad *_saveLoad; VideoPlayer *_vidPlayer; + PreGob *_preGob; const char *getLangDesc(int16 language) const; void validateLanguage(); diff --git a/engines/gob/init.cpp b/engines/gob/init.cpp index a61261f355..814d4d1821 100644 --- a/engines/gob/init.cpp +++ b/engines/gob/init.cpp @@ -34,9 +34,13 @@ #include "gob/inter.h" #include "gob/video.h" #include "gob/videoplayer.h" + +#include "gob/sound/sound.h" + #include "gob/demos/scnplayer.h" #include "gob/demos/batplayer.h" -#include "gob/sound/sound.h" + +#include "gob/pregob/pregob.h" namespace Gob { @@ -118,6 +122,14 @@ void Init::initGame() { return; } + if (_vm->_preGob) { + _vm->_preGob->run(); + delete _palDesc; + _vm->_video->initPrimary(-1); + cleanup(); + return; + } + Common::SeekableReadStream *infFile = _vm->_dataIO->getFile("intro.inf"); if (!infFile) { diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 3395046b6c..8a792049e8 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -77,6 +77,10 @@ MODULE_OBJS := \ demos/scnplayer.o \ demos/batplayer.o \ detection/detection.o \ + pregob/pregob.o \ + pregob/onceupon/onceupon.o \ + pregob/onceupon/abracadabra.o \ + pregob/onceupon/babayaga.o \ minigames/geisha/evilfish.o \ minigames/geisha/oko.o \ minigames/geisha/meter.o \ diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp new file mode 100644 index 0000000000..14a362ce12 --- /dev/null +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -0,0 +1,43 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/textconsole.h" + +#include "gob/pregob/onceupon/abracadabra.h" + +namespace Gob { + +namespace OnceUpon { + +Abracadabra::Abracadabra(GobEngine *vm) : OnceUpon(vm) { +} + +Abracadabra::~Abracadabra() { +} + +void Abracadabra::run() { + warning("TODO: Abracadabra::run()"); +} + +} // End of namespace OnceUpon + +} // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/abracadabra.h b/engines/gob/pregob/onceupon/abracadabra.h new file mode 100644 index 0000000000..855d2bf131 --- /dev/null +++ b/engines/gob/pregob/onceupon/abracadabra.h @@ -0,0 +1,44 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_PREGOB_ONCEUPON_ABRACADABRA_H +#define GOB_PREGOB_ONCEUPON_ABRACADABRA_H + +#include "gob/pregob/onceupon/onceupon.h" + +namespace Gob { + +namespace OnceUpon { + +class Abracadabra : public OnceUpon { +public: + Abracadabra(GobEngine *vm); + ~Abracadabra(); + + void run(); +}; + +} // End of namespace OnceUpon + +} // End of namespace Gob + +#endif // GOB_PREGOB_ONCEUPON_ABRACADABRA_H diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp new file mode 100644 index 0000000000..f2c7569460 --- /dev/null +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -0,0 +1,43 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/textconsole.h" + +#include "gob/pregob/onceupon/babayaga.h" + +namespace Gob { + +namespace OnceUpon { + +BabaYaga::BabaYaga(GobEngine *vm) : OnceUpon(vm) { +} + +BabaYaga::~BabaYaga() { +} + +void BabaYaga::run() { + warning("TODO: BabaYaga::run()"); +} + +} // End of namespace OnceUpon + +} // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/babayaga.h b/engines/gob/pregob/onceupon/babayaga.h new file mode 100644 index 0000000000..b3339b0ca8 --- /dev/null +++ b/engines/gob/pregob/onceupon/babayaga.h @@ -0,0 +1,44 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_PREGOB_ONCEUPON_BABAYAGA_H +#define GOB_PREGOB_ONCEUPON_BABAYAGA_H + +#include "gob/pregob/onceupon/onceupon.h" + +namespace Gob { + +namespace OnceUpon { + +class BabaYaga : public OnceUpon { +public: + BabaYaga(GobEngine *vm); + ~BabaYaga(); + + void run(); +}; + +} // End of namespace OnceUpon + +} // End of namespace Gob + +#endif // GOB_PREGOB_ONCEUPON_BABAYAGA_H diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp new file mode 100644 index 0000000000..639f5b1ee8 --- /dev/null +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -0,0 +1,37 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "gob/pregob/onceupon/onceupon.h" + +namespace Gob { + +namespace OnceUpon { + +OnceUpon::OnceUpon(GobEngine *vm) : PreGob(vm) { +} + +OnceUpon::~OnceUpon() { +} + +} // End of namespace OnceUpon + +} // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h new file mode 100644 index 0000000000..f937701537 --- /dev/null +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -0,0 +1,42 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_PREGOB_ONCEUPON_ONCEUPON_H +#define GOB_PREGOB_ONCEUPON_ONCEUPON_H + +#include "gob/pregob/pregob.h" + +namespace Gob { + +namespace OnceUpon { + +class OnceUpon : public PreGob { +public: + OnceUpon(GobEngine *vm); + ~OnceUpon(); +}; + +} // End of namespace OnceUpon + +} // End of namespace Gob + +#endif // GOB_PREGOB_ONCEUPON_ONCEUPON_H diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp new file mode 100644 index 0000000000..ab47adaac6 --- /dev/null +++ b/engines/gob/pregob/pregob.cpp @@ -0,0 +1,35 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "gob/gob.h" + +#include "gob/pregob/pregob.h" + +namespace Gob { + +PreGob::PreGob(GobEngine *vm) : _vm(vm) { +} + +PreGob::~PreGob() { +} + +} // End of namespace Gob diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h new file mode 100644 index 0000000000..e77e0ba17b --- /dev/null +++ b/engines/gob/pregob/pregob.h @@ -0,0 +1,43 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_PREGOB_PREGOB_H +#define GOB_PREGOB_PREGOB_H + +namespace Gob { + +class GobEngine; + +class PreGob { +public: + PreGob(GobEngine *vm); + virtual ~PreGob(); + + virtual void run() = 0; + +protected: + GobEngine *_vm; +}; + +} // End of namespace Gob + +#endif // GOB_PREGOB_PREGOB_H -- cgit v1.2.3 From 8b19e10104a98a95963ad2ee97b255d6804e7fdd Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 28 Jun 2012 03:38:27 +0200 Subject: GOB: Add some generic PreGob graphics functions --- engines/gob/pregob/pregob.cpp | 60 ++++++++++++++++++++++++++++++++++++++++++- engines/gob/pregob/pregob.h | 17 ++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index ab47adaac6..aea290214c 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -21,15 +21,73 @@ */ #include "gob/gob.h" +#include "gob/global.h" +#include "gob/util.h" +#include "gob/palanim.h" +#include "gob/draw.h" +#include "gob/video.h" #include "gob/pregob/pregob.h" namespace Gob { -PreGob::PreGob(GobEngine *vm) : _vm(vm) { +PreGob::PreGob(GobEngine *vm) : _vm(vm), _fadedOut(false) { } PreGob::~PreGob() { } +void PreGob::fadeOut() { + if (_fadedOut || _vm->shouldQuit()) + return; + + // Fade to black + _vm->_palAnim->fade(0, 0, 0); + + _fadedOut = true; +} + +void PreGob::fadeIn() { + if (!_fadedOut || _vm->shouldQuit()) + return; + + // Fade to palette + _vm->_draw->blitInvalidated(); + _vm->_palAnim->fade(_vm->_global->_pPaletteDesc, 0, 0); + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, 0, 0, 319, 199); + + _fadedOut = false; +} + +void PreGob::clearScreen() { + _vm->_draw->_backSurface->clear(); + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, 0, 0, 319, 199); + _vm->_draw->blitInvalidated(); + _vm->_video->retrace(); +} + +void PreGob::initScreen() { + _vm->_util->setFrameRate(15); + + _fadedOut = true; + + _vm->_draw->initScreen(); + + _vm->_draw->_backSurface->clear(); + _vm->_util->clearPalette(); + + _vm->_draw->forceBlit(); + _vm->_video->retrace(); + + _vm->_util->processInput(); +} + +void PreGob::setPalette(const byte *palette, uint16 size) { + memcpy(_vm->_draw->_vgaPalette, palette, 3 * size); + + // If we didn't fade out prior, immediately set the palette + if (!_fadedOut) + _vm->_video->setFullPalette(_vm->_global->_pPaletteDesc); +} + } // End of namespace Gob diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index e77e0ba17b..6418d6fd8a 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -35,7 +35,24 @@ public: virtual void run() = 0; protected: + void initScreen(); ///< Initialize the game screen. + + void fadeOut(); ///< Fade to black. + void fadeIn(); ///< Fade to the current palette. + + void clearScreen(); + + /** Change the palette. + * + * @param palette The palette to change to. + * @param size Size of the palette in colors. + */ + void setPalette(const byte *palette, uint16 size); ///< Change the palette + GobEngine *_vm; + +private: + bool _fadedOut; ///< Did we fade out? }; } // End of namespace Gob -- cgit v1.2.3 From 38fe3c3cd9e656b3e3f2b35011895d6703a1a896 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 28 Jun 2012 03:39:33 +0200 Subject: GOB: Add palettes for Once Upon A Time --- engines/gob/pregob/onceupon/abracadabra.cpp | 2 + engines/gob/pregob/onceupon/babayaga.cpp | 2 + engines/gob/pregob/onceupon/onceupon.cpp | 150 ++++++++++++++++++++++++++++ engines/gob/pregob/onceupon/onceupon.h | 8 ++ 4 files changed, 162 insertions(+) diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp index 14a362ce12..84d84e89a5 100644 --- a/engines/gob/pregob/onceupon/abracadabra.cpp +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -36,6 +36,8 @@ Abracadabra::~Abracadabra() { void Abracadabra::run() { warning("TODO: Abracadabra::run()"); + + initScreen(); } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp index f2c7569460..21355ab9ed 100644 --- a/engines/gob/pregob/onceupon/babayaga.cpp +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -36,6 +36,8 @@ BabaYaga::~BabaYaga() { void BabaYaga::run() { warning("TODO: BabaYaga::run()"); + + initScreen(); } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 639f5b1ee8..35127cbfb3 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -20,8 +20,147 @@ * */ +#include "gob/gob.h" +#include "gob/util.h" +#include "gob/dataio.h" +#include "gob/draw.h" +#include "gob/video.h" + #include "gob/pregob/onceupon/onceupon.h" +static const int kPaletteSize = 16; +static const uint kPaletteCount = 20; + +static const byte kCopyProtectionPalette[3 * kPaletteSize] = { + 0x00, 0x00, 0x00, 0x19, 0x00, 0x19, 0x00, 0x3F, 0x00, 0x00, 0x2A, 0x2A, + 0x2A, 0x00, 0x00, 0x2A, 0x00, 0x2A, 0x2A, 0x15, 0x00, 0x00, 0x19, 0x12, + 0x00, 0x00, 0x00, 0x15, 0x15, 0x3F, 0x15, 0x3F, 0x15, 0x00, 0x20, 0x3F, + 0x3F, 0x00, 0x00, 0x3F, 0x00, 0x20, 0x3F, 0x3F, 0x00, 0x3F, 0x3F, 0x3F +}; + +static const byte kGamePalettes[kPaletteCount][3 * kPaletteSize] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x18, 0x00, 0x00, 0x3C, + 0x1C, 0x28, 0x00, 0x10, 0x18, 0x00, 0x1C, 0x1C, 0x20, 0x14, 0x14, 0x14, + 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x14, 0x20, 0x04, + 0x3C, 0x2C, 0x00, 0x02, 0x00, 0x18, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00, + 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x38, 0x20, 0x3C, 0x2C, 0x10, 0x30, 0x20, 0x08, 0x28, + 0x14, 0x00, 0x1C, 0x20, 0x20, 0x38, 0x18, 0x18, 0x2C, 0x10, 0x10, 0x24, + 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x3C, 0x20, 0x20, 0x24, 0x14, 0x14, 0x1C, 0x10, 0x10, + 0x14, 0x0C, 0x0C, 0x1C, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, + 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x10, 0x28, 0x1C, 0x10, 0x1C, 0x10, 0x10, 0x14, 0x0C, + 0x1C, 0x1C, 0x3C, 0x24, 0x24, 0x3C, 0x18, 0x18, 0x24, 0x10, 0x10, 0x18, + 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x3F, 0x26, 0x3F, 0x36, 0x1C, 0x36, 0x2C, 0x12, 0x2A, + 0x27, 0x0C, 0x24, 0x22, 0x07, 0x1E, 0x1D, 0x03, 0x18, 0x16, 0x00, 0x10, + 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3A, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x3F, 0x39, 0x26, 0x38, 0x34, 0x1C, 0x30, 0x2F, 0x13, + 0x27, 0x29, 0x0C, 0x1D, 0x22, 0x07, 0x14, 0x1B, 0x03, 0x0C, 0x14, 0x00, + 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3A, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x1C, 0x34, 0x38, 0x14, 0x2C, 0x30, + 0x0C, 0x20, 0x2C, 0x08, 0x18, 0x28, 0x04, 0x10, 0x20, 0x00, 0x08, 0x1C, + 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x38, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x3C, 0x2C, 0x24, 0x38, 0x24, 0x1C, 0x30, 0x1C, 0x14, + 0x28, 0x18, 0x0C, 0x20, 0x10, 0x04, 0x1C, 0x0C, 0x00, 0x14, 0x08, 0x00, + 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x38, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x3C, 0x34, 0x24, 0x38, 0x2C, 0x1C, 0x30, 0x24, 0x14, + 0x2C, 0x1C, 0x10, 0x30, 0x30, 0x3C, 0x1C, 0x1C, 0x38, 0x0C, 0x0C, 0x38, + 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x02, 0x03, 0x14, 0x07, 0x07, 0x1D, + 0x0E, 0x0E, 0x25, 0x17, 0x17, 0x2E, 0x21, 0x22, 0x36, 0x2F, 0x2F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3B, 0x0D, 0x3A, 0x31, 0x0A, 0x35, 0x28, 0x07, + 0x30, 0x21, 0x04, 0x2B, 0x19, 0x02, 0x26, 0x12, 0x01, 0x16, 0x0B, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x21, 0x01, 0x00, 0x2A, 0x02, 0x00, + 0x33, 0x03, 0x00, 0x3D, 0x06, 0x00, 0x2A, 0x19, 0x05, 0x15, 0x14, 0x14, + 0x22, 0x1F, 0x1E, 0x2F, 0x2C, 0x28, 0x3F, 0x3C, 0x29, 0x3F, 0x38, 0x0B, + 0x3B, 0x30, 0x0A, 0x37, 0x29, 0x08, 0x33, 0x23, 0x07, 0x2F, 0x1D, 0x06 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x1C, 0x38, 0x34, 0x30, 0x28, 0x2C, 0x24, 0x1C, + 0x24, 0x18, 0x10, 0x1C, 0x10, 0x08, 0x14, 0x04, 0x04, 0x10, 0x00, 0x00, + 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x38, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x1C, 0x38, 0x34, 0x30, 0x28, 0x2C, 0x24, 0x1C, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x38, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x1A, 0x30, 0x37, 0x14, 0x28, 0x31, 0x10, 0x20, 0x2C, + 0x0C, 0x19, 0x27, 0x08, 0x12, 0x21, 0x05, 0x0C, 0x1C, 0x03, 0x07, 0x16, + 0x01, 0x03, 0x11, 0x00, 0x00, 0x0C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x34, 0x30, 0x34, 0x30, 0x24, 0x30, 0x28, 0x1C, 0x28, + 0x24, 0x14, 0x24, 0x1C, 0x0C, 0x1C, 0x18, 0x08, 0x18, 0x14, 0x04, 0x14, + 0x0C, 0x04, 0x0C, 0x08, 0x00, 0x08, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x2C, 0x24, 0x0C, 0x34, 0x34, 0x28, 0x2C, 0x2C, 0x1C, + 0x24, 0x24, 0x10, 0x1C, 0x18, 0x08, 0x14, 0x14, 0x08, 0x10, 0x10, 0x04, + 0x0C, 0x0C, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x38, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x28, 0x31, 0x10, 0x20, 0x2C, + 0x0C, 0x19, 0x27, 0x08, 0x12, 0x21, 0x05, 0x0C, 0x1C, 0x03, 0x07, 0x16, + 0x01, 0x03, 0x11, 0x00, 0x3C, 0x00, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x10, 0x28, 0x1C, 0x10, 0x1C, 0x10, 0x10, 0x14, 0x0C, + 0x1C, 0x1C, 0x3C, 0x24, 0x24, 0x3C, 0x18, 0x18, 0x24, 0x10, 0x10, 0x18, + 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x10, 0x28, 0x1C, 0x10, 0x1C, 0x10, 0x10, 0x14, 0x0C, + 0x1C, 0x1C, 0x3C, 0x24, 0x24, 0x3C, 0x18, 0x18, 0x24, 0x10, 0x10, 0x18, + 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 + } +}; + namespace Gob { namespace OnceUpon { @@ -32,6 +171,17 @@ OnceUpon::OnceUpon(GobEngine *vm) : PreGob(vm) { OnceUpon::~OnceUpon() { } +void OnceUpon::setCopyProtectionPalette() { + setPalette(kCopyProtectionPalette, kPaletteSize); +} + +void OnceUpon::setGamePalette(uint palette) { + if (palette >= kPaletteCount) + return; + + setPalette(kGamePalettes[palette], kPaletteSize); +} + } // End of namespace OnceUpon } // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index f937701537..816d4dc051 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -23,6 +23,8 @@ #ifndef GOB_PREGOB_ONCEUPON_ONCEUPON_H #define GOB_PREGOB_ONCEUPON_ONCEUPON_H +#include "common/system.h" + #include "gob/pregob/pregob.h" namespace Gob { @@ -33,6 +35,12 @@ class OnceUpon : public PreGob { public: OnceUpon(GobEngine *vm); ~OnceUpon(); + +protected: + void setGamePalette(uint palette); + +private: + void setCopyProtectionPalette(); }; } // End of namespace OnceUpon -- cgit v1.2.3 From 27782700a5631a25129b12779abb540a906f6a96 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 28 Jun 2012 17:45:02 +0200 Subject: GOB: Add some PreGob and Once Upon A Time cursor functions --- engines/gob/draw.cpp | 4 ++- engines/gob/draw_v2.cpp | 5 +++- engines/gob/pregob/onceupon/onceupon.cpp | 1 + engines/gob/pregob/onceupon/onceupon.h | 2 ++ engines/gob/pregob/pregob.cpp | 47 ++++++++++++++++++++++++++++++++ engines/gob/pregob/pregob.h | 14 ++++++++++ engines/gob/video.cpp | 2 +- 7 files changed, 72 insertions(+), 3 deletions(-) diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index 3932987e0a..8c6919416d 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -271,7 +271,9 @@ void Draw::blitInvalidated() { return; } - _showCursor = (_showCursor & ~2) | ((_showCursor & 1) << 1); + if (_cursorSprites) + _showCursor = (_showCursor & ~2) | ((_showCursor & 1) << 1); + if (_applyPal) { clearPalette(); forceBlit(); diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index ac43c7b86a..f5475278c4 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -74,13 +74,16 @@ void Draw_v2::closeScreen() { } void Draw_v2::blitCursor() { - if (_cursorIndex == -1) + if (!_cursorSprites || (_cursorIndex == -1)) return; _showCursor = (_showCursor & ~2) | ((_showCursor & 1) << 1); } void Draw_v2::animateCursor(int16 cursor) { + if (!_cursorSprites) + return; + int16 cursorIndex = cursor; int16 newX = 0, newY = 0; uint16 hotspotX, hotspotY; diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 35127cbfb3..7f7dffa7ec 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -23,6 +23,7 @@ #include "gob/gob.h" #include "gob/util.h" #include "gob/dataio.h" +#include "gob/surface.h" #include "gob/draw.h" #include "gob/video.h" diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 816d4dc051..c1c4d6fa0d 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -29,6 +29,8 @@ namespace Gob { +class Surface; + namespace OnceUpon { class OnceUpon : public PreGob { diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index aea290214c..18aac50352 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -20,9 +20,12 @@ * */ +#include "graphics/cursorman.h" + #include "gob/gob.h" #include "gob/global.h" #include "gob/util.h" +#include "gob/surface.h" #include "gob/palanim.h" #include "gob/draw.h" #include "gob/video.h" @@ -90,4 +93,48 @@ void PreGob::setPalette(const byte *palette, uint16 size) { _vm->_video->setFullPalette(_vm->_global->_pPaletteDesc); } +void PreGob::addCursor() { + CursorMan.pushCursor(0, 0, 0, 0, 0, 0); +} + +void PreGob::removeCursor() { + CursorMan.popCursor(); +} + +void PreGob::setCursor(Surface &sprite, int16 hotspotX, int16 hotspotY) { + CursorMan.replaceCursor(sprite.getData(), sprite.getWidth(), sprite.getHeight(), hotspotX, hotspotY, 0); +} + +void PreGob::setCursor(Surface &sprite, int16 left, int16 top, int16 right, int16 bottom, + int16 hotspotX, int16 hotspotY) { + + const int width = right - left + 1; + const int height = bottom - top + 1; + + if ((width <= 0) || (height <= 0)) + return; + + Surface cursor(width, height, 1); + + cursor.blit(sprite, left, top, right, bottom, 0, 0); + + setCursor(cursor, hotspotX, hotspotX); +} + +void PreGob::showCursor() { + CursorMan.showMouse(true); + + _vm->_draw->_showCursor = 4; +} + +void PreGob::hideCursor() { + CursorMan.showMouse(false); + + _vm->_draw->_showCursor = 0; +} + +bool PreGob::isCursorVisible() const { + return CursorMan.isVisible(); +} + } // End of namespace Gob diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index 6418d6fd8a..e0f7ca907d 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -26,6 +26,7 @@ namespace Gob { class GobEngine; +class Surface; class PreGob { public: @@ -49,6 +50,19 @@ protected: */ void setPalette(const byte *palette, uint16 size); ///< Change the palette + void addCursor(); + void removeCursor(); + + void setCursor(Surface &sprite, int16 hotspotX, int16 hotspotY); + void setCursor(Surface &sprite, int16 left, int16 top, int16 right, int16 bottom, + int16 hotspotX, int16 hotspotY); + + void showCursor(); + void hideCursor(); + + bool isCursorVisible() const; + + GobEngine *_vm; private: diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index 8bcf14e040..62bb210a8e 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -242,7 +242,7 @@ void Video::setSize(bool defaultTo1XScaler) { void Video::retrace(bool mouse) { if (mouse) - CursorMan.showMouse((_vm->_draw->_showCursor & 2) != 0); + CursorMan.showMouse((_vm->_draw->_showCursor & 6) != 0); if (_vm->_global->_primarySurfDesc) { int screenX = _screenDeltaX; -- cgit v1.2.3 From 83896dea3edc3bcfb1e414b61644c7ca266e1cce Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 28 Jun 2012 21:25:54 +0200 Subject: GOB: Add PreGob input/event utility functions --- engines/gob/pregob/pregob.cpp | 44 +++++++++++++++++++++++++++++++++++++++++++ engines/gob/pregob/pregob.h | 9 +++++++++ 2 files changed, 53 insertions(+) diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index 18aac50352..1c3fb8221c 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -137,4 +137,48 @@ bool PreGob::isCursorVisible() const { return CursorMan.isVisible(); } +void PreGob::endFrame(bool doInput) { + _vm->_draw->blitInvalidated(); + _vm->_util->waitEndFrame(); + + if (doInput) + _vm->_util->processInput(); +} + +int16 PreGob::checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons) { + _vm->_util->getMouseState(&mouseX, &mouseY, &mouseButtons); + _vm->_util->forceMouseUp(); + + return _vm->_util->checkKey(); +} + +int16 PreGob::waitInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons) { + bool finished = false; + + int16 key = 0; + while (!_vm->shouldQuit() && !finished) { + endFrame(true); + + key = checkInput(mouseX, mouseY, mouseButtons); + + finished = (mouseButtons != kMouseButtonsNone) || (key != 0); + } + + return key; +} + +int16 PreGob::waitInput() { + int16 mouseX, mouseY; + MouseButtons mouseButtons; + + return waitInput(mouseX, mouseY, mouseButtons); +} + +bool PreGob::hasInput() { + int16 mouseX, mouseY; + MouseButtons mouseButtons; + + return checkInput(mouseX, mouseY, mouseButtons) || (mouseButtons != kMouseButtonsNone); +} + } // End of namespace Gob diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index e0f7ca907d..4cf4a39fdb 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -23,6 +23,8 @@ #ifndef GOB_PREGOB_PREGOB_H #define GOB_PREGOB_PREGOB_H +#include "gob/util.h" + namespace Gob { class GobEngine; @@ -62,6 +64,13 @@ protected: bool isCursorVisible() const; + void endFrame(bool doInput); + + int16 checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons); + int16 waitInput (int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons); + int16 waitInput(); + bool hasInput(); + GobEngine *_vm; -- cgit v1.2.3 From 4fc3a88c5f0b053323aeaeac658dafb8e4606662 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 28 Jun 2012 22:54:05 +0200 Subject: GOB: Add support for different methods of handling Endianness The Once Upon A Time games handle endianness different in ANI, DEC and RXY files than Geisha does. We need to support both approaches. --- engines/gob/anifile.cpp | 34 +++++++++++++++++++++------------- engines/gob/cmpfile.cpp | 9 ++++++++- engines/gob/decfile.cpp | 42 +++++++++++++++++++++++++----------------- engines/gob/gob.cpp | 8 ++++++++ engines/gob/gob.h | 10 ++++++++++ engines/gob/rxyfile.cpp | 19 +++++++++++++------ engines/gob/rxyfile.h | 4 +++- 7 files changed, 88 insertions(+), 38 deletions(-) diff --git a/engines/gob/anifile.cpp b/engines/gob/anifile.cpp index 2671fe0405..e6bf30f4d7 100644 --- a/engines/gob/anifile.cpp +++ b/engines/gob/anifile.cpp @@ -37,30 +37,38 @@ ANIFile::ANIFile(GobEngine *vm, const Common::String &fileName, uint16 width, uint8 bpp) : _vm(vm), _width(width), _bpp(bpp), _hasPadding(false) { - Common::SeekableReadStream *ani = _vm->_dataIO->getFile(fileName); - if (ani) { - Common::SeekableSubReadStreamEndian sub(ani, 0, ani->size(), false, DisposeAfterUse::YES); + bool bigEndian = false; + Common::String endianFileName = fileName; - load(sub, fileName); - return; - } + if ((_vm->getEndiannessMethod() == kEndiannessMethodAltFile) && + !_vm->_dataIO->hasFile(fileName)) { + // If the game has alternate big-endian files, look if one exist + + Common::String alternateFileName = fileName; + alternateFileName.setChar('_', 0); - // File doesn't exist, try to open the big-endian'd alternate file - Common::String alternateFileName = fileName; - alternateFileName.setChar('_', 0); + if (_vm->_dataIO->hasFile(alternateFileName)) { + bigEndian = true; + endianFileName = alternateFileName; + } + } else if ((_vm->getEndiannessMethod() == kEndiannessMethodBE) || + ((_vm->getEndiannessMethod() == kEndiannessMethodSystem) && + (_vm->getEndianness() == kEndiannessBE))) + // Game always little endian or it follows the system and it is big endian + bigEndian = true; - ani = _vm->_dataIO->getFile(alternateFileName); + Common::SeekableReadStream *ani = _vm->_dataIO->getFile(endianFileName); if (ani) { - Common::SeekableSubReadStreamEndian sub(ani, 0, ani->size(), true, DisposeAfterUse::YES); + Common::SeekableSubReadStreamEndian sub(ani, 0, ani->size(), bigEndian, DisposeAfterUse::YES); // The big endian version pads a few fields to even size - _hasPadding = true; + _hasPadding = bigEndian; load(sub, fileName); return; } - warning("ANIFile::ANIFile(): No such file \"%s\"", fileName.c_str()); + warning("ANIFile::ANIFile(): No such file \"%s\" (\"%s\")", endianFileName.c_str(), fileName.c_str()); } ANIFile::~ANIFile() { diff --git a/engines/gob/cmpfile.cpp b/engines/gob/cmpfile.cpp index 7b21c4c835..1cd1375879 100644 --- a/engines/gob/cmpfile.cpp +++ b/engines/gob/cmpfile.cpp @@ -21,6 +21,7 @@ */ #include "common/stream.h" +#include "common/substream.h" #include "common/str.h" #include "gob/gob.h" @@ -143,7 +144,13 @@ void CMPFile::loadCMP(Common::SeekableReadStream &cmp) { } void CMPFile::loadRXY(Common::SeekableReadStream &rxy) { - _coordinates = new RXYFile(rxy); + bool bigEndian = (_vm->getEndiannessMethod() == kEndiannessMethodBE) || + ((_vm->getEndiannessMethod() == kEndiannessMethodSystem) && + (_vm->getEndianness() == kEndiannessBE)); + + Common::SeekableSubReadStreamEndian sub(&rxy, 0, rxy.size(), bigEndian, DisposeAfterUse::NO); + + _coordinates = new RXYFile(sub); for (uint i = 0; i < _coordinates->size(); i++) { const RXYFile::Coordinates &c = (*_coordinates)[i]; diff --git a/engines/gob/decfile.cpp b/engines/gob/decfile.cpp index fb67c52627..85b4c09ca3 100644 --- a/engines/gob/decfile.cpp +++ b/engines/gob/decfile.cpp @@ -38,30 +38,38 @@ DECFile::DECFile(GobEngine *vm, const Common::String &fileName, uint16 width, uint16 height, uint8 bpp) : _vm(vm), _width(width), _height(height), _bpp(bpp), _hasPadding(false), _backdrop(0) { - Common::SeekableReadStream *dec = _vm->_dataIO->getFile(fileName); - if (dec) { - Common::SeekableSubReadStreamEndian sub(dec, 0, dec->size(), false, DisposeAfterUse::YES); - - load(sub, fileName); - return; - } - - // File doesn't exist, try to open the big-endian'd alternate file - Common::String alternateFileName = fileName; - alternateFileName.setChar('_', 0); - - dec = _vm->_dataIO->getFile(alternateFileName); - if (dec) { - Common::SeekableSubReadStreamEndian sub(dec, 0, dec->size(), true, DisposeAfterUse::YES); + bool bigEndian = false; + Common::String endianFileName = fileName; + + if ((_vm->getEndiannessMethod() == kEndiannessMethodAltFile) && + !_vm->_dataIO->hasFile(fileName)) { + // If the game has alternate big-endian files, look if one exist + + Common::String alternateFileName = fileName; + alternateFileName.setChar('_', 0); + + if (_vm->_dataIO->hasFile(alternateFileName)) { + bigEndian = true; + endianFileName = alternateFileName; + } + } else if ((_vm->getEndiannessMethod() == kEndiannessMethodBE) || + ((_vm->getEndiannessMethod() == kEndiannessMethodSystem) && + (_vm->getEndianness() == kEndiannessBE))) + // Game always little endian or it follows the system and it is big endian + bigEndian = true; + + Common::SeekableReadStream *ani = _vm->_dataIO->getFile(endianFileName); + if (ani) { + Common::SeekableSubReadStreamEndian sub(ani, 0, ani->size(), bigEndian, DisposeAfterUse::YES); // The big endian version pads a few fields to even size - _hasPadding = true; + _hasPadding = bigEndian; load(sub, fileName); return; } - warning("DECFile::DECFile(): No such file \"%s\"", fileName.c_str()); + warning("DECFile::DECFile(): No such file \"%s\" (\"%s\")", endianFileName.c_str(), fileName.c_str()); } DECFile::~DECFile() { diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 02aea63377..fcf98f0355 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -184,6 +184,10 @@ void GobEngine::validateVideoMode(int16 videoMode) { error("Video mode 0x%X is not supported", videoMode); } +EndiannessMethod GobEngine::getEndiannessMethod() const { + return _endiannessMethod; +} + Endianness GobEngine::getEndianness() const { if ((getPlatform() == Common::kPlatformAmiga) || (getPlatform() == Common::kPlatformMacintosh) || @@ -403,6 +407,8 @@ Common::Error GobEngine::initGameParts() { // just detect some devices some of which will be always there if the music is not disabled _noMusic = MidiDriver::getMusicType(MidiDriver::detectDevice(MDT_PCSPK | MDT_MIDI | MDT_ADLIB)) == MT_NULL ? true : false; + _endiannessMethod = kEndiannessMethodSystem; + _global = new Global(this); _util = new Util(this); _dataIO = new DataIO(); @@ -433,6 +439,8 @@ Common::Error GobEngine::initGameParts() { _goblin = new Goblin_v1(this); _scenery = new Scenery_v1(this); _saveLoad = new SaveLoad_Geisha(this, _targetName.c_str()); + + _endiannessMethod = kEndiannessMethodAltFile; break; case kGameTypeFascination: diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 9b919098d6..df73404596 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -149,6 +149,13 @@ enum Features { kFeaturesTrueColor = 1 << 7 }; +enum EndiannessMethod { + kEndiannessMethodLE, ///< Always little endian. + kEndiannessMethodBE, ///< Always big endian. + kEndiannessMethodSystem, ///< Follows system endianness. + kEndiannessMethodAltFile ///< Different endianness in alternate file. +}; + enum { kDebugFuncOp = 1 << 0, kDebugDrawOp = 1 << 1, @@ -172,6 +179,8 @@ private: int32 _features; Common::Platform _platform; + EndiannessMethod _endiannessMethod; + uint32 _pauseStart; // Engine APIs @@ -232,6 +241,7 @@ public: void pauseGame(); + EndiannessMethod getEndiannessMethod() const; Endianness getEndianness() const; Common::Platform getPlatform() const; GameType getGameType() const; diff --git a/engines/gob/rxyfile.cpp b/engines/gob/rxyfile.cpp index 9702dc8c7f..2ff8c121cd 100644 --- a/engines/gob/rxyfile.cpp +++ b/engines/gob/rxyfile.cpp @@ -21,12 +21,19 @@ */ #include "common/stream.h" +#include "common/substream.h" #include "gob/rxyfile.h" namespace Gob { RXYFile::RXYFile(Common::SeekableReadStream &rxy) : _width(0), _height(0) { + Common::SeekableSubReadStreamEndian sub(&rxy, 0, rxy.size(), false, DisposeAfterUse::NO); + + load(sub); +} + +RXYFile::RXYFile(Common::SeekableSubReadStreamEndian &rxy) : _width(0), _height(0) { load(rxy); } @@ -64,22 +71,22 @@ const RXYFile::Coordinates &RXYFile::operator[](uint i) const { return _coords[i]; } -void RXYFile::load(Common::SeekableReadStream &rxy) { +void RXYFile::load(Common::SeekableSubReadStreamEndian &rxy) { if (rxy.size() < 2) return; rxy.seek(0); - _realCount = rxy.readUint16LE(); + _realCount = rxy.readUint16(); uint16 count = (rxy.size() - 2) / 8; _coords.resize(count); for (CoordArray::iterator c = _coords.begin(); c != _coords.end(); ++c) { - c->left = rxy.readUint16LE(); - c->right = rxy.readUint16LE(); - c->top = rxy.readUint16LE(); - c->bottom = rxy.readUint16LE(); + c->left = rxy.readUint16(); + c->right = rxy.readUint16(); + c->top = rxy.readUint16(); + c->bottom = rxy.readUint16(); if (c->left != 0xFFFF) { _width = MAX(_width , c->right + 1); diff --git a/engines/gob/rxyfile.h b/engines/gob/rxyfile.h index bc9600b5b0..4fd46c5e40 100644 --- a/engines/gob/rxyfile.h +++ b/engines/gob/rxyfile.h @@ -28,6 +28,7 @@ namespace Common { class SeekableReadStream; + class SeekableSubReadStreamEndian; } namespace Gob { @@ -46,6 +47,7 @@ public: }; RXYFile(Common::SeekableReadStream &rxy); + RXYFile(Common::SeekableSubReadStreamEndian &rxy); RXYFile(uint16 width, uint16 height); ~RXYFile(); @@ -71,7 +73,7 @@ private: uint16 _height; - void load(Common::SeekableReadStream &rxy); + void load(Common::SeekableSubReadStreamEndian &rxy); }; } // End of namespace Gob -- cgit v1.2.3 From 734fc767d25d47b5da703dc1b4a3cfb494234155 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 29 Jun 2012 18:25:11 +0200 Subject: GOB: Open the Once Upon A Time archives --- engines/gob/pregob/onceupon/abracadabra.cpp | 4 ++-- engines/gob/pregob/onceupon/babayaga.cpp | 4 ++-- engines/gob/pregob/onceupon/onceupon.cpp | 29 ++++++++++++++++++++++++++++- engines/gob/pregob/onceupon/onceupon.h | 6 ++++++ 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp index 84d84e89a5..6cfdfa7822 100644 --- a/engines/gob/pregob/onceupon/abracadabra.cpp +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -35,9 +35,9 @@ Abracadabra::~Abracadabra() { } void Abracadabra::run() { - warning("TODO: Abracadabra::run()"); + init(); - initScreen(); + warning("TODO: Abracadabra::run()"); } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp index 21355ab9ed..9f4f53c4e0 100644 --- a/engines/gob/pregob/onceupon/babayaga.cpp +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -35,9 +35,9 @@ BabaYaga::~BabaYaga() { } void BabaYaga::run() { - warning("TODO: BabaYaga::run()"); + init(); - initScreen(); + warning("TODO: BabaYaga::run()"); } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 7f7dffa7ec..e3d1a8535f 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -166,10 +166,37 @@ namespace Gob { namespace OnceUpon { -OnceUpon::OnceUpon(GobEngine *vm) : PreGob(vm) { +OnceUpon::OnceUpon(GobEngine *vm) : PreGob(vm), _openedArchives(false) { + } OnceUpon::~OnceUpon() { + deinit(); +} + +void OnceUpon::init() { + deinit(); + + bool hasSTK1 = _vm->_dataIO->openArchive("stk1.stk", true); + bool hasSTK2 = _vm->_dataIO->openArchive("stk2.stk", true); + bool hasSTK3 = _vm->_dataIO->openArchive("stk3.stk", true); + + if (!hasSTK1 || !hasSTK2 || !hasSTK3) + error("OnceUpon::OnceUpon(): Failed to open archives"); + + _openedArchives = true; + + initScreen(); +} + +void OnceUpon::deinit() { + if (_openedArchives) { + _vm->_dataIO->closeArchive(true); + _vm->_dataIO->closeArchive(true); + _vm->_dataIO->closeArchive(true); + } + + _openedArchives = false; } void OnceUpon::setCopyProtectionPalette() { diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index c1c4d6fa0d..e5f70855ad 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -39,10 +39,16 @@ public: ~OnceUpon(); protected: + void init(); + void deinit(); + void setGamePalette(uint palette); private: void setCopyProtectionPalette(); + + + bool _openedArchives; }; } // End of namespace OnceUpon -- cgit v1.2.3 From 3313302a157fc08d3965c6cb114e3a3f4d366c4b Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 29 Jun 2012 18:28:57 +0200 Subject: GOB: Load the Once Upon A Time fonts --- engines/gob/pregob/onceupon/onceupon.cpp | 22 +++++++++++++++++++++- engines/gob/pregob/onceupon/onceupon.h | 7 +++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index e3d1a8535f..6b12dd8653 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -166,7 +166,8 @@ namespace Gob { namespace OnceUpon { -OnceUpon::OnceUpon(GobEngine *vm) : PreGob(vm), _openedArchives(false) { +OnceUpon::OnceUpon(GobEngine *vm) : PreGob(vm), _jeudak(0), _lettre(0), _plettre(0), _glettre(0), + _openedArchives(false) { } @@ -186,10 +187,29 @@ void OnceUpon::init() { _openedArchives = true; + _jeudak = _vm->_draw->loadFont("jeudak.let"); + _lettre = _vm->_draw->loadFont("lettre.let"); + _plettre = _vm->_draw->loadFont("plettre.let"); + _glettre = _vm->_draw->loadFont("glettre.let"); + + if (!_jeudak || !_lettre || !_plettre || !_glettre) + error("OnceUpon::OnceUpon(): Failed to fonts (%d, %d, %d, %d)", + _jeudak != 0, _lettre != 0, _plettre != 0, _glettre != 0); + initScreen(); } void OnceUpon::deinit() { + delete _jeudak; + delete _lettre; + delete _plettre; + delete _glettre; + + _jeudak = 0; + _lettre = 0; + _plettre = 0; + _glettre = 0; + if (_openedArchives) { _vm->_dataIO->closeArchive(true); _vm->_dataIO->closeArchive(true); diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index e5f70855ad..cfc12532dd 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -30,6 +30,7 @@ namespace Gob { class Surface; +class Font; namespace OnceUpon { @@ -44,6 +45,12 @@ protected: void setGamePalette(uint palette); + + Font *_jeudak; + Font *_lettre; + Font *_plettre; + Font *_glettre; + private: void setCopyProtectionPalette(); -- cgit v1.2.3 From aae8c607596d9ce228935c01297902381c8b442c Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 29 Jun 2012 18:31:09 +0200 Subject: GOB: Verify the language in Once Upon A Time --- engines/gob/pregob/onceupon/onceupon.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 6b12dd8653..adea776297 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -21,6 +21,7 @@ */ #include "gob/gob.h" +#include "gob/global.h" #include "gob/util.h" #include "gob/dataio.h" #include "gob/surface.h" @@ -196,6 +197,15 @@ void OnceUpon::init() { error("OnceUpon::OnceUpon(): Failed to fonts (%d, %d, %d, %d)", _jeudak != 0, _lettre != 0, _plettre != 0, _glettre != 0); + if (_vm->_global->_language == kLanguageAmerican) + _vm->_global->_language = kLanguageBritish; + + if ((_vm->_global->_language >= kLanguageCount)) + error("We do not support the language \"%s\".\n" + "If you are certain that your game copy includes this language,\n" + "please contact the ScummVM team with details about this version.\n" + "Thanks", _vm->getLangDesc(_vm->_global->_language)); + initScreen(); } -- cgit v1.2.3 From 412ae53854dc2ef352a3f3e990f0d2b56d97ad7e Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 29 Jun 2012 19:34:14 +0200 Subject: GOB: Add PreGob animation utility functions --- engines/gob/pregob/pregob.cpp | 21 +++++++++++++++++++++ engines/gob/pregob/pregob.h | 6 ++++++ 2 files changed, 27 insertions(+) diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index 1c3fb8221c..b9c36d7cf8 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -29,6 +29,7 @@ #include "gob/palanim.h" #include "gob/draw.h" #include "gob/video.h" +#include "gob/aniobject.h" #include "gob/pregob/pregob.h" @@ -181,4 +182,24 @@ bool PreGob::hasInput() { return checkInput(mouseX, mouseY, mouseButtons) || (mouseButtons != kMouseButtonsNone); } +void PreGob::clearAnim(ANIObject &ani) { + int16 left, top, right, bottom; + + if (ani.clear(*_vm->_draw->_backSurface, left, top, right, bottom)) + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); +} + +void PreGob::drawAnim(ANIObject &ani) { + int16 left, top, right, bottom; + + if (ani.draw(*_vm->_draw->_backSurface, left, top, right, bottom)) + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + ani.advance(); +} + +void PreGob::redrawAnim(ANIObject &ani) { + clearAnim(ani); + drawAnim(ani); +} + } // End of namespace Gob diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index 4cf4a39fdb..9efdbe8df6 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -30,6 +30,8 @@ namespace Gob { class GobEngine; class Surface; +class ANIObject; + class PreGob { public: PreGob(GobEngine *vm); @@ -71,6 +73,10 @@ protected: int16 waitInput(); bool hasInput(); + void clearAnim(ANIObject &ani); + void drawAnim(ANIObject &ani); + void redrawAnim(ANIObject &ani); + GobEngine *_vm; -- cgit v1.2.3 From ef3b4af9d8d221f52aaed900a2997b486ed2e6e4 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 29 Jun 2012 18:31:45 +0200 Subject: GOB: Implement the copy protection in Once Upon A Time --- engines/gob/pregob/onceupon/abracadabra.cpp | 24 +++ engines/gob/pregob/onceupon/babayaga.cpp | 24 +++ engines/gob/pregob/onceupon/onceupon.cpp | 247 ++++++++++++++++++++++++++++ engines/gob/pregob/onceupon/onceupon.h | 11 ++ 4 files changed, 306 insertions(+) diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp index 6cfdfa7822..d8dd8b3be0 100644 --- a/engines/gob/pregob/onceupon/abracadabra.cpp +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -22,8 +22,28 @@ #include "common/textconsole.h" +#include "gob/gob.h" + #include "gob/pregob/onceupon/abracadabra.h" +static const uint8 kCopyProtectionColors[7] = { + 14, 11, 13, 1, 7, 12, 2 +}; + +static const uint8 kCopyProtectionShapes[7 * 20] = { + 3, 4, 3, 0, 1, 2, 0, 2, 2, 0, 2, 4, 0, 3, 4, 1, 1, 4, 1, 3, + 0, 2, 0, 4, 2, 4, 4, 2, 3, 0, 1, 1, 1, 1, 3, 0, 4, 2, 3, 4, + 0, 0, 1, 2, 1, 1, 2, 4, 3, 1, 4, 2, 4, 4, 2, 4, 1, 2, 3, 3, + 1, 0, 2, 3, 4, 2, 3, 2, 2, 0, 0, 0, 4, 2, 3, 4, 4, 0, 4, 1, + 4, 2, 1, 1, 1, 1, 4, 3, 4, 2, 3, 0, 0, 3, 0, 2, 3, 0, 2, 4, + 4, 2, 4, 3, 0, 4, 0, 2, 3, 1, 4, 1, 3, 1, 0, 0, 2, 1, 3, 2, + 3, 1, 0, 3, 1, 3, 4, 2, 4, 4, 3, 2, 0, 2, 0, 1, 2, 0, 1, 4 +}; + +static const uint8 kCopyProtectionObfuscate[4] = { + 1, 0, 2, 3 +}; + namespace Gob { namespace OnceUpon { @@ -37,6 +57,10 @@ Abracadabra::~Abracadabra() { void Abracadabra::run() { init(); + bool correctCP = doCopyProtection(kCopyProtectionColors, kCopyProtectionShapes, kCopyProtectionObfuscate); + if (_vm->shouldQuit() || !correctCP) + return; + warning("TODO: Abracadabra::run()"); } diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp index 9f4f53c4e0..aad1fc6aca 100644 --- a/engines/gob/pregob/onceupon/babayaga.cpp +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -22,8 +22,28 @@ #include "common/textconsole.h" +#include "gob/gob.h" + #include "gob/pregob/onceupon/babayaga.h" +static const uint8 kCopyProtectionColors[7] = { + 14, 11, 13, 1, 7, 12, 2 +}; + +static const uint8 kCopyProtectionShapes[7 * 20] = { + 0, 0, 1, 2, 1, 1, 2, 4, 3, 1, 4, 2, 4, 4, 2, 4, 1, 2, 3, 3, + 3, 1, 0, 3, 1, 3, 4, 2, 4, 4, 3, 2, 0, 2, 0, 1, 2, 0, 1, 4, + 1, 0, 2, 3, 4, 2, 3, 2, 2, 0, 0, 0, 4, 2, 3, 4, 4, 0, 4, 1, + 0, 2, 0, 4, 2, 4, 4, 2, 3, 0, 1, 1, 1, 1, 3, 0, 4, 2, 3, 4, + 3, 4, 3, 0, 1, 2, 0, 2, 2, 0, 2, 4, 0, 3, 4, 1, 1, 4, 1, 3, + 4, 2, 1, 1, 1, 1, 4, 3, 4, 2, 3, 0, 0, 3, 0, 2, 3, 0, 2, 4, + 4, 2, 4, 3, 0, 4, 0, 2, 3, 1, 4, 1, 3, 1, 0, 0, 2, 1, 3, 2 +}; + +static const uint8 kCopyProtectionObfuscate[4] = { + 0, 1, 2, 3 +}; + namespace Gob { namespace OnceUpon { @@ -37,6 +57,10 @@ BabaYaga::~BabaYaga() { void BabaYaga::run() { init(); + bool correctCP = doCopyProtection(kCopyProtectionColors, kCopyProtectionShapes, kCopyProtectionObfuscate); + if (_vm->shouldQuit() || !correctCP) + return; + warning("TODO: BabaYaga::run()"); } diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index adea776297..aa85e1c095 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -27,6 +27,8 @@ #include "gob/surface.h" #include "gob/draw.h" #include "gob/video.h" +#include "gob/anifile.h" +#include "gob/aniobject.h" #include "gob/pregob/onceupon/onceupon.h" @@ -163,6 +165,62 @@ static const byte kGamePalettes[kPaletteCount][3 * kPaletteSize] = { } }; +static const uint kLanguageCount = 5; + +static const uint kCopyProtectionHelpStringCount = 3; + +static const char *kCopyProtectionHelpStrings[kLanguageCount][kCopyProtectionHelpStringCount] = { + { // French + "Consulte le livret des animaux, rep\212re la", + "page correspondant \205 la couleur de l\'\202cran", + "et clique le symbole associ\202 \205 l\'animal affich\202.", + }, + { // German + "Suche im Tieralbum die Seite, die der Farbe auf", + "dem Bildschirm entspricht und klicke auf das", + "Tiersymbol.", + }, + { // English + "Consult the book of animals, find the page", + "corresponding to the colour of screen and click", + "the symbol associated with the animal displayed.", + }, + { // Spanish + "Consulta el libro de los animales, localiza la ", + "p\240gina que corresponde al color de la pantalla.", + "Cliquea el s\241mbolo asociado al animal que aparece.", + }, + { // Italian + "Guarda il libretto degli animali, trova la", + "pagina che corrisponde al colore dello schermo,", + "clicca il simbolo associato all\'animale presentato", + } +}; + +static const char *kCopyProtectionWrongStrings[kLanguageCount] = { + "Tu t\'es tromp\202, dommage...", // French + "Schade, du hast dich geirrt." , // German + "You are wrong, what a pity!" , // English + "Te equivocas, l\240stima..." , // Spanish + "Sei Sbagliato, peccato..." // Italian +}; + +static const uint kCopyProtectionShapeCount = 5; + +static const int16 kCopyProtectionShapeCoords[kCopyProtectionShapeCount][6] = { + { 0, 51, 26, 75, 60, 154}, + { 28, 51, 58, 81, 96, 151}, + { 60, 51, 94, 79, 136, 152}, + { 96, 51, 136, 71, 180, 155}, + {140, 51, 170, 77, 228, 153} +}; + +enum ClownAnimation { + kClownAnimationClownCheer = 0, + kClownAnimationClownStand = 1, + kClownAnimationClownCry = 6 +}; + namespace Gob { namespace OnceUpon { @@ -240,6 +298,195 @@ void OnceUpon::setGamePalette(uint palette) { setPalette(kGamePalettes[palette], kPaletteSize); } +enum CopyProtectionState { + kCPStateSetup, // Set up the screen + kCPStateWaitUser, // Waiting for the user to pick a shape + kCPStateWaitClown, // Waiting for the clown animation to finish + kCPStateFinish // Finishing +}; + +bool OnceUpon::doCopyProtection(const uint8 colors[7], const uint8 shapes[7 * 20], const uint8 obfuscate[4]) { + fadeOut(); + setCopyProtectionPalette(); + + Surface sprites[2] = {Surface(320, 200, 1), Surface(320, 200, 1)}; + + _vm->_video->drawPackedSprite("grille1.cmp", sprites[0]); + _vm->_video->drawPackedSprite("grille2.cmp", sprites[1]); + + ANIFile ani (_vm, "grille.ani", 320); + ANIObject clown(ani); + + setCursor(sprites[1], 5, 110, 20, 134, 3, 0); + + CopyProtectionState state = kCPStateSetup; + + uint8 triesLeft = 2; + int8 animalShape = -1; + bool hasCorrect = false; + + while (!_vm->shouldQuit() && (state != kCPStateFinish)) { + clearAnim(clown); + + // Set up the screen + if (state == kCPStateSetup) { + animalShape = cpSetup(colors, shapes, obfuscate, sprites); + + setAnimState(clown, kClownAnimationClownStand, false, false); + state = kCPStateWaitUser; + } + + drawAnim(clown); + + // If we're waiting for the clown and he finished, evaluate if we're finished + if (!clown.isVisible() && (state == kCPStateWaitClown)) + state = (hasCorrect || (--triesLeft == 0)) ? kCPStateFinish : kCPStateSetup; + + showCursor(); + fadeIn(); + + endFrame(true); + + int16 mouseX, mouseY; + MouseButtons mouseButtons; + + checkInput(mouseX, mouseY, mouseButtons); + + if (state == kCPStateWaitUser) { + // Look if we clicked a shaped and got it right + + int8 guessedShape = -1; + if (mouseButtons == kMouseButtonsLeft) + guessedShape = cpFindShape(mouseX, mouseY); + + if (guessedShape >= 0) { + hasCorrect = guessedShape == animalShape; + animalShape = -1; + + setAnimState(clown, hasCorrect ? kClownAnimationClownCheer : kClownAnimationClownCry, true, false); + state = kCPStateWaitClown; + } + } + } + + fadeOut(); + hideCursor(); + clearScreen(); + + // Display the "You are wrong" screen + if (!hasCorrect) + cpWrong(); + + return hasCorrect; +} + +int8 OnceUpon::cpSetup(const uint8 colors[7], const uint8 shapes[7 * 20], const uint8 obfuscate[4], + const Surface sprites[2]) { + + fadeOut(); + hideCursor(); + + // Get a random animal and animal color + int8 animalColor = _vm->_util->getRandom(7); + while ((colors[animalColor] == 1) || (colors[animalColor] == 7) || (colors[animalColor] == 11)) + animalColor = _vm->_util->getRandom(7); + + int8 animal = _vm->_util->getRandom(20); + + int8 animalShape = shapes[animalColor * 20 + animal]; + if (animal < 4) + animal = obfuscate[animal]; + + // Get the position of the animal sprite + int16 animalLeft = (animal % 4) * 80; + int16 animalTop = (animal / 4) * 50; + + uint8 sprite = 0; + if (animalTop >= 200) { + animalTop -= 200; + sprite = 1; + } + + int16 animalRight = animalLeft + 80 - 1; + int16 animalBottom = animalTop + 50 - 1; + + // Fill with the animal color + _vm->_draw->_backSurface->fill(colors[animalColor]); + + // Print the help line strings + for (uint i = 0; i < kCopyProtectionHelpStringCount; i++) { + const char * const helpString = kCopyProtectionHelpStrings[_vm->_global->_language][i]; + + const int x = 160 - (strlen(helpString) * _plettre->getCharWidth()) / 2; + const int y = i * 10 + 5; + + _plettre->drawString(helpString, x, y, 8, 0, true, *_vm->_draw->_backSurface); + } + + // White rectangle with black border + _vm->_draw->_backSurface->fillRect( 93, 43, 226, 134, 15); + _vm->_draw->_backSurface->drawRect( 92, 42, 227, 135, 0); + + // Draw the animal in the animal color + _vm->_draw->_backSurface->fillRect(120, 63, 199, 112, colors[animalColor]); + _vm->_draw->_backSurface->blit(sprites[sprite], animalLeft, animalTop, animalRight, animalBottom, 120, 63, 0); + + // Draw the shapes + for (uint i = 0; i < kCopyProtectionShapeCount; i++) { + const int16 * const coords = kCopyProtectionShapeCoords[i]; + + _vm->_draw->_backSurface->blit(sprites[1], coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], 0); + } + + _vm->_draw->forceBlit(); + + return animalShape; +} + +int8 OnceUpon::cpFindShape(int16 x, int16 y) const { + // Look through all shapes and check if the coordinates are inside one of them + for (uint i = 0; i < kCopyProtectionShapeCount; i++) { + const int16 * const coords = kCopyProtectionShapeCoords[i]; + + const int16 left = coords[4]; + const int16 top = coords[5]; + const int16 right = coords[4] + (coords[2] - coords[0] + 1) - 1; + const int16 bottom = coords[5] + (coords[3] - coords[1] + 1) - 1; + + if ((x >= left) && (x <= right) && (y >= top) && (y <= bottom)) + return i; + } + + return -1; +} + +void OnceUpon::cpWrong() { + // Display the "You are wrong" string, centered + + const char * const wrongString = kCopyProtectionWrongStrings[_vm->_global->_language]; + const int wrongX = 160 - (strlen(wrongString) * _plettre->getCharWidth()) / 2; + + _vm->_draw->_backSurface->clear(); + _plettre->drawString(wrongString, wrongX, 100, 15, 0, true, *_vm->_draw->_backSurface); + + _vm->_draw->forceBlit(); + + fadeIn(); + + waitInput(); + + fadeOut(); + clearScreen(); +} + +void OnceUpon::setAnimState(ANIObject &ani, uint16 state, bool once, bool pause) const { + ani.setAnimation(state); + ani.setMode(once ? ANIObject::kModeOnce : ANIObject::kModeContinuous); + ani.setPause(pause); + ani.setVisible(true); + ani.setPosition(); +} + } // End of namespace OnceUpon } // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index cfc12532dd..abcde68b81 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -32,6 +32,8 @@ namespace Gob { class Surface; class Font; +class ANIObject; + namespace OnceUpon { class OnceUpon : public PreGob { @@ -45,6 +47,8 @@ protected: void setGamePalette(uint palette); + bool doCopyProtection(const uint8 colors[7], const uint8 shapes[7 * 20], const uint8 obfuscate[4]); + Font *_jeudak; Font *_lettre; @@ -54,6 +58,13 @@ protected: private: void setCopyProtectionPalette(); + void setAnimState(ANIObject &ani, uint16 state, bool once, bool pause) const; + + // Copy protection helpers + int8 cpSetup(const uint8 colors[7], const uint8 shapes[7 * 20], const uint8 obfuscate[4], const Surface sprites[2]); + int8 cpFindShape(int16 x, int16 y) const; + void cpWrong(); + bool _openedArchives; }; -- cgit v1.2.3 From 67d7c3f11fdaf697f7f3c3779643121793ba4eb7 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 29 Jun 2012 19:24:54 +0200 Subject: GOB: Show a mock-up of the Once Upon A Time title The actual intro is described in a SEQ file. We don't support those yet. --- engines/gob/pregob/onceupon/abracadabra.cpp | 2 +- engines/gob/pregob/onceupon/babayaga.cpp | 2 +- engines/gob/pregob/onceupon/onceupon.cpp | 87 +++++++++++++++++++++++++++++ engines/gob/pregob/onceupon/onceupon.h | 7 +++ 4 files changed, 96 insertions(+), 2 deletions(-) diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp index d8dd8b3be0..8ece3d1c27 100644 --- a/engines/gob/pregob/onceupon/abracadabra.cpp +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -61,7 +61,7 @@ void Abracadabra::run() { if (_vm->shouldQuit() || !correctCP) return; - warning("TODO: Abracadabra::run()"); + showTitle(); } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp index aad1fc6aca..1eb603492b 100644 --- a/engines/gob/pregob/onceupon/babayaga.cpp +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -61,7 +61,7 @@ void BabaYaga::run() { if (_vm->shouldQuit() || !correctCP) return; - warning("TODO: BabaYaga::run()"); + showTitle(); } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index aa85e1c095..a5d05ce8c3 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -30,6 +30,8 @@ #include "gob/anifile.h" #include "gob/aniobject.h" +#include "gob/sound/sound.h" + #include "gob/pregob/onceupon/onceupon.h" static const int kPaletteSize = 16; @@ -487,6 +489,91 @@ void OnceUpon::setAnimState(ANIObject &ani, uint16 state, bool once, bool pause) ani.setPosition(); } +void OnceUpon::showTitle() { + // Show the Once Upon A Time title animation + // NOTE: This is currently only a mock-up. The real animation is in "ville.seq". + + fadeOut(); + setGamePalette(10); + + warning("OnceUpon::showTitle(): Actually play the SEQ"); + + clearScreen(); + + _vm->_video->drawPackedSprite("ville.cmp", *_vm->_draw->_backSurface); + _vm->_draw->forceBlit(); + + ANIFile ani (_vm, "pres.ani", 320); + ANIObject title(ani); + + setAnimState(title, 8, false, false); + + playTitleMusic(); + + while (!_vm->shouldQuit()) { + redrawAnim(title); + + fadeIn(); + + endFrame(true); + + if (hasInput()) + break; + } + + fadeOut(); + stopTitleMusic(); +} + +void OnceUpon::playTitleMusic() { + if (_vm->getPlatform() == Common::kPlatformPC) + playTitleMusicDOS(); + else if (_vm->getPlatform() == Common::kPlatformAmiga) + playTitleMusicAmiga(); + else if (_vm->getPlatform() == Common::kPlatformAtariST) + playTitleMusicAtariST(); +} + +void OnceUpon::playTitleMusicDOS() { + // Play an AdLib track + + _vm->_sound->adlibLoadTBR("babayaga.tbr"); + _vm->_sound->adlibLoadMDY("babayaga.mdy"); + _vm->_sound->adlibSetRepeating(-1); + _vm->_sound->adlibPlay(); +} + +void OnceUpon::playTitleMusicAmiga() { + // Play a Protracker track + + _vm->_sound->protrackerPlay("mod.babayaga"); +} + +void OnceUpon::playTitleMusicAtariST() { + // Play a Soundblaster composition + + static const int16 titleMusic[21] = { 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, -1}; + static const char * const titleFiles[ 3] = {"baba1.snd", "baba2.snd", "baba3.snd"}; + + for (uint i = 0; i < ARRAYSIZE(titleFiles); i++) + _vm->_sound->sampleLoad(_vm->_sound->sampleGetBySlot(i), SOUND_SND, titleFiles[i]); + + _vm->_sound->blasterPlayComposition(titleMusic, 0); + _vm->_sound->blasterRepeatComposition(-1); +} + +void OnceUpon::stopTitleMusic() { + _vm->_sound->adlibSetRepeating(0); + _vm->_sound->blasterRepeatComposition(0); + + _vm->_sound->adlibStop(); + _vm->_sound->blasterStopComposition(); + _vm->_sound->protrackerStop(); + + for (int i = 0; i < Sound::kSoundsCount; i++) + _vm->_sound->sampleFree(_vm->_sound->sampleGetBySlot(i)); +} + } // End of namespace OnceUpon } // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index abcde68b81..8b454e01f3 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -49,6 +49,8 @@ protected: bool doCopyProtection(const uint8 colors[7], const uint8 shapes[7 * 20], const uint8 obfuscate[4]); + void showTitle(); + Font *_jeudak; Font *_lettre; @@ -65,6 +67,11 @@ private: int8 cpFindShape(int16 x, int16 y) const; void cpWrong(); + void playTitleMusic(); + void playTitleMusicDOS(); + void playTitleMusicAmiga(); + void playTitleMusicAtariST(); + void stopTitleMusic(); bool _openedArchives; }; -- cgit v1.2.3 From 9af01cd58417e796b82cf6bb36e1bd30b0875f0e Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 6 Jul 2012 06:50:04 +0200 Subject: GOB: Move the background saving into its own class BackBuffer --- engines/gob/aniobject.cpp | 73 +++++++++------------------------ engines/gob/aniobject.h | 11 ++--- engines/gob/backbuffer.cpp | 100 +++++++++++++++++++++++++++++++++++++++++++++ engines/gob/backbuffer.h | 59 ++++++++++++++++++++++++++ engines/gob/module.mk | 1 + 5 files changed, 182 insertions(+), 62 deletions(-) create mode 100644 engines/gob/backbuffer.cpp create mode 100644 engines/gob/backbuffer.h diff --git a/engines/gob/aniobject.cpp b/engines/gob/aniobject.cpp index 8d739fb3a4..8d3a6897bf 100644 --- a/engines/gob/aniobject.cpp +++ b/engines/gob/aniobject.cpp @@ -28,23 +28,20 @@ namespace Gob { ANIObject::ANIObject(const ANIFile &ani) : _ani(&ani), _cmp(0), - _visible(false), _paused(false), _mode(kModeContinuous), - _x(0), _y(0), _background(0), _drawn(false) { + _visible(false), _paused(false), _mode(kModeContinuous), _x(0), _y(0) { setAnimation(0); setPosition(); } ANIObject::ANIObject(const CMPFile &cmp) : _ani(0), _cmp(&cmp), - _visible(false), _paused(false), _mode(kModeContinuous), - _x(0), _y(0), _background(0), _drawn(false) { + _visible(false), _paused(false), _mode(kModeContinuous), _x(0), _y(0) { setAnimation(0); setPosition(); } ANIObject::~ANIObject() { - delete _background; } void ANIObject::setVisible(bool visible) { @@ -188,46 +185,36 @@ bool ANIObject::draw(Surface &dest, int16 &left, int16 &top, bool ANIObject::drawCMP(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) { - if (!_background) { + if (!hasBuffer()) { uint16 width, height; _cmp->getMaxSize(width, height); - _background = new Surface(width, height, dest.getBPP()); + resizeBuffer(width, height); } - const uint16 cR = _cmp->getWidth (_animation) - 1; - const uint16 cB = _cmp->getHeight(_animation) - 1; + left = _x; + top = _y; + right = _x + _cmp->getWidth (_animation) - 1; + bottom = _y + _cmp->getHeight(_animation) - 1; - _backgroundLeft = CLIP( + _x, 0, dest.getWidth () - 1); - _backgroundTop = CLIP( + _y, 0, dest.getHeight() - 1); - _backgroundRight = CLIP(cR + _x, 0, dest.getWidth () - 1); - _backgroundBottom = CLIP(cB + _y, 0, dest.getHeight() - 1); - - _background->blit(dest, _backgroundLeft , _backgroundTop, - _backgroundRight, _backgroundBottom, 0, 0); + if (!saveScreen(dest, left, top, right, bottom)) + return false; _cmp->draw(dest, _animation, _x, _y, 0); - _drawn = true; - - left = _backgroundLeft; - top = _backgroundTop; - right = _backgroundRight; - bottom = _backgroundBottom; - return true; } bool ANIObject::drawANI(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) { - if (!_background) { + if (!hasBuffer()) { uint16 width, height; _ani->getMaxSize(width, height); - _background = new Surface(width, height, dest.getBPP()); + resizeBuffer(width, height); } const ANIFile::Animation &animation = _ani->getAnimationInfo(_animation); @@ -236,45 +223,23 @@ bool ANIObject::drawANI(Surface &dest, int16 &left, int16 &top, const ANIFile::FrameArea &area = animation.frameAreas[_frame]; - _backgroundLeft = CLIP(area.left + _x, 0, dest.getWidth () - 1); - _backgroundTop = CLIP(area.top + _y, 0, dest.getHeight() - 1); - _backgroundRight = CLIP(area.right + _x, 0, dest.getWidth () - 1); - _backgroundBottom = CLIP(area.bottom + _y, 0, dest.getHeight() - 1); + left = _x + area.left; + top = _y + area.top; + right = _x + area.right; + bottom = _y + area.bottom; - _background->blit(dest, _backgroundLeft , _backgroundTop, - _backgroundRight, _backgroundBottom, 0, 0); + if (!saveScreen(dest, left, top, right, bottom)) + return false; _ani->draw(dest, _animation, _frame, _x, _y); - _drawn = true; - - left = _backgroundLeft; - top = _backgroundTop; - right = _backgroundRight; - bottom = _backgroundBottom; - return true; } bool ANIObject::clear(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) { - if (!_drawn) - return false; - - const int16 bgRight = _backgroundRight - _backgroundLeft; - const int16 bgBottom = _backgroundBottom - _backgroundTop; - - dest.blit(*_background, 0, 0, bgRight, bgBottom, _backgroundLeft, _backgroundTop); - - _drawn = false; - - left = _backgroundLeft; - top = _backgroundTop; - right = _backgroundRight; - bottom = _backgroundBottom; - - return true; + return restoreScreen(dest, left, top, right, bottom); } void ANIObject::advance() { diff --git a/engines/gob/aniobject.h b/engines/gob/aniobject.h index 00f42b43ce..3c374f7b8f 100644 --- a/engines/gob/aniobject.h +++ b/engines/gob/aniobject.h @@ -25,6 +25,8 @@ #include "common/system.h" +#include "gob/backbuffer.h" + namespace Gob { class ANIFile; @@ -32,7 +34,7 @@ class CMPFile; class Surface; /** An ANI object, controlling an animation within an ANI file. */ -class ANIObject { +class ANIObject : public BackBuffer { public: enum Mode { kModeContinuous, ///< Play the animation continuously. @@ -118,13 +120,6 @@ private: int16 _x; ///< The current X position. int16 _y; ///< The current Y position. - Surface *_background; ///< The saved background. - bool _drawn; ///< Was the animation drawn? - - int16 _backgroundLeft; ///< The left position of the saved background. - int16 _backgroundTop; ///< The top of the saved background. - int16 _backgroundRight; ///< The right position of the saved background. - int16 _backgroundBottom; ///< The bottom position of the saved background. bool drawCMP(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); bool drawANI(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); diff --git a/engines/gob/backbuffer.cpp b/engines/gob/backbuffer.cpp new file mode 100644 index 0000000000..752042d46e --- /dev/null +++ b/engines/gob/backbuffer.cpp @@ -0,0 +1,100 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/util.h" + +#include "gob/backbuffer.h" +#include "gob/surface.h" + +namespace Gob { + +BackBuffer::BackBuffer() : _background(0), _saved(false) { +} + +BackBuffer::~BackBuffer() { + delete _background; +} + +bool BackBuffer::hasBuffer() const { + return _background != 0; +} + +bool BackBuffer::hasSavedBackground() const { + return _saved; +} + +void BackBuffer::trashBuffer() { + _saved = false; +} + +void BackBuffer::resizeBuffer(uint16 width, uint16 height) { + trashBuffer(); + + if (_background && (_background->getWidth() == width) && (_background->getHeight() == height)) + return; + + delete _background; + + _background = new Surface(width, height, 1); +} + +bool BackBuffer::saveScreen(const Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) { + if (!_background) + return false; + + const int16 width = MIN(right - left + 1, _background->getWidth ()); + const int16 height = MIN(bottom - top + 1, _background->getHeight()); + if ((width <= 0) || (height <= 0)) + return false; + + right = left + width - 1; + bottom = top + height - 1; + + _saveLeft = left; + _saveTop = top; + _saveRight = right; + _saveBottom = bottom; + + _background->blit(dest, _saveLeft, _saveTop, _saveRight, _saveBottom, 0, 0); + + _saved = true; + + return true; +} + +bool BackBuffer::restoreScreen(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) { + if (!_saved) + return false; + + left = _saveLeft; + top = _saveTop; + right = _saveRight; + bottom = _saveBottom; + + dest.blit(*_background, 0, 0, right - left, bottom - top, left, top); + + _saved = false; + + return true; +} + +} // End of namespace Gob diff --git a/engines/gob/backbuffer.h b/engines/gob/backbuffer.h new file mode 100644 index 0000000000..c978689e9f --- /dev/null +++ b/engines/gob/backbuffer.h @@ -0,0 +1,59 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_BACKBUFFER_H +#define GOB_BACKBUFFER_H + +#include "common/system.h" + +namespace Gob { + +class Surface; + +class BackBuffer { +public: + BackBuffer(); + ~BackBuffer(); + +protected: + void trashBuffer(); + void resizeBuffer(uint16 width, uint16 height); + + bool saveScreen (const Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); + bool restoreScreen( Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); + + bool hasBuffer() const; + bool hasSavedBackground() const; + +private: + Surface *_background; ///< The saved background. + bool _saved; ///< Was the background saved? + + int16 _saveLeft; ///< The left position of the saved background. + int16 _saveTop; ///< The top of the saved background. + int16 _saveRight; ///< The right position of the saved background. + int16 _saveBottom; ///< The bottom position of the saved background. +}; + +} // End of namespace Gob + +#endif // GOB_BACKBUFFER_H diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 8a792049e8..2169602e1b 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -3,6 +3,7 @@ MODULE := engines/gob MODULE_OBJS := \ anifile.o \ aniobject.o \ + backbuffer.o \ cheater.o \ cheater_geisha.o \ cmpfile.o \ -- cgit v1.2.3 From 4b3aa88c8aaaec4f13435c46a7a3cf4ef00a08df Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 30 Jun 2012 00:41:55 +0200 Subject: GOB: Add a simple class for PreGob TXT files --- engines/gob/module.mk | 1 + engines/gob/pregob/pregob.cpp | 13 +++ engines/gob/pregob/pregob.h | 4 + engines/gob/pregob/txtfile.cpp | 232 +++++++++++++++++++++++++++++++++++++++++ engines/gob/pregob/txtfile.h | 91 ++++++++++++++++ 5 files changed, 341 insertions(+) create mode 100644 engines/gob/pregob/txtfile.cpp create mode 100644 engines/gob/pregob/txtfile.h diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 2169602e1b..f8b477b92b 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -79,6 +79,7 @@ MODULE_OBJS := \ demos/batplayer.o \ detection/detection.o \ pregob/pregob.o \ + pregob/txtfile.o \ pregob/onceupon/onceupon.o \ pregob/onceupon/abracadabra.o \ pregob/onceupon/babayaga.o \ diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index b9c36d7cf8..98b1a2e6b8 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -26,6 +26,7 @@ #include "gob/global.h" #include "gob/util.h" #include "gob/surface.h" +#include "gob/dataio.h" #include "gob/palanim.h" #include "gob/draw.h" #include "gob/video.h" @@ -202,4 +203,16 @@ void PreGob::redrawAnim(ANIObject &ani) { drawAnim(ani); } +TXTFile *PreGob::loadTXT(const Common::String &txtFile, TXTFile::Format format) const { + Common::SeekableReadStream *txtStream = _vm->_dataIO->getFile(txtFile); + if (!txtStream) + error("PreGob::loadTXT(): Failed to open \"%s\"", txtFile.c_str()); + + TXTFile *txt = new TXTFile(*txtStream, format); + + delete txtStream; + + return txt; +} + } // End of namespace Gob diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index 9efdbe8df6..d087bb0d0c 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -25,6 +25,8 @@ #include "gob/util.h" +#include "gob/pregob/txtfile.h" + namespace Gob { class GobEngine; @@ -77,6 +79,8 @@ protected: void drawAnim(ANIObject &ani); void redrawAnim(ANIObject &ani); + TXTFile *loadTXT(const Common::String &txtFile, TXTFile::Format format) const; + GobEngine *_vm; diff --git a/engines/gob/pregob/txtfile.cpp b/engines/gob/pregob/txtfile.cpp new file mode 100644 index 0000000000..3ff0d4b039 --- /dev/null +++ b/engines/gob/pregob/txtfile.cpp @@ -0,0 +1,232 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/stream.h" + +#include "gob/draw.h" + +#include "gob/pregob/txtfile.h" + +namespace Gob { + +TXTFile::TXTFile(Common::SeekableReadStream &txt, Format format) { + load(txt, format); +} + +TXTFile::~TXTFile() { +} + +TXTFile::LineArray &TXTFile::getLines() { + return _lines; +} + +void TXTFile::load(Common::SeekableReadStream &txt, Format format) { + if (format == kFormatStringPositionColorFont) { + int numLines = getInt(txt); + + _lines.reserve(numLines); + } + + while (!txt.eos()) { + Line line; + + line.text = getStr(txt); + line.x = (format >= kFormatStringPosition) ? getInt(txt) : 0; + line.y = (format >= kFormatStringPosition) ? getInt(txt) : 0; + line.color = (format >= kFormatStringPositionColor) ? getInt(txt) : 0; + line.font = (format >= kFormatStringPositionColorFont) ? getInt(txt) : 0; + + _lines.push_back(line); + } + + while (!_lines.empty() && _lines.back().text.empty()) + _lines.pop_back(); +} + +bool TXTFile::draw(Surface &surface, int16 &left, int16 &top, int16 &right, int16 &bottom, + const Font * const *fonts, uint fontCount, int color) { + + trashBuffer(); + + if (!getArea(left, top, right, bottom, fonts, fontCount)) + return false; + + resizeBuffer(right - left + 1, bottom - top + 1); + saveScreen(surface, left, top, right, bottom); + + for (LineArray::const_iterator l = _lines.begin(); l != _lines.end(); ++l) { + if (l->font >= fontCount) + continue; + + fonts[l->font]->drawString(l->text, l->x, l->y, (color < 0) ? l->color : color, 0, true, surface); + } + + return true; +} + +bool TXTFile::draw(uint line, Surface &surface, int16 &left, int16 &top, int16 &right, int16 &bottom, + const Font * const *fonts, uint fontCount, int color) { + + trashBuffer(); + + if (!getArea(line, left, top, right, bottom, fonts, fontCount)) + return false; + + resizeBuffer(right - left + 1, bottom - top + 1); + saveScreen(surface, left, top, right, bottom); + + const Line &l = _lines[line]; + + fonts[l.font]->drawString(l.text, l.x, l.y, (color < 0) ? l.color : color, 0, true, surface); + + return true; +} + +bool TXTFile::draw(Surface &surface, const Font * const *fonts, uint fontCount, int color) { + int16 left, top, right, bottom; + + return draw(surface, left, top, right, bottom, fonts, fontCount, color); +} + +bool TXTFile::draw(uint line, Surface &surface, const Font * const *fonts, uint fontCount, int color) { + int16 left, top, right, bottom; + + return draw(line, surface, left, top, right, bottom, fonts, fontCount, color); +} + +bool TXTFile::clear(Surface &surface, int16 &left, int16 &top, int16 &right, int16 &bottom) { + return restoreScreen(surface, left, top, right, bottom); +} + +bool TXTFile::getArea(int16 &left, int16 &top, int16 &right, int16 &bottom, + const Font * const *fonts, uint fontCount) const { + + bool hasLine = false; + + left = 0x7FFF; + top = 0x7FFF; + right = 0x0000; + bottom = 0x0000; + + for (uint i = 0; i < _lines.size(); i++) { + int16 lLeft, lTop, lRight, lBottom; + + if (getArea(i, lLeft, lTop, lRight, lBottom, fonts, fontCount)) { + left = MIN(left , lLeft ); + top = MIN(top , lTop ); + right = MAX(right , lRight ); + bottom = MAX(bottom, lBottom); + + hasLine = true; + } + } + + return hasLine; +} + +bool TXTFile::getArea(uint line, int16 &left, int16 &top, int16 &right, int16 &bottom, + const Font * const *fonts, uint fontCount) const { + + + if ((line >= _lines.size()) || (_lines[line].font >= fontCount)) + return false; + + const Line &l = _lines[line]; + + left = l.x; + top = l.y; + right = l.x + l.text.size() * fonts[l.font]->getCharWidth() - 1; + bottom = l.y + fonts[l.font]->getCharHeight() - 1; + + return true; +} + +Common::String TXTFile::getStr(Common::SeekableReadStream &txt) { + // Skip all ' ', '\n' and '\r' + while (!txt.eos()) { + char c = txt.readByte(); + if (txt.eos()) + break; + + if ((c != ' ') && (c != '\n') && (c != '\r')) { + txt.seek(-1, SEEK_CUR); + break; + } + } + + if (txt.eos()) + return ""; + + // Read string until ' ', '\n' or '\r' + Common::String string; + while (!txt.eos()) { + char c = txt.readByte(); + if ((c == ' ') || (c == '\n') || (c == '\r')) + break; + + string += c; + } + + // Replace all '#' with ' ' and throw out non-printables + Common::String cleanString; + + for (uint i = 0; i < string.size(); i++) { + if (string[i] == '#') + cleanString += ' '; + else if ((unsigned char)string[i] >= ' ') + cleanString += string[i]; + } + + return cleanString; +} + +int TXTFile::getInt(Common::SeekableReadStream &txt) { + // Skip all [^-0-9] + while (!txt.eos()) { + char c = txt.readByte(); + if (txt.eos()) + break; + + if ((c == '-') || ((c >= '0') && (c <= '9'))) { + txt.seek(-1, SEEK_CUR); + break; + } + } + + if (txt.eos()) + return 0; + + // Read until [^-0-9] + Common::String string; + while (!txt.eos()) { + char c = txt.readByte(); + if ((c != '-') && ((c < '0') || (c > '9'))) + break; + + string += c; + } + + // Convert to integer + return atoi(string.c_str()); +} + +} // End of namespace Gob diff --git a/engines/gob/pregob/txtfile.h b/engines/gob/pregob/txtfile.h new file mode 100644 index 0000000000..c623b58859 --- /dev/null +++ b/engines/gob/pregob/txtfile.h @@ -0,0 +1,91 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_PREGOB_TXTFILE_H +#define GOB_PREGOB_TXTFILE_H + +#include "common/system.h" +#include "common/str.h" +#include "common/array.h" + +#include "gob/backbuffer.h" + +namespace Common { + class SeekableReadStream; +} + +namespace Gob { + +class Surface; +class Font; + +class TXTFile : public BackBuffer { +public: + enum Format { + kFormatString, + kFormatStringPosition, + kFormatStringPositionColor, + kFormatStringPositionColorFont + }; + + struct Line { + Common::String text; + int x, y; + int color; + uint font; + }; + + typedef Common::Array LineArray; + + TXTFile(Common::SeekableReadStream &txt, Format format); + ~TXTFile(); + + LineArray &getLines(); + + bool draw( Surface &surface, const Font * const *fonts, uint fontCount, int color = -1); + bool draw(uint line, Surface &surface, const Font * const *fonts, uint fontCount, int color = -1); + + bool draw( Surface &surface, int16 &left, int16 &top, int16 &right, int16 &bottom, + const Font * const *fonts, uint fontCount, int color = -1); + bool draw(uint line, Surface &surface, int16 &left, int16 &top, int16 &right, int16 &bottom, + const Font * const *fonts, uint fontCount, int color = -1); + + bool clear(Surface &surface, int16 &left, int16 &top, int16 &right, int16 &bottom); + +private: + LineArray _lines; + + void load(Common::SeekableReadStream &txt, Format format); + + Common::String getStr(Common::SeekableReadStream &txt); + int getInt(Common::SeekableReadStream &txt); + + + bool getArea( int16 &left, int16 &top, int16 &right, int16 &bottom, + const Font * const *fonts, uint fontCount) const; + bool getArea(uint line, int16 &left, int16 &top, int16 &right, int16 &bottom, + const Font * const *fonts, uint fontCount) const; +}; + +} // End of namespace Gob + +#endif // GOB_PREGOB_TXTFILE_H -- cgit v1.2.3 From 139b03c4bcafea260e79e3e83db897c71db41907 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 30 Jun 2012 01:23:21 +0200 Subject: GOB: Add a PreGob method to get a localized file name --- engines/gob/pregob/pregob.cpp | 9 +++++++++ engines/gob/pregob/pregob.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index 98b1a2e6b8..582ebc6677 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -34,6 +34,8 @@ #include "gob/pregob/pregob.h" +static char kLanguageSuffix[5] = { 't', 'g', 'a', 'e', 'i' }; + namespace Gob { PreGob::PreGob(GobEngine *vm) : _vm(vm), _fadedOut(false) { @@ -203,6 +205,13 @@ void PreGob::redrawAnim(ANIObject &ani) { drawAnim(ani); } +Common::String PreGob::getLocFile(const Common::String &file) const { + if (_vm->_global->_language >= ARRAYSIZE(kLanguageSuffix)) + return file; + + return file + kLanguageSuffix[_vm->_global->_language]; +} + TXTFile *PreGob::loadTXT(const Common::String &txtFile, TXTFile::Format format) const { Common::SeekableReadStream *txtStream = _vm->_dataIO->getFile(txtFile); if (!txtStream) diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index d087bb0d0c..902a7c437d 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -23,6 +23,8 @@ #ifndef GOB_PREGOB_PREGOB_H #define GOB_PREGOB_PREGOB_H +#include "common/str.h" + #include "gob/util.h" #include "gob/pregob/txtfile.h" @@ -79,6 +81,7 @@ protected: void drawAnim(ANIObject &ani); void redrawAnim(ANIObject &ani); + Common::String getLocFile(const Common::String &file) const; TXTFile *loadTXT(const Common::String &txtFile, TXTFile::Format format) const; -- cgit v1.2.3 From 60cebba95ca1d30f2926acd2d415d09c75e2bd42 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 30 Jun 2012 02:33:12 +0200 Subject: GOB: Show the Once Upon A Time wait/load screen --- engines/gob/pregob/onceupon/abracadabra.cpp | 4 ++++ engines/gob/pregob/onceupon/babayaga.cpp | 4 ++++ engines/gob/pregob/onceupon/onceupon.cpp | 17 +++++++++++++++++ engines/gob/pregob/onceupon/onceupon.h | 1 + 4 files changed, 26 insertions(+) diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp index 8ece3d1c27..27845cd1d5 100644 --- a/engines/gob/pregob/onceupon/abracadabra.cpp +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -61,6 +61,10 @@ void Abracadabra::run() { if (_vm->shouldQuit() || !correctCP) return; + showWait(); + if (_vm->shouldQuit()) + return; + showTitle(); } diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp index 1eb603492b..1dbda8227b 100644 --- a/engines/gob/pregob/onceupon/babayaga.cpp +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -61,6 +61,10 @@ void BabaYaga::run() { if (_vm->shouldQuit() || !correctCP) return; + showWait(); + if (_vm->shouldQuit()) + return; + showTitle(); } diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index a5d05ce8c3..6f5d95b10c 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -489,6 +489,23 @@ void OnceUpon::setAnimState(ANIObject &ani, uint16 state, bool once, bool pause) ani.setPosition(); } +void OnceUpon::showWait() { + // Show the loading floppy + + fadeOut(); + clearScreen(); + setGamePalette(10); + + Surface wait(320, 43, 1); + + _vm->_video->drawPackedSprite("wait.cmp", wait); + _vm->_draw->_backSurface->blit(wait, 0, 0, 72, 33, 122, 84); + + _vm->_draw->forceBlit(); + + fadeIn(); +} + void OnceUpon::showTitle() { // Show the Once Upon A Time title animation // NOTE: This is currently only a mock-up. The real animation is in "ville.seq". diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 8b454e01f3..99fb51431a 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -49,6 +49,7 @@ protected: bool doCopyProtection(const uint8 colors[7], const uint8 shapes[7 * 20], const uint8 obfuscate[4]); + void showWait(); void showTitle(); -- cgit v1.2.3 From 2f3aaf0e07a7309b2ba74c7e888b03c24534d4d0 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 30 Jun 2012 02:35:26 +0200 Subject: GOB: Show the Once Upon A Time fairytale quote --- engines/gob/pregob/onceupon/abracadabra.cpp | 4 ++++ engines/gob/pregob/onceupon/babayaga.cpp | 4 ++++ engines/gob/pregob/onceupon/onceupon.cpp | 22 ++++++++++++++++++++++ engines/gob/pregob/onceupon/onceupon.h | 1 + 4 files changed, 31 insertions(+) diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp index 27845cd1d5..abf9fdce61 100644 --- a/engines/gob/pregob/onceupon/abracadabra.cpp +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -65,6 +65,10 @@ void Abracadabra::run() { if (_vm->shouldQuit()) return; + showQuote(); + if (_vm->shouldQuit()) + return; + showTitle(); } diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp index 1dbda8227b..9bca0e27d0 100644 --- a/engines/gob/pregob/onceupon/babayaga.cpp +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -65,6 +65,10 @@ void BabaYaga::run() { if (_vm->shouldQuit()) return; + showQuote(); + if (_vm->shouldQuit()) + return; + showTitle(); } diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 6f5d95b10c..73322658de 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -506,6 +506,28 @@ void OnceUpon::showWait() { fadeIn(); } +void OnceUpon::showQuote() { + // Show the quote about fairytales + + fadeOut(); + clearScreen(); + setGamePalette(11); + + static const Font *fonts[3] = { _plettre, _glettre, _plettre }; + + TXTFile *quote = loadTXT(getLocFile("gene.tx"), TXTFile::kFormatStringPositionColorFont); + quote->draw(*_vm->_draw->_backSurface, fonts, ARRAYSIZE(fonts)); + delete quote; + + _vm->_draw->forceBlit(); + + fadeIn(); + + waitInput(); + + fadeOut(); +} + void OnceUpon::showTitle() { // Show the Once Upon A Time title animation // NOTE: This is currently only a mock-up. The real animation is in "ville.seq". diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 99fb51431a..97f7e6b77e 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -50,6 +50,7 @@ protected: bool doCopyProtection(const uint8 colors[7], const uint8 shapes[7 * 20], const uint8 obfuscate[4]); void showWait(); + void showQuote(); void showTitle(); -- cgit v1.2.3 From 92bd9c864ab5238aa51ad6a327cfb7249bcc934f Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 30 Jun 2012 03:04:29 +0200 Subject: GOB: Show the specific game title in Once Upon A Time --- engines/gob/pregob/onceupon/abracadabra.cpp | 14 ++++++++++++++ engines/gob/pregob/onceupon/babayaga.cpp | 14 ++++++++++++++ engines/gob/pregob/onceupon/onceupon.cpp | 27 +++++++++++++++++++++++++++ engines/gob/pregob/onceupon/onceupon.h | 1 + 4 files changed, 56 insertions(+) diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp index abf9fdce61..5c1bd0149b 100644 --- a/engines/gob/pregob/onceupon/abracadabra.cpp +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -57,19 +57,33 @@ Abracadabra::~Abracadabra() { void Abracadabra::run() { init(); + // Copy protection bool correctCP = doCopyProtection(kCopyProtectionColors, kCopyProtectionShapes, kCopyProtectionObfuscate); if (_vm->shouldQuit() || !correctCP) return; + // "Loading" showWait(); if (_vm->shouldQuit()) return; + // Quote about fairy tales showQuote(); if (_vm->shouldQuit()) return; + // Once Upon A Time title showTitle(); + if (_vm->shouldQuit()) + return; + + // Game title screen + showChapter(0); + if (_vm->shouldQuit()) + return; + + // "Loading" + showWait(); } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp index 9bca0e27d0..608d85e977 100644 --- a/engines/gob/pregob/onceupon/babayaga.cpp +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -57,19 +57,33 @@ BabaYaga::~BabaYaga() { void BabaYaga::run() { init(); + // Copy protection bool correctCP = doCopyProtection(kCopyProtectionColors, kCopyProtectionShapes, kCopyProtectionObfuscate); if (_vm->shouldQuit() || !correctCP) return; + // "Loading" showWait(); if (_vm->shouldQuit()) return; + // Quote about fairy tales showQuote(); if (_vm->shouldQuit()) return; + // Once Upon A Time title showTitle(); + if (_vm->shouldQuit()) + return; + + // Game title screen + showChapter(0); + if (_vm->shouldQuit()) + return; + + // "Loading" + showWait(); } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 73322658de..6d185d007d 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -613,6 +613,33 @@ void OnceUpon::stopTitleMusic() { _vm->_sound->sampleFree(_vm->_sound->sampleGetBySlot(i)); } +void OnceUpon::showChapter(int chapter) { + // Display the intro text to a chapter + + fadeOut(); + clearScreen(); + setGamePalette(11); + + // Parchment background + _vm->_video->drawPackedSprite("parch.cmp", *_vm->_draw->_backSurface); + + static const Font *fonts[3] = { _plettre, _glettre, _plettre }; + + const Common::String chapterFile = getLocFile(Common::String::format("gene%d.tx", chapter)); + + TXTFile *gameTitle = loadTXT(chapterFile, TXTFile::kFormatStringPositionColorFont); + gameTitle->draw(*_vm->_draw->_backSurface, fonts, ARRAYSIZE(fonts)); + delete gameTitle; + + _vm->_draw->forceBlit(); + + fadeIn(); + + waitInput(); + + fadeOut(); +} + } // End of namespace OnceUpon } // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 97f7e6b77e..96f88cbb5f 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -52,6 +52,7 @@ protected: void showWait(); void showQuote(); void showTitle(); + void showChapter(int chapter); Font *_jeudak; -- cgit v1.2.3 From bccfdb559fccdf3eff86cea22495a50260b3ad90 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 30 Jun 2012 16:30:02 +0200 Subject: GOB: Move the intro parts into OnceUpon::showIntro() --- engines/gob/pregob/onceupon/abracadabra.cpp | 24 ++---------------------- engines/gob/pregob/onceupon/babayaga.cpp | 24 ++---------------------- engines/gob/pregob/onceupon/onceupon.cpp | 27 +++++++++++++++++++++++++++ engines/gob/pregob/onceupon/onceupon.h | 15 +++++++++++---- 4 files changed, 42 insertions(+), 48 deletions(-) diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp index 5c1bd0149b..9db018c4aa 100644 --- a/engines/gob/pregob/onceupon/abracadabra.cpp +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -62,28 +62,8 @@ void Abracadabra::run() { if (_vm->shouldQuit() || !correctCP) return; - // "Loading" - showWait(); - if (_vm->shouldQuit()) - return; - - // Quote about fairy tales - showQuote(); - if (_vm->shouldQuit()) - return; - - // Once Upon A Time title - showTitle(); - if (_vm->shouldQuit()) - return; - - // Game title screen - showChapter(0); - if (_vm->shouldQuit()) - return; - - // "Loading" - showWait(); + // Show the intro + showIntro(); } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp index 608d85e977..8b80a38084 100644 --- a/engines/gob/pregob/onceupon/babayaga.cpp +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -62,28 +62,8 @@ void BabaYaga::run() { if (_vm->shouldQuit() || !correctCP) return; - // "Loading" - showWait(); - if (_vm->shouldQuit()) - return; - - // Quote about fairy tales - showQuote(); - if (_vm->shouldQuit()) - return; - - // Once Upon A Time title - showTitle(); - if (_vm->shouldQuit()) - return; - - // Game title screen - showChapter(0); - if (_vm->shouldQuit()) - return; - - // "Loading" - showWait(); + // Show the intro + showIntro(); } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 6d185d007d..f2708b380b 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -506,6 +506,33 @@ void OnceUpon::showWait() { fadeIn(); } +void OnceUpon::showIntro() { + // Show all intro parts + + // "Loading" + showWait(); + if (_vm->shouldQuit()) + return; + + // Quote about fairy tales + showQuote(); + if (_vm->shouldQuit()) + return; + + // Once Upon A Time title + showTitle(); + if (_vm->shouldQuit()) + return; + + // Game title screen + showChapter(0); + if (_vm->shouldQuit()) + return; + + // "Loading" + showWait(); +} + void OnceUpon::showQuote() { // Show the quote about fairytales diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 96f88cbb5f..968c70ef48 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -49,12 +49,13 @@ protected: bool doCopyProtection(const uint8 colors[7], const uint8 shapes[7 * 20], const uint8 obfuscate[4]); - void showWait(); - void showQuote(); - void showTitle(); - void showChapter(int chapter); + void showWait(); ///< Show the wait / loading screen. + void showIntro(); ///< Show the whole intro. + void showChapter(int chapter); ///< Show a chapter intro text. + + // Fonts Font *_jeudak; Font *_lettre; Font *_plettre; @@ -70,12 +71,18 @@ private: int8 cpFindShape(int16 x, int16 y) const; void cpWrong(); + // Intro parts + void showQuote(); + void showTitle(); + + // Title music void playTitleMusic(); void playTitleMusicDOS(); void playTitleMusicAmiga(); void playTitleMusicAtariST(); void stopTitleMusic(); + bool _openedArchives; }; -- cgit v1.2.3 From 233a3f54fc3913669fd4c56a6c3a16da5aa5f5b6 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 30 Jun 2012 22:12:08 +0200 Subject: GOB: Stubbily implement the Once Upon A Time menus --- engines/gob/pregob/onceupon/abracadabra.cpp | 31 +++ engines/gob/pregob/onceupon/abracadabra.h | 6 + engines/gob/pregob/onceupon/babayaga.cpp | 31 +++ engines/gob/pregob/onceupon/babayaga.h | 6 + engines/gob/pregob/onceupon/onceupon.cpp | 403 +++++++++++++++++++++++++++- engines/gob/pregob/onceupon/onceupon.h | 71 ++++- 6 files changed, 541 insertions(+), 7 deletions(-) diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp index 9db018c4aa..696e4d9594 100644 --- a/engines/gob/pregob/onceupon/abracadabra.cpp +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -48,7 +48,13 @@ namespace Gob { namespace OnceUpon { +const OnceUpon::MenuButton Abracadabra::kAnimalsButtons = { + true, 131, 127, 183, 164, 193, 0, 243, 35, 132, 128, 0 +}; + + Abracadabra::Abracadabra(GobEngine *vm) : OnceUpon(vm) { + setAnimalsButton(&kAnimalsButtons); } Abracadabra::~Abracadabra() { @@ -64,6 +70,31 @@ void Abracadabra::run() { // Show the intro showIntro(); + if (_vm->shouldQuit()) + return; + + mainLoop(); + + if (!_vm->shouldQuit()) + warning("Abracadabra::run(): TODO: Show \"Bye Bye\""); +} + +void Abracadabra::mainLoop() { + clearScreen(); + + MenuType mainMenu = kMenuTypeMainStart; + + while (!_vm->shouldQuit()) { + MenuAction action = doMenu(mainMenu); + if (action == kMenuActionPlay) + warning("Abracadabra::mainLoop(): TODO: Play"); + else if (action == kMenuActionRestart) + warning("Abracadabra::mainLoop(): TODO: Restart"); + else if (action == kMenuActionAnimals) + warning("Abracadabra::mainLoop(): TODO: Animals"); + else if (action == kMenuActionQuit) + break; + } } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/abracadabra.h b/engines/gob/pregob/onceupon/abracadabra.h index 855d2bf131..64deaf4389 100644 --- a/engines/gob/pregob/onceupon/abracadabra.h +++ b/engines/gob/pregob/onceupon/abracadabra.h @@ -35,6 +35,12 @@ public: ~Abracadabra(); void run(); + +private: + static const MenuButton kAnimalsButtons; + + + void mainLoop(); }; } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp index 8b80a38084..b752bb0862 100644 --- a/engines/gob/pregob/onceupon/babayaga.cpp +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -48,7 +48,13 @@ namespace Gob { namespace OnceUpon { +const OnceUpon::MenuButton BabaYaga::kAnimalsButtons = { + true, 131, 127, 183, 164, 193, 0, 245, 37, 131, 127, 0 +}; + + BabaYaga::BabaYaga(GobEngine *vm) : OnceUpon(vm) { + setAnimalsButton(&kAnimalsButtons); } BabaYaga::~BabaYaga() { @@ -64,6 +70,31 @@ void BabaYaga::run() { // Show the intro showIntro(); + if (_vm->shouldQuit()) + return; + + mainLoop(); + + if (!_vm->shouldQuit()) + warning("BabaYaga::run(): TODO: Show \"Bye Bye\""); +} + +void BabaYaga::mainLoop() { + clearScreen(); + + MenuType mainMenu = kMenuTypeMainStart; + + while (!_vm->shouldQuit()) { + MenuAction action = doMenu(mainMenu); + if (action == kMenuActionPlay) + warning("BabaYaga::mainLoop(): TODO: Play"); + else if (action == kMenuActionRestart) + warning("BabaYaga::mainLoop(): TODO: Restart"); + else if (action == kMenuActionAnimals) + warning("BabaYaga::mainLoop(): TODO: Animals"); + else if (action == kMenuActionQuit) + break; + } } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/babayaga.h b/engines/gob/pregob/onceupon/babayaga.h index b3339b0ca8..98d452418f 100644 --- a/engines/gob/pregob/onceupon/babayaga.h +++ b/engines/gob/pregob/onceupon/babayaga.h @@ -35,6 +35,12 @@ public: ~BabaYaga(); void run(); + +private: + static const MenuButton kAnimalsButtons; + + + void mainLoop(); }; } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index f2708b380b..67004d2912 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -227,8 +227,28 @@ namespace Gob { namespace OnceUpon { +const OnceUpon::MenuButton OnceUpon::kMainMenuDifficultyButton[3] = { + {false, 29, 18, 77, 57, 0, 0, 0, 0, 0, 0, 0}, + {false, 133, 18, 181, 57, 0, 0, 0, 0, 0, 0, 1}, + {false, 241, 18, 289, 57, 0, 0, 0, 0, 0, 0, 2}, +}; + +const OnceUpon::MenuButton OnceUpon::kSectionButtons[4] = { + {false, 27, 121, 91, 179, 0, 0, 0, 0, 0, 0, 0}, + { true, 95, 121, 159, 179, 4, 1, 56, 49, 100, 126, 2}, + { true, 163, 121, 227, 179, 64, 1, 120, 49, 168, 126, 6}, + { true, 231, 121, 295, 179, 128, 1, 184, 49, 236, 126, 10} +}; + +const OnceUpon::MenuButton OnceUpon::kIngameButtons[3] = { + {true, 108, 83, 139, 116, 0, 0, 31, 34, 108, 83, 0}, + {true, 144, 83, 175, 116, 36, 0, 67, 34, 144, 83, 1}, + {true, 180, 83, 211, 116, 72, 0, 103, 34, 180, 83, 2} +}; + + OnceUpon::OnceUpon(GobEngine *vm) : PreGob(vm), _jeudak(0), _lettre(0), _plettre(0), _glettre(0), - _openedArchives(false) { + _openedArchives(false), _animalsButton(0) { } @@ -267,6 +287,9 @@ void OnceUpon::init() { "Thanks", _vm->getLangDesc(_vm->_global->_language)); initScreen(); + + _difficulty = kDifficultyMAX; + _section = 0; } void OnceUpon::deinit() { @@ -289,6 +312,10 @@ void OnceUpon::deinit() { _openedArchives = false; } +void OnceUpon::setAnimalsButton(const MenuButton *animalsButton) { + _animalsButton = animalsButton; +} + void OnceUpon::setCopyProtectionPalette() { setPalette(kCopyProtectionPalette, kPaletteSize); } @@ -300,6 +327,14 @@ void OnceUpon::setGamePalette(uint palette) { setPalette(kGamePalettes[palette], kPaletteSize); } +void OnceUpon::setGameCursor() { + Surface cursor(320, 16, 1); + + _vm->_video->drawPackedSprite("icon.cmp", cursor); + + setCursor(cursor, 105, 0, 120, 15, 0, 0); +} + enum CopyProtectionState { kCPStateSetup, // Set up the screen kCPStateWaitUser, // Waiting for the user to pick a shape @@ -489,12 +524,12 @@ void OnceUpon::setAnimState(ANIObject &ani, uint16 state, bool once, bool pause) ani.setPosition(); } -void OnceUpon::showWait() { +void OnceUpon::showWait(uint palette) { // Show the loading floppy fadeOut(); clearScreen(); - setGamePalette(10); + setGamePalette(palette); Surface wait(320, 43, 1); @@ -510,7 +545,7 @@ void OnceUpon::showIntro() { // Show all intro parts // "Loading" - showWait(); + showWait(10); if (_vm->shouldQuit()) return; @@ -530,7 +565,7 @@ void OnceUpon::showIntro() { return; // "Loading" - showWait(); + showWait(17); } void OnceUpon::showQuote() { @@ -667,6 +702,364 @@ void OnceUpon::showChapter(int chapter) { fadeOut(); } +OnceUpon::MenuAction OnceUpon::doMenu(MenuType type) { + bool cursorVisible = isCursorVisible(); + + // Set the cursor + addCursor(); + setGameCursor(); + + // Backup the screen + Surface screenBackup(320, 200, 1); + screenBackup.blit(*_vm->_draw->_backSurface); + + // Handle the specific menu + MenuAction action; + if (type == kMenuTypeMainStart) + action = doMenuMainStart(); + else if (type == kMenuTypeMainIngame) + action = doMenuMainIngame(); + else if (type == kMenuTypeIngame) + action = doMenuIngame(); + else + error("OnceUpon::doMenu(): No such menu %d", type); + + if (_vm->shouldQuit()) + return action; + + // The ingame menu cleans itself up in a special way + if (type == kMenuTypeIngame) + clearMenuIngame(screenBackup); + + // The main menus fade out + if ((type == kMenuTypeMainStart) || (type == kMenuTypeMainIngame)) + fadeOut(); + + // Restore the screen + _vm->_draw->_backSurface->blit(screenBackup); + _vm->_draw->forceBlit(); + + // Restore the cursor + if (!cursorVisible) + hideCursor(); + removeCursor(); + + return action; +} + +OnceUpon::MenuAction OnceUpon::doMenuMainStart() { + fadeOut(); + drawMenuMainStart(); + showCursor(); + fadeIn(); + + MenuAction action = kMenuActionNone; + while (!_vm->shouldQuit() && (action == kMenuActionNone)) { + endFrame(true); + + // Check user input + + int16 mouseX, mouseY; + MouseButtons mouseButtons; + + int16 key = checkInput(mouseX, mouseY, mouseButtons); + if (key == kKeyEscape) + // ESC -> Quit + return kMenuActionQuit; + + if (mouseButtons != kMouseButtonsLeft) + continue; + + // If we clicked on a difficulty button, show the selected difficulty and start the game + Difficulty difficulty = checkDifficultyButton(mouseX, mouseY); + if (difficulty < kDifficultyMAX) { + _difficulty = difficulty; + action = kMenuActionPlay; + + drawMenuMainStart(); + _vm->_util->longDelay(1000); + } + + if (checkAnimalsButton(mouseX, mouseY)) + action = kMenuActionAnimals; + + } + + return action; +} + +OnceUpon::MenuAction OnceUpon::doMenuMainIngame() { + fadeOut(); + drawMenuMainIngame(); + showCursor(); + fadeIn(); + + MenuAction action = kMenuActionNone; + while (!_vm->shouldQuit() && (action == kMenuActionNone)) { + endFrame(true); + + // Check user input + + int16 mouseX, mouseY; + MouseButtons mouseButtons; + + int16 key = checkInput(mouseX, mouseY, mouseButtons); + if (key == kKeyEscape) + // ESC -> Quit + return kMenuActionQuit; + + if (mouseButtons != kMouseButtonsLeft) + continue; + + // If we clicked on a difficulty button, change the current difficulty level + Difficulty difficulty = checkDifficultyButton(mouseX, mouseY); + if ((difficulty < kDifficultyMAX) && (_difficulty != difficulty)) { + _difficulty = difficulty; + + drawMenuMainIngame(); + } + + // If we clicked on a section button, restart the game from this section + int8 section = checkSectionButton(mouseX, mouseY); + if (section >= 0) { + _section = section; + action = kMenuActionRestart; + } + + } + + return action; +} + +OnceUpon::MenuAction OnceUpon::doMenuIngame() { + drawMenuIngame(); + showCursor(); + + MenuAction action = kMenuActionNone; + while (!_vm->shouldQuit() && (action == kMenuActionNone)) { + endFrame(true); + + // Check user input + + int16 mouseX, mouseY; + MouseButtons mouseButtons; + + int16 key = checkInput(mouseX, mouseY, mouseButtons); + if ((key == kKeyEscape) || (mouseButtons == kMouseButtonsRight)) + // ESC or right mouse button -> Dismiss the menu + action = kMenuActionPlay; + + if (mouseButtons != kMouseButtonsLeft) + continue; + + // Check if we've pressed one of the buttons + int8 button = checkIngameButton(mouseX, mouseY); + if (button == 0) + action = kMenuActionQuit; + else if (button == 1) + action = kMenuActionMainMenu; + else if (button == 2) + action = kMenuActionPlay; + + } + + return action; +} + +void OnceUpon::drawMenuMainStart() { + // Draw the background + _vm->_video->drawPackedSprite("menu2.cmp", *_vm->_draw->_backSurface); + + // Draw the "Listen to animal names" button + if (_animalsButton) { + Surface elements(320, 38, 1); + _vm->_video->drawPackedSprite("elemenu.cmp", elements); + _vm->_draw->_backSurface->fillRect(_animalsButton->left , _animalsButton->top, + _animalsButton->right, _animalsButton->bottom, 0); + _vm->_draw->_backSurface->blit(elements, + _animalsButton->srcLeft , _animalsButton->srcTop, + _animalsButton->srcRight, _animalsButton->srcBottom, + _animalsButton->dstX , _animalsButton->dstY); + } + + // Highlight the current difficulty + drawMenuDifficulty(); + + _vm->_draw->forceBlit(); +} + +void OnceUpon::drawMenuMainIngame() { + // Draw the background + _vm->_video->drawPackedSprite("menu.cmp", *_vm->_draw->_backSurface); + + // Highlight the current difficulty + drawMenuDifficulty(); + + // Draw the section buttons + Surface elements(320, 200, 1); + _vm->_video->drawPackedSprite("elemenu.cmp", elements); + + for (uint i = 0; i < ARRAYSIZE(kSectionButtons); i++) { + const MenuButton &button = kSectionButtons[i]; + + if (!button.needDraw) + continue; + + if (_section >= (uint)button.id) + _vm->_draw->_backSurface->blit(elements, button.srcLeft, button.srcTop, button.srcRight, button.srcBottom, + button.dstX, button.dstY); + } + + _vm->_draw->forceBlit(); +} + +void OnceUpon::drawMenuIngame() { + Surface menu(320, 34, 1); + _vm->_video->drawPackedSprite("icon.cmp", menu); + + // Draw the menu in a special way + for (uint i = 0; i < ARRAYSIZE(kIngameButtons); i++) { + const MenuButton &button = kIngameButtons[i]; + + drawLineByLine(menu, button.srcLeft, button.srcTop, button.srcRight, button.srcBottom, + button.dstX, button.dstY); + } + + _vm->_draw->forceBlit(); + _vm->_video->retrace(); +} + +void OnceUpon::drawMenuDifficulty() { + if (_difficulty == kDifficultyMAX) + return; + + TXTFile *difficulties = loadTXT(getLocFile("diffic.tx"), TXTFile::kFormatStringPositionColor); + + // Draw the difficulty name + difficulties->draw((uint) _difficulty, *_vm->_draw->_backSurface, &_plettre, 1); + + // Draw a border around the current difficulty + _vm->_draw->_backSurface->drawRect(kMainMenuDifficultyButton[_difficulty].left, + kMainMenuDifficultyButton[_difficulty].top, + kMainMenuDifficultyButton[_difficulty].right, + kMainMenuDifficultyButton[_difficulty].bottom, + difficulties->getLines()[_difficulty].color); + + delete difficulties; +} + +void OnceUpon::clearMenuIngame(const Surface &background) { + // Find the area encompassing the whole ingame menu + + int16 left = 0x7FFF; + int16 top = 0x7FFF; + int16 right = 0x0000; + int16 bottom = 0x0000; + + for (uint i = 0; i < ARRAYSIZE(kIngameButtons); i++) { + const MenuButton &button = kIngameButtons[i]; + + if (!button.needDraw) + continue; + + left = MIN(left , button.dstX); + top = MIN(top , button.dstY); + right = MAX(right , button.dstX + (button.srcRight - button.srcLeft + 1) - 1); + bottom = MAX(bottom, button.dstY + (button.srcBottom - button.srcTop + 1) - 1); + } + + if ((left > right) || (top > bottom)) + return; + + // Clear it line by line + drawLineByLine(background, left, top, right, bottom, left, top); +} + +OnceUpon::Difficulty OnceUpon::checkDifficultyButton(int16 x, int16 y) const { + for (uint i = 0; i < ARRAYSIZE(kMainMenuDifficultyButton); i++) { + const MenuButton &button = kMainMenuDifficultyButton[i]; + + if ((x >= button.left) && (x <= button.right) && (y >= button.top) && (y <= button.bottom)) + return (Difficulty) button.id; + } + + return kDifficultyMAX; +} + +bool OnceUpon::checkAnimalsButton(int16 x, int16 y) const { + if (!_animalsButton) + return false; + + return (x >= _animalsButton->left) && (x <= _animalsButton->right) && + (y >= _animalsButton->top) && (y <= _animalsButton->bottom); +} + +int8 OnceUpon::checkSectionButton(int16 x, int16 y) const { + for (uint i = 0; i < ARRAYSIZE(kSectionButtons); i++) { + const MenuButton &button = kSectionButtons[i]; + + if ((uint)button.id > _section) + continue; + + if ((x >= button.left) && (x <= button.right) && (y >= button.top) && (y <= button.bottom)) + return (int8)button.id; + } + + return -1; +} + +int8 OnceUpon::checkIngameButton(int16 x, int16 y) const { + for (uint i = 0; i < ARRAYSIZE(kIngameButtons); i++) { + const MenuButton &button = kIngameButtons[i]; + + if ((x >= button.left) && (x <= button.right) && (y >= button.top) && (y <= button.bottom)) + return (int8)button.id; + } + + return -1; +} + +void OnceUpon::drawLineByLine(const Surface &src, int16 left, int16 top, int16 right, int16 bottom, + int16 x, int16 y) const { + + // A special way of drawing something: + // Draw every other line "downwards", wait a bit after each line + // Then, draw the remaining lines "upwards" and again wait a bit after each line. + + if (_vm->shouldQuit()) + return; + + const int16 width = right - left + 1; + const int16 height = bottom - top + 1; + + if ((width <= 0) || (height <= 0)) + return; + + for (int16 i = 0; i < height; i += 2) { + if (_vm->shouldQuit()) + return; + + _vm->_draw->_backSurface->blit(src, left, top + i, right, top + i, x, y + i); + + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, x, y + i, x + width - 1, y + 1); + _vm->_draw->blitInvalidated(); + + _vm->_util->longDelay(1); + } + + for (int16 i = (height & 1) ? height : (height - 1); i >= 0; i -= 2) { + if (_vm->shouldQuit()) + return; + + _vm->_draw->_backSurface->blit(src, left, top + i, right, top + i, x, y + i); + + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, x, y + i, x + width - 1, y + 1); + _vm->_draw->blitInvalidated(); + + _vm->_util->longDelay(1); + } +} + } // End of namespace OnceUpon } // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 968c70ef48..640e61383d 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -42,18 +42,59 @@ public: ~OnceUpon(); protected: + enum MenuType { + kMenuTypeMainStart = 0, ///< The big main menu at game start. + kMenuTypeMainIngame, ///< The big main menu during the game. + kMenuTypeIngame ///< The small popup menu during the game. + }; + + enum MenuAction { + kMenuActionNone = 0, ///< No action. + kMenuActionAnimals , ///< Do the animal names. + kMenuActionPlay , ///< Play the game. + kMenuActionRestart , ///< Restart the section. + kMenuActionMainMenu, ///< Go to the main menu. + kMenuActionQuit ///< Quit the game. + }; + + enum Difficulty { + kDifficultyBeginner = 0, + kDifficultyIntermediate = 1, + kDifficultyAdvanced = 2, + kDifficultyMAX + }; + + struct MenuButton { + bool needDraw; + int16 left, top, right, bottom; + int16 srcLeft, srcTop, srcRight, srcBottom; + int16 dstX, dstY; + int id; + }; + + static const uint kSectionCount = 15; + + void init(); void deinit(); + void setAnimalsButton(const MenuButton *animalsButton); + void setGamePalette(uint palette); + void setGameCursor(); bool doCopyProtection(const uint8 colors[7], const uint8 shapes[7 * 20], const uint8 obfuscate[4]); - void showWait(); ///< Show the wait / loading screen. - void showIntro(); ///< Show the whole intro. + void showWait(uint palette = 0xFFFF); ///< Show the wait / loading screen. + void showIntro(); ///< Show the whole intro. void showChapter(int chapter); ///< Show a chapter intro text. + MenuAction doMenu(MenuType type); + + void drawLineByLine(const Surface &src, int16 left, int16 top, int16 right, int16 bottom, + int16 x, int16 y) const; + // Fonts Font *_jeudak; @@ -61,7 +102,14 @@ protected: Font *_plettre; Font *_glettre; + Difficulty _difficulty; + uint8 _section; + private: + static const MenuButton kMainMenuDifficultyButton[3]; + static const MenuButton kSectionButtons[4]; + static const MenuButton kIngameButtons[3]; + void setCopyProtectionPalette(); void setAnimState(ANIObject &ani, uint16 state, bool once, bool pause) const; @@ -82,8 +130,27 @@ private: void playTitleMusicAtariST(); void stopTitleMusic(); + // Menu helpers + MenuAction doMenuMainStart(); + MenuAction doMenuMainIngame(); + MenuAction doMenuIngame(); + + void drawMenuMainStart(); + void drawMenuMainIngame(); + void drawMenuIngame(); + void drawMenuDifficulty(); + + void clearMenuIngame(const Surface &background); + + Difficulty checkDifficultyButton(int16 x, int16 y) const; + bool checkAnimalsButton (int16 x, int16 y) const; + int8 checkSectionButton (int16 x, int16 y) const; + int8 checkIngameButton (int16 x, int16 y) const; + bool _openedArchives; + + const MenuButton *_animalsButton; }; } // End of namespace OnceUpon -- cgit v1.2.3 From 34cf81a4b614dee5f2657bf24d9f867165e6ced9 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 1 Jul 2012 03:45:09 +0200 Subject: GOB: Add some PreGob sound utility functions --- engines/gob/pregob/onceupon/onceupon.cpp | 10 ++++++++- engines/gob/pregob/onceupon/onceupon.h | 8 ++++++++ engines/gob/pregob/pregob.cpp | 35 ++++++++++++++++++++++++++++++++ engines/gob/pregob/pregob.h | 11 ++++++++++ 4 files changed, 63 insertions(+), 1 deletion(-) diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 67004d2912..ad6befaea2 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -246,6 +246,10 @@ const OnceUpon::MenuButton OnceUpon::kIngameButtons[3] = { {true, 180, 83, 211, 116, 72, 0, 103, 34, 180, 83, 2} }; +const char *OnceUpon::kSound[kSoundMAX] = { + "diamant.snd" +}; + OnceUpon::OnceUpon(GobEngine *vm) : PreGob(vm), _jeudak(0), _lettre(0), _plettre(0), _glettre(0), _openedArchives(false), _animalsButton(0) { @@ -286,6 +290,8 @@ void OnceUpon::init() { "please contact the ScummVM team with details about this version.\n" "Thanks", _vm->getLangDesc(_vm->_global->_language)); + loadSounds(kSound, kSoundMAX); + initScreen(); _difficulty = kDifficultyMAX; @@ -293,6 +299,8 @@ void OnceUpon::init() { } void OnceUpon::deinit() { + freeSounds(); + delete _jeudak; delete _lettre; delete _plettre; @@ -671,7 +679,7 @@ void OnceUpon::stopTitleMusic() { _vm->_sound->blasterStopComposition(); _vm->_sound->protrackerStop(); - for (int i = 0; i < Sound::kSoundsCount; i++) + for (int i = 0; i < ::Gob::Sound::kSoundsCount; i++) _vm->_sound->sampleFree(_vm->_sound->sampleGetBySlot(i)); } diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 640e61383d..9ad563903e 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -64,6 +64,11 @@ protected: kDifficultyMAX }; + enum Sound { + kSoundClick = 0, + kSoundMAX + }; + struct MenuButton { bool needDraw; int16 left, top, right, bottom; @@ -110,6 +115,9 @@ private: static const MenuButton kSectionButtons[4]; static const MenuButton kIngameButtons[3]; + static const char *kSound[kSoundMAX]; + + void setCopyProtectionPalette(); void setAnimState(ANIObject &ani, uint16 state, bool once, bool pause) const; diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index 582ebc6677..9c6cfb717a 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -32,6 +32,8 @@ #include "gob/video.h" #include "gob/aniobject.h" +#include "gob/sound/sound.h" + #include "gob/pregob/pregob.h" static char kLanguageSuffix[5] = { 't', 'g', 'a', 'e', 'i' }; @@ -141,6 +143,39 @@ bool PreGob::isCursorVisible() const { return CursorMan.isVisible(); } +void PreGob::loadSounds(const char * const *sounds, uint soundCount) { + freeSounds(); + + _sounds.resize(soundCount); + + for (uint i = 0; i < soundCount; i++) { + int32 size; + byte *data = _vm->_dataIO->getFile(sounds[i], size); + + if (!data || !_sounds[i].load(SOUND_SND, data, size)) { + delete data; + + warning("PreGob::loadSounds(): Failed to load sound \"%s\"", sounds[i]); + continue; + } + } +} + +void PreGob::freeSounds() { + _sounds.clear(); +} + +void PreGob::playSound(uint sound, int16 frequency, int16 repCount) { + if (sound >= _sounds.size()) + return; + + _vm->_sound->blasterPlay(&_sounds[sound], repCount, frequency); +} + +void PreGob::stopSound() { + _vm->_sound->blasterStop(0); +} + void PreGob::endFrame(bool doInput) { _vm->_draw->blitInvalidated(); _vm->_util->waitEndFrame(); diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index 902a7c437d..b91758876e 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -24,9 +24,12 @@ #define GOB_PREGOB_PREGOB_H #include "common/str.h" +#include "common/array.h" #include "gob/util.h" +#include "gob/sound/sounddesc.h" + #include "gob/pregob/txtfile.h" namespace Gob { @@ -70,6 +73,12 @@ protected: bool isCursorVisible() const; + void loadSounds(const char * const *sounds, uint soundCount); + void freeSounds(); + + void playSound(uint sound, int16 frequency = 0, int16 repCount = 0); + void stopSound(); + void endFrame(bool doInput); int16 checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons); @@ -89,6 +98,8 @@ protected: private: bool _fadedOut; ///< Did we fade out? + + Common::Array _sounds; }; } // End of namespace Gob -- cgit v1.2.3 From a98ba5f038c536a2b492b816433f4283e9d1ae26 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 1 Jul 2012 03:47:27 +0200 Subject: GOB: Play a click sound in the Once Upon A Time menus --- engines/gob/pregob/onceupon/onceupon.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index ad6befaea2..49516a55c7 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -778,6 +778,8 @@ OnceUpon::MenuAction OnceUpon::doMenuMainStart() { if (mouseButtons != kMouseButtonsLeft) continue; + playSound(kSoundClick); + // If we clicked on a difficulty button, show the selected difficulty and start the game Difficulty difficulty = checkDifficultyButton(mouseX, mouseY); if (difficulty < kDifficultyMAX) { @@ -819,6 +821,8 @@ OnceUpon::MenuAction OnceUpon::doMenuMainIngame() { if (mouseButtons != kMouseButtonsLeft) continue; + playSound(kSoundClick); + // If we clicked on a difficulty button, change the current difficulty level Difficulty difficulty = checkDifficultyButton(mouseX, mouseY); if ((difficulty < kDifficultyMAX) && (_difficulty != difficulty)) { -- cgit v1.2.3 From e477b7d2b996bb4a93b3d95fb5b08e01d64e3b03 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 1 Jul 2012 14:55:51 +0200 Subject: GOB: Move the Once Upon A Time palettes into their own file --- engines/gob/pregob/onceupon/onceupon.cpp | 134 +--------- engines/gob/pregob/onceupon/palettes.h | 411 +++++++++++++++++++++++++++++++ 2 files changed, 412 insertions(+), 133 deletions(-) create mode 100644 engines/gob/pregob/onceupon/palettes.h diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 49516a55c7..c30421900f 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -33,139 +33,7 @@ #include "gob/sound/sound.h" #include "gob/pregob/onceupon/onceupon.h" - -static const int kPaletteSize = 16; -static const uint kPaletteCount = 20; - -static const byte kCopyProtectionPalette[3 * kPaletteSize] = { - 0x00, 0x00, 0x00, 0x19, 0x00, 0x19, 0x00, 0x3F, 0x00, 0x00, 0x2A, 0x2A, - 0x2A, 0x00, 0x00, 0x2A, 0x00, 0x2A, 0x2A, 0x15, 0x00, 0x00, 0x19, 0x12, - 0x00, 0x00, 0x00, 0x15, 0x15, 0x3F, 0x15, 0x3F, 0x15, 0x00, 0x20, 0x3F, - 0x3F, 0x00, 0x00, 0x3F, 0x00, 0x20, 0x3F, 0x3F, 0x00, 0x3F, 0x3F, 0x3F -}; - -static const byte kGamePalettes[kPaletteCount][3 * kPaletteSize] = { - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x18, 0x00, 0x00, 0x3C, - 0x1C, 0x28, 0x00, 0x10, 0x18, 0x00, 0x1C, 0x1C, 0x20, 0x14, 0x14, 0x14, - 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x14, 0x20, 0x04, - 0x3C, 0x2C, 0x00, 0x02, 0x00, 0x18, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00, - 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x38, 0x20, 0x3C, 0x2C, 0x10, 0x30, 0x20, 0x08, 0x28, - 0x14, 0x00, 0x1C, 0x20, 0x20, 0x38, 0x18, 0x18, 0x2C, 0x10, 0x10, 0x24, - 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x3C, 0x20, 0x20, 0x24, 0x14, 0x14, 0x1C, 0x10, 0x10, - 0x14, 0x0C, 0x0C, 0x1C, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x10, 0x10, 0x10, - 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x10, 0x28, 0x1C, 0x10, 0x1C, 0x10, 0x10, 0x14, 0x0C, - 0x1C, 0x1C, 0x3C, 0x24, 0x24, 0x3C, 0x18, 0x18, 0x24, 0x10, 0x10, 0x18, - 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x3F, 0x26, 0x3F, 0x36, 0x1C, 0x36, 0x2C, 0x12, 0x2A, - 0x27, 0x0C, 0x24, 0x22, 0x07, 0x1E, 0x1D, 0x03, 0x18, 0x16, 0x00, 0x10, - 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3A, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x3F, 0x39, 0x26, 0x38, 0x34, 0x1C, 0x30, 0x2F, 0x13, - 0x27, 0x29, 0x0C, 0x1D, 0x22, 0x07, 0x14, 0x1B, 0x03, 0x0C, 0x14, 0x00, - 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3A, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x1C, 0x34, 0x38, 0x14, 0x2C, 0x30, - 0x0C, 0x20, 0x2C, 0x08, 0x18, 0x28, 0x04, 0x10, 0x20, 0x00, 0x08, 0x1C, - 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x38, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x3C, 0x2C, 0x24, 0x38, 0x24, 0x1C, 0x30, 0x1C, 0x14, - 0x28, 0x18, 0x0C, 0x20, 0x10, 0x04, 0x1C, 0x0C, 0x00, 0x14, 0x08, 0x00, - 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x38, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x3C, 0x34, 0x24, 0x38, 0x2C, 0x1C, 0x30, 0x24, 0x14, - 0x2C, 0x1C, 0x10, 0x30, 0x30, 0x3C, 0x1C, 0x1C, 0x38, 0x0C, 0x0C, 0x38, - 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x02, 0x03, 0x14, 0x07, 0x07, 0x1D, - 0x0E, 0x0E, 0x25, 0x17, 0x17, 0x2E, 0x21, 0x22, 0x36, 0x2F, 0x2F, 0x3F, - 0x3F, 0x3F, 0x3F, 0x3F, 0x3B, 0x0D, 0x3A, 0x31, 0x0A, 0x35, 0x28, 0x07, - 0x30, 0x21, 0x04, 0x2B, 0x19, 0x02, 0x26, 0x12, 0x01, 0x16, 0x0B, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x21, 0x01, 0x00, 0x2A, 0x02, 0x00, - 0x33, 0x03, 0x00, 0x3D, 0x06, 0x00, 0x2A, 0x19, 0x05, 0x15, 0x14, 0x14, - 0x22, 0x1F, 0x1E, 0x2F, 0x2C, 0x28, 0x3F, 0x3C, 0x29, 0x3F, 0x38, 0x0B, - 0x3B, 0x30, 0x0A, 0x37, 0x29, 0x08, 0x33, 0x23, 0x07, 0x2F, 0x1D, 0x06 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x1C, 0x38, 0x34, 0x30, 0x28, 0x2C, 0x24, 0x1C, - 0x24, 0x18, 0x10, 0x1C, 0x10, 0x08, 0x14, 0x04, 0x04, 0x10, 0x00, 0x00, - 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x38, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x1C, 0x38, 0x34, 0x30, 0x28, 0x2C, 0x24, 0x1C, - 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, - 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x38, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x1A, 0x30, 0x37, 0x14, 0x28, 0x31, 0x10, 0x20, 0x2C, - 0x0C, 0x19, 0x27, 0x08, 0x12, 0x21, 0x05, 0x0C, 0x1C, 0x03, 0x07, 0x16, - 0x01, 0x03, 0x11, 0x00, 0x00, 0x0C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x34, 0x30, 0x34, 0x30, 0x24, 0x30, 0x28, 0x1C, 0x28, - 0x24, 0x14, 0x24, 0x1C, 0x0C, 0x1C, 0x18, 0x08, 0x18, 0x14, 0x04, 0x14, - 0x0C, 0x04, 0x0C, 0x08, 0x00, 0x08, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x2C, 0x24, 0x0C, 0x34, 0x34, 0x28, 0x2C, 0x2C, 0x1C, - 0x24, 0x24, 0x10, 0x1C, 0x18, 0x08, 0x14, 0x14, 0x08, 0x10, 0x10, 0x04, - 0x0C, 0x0C, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x38, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x28, 0x31, 0x10, 0x20, 0x2C, - 0x0C, 0x19, 0x27, 0x08, 0x12, 0x21, 0x05, 0x0C, 0x1C, 0x03, 0x07, 0x16, - 0x01, 0x03, 0x11, 0x00, 0x3C, 0x00, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x10, 0x28, 0x1C, 0x10, 0x1C, 0x10, 0x10, 0x14, 0x0C, - 0x1C, 0x1C, 0x3C, 0x24, 0x24, 0x3C, 0x18, 0x18, 0x24, 0x10, 0x10, 0x18, - 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - }, - { - 0x00, 0x00, 0x00, 0x10, 0x28, 0x1C, 0x10, 0x1C, 0x10, 0x10, 0x14, 0x0C, - 0x1C, 0x1C, 0x3C, 0x24, 0x24, 0x3C, 0x18, 0x18, 0x24, 0x10, 0x10, 0x18, - 0x14, 0x20, 0x04, 0x00, 0x00, 0x24, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, - 0x3C, 0x2C, 0x00, 0x3C, 0x18, 0x00, 0x3C, 0x04, 0x00, 0x1C, 0x00, 0x00 - } -}; +#include "gob/pregob/onceupon/palettes.h" static const uint kLanguageCount = 5; diff --git a/engines/gob/pregob/onceupon/palettes.h b/engines/gob/pregob/onceupon/palettes.h new file mode 100644 index 0000000000..952581041c --- /dev/null +++ b/engines/gob/pregob/onceupon/palettes.h @@ -0,0 +1,411 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_PREGOB_ONCEUPON_PALETTES_H +#define GOB_PREGOB_ONCEUPON_PALETTES_H + +static const int kPaletteSize = 16; +static const uint kPaletteCount = 20; + +static const byte kCopyProtectionPalette[3 * kPaletteSize] = { + 0x00, 0x00, 0x00, + 0x19, 0x00, 0x19, + 0x00, 0x3F, 0x00, + 0x00, 0x2A, 0x2A, + 0x2A, 0x00, 0x00, + 0x2A, 0x00, 0x2A, + 0x2A, 0x15, 0x00, + 0x00, 0x19, 0x12, + 0x00, 0x00, 0x00, + 0x15, 0x15, 0x3F, + 0x15, 0x3F, 0x15, + 0x00, 0x20, 0x3F, + 0x3F, 0x00, 0x00, + 0x3F, 0x00, 0x20, + 0x3F, 0x3F, 0x00, + 0x3F, 0x3F, 0x3F +}; + +static const byte kGamePalettes[kPaletteCount][3 * kPaletteSize] = { + { + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, + 0x00, 0x00, 0x18, + 0x00, 0x00, 0x3C, + 0x1C, 0x28, 0x00, + 0x10, 0x18, 0x00, + 0x1C, 0x1C, 0x20, + 0x14, 0x14, 0x14, + 0x14, 0x20, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x3C, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x3C, + 0x14, 0x20, 0x04, + 0x3C, 0x2C, 0x00, + 0x02, 0x00, 0x18, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00, + 0x14, 0x20, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x3C, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x38, 0x20, 0x3C, + 0x2C, 0x10, 0x30, + 0x20, 0x08, 0x28, + 0x14, 0x00, 0x1C, + 0x20, 0x20, 0x38, + 0x18, 0x18, 0x2C, + 0x10, 0x10, 0x24, + 0x14, 0x20, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x3C, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x3C, 0x20, 0x20, + 0x24, 0x14, 0x14, + 0x1C, 0x10, 0x10, + 0x14, 0x0C, 0x0C, + 0x1C, 0x1C, 0x1C, + 0x18, 0x18, 0x18, + 0x10, 0x10, 0x10, + 0x14, 0x20, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x3C, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x10, 0x28, 0x1C, + 0x10, 0x1C, 0x10, + 0x10, 0x14, 0x0C, + 0x1C, 0x1C, 0x3C, + 0x24, 0x24, 0x3C, + 0x18, 0x18, 0x24, + 0x10, 0x10, 0x18, + 0x14, 0x20, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x3C, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x3F, 0x26, 0x3F, + 0x36, 0x1C, 0x36, + 0x2C, 0x12, 0x2A, + 0x27, 0x0C, 0x24, + 0x22, 0x07, 0x1E, + 0x1D, 0x03, 0x18, + 0x16, 0x00, 0x10, + 0x14, 0x20, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x3A, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x3F, 0x39, 0x26, + 0x38, 0x34, 0x1C, + 0x30, 0x2F, 0x13, + 0x27, 0x29, 0x0C, + 0x1D, 0x22, 0x07, + 0x14, 0x1B, 0x03, + 0x0C, 0x14, 0x00, + 0x14, 0x20, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x3A, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x24, 0x3C, 0x3C, + 0x1C, 0x34, 0x38, + 0x14, 0x2C, 0x30, + 0x0C, 0x20, 0x2C, + 0x08, 0x18, 0x28, + 0x04, 0x10, 0x20, + 0x00, 0x08, 0x1C, + 0x14, 0x20, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x38, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x24, + 0x38, 0x24, 0x1C, + 0x30, 0x1C, 0x14, + 0x28, 0x18, 0x0C, + 0x20, 0x10, 0x04, + 0x1C, 0x0C, 0x00, + 0x14, 0x08, 0x00, + 0x14, 0x20, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x38, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x3C, 0x34, 0x24, + 0x38, 0x2C, 0x1C, + 0x30, 0x24, 0x14, + 0x2C, 0x1C, 0x10, + 0x30, 0x30, 0x3C, + 0x1C, 0x1C, 0x38, + 0x0C, 0x0C, 0x38, + 0x14, 0x20, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x3C, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0C, + 0x02, 0x03, 0x14, + 0x07, 0x07, 0x1D, + 0x0E, 0x0E, 0x25, + 0x17, 0x17, 0x2E, + 0x21, 0x22, 0x36, + 0x2F, 0x2F, 0x3F, + 0x3F, 0x3F, 0x3F, + 0x3F, 0x3B, 0x0D, + 0x3A, 0x31, 0x0A, + 0x35, 0x28, 0x07, + 0x30, 0x21, 0x04, + 0x2B, 0x19, 0x02, + 0x26, 0x12, 0x01, + 0x16, 0x0B, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, + 0x21, 0x01, 0x00, + 0x2A, 0x02, 0x00, + 0x33, 0x03, 0x00, + 0x3D, 0x06, 0x00, + 0x2A, 0x19, 0x05, + 0x15, 0x14, 0x14, + 0x22, 0x1F, 0x1E, + 0x2F, 0x2C, 0x28, + 0x3F, 0x3C, 0x29, + 0x3F, 0x38, 0x0B, + 0x3B, 0x30, 0x0A, + 0x37, 0x29, 0x08, + 0x33, 0x23, 0x07, + 0x2F, 0x1D, 0x06 + }, + { + 0x00, 0x00, 0x00, + 0x00, 0x1C, 0x38, + 0x34, 0x30, 0x28, + 0x2C, 0x24, 0x1C, + 0x24, 0x18, 0x10, + 0x1C, 0x10, 0x08, + 0x14, 0x04, 0x04, + 0x10, 0x00, 0x00, + 0x14, 0x20, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x38, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x00, 0x1C, 0x38, + 0x34, 0x30, 0x28, + 0x2C, 0x24, 0x1C, + 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, + 0x14, 0x20, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x38, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x1A, 0x30, 0x37, + 0x14, 0x28, 0x31, + 0x10, 0x20, 0x2C, + 0x0C, 0x19, 0x27, + 0x08, 0x12, 0x21, + 0x05, 0x0C, 0x1C, + 0x03, 0x07, 0x16, + 0x01, 0x03, 0x11, + 0x00, 0x00, 0x0C, + 0x3C, 0x3C, 0x3C, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x34, 0x30, 0x34, + 0x30, 0x24, 0x30, + 0x28, 0x1C, 0x28, + 0x24, 0x14, 0x24, + 0x1C, 0x0C, 0x1C, + 0x18, 0x08, 0x18, + 0x14, 0x04, 0x14, + 0x0C, 0x04, 0x0C, + 0x08, 0x00, 0x08, + 0x3C, 0x3C, 0x3C, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x2C, 0x24, 0x0C, + 0x34, 0x34, 0x28, + 0x2C, 0x2C, 0x1C, + 0x24, 0x24, 0x10, + 0x1C, 0x18, 0x08, + 0x14, 0x14, 0x08, + 0x10, 0x10, 0x04, + 0x0C, 0x0C, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x38, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x14, 0x28, 0x31, + 0x10, 0x20, 0x2C, + 0x0C, 0x19, 0x27, + 0x08, 0x12, 0x21, + 0x05, 0x0C, 0x1C, + 0x03, 0x07, 0x16, + 0x01, 0x03, 0x11, + 0x00, 0x3C, 0x00, + 0x3C, 0x3C, 0x3C, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x10, 0x28, 0x1C, + 0x10, 0x1C, 0x10, + 0x10, 0x14, 0x0C, + 0x1C, 0x1C, 0x3C, + 0x24, 0x24, 0x3C, + 0x18, 0x18, 0x24, + 0x10, 0x10, 0x18, + 0x14, 0x20, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x3C, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + }, + { + 0x00, 0x00, 0x00, + 0x10, 0x28, 0x1C, + 0x10, 0x1C, 0x10, + 0x10, 0x14, 0x0C, + 0x1C, 0x1C, 0x3C, + 0x24, 0x24, 0x3C, + 0x18, 0x18, 0x24, + 0x10, 0x10, 0x18, + 0x14, 0x20, 0x04, + 0x00, 0x00, 0x24, + 0x3C, 0x3C, 0x3C, + 0x00, 0x00, 0x00, + 0x3C, 0x2C, 0x00, + 0x3C, 0x18, 0x00, + 0x3C, 0x04, 0x00, + 0x1C, 0x00, 0x00 + } +}; + +#endif // GOB_PREGOB_ONCEUPON_PALETTES_H -- cgit v1.2.3 From 4663ab2373ac3230ccb95cc2accee87ddd1682b8 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 1 Jul 2012 15:55:02 +0200 Subject: GOB: Fix some broken German text in Once Upon A Time --- engines/gob/pregob/onceupon/brokenstrings.h | 51 +++++++++++++++++++++++++++++ engines/gob/pregob/onceupon/onceupon.cpp | 18 ++++++++++ engines/gob/pregob/onceupon/onceupon.h | 3 ++ engines/gob/pregob/pregob.cpp | 5 +++ engines/gob/pregob/pregob.h | 2 ++ 5 files changed, 79 insertions(+) create mode 100644 engines/gob/pregob/onceupon/brokenstrings.h diff --git a/engines/gob/pregob/onceupon/brokenstrings.h b/engines/gob/pregob/onceupon/brokenstrings.h new file mode 100644 index 0000000000..86c0603058 --- /dev/null +++ b/engines/gob/pregob/onceupon/brokenstrings.h @@ -0,0 +1,51 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_PREGOB_ONCEUPON_BROKENSTRINGS_H +#define GOB_PREGOB_ONCEUPON_BROKENSTRINGS_H + +struct BrokenString { + const char *wrong; + const char *correct; +}; + +struct BrokenStringLanguage { + const BrokenString *strings; + uint count; +}; + +static const BrokenString kBrokenStringsGerman[] = { + { "Zeichungen von Kaki," , "Zeichnungen von Kaki," }, + { "die es in seine Wachtr\204ume", "die es in seine Tagtr\204ume" }, + { " Spielerfahrung" , " Spielerfahren" }, + { " Fortgeschrittene" , " Fortgeschritten" } +}; + +static const BrokenStringLanguage kBrokenStrings[kLanguageCount] = { + { 0, 0 }, // French + { kBrokenStringsGerman, ARRAYSIZE(kBrokenStringsGerman) }, // German + { 0, 0 }, // English + { 0, 0 }, // Spanish + { 0, 0 }, // Italian +}; + +#endif // GOB_PREGOB_ONCEUPON_BROKENSTRINGS_H diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index c30421900f..c20ca2a45f 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -211,6 +211,24 @@ void OnceUpon::setGameCursor() { setCursor(cursor, 105, 0, 120, 15, 0, 0); } +void OnceUpon::fixTXTStrings(TXTFile &txt) const { + TXTFile::LineArray &lines = txt.getLines(); + for (uint i = 0; i < lines.size(); i++) + lines[i].text = fixString(lines[i].text); +} + +#include "gob/pregob/onceupon/brokenstrings.h" +Common::String OnceUpon::fixString(const Common::String &str) const { + const BrokenStringLanguage &broken = kBrokenStrings[_vm->_global->_language]; + + for (uint i = 0; i < broken.count; i++) { + if (str == broken.strings[i].wrong) + return broken.strings[i].correct; + } + + return str; +} + enum CopyProtectionState { kCPStateSetup, // Set up the screen kCPStateWaitUser, // Waiting for the user to pick a shape diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 9ad563903e..efc2710d67 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -88,6 +88,9 @@ protected: void setGamePalette(uint palette); void setGameCursor(); + Common::String fixString(const Common::String &str) const; + void fixTXTStrings(TXTFile &txt) const; + bool doCopyProtection(const uint8 colors[7], const uint8 shapes[7 * 20], const uint8 obfuscate[4]); void showWait(uint palette = 0xFFFF); ///< Show the wait / loading screen. diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index 9c6cfb717a..f94f990f76 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -256,7 +256,12 @@ TXTFile *PreGob::loadTXT(const Common::String &txtFile, TXTFile::Format format) delete txtStream; + fixTXTStrings(*txt); + return txt; } +void PreGob::fixTXTStrings(TXTFile &txt) const { +} + } // End of namespace Gob diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index b91758876e..0a40ed6242 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -93,6 +93,8 @@ protected: Common::String getLocFile(const Common::String &file) const; TXTFile *loadTXT(const Common::String &txtFile, TXTFile::Format format) const; + virtual void fixTXTStrings(TXTFile &txt) const; + GobEngine *_vm; -- cgit v1.2.3 From 9e997fea1be0c3f7cd8af7ee0f145879d5c49882 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 2 Jul 2012 00:09:43 +0200 Subject: GOB: Add "long" PreGob language suffixes --- engines/gob/pregob/pregob.cpp | 9 ++++++--- engines/gob/pregob/pregob.h | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index f94f990f76..f39a7a112e 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -36,10 +36,13 @@ #include "gob/pregob/pregob.h" -static char kLanguageSuffix[5] = { 't', 'g', 'a', 'e', 'i' }; namespace Gob { +const char PreGob::kLanguageSuffixShort[5] = { 't', 'g', 'a', 'e', 'i'}; +const char *PreGob::kLanguageSuffixLong [5] = {"fr", "al", "an", "it", "es"}; + + PreGob::PreGob(GobEngine *vm) : _vm(vm), _fadedOut(false) { } @@ -241,10 +244,10 @@ void PreGob::redrawAnim(ANIObject &ani) { } Common::String PreGob::getLocFile(const Common::String &file) const { - if (_vm->_global->_language >= ARRAYSIZE(kLanguageSuffix)) + if (_vm->_global->_language >= ARRAYSIZE(kLanguageSuffixShort)) return file; - return file + kLanguageSuffix[_vm->_global->_language]; + return file + kLanguageSuffixShort[_vm->_global->_language]; } TXTFile *PreGob::loadTXT(const Common::String &txtFile, TXTFile::Format format) const { diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index 0a40ed6242..477aec6dc8 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -47,6 +47,10 @@ public: virtual void run() = 0; protected: + static const char kLanguageSuffixShort[5]; + static const char *kLanguageSuffixLong [5]; + + void initScreen(); ///< Initialize the game screen. void fadeOut(); ///< Fade to black. -- cgit v1.2.3 From 9d564ecd268781d8b92ca7a5895aa10aea6b4e52 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 2 Jul 2012 00:10:23 +0200 Subject: GOB: Implement the animal names bit Once Upon A Time --- engines/gob/pregob/onceupon/abracadabra.cpp | 28 ++- engines/gob/pregob/onceupon/abracadabra.h | 3 + engines/gob/pregob/onceupon/babayaga.cpp | 28 ++- engines/gob/pregob/onceupon/babayaga.h | 3 + engines/gob/pregob/onceupon/brokenstrings.h | 5 +- engines/gob/pregob/onceupon/onceupon.cpp | 265 +++++++++++++++++++++++----- engines/gob/pregob/onceupon/onceupon.h | 27 ++- engines/gob/pregob/pregob.cpp | 50 ++++-- engines/gob/pregob/pregob.h | 5 + 9 files changed, 343 insertions(+), 71 deletions(-) diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp index 696e4d9594..781d683ef0 100644 --- a/engines/gob/pregob/onceupon/abracadabra.cpp +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -52,6 +52,32 @@ const OnceUpon::MenuButton Abracadabra::kAnimalsButtons = { true, 131, 127, 183, 164, 193, 0, 243, 35, 132, 128, 0 }; +const OnceUpon::MenuButton Abracadabra::kAnimalButtons[] = { + {false, 37, 89, 95, 127, 37, 89, 95, 127, 131, 25, 0}, + {false, 114, 65, 172, 111, 114, 65, 172, 111, 131, 25, 1}, + {false, 186, 72, 227, 96, 186, 72, 227, 96, 139, 25, 2}, + {false, 249, 87, 282, 112, 249, 87, 282, 112, 143, 25, 3}, + {false, 180, 102, 234, 138, 180, 102, 234, 138, 133, 25, 4}, + {false, 197, 145, 242, 173, 197, 145, 242, 173, 137, 25, 5}, + {false, 113, 151, 171, 176, 113, 151, 171, 176, 131, 25, 6}, + {false, 114, 122, 151, 150, 114, 122, 151, 150, 141, 25, 7}, + {false, 36, 136, 94, 176, 36, 136, 94, 176, 131, 25, 8}, + {false, 243, 123, 295, 155, 243, 123, 295, 155, 136, 25, 9} +}; + +const char *Abracadabra::kAnimalNames[] = { + "loup", + "drag", + "arai", + "crap", + "crab", + "mous", + "saut", + "guep", + "rhin", + "scor" +}; + Abracadabra::Abracadabra(GobEngine *vm) : OnceUpon(vm) { setAnimalsButton(&kAnimalsButtons); @@ -91,7 +117,7 @@ void Abracadabra::mainLoop() { else if (action == kMenuActionRestart) warning("Abracadabra::mainLoop(): TODO: Restart"); else if (action == kMenuActionAnimals) - warning("Abracadabra::mainLoop(): TODO: Animals"); + doAnimalNames(ARRAYSIZE(kAnimalButtons), kAnimalButtons, kAnimalNames); else if (action == kMenuActionQuit) break; } diff --git a/engines/gob/pregob/onceupon/abracadabra.h b/engines/gob/pregob/onceupon/abracadabra.h index 64deaf4389..5f3a1ba634 100644 --- a/engines/gob/pregob/onceupon/abracadabra.h +++ b/engines/gob/pregob/onceupon/abracadabra.h @@ -39,6 +39,9 @@ public: private: static const MenuButton kAnimalsButtons; + static const MenuButton kAnimalButtons[]; + static const char *kAnimalNames[]; + void mainLoop(); }; diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp index b752bb0862..34f674107c 100644 --- a/engines/gob/pregob/onceupon/babayaga.cpp +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -52,6 +52,32 @@ const OnceUpon::MenuButton BabaYaga::kAnimalsButtons = { true, 131, 127, 183, 164, 193, 0, 245, 37, 131, 127, 0 }; +const OnceUpon::MenuButton BabaYaga::kAnimalButtons[] = { + {false, 34, 84, 92, 127, 34, 84, 92, 127, 131, 25, 0}, + {false, 114, 65, 172, 111, 114, 65, 172, 111, 131, 25, 1}, + {false, 186, 72, 227, 96, 186, 72, 227, 96, 139, 25, 2}, + {false, 249, 87, 282, 112, 249, 87, 282, 112, 143, 25, 3}, + {false, 180, 97, 234, 138, 180, 97, 234, 138, 133, 25, 4}, + {false, 197, 145, 242, 173, 197, 145, 242, 173, 137, 25, 5}, + {false, 113, 156, 171, 176, 113, 156, 171, 176, 131, 25, 6}, + {false, 114, 127, 151, 150, 114, 127, 151, 150, 141, 25, 7}, + {false, 36, 136, 94, 176, 36, 136, 94, 176, 131, 25, 8}, + {false, 245, 123, 293, 155, 245, 123, 293, 155, 136, 25, 9} +}; + +const char *BabaYaga::kAnimalNames[] = { + "vaut", + "drag", + "arai", + "gren", + "fauc", + "abei", + "serp", + "tort", + "sang", + "rena" +}; + BabaYaga::BabaYaga(GobEngine *vm) : OnceUpon(vm) { setAnimalsButton(&kAnimalsButtons); @@ -91,7 +117,7 @@ void BabaYaga::mainLoop() { else if (action == kMenuActionRestart) warning("BabaYaga::mainLoop(): TODO: Restart"); else if (action == kMenuActionAnimals) - warning("BabaYaga::mainLoop(): TODO: Animals"); + doAnimalNames(ARRAYSIZE(kAnimalButtons), kAnimalButtons, kAnimalNames); else if (action == kMenuActionQuit) break; } diff --git a/engines/gob/pregob/onceupon/babayaga.h b/engines/gob/pregob/onceupon/babayaga.h index 98d452418f..de42f8e8fe 100644 --- a/engines/gob/pregob/onceupon/babayaga.h +++ b/engines/gob/pregob/onceupon/babayaga.h @@ -39,6 +39,9 @@ public: private: static const MenuButton kAnimalsButtons; + static const MenuButton kAnimalButtons[]; + static const char *kAnimalNames[]; + void mainLoop(); }; diff --git a/engines/gob/pregob/onceupon/brokenstrings.h b/engines/gob/pregob/onceupon/brokenstrings.h index 86c0603058..98dcb720fb 100644 --- a/engines/gob/pregob/onceupon/brokenstrings.h +++ b/engines/gob/pregob/onceupon/brokenstrings.h @@ -37,7 +37,10 @@ static const BrokenString kBrokenStringsGerman[] = { { "Zeichungen von Kaki," , "Zeichnungen von Kaki," }, { "die es in seine Wachtr\204ume", "die es in seine Tagtr\204ume" }, { " Spielerfahrung" , " Spielerfahren" }, - { " Fortgeschrittene" , " Fortgeschritten" } + { " Fortgeschrittene" , " Fortgeschritten" }, + { "die Vespe" , "die Wespe" }, + { "das Rhinoceros" , "das Rhinozeros" }, + { "die Heusschrecke" , "die Heuschrecke" } }; static const BrokenStringLanguage kBrokenStrings[kLanguageCount] = { diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index c20ca2a45f..b7bf2c3f5a 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -39,7 +39,7 @@ static const uint kLanguageCount = 5; static const uint kCopyProtectionHelpStringCount = 3; -static const char *kCopyProtectionHelpStrings[kLanguageCount][kCopyProtectionHelpStringCount] = { +static const char *kCopyProtectionHelpStrings[Gob::OnceUpon::OnceUpon::kLanguageCount][kCopyProtectionHelpStringCount] = { { // French "Consulte le livret des animaux, rep\212re la", "page correspondant \205 la couleur de l\'\202cran", @@ -67,7 +67,7 @@ static const char *kCopyProtectionHelpStrings[kLanguageCount][kCopyProtectionHel } }; -static const char *kCopyProtectionWrongStrings[kLanguageCount] = { +static const char *kCopyProtectionWrongStrings[Gob::OnceUpon::OnceUpon::kLanguageCount] = { "Tu t\'es tromp\202, dommage...", // French "Schade, du hast dich geirrt." , // German "You are wrong, what a pity!" , // English @@ -95,25 +95,38 @@ namespace Gob { namespace OnceUpon { -const OnceUpon::MenuButton OnceUpon::kMainMenuDifficultyButton[3] = { - {false, 29, 18, 77, 57, 0, 0, 0, 0, 0, 0, 0}, - {false, 133, 18, 181, 57, 0, 0, 0, 0, 0, 0, 1}, - {false, 241, 18, 289, 57, 0, 0, 0, 0, 0, 0, 2}, +const OnceUpon::MenuButton OnceUpon::kMainMenuDifficultyButton[] = { + {false, 29, 18, 77, 57, 0, 0, 0, 0, 0, 0, (int)kDifficultyBeginner}, + {false, 133, 18, 181, 57, 0, 0, 0, 0, 0, 0, (int)kDifficultyIntermediate}, + {false, 241, 18, 289, 57, 0, 0, 0, 0, 0, 0, (int)kDifficultyAdvanced}, }; -const OnceUpon::MenuButton OnceUpon::kSectionButtons[4] = { +const OnceUpon::MenuButton OnceUpon::kSectionButtons[] = { {false, 27, 121, 91, 179, 0, 0, 0, 0, 0, 0, 0}, { true, 95, 121, 159, 179, 4, 1, 56, 49, 100, 126, 2}, { true, 163, 121, 227, 179, 64, 1, 120, 49, 168, 126, 6}, { true, 231, 121, 295, 179, 128, 1, 184, 49, 236, 126, 10} }; -const OnceUpon::MenuButton OnceUpon::kIngameButtons[3] = { +const OnceUpon::MenuButton OnceUpon::kIngameButtons[] = { {true, 108, 83, 139, 116, 0, 0, 31, 34, 108, 83, 0}, {true, 144, 83, 175, 116, 36, 0, 67, 34, 144, 83, 1}, {true, 180, 83, 211, 116, 72, 0, 103, 34, 180, 83, 2} }; +const OnceUpon::MenuButton OnceUpon::kAnimalNamesBack = { + true, 19, 13, 50, 46, 36, 0, 67, 34, 19, 13, 1 +}; + +const OnceUpon::MenuButton OnceUpon::kLanguageButtons[] = { + {true, 43, 80, 93, 115, 0, 55, 50, 90, 43, 80, 0}, + {true, 132, 80, 182, 115, 53, 55, 103, 90, 132, 80, 1}, + {true, 234, 80, 284, 115, 106, 55, 156, 90, 234, 80, 2}, + {true, 43, 138, 93, 173, 159, 55, 209, 90, 43, 138, 3}, + {true, 132, 138, 182, 173, 212, 55, 262, 90, 132, 138, 4}, + {true, 234, 138, 284, 173, 265, 55, 315, 90, 234, 138, 2} +}; + const char *OnceUpon::kSound[kSoundMAX] = { "diamant.snd" }; @@ -643,6 +656,7 @@ OnceUpon::MenuAction OnceUpon::doMenu(MenuType type) { OnceUpon::MenuAction OnceUpon::doMenuMainStart() { fadeOut(); + setGamePalette(17); drawMenuMainStart(); showCursor(); fadeIn(); @@ -667,16 +681,16 @@ OnceUpon::MenuAction OnceUpon::doMenuMainStart() { playSound(kSoundClick); // If we clicked on a difficulty button, show the selected difficulty and start the game - Difficulty difficulty = checkDifficultyButton(mouseX, mouseY); - if (difficulty < kDifficultyMAX) { - _difficulty = difficulty; + int diff = checkButton(kMainMenuDifficultyButton, ARRAYSIZE(kMainMenuDifficultyButton), mouseX, mouseY); + if (diff >= 0) { + _difficulty = (Difficulty)diff; action = kMenuActionPlay; drawMenuMainStart(); _vm->_util->longDelay(1000); } - if (checkAnimalsButton(mouseX, mouseY)) + if (_animalsButton && (checkButton(_animalsButton, 1, mouseX, mouseY) != -1)) action = kMenuActionAnimals; } @@ -686,6 +700,7 @@ OnceUpon::MenuAction OnceUpon::doMenuMainStart() { OnceUpon::MenuAction OnceUpon::doMenuMainIngame() { fadeOut(); + setGamePalette(17); drawMenuMainIngame(); showCursor(); fadeIn(); @@ -710,16 +725,16 @@ OnceUpon::MenuAction OnceUpon::doMenuMainIngame() { playSound(kSoundClick); // If we clicked on a difficulty button, change the current difficulty level - Difficulty difficulty = checkDifficultyButton(mouseX, mouseY); - if ((difficulty < kDifficultyMAX) && (_difficulty != difficulty)) { - _difficulty = difficulty; + int diff = checkButton(kMainMenuDifficultyButton, ARRAYSIZE(kMainMenuDifficultyButton), mouseX, mouseY); + if ((diff >= 0) && (diff != (int)_difficulty)) { + _difficulty = (Difficulty)diff; drawMenuMainIngame(); } // If we clicked on a section button, restart the game from this section - int8 section = checkSectionButton(mouseX, mouseY); - if (section >= 0) { + int section = checkButton(kSectionButtons, ARRAYSIZE(kSectionButtons), mouseX, mouseY); + if ((section >= 0) && (section <= _section)) { _section = section; action = kMenuActionRestart; } @@ -750,8 +765,7 @@ OnceUpon::MenuAction OnceUpon::doMenuIngame() { if (mouseButtons != kMouseButtonsLeft) continue; - // Check if we've pressed one of the buttons - int8 button = checkIngameButton(mouseX, mouseY); + int button = checkButton(kIngameButtons, ARRAYSIZE(kIngameButtons), mouseX, mouseY); if (button == 0) action = kMenuActionQuit; else if (button == 1) @@ -774,10 +788,7 @@ void OnceUpon::drawMenuMainStart() { _vm->_video->drawPackedSprite("elemenu.cmp", elements); _vm->_draw->_backSurface->fillRect(_animalsButton->left , _animalsButton->top, _animalsButton->right, _animalsButton->bottom, 0); - _vm->_draw->_backSurface->blit(elements, - _animalsButton->srcLeft , _animalsButton->srcTop, - _animalsButton->srcRight, _animalsButton->srcBottom, - _animalsButton->dstX , _animalsButton->dstY); + drawButton(*_vm->_draw->_backSurface, elements, *_animalsButton); } // Highlight the current difficulty @@ -804,8 +815,7 @@ void OnceUpon::drawMenuMainIngame() { continue; if (_section >= (uint)button.id) - _vm->_draw->_backSurface->blit(elements, button.srcLeft, button.srcTop, button.srcRight, button.srcBottom, - button.dstX, button.dstY); + drawButton(*_vm->_draw->_backSurface, elements, button); } _vm->_draw->forceBlit(); @@ -873,48 +883,205 @@ void OnceUpon::clearMenuIngame(const Surface &background) { drawLineByLine(background, left, top, right, bottom, left, top); } -OnceUpon::Difficulty OnceUpon::checkDifficultyButton(int16 x, int16 y) const { - for (uint i = 0; i < ARRAYSIZE(kMainMenuDifficultyButton); i++) { - const MenuButton &button = kMainMenuDifficultyButton[i]; +int OnceUpon::checkButton(const MenuButton *buttons, uint count, int16 x, int16 y, int failValue) const { + for (uint i = 0; i < count; i++) { + const MenuButton &button = buttons[i]; if ((x >= button.left) && (x <= button.right) && (y >= button.top) && (y <= button.bottom)) - return (Difficulty) button.id; + return (int)button.id; } - return kDifficultyMAX; + return failValue; } -bool OnceUpon::checkAnimalsButton(int16 x, int16 y) const { - if (!_animalsButton) - return false; - - return (x >= _animalsButton->left) && (x <= _animalsButton->right) && - (y >= _animalsButton->top) && (y <= _animalsButton->bottom); +void OnceUpon::drawButton(Surface &dest, const Surface &src, const MenuButton &button) const { + dest.blit(src, button.srcLeft, button.srcTop, button.srcRight, button.srcBottom, button.dstX, button.dstY); } -int8 OnceUpon::checkSectionButton(int16 x, int16 y) const { - for (uint i = 0; i < ARRAYSIZE(kSectionButtons); i++) { - const MenuButton &button = kSectionButtons[i]; +void OnceUpon::drawButtons(Surface &dest, const Surface &src, const MenuButton *buttons, uint count) const { + for (uint i = 0; i < count; i++) { + const MenuButton &button = buttons[i]; - if ((uint)button.id > _section) + if (!button.needDraw) continue; - if ((x >= button.left) && (x <= button.right) && (y >= button.top) && (y <= button.bottom)) - return (int8)button.id; + drawButton(dest, src, button); } +} - return -1; +void OnceUpon::drawButtonBorder(const MenuButton &button, uint8 color) { + _vm->_draw->_backSurface->drawRect(button.left, button.top, button.right, button.bottom, color); + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, button.left, button.top, button.right, button.bottom); } -int8 OnceUpon::checkIngameButton(int16 x, int16 y) const { - for (uint i = 0; i < ARRAYSIZE(kIngameButtons); i++) { - const MenuButton &button = kIngameButtons[i]; +enum AnimalNamesState { + kANStateChoose, + kANStateNames, + kANStateFinish +}; - if ((x >= button.left) && (x <= button.right) && (y >= button.top) && (y <= button.bottom)) - return (int8)button.id; +void OnceUpon::doAnimalNames(uint count, const MenuButton *buttons, const char * const *names) { + fadeOut(); + clearScreen(); + setGamePalette(19); + + bool cursorVisible = isCursorVisible(); + + // Set the cursor + addCursor(); + setGameCursor(); + + anSetupChooser(); + + int8 _animal = -1; + + AnimalNamesState state = kANStateChoose; + while (!_vm->shouldQuit() && (state != kANStateFinish)) { + showCursor(); + fadeIn(); + + endFrame(true); + + // Check user input + + int16 mouseX, mouseY; + MouseButtons mouseButtons; + + checkInput(mouseX, mouseY, mouseButtons); + + // If we moused over an animal button, draw a border around it + int animal = checkButton(buttons, count, mouseX, mouseY); + if ((state == kANStateChoose) && (animal != _animal)) { + // Erase the old border + if (_animal >= 0) + drawButtonBorder(buttons[_animal], 15); + + _animal = animal; + + // Draw the new border + if (_animal >= 0) + drawButtonBorder(buttons[_animal], 10); + } + + if (mouseButtons != kMouseButtonsLeft) + continue; + + playSound(kSoundClick); + + // We clicked on a language button, play the animal name + int language = checkButton(kLanguageButtons, ARRAYSIZE(kLanguageButtons), mouseX, mouseY); + if ((state == kANStateNames) && (language >= 0)) + anPlayAnimalName(names[_animal], language); + + // We clicked on an animal + if ((state == kANStateChoose) && (_animal >= 0)) { + anSetupNames(buttons[_animal]); + + state = kANStateNames; + } + + // If we clicked on the back button, go back + if (checkButton(&kAnimalNamesBack, 1, mouseX, mouseY) != -1) { + if (state == kANStateNames) { + anSetupChooser(); + + state = kANStateChoose; + } else if (state == kANStateChoose) + state = kANStateFinish; + } } - return -1; + fadeOut(); + + // Restore the cursor + if (!cursorVisible) + hideCursor(); + removeCursor(); +} + +void OnceUpon::anSetupChooser() { + fadeOut(); + + _vm->_video->drawPackedSprite("dico.cmp", *_vm->_draw->_backSurface); + + // Draw the back button + Surface menu(320, 34, 1); + _vm->_video->drawPackedSprite("icon.cmp", menu); + drawButton(*_vm->_draw->_backSurface, menu, kAnimalNamesBack); + + // "Choose an animal" + TXTFile *choose = loadTXT(getLocFile("choisi.tx"), TXTFile::kFormatStringPosition); + choose->draw(*_vm->_draw->_backSurface, &_plettre, 1, 14); + delete choose; + + _vm->_draw->forceBlit(); +} + +void OnceUpon::anSetupNames(const MenuButton &animal) { + fadeOut(); + + Surface background(320, 200, 1); + + _vm->_video->drawPackedSprite("dico.cmp", background); + + // Draw the background and clear what we don't need + _vm->_draw->_backSurface->blit(background); + _vm->_draw->_backSurface->fillRect(19, 19, 302, 186, 15); + + // Draw the back button + Surface menu(320, 34, 1); + _vm->_video->drawPackedSprite("icon.cmp", menu); + drawButton(*_vm->_draw->_backSurface, menu, kAnimalNamesBack); + + // Draw the animal + drawButton(*_vm->_draw->_backSurface, background, animal); + + // Draw the language buttons + Surface elements(320, 200, 1); + _vm->_video->drawPackedSprite("elemenu.cmp", elements); + drawButtons(*_vm->_draw->_backSurface, elements, kLanguageButtons, ARRAYSIZE(kLanguageButtons)); + + // Draw the language names + _plettre->drawString("Fran\207ais", 43, 70, 10, 15, true, *_vm->_draw->_backSurface); + _plettre->drawString("Deutsch" , 136, 70, 10, 15, true, *_vm->_draw->_backSurface); + _plettre->drawString("English" , 238, 70, 10, 15, true, *_vm->_draw->_backSurface); + _plettre->drawString("Italiano" , 43, 128, 10, 15, true, *_vm->_draw->_backSurface); + _plettre->drawString("Espa\244ol" , 136, 128, 10, 15, true, *_vm->_draw->_backSurface); + _plettre->drawString("English" , 238, 128, 10, 15, true, *_vm->_draw->_backSurface); + + _vm->_draw->forceBlit(); +} + +void OnceUpon::anPlayAnimalName(const Common::String &animal, uint language) { + // Sound file to play + Common::String soundFile = animal + "_" + kLanguageSuffixLong[language] + ".snd"; + + // Get the name of the animal + TXTFile *names = loadTXT(animal + ".anm", TXTFile::kFormatString); + Common::String name = names->getLines()[language].text; + delete names; + + // It should be centered on the screen + const int nameX = 160 - (name.size() * _plettre->getCharWidth()) / 2; + + // Backup the screen surface + Surface backup(162, 23, 1); + backup.blit(*_vm->_draw->_backSurface, 78, 123, 239, 145, 0, 0); + + // Draw the name border + Surface nameBorder(162, 23, 1); + _vm->_video->drawPackedSprite("mot.cmp", nameBorder); + _vm->_draw->_backSurface->blit(nameBorder, 0, 0, 161, 22, 78, 123); + + // Print the animal name + _plettre->drawString(name, nameX, 129, 10, 0, true, *_vm->_draw->_backSurface); + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, 78, 123, 239, 145); + + playSoundFile(soundFile); + + // Restore the screen + _vm->_draw->_backSurface->blit(backup, 0, 0, 161, 22, 78, 123); + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, 78, 123, 239, 145); } void OnceUpon::drawLineByLine(const Surface &src, int16 left, int16 top, int16 right, int16 bottom, diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index efc2710d67..ff7266e9f3 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -38,6 +38,8 @@ namespace OnceUpon { class OnceUpon : public PreGob { public: + static const uint kLanguageCount = 5; + OnceUpon(GobEngine *vm); ~OnceUpon(); @@ -74,7 +76,7 @@ protected: int16 left, top, right, bottom; int16 srcLeft, srcTop, srcRight, srcBottom; int16 dstX, dstY; - int id; + uint id; }; static const uint kSectionCount = 15; @@ -100,6 +102,8 @@ protected: MenuAction doMenu(MenuType type); + void doAnimalNames(uint count, const MenuButton *buttons, const char * const *names); + void drawLineByLine(const Surface &src, int16 left, int16 top, int16 right, int16 bottom, int16 x, int16 y) const; @@ -114,9 +118,12 @@ protected: uint8 _section; private: - static const MenuButton kMainMenuDifficultyButton[3]; - static const MenuButton kSectionButtons[4]; - static const MenuButton kIngameButtons[3]; + static const MenuButton kMainMenuDifficultyButton[]; + static const MenuButton kSectionButtons[]; + static const MenuButton kIngameButtons[]; + + static const MenuButton kAnimalNamesBack; + static const MenuButton kLanguageButtons[]; static const char *kSound[kSoundMAX]; @@ -153,11 +160,15 @@ private: void clearMenuIngame(const Surface &background); - Difficulty checkDifficultyButton(int16 x, int16 y) const; - bool checkAnimalsButton (int16 x, int16 y) const; - int8 checkSectionButton (int16 x, int16 y) const; - int8 checkIngameButton (int16 x, int16 y) const; + int checkButton(const MenuButton *buttons, uint count, int16 x, int16 y, int failValue = -1) const; + void drawButton(Surface &dest, const Surface &src, const MenuButton &button) const; + void drawButtons(Surface &dest, const Surface &src, const MenuButton *buttons, uint count) const; + void drawButtonBorder(const MenuButton &button, uint8 color); + // Animal names helpers + void anSetupChooser(); + void anSetupNames(const MenuButton &animal); + void anPlayAnimalName(const Common::String &animal, uint language); bool _openedArchives; diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index f39a7a112e..675958035d 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -151,23 +151,28 @@ void PreGob::loadSounds(const char * const *sounds, uint soundCount) { _sounds.resize(soundCount); - for (uint i = 0; i < soundCount; i++) { - int32 size; - byte *data = _vm->_dataIO->getFile(sounds[i], size); - - if (!data || !_sounds[i].load(SOUND_SND, data, size)) { - delete data; - - warning("PreGob::loadSounds(): Failed to load sound \"%s\"", sounds[i]); - continue; - } - } + for (uint i = 0; i < soundCount; i++) + loadSound(_sounds[i], sounds[i]); } void PreGob::freeSounds() { _sounds.clear(); } +bool PreGob::loadSound(SoundDesc &sound, const Common::String &file) const { + int32 size; + byte *data = _vm->_dataIO->getFile(file, size); + + if (!data || !sound.load(SOUND_SND, data, size)) { + delete data; + + warning("PreGob::loadSound(): Failed to load sound \"%s\"", file.c_str()); + return false; + } + + return true; +} + void PreGob::playSound(uint sound, int16 frequency, int16 repCount) { if (sound >= _sounds.size()) return; @@ -179,6 +184,29 @@ void PreGob::stopSound() { _vm->_sound->blasterStop(0); } +void PreGob::playSoundFile(const Common::String &file, int16 frequency, int16 repCount, bool interruptible) { + stopSound(); + + SoundDesc sound; + if (!loadSound(sound, file)) + return; + + _vm->_sound->blasterPlay(&sound, repCount, frequency); + + _vm->_util->forceMouseUp(); + + bool finished = false; + while (!_vm->shouldQuit() && !finished && _vm->_sound->blasterPlayingSound()) { + endFrame(true); + + finished = hasInput(); + } + + _vm->_util->forceMouseUp(); + + stopSound(); +} + void PreGob::endFrame(bool doInput) { _vm->_draw->blitInvalidated(); _vm->_util->waitEndFrame(); diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index 477aec6dc8..a1a3d65a58 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -83,6 +83,8 @@ protected: void playSound(uint sound, int16 frequency = 0, int16 repCount = 0); void stopSound(); + void playSoundFile(const Common::String &file, int16 frequency = 0, int16 repCount = 0, bool interruptible = true); + void endFrame(bool doInput); int16 checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons); @@ -103,6 +105,9 @@ protected: GobEngine *_vm; private: + bool loadSound(SoundDesc &sound, const Common::String &file) const; + + bool _fadedOut; ///< Did we fade out? Common::Array _sounds; -- cgit v1.2.3 From 24644c0012fb46bd77c6c24346f85c984418fb3b Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 2 Jul 2012 04:04:41 +0200 Subject: GOB: Implement the Once Upon A Time "Bye Bye" screen --- engines/gob/pregob/onceupon/abracadabra.cpp | 2 +- engines/gob/pregob/onceupon/babayaga.cpp | 2 +- engines/gob/pregob/onceupon/onceupon.cpp | 16 ++++++++++++++++ engines/gob/pregob/onceupon/onceupon.h | 2 ++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp index 781d683ef0..5a5e407774 100644 --- a/engines/gob/pregob/onceupon/abracadabra.cpp +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -102,7 +102,7 @@ void Abracadabra::run() { mainLoop(); if (!_vm->shouldQuit()) - warning("Abracadabra::run(): TODO: Show \"Bye Bye\""); + showByeBye(); } void Abracadabra::mainLoop() { diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp index 34f674107c..9475ac4b05 100644 --- a/engines/gob/pregob/onceupon/babayaga.cpp +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -102,7 +102,7 @@ void BabaYaga::run() { mainLoop(); if (!_vm->shouldQuit()) - warning("BabaYaga::run(): TODO: Show \"Bye Bye\""); + showByeBye(); } void BabaYaga::mainLoop() { diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index b7bf2c3f5a..6b90e9ba00 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -609,6 +609,22 @@ void OnceUpon::showChapter(int chapter) { fadeOut(); } +void OnceUpon::showByeBye() { + fadeOut(); + hideCursor(); + clearScreen(); + setGamePalette(1); + + _plettre->drawString("Bye Bye....", 140, 80, 2, 0, true, *_vm->_draw->_backSurface); + _vm->_draw->forceBlit(); + + fadeIn(); + + _vm->_util->longDelay(1000); + + fadeOut(); +} + OnceUpon::MenuAction OnceUpon::doMenu(MenuType type) { bool cursorVisible = isCursorVisible(); diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index ff7266e9f3..6f8b67a627 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -100,6 +100,8 @@ protected: void showChapter(int chapter); ///< Show a chapter intro text. + void showByeBye(); ///< Show the "bye bye" screen + MenuAction doMenu(MenuType type); void doAnimalNames(uint count, const MenuButton *buttons, const char * const *names); -- cgit v1.2.3 From 305ab6847a6c3467ab02ea3f0798e300d82c89ed Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 2 Jul 2012 04:18:12 +0200 Subject: GOB: Reorganize and clean up PreGob / Once Upon A Time --- engines/gob/pregob/onceupon/abracadabra.cpp | 28 +-- engines/gob/pregob/onceupon/abracadabra.h | 6 +- engines/gob/pregob/onceupon/babayaga.cpp | 28 +-- engines/gob/pregob/onceupon/babayaga.h | 6 +- engines/gob/pregob/onceupon/onceupon.cpp | 355 ++++++++++++++++------------ engines/gob/pregob/onceupon/onceupon.h | 221 +++++++++++------ engines/gob/pregob/pregob.h | 50 +++- 7 files changed, 424 insertions(+), 270 deletions(-) diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp index 5a5e407774..2e4b5f21e7 100644 --- a/engines/gob/pregob/onceupon/abracadabra.cpp +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -80,7 +80,6 @@ const char *Abracadabra::kAnimalNames[] = { Abracadabra::Abracadabra(GobEngine *vm) : OnceUpon(vm) { - setAnimalsButton(&kAnimalsButtons); } Abracadabra::~Abracadabra() { @@ -99,28 +98,13 @@ void Abracadabra::run() { if (_vm->shouldQuit()) return; - mainLoop(); - - if (!_vm->shouldQuit()) - showByeBye(); -} + // Handle the start menu + doStartMenu(&kAnimalsButtons, ARRAYSIZE(kAnimalButtons), kAnimalButtons, kAnimalNames); + if (_vm->shouldQuit()) + return; -void Abracadabra::mainLoop() { - clearScreen(); - - MenuType mainMenu = kMenuTypeMainStart; - - while (!_vm->shouldQuit()) { - MenuAction action = doMenu(mainMenu); - if (action == kMenuActionPlay) - warning("Abracadabra::mainLoop(): TODO: Play"); - else if (action == kMenuActionRestart) - warning("Abracadabra::mainLoop(): TODO: Restart"); - else if (action == kMenuActionAnimals) - doAnimalNames(ARRAYSIZE(kAnimalButtons), kAnimalButtons, kAnimalNames); - else if (action == kMenuActionQuit) - break; - } + // Play the actual game + playGame(); } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/abracadabra.h b/engines/gob/pregob/onceupon/abracadabra.h index 5f3a1ba634..f2075fc750 100644 --- a/engines/gob/pregob/onceupon/abracadabra.h +++ b/engines/gob/pregob/onceupon/abracadabra.h @@ -37,13 +37,13 @@ public: void run(); private: + /** Definition of the menu button that leads to the animal names screen. */ static const MenuButton kAnimalsButtons; + /** Definition of the buttons that make up the animals in the animal names screen. */ static const MenuButton kAnimalButtons[]; + /** File prefixes for the name of each animal. */ static const char *kAnimalNames[]; - - - void mainLoop(); }; } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp index 9475ac4b05..6f27f469e3 100644 --- a/engines/gob/pregob/onceupon/babayaga.cpp +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -80,7 +80,6 @@ const char *BabaYaga::kAnimalNames[] = { BabaYaga::BabaYaga(GobEngine *vm) : OnceUpon(vm) { - setAnimalsButton(&kAnimalsButtons); } BabaYaga::~BabaYaga() { @@ -99,28 +98,13 @@ void BabaYaga::run() { if (_vm->shouldQuit()) return; - mainLoop(); - - if (!_vm->shouldQuit()) - showByeBye(); -} + // Handle the start menu + doStartMenu(&kAnimalsButtons, ARRAYSIZE(kAnimalButtons), kAnimalButtons, kAnimalNames); + if (_vm->shouldQuit()) + return; -void BabaYaga::mainLoop() { - clearScreen(); - - MenuType mainMenu = kMenuTypeMainStart; - - while (!_vm->shouldQuit()) { - MenuAction action = doMenu(mainMenu); - if (action == kMenuActionPlay) - warning("BabaYaga::mainLoop(): TODO: Play"); - else if (action == kMenuActionRestart) - warning("BabaYaga::mainLoop(): TODO: Restart"); - else if (action == kMenuActionAnimals) - doAnimalNames(ARRAYSIZE(kAnimalButtons), kAnimalButtons, kAnimalNames); - else if (action == kMenuActionQuit) - break; - } + // Play the actual game + playGame(); } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/babayaga.h b/engines/gob/pregob/onceupon/babayaga.h index de42f8e8fe..181b6f4d54 100644 --- a/engines/gob/pregob/onceupon/babayaga.h +++ b/engines/gob/pregob/onceupon/babayaga.h @@ -37,13 +37,13 @@ public: void run(); private: + /** Definition of the menu button that leads to the animal names screen. */ static const MenuButton kAnimalsButtons; + /** Definition of the buttons that make up the animals in the animal names screen. */ static const MenuButton kAnimalButtons[]; + /** File prefixes for the name of each animal. */ static const char *kAnimalNames[]; - - - void mainLoop(); }; } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 6b90e9ba00..785d78b769 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -132,8 +132,17 @@ const char *OnceUpon::kSound[kSoundMAX] = { }; -OnceUpon::OnceUpon(GobEngine *vm) : PreGob(vm), _jeudak(0), _lettre(0), _plettre(0), _glettre(0), - _openedArchives(false), _animalsButton(0) { +OnceUpon::ScreenBackup::ScreenBackup() : palette(-1), changedCursor(false), cursorVisible(false) { + screen = new Surface(320, 200, 1); +} + +OnceUpon::ScreenBackup::~ScreenBackup() { + delete screen; +} + + +OnceUpon::OnceUpon(GobEngine *vm) : PreGob(vm), _openedArchives(false), + _jeudak(0), _lettre(0), _plettre(0), _glettre(0) { } @@ -144,6 +153,8 @@ OnceUpon::~OnceUpon() { void OnceUpon::init() { deinit(); + // Open data files + bool hasSTK1 = _vm->_dataIO->openArchive("stk1.stk", true); bool hasSTK2 = _vm->_dataIO->openArchive("stk2.stk", true); bool hasSTK3 = _vm->_dataIO->openArchive("stk3.stk", true); @@ -153,6 +164,8 @@ void OnceUpon::init() { _openedArchives = true; + // Open fonts + _jeudak = _vm->_draw->loadFont("jeudak.let"); _lettre = _vm->_draw->loadFont("lettre.let"); _plettre = _vm->_draw->loadFont("plettre.let"); @@ -162,6 +175,8 @@ void OnceUpon::init() { error("OnceUpon::OnceUpon(): Failed to fonts (%d, %d, %d, %d)", _jeudak != 0, _lettre != 0, _plettre != 0, _glettre != 0); + // Verify the language + if (_vm->_global->_language == kLanguageAmerican) _vm->_global->_language = kLanguageBritish; @@ -171,17 +186,25 @@ void OnceUpon::init() { "please contact the ScummVM team with details about this version.\n" "Thanks", _vm->getLangDesc(_vm->_global->_language)); - loadSounds(kSound, kSoundMAX); + // Load all our sounds and init the screen + loadSounds(kSound, kSoundMAX); initScreen(); + // We start with an invalid palette + _palette = -1; + + // We start with no selected difficulty and at section 0 _difficulty = kDifficultyMAX; _section = 0; } void OnceUpon::deinit() { + // Free sounds freeSounds(); + // Free fonts + delete _jeudak; delete _lettre; delete _plettre; @@ -192,6 +215,8 @@ void OnceUpon::deinit() { _plettre = 0; _glettre = 0; + // Close archives + if (_openedArchives) { _vm->_dataIO->closeArchive(true); _vm->_dataIO->closeArchive(true); @@ -201,29 +226,115 @@ void OnceUpon::deinit() { _openedArchives = false; } -void OnceUpon::setAnimalsButton(const MenuButton *animalsButton) { - _animalsButton = animalsButton; -} - -void OnceUpon::setCopyProtectionPalette() { - setPalette(kCopyProtectionPalette, kPaletteSize); -} - void OnceUpon::setGamePalette(uint palette) { if (palette >= kPaletteCount) return; + _palette = palette; + setPalette(kGamePalettes[palette], kPaletteSize); } void OnceUpon::setGameCursor() { Surface cursor(320, 16, 1); + // Set the default game cursor _vm->_video->drawPackedSprite("icon.cmp", cursor); - setCursor(cursor, 105, 0, 120, 15, 0, 0); } +void OnceUpon::setAnimState(ANIObject &ani, uint16 state, bool once, bool pause) const { + ani.setAnimation(state); + ani.setMode(once ? ANIObject::kModeOnce : ANIObject::kModeContinuous); + ani.setPause(pause); + ani.setVisible(true); + ani.setPosition(); +} + +void OnceUpon::drawLineByLine(const Surface &src, int16 left, int16 top, int16 right, int16 bottom, + int16 x, int16 y) const { + + // A special way of drawing something: + // Draw every other line "downwards", wait a bit after each line + // Then, draw the remaining lines "upwards" and again wait a bit after each line. + + if (_vm->shouldQuit()) + return; + + const int16 width = right - left + 1; + const int16 height = bottom - top + 1; + + if ((width <= 0) || (height <= 0)) + return; + + // Draw the even lines downwards + for (int16 i = 0; i < height; i += 2) { + if (_vm->shouldQuit()) + return; + + _vm->_draw->_backSurface->blit(src, left, top + i, right, top + i, x, y + i); + + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, x, y + i, x + width - 1, y + 1); + _vm->_draw->blitInvalidated(); + + _vm->_util->longDelay(1); + } + + // Draw the odd lines upwards + for (int16 i = (height & 1) ? height : (height - 1); i >= 0; i -= 2) { + if (_vm->shouldQuit()) + return; + + _vm->_draw->_backSurface->blit(src, left, top + i, right, top + i, x, y + i); + + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, x, y + i, x + width - 1, y + 1); + _vm->_draw->blitInvalidated(); + + _vm->_util->longDelay(1); + } +} + +void OnceUpon::backupScreen(ScreenBackup &backup, bool setDefaultCursor) { + // Backup the screen and palette + backup.screen->blit(*_vm->_draw->_backSurface); + backup.palette = _palette; + + // Backup the cursor + + backup.cursorVisible = isCursorVisible(); + + backup.changedCursor = false; + if (setDefaultCursor) { + backup.changedCursor = true; + + addCursor(); + setGameCursor(); + } +} + +void OnceUpon::restoreScreen(ScreenBackup &backup) { + if (_vm->shouldQuit()) + return; + + // Restore the screen + _vm->_draw->_backSurface->blit(*backup.screen); + _vm->_draw->forceBlit(); + + // Restore the palette + if (backup.palette >= 0) + setGamePalette(backup.palette); + + // Restore the cursor + + if (!backup.cursorVisible) + hideCursor(); + + if (backup.changedCursor) + removeCursor(); + + backup.changedCursor = false; +} + void OnceUpon::fixTXTStrings(TXTFile &txt) const { TXTFile::LineArray &lines = txt.getLines(); for (uint i = 0; i < lines.size(); i++) @@ -251,18 +362,22 @@ enum CopyProtectionState { bool OnceUpon::doCopyProtection(const uint8 colors[7], const uint8 shapes[7 * 20], const uint8 obfuscate[4]) { fadeOut(); - setCopyProtectionPalette(); + setPalette(kCopyProtectionPalette, kPaletteSize); + // Load the copy protection sprites Surface sprites[2] = {Surface(320, 200, 1), Surface(320, 200, 1)}; _vm->_video->drawPackedSprite("grille1.cmp", sprites[0]); _vm->_video->drawPackedSprite("grille2.cmp", sprites[1]); + // Load the clown animation ANIFile ani (_vm, "grille.ani", 320); ANIObject clown(ani); + // Set the copy protection cursor setCursor(sprites[1], 5, 110, 20, 134, 3, 0); + // We start with 2 tries left, not having a correct answer and the copy protection not set up yet CopyProtectionState state = kCPStateSetup; uint8 triesLeft = 2; @@ -423,31 +538,6 @@ void OnceUpon::cpWrong() { clearScreen(); } -void OnceUpon::setAnimState(ANIObject &ani, uint16 state, bool once, bool pause) const { - ani.setAnimation(state); - ani.setMode(once ? ANIObject::kModeOnce : ANIObject::kModeContinuous); - ani.setPause(pause); - ani.setVisible(true); - ani.setPosition(); -} - -void OnceUpon::showWait(uint palette) { - // Show the loading floppy - - fadeOut(); - clearScreen(); - setGamePalette(palette); - - Surface wait(320, 43, 1); - - _vm->_video->drawPackedSprite("wait.cmp", wait); - _vm->_draw->_backSurface->blit(wait, 0, 0, 72, 33, 122, 84); - - _vm->_draw->forceBlit(); - - fadeIn(); -} - void OnceUpon::showIntro() { // Show all intro parts @@ -475,6 +565,23 @@ void OnceUpon::showIntro() { showWait(17); } +void OnceUpon::showWait(uint palette) { + // Show the loading floppy + + fadeOut(); + clearScreen(); + setGamePalette(palette); + + Surface wait(320, 43, 1); + + _vm->_video->drawPackedSprite("wait.cmp", wait); + _vm->_draw->_backSurface->blit(wait, 0, 0, 72, 33, 122, 84); + + _vm->_draw->forceBlit(); + + fadeIn(); +} + void OnceUpon::showQuote() { // Show the quote about fairytales @@ -534,6 +641,8 @@ void OnceUpon::showTitle() { } void OnceUpon::playTitleMusic() { + // Look at what platform this is and play the appropriate music type + if (_vm->getPlatform() == Common::kPlatformPC) playTitleMusicDOS(); else if (_vm->getPlatform() == Common::kPlatformAmiga) @@ -571,6 +680,8 @@ void OnceUpon::playTitleMusicAtariST() { } void OnceUpon::stopTitleMusic() { + // Just stop everything + _vm->_sound->adlibSetRepeating(0); _vm->_sound->blasterRepeatComposition(0); @@ -625,55 +736,29 @@ void OnceUpon::showByeBye() { fadeOut(); } -OnceUpon::MenuAction OnceUpon::doMenu(MenuType type) { - bool cursorVisible = isCursorVisible(); - - // Set the cursor - addCursor(); - setGameCursor(); - - // Backup the screen - Surface screenBackup(320, 200, 1); - screenBackup.blit(*_vm->_draw->_backSurface); - - // Handle the specific menu - MenuAction action; - if (type == kMenuTypeMainStart) - action = doMenuMainStart(); - else if (type == kMenuTypeMainIngame) - action = doMenuMainIngame(); - else if (type == kMenuTypeIngame) - action = doMenuIngame(); - else - error("OnceUpon::doMenu(): No such menu %d", type); - - if (_vm->shouldQuit()) - return action; - - // The ingame menu cleans itself up in a special way - if (type == kMenuTypeIngame) - clearMenuIngame(screenBackup); - - // The main menus fade out - if ((type == kMenuTypeMainStart) || (type == kMenuTypeMainIngame)) - fadeOut(); - - // Restore the screen - _vm->_draw->_backSurface->blit(screenBackup); - _vm->_draw->forceBlit(); +void OnceUpon::doStartMenu(const MenuButton *animalsButton, uint animalCount, + const MenuButton *animalButtons, const char * const *animalNames) { + clearScreen(); - // Restore the cursor - if (!cursorVisible) - hideCursor(); - removeCursor(); + // Wait until we clicked on of the difficulty buttons and are ready to start playing + while (!_vm->shouldQuit()) { + MenuAction action = handleStartMenu(animalsButton); + if (action == kMenuActionPlay) + break; - return action; + // If we pressed the "listen to animal names" button, handle that screen + if (action == kMenuActionAnimals) + handleAnimalNames(animalCount, animalButtons, animalNames); + } } -OnceUpon::MenuAction OnceUpon::doMenuMainStart() { +OnceUpon::MenuAction OnceUpon::handleStartMenu(const MenuButton *animalsButton) { + ScreenBackup screenBackup; + backupScreen(screenBackup, true); + fadeOut(); setGamePalette(17); - drawMenuMainStart(); + drawStartMenu(animalsButton); showCursor(); fadeIn(); @@ -702,22 +787,28 @@ OnceUpon::MenuAction OnceUpon::doMenuMainStart() { _difficulty = (Difficulty)diff; action = kMenuActionPlay; - drawMenuMainStart(); + drawStartMenu(animalsButton); _vm->_util->longDelay(1000); } - if (_animalsButton && (checkButton(_animalsButton, 1, mouseX, mouseY) != -1)) + if (animalsButton && (checkButton(animalsButton, 1, mouseX, mouseY) != -1)) action = kMenuActionAnimals; } + fadeOut(); + restoreScreen(screenBackup); + return action; } -OnceUpon::MenuAction OnceUpon::doMenuMainIngame() { +OnceUpon::MenuAction OnceUpon::handleMainMenu() { + ScreenBackup screenBackup; + backupScreen(screenBackup, true); + fadeOut(); setGamePalette(17); - drawMenuMainIngame(); + drawMainMenu(); showCursor(); fadeIn(); @@ -745,7 +836,7 @@ OnceUpon::MenuAction OnceUpon::doMenuMainIngame() { if ((diff >= 0) && (diff != (int)_difficulty)) { _difficulty = (Difficulty)diff; - drawMenuMainIngame(); + drawMainMenu(); } // If we clicked on a section button, restart the game from this section @@ -757,11 +848,17 @@ OnceUpon::MenuAction OnceUpon::doMenuMainIngame() { } + fadeOut(); + restoreScreen(screenBackup); + return action; } -OnceUpon::MenuAction OnceUpon::doMenuIngame() { - drawMenuIngame(); +OnceUpon::MenuAction OnceUpon::handleIngameMenu() { + ScreenBackup screenBackup; + backupScreen(screenBackup, true); + + drawIngameMenu(); showCursor(); MenuAction action = kMenuActionNone; @@ -791,20 +888,23 @@ OnceUpon::MenuAction OnceUpon::doMenuIngame() { } + clearIngameMenu(*screenBackup.screen); + restoreScreen(screenBackup); + return action; } -void OnceUpon::drawMenuMainStart() { +void OnceUpon::drawStartMenu(const MenuButton *animalsButton) { // Draw the background _vm->_video->drawPackedSprite("menu2.cmp", *_vm->_draw->_backSurface); // Draw the "Listen to animal names" button - if (_animalsButton) { + if (animalsButton) { Surface elements(320, 38, 1); _vm->_video->drawPackedSprite("elemenu.cmp", elements); - _vm->_draw->_backSurface->fillRect(_animalsButton->left , _animalsButton->top, - _animalsButton->right, _animalsButton->bottom, 0); - drawButton(*_vm->_draw->_backSurface, elements, *_animalsButton); + _vm->_draw->_backSurface->fillRect(animalsButton->left , animalsButton->top, + animalsButton->right, animalsButton->bottom, 0); + drawButton(*_vm->_draw->_backSurface, elements, *animalsButton); } // Highlight the current difficulty @@ -813,7 +913,7 @@ void OnceUpon::drawMenuMainStart() { _vm->_draw->forceBlit(); } -void OnceUpon::drawMenuMainIngame() { +void OnceUpon::drawMainMenu() { // Draw the background _vm->_video->drawPackedSprite("menu.cmp", *_vm->_draw->_backSurface); @@ -837,11 +937,11 @@ void OnceUpon::drawMenuMainIngame() { _vm->_draw->forceBlit(); } -void OnceUpon::drawMenuIngame() { +void OnceUpon::drawIngameMenu() { Surface menu(320, 34, 1); _vm->_video->drawPackedSprite("icon.cmp", menu); - // Draw the menu in a special way + // Draw the menu in a special way, button by button for (uint i = 0; i < ARRAYSIZE(kIngameButtons); i++) { const MenuButton &button = kIngameButtons[i]; @@ -863,16 +963,15 @@ void OnceUpon::drawMenuDifficulty() { difficulties->draw((uint) _difficulty, *_vm->_draw->_backSurface, &_plettre, 1); // Draw a border around the current difficulty - _vm->_draw->_backSurface->drawRect(kMainMenuDifficultyButton[_difficulty].left, - kMainMenuDifficultyButton[_difficulty].top, - kMainMenuDifficultyButton[_difficulty].right, - kMainMenuDifficultyButton[_difficulty].bottom, - difficulties->getLines()[_difficulty].color); + drawButtonBorder(kMainMenuDifficultyButton[_difficulty], difficulties->getLines()[_difficulty].color); delete difficulties; } -void OnceUpon::clearMenuIngame(const Surface &background) { +void OnceUpon::clearIngameMenu(const Surface &background) { + if (_vm->shouldQuit()) + return; + // Find the area encompassing the whole ingame menu int16 left = 0x7FFF; @@ -900,6 +999,8 @@ void OnceUpon::clearMenuIngame(const Surface &background) { } int OnceUpon::checkButton(const MenuButton *buttons, uint count, int16 x, int16 y, int failValue) const { + // Look through all buttons, and return the ID of the button we're in + for (uint i = 0; i < count; i++) { const MenuButton &button = buttons[i]; @@ -907,6 +1008,7 @@ int OnceUpon::checkButton(const MenuButton *buttons, uint count, int16 x, int16 return (int)button.id; } + // We're in none of these buttons, return the fail value return failValue; } @@ -931,12 +1033,12 @@ void OnceUpon::drawButtonBorder(const MenuButton &button, uint8 color) { } enum AnimalNamesState { - kANStateChoose, - kANStateNames, - kANStateFinish + kANStateChoose, // We're in the animal chooser + kANStateNames, // We're in the language chooser + kANStateFinish // We're finished }; -void OnceUpon::doAnimalNames(uint count, const MenuButton *buttons, const char * const *names) { +void OnceUpon::handleAnimalNames(uint count, const MenuButton *buttons, const char * const *names) { fadeOut(); clearScreen(); setGamePalette(19); @@ -1100,45 +1202,8 @@ void OnceUpon::anPlayAnimalName(const Common::String &animal, uint language) { _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, 78, 123, 239, 145); } -void OnceUpon::drawLineByLine(const Surface &src, int16 left, int16 top, int16 right, int16 bottom, - int16 x, int16 y) const { - - // A special way of drawing something: - // Draw every other line "downwards", wait a bit after each line - // Then, draw the remaining lines "upwards" and again wait a bit after each line. - - if (_vm->shouldQuit()) - return; - - const int16 width = right - left + 1; - const int16 height = bottom - top + 1; - - if ((width <= 0) || (height <= 0)) - return; - - for (int16 i = 0; i < height; i += 2) { - if (_vm->shouldQuit()) - return; - - _vm->_draw->_backSurface->blit(src, left, top + i, right, top + i, x, y + i); - - _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, x, y + i, x + width - 1, y + 1); - _vm->_draw->blitInvalidated(); - - _vm->_util->longDelay(1); - } - - for (int16 i = (height & 1) ? height : (height - 1); i >= 0; i -= 2) { - if (_vm->shouldQuit()) - return; - - _vm->_draw->_backSurface->blit(src, left, top + i, right, top + i, x, y + i); - - _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, x, y + i, x + width - 1, y + 1); - _vm->_draw->blitInvalidated(); - - _vm->_util->longDelay(1); - } +void OnceUpon::playGame() { + warning("OnceUpon::playGame(): TODO"); } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 6f8b67a627..08c8803c67 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -38,18 +38,67 @@ namespace OnceUpon { class OnceUpon : public PreGob { public: + /** Number of languages we support. */ static const uint kLanguageCount = 5; + OnceUpon(GobEngine *vm); ~OnceUpon(); + protected: - enum MenuType { - kMenuTypeMainStart = 0, ///< The big main menu at game start. - kMenuTypeMainIngame, ///< The big main menu during the game. - kMenuTypeIngame ///< The small popup menu during the game. + /** A description of a menu button. */ + struct MenuButton { + bool needDraw; ///< Does the button need drawing? + + int16 left; ///< Left coordinate of the button. + int16 top; ///< Top coordinate of the button. + int16 right; ///< Right coordinate of the button. + int16 bottom; ///< Bottom coordinate of the button. + + int16 srcLeft; ///< Left coordinate of the button's sprite. + int16 srcTop; ///< Top coordinate of the button's sprite. + int16 srcRight; ///< Right coordinate of the button's sprite. + int16 srcBottom; ///< Right coordinate of the button's sprite. + + int16 dstX; ///< Destination X coordinate of the button's sprite. + int16 dstY; ///< Destination Y coordinate of the button's sprite. + + uint id; ///< The button's ID. }; + + void init(); + void deinit(); + + /** Handle the copy protection. + * + * @param colors Colors the copy protection animals can be. + * @param shapes The shape that's the correct answer for each animal in each color. + * @param obfuscate Extra obfuscate table. correctShape = shapes[colors][obfuscate[animal]]. + * @return true if the user guessed the correct shape, false otherwise. + */ + bool doCopyProtection(const uint8 colors[7], const uint8 shapes[7 * 20], const uint8 obfuscate[4]); + + /** Show the intro. */ + void showIntro(); + + /** Handle the start menu. + * + * @param animalsButton Definition of the menu button that leads to the animal names screen. Can be 0. + * @param animalCount Number of animals in the animal names screen. + * @param animalButtons Definition of the buttons that make up the animals in the animal names screen. + * @param animalNames File prefixes for the name of each animal. + */ + void doStartMenu(const MenuButton *animalsButton, uint animalCount, + const MenuButton *animalButtons, const char * const *animalNames); + + /** Play the game proper. */ + void playGame(); + + +private: + /** All actions a user can request in a menu. */ enum MenuAction { kMenuActionNone = 0, ///< No action. kMenuActionAnimals , ///< Do the animal names. @@ -59,6 +108,7 @@ protected: kMenuActionQuit ///< Quit the game. }; + /** Difficulty levels. */ enum Difficulty { kDifficultyBeginner = 0, kDifficultyIntermediate = 1, @@ -66,115 +116,148 @@ protected: kDifficultyMAX }; + /** The different sounds common in the game. */ enum Sound { kSoundClick = 0, kSoundMAX }; - struct MenuButton { - bool needDraw; - int16 left, top, right, bottom; - int16 srcLeft, srcTop, srcRight, srcBottom; - int16 dstX, dstY; - uint id; - }; + /** A complete screen backup. */ + struct ScreenBackup { + Surface *screen; ///< Screen contents. + int palette; ///< Screen palette. - static const uint kSectionCount = 15; + bool changedCursor; ///< Did we change the cursor? + bool cursorVisible; ///< Was the cursor visible? + ScreenBackup(); + ~ScreenBackup(); + }; - void init(); - void deinit(); - void setAnimalsButton(const MenuButton *animalsButton); + /** The number of game sections. */ + static const uint kSectionCount = 15; - void setGamePalette(uint palette); - void setGameCursor(); + static const MenuButton kMainMenuDifficultyButton[]; ///< Difficulty buttons. + static const MenuButton kSectionButtons[]; ///< Section buttons. - Common::String fixString(const Common::String &str) const; - void fixTXTStrings(TXTFile &txt) const; + static const MenuButton kIngameButtons[]; ///< Ingame menu buttons. - bool doCopyProtection(const uint8 colors[7], const uint8 shapes[7 * 20], const uint8 obfuscate[4]); + static const MenuButton kAnimalNamesBack; ///< "Back" button in the animal names screens. + static const MenuButton kLanguageButtons[]; ///< Language buttons in the animal names screen. - void showWait(uint palette = 0xFFFF); ///< Show the wait / loading screen. - void showIntro(); ///< Show the whole intro. + /** All general game sounds we know about. */ + static const char *kSound[kSoundMAX]; - void showChapter(int chapter); ///< Show a chapter intro text. - void showByeBye(); ///< Show the "bye bye" screen + // -- General helpers -- - MenuAction doMenu(MenuType type); + void setGamePalette(uint palette); ///< Set a game palette. + void setGameCursor(); ///< Set the default game cursor. - void doAnimalNames(uint count, const MenuButton *buttons, const char * const *names); + /** Set the state of an ANIObject. */ + void setAnimState(ANIObject &ani, uint16 state, bool once, bool pause) const; + /** Draw this sprite in a fancy, animated line-by-line way. */ void drawLineByLine(const Surface &src, int16 left, int16 top, int16 right, int16 bottom, int16 x, int16 y) const; + /** Backup the screen contents. */ + void backupScreen(ScreenBackup &backup, bool setDefaultCursor = false); + /** Restore the screen contents with a previously made backup. */ + void restoreScreen(ScreenBackup &backup); - // Fonts - Font *_jeudak; - Font *_lettre; - Font *_plettre; - Font *_glettre; + Common::String fixString(const Common::String &str) const; ///< Fix a string if necessary. + void fixTXTStrings(TXTFile &txt) const; ///< Fix all strings in a TXT. - Difficulty _difficulty; - uint8 _section; -private: - static const MenuButton kMainMenuDifficultyButton[]; - static const MenuButton kSectionButtons[]; - static const MenuButton kIngameButtons[]; + // -- Copy protection helpers -- - static const MenuButton kAnimalNamesBack; - static const MenuButton kLanguageButtons[]; + /** Set up the copy protection. */ + int8 cpSetup(const uint8 colors[7], const uint8 shapes[7 * 20], + const uint8 obfuscate[4], const Surface sprites[2]); + /** Find the shape under these coordinates. */ + int8 cpFindShape(int16 x, int16 y) const; + /** Display the "You are wrong" screen. */ + void cpWrong(); - static const char *kSound[kSoundMAX]; + // -- Show different game screens -- - void setCopyProtectionPalette(); + void showWait(uint palette = 0xFFFF); ///< Show the wait / loading screen. + void showQuote(); ///< Show the quote about fairytales. + void showTitle(); ///< Show the Once Upon A Time title. + void showChapter(int chapter); ///< Show a chapter intro text. + void showByeBye(); ///< Show the "bye bye" screen. - void setAnimState(ANIObject &ani, uint16 state, bool once, bool pause) const; + /** Handle the "listen to animal names" part. */ + void handleAnimalNames(uint count, const MenuButton *buttons, const char * const *names); - // Copy protection helpers - int8 cpSetup(const uint8 colors[7], const uint8 shapes[7 * 20], const uint8 obfuscate[4], const Surface sprites[2]); - int8 cpFindShape(int16 x, int16 y) const; - void cpWrong(); - // Intro parts - void showQuote(); - void showTitle(); - - // Title music - void playTitleMusic(); - void playTitleMusicDOS(); - void playTitleMusicAmiga(); - void playTitleMusicAtariST(); - void stopTitleMusic(); - - // Menu helpers - MenuAction doMenuMainStart(); - MenuAction doMenuMainIngame(); - MenuAction doMenuIngame(); - - void drawMenuMainStart(); - void drawMenuMainIngame(); - void drawMenuIngame(); + // -- Title music helpers -- + + void playTitleMusic(); ///< Play the title music. + void playTitleMusicDOS(); ///< Play the title music of the DOS version. + void playTitleMusicAmiga(); ///< Play the title music of the Amiga version. + void playTitleMusicAtariST(); ///< Play the title music of the Atari ST version. + void stopTitleMusic(); ///< Stop the title music. + + + // -- Menu helpers -- + + MenuAction handleStartMenu(const MenuButton *animalsButton); ///< Handle the start menu. + MenuAction handleMainMenu(); ///< Handle the main menu. + MenuAction handleIngameMenu(); ///< Handle the ingame menu. + + void drawStartMenu(const MenuButton *animalsButton); ///< Draw the start menu. + void drawMainMenu(); ///< Draw the main menu. + void drawIngameMenu(); ///< Draw the ingame menu. + + /** Draw the difficulty label. */ void drawMenuDifficulty(); - void clearMenuIngame(const Surface &background); + /** Clear the ingame menu in an animated way. */ + void clearIngameMenu(const Surface &background); + + // -- Menu button helpers -- + + /** Find the button under these coordinates. */ int checkButton(const MenuButton *buttons, uint count, int16 x, int16 y, int failValue = -1) const; - void drawButton(Surface &dest, const Surface &src, const MenuButton &button) const; + + /** Draw a menu button. */ + void drawButton (Surface &dest, const Surface &src, const MenuButton &button) const; + /** Draw multiple menu buttons. */ void drawButtons(Surface &dest, const Surface &src, const MenuButton *buttons, uint count) const; + + /** Draw a border around a button. */ void drawButtonBorder(const MenuButton &button, uint8 color); - // Animal names helpers + + // -- Animal names helpers -- + + /** Set up the animal chooser. */ void anSetupChooser(); + /** Set up the language chooser for one animal. */ void anSetupNames(const MenuButton &animal); + /** Play / Display the name of an animal in one language. */ void anPlayAnimalName(const Common::String &animal, uint language); + + /** Did we open the game archives? */ bool _openedArchives; - const MenuButton *_animalsButton; + // Fonts + Font *_jeudak; + Font *_lettre; + Font *_plettre; + Font *_glettre; + + /** The current palette. */ + int _palette; + + Difficulty _difficulty; ///< The current difficulty. + uint8 _section; ///< The current game section. }; } // End of namespace OnceUpon diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index a1a3d65a58..e62a59042b 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -51,7 +51,10 @@ protected: static const char *kLanguageSuffixLong [5]; - void initScreen(); ///< Initialize the game screen. + // -- Graphics -- + + /** Initialize the game screen. */ + void initScreen(); void fadeOut(); ///< Fade to black. void fadeIn(); ///< Fade to the current palette. @@ -65,51 +68,86 @@ protected: */ void setPalette(const byte *palette, uint16 size); ///< Change the palette + /** Add a new cursor that can be manipulated to the stack. */ void addCursor(); + /** Remove the top-most cursor from the stack. */ void removeCursor(); + /** Set the current cursor. */ void setCursor(Surface &sprite, int16 hotspotX, int16 hotspotY); + /** Set the current cursor. */ void setCursor(Surface &sprite, int16 left, int16 top, int16 right, int16 bottom, int16 hotspotX, int16 hotspotY); + /** Show the cursor. */ void showCursor(); + /** Hide the cursor. */ void hideCursor(); + /** Is the cursor currently visible? */ bool isCursorVisible() const; + /** Remove an animation from the screen. */ + void clearAnim(ANIObject &ani); + /** Draw an animation to the screen, advancing it. */ + void drawAnim(ANIObject &ani); + /** Clear and draw an animation to the screen, advancing it. */ + void redrawAnim(ANIObject &ani); + + /** Wait for the frame to end, handling screen updates and optionally update input. */ + void endFrame(bool doInput); + + + // -- Sound -- + + /** Load all sounds that can be played interactively in the game. */ void loadSounds(const char * const *sounds, uint soundCount); + /** Free all loaded sound. */ void freeSounds(); + /** Play a loaded sound. */ void playSound(uint sound, int16 frequency = 0, int16 repCount = 0); + /** Stop all sound playback. */ void stopSound(); + /** Play a sound until it ends or is interrupted by a keypress. */ void playSoundFile(const Common::String &file, int16 frequency = 0, int16 repCount = 0, bool interruptible = true); - void endFrame(bool doInput); + // -- Input -- + + /** Check mouse and keyboard input. */ int16 checkInput(int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons); + /** Wait for mouse or keyboard input. */ int16 waitInput (int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons); + /** Wait for mouse or keyboard input, but don't care about what was done with the mouse. */ int16 waitInput(); + /** Did we have mouse or keyboard input? */ bool hasInput(); - void clearAnim(ANIObject &ani); - void drawAnim(ANIObject &ani); - void redrawAnim(ANIObject &ani); + // -- TXT helpers -- + + /** Get the name of a localized file. */ Common::String getLocFile(const Common::String &file) const; + /** Open a TXT file. */ TXTFile *loadTXT(const Common::String &txtFile, TXTFile::Format format) const; + /** Called by loadTXT() to fix strings within the TXT file. */ virtual void fixTXTStrings(TXTFile &txt) const; GobEngine *_vm; private: + /** Load a sound file. */ bool loadSound(SoundDesc &sound, const Common::String &file) const; - bool _fadedOut; ///< Did we fade out? + /** Did we fade out? */ + bool _fadedOut; + /** All loaded sounds. */ Common::Array _sounds; }; -- cgit v1.2.3 From 60f52ab9a0beccccca4958fbcf4d369e6dd22748 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 2 Jul 2012 18:15:38 +0200 Subject: GOB: Add the frame for normal Once Upon A Time game play --- engines/gob/pregob/onceupon/brokenstrings.h | 7 +- engines/gob/pregob/onceupon/onceupon.cpp | 154 +++++++++++++++++++++++++++- engines/gob/pregob/onceupon/onceupon.h | 35 ++++++- 3 files changed, 191 insertions(+), 5 deletions(-) diff --git a/engines/gob/pregob/onceupon/brokenstrings.h b/engines/gob/pregob/onceupon/brokenstrings.h index 98dcb720fb..0a40493cc1 100644 --- a/engines/gob/pregob/onceupon/brokenstrings.h +++ b/engines/gob/pregob/onceupon/brokenstrings.h @@ -40,7 +40,12 @@ static const BrokenString kBrokenStringsGerman[] = { { " Fortgeschrittene" , " Fortgeschritten" }, { "die Vespe" , "die Wespe" }, { "das Rhinoceros" , "das Rhinozeros" }, - { "die Heusschrecke" , "die Heuschrecke" } + { "die Heusschrecke" , "die Heuschrecke" }, + { "Das, von Drachen gebrachte" , "Das vom Drachen gebrachte" }, + { "Am Waldesrand es sieht" , "Am Waldesrand sieht es" }, + { " das Kind den Palast." , "das Kind den Palast." }, + { "Am Waldessaum sieht" , "Am Waldesrand sieht" }, + { "tipp auf ESC!" , "dr\201cke ESC!" } }; static const BrokenStringLanguage kBrokenStrings[kLanguageCount] = { diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 785d78b769..fb9629566c 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -131,6 +131,24 @@ const char *OnceUpon::kSound[kSoundMAX] = { "diamant.snd" }; +const OnceUpon::SectionFunc OnceUpon::kSectionFuncs[kSectionCount] = { + &OnceUpon::sectionStork, + &OnceUpon::sectionChapter1, + &OnceUpon::section02, + &OnceUpon::sectionChapter2, + &OnceUpon::section04, + &OnceUpon::sectionChapter3, + &OnceUpon::section06, + &OnceUpon::sectionChapter4, + &OnceUpon::section08, + &OnceUpon::sectionChapter5, + &OnceUpon::section10, + &OnceUpon::sectionChapter6, + &OnceUpon::section12, + &OnceUpon::sectionChapter7, + &OnceUpon::sectionEnd +}; + OnceUpon::ScreenBackup::ScreenBackup() : palette(-1), changedCursor(false), cursorVisible(false) { screen = new Surface(320, 200, 1); @@ -194,6 +212,9 @@ void OnceUpon::init() { // We start with an invalid palette _palette = -1; + // No quit requested at start + _quit = false; + // We start with no selected difficulty and at section 0 _difficulty = kDifficultyMAX; _section = 0; @@ -930,7 +951,7 @@ void OnceUpon::drawMainMenu() { if (!button.needDraw) continue; - if (_section >= (uint)button.id) + if (_section >= (int)button.id) drawButton(*_vm->_draw->_backSurface, elements, button); } @@ -998,6 +1019,41 @@ void OnceUpon::clearIngameMenu(const Surface &background) { drawLineByLine(background, left, top, right, bottom, left, top); } +OnceUpon::MenuAction OnceUpon::doIngameMenu() { + // Show the ingame menu + MenuAction action = handleIngameMenu(); + + if ((action == kMenuActionQuit) || _vm->shouldQuit()) { + + // User pressed the quit button, or quit ScummVM + _quit = true; + return kMenuActionQuit; + + } else if (action == kMenuActionPlay) { + + // User pressed the return to game button + return kMenuActionPlay; + + } else if (kMenuActionMainMenu) { + + // User pressed the return to main menu button + return handleMainMenu(); + } + + return action; +} + +OnceUpon::MenuAction OnceUpon::doIngameMenu(int16 key, MouseButtons mouseButtons) { + if ((key != kKeyEscape) && (mouseButtons != kMouseButtonsRight)) + return kMenuActionNone; + + MenuAction action = doIngameMenu(); + if (action == kMenuActionPlay) + return kMenuActionNone; + + return action; +} + int OnceUpon::checkButton(const MenuButton *buttons, uint count, int16 x, int16 y, int failValue) const { // Look through all buttons, and return the ID of the button we're in @@ -1203,7 +1259,101 @@ void OnceUpon::anPlayAnimalName(const Common::String &animal, uint language) { } void OnceUpon::playGame() { - warning("OnceUpon::playGame(): TODO"); + while (!_vm->shouldQuit() && !_quit) { + // Play a section and advance to the next section if we finished it + if (playSection()) + _section = MIN(_section + 1, kSectionCount - 1); + } + + // If we quit through the game and not through ScummVM, show the "Bye Bye" screen + if (!_vm->shouldQuit()) + showByeBye(); +} + +bool OnceUpon::playSection() { + if ((_section < 0) || (_section >= ARRAYSIZE(kSectionFuncs))) { + _quit = true; + return false; + } + + return (this->*kSectionFuncs[_section])(); +} + +bool OnceUpon::sectionStork() { + warning("OnceUpon::sectionStork(): TODO"); + return true; +} + +bool OnceUpon::sectionChapter1() { + showChapter(1); + return true; +} + +bool OnceUpon::section02() { + warning("OnceUpon::section02(): TODO"); + return true; +} + +bool OnceUpon::sectionChapter2() { + showChapter(2); + return true; +} + +bool OnceUpon::section04() { + warning("OnceUpon::section04(): TODO"); + return true; +} + +bool OnceUpon::sectionChapter3() { + showChapter(3); + return true; +} + +bool OnceUpon::section06() { + warning("OnceUpon::section06(): TODO"); + return true; +} + +bool OnceUpon::sectionChapter4() { + showChapter(4); + return true; +} + +bool OnceUpon::section08() { + warning("OnceUpon::section08(): TODO"); + return true; +} + +bool OnceUpon::sectionChapter5() { + showChapter(5); + return true; +} + +bool OnceUpon::section10() { + warning("OnceUpon::section10(): TODO"); + return true; +} + +bool OnceUpon::sectionChapter6() { + showChapter(6); + return true; +} + +bool OnceUpon::section12() { + warning("OnceUpon::section12(): TODO"); + return true; +} + +bool OnceUpon::sectionChapter7() { + showChapter(7); + return true; +} + +bool OnceUpon::sectionEnd() { + warning("OnceUpon::sectionEnd(): TODO"); + + _quit = true; + return false; } } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 08c8803c67..0cae369758 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -136,7 +136,7 @@ private: /** The number of game sections. */ - static const uint kSectionCount = 15; + static const int kSectionCount = 15; static const MenuButton kMainMenuDifficultyButton[]; ///< Difficulty buttons. static const MenuButton kSectionButtons[]; ///< Section buttons. @@ -149,6 +149,10 @@ private: /** All general game sounds we know about. */ static const char *kSound[kSoundMAX]; + /** Function pointer type for a section handler. */ + typedef bool (OnceUpon::*SectionFunc)(); + /** Section handler function. */ + static const SectionFunc kSectionFuncs[kSectionCount]; // -- General helpers -- @@ -219,6 +223,11 @@ private: /** Clear the ingame menu in an animated way. */ void clearIngameMenu(const Surface &background); + /** Handle the whole ingame menu. */ + MenuAction doIngameMenu(); + /** Handle the whole ingame menu if ESC or right mouse button was pressed. */ + MenuAction doIngameMenu(int16 key, MouseButtons mouseButtons); + // -- Menu button helpers -- @@ -243,6 +252,26 @@ private: /** Play / Display the name of an animal in one language. */ void anPlayAnimalName(const Common::String &animal, uint language); + // -- Game sections -- + + bool playSection(); + + bool sectionStork(); + bool sectionChapter1(); + bool section02(); + bool sectionChapter2(); + bool section04(); + bool sectionChapter3(); + bool section06(); + bool sectionChapter4(); + bool section08(); + bool sectionChapter5(); + bool section10(); + bool sectionChapter6(); + bool section12(); + bool sectionChapter7(); + bool sectionEnd(); + /** Did we open the game archives? */ bool _openedArchives; @@ -256,8 +285,10 @@ private: /** The current palette. */ int _palette; + bool _quit; ///< Did the user request a normal game quit? + Difficulty _difficulty; ///< The current difficulty. - uint8 _section; ///< The current game section. + int _section; ///< The current game section. }; } // End of namespace OnceUpon -- cgit v1.2.3 From df18bc95834837f1f905bfe5613ffd43dfc908f9 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 2 Jul 2012 21:31:23 +0200 Subject: GOB: Implement parts of the Once Upon A Time end sequence We don't yet support GCT files, so texts are still missing. --- engines/gob/pregob/onceupon/onceupon.cpp | 103 +++++++++++++++++++++++++------ engines/gob/pregob/onceupon/onceupon.h | 10 ++- engines/gob/pregob/pregob.cpp | 62 ++++++++++++++++--- engines/gob/pregob/pregob.h | 37 +++++++++-- 4 files changed, 176 insertions(+), 36 deletions(-) diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index fb9629566c..aed1b45e02 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -264,14 +264,6 @@ void OnceUpon::setGameCursor() { setCursor(cursor, 105, 0, 120, 15, 0, 0); } -void OnceUpon::setAnimState(ANIObject &ani, uint16 state, bool once, bool pause) const { - ani.setAnimation(state); - ani.setMode(once ? ANIObject::kModeOnce : ANIObject::kModeContinuous); - ani.setPause(pause); - ani.setVisible(true); - ani.setPosition(); -} - void OnceUpon::drawLineByLine(const Surface &src, int16 left, int16 top, int16 right, int16 bottom, int16 x, int16 y) const { @@ -374,6 +366,18 @@ Common::String OnceUpon::fixString(const Common::String &str) const { return str; } +enum ClownAnimation { + kClownAnimationStand = 0, + kClownAnimationCheer = 1, + kClownAnimationCry = 2 +}; + +const PreGob::AnimProperties OnceUpon::kClownAnimations[] = { + { 1, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + { 0, 0, ANIObject::kModeOnce , true, false, false, 0, 0}, + { 6, 0, ANIObject::kModeOnce , true, false, false, 0, 0} +}; + enum CopyProtectionState { kCPStateSetup, // Set up the screen kCPStateWaitUser, // Waiting for the user to pick a shape @@ -392,8 +396,10 @@ bool OnceUpon::doCopyProtection(const uint8 colors[7], const uint8 shapes[7 * 20 _vm->_video->drawPackedSprite("grille2.cmp", sprites[1]); // Load the clown animation - ANIFile ani (_vm, "grille.ani", 320); - ANIObject clown(ani); + ANIFile ani (_vm, "grille.ani", 320); + ANIList anims; + + loadAnims(anims, ani, 1, &kClownAnimations[kClownAnimationStand]); // Set the copy protection cursor setCursor(sprites[1], 5, 110, 20, 134, 3, 0); @@ -406,20 +412,20 @@ bool OnceUpon::doCopyProtection(const uint8 colors[7], const uint8 shapes[7 * 20 bool hasCorrect = false; while (!_vm->shouldQuit() && (state != kCPStateFinish)) { - clearAnim(clown); + clearAnim(anims); // Set up the screen if (state == kCPStateSetup) { animalShape = cpSetup(colors, shapes, obfuscate, sprites); - setAnimState(clown, kClownAnimationClownStand, false, false); + setAnim(*anims[0], kClownAnimations[kClownAnimationStand]); state = kCPStateWaitUser; } - drawAnim(clown); + drawAnim(anims); // If we're waiting for the clown and he finished, evaluate if we're finished - if (!clown.isVisible() && (state == kCPStateWaitClown)) + if (!anims[0]->isVisible() && (state == kCPStateWaitClown)) state = (hasCorrect || (--triesLeft == 0)) ? kCPStateFinish : kCPStateSetup; showCursor(); @@ -443,12 +449,14 @@ bool OnceUpon::doCopyProtection(const uint8 colors[7], const uint8 shapes[7 * 20 hasCorrect = guessedShape == animalShape; animalShape = -1; - setAnimState(clown, hasCorrect ? kClownAnimationClownCheer : kClownAnimationClownCry, true, false); + setAnim(*anims[0], kClownAnimations[hasCorrect ? kClownAnimationCheer : kClownAnimationCry]); state = kCPStateWaitClown; } } } + freeAnims(anims); + fadeOut(); hideCursor(); clearScreen(); @@ -625,6 +633,10 @@ void OnceUpon::showQuote() { fadeOut(); } +const PreGob::AnimProperties OnceUpon::kTitleAnimation = { + 8, 0, ANIObject::kModeContinuous, true, false, false, 0, 0 +}; + void OnceUpon::showTitle() { // Show the Once Upon A Time title animation // NOTE: This is currently only a mock-up. The real animation is in "ville.seq". @@ -639,15 +651,15 @@ void OnceUpon::showTitle() { _vm->_video->drawPackedSprite("ville.cmp", *_vm->_draw->_backSurface); _vm->_draw->forceBlit(); - ANIFile ani (_vm, "pres.ani", 320); - ANIObject title(ani); + ANIFile ani (_vm, "pres.ani", 320); + ANIList anims; - setAnimState(title, 8, false, false); + loadAnims(anims, ani, 1, &kTitleAnimation); playTitleMusic(); while (!_vm->shouldQuit()) { - redrawAnim(title); + redrawAnim(anims); fadeIn(); @@ -657,6 +669,8 @@ void OnceUpon::showTitle() { break; } + freeAnims(anims); + fadeOut(); stopTitleMusic(); } @@ -1349,9 +1363,58 @@ bool OnceUpon::sectionChapter7() { return true; } +const PreGob::AnimProperties OnceUpon::kSectionEndAnimations[] = { + { 0, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + { 6, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + { 9, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + {11, 0, ANIObject::kModeContinuous, true, false, false, 0, 0} +}; + bool OnceUpon::sectionEnd() { - warning("OnceUpon::sectionEnd(): TODO"); + fadeOut(); + setGamePalette(9); + + _vm->_video->drawPackedSprite("cadre.cmp", *_vm->_draw->_backSurface); + + Surface endBackground(320, 200, 1); + _vm->_video->drawPackedSprite("fin.cmp", endBackground); + + _vm->_draw->_backSurface->blit(endBackground, 0, 0, 288, 137, 16, 50); + + ANIFile ani(_vm, "fin.ani", 320); + ANIList anims; + + loadAnims(anims, ani, ARRAYSIZE(kSectionEndAnimations), kSectionEndAnimations); + drawAnim(anims); + + _vm->_draw->forceBlit(); + + MenuAction action = kMenuActionNone; + while (!_vm->shouldQuit() && (action == kMenuActionNone)) { + redrawAnim(anims); + + fadeIn(); + + endFrame(true); + + int16 mouseX, mouseY; + MouseButtons mouseButtons; + + int16 key = checkInput(mouseX, mouseY, mouseButtons); + if ((key != 0) && (key != kKeyEscape)) + // Any key pressed => Quit + action = kMenuActionQuit; + + action = doIngameMenu(key, mouseButtons); + } + + freeAnims(anims); + + // Restart requested + if (action == kMenuActionRestart) + return false; + // Last scene. Even if we didn't explicitly request a quit, the game ends here _quit = true; return false; } diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 0cae369758..caaf155d06 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -149,19 +149,23 @@ private: /** All general game sounds we know about. */ static const char *kSound[kSoundMAX]; + + static const AnimProperties kClownAnimations[]; + static const AnimProperties kTitleAnimation; + static const AnimProperties kSectionEndAnimations[]; + + /** Function pointer type for a section handler. */ typedef bool (OnceUpon::*SectionFunc)(); /** Section handler function. */ static const SectionFunc kSectionFuncs[kSectionCount]; + // -- General helpers -- void setGamePalette(uint palette); ///< Set a game palette. void setGameCursor(); ///< Set the default game cursor. - /** Set the state of an ANIObject. */ - void setAnimState(ANIObject &ani, uint16 state, bool once, bool pause) const; - /** Draw this sprite in a fancy, animated line-by-line way. */ void drawLineByLine(const Surface &src, int16 left, int16 top, int16 right, int16 bottom, int16 x, int16 y) const; diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index 675958035d..4ee5430de7 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -251,24 +251,70 @@ bool PreGob::hasInput() { return checkInput(mouseX, mouseY, mouseButtons) || (mouseButtons != kMouseButtonsNone); } -void PreGob::clearAnim(ANIObject &ani) { +void PreGob::clearAnim(ANIObject &anim) { int16 left, top, right, bottom; - if (ani.clear(*_vm->_draw->_backSurface, left, top, right, bottom)) + if (anim.clear(*_vm->_draw->_backSurface, left, top, right, bottom)) _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); } -void PreGob::drawAnim(ANIObject &ani) { +void PreGob::drawAnim(ANIObject &anim) { int16 left, top, right, bottom; - if (ani.draw(*_vm->_draw->_backSurface, left, top, right, bottom)) + if (anim.draw(*_vm->_draw->_backSurface, left, top, right, bottom)) _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); - ani.advance(); + anim.advance(); } -void PreGob::redrawAnim(ANIObject &ani) { - clearAnim(ani); - drawAnim(ani); +void PreGob::redrawAnim(ANIObject &anim) { + clearAnim(anim); + drawAnim(anim); +} + +void PreGob::clearAnim(const ANIList &anims) { + for (int i = (anims.size() - 1); i >= 0; i--) + clearAnim(*anims[i]); +} + +void PreGob::drawAnim(const ANIList &anims) { + for (ANIList::const_iterator a = anims.begin(); a != anims.end(); ++a) + drawAnim(**a); +} + +void PreGob::redrawAnim(const ANIList &anims) { + clearAnim(anims); + drawAnim(anims); +} + +void PreGob::loadAnims(ANIList &anims, ANIFile &ani, uint count, const AnimProperties *props) const { + freeAnims(anims); + + anims.resize(count); + for (uint i = 0; i < count; i++) { + anims[i] = new ANIObject(ani); + + setAnim(*anims[i], props[i]); + } +} + +void PreGob::freeAnims(ANIList &anims) const { + for (ANIList::iterator a = anims.begin(); a != anims.end(); ++a) + delete *a; + + anims.clear(); +} + +void PreGob::setAnim(ANIObject &anim, const AnimProperties &props) const { + anim.setAnimation(props.animation); + anim.setFrame(props.frame); + anim.setMode(props.mode); + anim.setPause(props.paused); + anim.setVisible(props.visible); + + if (props.hasPosition) + anim.setPosition(props.x, props.y); + else + anim.setPosition(); } Common::String PreGob::getLocFile(const Common::String &file) const { diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index e62a59042b..f1728036ab 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -27,6 +27,7 @@ #include "common/array.h" #include "gob/util.h" +#include "gob/aniobject.h" #include "gob/sound/sounddesc.h" @@ -37,8 +38,6 @@ namespace Gob { class GobEngine; class Surface; -class ANIObject; - class PreGob { public: PreGob(GobEngine *vm); @@ -46,7 +45,23 @@ public: virtual void run() = 0; + struct AnimProperties { + uint16 animation; + uint16 frame; + + ANIObject::Mode mode; + + bool visible; + bool paused; + + bool hasPosition; + int16 x; + int16 y; + }; + protected: + typedef Common::Array ANIList; + static const char kLanguageSuffixShort[5]; static const char *kLanguageSuffixLong [5]; @@ -88,11 +103,23 @@ protected: bool isCursorVisible() const; /** Remove an animation from the screen. */ - void clearAnim(ANIObject &ani); + void clearAnim(ANIObject &anim); /** Draw an animation to the screen, advancing it. */ - void drawAnim(ANIObject &ani); + void drawAnim(ANIObject &anim); /** Clear and draw an animation to the screen, advancing it. */ - void redrawAnim(ANIObject &ani); + void redrawAnim(ANIObject &anim); + + /** Remove animations from the screen. */ + void clearAnim(const ANIList &anims); + /** Draw animations to the screen, advancing them. */ + void drawAnim(const ANIList &anims); + /** Clear and draw animations to the screen, advancing them. */ + void redrawAnim(const ANIList &anims); + + void loadAnims(ANIList &anims, ANIFile &ani, uint count, const AnimProperties *props) const; + void freeAnims(ANIList &anims) const; + + void setAnim(ANIObject &anim, const AnimProperties &props) const; /** Wait for the frame to end, handling screen updates and optionally update input. */ void endFrame(bool doInput); -- cgit v1.2.3 From a547633911afa31964c10ed0222410aa9e66db80 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 5 Jul 2012 06:11:46 +0200 Subject: GOB: ANIObject can now predict the position/size of future frames --- engines/gob/aniobject.cpp | 32 ++++++++++++++++++++++++++------ engines/gob/aniobject.h | 8 ++++---- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/engines/gob/aniobject.cpp b/engines/gob/aniobject.cpp index 8d3a6897bf..7e3668a0ce 100644 --- a/engines/gob/aniobject.cpp +++ b/engines/gob/aniobject.cpp @@ -101,7 +101,7 @@ void ANIObject::getPosition(int16 &x, int16 &y) const { y = _y; } -void ANIObject::getFramePosition(int16 &x, int16 &y) const { +void ANIObject::getFramePosition(int16 &x, int16 &y, uint16 n) const { // CMP "animations" have no specific frame positions if (_cmp) { getPosition(x, y); @@ -115,11 +115,24 @@ void ANIObject::getFramePosition(int16 &x, int16 &y) const { if (_frame >= animation.frameCount) return; - x = _x + animation.frameAreas[_frame].left; - y = _y + animation.frameAreas[_frame].top; + // If we're paused, we don't advance any frames + if (_paused) + n = 0; + + // Number of cycles run through after n frames + uint16 cycles = (_frame + n) / animation.frameCount; + // Frame position after n frames + uint16 frame = (_frame + n) % animation.frameCount; + + // Only doing one cycle? + if (_mode == kModeOnce) + cycles = MAX(cycles, 1); + + x = _x + animation.frameAreas[frame].left + cycles * animation.deltaX; + y = _y + animation.frameAreas[frame].top + cycles * animation.deltaY; } -void ANIObject::getFrameSize(int16 &width, int16 &height) const { +void ANIObject::getFrameSize(int16 &width, int16 &height, uint16 n) const { if (_cmp) { width = _cmp->getWidth (_animation); height = _cmp->getHeight(_animation); @@ -134,8 +147,15 @@ void ANIObject::getFrameSize(int16 &width, int16 &height) const { if (_frame >= animation.frameCount) return; - width = animation.frameAreas[_frame].right - animation.frameAreas[_frame].left + 1; - height = animation.frameAreas[_frame].bottom - animation.frameAreas[_frame].top + 1; + // If we're paused, we don't advance any frames + if (_paused) + n = 0; + + // Frame position after n frames + uint16 frame = (_frame + n) % animation.frameCount; + + width = animation.frameAreas[frame].right - animation.frameAreas[frame].left + 1; + height = animation.frameAreas[frame].bottom - animation.frameAreas[frame].top + 1; } bool ANIObject::isIn(int16 x, int16 y) const { diff --git a/engines/gob/aniobject.h b/engines/gob/aniobject.h index 3c374f7b8f..d8c8edc2b8 100644 --- a/engines/gob/aniobject.h +++ b/engines/gob/aniobject.h @@ -70,10 +70,10 @@ public: /** Return the current position. */ void getPosition(int16 &x, int16 &y) const; - /** Return the current frame position. */ - void getFramePosition(int16 &x, int16 &y) const; - /** Return the current frame size. */ - void getFrameSize(int16 &width, int16 &height) const; + /** Return the frame position after another n frames. */ + void getFramePosition(int16 &x, int16 &y, uint16 n = 0) const; + /** Return the current frame size after another n frames. */ + void getFrameSize(int16 &width, int16 &height, uint16 n = 0) const; /** Are there coordinates within the animation sprite? */ bool isIn(int16 x, int16 y) const; -- cgit v1.2.3 From 0b030dd341b00007b969805ff6d488a51a1a97c7 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 5 Jul 2012 11:00:26 +0200 Subject: GOB: Implement parts of the Stork section in Once Upon A Time No GCT texts yet ("The stork is bringing a sweet baby to $PLACE where $PEOPLE live"), and the character creator is also still missing. --- engines/gob/module.mk | 1 + engines/gob/pregob/onceupon/abracadabra.cpp | 25 +++ engines/gob/pregob/onceupon/abracadabra.h | 8 + engines/gob/pregob/onceupon/babayaga.cpp | 25 +++ engines/gob/pregob/onceupon/babayaga.h | 8 + engines/gob/pregob/onceupon/brokenstrings.h | 3 +- engines/gob/pregob/onceupon/onceupon.cpp | 124 ++++++++++++++- engines/gob/pregob/onceupon/onceupon.h | 19 +++ engines/gob/pregob/onceupon/stork.cpp | 234 ++++++++++++++++++++++++++++ engines/gob/pregob/onceupon/stork.h | 103 ++++++++++++ 10 files changed, 547 insertions(+), 3 deletions(-) create mode 100644 engines/gob/pregob/onceupon/stork.cpp create mode 100644 engines/gob/pregob/onceupon/stork.h diff --git a/engines/gob/module.mk b/engines/gob/module.mk index f8b477b92b..1b3f400684 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -83,6 +83,7 @@ MODULE_OBJS := \ pregob/onceupon/onceupon.o \ pregob/onceupon/abracadabra.o \ pregob/onceupon/babayaga.o \ + pregob/onceupon/stork.o \ minigames/geisha/evilfish.o \ minigames/geisha/oko.o \ minigames/geisha/meter.o \ diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp index 2e4b5f21e7..0d644d9056 100644 --- a/engines/gob/pregob/onceupon/abracadabra.cpp +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -78,6 +78,27 @@ const char *Abracadabra::kAnimalNames[] = { "scor" }; +// The houses where the stork can drop a bundle +const OnceUpon::MenuButton Abracadabra::kStorkHouses[] = { + {false, 16, 80, 87, 125, 0, 0, 0, 0, 0, 0, 0}, + {false, 61, 123, 96, 149, 0, 0, 0, 0, 0, 0, 1}, + {false, 199, 118, 226, 137, 0, 0, 0, 0, 0, 0, 2}, + {false, 229, 91, 304, 188, 0, 0, 0, 0, 0, 0, 3} +}; + +// The stork bundle drop parameters +const Stork::BundleDrop Abracadabra::kStorkBundleDrops[] = { + { 14, 65, 127, true }, + { 14, 76, 152, true }, + { 14, 204, 137, true }, + { 11, 275, 179, false } +}; + +// Parameters for the stork section. +const OnceUpon::StorkParam Abracadabra::kStorkParam = { + "present.cmp", ARRAYSIZE(kStorkHouses), kStorkHouses, kStorkBundleDrops +}; + Abracadabra::Abracadabra(GobEngine *vm) : OnceUpon(vm) { } @@ -107,6 +128,10 @@ void Abracadabra::run() { playGame(); } +const OnceUpon::StorkParam &Abracadabra::getStorkParameters() const { + return kStorkParam; +} + } // End of namespace OnceUpon } // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/abracadabra.h b/engines/gob/pregob/onceupon/abracadabra.h index f2075fc750..8048213f5f 100644 --- a/engines/gob/pregob/onceupon/abracadabra.h +++ b/engines/gob/pregob/onceupon/abracadabra.h @@ -36,6 +36,9 @@ public: void run(); +protected: + const StorkParam &getStorkParameters() const; + private: /** Definition of the menu button that leads to the animal names screen. */ static const MenuButton kAnimalsButtons; @@ -44,6 +47,11 @@ private: static const MenuButton kAnimalButtons[]; /** File prefixes for the name of each animal. */ static const char *kAnimalNames[]; + + // Parameters for the stork section. + static const MenuButton kStorkHouses[]; + static const Stork::BundleDrop kStorkBundleDrops[]; + static const struct StorkParam kStorkParam; }; } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp index 6f27f469e3..6aa60310b5 100644 --- a/engines/gob/pregob/onceupon/babayaga.cpp +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -78,6 +78,27 @@ const char *BabaYaga::kAnimalNames[] = { "rena" }; +// The houses where the stork can drop a bundle +const OnceUpon::MenuButton BabaYaga::kStorkHouses[] = { + {false, 16, 80, 87, 125, 0, 0, 0, 0, 0, 0, 0}, + {false, 61, 123, 96, 149, 0, 0, 0, 0, 0, 0, 1}, + {false, 199, 118, 226, 137, 0, 0, 0, 0, 0, 0, 2}, + {false, 229, 91, 304, 188, 0, 0, 0, 0, 0, 0, 3} +}; + +// The stork bundle drop parameters +const Stork::BundleDrop BabaYaga::kStorkBundleDrops[] = { + { 14, 35, 129, true }, + { 14, 70, 148, true }, + { 14, 206, 136, true }, + { 11, 260, 225, false } +}; + +// Parameters for the stork section. +const OnceUpon::StorkParam BabaYaga::kStorkParam = { + "present2.cmp", ARRAYSIZE(kStorkHouses), kStorkHouses, kStorkBundleDrops +}; + BabaYaga::BabaYaga(GobEngine *vm) : OnceUpon(vm) { } @@ -107,6 +128,10 @@ void BabaYaga::run() { playGame(); } +const OnceUpon::StorkParam &BabaYaga::getStorkParameters() const { + return kStorkParam; +} + } // End of namespace OnceUpon } // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/babayaga.h b/engines/gob/pregob/onceupon/babayaga.h index 181b6f4d54..0241f78f4e 100644 --- a/engines/gob/pregob/onceupon/babayaga.h +++ b/engines/gob/pregob/onceupon/babayaga.h @@ -36,6 +36,9 @@ public: void run(); +protected: + const StorkParam &getStorkParameters() const; + private: /** Definition of the menu button that leads to the animal names screen. */ static const MenuButton kAnimalsButtons; @@ -44,6 +47,11 @@ private: static const MenuButton kAnimalButtons[]; /** File prefixes for the name of each animal. */ static const char *kAnimalNames[]; + + // Parameters for the stork section. + static const MenuButton kStorkHouses[]; + static const Stork::BundleDrop kStorkBundleDrops[]; + static const struct StorkParam kStorkParam; }; } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/brokenstrings.h b/engines/gob/pregob/onceupon/brokenstrings.h index 0a40493cc1..89acb1c6bd 100644 --- a/engines/gob/pregob/onceupon/brokenstrings.h +++ b/engines/gob/pregob/onceupon/brokenstrings.h @@ -45,7 +45,8 @@ static const BrokenString kBrokenStringsGerman[] = { { "Am Waldesrand es sieht" , "Am Waldesrand sieht es" }, { " das Kind den Palast." , "das Kind den Palast." }, { "Am Waldessaum sieht" , "Am Waldesrand sieht" }, - { "tipp auf ESC!" , "dr\201cke ESC!" } + { "tipp auf ESC!" , "dr\201cke ESC!" }, + { "Wohin fliegt der Drachen?" , "Wohin fliegt der Drache?" } }; static const BrokenStringLanguage kBrokenStrings[kLanguageCount] = { diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index aed1b45e02..aa08f6f1fd 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -128,7 +128,8 @@ const OnceUpon::MenuButton OnceUpon::kLanguageButtons[] = { }; const char *OnceUpon::kSound[kSoundMAX] = { - "diamant.snd" + "diamant.snd", // kSoundClick + "cigogne.snd" // kSoundStork }; const OnceUpon::SectionFunc OnceUpon::kSectionFuncs[kSectionCount] = { @@ -1293,9 +1294,128 @@ bool OnceUpon::playSection() { return (this->*kSectionFuncs[_section])(); } +const PreGob::AnimProperties OnceUpon::kSectionStorkAnimations[] = { + { 0, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + { 1, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + { 2, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + { 3, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + { 4, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + { 5, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + { 6, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + { 7, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + { 8, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + {17, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + {16, 0, ANIObject::kModeContinuous, true, false, false, 0, 0}, + {15, 0, ANIObject::kModeContinuous, true, false, false, 0, 0} +}; + +enum StorkState { + kStorkStateWaitUser, + kStorkStateWaitBundle, + kStorkStateFinish +}; + bool OnceUpon::sectionStork() { warning("OnceUpon::sectionStork(): TODO"); - return true; + + fadeOut(); + hideCursor(); + setGamePalette(0); + setGameCursor(); + + const StorkParam ¶m = getStorkParameters(); + + Surface backdrop(320, 200, 1); + + // Draw the frame + _vm->_video->drawPackedSprite("cadre.cmp", *_vm->_draw->_backSurface); + + // Draw the backdrop + _vm->_video->drawPackedSprite(param.backdrop, backdrop); + _vm->_draw->_backSurface->blit(backdrop, 0, 0, 288, 175, 16, 12); + + // "Where does the stork go?" + TXTFile *whereStork = loadTXT(getLocFile("ouva.tx"), TXTFile::kFormatStringPositionColor); + whereStork->draw(*_vm->_draw->_backSurface, &_plettre, 1); + + ANIFile ani(_vm, "present.ani", 320); + ANIList anims; + + Stork *stork = new Stork(_vm, ani); + + loadAnims(anims, ani, ARRAYSIZE(kSectionStorkAnimations), kSectionStorkAnimations); + anims.push_back(stork); + + drawAnim(anims); + + _vm->_draw->forceBlit(); + + int8 storkSoundWait = 0; + + StorkState state = kStorkStateWaitUser; + MenuAction action = kMenuActionNone; + while (!_vm->shouldQuit() && (state != kStorkStateFinish)) { + clearAnim(anims); + + // Play the stork sound + if (--storkSoundWait == 0) + playSound(kSoundStork); + if (storkSoundWait <= 0) + storkSoundWait = 50 - _vm->_util->getRandom(30); + + // Check if the bundle landed + if ((state == kStorkStateWaitBundle) && stork->hasBundleLanded()) + state = kStorkStateFinish; + + // Check user input + + int16 mouseX, mouseY; + MouseButtons mouseButtons; + + int16 key = checkInput(mouseX, mouseY, mouseButtons); + + action = doIngameMenu(key, mouseButtons); + if (action != kMenuActionNone) { + state = kStorkStateFinish; + break; + } + + if (mouseButtons == kMouseButtonsLeft) { + stopSound(); + playSound(kSoundClick); + + int house = checkButton(param.houses, param.houseCount, mouseX, mouseY); + if ((state == kStorkStateWaitUser) && (house >= 0)) { + + stork->dropBundle(param.drops[house]); + state = kStorkStateWaitBundle; + + // Remove the "Where does the stork go?" text + int16 left, top, right, bottom; + if (whereStork->clear(*_vm->_draw->_backSurface, left, top, right, bottom)) + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + } + } + + drawAnim(anims); + showCursor(); + fadeIn(); + + endFrame(true); + } + + freeAnims(anims); + delete whereStork; + + fadeOut(); + hideCursor(); + + // Completed the section => move one + if (action == kMenuActionNone) + return true; + + // Didn't complete the section + return false; } bool OnceUpon::sectionChapter1() { diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index caaf155d06..b9aef04dc2 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -27,6 +27,8 @@ #include "gob/pregob/pregob.h" +#include "gob/pregob/onceupon/stork.h" + namespace Gob { class Surface; @@ -67,6 +69,15 @@ protected: uint id; ///< The button's ID. }; + /** Parameters for the stork section. */ + struct StorkParam { + const char *backdrop; ///< Backdrop image file. + + uint houseCount; ///< Number of houses. + const MenuButton *houses; ///< House button definitions. + + const Stork::BundleDrop *drops; ///< The bundle drop parameters. + }; void init(); void deinit(); @@ -97,6 +108,10 @@ protected: void playGame(); + /** Return the parameters for the stork section. */ + virtual const StorkParam &getStorkParameters() const = 0; + + private: /** All actions a user can request in a menu. */ enum MenuAction { @@ -119,6 +134,7 @@ private: /** The different sounds common in the game. */ enum Sound { kSoundClick = 0, + kSoundStork , kSoundMAX }; @@ -146,12 +162,15 @@ private: static const MenuButton kAnimalNamesBack; ///< "Back" button in the animal names screens. static const MenuButton kLanguageButtons[]; ///< Language buttons in the animal names screen. + static const MenuButton kSectionStorkHouses[]; + /** All general game sounds we know about. */ static const char *kSound[kSoundMAX]; static const AnimProperties kClownAnimations[]; static const AnimProperties kTitleAnimation; + static const AnimProperties kSectionStorkAnimations[]; static const AnimProperties kSectionEndAnimations[]; diff --git a/engines/gob/pregob/onceupon/stork.cpp b/engines/gob/pregob/onceupon/stork.cpp new file mode 100644 index 0000000000..3c38037d08 --- /dev/null +++ b/engines/gob/pregob/onceupon/stork.cpp @@ -0,0 +1,234 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/str.h" + +#include "gob/gob.h" +#include "gob/surface.h" +#include "gob/anifile.h" +#include "gob/video.h" + +#include "gob/pregob/onceupon/stork.h" + +enum Animation { + kAnimFlyNearWithBundle = 9, + kAnimFlyFarWithBundle = 12, + kAnimFlyNearWithoutBundle = 10, + kAnimFlyFarWithoutBundle = 13, + kAnimBundleNear = 11, + kAnimBundleFar = 14 +}; + +namespace Gob { + +namespace OnceUpon { + +Stork::Stork(GobEngine *vm, const ANIFile &ani) : ANIObject(ani), _shouldDrop(false) { + _frame = new Surface(320, 200, 1); + vm->_video->drawPackedSprite("cadre.cmp", *_frame); + + _bundle = new ANIObject(ani); + + _bundle->setVisible(false); + _bundle->setPause(true); + + setState(kStateFlyNearWithBundle, kAnimFlyNearWithBundle, -80); +} + +Stork::~Stork() { + delete _frame; + + delete _bundle; +} + +bool Stork::hasBundleLanded() const { + if (!_shouldDrop || !_bundle->isVisible() || _bundle->isPaused()) + return false; + + int16 x, y, width, height; + _bundle->getFramePosition(x, y); + _bundle->getFrameSize(width, height); + + return (y + height) >= _bundleDrop.landY; +} + +void Stork::dropBundle(const BundleDrop &drop) { + if (_shouldDrop) + return; + + _shouldDrop = true; + _bundleDrop = drop; +} + +bool Stork::draw(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) { + left = 0x7FFF; + top = 0x7FFF; + right = 0x0000; + bottom = 0x0000; + + bool drawn = ANIObject::draw(dest, left, top, right, bottom); + if (drawn) { + // Left frame edge + if (left <= 15) + dest.blit(*_frame, left, top, MIN(15, right), bottom, left, top); + + // Right frame edge + if (right >= 304) + dest.blit(*_frame, MAX(304, left), top, right, bottom, MAX(304, left), top); + } + + int16 bLeft, bTop, bRight, bBottom; + if (_bundle->draw(dest, bLeft, bTop, bRight, bBottom)) { + // Bottom frame edge + if (bBottom >= 188) + dest.blit(*_frame, bLeft, MAX(188, bTop), bRight, bBottom, bLeft, MAX(188, bTop)); + + left = MIN(left , bLeft ); + top = MIN(top , bTop ); + right = MAX(right , bRight ); + bottom = MAX(bottom, bBottom); + + drawn = true; + } + + return drawn; +} + +bool Stork::clear(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) { + left = 0x7FFF; + top = 0x7FFF; + right = 0x0000; + bottom = 0x0000; + + bool cleared = _bundle->clear(dest, left, top, right, bottom); + + int16 sLeft, sTop, sRight, sBottom; + if (ANIObject::clear(dest, sLeft, sTop, sRight, sBottom)) { + left = MIN(left , sLeft ); + top = MIN(top , sTop ); + right = MAX(right , sRight ); + bottom = MAX(bottom, sBottom); + + cleared = true; + } + + return cleared; +} + +void Stork::advance() { + _bundle->advance(); + + ANIObject::advance(); + + int16 curX, curY, curWidth, curHeight; + getFramePosition(curX, curY, 0); + getFrameSize(curWidth, curHeight, 0); + + const int16 curRight = curX + curWidth - 1; + + int16 nextX, nextY, nextWidth, nextHeight; + getFramePosition(nextX, nextY, 1); + getFrameSize(nextWidth, nextHeight, 1); + + const int16 nextRight = nextX + nextWidth - 1; + + switch (_state) { + case kStateFlyNearWithBundle: + if (curX >= 330) + setState(kStateFlyFarWithBundle, kAnimFlyFarWithBundle, 330); + + if ((curRight <= _bundleDrop.dropX) && + (nextRight >= _bundleDrop.dropX) && _shouldDrop && !_bundleDrop.dropWhileFar) + dropBundle(kStateFlyNearWithoutBundle, kAnimFlyNearWithoutBundle); + + break; + + case kStateFlyFarWithBundle: + if (curX <= -80) + setState(kStateFlyNearWithBundle, kAnimFlyNearWithBundle, -80); + + if ((curX >= _bundleDrop.dropX) && + (nextX <= _bundleDrop.dropX) && _shouldDrop && _bundleDrop.dropWhileFar) + dropBundle(kStateFlyFarWithoutBundle, kAnimFlyFarWithoutBundle); + + break; + + case kStateFlyNearWithoutBundle: + if (curX >= 330) + setState(kStateFlyFarWithoutBundle, kAnimFlyFarWithoutBundle, 330); + break; + + case kStateFlyFarWithoutBundle: + if (curX <= -80) + setState(kStateFlyNearWithoutBundle, kAnimFlyNearWithoutBundle, -80); + break; + + default: + break; + } +} + +void Stork::dropBundle(State state, uint16 anim) { + setState(state, anim); + + int16 x, y, width, height; + getFramePosition(x, y); + getFrameSize(width, height); + + _bundle->setAnimation(_bundleDrop.anim); + _bundle->setPause(false); + _bundle->setVisible(true); + + int16 bWidth, bHeight; + _bundle->getFrameSize(bWidth, bHeight); + + // Drop position + x = _bundleDrop.dropX; + y = y + height - bHeight; + + // If the stork is flying near (from left to right), drop the bundle at the right edge + if (!_bundleDrop.dropWhileFar) + x = x - bWidth; + + _bundle->setPosition(x, y); +} + +void Stork::setState(State state, uint16 anim) { + setAnimation(anim); + setVisible(true); + setPause(false); + + _state = state; +} + +void Stork::setState(State state, uint16 anim, int16 x) { + setState(state, anim); + setPosition(); + + int16 pX, pY; + getPosition(pX, pY); + setPosition( x, pY); +} + +} // End of namespace OnceUpon + +} // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/stork.h b/engines/gob/pregob/onceupon/stork.h new file mode 100644 index 0000000000..d26a887c97 --- /dev/null +++ b/engines/gob/pregob/onceupon/stork.h @@ -0,0 +1,103 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_PREGOB_ONCEUPON_STORK_H +#define GOB_PREGOB_ONCEUPON_STORK_H + +#include "common/system.h" + +#include "gob/aniobject.h" + +namespace Common { + class String; +} + +namespace Gob { + +class GobEngine; + +class Surface; +class ANIFile; + +namespace OnceUpon { + +/** The stork in Baba Yaga / dragon in Abracadabra. */ +class Stork : public ANIObject { +public: + /** Information on how to drop the bundle. */ + struct BundleDrop { + int16 anim; ///< Animation of the bundle floating down + + int16 dropX; ///< X position the stork drops the bundle + int16 landY; ///< Y position the bundle lands + + bool dropWhileFar; ///< Does the stork drop the bundle while far instead of near? + }; + + Stork(GobEngine *vm, const ANIFile &ani); + ~Stork(); + + /** Has the bundle landed? */ + bool hasBundleLanded() const; + + /** Drop the bundle. */ + void dropBundle(const BundleDrop &drop); + + /** Draw the current frame onto the surface and return the affected rectangle. */ + bool draw(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); + /** Draw the current frame from the surface and return the affected rectangle. */ + bool clear(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); + + /** Advance the animation to the next frame. */ + void advance(); + +private: + enum State { + kStateFlyNearWithBundle = 0, + kStateFlyFarWithBundle , + kStateFlyNearWithoutBundle , + kStateFlyFarWithoutBundle + }; + + + void setState(State state, uint16 anim); + void setState(State state, uint16 anim, int16 x); + + void dropBundle(State state, uint16 anim); + + + GobEngine *_vm; + + Surface *_frame; + ANIObject *_bundle; + + State _state; + + bool _shouldDrop; + BundleDrop _bundleDrop; +}; + +} // End of namespace OnceUpon + +} // End of namespace Gob + +#endif // GOB_PREGOB_ONCEUPON_STORK_H -- cgit v1.2.3 From e17d4a5c0c66b890014efa62d207406fd5b887ef Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 7 Jul 2012 13:21:07 +0200 Subject: GOB: Implement GCT drawing --- engines/gob/module.mk | 1 + engines/gob/pregob/gctfile.cpp | 306 +++++++++++++++++++++++++++++++++++++++++ engines/gob/pregob/gctfile.h | 149 ++++++++++++++++++++ engines/gob/pregob/pregob.cpp | 13 ++ engines/gob/pregob/pregob.h | 7 + 5 files changed, 476 insertions(+) create mode 100644 engines/gob/pregob/gctfile.cpp create mode 100644 engines/gob/pregob/gctfile.h diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 1b3f400684..15351848de 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -80,6 +80,7 @@ MODULE_OBJS := \ detection/detection.o \ pregob/pregob.o \ pregob/txtfile.o \ + pregob/gctfile.o \ pregob/onceupon/onceupon.o \ pregob/onceupon/abracadabra.o \ pregob/onceupon/babayaga.o \ diff --git a/engines/gob/pregob/gctfile.cpp b/engines/gob/pregob/gctfile.cpp new file mode 100644 index 0000000000..08c32cda76 --- /dev/null +++ b/engines/gob/pregob/gctfile.cpp @@ -0,0 +1,306 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/random.h" +#include "common/stream.h" + +#include "gob/surface.h" +#include "gob/video.h" + +#include "gob/pregob/gctfile.h" + +namespace Gob { + +GCTFile::Chunk::Chunk() : type(kChunkTypeNone) { +} + + +GCTFile::GCTFile(Common::SeekableReadStream &gct, Common::RandomSource &rnd) : _rnd(&rnd), + _areaLeft(0), _areaTop(0), _areaRight(0), _areaBottom(0), _currentItem(0xFFFF) { + + load(gct); +} + +GCTFile::~GCTFile() { +} + +void GCTFile::load(Common::SeekableReadStream &gct) { + gct.skip(4); // Required buffer size + gct.skip(2); // Unknown + + // Read the selector and line counts for each item + const uint16 itemCount = gct.readUint16LE(); + _items.resize(itemCount); + + for (Items::iterator i = _items.begin(); i != _items.end(); ++i) { + const uint16 selector = gct.readUint16LE(); + const uint16 lineCount = gct.readUint16LE(); + + i->selector = selector; + i->lines.resize(lineCount); + } + + // Read all item lines + for (Items::iterator i = _items.begin(); i != _items.end(); ++i) { + for (Lines::iterator l = i->lines.begin(); l != i->lines.end(); ++l) { + const uint16 lineSize = gct.readUint16LE(); + + readLine(gct, *l, lineSize); + } + } + + if (gct.err()) + error("GCTFile::load(): Failed reading GCT"); +} + +void GCTFile::readLine(Common::SeekableReadStream &gct, Line &line, uint16 lineSize) const { + line.chunks.push_back(Chunk()); + + while (lineSize > 0) { + byte c = gct.readByte(); + lineSize--; + + if (c == 0) { + // Command byte + + if (lineSize == 0) + break; + + byte cmd = gct.readByte(); + lineSize--; + + // Line end command + if (cmd == 0) + break; + + // Item reference command + if (cmd == 1) { + if (lineSize < 2) { + warning("GCTFile::readLine(): Item reference command is missing parameters"); + break; + } + + const uint32 itemRef = gct.readUint16LE(); + lineSize -= 2; + + line.chunks.push_back(Chunk()); + line.chunks.back().type = kChunkTypeItem; + line.chunks.back().item = itemRef; + + line.chunks.push_back(Chunk()); + continue; + } + + warning("GCTFile::readLine(): Invalid command 0x%02X", cmd); + break; + } + + // Text + line.chunks.back().type = kChunkTypeString; + line.chunks.back().text += (char)c; + } + + // Skip bytes we didn't read (because of errors) + gct.skip(lineSize); + + // Remove empty chunks from the end of the list + while (!line.chunks.empty() && (line.chunks.back().type == kChunkTypeNone)) + line.chunks.pop_back(); +} + +uint16 GCTFile::getLineCount(uint item) const { + if (item >= _items.size()) + return 0; + + return _items[item].lines.size(); +} + +void GCTFile::selectLine(uint item, uint16 line) { + if ((item >= _items.size()) && (item != kSelectorAll) && (item != kSelectorRandom)) + return; + + _items[item].selector = line; +} + +void GCTFile::setText(uint item, uint16 line, const Common::String &text) { + if ((item >= _items.size()) || (line >= _items[item].lines.size())) + return; + + _items[item].lines[line].chunks.clear(); + _items[item].lines[line].chunks.push_back(Chunk()); + + _items[item].lines[line].chunks.back().type = kChunkTypeString; + _items[item].lines[line].chunks.back().text = text; +} + +void GCTFile::setText(uint item, const Common::String &text) { + if (item >= _items.size()) + return; + + _items[item].selector = 0; + + _items[item].lines.resize(1); + + setText(item, 0, text); +} + +void GCTFile::reset() { + _currentItem = 0xFFFF; + _currentText.clear(); +} + +Common::String GCTFile::getLineText(const Line &line) const { + Common::String text; + + // Go over all chunks in this line + for (Chunks::const_iterator c = line.chunks.begin(); c != line.chunks.end(); ++c) { + // A chunk is either a direct string, or a reference to another item + + if (c->type == kChunkTypeItem) { + Common::List lines; + + getItemText(c->item, lines); + if (lines.empty()) + continue; + + if (lines.size() > 1) + warning("GCTFile::getLineText(): Referenced item has multiple lines"); + + text += lines.front(); + } else if (c->type == kChunkTypeString) + text += c->text; + } + + return text; +} + +void GCTFile::getItemText(uint item, Common::List &text) const { + text.clear(); + + if ((item >= _items.size()) || _items[item].lines.empty()) + return; + + uint16 line = _items[item].selector; + + // Draw all lines + if (line == kSelectorAll) { + for (Lines::const_iterator l = _items[item].lines.begin(); l != _items[item].lines.end(); ++l) + text.push_back(getLineText(*l)); + + return; + } + + // Draw random line + if (line == kSelectorRandom) + line = _rnd->getRandomNumber(_items[item].lines.size() - 1); + + if (line >= _items[item].lines.size()) + return; + + text.push_back(getLineText(_items[item].lines[line])); +} + +void GCTFile::setArea(int16 left, int16 top, int16 right, int16 bottom) { + trashBuffer(); + + _hasArea = false; + + const int16 width = right - left + 1; + const int16 height = bottom - top + 1; + if ((width <= 0) || (height <= 0)) + return; + + _areaLeft = left; + _areaTop = top; + _areaRight = right; + _areaBottom = bottom; + + _hasArea = true; + + resizeBuffer(width, height); +} + +bool GCTFile::clear(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) { + return restoreScreen(dest, left, top, right, bottom); +} + +bool GCTFile::fill(Surface &dest, uint8 color, int16 &left, int16 &top, int16 &right, int16 &bottom) { + left = _areaLeft; + top = _areaTop; + right = _areaRight; + bottom = _areaBottom; + + if (!hasSavedBackground()) + saveScreen(dest, left, top, right, bottom); + + dest.fillRect(left, top, right, bottom, color); + + return true; +} + +bool GCTFile::finished() const { + return (_currentItem != 0xFFFF) && _currentText.empty(); +} + +bool GCTFile::draw(Surface &dest, uint16 item, const Font &font, uint8 color, + int16 &left, int16 &top, int16 &right, int16 &bottom) { + + if ((item >= _items.size()) || !_hasArea) + return false; + + left = _areaLeft; + top = _areaTop; + right = _areaRight; + bottom = _areaBottom; + + const int16 width = right - left + 1; + const int16 height = bottom - top + 1; + + const uint lineCount = height / font.getCharHeight(); + if (lineCount == 0) + return false; + + if (!hasSavedBackground()) + saveScreen(dest, left, top, right, bottom); + + if (item != _currentItem) { + _currentItem = item; + + getItemText(_currentItem, _currentText); + } + + if (_currentText.empty()) + return false; + + int16 y = top; + for (uint i = 0; (i < lineCount) && !_currentText.empty(); i++, y += font.getCharHeight()) { + const Common::String &line = _currentText.front(); + const int16 x = left + ((width - (line.size() * font.getCharWidth())) / 2); + + font.drawString(line, x, y, color, 0, true, dest); + _currentText.pop_front(); + } + + return true; +} + +} // End of namespace Gob diff --git a/engines/gob/pregob/gctfile.h b/engines/gob/pregob/gctfile.h new file mode 100644 index 0000000000..ed6351b7a8 --- /dev/null +++ b/engines/gob/pregob/gctfile.h @@ -0,0 +1,149 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_PREGOB_GCTFILE_H +#define GOB_PREGOB_GCTFILE_H + +#include "common/str.h" +#include "common/array.h" +#include "common/list.h" + +#include "gob/backbuffer.h" + +namespace Common { + class RandomSource; + class SeekableReadStream; +} + +namespace Gob { + +class Surface; +class Font; + +class GCTFile : public BackBuffer { +public: + static const uint16 kSelectorAll = 0xFFFE; ///< Print all lines. + static const uint16 kSelectorRandom = 0xFFFF; ///< Print a random line. + + + GCTFile(Common::SeekableReadStream &gct, Common::RandomSource &rnd); + ~GCTFile(); + + /** Return the number of lines in an item. */ + uint16 getLineCount(uint item) const; + + /** Set the area the text will be printed in. */ + void setArea(int16 left, int16 top, int16 right, int16 bottom); + + /** Set which line of this item should be printed. */ + void selectLine(uint item, uint16 line); + + /** Change the text of an items' line. */ + void setText(uint item, uint16 line, const Common::String &text); + /** Change the item into one one line and set that line's text. */ + void setText(uint item, const Common::String &text); + + /** Reset the item drawing state. */ + void reset(); + + /** Clear the drawn text, restoring the original content. */ + bool clear(Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom); + + /** Fill the text area with a color. */ + bool fill(Surface &dest, uint8 color, int16 &left, int16 &top, int16 &right, int16 &bottom); + + /** Draw an item onto the surface, until all text has been drawn or the area is filled. */ + bool draw(Surface &dest, uint16 item, const Font &font, uint8 color, + int16 &left, int16 &top, int16 &right, int16 &bottom); + + /** Did we draw all text? */ + bool finished() const; + +private: + /** The type of a chunk. */ + enum ChunkType { + kChunkTypeNone = 0, ///< Do nothing. + kChunkTypeString , ///< A direct string. + kChunkTypeItem ///< A reference to an item to print instead. + }; + + /** A chunk in an item text line. */ + struct Chunk { + ChunkType type; ///< The type of the chunk. + + Common::String text; ///< Text to print. + + int item; ///< Item to print instead. + + Chunk(); + }; + + typedef Common::List Chunks; + + /** A line in an item. */ + struct Line { + Chunks chunks; ///< The chunks that make up the line. + }; + + typedef Common::Array Lines; + + /** A GCT item. */ + struct Item { + Lines lines; ///< The text lines in the item + uint16 selector; ///< Which line to print. + }; + + typedef Common::Array Items; + + + Common::RandomSource *_rnd; + + Items _items; ///< All GCT items. + + // The area on which to print + bool _hasArea; + int16 _areaLeft; + int16 _areaTop; + int16 _areaRight; + int16 _areaBottom; + + /** Index of the current item we're drawing. */ + uint16 _currentItem; + /** Text left to draw. */ + Common::List _currentText; + + + // -- Loading helpers -- + + void load(Common::SeekableReadStream &gct); + void readLine(Common::SeekableReadStream &gct, Line &line, uint16 lineSize) const; + + + // -- Draw helpers -- + + Common::String getLineText(const Line &line) const; + void getItemText(uint item, Common::List &text) const; +}; + +} // End of namespace Gob + +#endif // GOB_PREGOB_GCTFILE_H diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index 4ee5430de7..033eea89f2 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -35,6 +35,7 @@ #include "gob/sound/sound.h" #include "gob/pregob/pregob.h" +#include "gob/pregob/gctfile.h" namespace Gob { @@ -341,4 +342,16 @@ TXTFile *PreGob::loadTXT(const Common::String &txtFile, TXTFile::Format format) void PreGob::fixTXTStrings(TXTFile &txt) const { } +GCTFile *PreGob::loadGCT(const Common::String &gctFile) const { + Common::SeekableReadStream *gctStream = _vm->_dataIO->getFile(gctFile); + if (!gctStream) + error("PreGob::loadGCT(): Failed to open \"%s\"", gctFile.c_str()); + + GCTFile *gct = new GCTFile(*gctStream, _vm->_rnd); + + delete gctStream; + + return gct; +} + } // End of namespace Gob diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index f1728036ab..686727b08b 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -38,6 +38,8 @@ namespace Gob { class GobEngine; class Surface; +class GCTFile; + class PreGob { public: PreGob(GobEngine *vm); @@ -164,6 +166,11 @@ protected: virtual void fixTXTStrings(TXTFile &txt) const; + // -- GCT helpers -- + + GCTFile *loadGCT(const Common::String &gctFile) const; + + GobEngine *_vm; private: -- cgit v1.2.3 From d7c81c27555ed49c70bb6d8b1e60e6a8b5065c70 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 7 Jul 2012 13:22:47 +0200 Subject: GOB: Implement GCT text drawing in the Stork section The only thing missing in the stork section now is the character creator. --- engines/gob/pregob/onceupon/onceupon.cpp | 39 +++++++++++++++++++++++--------- engines/gob/pregob/onceupon/onceupon.h | 2 +- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index aa08f6f1fd..f1b24c3353 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -32,6 +32,9 @@ #include "gob/sound/sound.h" +#include "gob/pregob/txtfile.h" +#include "gob/pregob/gctfile.h" + #include "gob/pregob/onceupon/onceupon.h" #include "gob/pregob/onceupon/palettes.h" @@ -1041,30 +1044,33 @@ OnceUpon::MenuAction OnceUpon::doIngameMenu() { if ((action == kMenuActionQuit) || _vm->shouldQuit()) { // User pressed the quit button, or quit ScummVM - _quit = true; - return kMenuActionQuit; + _quit = true; + action = kMenuActionQuit; } else if (action == kMenuActionPlay) { // User pressed the return to game button - return kMenuActionPlay; + action = kMenuActionPlay; } else if (kMenuActionMainMenu) { // User pressed the return to main menu button - return handleMainMenu(); + action = handleMainMenu(); } return action; } -OnceUpon::MenuAction OnceUpon::doIngameMenu(int16 key, MouseButtons mouseButtons) { +OnceUpon::MenuAction OnceUpon::doIngameMenu(int16 &key, MouseButtons &mouseButtons) { if ((key != kKeyEscape) && (mouseButtons != kMouseButtonsRight)) return kMenuActionNone; + key = 0; + mouseButtons = kMouseButtonsNone; + MenuAction action = doIngameMenu(); if (action == kMenuActionPlay) - return kMenuActionNone; + action = kMenuActionNone; return action; } @@ -1316,8 +1322,6 @@ enum StorkState { }; bool OnceUpon::sectionStork() { - warning("OnceUpon::sectionStork(): TODO"); - fadeOut(); hideCursor(); setGamePalette(0); @@ -1338,6 +1342,10 @@ bool OnceUpon::sectionStork() { TXTFile *whereStork = loadTXT(getLocFile("ouva.tx"), TXTFile::kFormatStringPositionColor); whereStork->draw(*_vm->_draw->_backSurface, &_plettre, 1); + // Where the stork actually goes + GCTFile *thereStork = loadGCT(getLocFile("choix.gc")); + thereStork->setArea(17, 18, 303, 41); + ANIFile ani(_vm, "present.ani", 320); ANIList anims; @@ -1355,8 +1363,6 @@ bool OnceUpon::sectionStork() { StorkState state = kStorkStateWaitUser; MenuAction action = kMenuActionNone; while (!_vm->shouldQuit() && (state != kStorkStateFinish)) { - clearAnim(anims); - // Play the stork sound if (--storkSoundWait == 0) playSound(kSoundStork); @@ -1380,6 +1386,8 @@ bool OnceUpon::sectionStork() { break; } + clearAnim(anims); + if (mouseButtons == kMouseButtonsLeft) { stopSound(); playSound(kSoundClick); @@ -1394,6 +1402,12 @@ bool OnceUpon::sectionStork() { int16 left, top, right, bottom; if (whereStork->clear(*_vm->_draw->_backSurface, left, top, right, bottom)) _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + + // Print the text where the stork actually goes + thereStork->selectLine(3, house); // The house + thereStork->selectLine(4, house); // The house's inhabitants + if (thereStork->draw(*_vm->_draw->_backSurface, 2, *_plettre, 10, left, top, right, bottom)) + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); } } @@ -1405,14 +1419,17 @@ bool OnceUpon::sectionStork() { } freeAnims(anims); + delete thereStork; delete whereStork; fadeOut(); hideCursor(); // Completed the section => move one - if (action == kMenuActionNone) + if (action == kMenuActionNone) { + warning("OnceUpon::sectionStork(): TODO: Character creator"); return true; + } // Didn't complete the section return false; diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index b9aef04dc2..7ae3a39485 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -249,7 +249,7 @@ private: /** Handle the whole ingame menu. */ MenuAction doIngameMenu(); /** Handle the whole ingame menu if ESC or right mouse button was pressed. */ - MenuAction doIngameMenu(int16 key, MouseButtons mouseButtons); + MenuAction doIngameMenu(int16 &key, MouseButtons &mouseButtons); // -- Menu button helpers -- -- cgit v1.2.3 From 90415cf083d26e593ff05acb3a511c088a533b8b Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 7 Jul 2012 13:23:54 +0200 Subject: GOB: Implement GCT text drawing in the end section The end section is now complete. --- engines/gob/pregob/onceupon/onceupon.cpp | 48 ++++++++++++++++++++++++++------ engines/gob/pregob/onceupon/onceupon.h | 3 ++ 2 files changed, 43 insertions(+), 8 deletions(-) diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index f1b24c3353..8c617e2c41 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -94,6 +94,9 @@ enum ClownAnimation { kClownAnimationClownCry = 6 }; +// 12 seconds delay for one area full of GCT text +static const uint32 kGCTDelay = 12000; + namespace Gob { namespace OnceUpon { @@ -222,6 +225,9 @@ void OnceUpon::init() { // We start with no selected difficulty and at section 0 _difficulty = kDifficultyMAX; _section = 0; + + // Default name + _name = "Nemo"; } void OnceUpon::deinit() { @@ -1518,6 +1524,10 @@ bool OnceUpon::sectionEnd() { _vm->_draw->_backSurface->blit(endBackground, 0, 0, 288, 137, 16, 50); + GCTFile *endText = loadGCT(getLocFile("final.gc")); + endText->setArea(17, 18, 303, 41); + endText->setText(1, _name); + ANIFile ani(_vm, "fin.ani", 320); ANIList anims; @@ -1526,26 +1536,48 @@ bool OnceUpon::sectionEnd() { _vm->_draw->forceBlit(); + uint32 textStartTime = 0; + MenuAction action = kMenuActionNone; while (!_vm->shouldQuit() && (action == kMenuActionNone)) { - redrawAnim(anims); - - fadeIn(); - - endFrame(true); + // Check user input int16 mouseX, mouseY; MouseButtons mouseButtons; int16 key = checkInput(mouseX, mouseY, mouseButtons); - if ((key != 0) && (key != kKeyEscape)) - // Any key pressed => Quit - action = kMenuActionQuit; action = doIngameMenu(key, mouseButtons); + if (action != kMenuActionNone) + break; + + clearAnim(anims); + + // Pressed a key or mouse button => Skip to next area-full of text + if ((mouseButtons == kMouseButtonsLeft) || (key != 0)) + textStartTime = 0; + + // Draw the next area-full of text + uint32 now = _vm->_util->getTimeKey(); + if (!endText->finished() && ((textStartTime == 0) || (now >= (textStartTime + kGCTDelay)))) { + textStartTime = now; + + int16 left, top, right, bottom; + if (endText->clear(*_vm->_draw->_backSurface, left, top, right, bottom)) + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + + if (endText->draw(*_vm->_draw->_backSurface, 0, *_plettre, 10, left, top, right, bottom)) + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + } + + drawAnim(anims); + fadeIn(); + + endFrame(true); } freeAnims(anims); + delete endText; // Restart requested if (action == kMenuActionRestart) diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 7ae3a39485..386d410c95 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -24,6 +24,7 @@ #define GOB_PREGOB_ONCEUPON_ONCEUPON_H #include "common/system.h" +#include "common/str.h" #include "gob/pregob/pregob.h" @@ -312,6 +313,8 @@ private: Difficulty _difficulty; ///< The current difficulty. int _section; ///< The current game section. + + Common::String _name; ///< The name of the child. }; } // End of namespace OnceUpon -- cgit v1.2.3 From 75e7cca6921ae005cd5c4fa39b9cfa49be2a4cbb Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 7 Jul 2012 18:44:46 +0200 Subject: GOB: Add support for entering non-ASCII CP850 characters --- engines/gob/util.cpp | 29 +++++++++++++++++++++++------ engines/gob/util.h | 1 + 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index 5d6ae78872..e1c16c3257 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -189,12 +189,27 @@ bool Util::getKeyFromBuffer(Common::KeyState &key) { return true; } +static const uint16 kLatin1ToCP850[] = { + 0xFF, 0xAD, 0xBD, 0x9C, 0xCF, 0xBE, 0xDD, 0xF5, 0xF9, 0xB8, 0xA6, 0xAE, 0xAA, 0xF0, 0xA9, 0xEE, + 0xF8, 0xF1, 0xFD, 0xFC, 0xEF, 0xE6, 0xF4, 0xFA, 0xF7, 0xFB, 0xA7, 0xAF, 0xAC, 0xAB, 0xF3, 0xA8, + 0xB7, 0xB5, 0xB6, 0xC7, 0x8E, 0x8F, 0x92, 0x80, 0xD4, 0x90, 0xD2, 0xD3, 0xDE, 0xD6, 0xD7, 0xD8, + 0xD1, 0xA5, 0xE3, 0xE0, 0xE2, 0xE5, 0x99, 0x9E, 0x9D, 0xEB, 0xE9, 0xEA, 0x9A, 0xED, 0xE8, 0xE1, + 0x85, 0xA0, 0x83, 0xC6, 0x84, 0x86, 0x91, 0x87, 0x8A, 0x82, 0x88, 0x89, 0x8D, 0xA1, 0x8C, 0x8B, + 0xD0, 0xA4, 0x95, 0xA2, 0x93, 0xE4, 0x94, 0xF6, 0x9B, 0x97, 0xA3, 0x96, 0x81, 0xEC, 0xE7, 0x98 +}; + +int16 Util::toCP850(uint16 latin1) { + if ((latin1 < 0xA0) || ((latin1 - 0xA0) >= ARRAYSIZE(kLatin1ToCP850))) + return 0; + + return kLatin1ToCP850[latin1 - 0xA0]; +} + int16 Util::translateKey(const Common::KeyState &key) { static struct keyS { int16 from; int16 to; } keys[] = { - {Common::KEYCODE_INVALID, kKeyNone }, {Common::KEYCODE_BACKSPACE, kKeyBackspace}, {Common::KEYCODE_SPACE, kKeySpace }, {Common::KEYCODE_RETURN, kKeyReturn }, @@ -216,16 +231,18 @@ int16 Util::translateKey(const Common::KeyState &key) { {Common::KEYCODE_F10, kKeyF10 } }; + // Translate special keys for (int i = 0; i < ARRAYSIZE(keys); i++) if (key.keycode == keys[i].from) return keys[i].to; - if ((key.keycode >= Common::KEYCODE_SPACE) && - (key.keycode <= Common::KEYCODE_DELETE)) { - - // Used as a user input in Gobliins 2 notepad, in the save dialog, ... + // Return the ascii value, for text input + if ((key.ascii >= 32) && (key.ascii <= 127)) return key.ascii; - } + + // Translate international characters into CP850 characters + if ((key.ascii >= 160) && (key.ascii <= 255)) + return toCP850(key.ascii); return 0; } diff --git a/engines/gob/util.h b/engines/gob/util.h index 30bff72325..2e568ad169 100644 --- a/engines/gob/util.h +++ b/engines/gob/util.h @@ -166,6 +166,7 @@ protected: void addKeyToBuffer(const Common::KeyState &key); bool getKeyFromBuffer(Common::KeyState &key); int16 translateKey(const Common::KeyState &key); + int16 toCP850(uint16 latin1); void checkJoystick(); void keyDown(const Common::Event &event); -- cgit v1.2.3 From 5b02192477cbdc9e8251bd48cac764d6fa61d024 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 7 Jul 2012 18:45:15 +0200 Subject: GOB: Add Font::hasChar() --- engines/gob/video.cpp | 4 ++++ engines/gob/video.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index 62bb210a8e..64af34cf62 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -84,6 +84,10 @@ uint16 Font::getCharCount() const { return _endItem - _startItem + 1; } +bool Font::hasChar(uint8 c) const { + return (c >= _startItem) && (c <= _endItem); +} + bool Font::isMonospaced() const { return _charWidths == 0; } diff --git a/engines/gob/video.h b/engines/gob/video.h index a8c1480a6b..122c1e47d5 100644 --- a/engines/gob/video.h +++ b/engines/gob/video.h @@ -41,6 +41,8 @@ public: uint8 getCharWidth () const; uint8 getCharHeight() const; + bool hasChar(uint8 c) const; + bool isMonospaced() const; void drawLetter(Surface &surf, uint8 c, uint16 x, uint16 y, -- cgit v1.2.3 From 10b9be285149dd21bc38710c1a685800fab75e01 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 7 Jul 2012 19:14:06 +0200 Subject: GOB: Add Util::toCP850Lower() / toCP850Upper() --- engines/gob/util.cpp | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ engines/gob/util.h | 5 ++++ 2 files changed, 71 insertions(+) diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index e1c16c3257..5ac4ef024e 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -247,6 +247,72 @@ int16 Util::translateKey(const Common::KeyState &key) { return 0; } +static const uint8 kLowerToUpper[][2] = { + {0x81, 0x9A}, + {0x82, 0x90}, + {0x83, 0xB6}, + {0x84, 0x8E}, + {0x85, 0xB7}, + {0x86, 0x8F}, + {0x87, 0x80}, + {0x88, 0xD2}, + {0x89, 0xD3}, + {0x8A, 0xD4}, + {0x8B, 0xD8}, + {0x8C, 0xD7}, + {0x8D, 0xDE}, + {0x91, 0x92}, + {0x93, 0xE2}, + {0x94, 0x99}, + {0x95, 0xE3}, + {0x96, 0xEA}, + {0x97, 0xEB}, + {0x95, 0xE3}, + {0x96, 0xEA}, + {0x97, 0xEB}, + {0x9B, 0x9D}, + {0xA0, 0xB5}, + {0xA1, 0xD6}, + {0xA2, 0xE0}, + {0xA3, 0xE9}, + {0xA4, 0xA5}, + {0xC6, 0xC7}, + {0xD0, 0xD1}, + {0xE4, 0xE5}, + {0xE7, 0xE8}, + {0xEC, 0xED} +}; + +char Util::toCP850Lower(char cp850) { + const uint8 cp = (unsigned char)cp850; + if (cp <= 32) + return cp850; + + if (cp <= 127) + return tolower(cp850); + + for (uint i = 0; i < ARRAYSIZE(kLowerToUpper); i++) + if (cp == kLowerToUpper[i][1]) + return (char)kLowerToUpper[i][0]; + + return cp850; +} + +char Util::toCP850Upper(char cp850) { + const uint8 cp = (unsigned char)cp850; + if (cp <= 32) + return cp850; + + if (cp <= 127) + return toupper(cp850); + + for (uint i = 0; i < ARRAYSIZE(kLowerToUpper); i++) + if (cp == kLowerToUpper[i][0]) + return (char)kLowerToUpper[i][1]; + + return cp850; +} + int16 Util::getKey() { Common::KeyState key; diff --git a/engines/gob/util.h b/engines/gob/util.h index 2e568ad169..a4984c6207 100644 --- a/engines/gob/util.h +++ b/engines/gob/util.h @@ -143,6 +143,11 @@ public: /** Read a constant-length string out of a stream. */ static Common::String readString(Common::SeekableReadStream &stream, int n); + /** Convert a character in CP850 encoding to the equivalent lower case character. */ + static char toCP850Lower(char cp850); + /** Convert a character in CP850 encoding to the equivalent upper case character. */ + static char toCP850Upper(char cp850); + Util(GobEngine *vm); protected: -- cgit v1.2.3 From 57b1b7ad2496be6f6c2545877576e3c818dc6ef6 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 7 Jul 2012 19:20:07 +0200 Subject: GOB: Implement the Once Upon A Time character generator Still missing the little sprite bouncing around, though. --- engines/gob/pregob/onceupon/onceupon.cpp | 355 ++++++++++++++++++++++++++++++- engines/gob/pregob/onceupon/onceupon.h | 30 ++- 2 files changed, 375 insertions(+), 10 deletions(-) diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 8c617e2c41..1d1bfd4629 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -1095,18 +1095,18 @@ int OnceUpon::checkButton(const MenuButton *buttons, uint count, int16 x, int16 return failValue; } -void OnceUpon::drawButton(Surface &dest, const Surface &src, const MenuButton &button) const { - dest.blit(src, button.srcLeft, button.srcTop, button.srcRight, button.srcBottom, button.dstX, button.dstY); +void OnceUpon::drawButton(Surface &dest, const Surface &src, const MenuButton &button, int transp) const { + dest.blit(src, button.srcLeft, button.srcTop, button.srcRight, button.srcBottom, button.dstX, button.dstY, transp); } -void OnceUpon::drawButtons(Surface &dest, const Surface &src, const MenuButton *buttons, uint count) const { +void OnceUpon::drawButtons(Surface &dest, const Surface &src, const MenuButton *buttons, uint count, int transp) const { for (uint i = 0; i < count; i++) { const MenuButton &button = buttons[i]; if (!button.needDraw) continue; - drawButton(dest, src, button); + drawButton(dest, src, button, transp); } } @@ -1431,16 +1431,355 @@ bool OnceUpon::sectionStork() { fadeOut(); hideCursor(); - // Completed the section => move one - if (action == kMenuActionNone) { - warning("OnceUpon::sectionStork(): TODO: Character creator"); + // Didn't complete the section + if (action != kMenuActionNone) + return false; + + // Move on to the character generator + + CharGenAction charGenAction = kCharGenRestart; + while (charGenAction == kCharGenRestart) + charGenAction = characterGenerator(); + + // Did we successfully create a character? + return charGenAction == kCharGenDone; +} + +const OnceUpon::MenuButton OnceUpon::kCharGenHeadButtons[] = { + {true, 106, 146, 152, 180, 0, 0, 47, 34, 106, 146, 0}, + {true, 155, 146, 201, 180, 49, 0, 96, 34, 155, 146, 1}, + {true, 204, 146, 250, 180, 98, 0, 145, 34, 204, 146, 2}, + {true, 253, 146, 299, 180, 147, 0, 194, 34, 253, 146, 3} +}; + +const OnceUpon::MenuButton OnceUpon::kCharGenHeads[] = { + {true, 0, 0, 0, 0, 29, 4, 68, 31, 40, 51, 0}, + {true, 0, 0, 0, 0, 83, 4, 113, 31, 45, 51, 1}, + {true, 0, 0, 0, 0, 132, 4, 162, 31, 45, 51, 2}, + {true, 0, 0, 0, 0, 182, 4, 211, 31, 45, 51, 3} +}; + +const OnceUpon::MenuButton OnceUpon::kCharGenHairButtons[] = { + {true, 105, 55, 124, 70, 271, 1, 289, 15, 105, 55, 0x04}, + {true, 105, 74, 124, 89, 271, 20, 289, 34, 105, 74, 0x07} +}; + +const OnceUpon::MenuButton OnceUpon::kCharGenJacketButtons[] = { + {true, 105, 90, 124, 105, 271, 39, 289, 53, 105, 90, 0x06}, + {true, 105, 109, 124, 124, 271, 58, 289, 72, 105, 109, 0x02} +}; + +const OnceUpon::MenuButton OnceUpon::kCharGenTrousersButtons[] = { + {true, 105, 140, 124, 155, 271, 77, 289, 91, 105, 140, 0x01}, + {true, 105, 159, 124, 174, 271, 96, 289, 110, 105, 159, 0x03} +}; + +const OnceUpon::MenuButton OnceUpon::kCharGenNameEntry[] = { + {true, 0, 0, 0, 0, 0, 38, 54, 48, 140, 145, 0}, + {true, 0, 0, 0, 0, 106, 38, 159, 48, 195, 145, 0}, + {true, 0, 0, 0, 0, 0, 105, 54, 121, 140, 156, 0}, + {true, 0, 0, 0, 0, 106, 105, 159, 121, 195, 156, 0} +}; + +enum CharGenState { + kCharGenStateHead = 0, // Choose a head + kCharGenStateHair , // Choose hair color + kCharGenStateJacket , // Choose jacket color + kCharGenStateTrousers , // Choose trousers color + kCharGenStateName , // Choose name + kCharGenStateSure , // "Are you sure?" + kCharGenStateStoryName , // "We're going to tell the story of $NAME" + kCharGenStateFinish // Finished +}; + +void OnceUpon::recolor(Surface &surface, uint8 from, uint8 to) { + for (Pixel p = surface.get(); p.isValid(); ++p) + if (p.get() == from) + p.set(to); +} + +void OnceUpon::charGenSetup(uint stage) { + Surface choix(320, 200, 1), elchoix(320, 200, 1), paperDoll(65, 137, 1); + + _vm->_video->drawPackedSprite("choix.cmp" , choix); + _vm->_video->drawPackedSprite("elchoix.cmp", elchoix); + + paperDoll.blit(choix, 200, 0, 264, 136, 0, 0); + + GCTFile *text = loadGCT(getLocFile("choix.gc")); + text->setArea(17, 18, 303, 41); + text->setText(9, _name); + + // Background + _vm->_video->drawPackedSprite("cadre.cmp", *_vm->_draw->_backSurface); + _vm->_draw->_backSurface->fillRect(16, 50, 303, 187, 5); + + // Character sprite frame + _vm->_draw->_backSurface->blit(choix, 0, 38, 159, 121, 140, 54); + + // Recolor the paper doll parts + if (_colorHair != 0xFF) + recolor(elchoix , 0x0C, _colorHair); + if (_colorJacket != 0xFF) + recolor(paperDoll, 0x0A, _colorJacket); + if (_colorTrousers != 0xFF) + recolor(paperDoll, 0x09, _colorTrousers); + + _vm->_draw->_backSurface->blit(paperDoll, 32, 51); + + // Paper doll head + if (_head != 0xFF) + drawButton(*_vm->_draw->_backSurface, elchoix, kCharGenHeads[_head], 0); + + if (stage == kCharGenStateHead) { + // Head buttons + drawButtons(*_vm->_draw->_backSurface, choix, kCharGenHeadButtons, ARRAYSIZE(kCharGenHeadButtons)); + + // "Choose a head" + int16 left, top, right, bottom; + text->draw(*_vm->_draw->_backSurface, 5, *_plettre, 10, left, top, right, bottom); + + } else if (stage == kCharGenStateHair) { + // Hair color buttons + drawButtons(*_vm->_draw->_backSurface, choix, kCharGenHairButtons, ARRAYSIZE(kCharGenHairButtons)); + + // "What color is the hair?" + int16 left, top, right, bottom; + text->draw(*_vm->_draw->_backSurface, 6, *_plettre, 10, left, top, right, bottom); + + } else if (stage == kCharGenStateJacket) { + // Jacket color buttons + drawButtons(*_vm->_draw->_backSurface, choix, kCharGenJacketButtons, ARRAYSIZE(kCharGenJacketButtons)); + + // "What color is the jacket?" + int16 left, top, right, bottom; + text->draw(*_vm->_draw->_backSurface, 7, *_plettre, 10, left, top, right, bottom); + + } else if (stage == kCharGenStateTrousers) { + // Trousers color buttons + drawButtons(*_vm->_draw->_backSurface, choix, kCharGenTrousersButtons, ARRAYSIZE(kCharGenTrousersButtons)); + + // "What color are the trousers?" + int16 left, top, right, bottom; + text->draw(*_vm->_draw->_backSurface, 8, *_plettre, 10, left, top, right, bottom); + + } else if (stage == kCharGenStateName) { + // Name entry field + drawButtons(*_vm->_draw->_backSurface, choix, kCharGenNameEntry, ARRAYSIZE(kCharGenNameEntry)); + + // "Enter name" + int16 left, top, right, bottom; + text->draw(*_vm->_draw->_backSurface, 10, *_plettre, 10, left, top, right, bottom); + + charGenDrawName(); + } else if (stage == kCharGenStateSure) { + // Name entry field + drawButtons(*_vm->_draw->_backSurface, choix, kCharGenNameEntry, ARRAYSIZE(kCharGenNameEntry)); + + // "Are you sure?" + TXTFile *sure = loadTXT(getLocFile("estu.tx"), TXTFile::kFormatStringPositionColor); + sure->draw(*_vm->_draw->_backSurface, &_plettre, 1); + delete sure; + + charGenDrawName(); + } else if (stage == kCharGenStateStoryName) { + + // "We're going to tell the story of $NAME" + int16 left, top, right, bottom; + text->draw(*_vm->_draw->_backSurface, 11, *_plettre, 10, left, top, right, bottom); + } + + delete text; +} + +bool OnceUpon::enterString(Common::String &name, int16 key, uint maxLength, const Font &font) { + if (key == 0) + return true; + + if (key == kKeyBackspace) { + name.deleteLastChar(); + return true; + } + + if ((key >= ' ') && (key <= 0xFF)) { + if (name.size() >= maxLength) + return false; + + if (!font.hasChar(key)) + return false; + + name += (char) key; return true; } - // Didn't complete the section return false; } +void OnceUpon::charGenDrawName() { + _vm->_draw->_backSurface->fillRect(147, 151, 243, 166, 1); + + const int16 nameY = 151 + ((166 - 151 + 1 - _plettre->getCharHeight()) / 2); + const int16 nameX = 147 + ((243 - 147 + 1 - (15 * _plettre->getCharWidth ())) / 2); + + _plettre->drawString(_name, nameX, nameY, 10, 0, true, *_vm->_draw->_backSurface); + + const int16 cursorLeft = nameX + _name.size() * _plettre->getCharWidth(); + const int16 cursorTop = nameY; + const int16 cursorRight = cursorLeft + _plettre->getCharWidth() - 1; + const int16 cursorBottom = cursorTop + _plettre->getCharHeight() - 1; + + _vm->_draw->_backSurface->fillRect(cursorLeft, cursorTop, cursorRight, cursorBottom, 10); + + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, 147, 151, 243, 166); +} + +OnceUpon::CharGenAction OnceUpon::characterGenerator() { + fadeOut(); + hideCursor(); + setGameCursor(); + + showWait(1); + + _name.clear(); + + _head = 0xFF; + _colorHair = 0xFF; + _colorJacket = 0xFF; + _colorTrousers = 0xFF; + + CharGenState state = kCharGenStateHead; + charGenSetup(state); + + fadeOut(); + _vm->_draw->forceBlit(); + + CharGenAction action = kCharGenRestart; + while (!_vm->shouldQuit() && (state != kCharGenStateFinish)) { + // Check user input + + int16 mouseX, mouseY; + MouseButtons mouseButtons; + + int16 key = checkInput(mouseX, mouseY, mouseButtons); + + MenuAction menuAction = doIngameMenu(key, mouseButtons); + if (menuAction != kMenuActionNone) { + state = kCharGenStateFinish; + action = kCharGenAbort; + break; + } + + // clearAnim(anims); + + if (state == kCharGenStateStoryName) { + if ((mouseButtons != kMouseButtonsNone) || (key != 0)) { + state = kCharGenStateFinish; + action = kCharGenDone; + break; + } + } + + if (state == kCharGenStateSure) { + // Not sure => restart + if ((key == 'N') || (key == 'n')) { // No / Nein / Non + state = kCharGenStateFinish; + action = kCharGenRestart; + break; + } + + if ((key == 'Y') || (key == 'y') || // Yes + (key == 'J') || (key == 'j') || // Ja + (key == 'S') || (key == 's') || // Si + (key == 'O') || (key == 'o')) { // Oui + + state = kCharGenStateStoryName; + charGenSetup(state); + _vm->_draw->forceBlit(); + } + } + + if (state == kCharGenStateName) { + if (enterString(_name, key, 14, *_plettre)) { + _vm->_draw->_backSurface->fillRect(147, 151, 243, 166, 1); + + const int16 nameY = 151 + ((166 - 151 + 1 - _plettre->getCharHeight()) / 2); + const int16 nameX = 147 + ((243 - 147 + 1 - (15 * _plettre->getCharWidth ())) / 2); + + _plettre->drawString(_name, nameX, nameY, 10, 0, true, *_vm->_draw->_backSurface); + + const int16 cursorLeft = nameX + _name.size() * _plettre->getCharWidth(); + const int16 cursorTop = nameY; + const int16 cursorRight = cursorLeft + _plettre->getCharWidth() - 1; + const int16 cursorBottom = cursorTop + _plettre->getCharHeight() - 1; + + _vm->_draw->_backSurface->fillRect(cursorLeft, cursorTop, cursorRight, cursorBottom, 10); + + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, 147, 151, 243, 166); + } + + if ((key == kKeyReturn) && !_name.empty()) { + _name.setChar(Util::toCP850Upper(_name[0]), 0); + + state = kCharGenStateSure; + charGenSetup(state); + _vm->_draw->forceBlit(); + } + } + + if (mouseButtons == kMouseButtonsLeft) { + int trousers = checkButton(kCharGenTrousersButtons, ARRAYSIZE(kCharGenTrousersButtons), mouseX, mouseY); + if ((state == kCharGenStateTrousers) && (trousers >= 0)) { + _colorTrousers = trousers; + + state = kCharGenStateName; + charGenSetup(state); + _vm->_draw->forceBlit(); + } + + int jacket = checkButton(kCharGenJacketButtons, ARRAYSIZE(kCharGenJacketButtons), mouseX, mouseY); + if ((state == kCharGenStateJacket) && (jacket >= 0)) { + _colorJacket = jacket; + + state = kCharGenStateTrousers; + charGenSetup(state); + _vm->_draw->forceBlit(); + } + + int hair = checkButton(kCharGenHairButtons, ARRAYSIZE(kCharGenHairButtons), mouseX, mouseY); + if ((state == kCharGenStateHair) && (hair >= 0)) { + _colorHair = hair; + + state = kCharGenStateJacket; + charGenSetup(state); + _vm->_draw->forceBlit(); + } + + int head = checkButton(kCharGenHeadButtons, ARRAYSIZE(kCharGenHeadButtons), mouseX, mouseY); + if ((state == kCharGenStateHead) && (head >= 0)) { + _head = head; + + state = kCharGenStateHair; + charGenSetup(state); + _vm->_draw->forceBlit(); + } + } + + //drawAnim(anims); + showCursor(); + fadeIn(); + + endFrame(true); + } + + fadeOut(); + hideCursor(); + + if (_vm->shouldQuit()) + return kCharGenAbort; + + return action; +} + bool OnceUpon::sectionChapter1() { showChapter(1); return true; diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 386d410c95..3b924a11e6 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -139,6 +139,13 @@ private: kSoundMAX }; + /** Action the character generation wants us to take. */ + enum CharGenAction { + kCharGenDone = 0, ///< Created a character, move on. + kCharGenAbort , ///< Aborted the character generation. + kCharGenRestart ///< Restart the character generation. + }; + /** A complete screen backup. */ struct ScreenBackup { Surface *screen; ///< Screen contents. @@ -165,6 +172,13 @@ private: static const MenuButton kSectionStorkHouses[]; + static const MenuButton kCharGenHeadButtons[]; + static const MenuButton kCharGenHeads[]; + static const MenuButton kCharGenHairButtons[]; + static const MenuButton kCharGenJacketButtons[]; + static const MenuButton kCharGenTrousersButtons[]; + static const MenuButton kCharGenNameEntry[]; + /** All general game sounds we know about. */ static const char *kSound[kSoundMAX]; @@ -259,9 +273,9 @@ private: int checkButton(const MenuButton *buttons, uint count, int16 x, int16 y, int failValue = -1) const; /** Draw a menu button. */ - void drawButton (Surface &dest, const Surface &src, const MenuButton &button) const; + void drawButton (Surface &dest, const Surface &src, const MenuButton &button, int transp = -1) const; /** Draw multiple menu buttons. */ - void drawButtons(Surface &dest, const Surface &src, const MenuButton *buttons, uint count) const; + void drawButtons(Surface &dest, const Surface &src, const MenuButton *buttons, uint count, int transp = -1) const; /** Draw a border around a button. */ void drawButtonBorder(const MenuButton &button, uint8 color); @@ -296,6 +310,13 @@ private: bool sectionChapter7(); bool sectionEnd(); + CharGenAction characterGenerator(); + void charGenSetup(uint stage); + void charGenDrawName(); + + static void recolor(Surface &surface, uint8 from, uint8 to); + static bool enterString(Common::String &name, int16 key, uint maxLength, const Font &font); + /** Did we open the game archives? */ bool _openedArchives; @@ -315,6 +336,11 @@ private: int _section; ///< The current game section. Common::String _name; ///< The name of the child. + + uint8 _head; + uint8 _colorHair; + uint8 _colorJacket; + uint8 _colorTrousers; }; } // End of namespace OnceUpon -- cgit v1.2.3 From baec4d87781d24786f0b76e83efee3bca7f9afea Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Jul 2012 00:19:24 +0200 Subject: GOB: Move recolor() into class Surface --- engines/gob/pregob/onceupon/onceupon.cpp | 18 +++++++----------- engines/gob/pregob/onceupon/onceupon.h | 1 - engines/gob/surface.cpp | 6 ++++++ engines/gob/surface.h | 2 ++ 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 1d1bfd4629..53fa3bcece 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -1492,12 +1492,6 @@ enum CharGenState { kCharGenStateFinish // Finished }; -void OnceUpon::recolor(Surface &surface, uint8 from, uint8 to) { - for (Pixel p = surface.get(); p.isValid(); ++p) - if (p.get() == from) - p.set(to); -} - void OnceUpon::charGenSetup(uint stage) { Surface choix(320, 200, 1), elchoix(320, 200, 1), paperDoll(65, 137, 1); @@ -1518,12 +1512,14 @@ void OnceUpon::charGenSetup(uint stage) { _vm->_draw->_backSurface->blit(choix, 0, 38, 159, 121, 140, 54); // Recolor the paper doll parts - if (_colorHair != 0xFF) - recolor(elchoix , 0x0C, _colorHair); - if (_colorJacket != 0xFF) - recolor(paperDoll, 0x0A, _colorJacket); + if (_colorHair != 0xFF) + elchoix.recolor(0x0C, _colorHair); + + if (_colorJacket != 0xFF) + paperDoll.recolor(0x0A, _colorJacket); + if (_colorTrousers != 0xFF) - recolor(paperDoll, 0x09, _colorTrousers); + paperDoll.recolor(0x09, _colorTrousers); _vm->_draw->_backSurface->blit(paperDoll, 32, 51); diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 3b924a11e6..80fcba35bd 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -314,7 +314,6 @@ private: void charGenSetup(uint stage); void charGenDrawName(); - static void recolor(Surface &surface, uint8 from, uint8 to); static bool enterString(Common::String &name, int16 key, uint maxLength, const Font &font); diff --git a/engines/gob/surface.cpp b/engines/gob/surface.cpp index 3eaf741be2..afbb7c3bae 100644 --- a/engines/gob/surface.cpp +++ b/engines/gob/surface.cpp @@ -684,6 +684,12 @@ void Surface::shadeRect(uint16 left, uint16 top, uint16 right, uint16 bottom, } +void Surface::recolor(uint8 from, uint8 to) { + for (Pixel p = get(); p.isValid(); ++p) + if (p.get() == from) + p.set(to); +} + void Surface::putPixel(uint16 x, uint16 y, uint32 color) { if ((x >= _width) || (y >= _height)) return; diff --git a/engines/gob/surface.h b/engines/gob/surface.h index 09be8d1a49..8f895a7910 100644 --- a/engines/gob/surface.h +++ b/engines/gob/surface.h @@ -156,6 +156,8 @@ public: void shadeRect(uint16 left, uint16 top, uint16 right, uint16 bottom, uint32 color, uint8 strength); + void recolor(uint8 from, uint8 to); + void putPixel(uint16 x, uint16 y, uint32 color); void drawLine(uint16 x0, uint16 y0, uint16 x1, uint16 y1, uint32 color); void drawRect(uint16 left, uint16 top, uint16 right, uint16 bottom, uint32 color); -- cgit v1.2.3 From 20a96733a5f982e427a9143ded14e2af418ac6df Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Jul 2012 00:19:48 +0200 Subject: GOB: Add CMPFile::recolor() and ANIFile::recolor() --- engines/gob/anifile.cpp | 5 +++++ engines/gob/anifile.h | 3 +++ engines/gob/cmpfile.cpp | 5 +++++ engines/gob/cmpfile.h | 2 ++ 4 files changed, 15 insertions(+) diff --git a/engines/gob/anifile.cpp b/engines/gob/anifile.cpp index e6bf30f4d7..085ac800cd 100644 --- a/engines/gob/anifile.cpp +++ b/engines/gob/anifile.cpp @@ -289,4 +289,9 @@ void ANIFile::drawLayer(Surface &dest, uint16 layer, uint16 part, _layers[layer]->draw(dest, part, x, y, transp); } +void ANIFile::recolor(uint8 from, uint8 to) { + for (LayerArray::iterator l = _layers.begin(); l != _layers.end(); ++l) + (*l)->recolor(from, to); +} + } // End of namespace Gob diff --git a/engines/gob/anifile.h b/engines/gob/anifile.h index b6d9c735b5..c930aafc6b 100644 --- a/engines/gob/anifile.h +++ b/engines/gob/anifile.h @@ -92,6 +92,9 @@ public: /** Draw an animation frame. */ void draw(Surface &dest, uint16 animation, uint16 frame, int16 x, int16 y) const; + /** Recolor the animation sprites. */ + void recolor(uint8 from, uint8 to); + private: typedef Common::Array LayerArray; typedef Common::Array AnimationArray; diff --git a/engines/gob/cmpfile.cpp b/engines/gob/cmpfile.cpp index 1cd1375879..d304958f76 100644 --- a/engines/gob/cmpfile.cpp +++ b/engines/gob/cmpfile.cpp @@ -250,4 +250,9 @@ uint16 CMPFile::addSprite(uint16 left, uint16 top, uint16 right, uint16 bottom) return _coordinates->add(left, top, right, bottom); } +void CMPFile::recolor(uint8 from, uint8 to) { + if (_surface) + _surface->recolor(from, to); +} + } // End of namespace Gob diff --git a/engines/gob/cmpfile.h b/engines/gob/cmpfile.h index 2b669e4d38..9c858238af 100644 --- a/engines/gob/cmpfile.h +++ b/engines/gob/cmpfile.h @@ -70,6 +70,8 @@ public: uint16 addSprite(uint16 left, uint16 top, uint16 right, uint16 bottom); + void recolor(uint8 from, uint8 to); + private: GobEngine *_vm; -- cgit v1.2.3 From 6533047514d0ab1cc7273a0c071fa24b6c2f7b71 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Jul 2012 00:20:36 +0200 Subject: GOB: Add the walking child in the character generator --- engines/gob/module.mk | 1 + engines/gob/pregob/onceupon/chargenchild.cpp | 104 +++++++++++++++++++++++++++ engines/gob/pregob/onceupon/chargenchild.h | 51 +++++++++++++ engines/gob/pregob/onceupon/onceupon.cpp | 22 +++++- 4 files changed, 176 insertions(+), 2 deletions(-) create mode 100644 engines/gob/pregob/onceupon/chargenchild.cpp create mode 100644 engines/gob/pregob/onceupon/chargenchild.h diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 15351848de..4858e97c60 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -85,6 +85,7 @@ MODULE_OBJS := \ pregob/onceupon/abracadabra.o \ pregob/onceupon/babayaga.o \ pregob/onceupon/stork.o \ + pregob/onceupon/chargenchild.o \ minigames/geisha/evilfish.o \ minigames/geisha/oko.o \ minigames/geisha/meter.o \ diff --git a/engines/gob/pregob/onceupon/chargenchild.cpp b/engines/gob/pregob/onceupon/chargenchild.cpp new file mode 100644 index 0000000000..7150c69b5f --- /dev/null +++ b/engines/gob/pregob/onceupon/chargenchild.cpp @@ -0,0 +1,104 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "gob/surface.h" +#include "gob/anifile.h" + +#include "gob/pregob/onceupon/chargenchild.h" + +enum Animation { + kAnimWalkLeft = 0, + kAnimWalkRight = 1, + kAnimJumpLeft = 2, + kAnimJumpRight = 3, + kAnimTapFoot = 14 +}; + +namespace Gob { + +namespace OnceUpon { + +CharGenChild::CharGenChild(const ANIFile &ani) : ANIObject(ani) { + setPosition(265, 110); + setAnimation(kAnimWalkLeft); + setVisible(true); + setPause(false); +} + +CharGenChild::~CharGenChild() { +} + +void CharGenChild::advance() { + bool wasLastFrame = lastFrame(); + + ANIObject::advance(); + + int16 x, y, left, top, width, height; + getPosition(x, y); + getFramePosition(left, top); + getFrameSize(width, height); + + const int16 right = left + width - 1; + + switch (getAnimation()) { + case kAnimWalkLeft: + if (left <= 147) + setAnimation(kAnimWalkRight); + break; + + case kAnimWalkRight: + if (right >= 290) { + setAnimation(kAnimJumpLeft); + + setPosition(x, y - 14); + } + break; + + case kAnimJumpLeft: + if (wasLastFrame) { + setAnimation(kAnimTapFoot); + + setPosition(x, y - 10); + } + break; + + case kAnimTapFoot: + if (wasLastFrame) { + setAnimation(kAnimJumpRight); + + setPosition(x, y + 10); + } + break; + + case kAnimJumpRight: + if (wasLastFrame) { + setAnimation(kAnimWalkLeft); + + setPosition(x, y + 14); + } + break; + } +} + +} // End of namespace OnceUpon + +} // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/chargenchild.h b/engines/gob/pregob/onceupon/chargenchild.h new file mode 100644 index 0000000000..afbe3fd2fe --- /dev/null +++ b/engines/gob/pregob/onceupon/chargenchild.h @@ -0,0 +1,51 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_PREGOB_ONCEUPON_CHARGENCHILD_H +#define GOB_PREGOB_ONCEUPON_CHARGENCHILD_H + +#include "common/system.h" + +#include "gob/aniobject.h" + +namespace Gob { + +class Surface; +class ANIFile; + +namespace OnceUpon { + +/** The child running around on the character generator screen. */ +class CharGenChild : public ANIObject { +public: + CharGenChild(const ANIFile &ani); + ~CharGenChild(); + + /** Advance the animation to the next frame. */ + void advance(); +}; + +} // End of namespace OnceUpon + +} // End of namespace Gob + +#endif // GOB_PREGOB_ONCEUPON_CHARGENCHILD_H diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 53fa3bcece..7eef740139 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -37,6 +37,7 @@ #include "gob/pregob/onceupon/onceupon.h" #include "gob/pregob/onceupon/palettes.h" +#include "gob/pregob/onceupon/chargenchild.h" static const uint kLanguageCount = 5; @@ -1646,6 +1647,15 @@ OnceUpon::CharGenAction OnceUpon::characterGenerator() { CharGenState state = kCharGenStateHead; charGenSetup(state); + ANIFile ani(_vm, "ba.ani", 320); + ANIList anims; + + anims.push_back(new CharGenChild(ani)); + + ani.recolor(0x0F, 0x0C); + ani.recolor(0x0E, 0x0A); + ani.recolor(0x08, 0x09); + fadeOut(); _vm->_draw->forceBlit(); @@ -1665,7 +1675,7 @@ OnceUpon::CharGenAction OnceUpon::characterGenerator() { break; } - // clearAnim(anims); + clearAnim(anims); if (state == kCharGenStateStoryName) { if ((mouseButtons != kMouseButtonsNone) || (key != 0)) { @@ -1727,6 +1737,8 @@ OnceUpon::CharGenAction OnceUpon::characterGenerator() { if ((state == kCharGenStateTrousers) && (trousers >= 0)) { _colorTrousers = trousers; + ani.recolor(0x09, _colorTrousers); + state = kCharGenStateName; charGenSetup(state); _vm->_draw->forceBlit(); @@ -1736,6 +1748,8 @@ OnceUpon::CharGenAction OnceUpon::characterGenerator() { if ((state == kCharGenStateJacket) && (jacket >= 0)) { _colorJacket = jacket; + ani.recolor(0x0A, _colorJacket); + state = kCharGenStateTrousers; charGenSetup(state); _vm->_draw->forceBlit(); @@ -1745,6 +1759,8 @@ OnceUpon::CharGenAction OnceUpon::characterGenerator() { if ((state == kCharGenStateHair) && (hair >= 0)) { _colorHair = hair; + ani.recolor(0x0C, _colorHair); + state = kCharGenStateJacket; charGenSetup(state); _vm->_draw->forceBlit(); @@ -1760,7 +1776,7 @@ OnceUpon::CharGenAction OnceUpon::characterGenerator() { } } - //drawAnim(anims); + drawAnim(anims); showCursor(); fadeIn(); @@ -1770,6 +1786,8 @@ OnceUpon::CharGenAction OnceUpon::characterGenerator() { fadeOut(); hideCursor(); + freeAnims(anims); + if (_vm->shouldQuit()) return kCharGenAbort; -- cgit v1.2.3 From 9c32fd2360d9fa18ceac6fefc571c6610965d361 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Jul 2012 00:46:24 +0200 Subject: GOB: Add PreGob::beep() --- engines/gob/pregob/pregob.cpp | 4 ++++ engines/gob/pregob/pregob.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index 033eea89f2..42b5a8fb9c 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -208,6 +208,10 @@ void PreGob::playSoundFile(const Common::String &file, int16 frequency, int16 re stopSound(); } +void PreGob::beep(int16 frequency, int32 length) { + _vm->_sound->speakerOn(frequency, length); +} + void PreGob::endFrame(bool doInput) { _vm->_draw->blitInvalidated(); _vm->_util->waitEndFrame(); diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index 686727b08b..da0de60dd8 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -142,6 +142,9 @@ protected: /** Play a sound until it ends or is interrupted by a keypress. */ void playSoundFile(const Common::String &file, int16 frequency = 0, int16 repCount = 0, bool interruptible = true); + /** Beep the PC speaker. */ + void beep(int16 frequency, int32 length); + // -- Input -- -- cgit v1.2.3 From 943c6af82af9e14062c1aa1940aea2f625121368 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Jul 2012 00:47:03 +0200 Subject: GOB: Add the sounds in the Once Upon A Time character generator --- engines/gob/pregob/onceupon/chargenchild.cpp | 13 +++++++++++++ engines/gob/pregob/onceupon/chargenchild.h | 9 +++++++++ engines/gob/pregob/onceupon/onceupon.cpp | 24 ++++++++++++++++++++---- engines/gob/pregob/onceupon/onceupon.h | 1 + 4 files changed, 43 insertions(+), 4 deletions(-) diff --git a/engines/gob/pregob/onceupon/chargenchild.cpp b/engines/gob/pregob/onceupon/chargenchild.cpp index 7150c69b5f..ba099e4937 100644 --- a/engines/gob/pregob/onceupon/chargenchild.cpp +++ b/engines/gob/pregob/onceupon/chargenchild.cpp @@ -99,6 +99,19 @@ void CharGenChild::advance() { } } +CharGenChild::Sound CharGenChild::shouldPlaySound() const { + const uint16 anim = getAnimation(); + const uint16 frame = getFrame(); + + if (((anim == kAnimWalkLeft) || (anim == kAnimWalkRight)) && ((frame == 1) || (frame == 6))) + return kSoundWalk; + + if (((anim == kAnimJumpLeft) || (anim == kAnimJumpRight)) && (frame == 0)) + return kSoundJump; + + return kSoundNone; +} + } // End of namespace OnceUpon } // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/chargenchild.h b/engines/gob/pregob/onceupon/chargenchild.h index afbe3fd2fe..3b09ef112a 100644 --- a/engines/gob/pregob/onceupon/chargenchild.h +++ b/engines/gob/pregob/onceupon/chargenchild.h @@ -37,11 +37,20 @@ namespace OnceUpon { /** The child running around on the character generator screen. */ class CharGenChild : public ANIObject { public: + enum Sound { + kSoundNone = 0, + kSoundWalk , + kSoundJump + }; + CharGenChild(const ANIFile &ani); ~CharGenChild(); /** Advance the animation to the next frame. */ void advance(); + + /** Should we play a sound right now? */ + Sound shouldPlaySound() const; }; } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 7eef740139..f9e093374b 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -136,7 +136,8 @@ const OnceUpon::MenuButton OnceUpon::kLanguageButtons[] = { const char *OnceUpon::kSound[kSoundMAX] = { "diamant.snd", // kSoundClick - "cigogne.snd" // kSoundStork + "cigogne.snd", // kSoundStork + "saute.snd" // kSoundJump }; const OnceUpon::SectionFunc OnceUpon::kSectionFuncs[kSectionCount] = { @@ -1648,14 +1649,16 @@ OnceUpon::CharGenAction OnceUpon::characterGenerator() { charGenSetup(state); ANIFile ani(_vm, "ba.ani", 320); - ANIList anims; - - anims.push_back(new CharGenChild(ani)); ani.recolor(0x0F, 0x0C); ani.recolor(0x0E, 0x0A); ani.recolor(0x08, 0x09); + CharGenChild *child = new CharGenChild(ani); + + ANIList anims; + anims.push_back(child); + fadeOut(); _vm->_draw->forceBlit(); @@ -1733,6 +1736,9 @@ OnceUpon::CharGenAction OnceUpon::characterGenerator() { } if (mouseButtons == kMouseButtonsLeft) { + stopSound(); + playSound(kSoundClick); + int trousers = checkButton(kCharGenTrousersButtons, ARRAYSIZE(kCharGenTrousersButtons), mouseX, mouseY); if ((state == kCharGenStateTrousers) && (trousers >= 0)) { _colorTrousers = trousers; @@ -1777,6 +1783,16 @@ OnceUpon::CharGenAction OnceUpon::characterGenerator() { } drawAnim(anims); + + // Play the child sounds + CharGenChild::Sound childSound = child->shouldPlaySound(); + if (childSound == CharGenChild::kSoundWalk) { + beep(50, 10); + } else if (childSound == CharGenChild::kSoundJump) { + stopSound(); + playSound(kSoundJump); + } + showCursor(); fadeIn(); diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 80fcba35bd..d2e1feb604 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -136,6 +136,7 @@ private: enum Sound { kSoundClick = 0, kSoundStork , + kSoundJump , kSoundMAX }; -- cgit v1.2.3 From 4bc80cd8810b4d328103e8bac75055a841b22d82 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Jul 2012 01:00:48 +0200 Subject: GOB: Allow spaces in the Once Upon A Time character generator --- engines/gob/pregob/onceupon/onceupon.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index f9e093374b..abee238d34 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -1599,6 +1599,9 @@ bool OnceUpon::enterString(Common::String &name, int16 key, uint maxLength, cons return true; } + if (key == kKeySpace) + key = ' '; + if ((key >= ' ') && (key <= 0xFF)) { if (name.size() >= maxLength) return false; @@ -1727,6 +1730,7 @@ OnceUpon::CharGenAction OnceUpon::characterGenerator() { } if ((key == kKeyReturn) && !_name.empty()) { + _name.trim(); _name.setChar(Util::toCP850Upper(_name[0]), 0); state = kCharGenStateSure; -- cgit v1.2.3 From 734329dcc10e5d22da716484034c78f8bea927c5 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Jul 2012 15:37:24 +0200 Subject: GOB: Name the Once Upon A Time frame a bit more --- engines/gob/pregob/onceupon/onceupon.cpp | 45 +++++++++++++++++++------------- engines/gob/pregob/onceupon/onceupon.h | 14 +++++----- 2 files changed, 35 insertions(+), 24 deletions(-) diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index abee238d34..7f59790d1d 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -143,17 +143,17 @@ const char *OnceUpon::kSound[kSoundMAX] = { const OnceUpon::SectionFunc OnceUpon::kSectionFuncs[kSectionCount] = { &OnceUpon::sectionStork, &OnceUpon::sectionChapter1, - &OnceUpon::section02, + &OnceUpon::sectionParents, &OnceUpon::sectionChapter2, - &OnceUpon::section04, + &OnceUpon::sectionForest0, &OnceUpon::sectionChapter3, - &OnceUpon::section06, + &OnceUpon::sectionEvilCastle, &OnceUpon::sectionChapter4, - &OnceUpon::section08, + &OnceUpon::sectionForest1, &OnceUpon::sectionChapter5, - &OnceUpon::section10, + &OnceUpon::sectionBossFight, &OnceUpon::sectionChapter6, - &OnceUpon::section12, + &OnceUpon::sectionForest2, &OnceUpon::sectionChapter7, &OnceUpon::sectionEnd }; @@ -230,6 +230,13 @@ void OnceUpon::init() { // Default name _name = "Nemo"; + + // Default character properties + _house = 0; + _head = 0; + _colorHair = 0; + _colorJacket = 0; + _colorTrousers = 0; } void OnceUpon::deinit() { @@ -1403,6 +1410,8 @@ bool OnceUpon::sectionStork() { int house = checkButton(param.houses, param.houseCount, mouseX, mouseY); if ((state == kStorkStateWaitUser) && (house >= 0)) { + _house = house; + stork->dropBundle(param.drops[house]); state = kStorkStateWaitBundle; @@ -1819,8 +1828,8 @@ bool OnceUpon::sectionChapter1() { return true; } -bool OnceUpon::section02() { - warning("OnceUpon::section02(): TODO"); +bool OnceUpon::sectionParents() { + warning("OnceUpon::sectionParents(): TODO"); return true; } @@ -1829,8 +1838,8 @@ bool OnceUpon::sectionChapter2() { return true; } -bool OnceUpon::section04() { - warning("OnceUpon::section04(): TODO"); +bool OnceUpon::sectionForest0() { + warning("OnceUpon::sectionForest0(): TODO"); return true; } @@ -1839,8 +1848,8 @@ bool OnceUpon::sectionChapter3() { return true; } -bool OnceUpon::section06() { - warning("OnceUpon::section06(): TODO"); +bool OnceUpon::sectionEvilCastle() { + warning("OnceUpon::sectionEvilCastle(): TODO"); return true; } @@ -1849,8 +1858,8 @@ bool OnceUpon::sectionChapter4() { return true; } -bool OnceUpon::section08() { - warning("OnceUpon::section08(): TODO"); +bool OnceUpon::sectionForest1() { + warning("OnceUpon::sectionForest1(): TODO"); return true; } @@ -1859,8 +1868,8 @@ bool OnceUpon::sectionChapter5() { return true; } -bool OnceUpon::section10() { - warning("OnceUpon::section10(): TODO"); +bool OnceUpon::sectionBossFight() { + warning("OnceUpon::sectionBossFight(): TODO"); return true; } @@ -1869,8 +1878,8 @@ bool OnceUpon::sectionChapter6() { return true; } -bool OnceUpon::section12() { - warning("OnceUpon::section12(): TODO"); +bool OnceUpon::sectionForest2() { + warning("OnceUpon::sectionForest2(): TODO"); return true; } diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index d2e1feb604..2f25060a37 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -297,17 +297,17 @@ private: bool sectionStork(); bool sectionChapter1(); - bool section02(); + bool sectionParents(); bool sectionChapter2(); - bool section04(); + bool sectionForest0(); bool sectionChapter3(); - bool section06(); + bool sectionEvilCastle(); bool sectionChapter4(); - bool section08(); + bool sectionForest1(); bool sectionChapter5(); - bool section10(); + bool sectionBossFight(); bool sectionChapter6(); - bool section12(); + bool sectionForest2(); bool sectionChapter7(); bool sectionEnd(); @@ -337,6 +337,8 @@ private: Common::String _name; ///< The name of the child. + uint8 _house; + uint8 _head; uint8 _colorHair; uint8 _colorJacket; -- cgit v1.2.3 From f4cd726802732f7f0990eb213c2c9d16da217eec Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Jul 2012 20:08:24 +0200 Subject: GOB: Add a class handling simple SEQ files --- engines/gob/module.mk | 1 + engines/gob/pregob/seqfile.cpp | 384 +++++++++++++++++++++++++++++++++++++++++ engines/gob/pregob/seqfile.h | 193 +++++++++++++++++++++ 3 files changed, 578 insertions(+) create mode 100644 engines/gob/pregob/seqfile.cpp create mode 100644 engines/gob/pregob/seqfile.h diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 4858e97c60..04e55dcf16 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -81,6 +81,7 @@ MODULE_OBJS := \ pregob/pregob.o \ pregob/txtfile.o \ pregob/gctfile.o \ + pregob/seqfile.o \ pregob/onceupon/onceupon.o \ pregob/onceupon/abracadabra.o \ pregob/onceupon/babayaga.o \ diff --git a/engines/gob/pregob/seqfile.cpp b/engines/gob/pregob/seqfile.cpp new file mode 100644 index 0000000000..91973bbb85 --- /dev/null +++ b/engines/gob/pregob/seqfile.cpp @@ -0,0 +1,384 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/str.h" +#include "common/stream.h" + +#include "gob/gob.h" +#include "gob/dataio.h" +#include "gob/draw.h" +#include "gob/decfile.h" +#include "gob/anifile.h" +#include "gob/aniobject.h" + +#include "gob/pregob/seqfile.h" + +namespace Gob { + +SEQFile::SEQFile(GobEngine *vm, const Common::String &fileName) : _vm(vm) { + for (uint i = 0; i < kObjectCount; i++) + _objects[i].object = 0; + + Common::SeekableReadStream *seq = _vm->_dataIO->getFile(Util::setExtension(fileName, ".SEQ")); + if (!seq) { + warning("SEQFile::SEQFile(): No such file \"%s\"", fileName.c_str()); + return; + } + + load(*seq); + + delete seq; +} + +SEQFile::~SEQFile() { + for (uint i = 0; i < kObjectCount; i++) + delete _objects[i].object; + + for (Backgrounds::iterator b = _backgrounds.begin(); b != _backgrounds.end(); ++b) + delete *b; + + for (Animations::iterator a = _animations.begin(); a != _animations.end(); ++a) + delete *a; +} + +void SEQFile::load(Common::SeekableReadStream &seq) { + const uint16 decCount = (uint16)seq.readByte() + 1; + const uint16 aniCount = (uint16)seq.readByte() + 1; + + // Load backgrounds + _backgrounds.reserve(decCount); + for (uint i = 0; i < decCount; i++) { + const Common::String dec = Util::readString(seq, 13); + + if (!_vm->_dataIO->hasFile(dec)) { + warning("SEQFile::load(): No such background \"%s\"", dec.c_str()); + return; + } + + _backgrounds.push_back(new DECFile(_vm, dec, 320, 200)); + } + + // Load animations + _animations.reserve(aniCount); + for (uint i = 0; i < aniCount; i++) { + const Common::String ani = Util::readString(seq, 13); + + if (!_vm->_dataIO->hasFile(ani)) { + warning("SEQFile::load(): No such animation \"%s\"", ani.c_str()); + return; + } + + _animations.push_back(new ANIFile(_vm, ani)); + } + + _frameRate = seq.readUint16LE(); + + // Load background change keys + + const uint16 bgKeyCount = seq.readUint16LE(); + _bgKeys.resize(bgKeyCount); + + for (uint16 i = 0; i < bgKeyCount; i++) { + const uint16 frame = seq.readUint16LE(); + const uint16 index = seq.readUint16LE(); + + _bgKeys[i].frame = frame; + _bgKeys[i].background = index < _backgrounds.size() ? _backgrounds[index] : 0; + } + + // Load animation keys for all 4 objects + + for (uint i = 0; i < kObjectCount; i++) { + const uint16 animKeyCount = seq.readUint16LE(); + _animKeys.reserve(_animKeys.size() + animKeyCount); + + for (uint16 j = 0; j < animKeyCount; j++) { + _animKeys.push_back(AnimationKey()); + + const uint16 frame = seq.readUint16LE(); + const uint16 index = seq.readUint16LE(); + + uint16 animation; + const ANIFile *ani = findANI(index, animation); + + _animKeys.back().object = i; + _animKeys.back().frame = frame; + _animKeys.back().ani = ani; + _animKeys.back().animation = animation; + _animKeys.back().x = seq.readSint16LE(); + _animKeys.back().y = seq.readSint16LE(); + _animKeys.back().order = seq.readSint16LE(); + } + } + +} + +const ANIFile *SEQFile::findANI(uint16 index, uint16 &animation) { + animation = 0xFFFF; + + // 0xFFFF = remove animation + if (index == 0xFFFF) + return 0; + + for (Animations::const_iterator a = _animations.begin(); a != _animations.end(); ++a) { + if (index < (*a)->getAnimationCount()) { + animation = index; + return *a; + } + + index -= (*a)->getAnimationCount(); + } + + return 0; +} + +void SEQFile::play(bool abortable, uint16 endFrame, uint16 frameRate) { + if (_bgKeys.empty() && _animKeys.empty()) + // Nothing to do + return; + + // Init + + _frame = 0; + _abortPlay = false; + + for (uint i = 0; i < kObjectCount; i++) { + delete _objects[i].object; + + _objects[i].object = 0; + _objects[i].order = 0; + } + + for (Loops::iterator l = _loops.begin(); l != _loops.end(); ++l) + l->currentLoop = 0; + + // Set the frame rate + + int16 frameRateBack = _vm->_util->getFrameRate(); + + if (frameRate == 0) + frameRate = _frameRate; + + _vm->_util->setFrameRate(frameRate); + + _abortable = abortable; + + while (!_vm->shouldQuit() && !_abortPlay) { + // Handle the frame contents + playFrame(); + + // Handle extra frame events + handleFrameEvent(); + + // Wait for the frame to end + _vm->_draw->blitInvalidated(); + _vm->_util->waitEndFrame(); + + // Handle input + + _vm->_util->processInput(); + + int16 key = _vm->_util->checkKey(); + + int16 mouseX, mouseY; + MouseButtons mouseButtons; + _vm->_util->getMouseState(&mouseX, &mouseY, &mouseButtons); + _vm->_util->forceMouseUp(); + + handleInput(key, mouseX, mouseY, mouseButtons); + + // Loop + + bool looped = false; + for (Loops::iterator l = _loops.begin(); l != _loops.end(); ++l) { + if ((l->endFrame == _frame) && (l->currentLoop < l->loopCount)) { + _frame = l->startFrame; + + l->currentLoop++; + looped = true; + } + } + + // If we didn't loop, advance the frame and look if we should end here + + if (!looped) { + _frame++; + if (_frame >= endFrame) + break; + } + } + + // Restore the frame rate + _vm->_util->setFrameRate(frameRateBack); +} + +void SEQFile::playFrame() { + // Remove the current animation frames + clearAnims(); + + // Handle background keys, directly updating the background + for (BackgroundKeys::const_iterator b = _bgKeys.begin(); b != _bgKeys.end(); ++b) { + if (!b->background || (b->frame != _frame)) + continue; + + b->background->draw(*_vm->_draw->_backSurface); + + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, 0, 0, 319, 199); + } + + // Handle the animation keys, updating the objects + for (AnimationKeys::const_iterator a = _animKeys.begin(); a != _animKeys.end(); ++a) { + if (a->frame != _frame) + continue; + + Object &object = _objects[a->object]; + + delete object.object; + object.object = 0; + + // No valid animation => remove + if ((a->animation == 0xFFFF) || !a->ani) + continue; + + // Change the animation + + object.object = new ANIObject(*a->ani); + + object.object->setAnimation(a->animation); + object.object->setPosition(a->x, a->y); + object.object->setVisible(true); + object.object->setPause(false); + + object.order = a->order; + } + + // Draw the animations + drawAnims(); +} + +// NOTE: This is really not at all efficient. However, since there's only a +// small number of objects, it should matter. We really do need a stable +// sort, though, so Common::sort() is out. +SEQFile::Objects SEQFile::getOrderedObjects() { + int16 minOrder = (int16)0x7FFF; + int16 maxOrder = (int16)0x8000; + + Objects objects; + + // Find the span of order values + for (uint i = 0; i < kObjectCount; i++) { + if (!_objects[i].object) + continue; + + minOrder = MIN(minOrder, _objects[i].order); + maxOrder = MAX(maxOrder, _objects[i].order); + } + + // Stably sort the objects by order value + for (int16 o = minOrder; o <= maxOrder; o++) + for (uint i = 0; i < kObjectCount; i++) + if (_objects[i].object && (_objects[i].order == o)) + objects.push_back(_objects[i]); + + return objects; +} + +void SEQFile::clearAnims() { + Objects objects = getOrderedObjects(); + + // Remove the animation frames, in reverse drawing order + for (Objects::iterator o = objects.reverse_begin(); o != objects.end(); --o) { + int16 left, top, right, bottom; + + if (o->object->clear(*_vm->_draw->_backSurface, left, top, right, bottom)) + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + } +} + +void SEQFile::drawAnims() { + Objects objects = getOrderedObjects(); + + // Draw the animation frames and advance the animation + for (Objects::iterator o = objects.begin(); o != objects.end(); ++o) { + int16 left, top, right, bottom; + + if (o->object->draw(*_vm->_draw->_backSurface, left, top, right, bottom)) + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + + o->object->advance(); + } +} + +uint16 SEQFile::getFrame() const { + return _frame; +} + +void SEQFile::seekFrame(uint16 frame) { + _frame = frame; +} + +uint SEQFile::addLoop(uint16 startFrame, uint16 endFrame, uint16 loopCount) { + _loops.resize(_loops.size() + 1); + + _loops.back().startFrame = startFrame; + _loops.back().endFrame = endFrame; + _loops.back().loopCount = loopCount; + _loops.back().currentLoop = 0; + _loops.back().empty = false; + + return _loops.size() - 1; +} + +void SEQFile::skipLoop(uint loopID) { + if (loopID >= _loops.size()) + return; + + _loops[loopID].currentLoop = 0xFFFF; +} + +void SEQFile::delLoop(uint loopID) { + if (loopID >= _loops.size()) + return; + + _loops[loopID].empty = true; + + cleanLoops(); +} + +void SEQFile::cleanLoops() { + while (!_loops.empty() && _loops.back().empty) + _loops.pop_back(); +} + +void SEQFile::abortPlay() { + _abortPlay = true; +} + +void SEQFile::handleFrameEvent() { +} + +void SEQFile::handleInput(int16 key, int16 mouseX, int16 mouseY, MouseButtons mouseButtons) { + if (_abortable && ((key != 0) || (mouseButtons != kMouseButtonsNone))) + abortPlay(); +} + +} // End of namespace Gob diff --git a/engines/gob/pregob/seqfile.h b/engines/gob/pregob/seqfile.h new file mode 100644 index 0000000000..5e12962ef9 --- /dev/null +++ b/engines/gob/pregob/seqfile.h @@ -0,0 +1,193 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_PREGOB_SEQFILE_H +#define GOB_PREGOB_SEQFILE_H + +#include "common/system.h" +#include "common/array.h" +#include "common/list.h" + +#include "gob/util.h" + +namespace Common { + class String; + class SeekableReadStream; +} + +namespace Gob { + +class GobEngine; + +class DECFile; +class ANIFile; +class ANIObject; + +/** A SEQ file, describing a complex animation sequence. + * + * Used in early hardcoded gob games. + * The principle is similar to the Mult class (see mult.h), but instead + * of depending on all the externally loaded animations, backgrounds and + * objects, a SEQ file references animation and background directly by + * filename. + */ +class SEQFile { +public: + SEQFile(GobEngine *vm, const Common::String &fileName); + virtual ~SEQFile(); + + /** Play the SEQ. + * + * @param abortable If true, end playback on any user input. + * @param endFrame The frame on where to end, or 0xFFFF for infinite playback. + * @param frameRate The frame rate at which to play the SEQ, or 0 for playing at + * the speed the SEQ itself wants to. + */ + void play(bool abortable = true, uint16 endFrame = 0xFFFF, uint16 frameRate = 0); + + +protected: + GobEngine *_vm; + + + /** Returns the current frame number. */ + uint16 getFrame() const; + + /** Seek to a specific frame. */ + void seekFrame(uint16 frame); + + /** Add a frame loop. */ + uint addLoop(uint16 startFrame, uint16 endFrame, uint16 loopCount); + + /** Skip a frame loop. */ + void skipLoop(uint loopID); + + /** Delete a frame loop. */ + void delLoop(uint loopID); + + /** Ends SEQ playback. */ + void abortPlay(); + + /** Callback for special frame events. */ + virtual void handleFrameEvent(); + /** Callback for special user input handling. */ + virtual void handleInput(int16 key, int16 mouseX, int16 mouseY, MouseButtons mouseButtons); + + +private: + /** Number of animation objects that are visible at the same time. */ + static const uint kObjectCount = 4; + + /** A key for changing the background. */ + struct BackgroundKey { + uint16 frame; ///< Frame the change is to happen. + + const DECFile *background; ///< The background to use. + }; + + /** A key for playing an object animation. */ + struct AnimationKey { + uint object; ///< The object this key belongs to. + + uint16 frame; ///< Frame the change is to happen. + + const ANIFile *ani; ///< The ANI to use. + + uint16 animation; ///< The animation to use. + + int16 x; ///< X position of the animation. + int16 y; ///< Y position of the animation. + + int16 order; ///< Used to determine in which order to draw the objects. + }; + + /** A managed animation object. */ + struct Object { + ANIObject *object; ///< The actual animation object. + + int16 order; ///< The current drawing order. + }; + + /** A frame loop. */ + struct Loop { + uint16 startFrame; + uint16 endFrame; + + uint16 loopCount; + uint16 currentLoop; + + bool empty; + }; + + typedef Common::Array Backgrounds; + typedef Common::Array Animations; + + typedef Common::Array BackgroundKeys; + typedef Common::Array AnimationKeys; + + typedef Common::List Objects; + + typedef Common::Array Loops; + + + uint16 _frame; ///< The current frame. + bool _abortPlay; ///< Was the end of the playback requested? + + uint16 _frameRate; + + Backgrounds _backgrounds; ///< All backgrounds in this SEQ. + Animations _animations; ///< All animations in this SEQ. + + BackgroundKeys _bgKeys; ///< The background change keyframes. + AnimationKeys _animKeys; ///< The animation change keyframes. + + Object _objects[kObjectCount]; ///< The managed animation objects. + + Loops _loops; + + /** Whether the playback should be abortable by user input. */ + bool _abortable; + + + // -- Loading helpers -- + + void load(Common::SeekableReadStream &seq); + + const ANIFile *findANI(uint16 index, uint16 &animation); + + // -- Playback helpers -- + + void playFrame(); + + /** Get a list of objects ordered by drawing order. */ + Objects getOrderedObjects(); + + void clearAnims(); ///< Remove all animation frames. + void drawAnims(); ///< Draw the animation frames. + + /** Look if we can compact the loop array. */ + void cleanLoops(); +}; + +} // End of namespace Gob + +#endif // GOB_PREGOB_SEQFILE_H -- cgit v1.2.3 From 850472f21e73280c0bf35c76163419a7e280fea2 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Jul 2012 20:11:06 +0200 Subject: GOB: Implement the proper Once Upon A Time title sequence --- engines/gob/module.mk | 1 + engines/gob/pregob/onceupon/onceupon.cpp | 88 +---------------------- engines/gob/pregob/onceupon/onceupon.h | 10 +-- engines/gob/pregob/onceupon/title.cpp | 117 +++++++++++++++++++++++++++++++ engines/gob/pregob/onceupon/title.h | 55 +++++++++++++++ 5 files changed, 177 insertions(+), 94 deletions(-) create mode 100644 engines/gob/pregob/onceupon/title.cpp create mode 100644 engines/gob/pregob/onceupon/title.h diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 04e55dcf16..489afe509e 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -85,6 +85,7 @@ MODULE_OBJS := \ pregob/onceupon/onceupon.o \ pregob/onceupon/abracadabra.o \ pregob/onceupon/babayaga.o \ + pregob/onceupon/title.o \ pregob/onceupon/stork.o \ pregob/onceupon/chargenchild.o \ minigames/geisha/evilfish.o \ diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 7f59790d1d..6ee391ea7f 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -37,6 +37,7 @@ #include "gob/pregob/onceupon/onceupon.h" #include "gob/pregob/onceupon/palettes.h" +#include "gob/pregob/onceupon/title.h" #include "gob/pregob/onceupon/chargenchild.h" static const uint kLanguageCount = 5; @@ -657,94 +658,11 @@ const PreGob::AnimProperties OnceUpon::kTitleAnimation = { }; void OnceUpon::showTitle() { - // Show the Once Upon A Time title animation - // NOTE: This is currently only a mock-up. The real animation is in "ville.seq". - fadeOut(); setGamePalette(10); - warning("OnceUpon::showTitle(): Actually play the SEQ"); - - clearScreen(); - - _vm->_video->drawPackedSprite("ville.cmp", *_vm->_draw->_backSurface); - _vm->_draw->forceBlit(); - - ANIFile ani (_vm, "pres.ani", 320); - ANIList anims; - - loadAnims(anims, ani, 1, &kTitleAnimation); - - playTitleMusic(); - - while (!_vm->shouldQuit()) { - redrawAnim(anims); - - fadeIn(); - - endFrame(true); - - if (hasInput()) - break; - } - - freeAnims(anims); - - fadeOut(); - stopTitleMusic(); -} - -void OnceUpon::playTitleMusic() { - // Look at what platform this is and play the appropriate music type - - if (_vm->getPlatform() == Common::kPlatformPC) - playTitleMusicDOS(); - else if (_vm->getPlatform() == Common::kPlatformAmiga) - playTitleMusicAmiga(); - else if (_vm->getPlatform() == Common::kPlatformAtariST) - playTitleMusicAtariST(); -} - -void OnceUpon::playTitleMusicDOS() { - // Play an AdLib track - - _vm->_sound->adlibLoadTBR("babayaga.tbr"); - _vm->_sound->adlibLoadMDY("babayaga.mdy"); - _vm->_sound->adlibSetRepeating(-1); - _vm->_sound->adlibPlay(); -} - -void OnceUpon::playTitleMusicAmiga() { - // Play a Protracker track - - _vm->_sound->protrackerPlay("mod.babayaga"); -} - -void OnceUpon::playTitleMusicAtariST() { - // Play a Soundblaster composition - - static const int16 titleMusic[21] = { 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, -1}; - static const char * const titleFiles[ 3] = {"baba1.snd", "baba2.snd", "baba3.snd"}; - - for (uint i = 0; i < ARRAYSIZE(titleFiles); i++) - _vm->_sound->sampleLoad(_vm->_sound->sampleGetBySlot(i), SOUND_SND, titleFiles[i]); - - _vm->_sound->blasterPlayComposition(titleMusic, 0); - _vm->_sound->blasterRepeatComposition(-1); -} - -void OnceUpon::stopTitleMusic() { - // Just stop everything - - _vm->_sound->adlibSetRepeating(0); - _vm->_sound->blasterRepeatComposition(0); - - _vm->_sound->adlibStop(); - _vm->_sound->blasterStopComposition(); - _vm->_sound->protrackerStop(); - - for (int i = 0; i < ::Gob::Sound::kSoundsCount; i++) - _vm->_sound->sampleFree(_vm->_sound->sampleGetBySlot(i)); + Title title(_vm); + title.play(); } void OnceUpon::showChapter(int chapter) { diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 2f25060a37..41a2f5668d 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -237,15 +237,6 @@ private: void handleAnimalNames(uint count, const MenuButton *buttons, const char * const *names); - // -- Title music helpers -- - - void playTitleMusic(); ///< Play the title music. - void playTitleMusicDOS(); ///< Play the title music of the DOS version. - void playTitleMusicAmiga(); ///< Play the title music of the Amiga version. - void playTitleMusicAtariST(); ///< Play the title music of the Atari ST version. - void stopTitleMusic(); ///< Stop the title music. - - // -- Menu helpers -- MenuAction handleStartMenu(const MenuButton *animalsButton); ///< Handle the start menu. @@ -291,6 +282,7 @@ private: /** Play / Display the name of an animal in one language. */ void anPlayAnimalName(const Common::String &animal, uint language); + // -- Game sections -- bool playSection(); diff --git a/engines/gob/pregob/onceupon/title.cpp b/engines/gob/pregob/onceupon/title.cpp new file mode 100644 index 0000000000..5163ff6822 --- /dev/null +++ b/engines/gob/pregob/onceupon/title.cpp @@ -0,0 +1,117 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "gob/gob.h" +#include "gob/global.h" +#include "gob/palanim.h" +#include "gob/draw.h" + +#include "gob/sound/sound.h" + +#include "gob/pregob/onceupon/title.h" + +namespace Gob { + +namespace OnceUpon { + +Title::Title(GobEngine *vm) : SEQFile(vm, "ville.seq") { +} + +Title::~Title() { +} + +void Title::play() { + SEQFile::play(true, 0xFFFF, 15); + + // After playback, fade out and stop the music + if (!_vm->shouldQuit()) + _vm->_palAnim->fade(0, 0, 0); + + stopMusic(); +} + +void Title::handleFrameEvent() { + // On fame 0, start the music and fade in + if (getFrame() == 0) { + playMusic(); + + _vm->_draw->forceBlit(); + _vm->_palAnim->fade(_vm->_global->_pPaletteDesc, 0, 0); + } +} + +void Title::playMusic() { + // Look at what platform this is and play the appropriate music type + + if (_vm->getPlatform() == Common::kPlatformPC) + playMusicDOS(); + else if (_vm->getPlatform() == Common::kPlatformAmiga) + playMusicAmiga(); + else if (_vm->getPlatform() == Common::kPlatformAtariST) + playMusicAtariST(); +} + +void Title::playMusicDOS() { + // Play an AdLib track + + _vm->_sound->adlibLoadTBR("babayaga.tbr"); + _vm->_sound->adlibLoadMDY("babayaga.mdy"); + _vm->_sound->adlibSetRepeating(-1); + _vm->_sound->adlibPlay(); +} + +void Title::playMusicAmiga() { + // Play a Protracker track + + _vm->_sound->protrackerPlay("mod.babayaga"); +} + +void Title::playMusicAtariST() { + // Play a Soundblaster composition + + static const int16 titleMusic[21] = { 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, -1}; + static const char * const titleFiles[ 3] = {"baba1.snd", "baba2.snd", "baba3.snd"}; + + for (uint i = 0; i < ARRAYSIZE(titleFiles); i++) + _vm->_sound->sampleLoad(_vm->_sound->sampleGetBySlot(i), SOUND_SND, titleFiles[i]); + + _vm->_sound->blasterPlayComposition(titleMusic, 0); + _vm->_sound->blasterRepeatComposition(-1); +} + +void Title::stopMusic() { + // Just stop everything + + _vm->_sound->adlibSetRepeating(0); + _vm->_sound->blasterRepeatComposition(0); + + _vm->_sound->adlibStop(); + _vm->_sound->blasterStopComposition(); + _vm->_sound->protrackerStop(); + + for (int i = 0; i < ::Gob::Sound::kSoundsCount; i++) + _vm->_sound->sampleFree(_vm->_sound->sampleGetBySlot(i)); +} + +} // End of namespace OnceUpon + +} // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/title.h b/engines/gob/pregob/onceupon/title.h new file mode 100644 index 0000000000..5e7ef76d40 --- /dev/null +++ b/engines/gob/pregob/onceupon/title.h @@ -0,0 +1,55 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_PREGOB_ONCEUPON_TITLE_H +#define GOB_PREGOB_ONCEUPON_TITLE_H + +#include "gob/pregob/seqfile.h" + +namespace Gob { + +namespace OnceUpon { + +/** The Once Upon A Time title animation sequence. */ +class Title : public SEQFile { +public: + Title(GobEngine *vm); + ~Title(); + + void play(); + +protected: + void handleFrameEvent(); + +private: + void playMusic(); ///< Play the title music. + void playMusicDOS(); ///< Play the title music of the DOS version. + void playMusicAmiga(); ///< Play the title music of the Amiga version. + void playMusicAtariST(); ///< Play the title music of the Atari ST version. + void stopMusic(); ///< Stop the title music. +}; + +} // End of namespace OnceUpon + +} // End of namespace Gob + +#endif // GOB_PREGOB_ONCEUPON_TITLE_H -- cgit v1.2.3 From 3189729c972b5da1356497e82e08a21c94c8fbec Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Jul 2012 22:15:40 +0200 Subject: GOB: Don't leak in sampleLoad() when loading fails --- engines/gob/sound/sound.cpp | 11 +++++++---- engines/gob/sound/sound.h | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 69a668e5fb..63af6aeef4 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -109,7 +109,7 @@ int Sound::sampleGetNextFreeSlot() const { return -1; } -bool Sound::sampleLoad(SoundDesc *sndDesc, SoundType type, const char *fileName, bool tryExist) { +bool Sound::sampleLoad(SoundDesc *sndDesc, SoundType type, const char *fileName) { if (!sndDesc) return false; @@ -117,12 +117,15 @@ bool Sound::sampleLoad(SoundDesc *sndDesc, SoundType type, const char *fileName, int32 size; byte *data = _vm->_dataIO->getFile(fileName, size); - if (!data) { - warning("Can't open sample file \"%s\"", fileName); + + if (!data || !sndDesc->load(type, data, size)) { + delete data; + + warning("Sound::sampleLoad(): Failed to load sound \"%s\"", fileName); return false; } - return sndDesc->load(type, data, size); + return true; } void Sound::sampleFree(SoundDesc *sndDesc, bool noteAdLib, int index) { diff --git a/engines/gob/sound/sound.h b/engines/gob/sound/sound.h index 7beffb5dc7..bbc182d172 100644 --- a/engines/gob/sound/sound.h +++ b/engines/gob/sound/sound.h @@ -51,7 +51,7 @@ public: const SoundDesc *sampleGetBySlot(int slot) const; int sampleGetNextFreeSlot() const; - bool sampleLoad(SoundDesc *sndDesc, SoundType type, const char *fileName, bool tryExist = true); + bool sampleLoad(SoundDesc *sndDesc, SoundType type, const char *fileName); void sampleFree(SoundDesc *sndDesc, bool noteAdLib = false, int index = -1); -- cgit v1.2.3 From 25bc7467b444d78c64300af9786f08842de81313 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Jul 2012 22:25:51 +0200 Subject: GOB: Use Sound::sampleLoad in PreGob --- engines/gob/pregob/pregob.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/engines/gob/pregob/pregob.cpp b/engines/gob/pregob/pregob.cpp index 42b5a8fb9c..54eb3c6795 100644 --- a/engines/gob/pregob/pregob.cpp +++ b/engines/gob/pregob/pregob.cpp @@ -161,17 +161,7 @@ void PreGob::freeSounds() { } bool PreGob::loadSound(SoundDesc &sound, const Common::String &file) const { - int32 size; - byte *data = _vm->_dataIO->getFile(file, size); - - if (!data || !sound.load(SOUND_SND, data, size)) { - delete data; - - warning("PreGob::loadSound(): Failed to load sound \"%s\"", file.c_str()); - return false; - } - - return true; + return _vm->_sound->sampleLoad(&sound, SOUND_SND, file.c_str()); } void PreGob::playSound(uint sound, int16 frequency, int16 repCount) { -- cgit v1.2.3 From dd2768a2e47dd54f055cf65b2212ee9dca395c18 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 15 Jul 2012 17:06:56 +0200 Subject: GOB: Reorder a few things --- engines/gob/pregob/onceupon/onceupon.cpp | 8 ++--- engines/gob/pregob/onceupon/onceupon.h | 60 ++++++++++++++++---------------- engines/gob/pregob/onceupon/stork.h | 12 +++---- engines/gob/pregob/pregob.h | 13 +++---- 4 files changed, 47 insertions(+), 46 deletions(-) diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 6ee391ea7f..9d32eaa356 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -135,7 +135,7 @@ const OnceUpon::MenuButton OnceUpon::kLanguageButtons[] = { {true, 234, 138, 284, 173, 265, 55, 315, 90, 234, 138, 2} }; -const char *OnceUpon::kSound[kSoundMAX] = { +const char *OnceUpon::kSound[kSoundCount] = { "diamant.snd", // kSoundClick "cigogne.snd", // kSoundStork "saute.snd" // kSoundJump @@ -216,7 +216,7 @@ void OnceUpon::init() { // Load all our sounds and init the screen - loadSounds(kSound, kSoundMAX); + loadSounds(kSound, kSoundCount); initScreen(); // We start with an invalid palette @@ -226,7 +226,7 @@ void OnceUpon::init() { _quit = false; // We start with no selected difficulty and at section 0 - _difficulty = kDifficultyMAX; + _difficulty = kDifficultyCount; _section = 0; // Default name @@ -926,7 +926,7 @@ void OnceUpon::drawIngameMenu() { } void OnceUpon::drawMenuDifficulty() { - if (_difficulty == kDifficultyMAX) + if (_difficulty == kDifficultyCount) return; TXTFile *difficulties = loadTXT(getLocFile("diffic.tx"), TXTFile::kFormatStringPositionColor); diff --git a/engines/gob/pregob/onceupon/onceupon.h b/engines/gob/pregob/onceupon/onceupon.h index 41a2f5668d..66ef877618 100644 --- a/engines/gob/pregob/onceupon/onceupon.h +++ b/engines/gob/pregob/onceupon/onceupon.h @@ -129,7 +129,7 @@ private: kDifficultyBeginner = 0, kDifficultyIntermediate = 1, kDifficultyAdvanced = 2, - kDifficultyMAX + kDifficultyCount }; /** The different sounds common in the game. */ @@ -137,7 +137,7 @@ private: kSoundClick = 0, kSoundStork , kSoundJump , - kSoundMAX + kSoundCount }; /** Action the character generation wants us to take. */ @@ -181,7 +181,7 @@ private: static const MenuButton kCharGenNameEntry[]; /** All general game sounds we know about. */ - static const char *kSound[kSoundMAX]; + static const char *kSound[kSoundCount]; static const AnimProperties kClownAnimations[]; @@ -196,6 +196,33 @@ private: static const SectionFunc kSectionFuncs[kSectionCount]; + /** Did we open the game archives? */ + bool _openedArchives; + + // Fonts + Font *_jeudak; + Font *_lettre; + Font *_plettre; + Font *_glettre; + + /** The current palette. */ + int _palette; + + bool _quit; ///< Did the user request a normal game quit? + + Difficulty _difficulty; ///< The current difficulty. + int _section; ///< The current game section. + + Common::String _name; ///< The name of the child. + + uint8 _house; + + uint8 _head; + uint8 _colorHair; + uint8 _colorJacket; + uint8 _colorTrousers; + + // -- General helpers -- void setGamePalette(uint palette); ///< Set a game palette. @@ -308,33 +335,6 @@ private: void charGenDrawName(); static bool enterString(Common::String &name, int16 key, uint maxLength, const Font &font); - - - /** Did we open the game archives? */ - bool _openedArchives; - - // Fonts - Font *_jeudak; - Font *_lettre; - Font *_plettre; - Font *_glettre; - - /** The current palette. */ - int _palette; - - bool _quit; ///< Did the user request a normal game quit? - - Difficulty _difficulty; ///< The current difficulty. - int _section; ///< The current game section. - - Common::String _name; ///< The name of the child. - - uint8 _house; - - uint8 _head; - uint8 _colorHair; - uint8 _colorJacket; - uint8 _colorTrousers; }; } // End of namespace OnceUpon diff --git a/engines/gob/pregob/onceupon/stork.h b/engines/gob/pregob/onceupon/stork.h index d26a887c97..756f5258c7 100644 --- a/engines/gob/pregob/onceupon/stork.h +++ b/engines/gob/pregob/onceupon/stork.h @@ -79,12 +79,6 @@ private: }; - void setState(State state, uint16 anim); - void setState(State state, uint16 anim, int16 x); - - void dropBundle(State state, uint16 anim); - - GobEngine *_vm; Surface *_frame; @@ -94,6 +88,12 @@ private: bool _shouldDrop; BundleDrop _bundleDrop; + + + void setState(State state, uint16 anim); + void setState(State state, uint16 anim, int16 x); + + void dropBundle(State state, uint16 anim); }; } // End of namespace OnceUpon diff --git a/engines/gob/pregob/pregob.h b/engines/gob/pregob/pregob.h index da0de60dd8..632f85b88e 100644 --- a/engines/gob/pregob/pregob.h +++ b/engines/gob/pregob/pregob.h @@ -68,6 +68,9 @@ protected: static const char *kLanguageSuffixLong [5]; + GobEngine *_vm; + + // -- Graphics -- /** Initialize the game screen. */ @@ -174,18 +177,16 @@ protected: GCTFile *loadGCT(const Common::String &gctFile) const; - GobEngine *_vm; - private: - /** Load a sound file. */ - bool loadSound(SoundDesc &sound, const Common::String &file) const; - - /** Did we fade out? */ bool _fadedOut; /** All loaded sounds. */ Common::Array _sounds; + + + /** Load a sound file. */ + bool loadSound(SoundDesc &sound, const Common::String &file) const; }; } // End of namespace Gob -- cgit v1.2.3 From b001168658f57b845bae81df0ca85240c796e74e Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 15 Jul 2012 21:12:34 +0200 Subject: GOB: Implement the parents section in Once Upon A Time The text lines are not drawn completely correct yet, because apparently, GCTFile needs to wrap long lines. --- engines/gob/module.mk | 1 + engines/gob/pregob/onceupon/abracadabra.cpp | 8 +- engines/gob/pregob/onceupon/babayaga.cpp | 8 +- engines/gob/pregob/onceupon/onceupon.cpp | 13 +- engines/gob/pregob/onceupon/parents.cpp | 217 ++++++++++++++++++++++++++++ engines/gob/pregob/onceupon/parents.h | 94 ++++++++++++ 6 files changed, 332 insertions(+), 9 deletions(-) create mode 100644 engines/gob/pregob/onceupon/parents.cpp create mode 100644 engines/gob/pregob/onceupon/parents.h diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 489afe509e..d5ee6478be 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -86,6 +86,7 @@ MODULE_OBJS := \ pregob/onceupon/abracadabra.o \ pregob/onceupon/babayaga.o \ pregob/onceupon/title.o \ + pregob/onceupon/parents.o \ pregob/onceupon/stork.o \ pregob/onceupon/chargenchild.o \ minigames/geisha/evilfish.o \ diff --git a/engines/gob/pregob/onceupon/abracadabra.cpp b/engines/gob/pregob/onceupon/abracadabra.cpp index 0d644d9056..2cf6855ef8 100644 --- a/engines/gob/pregob/onceupon/abracadabra.cpp +++ b/engines/gob/pregob/onceupon/abracadabra.cpp @@ -80,10 +80,10 @@ const char *Abracadabra::kAnimalNames[] = { // The houses where the stork can drop a bundle const OnceUpon::MenuButton Abracadabra::kStorkHouses[] = { - {false, 16, 80, 87, 125, 0, 0, 0, 0, 0, 0, 0}, - {false, 61, 123, 96, 149, 0, 0, 0, 0, 0, 0, 1}, - {false, 199, 118, 226, 137, 0, 0, 0, 0, 0, 0, 2}, - {false, 229, 91, 304, 188, 0, 0, 0, 0, 0, 0, 3} + {false, 16, 80, 87, 125, 0, 0, 0, 0, 0, 0, 0}, // Castle , Lord & Lady + {false, 61, 123, 96, 149, 0, 0, 0, 0, 0, 0, 1}, // Cottage, Farmers + {false, 199, 118, 226, 137, 0, 0, 0, 0, 0, 0, 2}, // Hut , Woodcutters + {false, 229, 91, 304, 188, 0, 0, 0, 0, 0, 0, 3} // Palace , King & Queen }; // The stork bundle drop parameters diff --git a/engines/gob/pregob/onceupon/babayaga.cpp b/engines/gob/pregob/onceupon/babayaga.cpp index 6aa60310b5..ef56b9dd0b 100644 --- a/engines/gob/pregob/onceupon/babayaga.cpp +++ b/engines/gob/pregob/onceupon/babayaga.cpp @@ -80,10 +80,10 @@ const char *BabaYaga::kAnimalNames[] = { // The houses where the stork can drop a bundle const OnceUpon::MenuButton BabaYaga::kStorkHouses[] = { - {false, 16, 80, 87, 125, 0, 0, 0, 0, 0, 0, 0}, - {false, 61, 123, 96, 149, 0, 0, 0, 0, 0, 0, 1}, - {false, 199, 118, 226, 137, 0, 0, 0, 0, 0, 0, 2}, - {false, 229, 91, 304, 188, 0, 0, 0, 0, 0, 0, 3} + {false, 16, 80, 87, 125, 0, 0, 0, 0, 0, 0, 0}, // Castle , Lord & Lady + {false, 61, 123, 96, 149, 0, 0, 0, 0, 0, 0, 1}, // Cottage, Farmers + {false, 199, 118, 226, 137, 0, 0, 0, 0, 0, 0, 2}, // Hut , Woodcutters + {false, 229, 91, 304, 188, 0, 0, 0, 0, 0, 0, 3} // Palace , King & Queen }; // The stork bundle drop parameters diff --git a/engines/gob/pregob/onceupon/onceupon.cpp b/engines/gob/pregob/onceupon/onceupon.cpp index 9d32eaa356..e4c2df34c0 100644 --- a/engines/gob/pregob/onceupon/onceupon.cpp +++ b/engines/gob/pregob/onceupon/onceupon.cpp @@ -38,6 +38,7 @@ #include "gob/pregob/onceupon/onceupon.h" #include "gob/pregob/onceupon/palettes.h" #include "gob/pregob/onceupon/title.h" +#include "gob/pregob/onceupon/parents.h" #include "gob/pregob/onceupon/chargenchild.h" static const uint kLanguageCount = 5; @@ -1747,7 +1748,17 @@ bool OnceUpon::sectionChapter1() { } bool OnceUpon::sectionParents() { - warning("OnceUpon::sectionParents(): TODO"); + fadeOut(); + setGamePalette(14); + clearScreen(); + + const Common::String seq = ((_house == 1) || (_house == 2)) ? "parents.seq" : "parents2.seq"; + const Common::String gct = getLocFile("mefait.gc"); + + Parents parents(_vm, seq, gct, _name, _house, *_plettre, kGamePalettes[14], kGamePalettes[13], kPaletteSize); + parents.play(); + + warning("OnceUpon::sectionParents(): TODO: Item search"); return true; } diff --git a/engines/gob/pregob/onceupon/parents.cpp b/engines/gob/pregob/onceupon/parents.cpp new file mode 100644 index 0000000000..cdaee6a38d --- /dev/null +++ b/engines/gob/pregob/onceupon/parents.cpp @@ -0,0 +1,217 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "gob/gob.h" +#include "gob/global.h" +#include "gob/dataio.h" +#include "gob/palanim.h" +#include "gob/draw.h" +#include "gob/video.h" + +#include "gob/sound/sound.h" + +#include "gob/pregob/gctfile.h" + +#include "gob/pregob/onceupon/palettes.h" +#include "gob/pregob/onceupon/parents.h" + +namespace Gob { + +namespace OnceUpon { + +const char *Parents::kSound[kSoundCount] = { + "rire.snd", // kSoundCackle + "tonn.snd" // kSoundThunder +}; + +// So that every GCT line is displayed for 12 seconds +const uint16 Parents::kLoop[kLoopCount][3] = { + { 72, 77, 33}, + {105, 109, 38}, + {141, 145, 38}, + {446, 454, 23}, + {456, 464, 23}, + {466, 474, 23}, + {476, 484, 23} +}; + + +Parents::Parents(GobEngine *vm, const Common::String &seq, const Common::String &gct, + const Common::String &childName, uint8 house, const Font &font, + const byte *normalPalette, const byte *brightPalette, uint paletteSize) : + SEQFile(vm, seq), + _gct(0), _house(house), _font(&font), + _paletteSize(paletteSize), _normalPalette(normalPalette), _brightPalette(brightPalette) { + + // Load sounds + for (int i = 0; i < kSoundCount; i++) + _vm->_sound->sampleLoad(&_sounds[i], SOUND_SND, kSound[i]); + + // Load GCT + Common::SeekableReadStream *gctStream = _vm->_dataIO->getFile(gct); + if (gctStream) { + _gct = new GCTFile(*gctStream, _vm->_rnd); + + delete gctStream; + } else + error("Parents::Parents(): Failed to open \"%s\"", gct.c_str()); + + _gct->setArea(17, 18, 303, 41); + _gct->setText(1, childName); + + _gct->selectLine(2, _house); + _gct->selectLine(4, _house); + + for (uint i = 0; i < kLoopCount; i++) + _loopID[i] = addLoop(kLoop[i][0], kLoop[i][1], kLoop[i][2]); +} + +Parents::~Parents() { + delete _gct; +} + +void Parents::play() { + _currentLoop = 0; + + SEQFile::play(true, 496, 15); + + // After playback, fade out + if (!_vm->shouldQuit()) + _vm->_palAnim->fade(0, 0, 0); +} + +void Parents::handleFrameEvent() { + switch (getFrame()) { + case 0: + // On fame 0, fade in + _vm->_draw->forceBlit(); + _vm->_palAnim->fade(_vm->_global->_pPaletteDesc, 0, 0); + break; + + case 4: + drawGCT(0); + break; + + case 55: + drawGCT(3, 0); + break; + + case 79: + drawGCT(_house + 5, 1); + break; + + case 110: + drawGCT(_house + 9, 2); + break; + + case 146: + drawGCT(17); + break; + + case 198: + drawGCT(13); + break; + + case 445: + drawGCT(14, 3); + break; + + case 455: + drawGCT(18, 4); + break; + + case 465: + drawGCT(19, 5); + break; + + case 475: + drawGCT(20, 6); + break; + + case 188: + case 228: + case 237: + case 257: + case 275: + case 426: + lightningEffect(); + break; + + case 203: + case 243: + case 252: + case 272: + case 290: + case 441: + playSound(kSoundThunder); + break; + + case 340: + playSound(kSoundCackle); + break; + } +} + +void Parents::handleInput(int16 key, int16 mouseX, int16 mouseY, MouseButtons mouseButtons) { + if ((key == kKeyEscape) || (mouseButtons == kMouseButtonsRight)) + abortPlay(); + + if (((key == kKeySpace) || (mouseButtons == kMouseButtonsLeft)) && (_currentLoop < kLoopCount)) + skipLoop(_loopID[_currentLoop]); +} + +void Parents::playSound(Sound sound) { + _vm->_sound->blasterStop(0); + _vm->_sound->blasterPlay(&_sounds[sound], 0, 0); +} + +void Parents::lightningEffect() { + for (int i = 0; (i < 5) && !_vm->shouldQuit(); i++) { + + setPalette(_brightPalette, _paletteSize); + _vm->_util->delay(5); + + setPalette(_normalPalette, _paletteSize); + _vm->_util->delay(5); + } +} + +void Parents::setPalette(const byte *palette, uint size) { + memcpy(_vm->_draw->_vgaPalette, palette, 3 * size); + + _vm->_video->setFullPalette(_vm->_global->_pPaletteDesc); + _vm->_video->retrace(); +} + +void Parents::drawGCT(uint item, uint loop) { + int16 left, top, right, bottom; + if (_gct->clear(*_vm->_draw->_backSurface, left, top, right, bottom)) + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + if (_gct->draw(*_vm->_draw->_backSurface, item, *_font, 10, left, top, right, bottom)) + _vm->_draw->dirtiedRect(_vm->_draw->_backSurface, left, top, right, bottom); + + _currentLoop = loop; +} + +} // End of namespace OnceUpon + +} // End of namespace Gob diff --git a/engines/gob/pregob/onceupon/parents.h b/engines/gob/pregob/onceupon/parents.h new file mode 100644 index 0000000000..f5c8307b73 --- /dev/null +++ b/engines/gob/pregob/onceupon/parents.h @@ -0,0 +1,94 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef GOB_PREGOB_ONCEUPON_PARENTS_H +#define GOB_PREGOB_ONCEUPON_PARENTS_H + +#include "gob/sound/sounddesc.h" + +#include "gob/pregob/seqfile.h" + +namespace Gob { + +class Font; + +class GCTFile; + +namespace OnceUpon { + +/** The home / parents animation sequence. */ +class Parents : public SEQFile { +public: + Parents(GobEngine *vm, const Common::String &seq, const Common::String &gct, + const Common::String &childName, uint8 house, const Font &font, + const byte *normalPalette, const byte *brightPalette, uint paletteSize); + ~Parents(); + + void play(); + +protected: + void handleFrameEvent(); + void handleInput(int16 key, int16 mouseX, int16 mouseY, MouseButtons mouseButtons); + +private: + static const uint kLoopCount = 7; + + static const uint16 kLoop[kLoopCount][3]; + + enum Sound { + kSoundCackle = 0, + kSoundThunder , + kSoundCount + }; + + static const char *kSound[kSoundCount]; + + + uint8 _house; + + const Font *_font; + + uint _paletteSize; + const byte *_normalPalette; + const byte *_brightPalette; + + SoundDesc _sounds[kSoundCount]; + + GCTFile *_gct; + + uint _loopID[kLoopCount]; + uint _currentLoop; + + + void lightningEffect(); + + void playSound(Sound sound); + void setPalette(const byte *palette, uint size); + + void drawGCT(uint item, uint loop = 0xFFFF); +}; + +} // End of namespace OnceUpon + +} // End of namespace Gob + +#endif // GOB_PREGOB_ONCEUPON_PARENTS_H -- cgit v1.2.3 From c8df89e6b2ad04aac03be89c1ac214dbd144c982 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 29 Jul 2012 19:44:22 -0400 Subject: LASTEXPRESS: Reorganize savegame code to prepare for compressed savegames support --- engines/lastexpress/game/savegame.cpp | 80 ++++++++++++++++++++++++++--------- engines/lastexpress/game/savegame.h | 75 ++++++++++++++++++++------------ 2 files changed, 109 insertions(+), 46 deletions(-) diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp index a8fb5c55f7..2b4f7db5a5 100644 --- a/engines/lastexpress/game/savegame.cpp +++ b/engines/lastexpress/game/savegame.cpp @@ -52,6 +52,32 @@ static const struct { {"lastexpress-gold.egg"} }; +////////////////////////////////////////////////////////////////////////// +// SavegameStream +////////////////////////////////////////////////////////////////////////// + +uint32 SavegameStream::read(void *dataPtr, uint32 dataSize) { + if ((int32)dataSize > size() - pos()) { + dataSize = size() - pos(); + _eos = true; + } + memcpy(dataPtr, getData() + pos(), dataSize); + + seek(dataSize, SEEK_CUR); + + return dataSize; +} + +uint32 SavegameStream::writeValue(const void *dataPtr, uint32 dataSize) { + // FIXME: Implement compression + return write(dataPtr, dataSize); +} + +uint32 SavegameStream::readValue(void *dataPtr, uint32 dataSize) { + // FIXME: Implement compression + return read(dataPtr, dataSize); +} + ////////////////////////////////////////////////////////////////////////// // Constructors ////////////////////////////////////////////////////////////////////////// @@ -340,16 +366,28 @@ bool SaveLoad::loadMainHeader(Common::InSaveFile *stream, SavegameMainHeader *he ////////////////////////////////////////////////////////////////////////// // Entries ////////////////////////////////////////////////////////////////////////// -void SaveLoad::writeEntry(SavegameType type, EntityIndex entity, uint32 value) { -#define WRITE_ENTRY(name, func, val) { \ - uint32 _prevPosition = (uint32)_savegame->pos(); \ - func; \ - uint32 _count = (uint32)_savegame->pos() - _prevPosition; \ - debugC(kLastExpressDebugSavegame, "Savegame: Writing " #name ": %d bytes", _count); \ - if (_count != val)\ - error("[SaveLoad::writeEntry] Number of bytes written (%d) differ from expected count (%d)", _count, val); \ +uint32 SaveLoad::writeValue(const char *name, Common::Functor1 *function, uint size) { + debugC(kLastExpressDebugSavegame, "Savegame: Writing %s: %u bytes", name, size); + + // Create buffer to hold the data + byte *buffer = (byte *)malloc(size); + if (!buffer) + error("[SaveLoad::writeValue] Cannot allocate buffer to hold data"); + + // Serialize data into our buffer + Common::MemoryWriteStream *stream = new Common::MemoryWriteStream(buffer, size); + Common::Serializer ser(NULL, stream); + (*function)(ser); + delete stream; + + return _savegame->writeValue(buffer, size); } +void SaveLoad::syncEntity(Common::Serializer &ser) { + ser.syncAsUint32LE(_entity); +} + +void SaveLoad::writeEntry(SavegameType type, EntityIndex entity, uint32 value) { if (!_savegame) error("[SaveLoad::writeEntry] Savegame stream is invalid"); @@ -368,18 +406,20 @@ void SaveLoad::writeEntry(SavegameType type, EntityIndex entity, uint32 value) { header.saveLoadWithSerializer(ser); // Write game data - WRITE_ENTRY("entity index", ser.syncAsUint32LE(entity), 4); - WRITE_ENTRY("state", getState()->saveLoadWithSerializer(ser), 4 + 4 + 4 + 4 + 1 + 4 + 4); - WRITE_ENTRY("selected item", getInventory()->saveSelectedItem(ser), 4); - WRITE_ENTRY("positions", getEntities()->savePositions(ser), 4 * 1000); - WRITE_ENTRY("compartments", getEntities()->saveCompartments(ser), 4 * 16 * 2); - WRITE_ENTRY("progress", getProgress().saveLoadWithSerializer(ser), 4 * 128); - WRITE_ENTRY("events", getState()->syncEvents(ser), 512); - WRITE_ENTRY("inventory", getInventory()->saveLoadWithSerializer(ser), 7 * 32); - WRITE_ENTRY("objects", getObjects()->saveLoadWithSerializer(ser), 5 * 128); - WRITE_ENTRY("entities", getEntities()->saveLoadWithSerializer(ser), 1262 * 40); - WRITE_ENTRY("sound", getSoundQueue()->saveLoadWithSerializer(ser), 3 * 4 + getSoundQueue()->count() * 64); - WRITE_ENTRY("savepoints", getSavePoints()->saveLoadWithSerializer(ser), 128 * 16 + 4 + getSavePoints()->count() * 16); + _entity = entity; + + writeValue("entity index", WRAP_SYNC_FUNCTION(this, SaveLoad, syncEntity), 4); + writeValue("state", WRAP_SYNC_FUNCTION(getState(), State::GameState, saveLoadWithSerializer), 4 + 4 + 4 + 4 + 1 + 4 + 4); + writeValue("selected item", WRAP_SYNC_FUNCTION(getInventory(), Inventory, saveSelectedItem), 4); + writeValue("positions", WRAP_SYNC_FUNCTION(getEntities(), Entities, savePositions), 4 * 1000); + writeValue("compartments", WRAP_SYNC_FUNCTION(getEntities(), Entities, saveCompartments), 4 * 16 * 2); + writeValue("progress", WRAP_SYNC_FUNCTION(&getProgress(), State::GameProgress, saveLoadWithSerializer), 4 * 128); + writeValue("events", WRAP_SYNC_FUNCTION(getState(), State::GameState, syncEvents), 512); + writeValue("inventory", WRAP_SYNC_FUNCTION(getInventory(), Inventory, saveLoadWithSerializer), 7 * 32); + writeValue("objects", WRAP_SYNC_FUNCTION(getObjects(), Objects, saveLoadWithSerializer), 5 * 128); + writeValue("entities", WRAP_SYNC_FUNCTION(getEntities(), Entities, saveLoadWithSerializer), 1262 * 40); + writeValue("sound", WRAP_SYNC_FUNCTION(getSoundQueue(), SoundQueue, saveLoadWithSerializer), 3 * 4 + getSoundQueue()->count() * 64); + writeValue("savepoints", WRAP_SYNC_FUNCTION(getSavePoints(), SavePoints, saveLoadWithSerializer), 128 * 16 + 4 + getSavePoints()->count() * 16); header.offset = (uint32)_savegame->pos() - (originalPosition + 32); diff --git a/engines/lastexpress/game/savegame.h b/engines/lastexpress/game/savegame.h index 6f0408487f..a04c700fb6 100644 --- a/engines/lastexpress/game/savegame.h +++ b/engines/lastexpress/game/savegame.h @@ -80,11 +80,51 @@ namespace LastExpress { // Savegame signatures -#define SAVEGAME_SIGNATURE 0x12001200 -#define SAVEGAME_ENTRY_SIGNATURE 0xE660E660 +#define SAVEGAME_SIGNATURE 0x12001200 // 301994496 +#define SAVEGAME_ENTRY_SIGNATURE 0xE660E660 // 3865110112 + +#define WRAP_SYNC_FUNCTION(instance, className, method) \ + new Common::Functor1Mem(instance, &className::method) class LastExpressEngine; +class SavegameStream : public Common::MemoryWriteStreamDynamic, public Common::SeekableReadStream { +public: + SavegameStream() : MemoryWriteStreamDynamic(DisposeAfterUse::YES), _eos(false) { + _bufferOffset = -1; + _valueCount = 0; + _previousValue = 0; + _field_15F = 0; + _offset = 0; + _status = 0; + + memset(_buffer, 0, 256); + } + + int32 pos() const { return MemoryWriteStreamDynamic::pos(); } + int32 size() const { return MemoryWriteStreamDynamic::size(); } + bool seek(int32 offset, int whence = SEEK_SET) { return MemoryWriteStreamDynamic::seek(offset, whence); } + bool eos() const { return _eos; } + uint32 read(void *dataPtr, uint32 dataSize); + + // Compressed data + uint32 writeValue(const void *dataPtr, uint32 dataSize); + uint32 readValue(void *dataPtr, uint32 dataSize); + +private: + bool _eos; + + // Compression handling + int _bufferOffset; + int _valueCount; + byte _previousValue; + byte _field_15F; + int _offset; + int _status; + + byte _buffer[256]; +}; + class SaveLoad { public: SaveLoad(LastExpressEngine *engine); @@ -116,30 +156,6 @@ public: uint32 getLastSavegameTicks() const { return _gameTicksLastSavegame; } private: - class SavegameStream : public Common::MemoryWriteStreamDynamic, public Common::SeekableReadStream { - public: - SavegameStream() : MemoryWriteStreamDynamic(DisposeAfterUse::YES), - _eos(false) {} - - int32 pos() const { return MemoryWriteStreamDynamic::pos(); } - int32 size() const { return MemoryWriteStreamDynamic::size(); } - bool seek(int32 offset, int whence = SEEK_SET) { return MemoryWriteStreamDynamic::seek(offset, whence); } - bool eos() const { return _eos; } - uint32 read(void *dataPtr, uint32 dataSize) { - if ((int32)dataSize > size() - pos()) { - dataSize = size() - pos(); - _eos = true; - } - memcpy(dataPtr, getData() + pos(), dataSize); - - seek(dataSize, SEEK_CUR); - - return dataSize; - } - private: - bool _eos; - }; - LastExpressEngine *_engine; struct SavegameMainHeader : Common::Serializable { @@ -268,6 +284,9 @@ private: void writeEntry(SavegameType type, EntityIndex entity, uint32 val); void readEntry(SavegameType *type, EntityIndex *entity, uint32 *val, bool keepIndex); + uint32 writeValue(const char *name, Common::Functor1 *function, uint size); + uint32 readValue(const char *name, Common::Functor1 *function, uint size); + SavegameEntryHeader *getEntry(uint32 index); // Opening save files @@ -279,6 +298,10 @@ private: void initStream(); void loadStream(GameId id); void flushStream(GameId id); + + // Misc + EntityIndex _entity; + void syncEntity(Common::Serializer &ser); }; } // End of namespace LastExpress -- cgit v1.2.3 From 65565c891493ed6a54a347df8041a011512d5cb8 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 29 Jul 2012 21:05:12 -0400 Subject: LASTEXPRESS: Replace REDRAW_CURSOR macro by function --- engines/lastexpress/game/logic.cpp | 28 ++++++++++++++++------------ engines/lastexpress/game/logic.h | 1 + 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/engines/lastexpress/game/logic.cpp b/engines/lastexpress/game/logic.cpp index 135b7d3480..a8619512cb 100644 --- a/engines/lastexpress/game/logic.cpp +++ b/engines/lastexpress/game/logic.cpp @@ -86,16 +86,6 @@ Logic::~Logic() { ////////////////////////////////////////////////////////////////////////// // Event Handling ////////////////////////////////////////////////////////////////////////// -#define REDRAW_CURSOR() { \ - if (getInventory()->isMagnifierInUse()) \ - _engine->getCursor()->setStyle(kCursorMagnifier); \ - if (getInventory()->isPortraitHighlighted() \ - || getInventory()->isOpened() \ - || getInventory()->isEggHighlighted()) \ - _engine->getCursor()->setStyle(kCursorNormal); \ - return; \ -} - void Logic::eventMouse(const Common::Event &ev) { bool hotspotHandled = false; @@ -166,7 +156,9 @@ void Logic::eventMouse(const Common::Event &ev) { getInventory()->unselectItem(); } - REDRAW_CURSOR() + redrawCursor(); + + return; } // Handle match case @@ -192,7 +184,9 @@ void Logic::eventMouse(const Common::Event &ev) { getScenes()->processScene(); } - REDRAW_CURSOR() + redrawCursor(); + + return; } // Handle entity item case @@ -596,4 +590,14 @@ void Logic::updateCursor(bool) const { /* the cursor is always updated, even whe _engine->getCursor()->setStyle(style); } +void Logic::redrawCursor() const { + if (getInventory()->isMagnifierInUse()) + _engine->getCursor()->setStyle(kCursorMagnifier); + + if (getInventory()->isPortraitHighlighted() + || getInventory()->isOpened() + || getInventory()->isEggHighlighted()) + _engine->getCursor()->setStyle(kCursorNormal); +} + } // End of namespace LastExpress diff --git a/engines/lastexpress/game/logic.h b/engines/lastexpress/game/logic.h index 84b64a998b..efb8f1e1a3 100644 --- a/engines/lastexpress/game/logic.h +++ b/engines/lastexpress/game/logic.h @@ -73,6 +73,7 @@ private: void switchChapter() const; void showCredits() const; + void redrawCursor() const; // Flags & Members bool _flagActionPerformed; -- cgit v1.2.3 From 5df2bd896247a59d6166c5f69b93355b66b5f920 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 29 Jul 2012 21:06:01 -0400 Subject: LASTEXPRESS: Fix regression with Logic::resetState() --- engines/lastexpress/game/logic.cpp | 4 ++-- engines/lastexpress/game/state.cpp | 12 ++++++++++++ engines/lastexpress/game/state.h | 2 ++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/engines/lastexpress/game/logic.cpp b/engines/lastexpress/game/logic.cpp index a8619512cb..1696f100ff 100644 --- a/engines/lastexpress/game/logic.cpp +++ b/engines/lastexpress/game/logic.cpp @@ -406,9 +406,9 @@ void Logic::resetState() { getScenes()->setCoordinates(Common::Rect(80, 0, 559, 479)); SAFE_DELETE(_entities); - SAFE_DELETE(_state); _entities = new Entities(_engine); - _state = new State(_engine); + + _state->reset(); } /** diff --git a/engines/lastexpress/game/state.cpp b/engines/lastexpress/game/state.cpp index f3fd9720b1..02ede25595 100644 --- a/engines/lastexpress/game/state.cpp +++ b/engines/lastexpress/game/state.cpp @@ -49,6 +49,18 @@ State::~State() { _engine = NULL; } +void State::reset() { + SAFE_DELETE(_inventory); + SAFE_DELETE(_objects); + SAFE_DELETE(_savepoints); + SAFE_DELETE(_state); + + _inventory = new Inventory(_engine); + _objects = new Objects(_engine); + _savepoints = new SavePoints(_engine); + _state = new GameState(); +} + bool State::isNightTime() const { return (_state->progress.chapter == kChapter1 || _state->progress.chapter == kChapter4 diff --git a/engines/lastexpress/game/state.h b/engines/lastexpress/game/state.h index c937fdce9f..2c484f6976 100644 --- a/engines/lastexpress/game/state.h +++ b/engines/lastexpress/game/state.h @@ -621,6 +621,8 @@ public: State(LastExpressEngine *engine); ~State(); + void reset(); + // Accessors Inventory *getGameInventory() { return _inventory; } Objects *getGameObjects() { return _objects; } -- cgit v1.2.3 From 4728505db288b8aa55453ada19fadde76d61ddb8 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Mon, 30 Jul 2012 16:44:32 -0400 Subject: LASTEXPRESS: Switch savegame reading to use new read method - Disable savegame compression --- engines/lastexpress/game/savegame.cpp | 141 ++++++++++++++++++++-------------- engines/lastexpress/game/savegame.h | 14 +++- 2 files changed, 95 insertions(+), 60 deletions(-) diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp index 2b4f7db5a5..8eda463f81 100644 --- a/engines/lastexpress/game/savegame.cpp +++ b/engines/lastexpress/game/savegame.cpp @@ -40,6 +40,8 @@ namespace LastExpress { +#define DISABLE_COMPRESSION 1 + // Names of savegames static const struct { const char *saveFile; @@ -56,7 +58,21 @@ static const struct { // SavegameStream ////////////////////////////////////////////////////////////////////////// +uint32 SavegameStream::write(const void *dataPtr, uint32 dataSize) { +#if !DISABLE_COMPRESSION + if (_enableCompression) + return writeCompressed(dataPtr, dataSize); +#endif + + return Common::MemoryWriteStreamDynamic::write(dataPtr, dataSize); +} + uint32 SavegameStream::read(void *dataPtr, uint32 dataSize) { +#if !DISABLE_COMPRESSION + if (_enableCompression) + return readCompressed(dataPtr, dataSize); +#endif + if ((int32)dataSize > size() - pos()) { dataSize = size() - pos(); _eos = true; @@ -68,14 +84,19 @@ uint32 SavegameStream::read(void *dataPtr, uint32 dataSize) { return dataSize; } -uint32 SavegameStream::writeValue(const void *dataPtr, uint32 dataSize) { - // FIXME: Implement compression - return write(dataPtr, dataSize); +void SavegameStream::process() { + _enableCompression = !_enableCompression; + + // TODO Flush compression buffer + +} + +uint32 SavegameStream::writeCompressed(const void *dataPtr, uint32 dataSize) { + error("[SavegameStream::writeCompressed] Compression not implemented!"); } -uint32 SavegameStream::readValue(void *dataPtr, uint32 dataSize) { - // FIXME: Implement compression - return read(dataPtr, dataSize); +uint32 SavegameStream::readCompressed(void *dataPtr, uint32 dataSize) { + error("[SavegameStream::readCompressed] Compression not implemented!"); } ////////////////////////////////////////////////////////////////////////// @@ -106,6 +127,7 @@ void SaveLoad::flushStream(GameId id) { error("[SaveLoad::flushStream] Savegame stream is invalid"); save->write(_savegame->getData(), (uint32)_savegame->size()); + save->finalize(); delete save; } @@ -366,21 +388,39 @@ bool SaveLoad::loadMainHeader(Common::InSaveFile *stream, SavegameMainHeader *he ////////////////////////////////////////////////////////////////////////// // Entries ////////////////////////////////////////////////////////////////////////// -uint32 SaveLoad::writeValue(const char *name, Common::Functor1 *function, uint size) { +uint32 SaveLoad::writeValue(Common::Serializer &ser, const char *name, Common::Functor1 *function, uint size) { debugC(kLastExpressDebugSavegame, "Savegame: Writing %s: %u bytes", name, size); - // Create buffer to hold the data - byte *buffer = (byte *)malloc(size); - if (!buffer) - error("[SaveLoad::writeValue] Cannot allocate buffer to hold data"); + uint32 prevPosition = (uint32)_savegame->pos(); // Serialize data into our buffer - Common::MemoryWriteStream *stream = new Common::MemoryWriteStream(buffer, size); - Common::Serializer ser(NULL, stream); (*function)(ser); - delete stream; - return _savegame->writeValue(buffer, size); + uint32 count = (uint32)_savegame->pos() - prevPosition; + +#if DISABLE_COMPRESSION + if (count != size) + error("[SaveLoad::writeValue] %s - Number of bytes written (%d) differ from expected count (%d)", name, count, size); +#endif + + return count; +} + +uint32 SaveLoad::readValue(Common::Serializer &ser, const char *name, Common::Functor1 *function, uint size) { + debugC(kLastExpressDebugSavegame, "Savegame: Reading %s: %u bytes", name, size); + + uint32 prevPosition = (uint32)_savegame->pos(); + + (*function)(ser); + + uint32 count = (uint32)_savegame->pos() - prevPosition; + +#if DISABLE_COMPRESSION + if (size != 0 && count != size) + error("[SaveLoad::readValue] %s - Number of bytes read (%d) differ from expected count (%d)", name, count, size); +#endif + + return count; } void SaveLoad::syncEntity(Common::Serializer &ser) { @@ -408,18 +448,20 @@ void SaveLoad::writeEntry(SavegameType type, EntityIndex entity, uint32 value) { // Write game data _entity = entity; - writeValue("entity index", WRAP_SYNC_FUNCTION(this, SaveLoad, syncEntity), 4); - writeValue("state", WRAP_SYNC_FUNCTION(getState(), State::GameState, saveLoadWithSerializer), 4 + 4 + 4 + 4 + 1 + 4 + 4); - writeValue("selected item", WRAP_SYNC_FUNCTION(getInventory(), Inventory, saveSelectedItem), 4); - writeValue("positions", WRAP_SYNC_FUNCTION(getEntities(), Entities, savePositions), 4 * 1000); - writeValue("compartments", WRAP_SYNC_FUNCTION(getEntities(), Entities, saveCompartments), 4 * 16 * 2); - writeValue("progress", WRAP_SYNC_FUNCTION(&getProgress(), State::GameProgress, saveLoadWithSerializer), 4 * 128); - writeValue("events", WRAP_SYNC_FUNCTION(getState(), State::GameState, syncEvents), 512); - writeValue("inventory", WRAP_SYNC_FUNCTION(getInventory(), Inventory, saveLoadWithSerializer), 7 * 32); - writeValue("objects", WRAP_SYNC_FUNCTION(getObjects(), Objects, saveLoadWithSerializer), 5 * 128); - writeValue("entities", WRAP_SYNC_FUNCTION(getEntities(), Entities, saveLoadWithSerializer), 1262 * 40); - writeValue("sound", WRAP_SYNC_FUNCTION(getSoundQueue(), SoundQueue, saveLoadWithSerializer), 3 * 4 + getSoundQueue()->count() * 64); - writeValue("savepoints", WRAP_SYNC_FUNCTION(getSavePoints(), SavePoints, saveLoadWithSerializer), 128 * 16 + 4 + getSavePoints()->count() * 16); + _savegame->process(); + writeValue(ser, "entity index", WRAP_SYNC_FUNCTION(this, SaveLoad, syncEntity), 4); + writeValue(ser, "state", WRAP_SYNC_FUNCTION(getState(), State::GameState, saveLoadWithSerializer), 4 + 4 + 4 + 4 + 1 + 4 + 4); + writeValue(ser, "selected item", WRAP_SYNC_FUNCTION(getInventory(), Inventory, saveSelectedItem), 4); + writeValue(ser, "positions", WRAP_SYNC_FUNCTION(getEntities(), Entities, savePositions), 4 * 1000); + writeValue(ser, "compartments", WRAP_SYNC_FUNCTION(getEntities(), Entities, saveCompartments), 4 * 16 * 2); + writeValue(ser, "progress", WRAP_SYNC_FUNCTION(&getProgress(), State::GameProgress, saveLoadWithSerializer), 4 * 128); + writeValue(ser, "events", WRAP_SYNC_FUNCTION(getState(), State::GameState, syncEvents), 512); + writeValue(ser, "inventory", WRAP_SYNC_FUNCTION(getInventory(), Inventory, saveLoadWithSerializer), 7 * 32); + writeValue(ser, "objects", WRAP_SYNC_FUNCTION(getObjects(), Objects, saveLoadWithSerializer), 5 * 128); + writeValue(ser, "entities", WRAP_SYNC_FUNCTION(getEntities(), Entities, saveLoadWithSerializer), 1262 * 40); + writeValue(ser, "sound", WRAP_SYNC_FUNCTION(getSoundQueue(), SoundQueue, saveLoadWithSerializer), 3 * 4 + getSoundQueue()->count() * 64); + writeValue(ser, "savepoints", WRAP_SYNC_FUNCTION(getSavePoints(), SavePoints, saveLoadWithSerializer), 128 * 16 + 4 + getSavePoints()->count() * 16); + _savegame->process(); header.offset = (uint32)_savegame->pos() - (originalPosition + 32); @@ -445,22 +487,6 @@ void SaveLoad::writeEntry(SavegameType type, EntityIndex entity, uint32 value) { } void SaveLoad::readEntry(SavegameType *type, EntityIndex *entity, uint32 *val, bool keepIndex) { -#define LOAD_ENTRY(name, func, val) { \ - uint32 _prevPosition = (uint32)_savegame->pos(); \ - func; \ - uint32 _count = (uint32)_savegame->pos() - _prevPosition; \ - debugC(kLastExpressDebugSavegame, "Savegame: Reading " #name ": %d bytes", _count); \ - if (_count != val) \ - error("[SaveLoad::readEntry] Number of bytes read (%d) differ from expected count (%d)", _count, val); \ -} - -#define LOAD_ENTRY_ONLY(name, func) { \ - uint32 _prevPosition = (uint32)_savegame->pos(); \ - func; \ - uint32 _count = (uint32)_savegame->pos() - _prevPosition; \ - debugC(kLastExpressDebugSavegame, "Savegame: Reading " #name ": %d bytes", _count); \ -} - if (!type || !entity || !val) error("[SaveLoad::readEntry] Invalid parameters passed"); @@ -483,20 +509,23 @@ void SaveLoad::readEntry(SavegameType *type, EntityIndex *entity, uint32 *val, b uint32 originalPosition = (uint32)_savegame->pos(); // Load game data - LOAD_ENTRY("entity index", ser.syncAsUint32LE(*entity), 4); - LOAD_ENTRY("state", getState()->saveLoadWithSerializer(ser), 4 + 4 + 4 + 4 + 1 + 4 + 4); - LOAD_ENTRY("selected item", getInventory()->saveSelectedItem(ser), 4); - LOAD_ENTRY("positions", getEntities()->savePositions(ser), 4 * 1000); - LOAD_ENTRY("compartments", getEntities()->saveCompartments(ser), 4 * 16 * 2); - LOAD_ENTRY("progress", getProgress().saveLoadWithSerializer(ser), 4 * 128); - LOAD_ENTRY("events", getState()->syncEvents(ser), 512); - LOAD_ENTRY("inventory", getInventory()->saveLoadWithSerializer(ser), 7 * 32); - LOAD_ENTRY("objects", getObjects()->saveLoadWithSerializer(ser), 5 * 128); - LOAD_ENTRY("entities", getEntities()->saveLoadWithSerializer(ser), 1262 * 40); - LOAD_ENTRY_ONLY("sound", getSoundQueue()->saveLoadWithSerializer(ser)); - LOAD_ENTRY_ONLY("savepoints", getSavePoints()->saveLoadWithSerializer(ser)); + _savegame->process(); + readValue(ser, "entity index", WRAP_SYNC_FUNCTION(this, SaveLoad, syncEntity), 4); + readValue(ser, "state", WRAP_SYNC_FUNCTION(getState(), State::GameState, saveLoadWithSerializer), 4 + 4 + 4 + 4 + 1 + 4 + 4); + readValue(ser, "selected item", WRAP_SYNC_FUNCTION(getInventory(), Inventory, saveSelectedItem), 4); + readValue(ser, "positions", WRAP_SYNC_FUNCTION(getEntities(), Entities, savePositions), 4 * 1000); + readValue(ser, "compartments", WRAP_SYNC_FUNCTION(getEntities(), Entities, saveCompartments), 4 * 16 * 2); + readValue(ser, "progress", WRAP_SYNC_FUNCTION(&getProgress(), State::GameProgress, saveLoadWithSerializer), 4 * 128); + readValue(ser, "events", WRAP_SYNC_FUNCTION(getState(), State::GameState, syncEvents), 512); + readValue(ser, "inventory", WRAP_SYNC_FUNCTION(getInventory(), Inventory, saveLoadWithSerializer), 7 * 32); + readValue(ser, "objects", WRAP_SYNC_FUNCTION(getObjects(), Objects, saveLoadWithSerializer), 5 * 128); + readValue(ser, "entities", WRAP_SYNC_FUNCTION(getEntities(), Entities, saveLoadWithSerializer), 1262 * 40); + readValue(ser, "sound", WRAP_SYNC_FUNCTION(getSoundQueue(), SoundQueue, saveLoadWithSerializer)); + readValue(ser, "savepoints", WRAP_SYNC_FUNCTION(getSavePoints(), SavePoints, saveLoadWithSerializer)); + _savegame->process(); // Update chapter + *entity = _entity; getProgress().chapter = entry.chapter; // Skip padding @@ -606,7 +635,7 @@ Common::InSaveFile *SaveLoad::openForLoading(GameId id) { } Common::OutSaveFile *SaveLoad::openForSaving(GameId id) { - Common::OutSaveFile *save = g_system->getSavefileManager()->openForSaving(getFilename(id)); + Common::OutSaveFile *save = g_system->getSavefileManager()->openForSaving(getFilename(id), false); // TODO Enable compression again if (!save) debugC(2, kLastExpressDebugSavegame, "Cannot open savegame for writing: %s", getFilename(id).c_str()); diff --git a/engines/lastexpress/game/savegame.h b/engines/lastexpress/game/savegame.h index a04c700fb6..dc16a16728 100644 --- a/engines/lastexpress/game/savegame.h +++ b/engines/lastexpress/game/savegame.h @@ -91,6 +91,7 @@ class LastExpressEngine; class SavegameStream : public Common::MemoryWriteStreamDynamic, public Common::SeekableReadStream { public: SavegameStream() : MemoryWriteStreamDynamic(DisposeAfterUse::YES), _eos(false) { + _enableCompression = false; _bufferOffset = -1; _valueCount = 0; _previousValue = 0; @@ -106,15 +107,20 @@ public: bool seek(int32 offset, int whence = SEEK_SET) { return MemoryWriteStreamDynamic::seek(offset, whence); } bool eos() const { return _eos; } uint32 read(void *dataPtr, uint32 dataSize); + uint32 write(const void *dataPtr, uint32 dataSize); + void process(); + +private: // Compressed data - uint32 writeValue(const void *dataPtr, uint32 dataSize); - uint32 readValue(void *dataPtr, uint32 dataSize); + uint32 writeCompressed(const void *dataPtr, uint32 dataSize); + uint32 readCompressed(void *dataPtr, uint32 dataSize); private: bool _eos; // Compression handling + bool _enableCompression; int _bufferOffset; int _valueCount; byte _previousValue; @@ -284,8 +290,8 @@ private: void writeEntry(SavegameType type, EntityIndex entity, uint32 val); void readEntry(SavegameType *type, EntityIndex *entity, uint32 *val, bool keepIndex); - uint32 writeValue(const char *name, Common::Functor1 *function, uint size); - uint32 readValue(const char *name, Common::Functor1 *function, uint size); + uint32 writeValue(Common::Serializer &ser, const char *name, Common::Functor1 *function, uint size); + uint32 readValue(Common::Serializer &ser, const char *name, Common::Functor1 *function, uint size = 0); SavegameEntryHeader *getEntry(uint32 index); -- cgit v1.2.3 From acd4cf82e23493e357261eea564a5eaafb6e2647 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Tue, 31 Jul 2012 00:58:37 -0400 Subject: LASTEXPRESS: Implement savegame write compression --- engines/lastexpress/game/savegame.cpp | 174 +++++++++++++++++++++++++++++++++- engines/lastexpress/game/savegame.h | 30 ++++-- 2 files changed, 191 insertions(+), 13 deletions(-) diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp index 8eda463f81..54ba45e25e 100644 --- a/engines/lastexpress/game/savegame.cpp +++ b/engines/lastexpress/game/savegame.cpp @@ -73,6 +73,10 @@ uint32 SavegameStream::read(void *dataPtr, uint32 dataSize) { return readCompressed(dataPtr, dataSize); #endif + return readUncompressed(dataPtr, dataSize); +} + +uint32 SavegameStream::readUncompressed(void *dataPtr, uint32 dataSize) { if ((int32)dataSize > size() - pos()) { dataSize = size() - pos(); _eos = true; @@ -84,18 +88,182 @@ uint32 SavegameStream::read(void *dataPtr, uint32 dataSize) { return dataSize; } -void SavegameStream::process() { +void SavegameStream::writeBuffer(uint8 value, bool onlyValue) { + if (_bufferOffset == -1) + _bufferOffset = 0; + + if (_bufferOffset == 256) { + _bufferOffset = 0; + Common::MemoryWriteStreamDynamic::write(_buffer, 256); + } + + if (onlyValue || value < 0xFB) + _buffer[_bufferOffset] = value; + else + _buffer[_bufferOffset] = 0xFE; + + _offset++; + _bufferOffset++; + + if (!onlyValue && value >= 0xFB) + { + if (_bufferOffset == 256) { + _bufferOffset = 0; + Common::MemoryWriteStreamDynamic::write(_buffer, 256); + } + + _buffer[_bufferOffset] = value; + + _bufferOffset++; + _offset++; + } +} + +uint32 SavegameStream::process() { _enableCompression = !_enableCompression; - // TODO Flush compression buffer +#if DISABLE_COMPRESSION + return 0; +#else + switch (_status) { + default: + break; + + case kStatusReading: + _status = kStatusReady; + if (_bufferOffset != -1 && _bufferOffset != 256) { + seek(_bufferOffset - 256, SEEK_CUR); + _bufferOffset = -1; + } + break; + + case kStatusWriting: + switch (_valueCount) { + default: + break; + + case 1: + writeBuffer(_previousValue, false); + break; + + case 2: + if (_previousValue) { + writeBuffer(0xFF, true); + writeBuffer(_repeatCount, true); + writeBuffer(_previousValue, true); + break; + } + + if (_repeatCount == 3) { + writeBuffer(0xFB, true); + break; + } + + if (_repeatCount == -1) { + writeBuffer(0xFC, true); + break; + } + + writeBuffer(0xFD, true); + writeBuffer(_repeatCount, true); + break; + } + + if (_bufferOffset != -1 && _bufferOffset != 0) { + Common::MemoryWriteStreamDynamic::write(_buffer, _bufferOffset); + _bufferOffset = -1; + } + break; + } + + _status = kStatusReady; + _valueCount = 0; + uint32 offset = _offset; + _offset = 0; + return offset; +#endif } uint32 SavegameStream::writeCompressed(const void *dataPtr, uint32 dataSize) { - error("[SavegameStream::writeCompressed] Compression not implemented!"); + if (_status == kStatusReading) + error("[SavegameStream::writeCompressed] Error: Compression buffer is in read mode."); + + _status = kStatusWriting; + byte *data = (byte *)dataPtr; + + while (dataSize) { + switch (_valueCount) { + default: + error("[SavegameStream::writeCompressed] Invalid value count (%d)", _valueCount); + + case 0: + _previousValue = *data++; + _valueCount = 1; + break; + + case 1: + if (*data != _previousValue) { + writeBuffer(_previousValue, false); + _previousValue = *data; + } else { + _valueCount = 2; + _repeatCount = 2; + } + + ++data; + break; + + case 2: + if (*data != _previousValue || _repeatCount >= 255) { + if (_previousValue) { + writeBuffer(0xFF, true); + writeBuffer(_repeatCount, true); + writeBuffer(_previousValue, true); + + _previousValue = *data++; + _valueCount = 1; + break; + } + + if (_repeatCount == 3) { + writeBuffer(0xFB, true); + + _previousValue = *data++; + _valueCount = 1; + break; + } + + if (_repeatCount == -1) { + writeBuffer(0xFC, true); + + _previousValue = *data++; + _valueCount = 1; + break; + } + + writeBuffer(0xFD, true); + writeBuffer(_repeatCount, true); + + _previousValue = *data++; + _valueCount = 1; + } + + ++data; + ++_repeatCount; + break; + } + + --dataSize; + } + + return _offset; } uint32 SavegameStream::readCompressed(void *dataPtr, uint32 dataSize) { + if (_status == kStatusWriting) + error("[SavegameStream::writeCompressed] Error: Compression buffer is in write mode."); + error("[SavegameStream::readCompressed] Compression not implemented!"); } diff --git a/engines/lastexpress/game/savegame.h b/engines/lastexpress/game/savegame.h index dc16a16728..8866fd330d 100644 --- a/engines/lastexpress/game/savegame.h +++ b/engines/lastexpress/game/savegame.h @@ -95,9 +95,9 @@ public: _bufferOffset = -1; _valueCount = 0; _previousValue = 0; - _field_15F = 0; + _repeatCount = 0; _offset = 0; - _status = 0; + _status = kStatusReady; memset(_buffer, 0, 256); } @@ -109,24 +109,34 @@ public: uint32 read(void *dataPtr, uint32 dataSize); uint32 write(const void *dataPtr, uint32 dataSize); - void process(); + uint32 process(); private: + enum CompressedStreamStatus { + kStatusReady, + kStatusReading, + kStatusWriting + }; + + uint32 readUncompressed(void *dataPtr, uint32 dataSize); + // Compressed data uint32 writeCompressed(const void *dataPtr, uint32 dataSize); uint32 readCompressed(void *dataPtr, uint32 dataSize); + void writeBuffer(uint8 value, bool onlyValue); + private: bool _eos; // Compression handling - bool _enableCompression; - int _bufferOffset; - int _valueCount; - byte _previousValue; - byte _field_15F; - int _offset; - int _status; + bool _enableCompression; + int16 _bufferOffset; + byte _valueCount; + byte _previousValue; + int16 _repeatCount; + uint32 _offset; + CompressedStreamStatus _status; byte _buffer[256]; }; -- cgit v1.2.3 From 0cf1c220fa39a0157d5d19ab22e5ce1eb65596c7 Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Tue, 31 Jul 2012 11:54:19 +0100 Subject: GPH: Move the legecy GP2X joystick code into the switch case to make it easier to follow. --- backends/events/gph/gph-events.cpp | 152 ++++++++++++++++++++++++------------- backends/events/gph/gph-events.h | 7 -- 2 files changed, 101 insertions(+), 58 deletions(-) diff --git a/backends/events/gph/gph-events.cpp b/backends/events/gph/gph-events.cpp index b4e106b790..91118d36c1 100644 --- a/backends/events/gph/gph-events.cpp +++ b/backends/events/gph/gph-events.cpp @@ -161,49 +161,6 @@ GPHEventSource::GPHEventSource() : _buttonStateL(false) { } -void GPHEventSource::moveStick() { - bool stickBtn[32]; - - memcpy(stickBtn, _stickBtn, sizeof(stickBtn)); - - if ((stickBtn[0]) || (stickBtn[2]) || (stickBtn[4]) || (stickBtn[6])) - stickBtn[1] = stickBtn[3] = stickBtn[5] = stickBtn[7] = 0; - - if ((stickBtn[1]) || (stickBtn[2]) || (stickBtn[3])) { - if (_km.x_down_count != 2) { - _km.x_vel = -1; - _km.x_down_count = 1; - } else - _km.x_vel = -4; - } else if ((stickBtn[5]) || (stickBtn[6]) || (stickBtn[7])) { - if (_km.x_down_count != 2) { - _km.x_vel = 1; - _km.x_down_count = 1; - } else - _km.x_vel = 4; - } else { - _km.x_vel = 0; - _km.x_down_count = 0; - } - - if ((stickBtn[0]) || (stickBtn[1]) || (stickBtn[7])) { - if (_km.y_down_count != 2) { - _km.y_vel = -1; - _km.y_down_count = 1; - } else - _km.y_vel = -4; - } else if ((stickBtn[3]) || (stickBtn[4]) || (stickBtn[5])) { - if (_km.y_down_count != 2) { - _km.y_vel = 1; - _km.y_down_count = 1; - } else - _km.y_vel = 4; - } else { - _km.y_vel = 0; - _km.y_down_count = 0; - } -} - /* Custom handleMouseButtonDown/handleMouseButtonUp to deal with 'Tap Mode' for the touchscreen */ bool GPHEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) { @@ -268,19 +225,110 @@ bool GPHEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &event) { bool GPHEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event) { - _stickBtn[ev.jbutton.button] = 1; event.kbd.flags = 0; switch (ev.jbutton.button) { case BUTTON_UP: - case BUTTON_UPLEFT: - case BUTTON_LEFT: - case BUTTON_DOWNLEFT: + if (_km.y_down_count != 2) { + _km.y_vel = -1; + _km.y_down_count = 1; + } else { + _km.y_vel = -4; + } + event.type = Common::EVENT_MOUSEMOVE; + processMouseEvent(event, _km.x, _km.y); + break; case BUTTON_DOWN: - case BUTTON_DOWNRIGHT: + if (_km.y_down_count != 2) { + _km.y_vel = 1; + _km.y_down_count = 1; + } else { + _km.y_vel = 4; + } + event.type = Common::EVENT_MOUSEMOVE; + processMouseEvent(event, _km.x, _km.y); + break; + case BUTTON_LEFT: + if (_km.x_down_count != 2) { + _km.x_vel = -1; + _km.x_down_count = 1; + } else { + _km.x_vel = -4; + } + event.type = Common::EVENT_MOUSEMOVE; + processMouseEvent(event, _km.x, _km.y); + break; case BUTTON_RIGHT: + if (_km.x_down_count != 3) { + _km.x_vel = 1; + _km.x_down_count = 1; + } else { + _km.x_vel = 4; + } + event.type = Common::EVENT_MOUSEMOVE; + processMouseEvent(event, _km.x, _km.y); + break; + case BUTTON_UPLEFT: + if (_km.x_down_count != 2) { + _km.x_vel = -1; + _km.x_down_count = 1; + } else { + _km.x_vel = -4; + } + if (_km.y_down_count != 2) { + _km.y_vel = -1; + _km.y_down_count = 1; + } else { + _km.y_vel = -4; + } + event.type = Common::EVENT_MOUSEMOVE; + processMouseEvent(event, _km.x, _km.y); + break; case BUTTON_UPRIGHT: - moveStick(); + if (_km.x_down_count != 2) { + _km.x_vel = 1; + _km.x_down_count = 1; + } else { + _km.x_vel = 4; + } + if (_km.y_down_count != 2) { + _km.y_vel = -1; + _km.y_down_count = 1; + } else { + _km.y_vel = -4; + } + event.type = Common::EVENT_MOUSEMOVE; + processMouseEvent(event, _km.x, _km.y); + break; + case BUTTON_DOWNLEFT: + if (_km.x_down_count != 2) { + _km.x_vel = -1; + _km.x_down_count = 1; + } else { + _km.x_vel = -4; + } + if (_km.y_down_count != 2) { + _km.y_vel = 1; + _km.y_down_count = 1; + } else { + _km.y_vel = 4; + } + event.type = Common::EVENT_MOUSEMOVE; + processMouseEvent(event, _km.x, _km.y); + break; + case BUTTON_DOWNRIGHT: + if (_km.x_down_count != 2) { + _km.x_vel = 1; + _km.x_down_count = 1; + } else { + _km.x_vel = 4; + } + if (_km.y_down_count != 2) { + _km.y_vel = 1; + _km.y_down_count = 1; + } else { + _km.y_vel = 4; + } event.type = Common::EVENT_MOUSEMOVE; processMouseEvent(event, _km.x, _km.y); break; @@ -391,7 +439,6 @@ bool GPHEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event) { bool GPHEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) { - _stickBtn[ev.jbutton.button] = 0; event.kbd.flags = 0; switch (ev.jbutton.button) { @@ -403,7 +450,10 @@ bool GPHEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) { case BUTTON_DOWNRIGHT: case BUTTON_RIGHT: case BUTTON_UPRIGHT: - moveStick(); + _km.y_vel = 0; + _km.y_down_count = 0; + _km.x_vel = 0; + _km.x_down_count = 0; event.type = Common::EVENT_MOUSEMOVE; processMouseEvent(event, _km.x, _km.y); break; diff --git a/backends/events/gph/gph-events.h b/backends/events/gph/gph-events.h index 7672bffed2..3b1e6f090a 100644 --- a/backends/events/gph/gph-events.h +++ b/backends/events/gph/gph-events.h @@ -34,18 +34,11 @@ public: GPHEventSource(); protected: - bool _stickBtn[32]; - /** * Button state for L button modifier */ bool _buttonStateL; - /** - * Handles the stick movement - */ - void moveStick(); - bool handleJoyButtonDown(SDL_Event &ev, Common::Event &event); bool handleJoyButtonUp(SDL_Event &ev, Common::Event &event); bool handleMouseButtonDown(SDL_Event &ev, Common::Event &event); -- cgit v1.2.3 From 4b4ce9dc6b63e76d90188841db7d2ff88c10477e Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Tue, 31 Jul 2012 18:59:36 +0100 Subject: GPH: Add extra call to SDL_ShowCursor(SDL_DISABLE). * This is needed on the hacked SDL on the GP2X after any call to SDL_SetVideoMode. It does not impact other GPH devices. --- backends/graphics/gph/gph-graphics.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp index 8521e88eaf..92553564bf 100644 --- a/backends/graphics/gph/gph-graphics.cpp +++ b/backends/graphics/gph/gph-graphics.cpp @@ -486,7 +486,13 @@ bool GPHGraphicsManager::loadGFXMode() { if (_videoMode.aspectRatioCorrection) _videoMode.overlayHeight = real2Aspect(_videoMode.overlayHeight); } - return SurfaceSdlGraphicsManager::loadGFXMode(); + SurfaceSdlGraphicsManager::loadGFXMode(); + + // The old GP2X hacked SDL needs this after any call to SDL_SetVideoMode + // and it does not hurt other devices. + SDL_ShowCursor(SDL_DISABLE); + + return true; } bool GPHGraphicsManager::hasFeature(OSystem::Feature f) { -- cgit v1.2.3 From 411e3dec8205477638ea2a9e4001573db461a25c Mon Sep 17 00:00:00 2001 From: athrxx Date: Tue, 31 Jul 2012 21:34:47 +0200 Subject: KYRA: fix "bug" #3552534 (LOL Floppy FR version unknown) --- engines/kyra/detection_tables.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h index 79ef11e7a9..3f16c35909 100644 --- a/engines/kyra/detection_tables.h +++ b/engines/kyra/detection_tables.h @@ -1329,6 +1329,22 @@ const KYRAGameDescription adGameDescs[] = { LOL_FLOPPY_CMP_FLAGS }, + { + { + "lol", + 0, + { + { "WESTWOOD.1", 0, "43857e24d1fc6731f3b13d9ed6db8c3a", -1 }, + { 0, 0, 0, 0 } + }, + Common::FR_FRA, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS) + }, + LOL_FLOPPY_CMP_FLAGS + }, + { { "lol", @@ -1397,6 +1413,23 @@ const KYRAGameDescription adGameDescs[] = { LOL_FLOPPY_FLAGS }, + { + { + "lol", + "Extracted", + { + { "GENERAL.PAK", 0, "f4fd14f244bd7c7fa08d026fafe44cc5", -1 }, + { "CHAPTER7.PAK", 0, "733e33c8444c93843dac3b683c283eaa", -1 }, + { 0, 0, 0, 0 } + }, + Common::FR_FRA, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO8(GUIO_NOSPEECH, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_MIDIGM, GUIO_MIDIPCSPK, GUIO_RENDERVGA, GAMEOPTION_LOL_SCROLLING, GAMEOPTION_LOL_CURSORS) + }, + LOL_FLOPPY_FLAGS + }, + // Russian fan translation { { -- cgit v1.2.3 From 11cf6145cbfa67ea05b351e439a0260b0e300f05 Mon Sep 17 00:00:00 2001 From: athrxx Date: Wed, 1 Aug 2012 01:07:08 +0200 Subject: KYRA: update kyra.dat to match the last commit (added support for French LOL floppy) --- devtools/create_kyradat/create_kyradat.cpp | 2 +- devtools/create_kyradat/games.cpp | 1 + devtools/create_kyradat/tables.cpp | 1 + dists/engine-data/kyra.dat | Bin 469735 -> 471460 bytes engines/kyra/staticres.cpp | 2 +- 5 files changed, 4 insertions(+), 2 deletions(-) diff --git a/devtools/create_kyradat/create_kyradat.cpp b/devtools/create_kyradat/create_kyradat.cpp index a87bde3e26..3b90ad0d85 100644 --- a/devtools/create_kyradat/create_kyradat.cpp +++ b/devtools/create_kyradat/create_kyradat.cpp @@ -47,7 +47,7 @@ #include enum { - kKyraDatVersion = 82 + kKyraDatVersion = 83 }; const ExtractFilename extractFilenames[] = { diff --git a/devtools/create_kyradat/games.cpp b/devtools/create_kyradat/games.cpp index a2759b1e53..89229eb4f2 100644 --- a/devtools/create_kyradat/games.cpp +++ b/devtools/create_kyradat/games.cpp @@ -119,6 +119,7 @@ const Game lolGames[] = { { kLoL, { EN_ANY, -1, -1 }, kPlatformPC, kNoSpecial, { "0cc764a204f7ba8cefe1a5f14c479619", 0 } }, { kLoL, { RU_RUS, -1, -1 }, kPlatformPC, kNoSpecial, { "80a9f9bf243bc6ed36d98584fc6988c4", 0 } }, { kLoL, { DE_DEU, -1, -1 }, kPlatformPC, kNoSpecial, { "6b843869772c1b779e1386be868c15dd", 0 } }, + { kLoL, { FR_FRA, -1, -1 }, kPlatformPC, kNoSpecial, { "6b843869772c1b779e1386be868c15dd", 0 } }, // PC98 (no language specifc strings) { kLoL, { JA_JPN, -1, -1 }, kPlatformPC98, kNoSpecial, { "6d5bd4a2f5ce433365734ca6b7a8d984", "1b0a457c48ae6908da301b656fe0aab4" } }, diff --git a/devtools/create_kyradat/tables.cpp b/devtools/create_kyradat/tables.cpp index 1b9f90f18f..19b69d9410 100644 --- a/devtools/create_kyradat/tables.cpp +++ b/devtools/create_kyradat/tables.cpp @@ -3349,6 +3349,7 @@ const ExtractEntrySearchData kLoLCharacterDefsProvider[] = { { RU_RUS, kPlatformPC, { 0x00000492, 0x000052BA, { { 0x52, 0x29, 0x0D, 0x49, 0xFD, 0x17, 0xD7, 0x70, 0x6D, 0xCA, 0xEB, 0xB6, 0x7E, 0xFA, 0xBE, 0x08 } } } }, // floppy { EN_ANY, kPlatformPC, { 0x00000492, 0x000046B0, { { 0x7A, 0x94, 0x8B, 0xC6, 0xF7, 0xF1, 0x2F, 0xF3, 0xBC, 0x1B, 0x0B, 0x4E, 0x00, 0xC9, 0x44, 0x58 } } } }, // floppy { DE_DEU, kPlatformPC, { 0x00000492, 0x000047FD, { { 0x8C, 0x0B, 0x8B, 0xCE, 0xE0, 0xB0, 0x8F, 0xA9, 0x06, 0xC3, 0x98, 0xE6, 0x2E, 0x09, 0xB6, 0x93 } } } }, // floppy + { FR_FRA, kPlatformPC, { 0x00000492, 0x000047FD, { { 0x8C, 0x0B, 0x8B, 0xCE, 0xE0, 0xB0, 0x8F, 0xA9, 0x06, 0xC3, 0x98, 0xE6, 0x2E, 0x09, 0xB6, 0x93 } } } }, // floppy { EN_ANY, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD { DE_DEU, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD { FR_FRA, kPlatformPC, { 0x00000492, 0x00004ACD, { { 0xDF, 0x87, 0xFE, 0x89, 0x59, 0xCC, 0x01, 0xD7, 0xC7, 0xEB, 0x16, 0xA4, 0x09, 0xAF, 0x5D, 0xC0 } } } }, // CD diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat index c89b21cbca..339b85664a 100644 Binary files a/dists/engine-data/kyra.dat and b/dists/engine-data/kyra.dat differ diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 423b827092..00dc4f9e13 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -38,7 +38,7 @@ namespace Kyra { -#define RESFILE_VERSION 82 +#define RESFILE_VERSION 83 namespace { bool checkKyraDat(Common::SeekableReadStream *file) { -- cgit v1.2.3 From eb6c60cec034a7758b8d25e29f501b10fc06c1a4 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 1 Aug 2012 00:13:39 -0400 Subject: LASTEXPRESS: Implement savegame read compression --- engines/lastexpress/game/savegame.cpp | 97 +++++++++++++++++++++++++++++++---- engines/lastexpress/game/savegame.h | 3 +- 2 files changed, 89 insertions(+), 11 deletions(-) diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp index 54ba45e25e..360e99146a 100644 --- a/engines/lastexpress/game/savegame.cpp +++ b/engines/lastexpress/game/savegame.cpp @@ -119,6 +119,18 @@ void SavegameStream::writeBuffer(uint8 value, bool onlyValue) { } } +uint8 SavegameStream::readBuffer() { + if (_bufferOffset == -1 || _bufferOffset >= 256) { + readUncompressed(_buffer, 256); + _bufferOffset = 0; + } + + byte val = _buffer[_bufferOffset]; + _bufferOffset++; + + return val; +} + uint32 SavegameStream::process() { _enableCompression = !_enableCompression; @@ -148,24 +160,24 @@ uint32 SavegameStream::process() { case 2: if (_previousValue) { - writeBuffer(0xFF, true); - writeBuffer(_repeatCount, true); - writeBuffer(_previousValue, true); + writeBuffer(0xFF); + writeBuffer(_repeatCount); + writeBuffer(_previousValue); break; } if (_repeatCount == 3) { - writeBuffer(0xFB, true); + writeBuffer(0xFB); break; } - if (_repeatCount == -1) { - writeBuffer(0xFC, true); + if (_repeatCount == 255) { + writeBuffer(0xFC); break; } - writeBuffer(0xFD, true); - writeBuffer(_repeatCount, true); + writeBuffer(0xFD); + writeBuffer(_repeatCount); break; } @@ -190,7 +202,7 @@ uint32 SavegameStream::writeCompressed(const void *dataPtr, uint32 dataSize) { error("[SavegameStream::writeCompressed] Error: Compression buffer is in read mode."); _status = kStatusWriting; - byte *data = (byte *)dataPtr; + const byte *data = (const byte *)dataPtr; while (dataSize) { switch (_valueCount) { @@ -264,7 +276,72 @@ uint32 SavegameStream::readCompressed(void *dataPtr, uint32 dataSize) { if (_status == kStatusWriting) error("[SavegameStream::writeCompressed] Error: Compression buffer is in write mode."); - error("[SavegameStream::readCompressed] Compression not implemented!"); + _status = kStatusReady; + byte *data = (byte *)dataPtr; + + while (dataSize) { + switch (_valueCount) { + default: + error("[SavegameStream::readCompressed] Invalid value count (%d)", _valueCount); + + case 0: + case 1: { + // Read control code + byte control = readBuffer(); + + switch (control) { + default: + // Data value + *data++ = control; + break; + + case 0xFB: + _repeatCount = 2; + _previousValue = 0; + *data++ = 0; + _valueCount = 2; + break; + + case 0xFC: + _repeatCount = 254; + _previousValue = 0; + *data++ = 0; + _valueCount = 2; + break; + + case 0xFD: + _repeatCount = readBuffer() - 1; + _previousValue = 0; + *data++ = 0; + _valueCount = 2; + break; + + case 0xFE: + *data++ = readBuffer(); + break; + + case 0xFF: + _repeatCount = readBuffer() - 1; + _previousValue = readBuffer(); + *data++ = _previousValue; + _valueCount = 2; + break; + } + } + break; + + case 2: + *data++ = _previousValue; + _repeatCount--; + if (!_repeatCount) + _valueCount = 1; + break; + } + + --dataSize; + } + + return _offset; } ////////////////////////////////////////////////////////////////////////// diff --git a/engines/lastexpress/game/savegame.h b/engines/lastexpress/game/savegame.h index 8866fd330d..8656b2ee86 100644 --- a/engines/lastexpress/game/savegame.h +++ b/engines/lastexpress/game/savegame.h @@ -124,7 +124,8 @@ private: uint32 writeCompressed(const void *dataPtr, uint32 dataSize); uint32 readCompressed(void *dataPtr, uint32 dataSize); - void writeBuffer(uint8 value, bool onlyValue); + void writeBuffer(uint8 value, bool onlyValue = true); + uint8 readBuffer(); private: bool _eos; -- cgit v1.2.3 From 7f05e1413c8b7b3913f64ddb29622dcdf40b2c65 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 1 Aug 2012 02:58:55 -0400 Subject: LASTEXPRESS: Remove use of skip from savegame functions when loading We cannot accurately skip over compressed data as it is not know before decoding how much data will be used --- engines/lastexpress/entities/entity.cpp | 8 +++++++- engines/lastexpress/game/savepoint.cpp | 10 +++++++++- engines/lastexpress/sound/queue.cpp | 10 +++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 4b1fda9c12..2deca291f6 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -88,7 +88,13 @@ void EntityData::EntityCallData::saveLoadWithSerializer(Common::Serializer &s) { syncString(s, sequenceNameCopy, 13); // Skip pointers to frame & sequences - s.skip(5 * 4); + // (we are using a compressed stream, so we cannot seek on load) + if (s.isLoading()) { + byte empty[5 * 4]; + s.syncBytes(empty, 5 * 4); + } else { + s.skip(5 * 4); + } } ////////////////////////////////////////////////////////////////////////// diff --git a/engines/lastexpress/game/savepoint.cpp b/engines/lastexpress/game/savepoint.cpp index 557468e222..6b2dfc5930 100644 --- a/engines/lastexpress/game/savepoint.cpp +++ b/engines/lastexpress/game/savepoint.cpp @@ -242,7 +242,15 @@ void SavePoints::saveLoadWithSerializer(Common::Serializer &s) { } // Skip uninitialized data if any - s.skip((_savePointsMaxSize - dataSize) * 16); + // (we are using a compressed stream, so we cannot seek on load) + uint32 unusedDataSize = (_savePointsMaxSize - dataSize) * 16; + if (s.isLoading()) { + byte *empty = (byte *)malloc(unusedDataSize); + s.syncBytes(empty, unusedDataSize); + free(empty); + } else { + s.skip(unusedDataSize); + } // Number of savepoints uint32 numSavepoints = _savepoints.size(); diff --git a/engines/lastexpress/sound/queue.cpp b/engines/lastexpress/sound/queue.cpp index 7b3dbcf2d9..d72acfd8a0 100644 --- a/engines/lastexpress/sound/queue.cpp +++ b/engines/lastexpress/sound/queue.cpp @@ -372,7 +372,15 @@ void SoundQueue::saveLoadWithSerializer(Common::Serializer &s) { (*i)->saveLoadWithSerializer(s); } else { warning("[Sound::saveLoadWithSerializer] Loading not implemented"); - s.skip(numEntries * 64); + + uint32 unusedDataSize = numEntries * 64; + if (s.isLoading()) { + byte *empty = (byte *)malloc(unusedDataSize); + s.syncBytes(empty, unusedDataSize); + free(empty); + } else { + s.skip(unusedDataSize); + } } } -- cgit v1.2.3 From 4ad7d48fe9b306192963398668feb6332a664830 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 1 Aug 2012 13:55:55 -0400 Subject: LASTEXPRESS: Remove unused code and move functor definition to only file using it --- engines/lastexpress/game/action.cpp | 16 +++++++++++ engines/lastexpress/shared.h | 56 ------------------------------------- 2 files changed, 16 insertions(+), 56 deletions(-) diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp index 4d1c786167..60a309518a 100644 --- a/engines/lastexpress/game/action.cpp +++ b/engines/lastexpress/game/action.cpp @@ -329,6 +329,22 @@ static const struct { {"8042A", 600} }; +template +class Functor1MemConst : public Common::Functor1 { +public: + typedef Res (T::*FuncType)(Arg) const; + + Functor1MemConst(T *t, const FuncType &func) : _t(t), _func(func) {} + + bool isValid() const { return _func != 0 && _t != 0; } + Res operator()(Arg v1) const { + return (_t->*_func)(v1); + } +private: + mutable T *_t; + const FuncType _func; +}; + Action::Action(LastExpressEngine *engine) : _engine(engine) { ADD_ACTION(dummy); ADD_ACTION(inventory); diff --git a/engines/lastexpress/shared.h b/engines/lastexpress/shared.h index bebd149b9b..56cf730e24 100644 --- a/engines/lastexpress/shared.h +++ b/engines/lastexpress/shared.h @@ -1733,62 +1733,6 @@ enum ActionIndex { kActionEnd }; -////////////////////////////////////////////////////////////////////////// -// Functors classes used by the engine -////////////////////////////////////////////////////////////////////////// - -// FIXME is this achievable with the existing Functor1Mem function -template -class Functor1MemConst : public Common::Functor1 { -public: - typedef Res (T::*FuncType)(Arg) const; - - Functor1MemConst(T *t, const FuncType &func) : _t(t), _func(func) {} - - bool isValid() const { return _func != 0 && _t != 0; } - Res operator()(Arg v1) const { - return (_t->*_func)(v1); - } -private: - mutable T *_t; - const FuncType _func; -}; - -// FIXME move this to existing func.h file -template -struct QuaternaryFunction { - typedef Arg1 FirstArgumentType; - typedef Arg2 SecondArgumentType; - typedef Arg3 ThirdArgumentType; - typedef Arg4 FourthArgumentType; - typedef Result ResultType; -}; - -template -struct Functor4 : public QuaternaryFunction { - virtual ~Functor4() {} - - virtual bool isValid() const = 0; - virtual Res operator()(Arg1, Arg2, Arg3, Arg4) const = 0; -}; - -template -class Functor4Mem : public Functor4 { -public: - typedef Res (T::*FuncType)(Arg1, Arg2, Arg3, Arg4); - - Functor4Mem(T *t, const FuncType &func) : _t(t), _func(func) {} - - bool isValid() const { return _func != 0 && _t != 0; } - Res operator()(Arg1 v1, Arg2 v2, Arg3 v3, Arg4 v4) const { - return (_t->*_func)(v1, v2, v3, v4); - } -private: - mutable T *_t; - const FuncType _func; -}; - - } // End of namespace LastExpress #endif // LASTEXPRESS_SHARED_H -- cgit v1.2.3 From 272c1d87e49bc77e5e1a451fa81ea3463fff7d2a Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 1 Aug 2012 17:56:56 -0400 Subject: LASTEXPRESS: Fix typo preventing playing NIS animations from the debugger --- engines/lastexpress/debug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp index 13a8a77ca9..f89ad8b80d 100644 --- a/engines/lastexpress/debug.cpp +++ b/engines/lastexpress/debug.cpp @@ -609,7 +609,7 @@ bool Debugger::cmdPlayNis(int argc, const char **argv) { loadArchive((ArchiveIndex)getNumber(argv[2])); // If we got a nis filename, check that the file exists - if (name.contains('.') && _engine->getResourceManager()->hasFile(name)) { + if (name.contains('.') && !_engine->getResourceManager()->hasFile(name)) { DebugPrintf("Cannot find file: %s\n", name.c_str()); return true; } -- cgit v1.2.3 From 259f262592bab9b779bad7aff6752ca69ffb26de Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 2 Aug 2012 03:46:58 +0300 Subject: SCI: Add a workaround for a script bug in QFG4 Thanks to Charles for testing --- engines/sci/engine/workarounds.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index fea3aed9ae..a4c2355e8f 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -36,6 +36,7 @@ const SciWorkaroundEntry arithmeticWorkarounds[] = { { GID_ECOQUEST2, 100, 0, 0, "Rain", "points", 0xcc6, 0, { WORKAROUND_FAKE, 0 } }, // op_or: when giving the papers to the customs officer, gets called against a pointer instead of a number - bug #3034464 { GID_ECOQUEST2, 100, 0, 0, "Rain", "points", 0xce0, 0, { WORKAROUND_FAKE, 0 } }, // Same as above, for the Spanish version - bug #3313962 { GID_FANMADE, 516, 983, 0, "Wander", "setTarget", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_mul: The Legend of the Lost Jewel Demo (fan made): called with object as second parameter when attacked by insects - bug #3038913 + { GID_GK1, 800,64992, 0, "Fwd", "doit", -1, 0, { WORKAROUND_FAKE, 1 } }, // op_gt: when Mosely finds Gabriel and Grace near the end of the game, compares the Grooper object with 7 { GID_ICEMAN, 199, 977, 0, "Grooper", "doit", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_add: While dancing with the girl { GID_MOTHERGOOSE256, -1, 999, 0, "Event", "new", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_and: constantly during the game (SCI1 version) { GID_MOTHERGOOSE256, -1, 4, 0, "rm004", "doit", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_or: when going north and reaching the castle (rooms 4 and 37) - bug #3038228 @@ -43,7 +44,7 @@ const SciWorkaroundEntry arithmeticWorkarounds[] = { { GID_PHANTASMAGORIA, 902, 0, 0, "", "export 7", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_shr: when starting a chapter in Phantasmagoria { GID_QFG1VGA, 301, 928, 0, "Blink", "init", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_div: when entering the inn, gets called with 1 parameter, but 2nd parameter is used for div which happens to be an object { GID_QFG2, 200, 200, 0, "astro", "messages", -1, 0, { WORKAROUND_FAKE, 0 } }, // op_lsi: when getting asked for your name by the astrologer bug #3039879 - { GID_GK1, 800,64992, 0, "Fwd", "doit", -1, 0, { WORKAROUND_FAKE, 1 } }, // op_gt: when Mosely finds Gabriel and Grace near the end of the game, compares the Grooper object with 7 + { GID_QFG4, 710,64941, 0, "RandCycle", "doit", -1, 0, { WORKAROUND_FAKE, 1 } }, // op_gt: when the tentacle appears in the third room of the caves SCI_WORKAROUNDENTRY_TERMINATOR }; -- cgit v1.2.3 From 52a1a6e60b418f9f0bcca9b12ef631f6f8176786 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 2 Aug 2012 12:41:40 +0100 Subject: TEENAGENT: Fix for bug #3428161 "PSP: No music in TeenAgent". This could occur on other platforms too and was a race hazard between mixer thread startup and music being valid i.e. If the music doesn't already exist, when the mixer callback is done, this deletes the channel as idle. Reordered the calls to fix this. Also, removed unecessary music->start() as this is done by setMusic(n) on successful load anyway. --- engines/teenagent/teenagent.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp index f06de6f803..57c069fe59 100644 --- a/engines/teenagent/teenagent.cpp +++ b/engines/teenagent/teenagent.cpp @@ -535,9 +535,8 @@ Common::Error TeenAgentEngine::run() { syncSoundSettings(); - _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, music, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false); setMusic(1); - music->start(); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, music, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false); int load_slot = Common::ConfigManager::instance().getInt("save_slot"); if (load_slot >= 0) { -- cgit v1.2.3 From b79221729bd06a737bf140bf7cb5c0ff2a578681 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 4 Aug 2012 14:41:17 +0100 Subject: AUDIO: Fix DVI ADPCM to work with Mono streams using odd sized buffers. --- audio/decoders/adpcm.cpp | 16 +++++++++++----- audio/decoders/adpcm_intern.h | 6 +++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/audio/decoders/adpcm.cpp b/audio/decoders/adpcm.cpp index 535652a0b3..5c96d5245a 100644 --- a/audio/decoders/adpcm.cpp +++ b/audio/decoders/adpcm.cpp @@ -117,13 +117,19 @@ int DVI_ADPCMStream::readBuffer(int16 *buffer, const int numSamples) { int samples; byte data; - assert(numSamples % 2 == 0); + for (samples = 0; samples < numSamples && !_stream->eos() && (_stream->pos() < _endpos); samples++) { + if (_decodedSampleCount == 0) { + data = _stream->readByte(); + _decodedSamples[0] = decodeIMA((data >> 4) & 0x0f, 0); + _decodedSamples[1] = decodeIMA((data >> 0) & 0x0f, _channels == 2 ? 1 : 0); + _decodedSampleCount = 2; + } - for (samples = 0; samples < numSamples && !_stream->eos() && _stream->pos() < _endpos; samples += 2) { - data = _stream->readByte(); - buffer[samples] = decodeIMA((data >> 4) & 0x0f); - buffer[samples + 1] = decodeIMA(data & 0x0f, _channels == 2 ? 1 : 0); + // (1 - (count - 1)) ensures that _decodedSamples acts as a FIFO of depth 2 + buffer[samples] = _decodedSamples[1 - (_decodedSampleCount - 1)]; + _decodedSampleCount--; } + return samples; } diff --git a/audio/decoders/adpcm_intern.h b/audio/decoders/adpcm_intern.h index 31747aabaf..537ae023ef 100644 --- a/audio/decoders/adpcm_intern.h +++ b/audio/decoders/adpcm_intern.h @@ -108,9 +108,13 @@ public: class DVI_ADPCMStream : public Ima_ADPCMStream { public: DVI_ADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, int rate, int channels, uint32 blockAlign) - : Ima_ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign) {} + : Ima_ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign) { _decodedSampleCount = 0; } virtual int readBuffer(int16 *buffer, const int numSamples); + +private: + uint8 _decodedSampleCount; + int16 _decodedSamples[2]; }; class Apple_ADPCMStream : public Ima_ADPCMStream { -- cgit v1.2.3 From 9c47fdae293e05888d3b4ec45fd4b374d1022c0b Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 4 Aug 2012 18:38:12 +0100 Subject: AUDIO: Fix Oki ADPCM to work with Mono streams using odd sized buffers. --- audio/decoders/adpcm.cpp | 16 +++++++++++----- audio/decoders/adpcm_intern.h | 4 ++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/audio/decoders/adpcm.cpp b/audio/decoders/adpcm.cpp index 5c96d5245a..e7297423f6 100644 --- a/audio/decoders/adpcm.cpp +++ b/audio/decoders/adpcm.cpp @@ -71,13 +71,19 @@ int Oki_ADPCMStream::readBuffer(int16 *buffer, const int numSamples) { int samples; byte data; - assert(numSamples % 2 == 0); + for (samples = 0; samples < numSamples && !_stream->eos() && (_stream->pos() < _endpos); samples++) { + if (_decodedSampleCount == 0) { + data = _stream->readByte(); + _decodedSamples[0] = decodeOKI((data >> 4) & 0x0f); + _decodedSamples[1] = decodeOKI((data >> 0) & 0x0f); + _decodedSampleCount = 2; + } - for (samples = 0; samples < numSamples && !_stream->eos() && _stream->pos() < _endpos; samples += 2) { - data = _stream->readByte(); - buffer[samples] = decodeOKI((data >> 4) & 0x0f); - buffer[samples + 1] = decodeOKI(data & 0x0f); + // (1 - (count - 1)) ensures that _decodedSamples acts as a FIFO of depth 2 + buffer[samples] = _decodedSamples[1 - (_decodedSampleCount - 1)]; + _decodedSampleCount--; } + return samples; } diff --git a/audio/decoders/adpcm_intern.h b/audio/decoders/adpcm_intern.h index 537ae023ef..423c4af267 100644 --- a/audio/decoders/adpcm_intern.h +++ b/audio/decoders/adpcm_intern.h @@ -89,6 +89,10 @@ public: protected: int16 decodeOKI(byte); + +private: + uint8 _decodedSampleCount; + int16 _decodedSamples[2]; }; class Ima_ADPCMStream : public ADPCMStream { -- cgit v1.2.3 From 43e2c6ee1ec8f47a61f69572043b2beca01f53f6 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 4 Aug 2012 20:29:37 +0100 Subject: AUDIO: Correct ADPCM Fixes to ensure internal buffers are drained. This also adds an omitted _decodedSampleCount initialization in Oki ADPCM decoder. --- audio/decoders/adpcm.cpp | 4 ++-- audio/decoders/adpcm_intern.h | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/audio/decoders/adpcm.cpp b/audio/decoders/adpcm.cpp index e7297423f6..2fe509e1f3 100644 --- a/audio/decoders/adpcm.cpp +++ b/audio/decoders/adpcm.cpp @@ -71,7 +71,7 @@ int Oki_ADPCMStream::readBuffer(int16 *buffer, const int numSamples) { int samples; byte data; - for (samples = 0; samples < numSamples && !_stream->eos() && (_stream->pos() < _endpos); samples++) { + for (samples = 0; samples < numSamples && !endOfData(); samples++) { if (_decodedSampleCount == 0) { data = _stream->readByte(); _decodedSamples[0] = decodeOKI((data >> 4) & 0x0f); @@ -123,7 +123,7 @@ int DVI_ADPCMStream::readBuffer(int16 *buffer, const int numSamples) { int samples; byte data; - for (samples = 0; samples < numSamples && !_stream->eos() && (_stream->pos() < _endpos); samples++) { + for (samples = 0; samples < numSamples && !endOfData(); samples++) { if (_decodedSampleCount == 0) { data = _stream->readByte(); _decodedSamples[0] = decodeIMA((data >> 4) & 0x0f, 0); diff --git a/audio/decoders/adpcm_intern.h b/audio/decoders/adpcm_intern.h index 423c4af267..3b8d8c74d0 100644 --- a/audio/decoders/adpcm_intern.h +++ b/audio/decoders/adpcm_intern.h @@ -37,7 +37,6 @@ #include "common/stream.h" #include "common/textconsole.h" - namespace Audio { class ADPCMStream : public RewindableAudioStream { @@ -64,12 +63,11 @@ public: ADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, int rate, int channels, uint32 blockAlign); virtual bool endOfData() const { return (_stream->eos() || _stream->pos() >= _endpos); } - virtual bool isStereo() const { return _channels == 2; } - virtual int getRate() const { return _rate; } + virtual bool isStereo() const { return _channels == 2; } + virtual int getRate() const { return _rate; } virtual bool rewind(); - /** * This table is used by some ADPCM variants (IMA and OKI) to adjust the * step for use on the next sample. @@ -83,7 +81,9 @@ public: class Oki_ADPCMStream : public ADPCMStream { public: Oki_ADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, int rate, int channels, uint32 blockAlign) - : ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign) {} + : ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign) { _decodedSampleCount = 0; } + + virtual bool endOfData() const { return (_stream->eos() || _stream->pos() >= _endpos) && (_decodedSampleCount == 0); } virtual int readBuffer(int16 *buffer, const int numSamples); @@ -114,6 +114,8 @@ public: DVI_ADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, int rate, int channels, uint32 blockAlign) : Ima_ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign) { _decodedSampleCount = 0; } + virtual bool endOfData() const { return (_stream->eos() || _stream->pos() >= _endpos) && (_decodedSampleCount == 0); } + virtual int readBuffer(int16 *buffer, const int numSamples); private: -- cgit v1.2.3 From de752a53361e67ddc3a84e61007db2a3049e3550 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 4 Aug 2012 23:51:27 +0200 Subject: CGE: Fix bug #3547274 - missing travel buttons after save --- engines/cge/cge_main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index a70e32de7e..355e163d4b 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -307,6 +307,7 @@ Common::Error CGEEngine::saveGameState(int slot, const Common::String &desc) { // Write out the user's progress saveGame(slot, desc); + _commandHandler->addCommand(kCmdLevel, -1, _oldLev, &_sceneLight); // Reload the scene sceneUp(); -- cgit v1.2.3 From ef8e15255d2415add42d4463e1672ea215f4ab80 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 5 Aug 2012 10:43:41 +0200 Subject: GOB: Add a Spanish/Italian DOS version of Geisha As supplied by einstein95 in bug report #3544449. --- engines/gob/detection/tables_geisha.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/engines/gob/detection/tables_geisha.h b/engines/gob/detection/tables_geisha.h index d05659d9e5..a32d1ebf81 100644 --- a/engines/gob/detection/tables_geisha.h +++ b/engines/gob/detection/tables_geisha.h @@ -69,6 +69,34 @@ kFeaturesEGA | kFeaturesAdLib, "disk1.stk", "intro.tot", 0 }, +{ // Supplied by einstein95 in bug report #3544449 + { + "geisha", + "", + AD_ENTRY1s("disk1.stk", "49107ac897e7c00af6c4ecd78a74a710", 212169), + ES_ESP, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGeisha, + kFeaturesEGA | kFeaturesAdLib, + "disk1.stk", "intro.tot", 0 +}, +{ // Supplied by einstein95 in bug report #3544449 + { + "geisha", + "", + AD_ENTRY1s("disk1.stk", "49107ac897e7c00af6c4ecd78a74a710", 212169), + IT_ITA, + kPlatformPC, + ADGF_NO_FLAGS, + GUIO2(GUIO_NOSUBTITLES, GUIO_NOSPEECH) + }, + kGameTypeGeisha, + kFeaturesEGA | kFeaturesAdLib, + "disk1.stk", "intro.tot", 0 +}, { { "geisha", -- cgit v1.2.3 From 745ef462fca7d69e5890659cb1f9fb208ee7c184 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 5 Aug 2012 17:10:11 +0200 Subject: KYRA: Add source of detection entires for LoL French floppy. --- engines/kyra/detection_tables.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h index 3f16c35909..e2162f20e2 100644 --- a/engines/kyra/detection_tables.h +++ b/engines/kyra/detection_tables.h @@ -1329,7 +1329,7 @@ const KYRAGameDescription adGameDescs[] = { LOL_FLOPPY_CMP_FLAGS }, - { + { // French floppy version 1.20, bug #3552534 "KYRA: LOL Floppy FR version unknown" { "lol", 0, @@ -1413,7 +1413,7 @@ const KYRAGameDescription adGameDescs[] = { LOL_FLOPPY_FLAGS }, - { + { // French floppy version 1.23, bug #3552534 "KYRA: LOL Floppy FR version unknown" { "lol", "Extracted", -- cgit v1.2.3 From 5c522575c7aff4706f3fefe0d7f89272aecd2b66 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 5 Aug 2012 22:24:32 +0200 Subject: CGE: Keep Soltys' position when saving --- engines/cge/cge_main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index 355e163d4b..3ba5f7fed9 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -305,6 +305,10 @@ Common::Error CGEEngine::saveGameState(int slot, const Common::String &desc) { _hero->park(); _oldLev = _lev; + int x = _hero->_x; + int y = _hero->_y; + int z = _hero->_z; + // Write out the user's progress saveGame(slot, desc); _commandHandler->addCommand(kCmdLevel, -1, _oldLev, &_sceneLight); @@ -312,6 +316,10 @@ Common::Error CGEEngine::saveGameState(int slot, const Common::String &desc) { // Reload the scene sceneUp(); + _hero->_x = x; + _hero->_y = y; + _hero->_z = z; + return Common::kNoError; } -- cgit v1.2.3 From 2dee92a908b84ae870bfdbfd00318549485b7984 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 6 Aug 2012 20:03:56 +1000 Subject: TINSEL: Fixed portability issue with earlier savegames --- engines/tinsel/dialogs.cpp | 14 +++++++++++++ engines/tinsel/dialogs.h | 2 ++ engines/tinsel/saveload.cpp | 50 ++++++++++++++++++++++++++++++++++++--------- 3 files changed, 56 insertions(+), 10 deletions(-) diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp index dde34841cf..56ee2ea752 100644 --- a/engines/tinsel/dialogs.cpp +++ b/engines/tinsel/dialogs.cpp @@ -1262,6 +1262,20 @@ static INV_OBJECT *GetInvObject(int id) { error("GetInvObject(%d): Trying to manipulate undefined inventory icon", id); } +/** + * Returns true if the given id represents a valid inventory object + */ +bool GetIsInvObject(int id) { + INV_OBJECT *pObject = g_invObjects; + + for (int i = 0; i < g_numObjects; i++, pObject++) { + if (pObject->id == id) + return true; + } + + return false; +} + /** * Convert item ID number to index. */ diff --git a/engines/tinsel/dialogs.h b/engines/tinsel/dialogs.h index 8c48eb8b76..ab53ba771c 100644 --- a/engines/tinsel/dialogs.h +++ b/engines/tinsel/dialogs.h @@ -152,6 +152,8 @@ void InvSetLimit(int invno, int n); void InvSetSize(int invno, int MinWidth, int MinHeight, int StartWidth, int StartHeight, int MaxWidth, int MaxHeight); +bool GetIsInvObject(int id); + int WhichInventoryOpen(); bool IsTopWindow(); diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp index 0a552c8c2b..518e27f02b 100644 --- a/engines/tinsel/saveload.cpp +++ b/engines/tinsel/saveload.cpp @@ -55,8 +55,7 @@ namespace Tinsel { * only saves/loads those which are valid for the version of the savegame * which is being loaded/saved currently. */ -#define CURRENT_VER 1 -// TODO: Not yet used +#define CURRENT_VER 2 /** * An auxillary macro, used to specify savegame versions. We use this instead @@ -97,12 +96,13 @@ struct SaveGameHeader { TimeDate dateTime; bool scnFlag; byte language; + uint16 numInterpreters; // Savegame version 2 or later only }; enum { DW1_SAVEGAME_ID = 0x44575399, // = 'DWSc' = "DiscWorld 1 ScummVM" DW2_SAVEGAME_ID = 0x44573253, // = 'DW2S' = "DiscWorld 2 ScummVM" - SAVEGAME_HEADER_SIZE = 4 + 4 + 4 + SG_DESC_LEN + 7 + 1 + 1 + SAVEGAME_HEADER_SIZE = 4 + 4 + 4 + SG_DESC_LEN + 7 + 1 + 1 + 2 }; #define SAVEGAME_ID (TinselV2 ? (uint32)DW2_SAVEGAME_ID : (uint32)DW1_SAVEGAME_ID) @@ -186,6 +186,15 @@ static bool syncSaveGameHeader(Common::Serializer &s, SaveGameHeader &hdr) { } } + // Handle the number of interpreter contexts that will be saved in the savegame + if (tmp >= 2) { + tmp -= 2; + hdr.numInterpreters = NUM_INTERPRET; + s.syncAsUint16LE(hdr.numInterpreters); + } else { + hdr.numInterpreters = (TinselV2 ? 70 : 64) - 20; + } + // Skip over any extra bytes s.skip(tmp); return true; @@ -262,7 +271,7 @@ static void syncSoundReel(Common::Serializer &s, SOUNDREELS &sr) { s.syncAsSint32LE(sr.actorCol); } -static void syncSavedData(Common::Serializer &s, SAVED_DATA &sd) { +static void syncSavedData(Common::Serializer &s, SAVED_DATA &sd, int numInterp) { s.syncAsUint32LE(sd.SavedSceneHandle); s.syncAsUint32LE(sd.SavedBgroundHandle); for (int i = 0; i < MAX_MOVERS; ++i) @@ -273,7 +282,7 @@ static void syncSavedData(Common::Serializer &s, SAVED_DATA &sd) { s.syncAsSint32LE(sd.NumSavedActors); s.syncAsSint32LE(sd.SavedLoffset); s.syncAsSint32LE(sd.SavedToffset); - for (int i = 0; i < NUM_INTERPRET; ++i) + for (int i = 0; i < numInterp; ++i) sd.SavedICInfo[i].syncWithSerializer(s); for (int i = 0; i < MAX_POLY; ++i) s.syncAsUint32LE(sd.SavedDeadPolys[i]); @@ -422,7 +431,7 @@ char *ListEntry(int i, letype which) { return NULL; } -static void DoSync(Common::Serializer &s) { +static bool DoSync(Common::Serializer &s, int numInterp) { int sg = 0; if (TinselV2) { @@ -434,7 +443,7 @@ static void DoSync(Common::Serializer &s) { if (TinselV2 && s.isLoading()) HoldItem(INV_NOICON); - syncSavedData(s, *g_srsd); + syncSavedData(s, *g_srsd, numInterp); syncGlobInfo(s); // Glitter globals syncInvInfo(s); // Inventory data @@ -443,6 +452,10 @@ static void DoSync(Common::Serializer &s) { sg = WhichItemHeld(); s.syncAsSint32LE(sg); if (s.isLoading()) { + if (sg != -1 && !GetIsInvObject(sg)) + // Not a valid inventory object, so return false + return false; + if (TinselV2) g_thingHeld = sg; else @@ -459,7 +472,7 @@ static void DoSync(Common::Serializer &s) { if (*g_SaveSceneSsCount != 0) { SAVED_DATA *sdPtr = g_SaveSceneSsData; for (int i = 0; i < *g_SaveSceneSsCount; ++i, ++sdPtr) - syncSavedData(s, *sdPtr); + syncSavedData(s, *sdPtr, numInterp); // Flag that there is a saved scene to return to. Note that in this context 'saved scene' // is a stored scene to return to from another scene, such as from the Summoning Book close-up @@ -469,6 +482,8 @@ static void DoSync(Common::Serializer &s) { if (!TinselV2) syncAllActorsAlive(s); + + return true; } /** @@ -487,8 +502,23 @@ static bool DoRestore() { delete f; // Invalid header, or savegame too new -> skip it return false; } + + // Load in the data. For older savegame versions, we potentially need to load the data twice, once + // for pre 1.5 savegames, and if that fails, a second time for 1.5 savegames + int numInterpreters = hdr.numInterpreters; + int32 currentPos = f->pos(); + for (int tryNumber = 0; tryNumber < ((hdr.ver >= 2) ? 1 : 2); ++tryNumber) { + // If it's the second loop iteration, try with the 1.5 savegame number of interpreter contexts + if (tryNumber == 1) { + f->seek(currentPos); + numInterpreters = 80; + } - DoSync(s); + // Load the savegame data + if (DoSync(s, numInterpreters)) + // Data load was successful (or likely), so break out of loop + break; + } uint32 id = f->readSint32LE(); if (id != (uint32)0xFEEDFACE) @@ -575,7 +605,7 @@ static void DoSave() { return; } - DoSync(s); + DoSync(s, hdr.numInterpreters); // Write out the special Id for Discworld savegames f->writeUint32LE(0xFEEDFACE); -- cgit v1.2.3 From aedd0d2a16bc06617c30a3ed1a2fa8f2bf88ba68 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 7 Aug 2012 10:23:31 +0100 Subject: SCI: Add missing QFG2 detection entry from bug #3554614. --- engines/sci/detection_tables.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 268914edba..ebfd66868c 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -3002,6 +3002,21 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Quest for Glory 2 - English DOS (supplied by digitoxin1 in bug report #3554614) + // 1.102 9x3.5" + {"qfg2", "", { + {"resource.map", 0, "367023314ea33e3156297402f6c1da49", 8166}, + {"resource.000", 0, "a17e374c4d33b81208c862bc0ffc1a38", 212119}, + {"resource.001", 0, "e08d7887e30b12008c40f9570447711a", 331995}, + {"resource.002", 0, "df137dc7869cab07e1149ba2333c815c", 467461}, + {"resource.003", 0, "df137dc7869cab07e1149ba2333c815c", 502560}, + {"resource.004", 0, "df137dc7869cab07e1149ba2333c815c", 488532}, + {"resource.005", 0, "df137dc7869cab07e1149ba2333c815c", 478574}, + {"resource.006", 0, "b1944bd664ddbd2859cdaa0c4a0d6281", 507489}, + {"resource.007", 0, "cd2de58e27665d5853530de93fae7cd6", 490794}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Quest for Glory 2 - English DOS Non-Interactive Demo // Executable scanning reports "1.000.046" {"qfg2", "Demo", { -- cgit v1.2.3 From 611905aa9718afd0320f518af6976d3316035622 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 7 Aug 2012 11:28:10 +0100 Subject: SCI: Add missing QFG1 detection entries from bug #3554611. --- engines/sci/detection_tables.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index ebfd66868c..11ece3decd 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -2798,6 +2798,32 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Quest for Glory 1 / Hero's Quest - English DOS 3.5" Floppy v1.102 (suppled by digitoxin1 in bug report #3554611) + // Note: Identical detection entry to English Amiga versions, so will trigger version choice dialog. + {"qfg1", "", { + {"resource.map", 0, "b162dbd4632250d4d83bed46d0783c10", 6396}, + {"resource.000", 0, "40332d3ebfc70a4b6a6a0443c2763287", 78800}, + {"resource.001", 0, "a270012fa74445d74c044d1b65a9ff8c", 459835}, + {"resource.002", 0, "e64004e020fdf1813be52b639b08be89", 635561}, + {"resource.003", 0, "f0af87c60ec869946da442833aa5afa8", 640502}, + {"resource.004", 0, "f0af87c60ec869946da442833aa5afa8", 644575}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + + // Quest for Glory 1 / Hero's Quest - English DOS 5.25" Floppy v1.102 (suppled by digitoxin1 in bug report #3554611) + {"qfg1", "", { + {"resource.map", 0, "5772a2c1bfae46f26582582c9901121e", 6858}, + {"resource.000", 0, "40332d3ebfc70a4b6a6a0443c2763287", 78800}, + {"resource.001", 0, "a270012fa74445d74c044d1b65a9ff8c", 75090}, + {"resource.002", 0, "d22695c53835dfdece056d86f26c251e", 271354}, + {"resource.003", 0, "3cd085e27078f269b3ece5838812ff41", 258084}, + {"resource.004", 0, "8927c7a04a78f1e76f342db3ccc9d879", 267835}, + {"resource.005", 0, "13d16cc9b90b51e2c8643cdf52a62957", 268807}, + {"resource.006", 0, "48b2b3c964dcbeccb68e984e6d4e97db", 278473}, + {"resource.007", 0, "f0af87c60ec869946da442833aa5afa8", 269237}, + AD_LISTEND}, + Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Quest for Glory 1 / Hero's Quest - English DOS 5.25" Floppy (supplied by markcoolio in bug report #2723843) // Executable scanning reports "0.000.566" {"qfg1", "", { -- cgit v1.2.3 From 78310d0f4b546081fceee2cf4ba72dd628fa7018 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 7 Aug 2012 19:07:01 +0200 Subject: TSAGE: Apply naming conventions to surfaceGetArea(). Thanks to somaen for reporting it. --- engines/tsage/blue_force/blueforce_dialogs.cpp | 4 ++-- engines/tsage/converse.cpp | 2 +- engines/tsage/dialogs.cpp | 2 +- engines/tsage/graphics.cpp | 6 +++--- engines/tsage/graphics.h | 2 +- engines/tsage/ringworld/ringworld_dialogs.cpp | 4 ++-- engines/tsage/ringworld/ringworld_logic.cpp | 2 +- engines/tsage/ringworld2/ringworld2_dialogs.cpp | 2 +- engines/tsage/user_interface.cpp | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/engines/tsage/blue_force/blueforce_dialogs.cpp b/engines/tsage/blue_force/blueforce_dialogs.cpp index a76d5839a9..23701c9e5b 100644 --- a/engines/tsage/blue_force/blueforce_dialogs.cpp +++ b/engines/tsage/blue_force/blueforce_dialogs.cpp @@ -88,7 +88,7 @@ RightClickDialog::~RightClickDialog() { void RightClickDialog::draw() { // Save the covered background area - _savedArea = Surface_getArea(g_globals->_gfxManagerInstance.getSurface(), _bounds); + _savedArea = surfaceGetArea(g_globals->_gfxManagerInstance.getSurface(), _bounds); // Draw the dialog image g_globals->gfxManager().copyFrom(_surface, _bounds.left, _bounds.top); @@ -323,7 +323,7 @@ void AmmoBeltDialog::draw() { if (!_savedArea) { // Save the covered background area - _savedArea = Surface_getArea(g_globals->_gfxManagerInstance.getSurface(), _bounds); + _savedArea = surfaceGetArea(g_globals->_gfxManagerInstance.getSurface(), _bounds); } else { bounds.moveTo(0, 0); } diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp index 06fbffb751..ba27db9104 100644 --- a/engines/tsage/converse.cpp +++ b/engines/tsage/converse.cpp @@ -505,7 +505,7 @@ void ConversationChoiceDialog::draw() { // Make a backup copy of the area the dialog will occupy Rect tempRect = _bounds; tempRect.collapse(-10, -10); - _savedArea = Surface_getArea(g_globals->_gfxManagerInstance.getSurface(), tempRect); + _savedArea = surfaceGetArea(g_globals->_gfxManagerInstance.getSurface(), tempRect); // Fill in the contents of the entire dialog _gfxManager._bounds = Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp index 972d591c34..77ac0a25d7 100644 --- a/engines/tsage/dialogs.cpp +++ b/engines/tsage/dialogs.cpp @@ -116,7 +116,7 @@ void ModalDialog::draw() { // Make a backup copy of the area the dialog will occupy Rect tempRect = _bounds; tempRect.collapse(-10, -10); - _savedArea = Surface_getArea(g_globals->_gfxManagerInstance.getSurface(), tempRect); + _savedArea = surfaceGetArea(g_globals->_gfxManagerInstance.getSurface(), tempRect); _gfxManager.activate(); diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp index 0781ae4544..fb0b0b0cbb 100644 --- a/engines/tsage/graphics.cpp +++ b/engines/tsage/graphics.cpp @@ -38,7 +38,7 @@ namespace TsAGE { * @src Source surface * @bounds Area to backup */ -GfxSurface *Surface_getArea(GfxSurface &src, const Rect &bounds) { +GfxSurface *surfaceGetArea(GfxSurface &src, const Rect &bounds) { assert(bounds.isValidRect()); GfxSurface *dest = new GfxSurface(); dest->create(bounds.width(), bounds.height()); @@ -437,7 +437,7 @@ bool GfxSurface::displayText(const Common::String &msg, const Common::Point &pt) // Make a backup copy of the area the text will occupy Rect saveRect = textRect; saveRect.collapse(-20, -8); - GfxSurface *savedArea = Surface_getArea(gfxManager.getSurface(), saveRect); + GfxSurface *savedArea = surfaceGetArea(gfxManager.getSurface(), saveRect); // Display the text gfxManager._font.writeLines(msg.c_str(), textRect, ALIGN_LEFT); @@ -1073,7 +1073,7 @@ void GfxDialog::draw() { Rect tempRect(_bounds); // Make a backup copy of the area the dialog will occupy - _savedArea = Surface_getArea(g_globals->_gfxManagerInstance.getSurface(), _bounds); + _savedArea = surfaceGetArea(g_globals->_gfxManagerInstance.getSurface(), _bounds); // Set the palette for use in the dialog setPalette(); diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h index 9c6f13e407..9175b1050a 100644 --- a/engines/tsage/graphics.h +++ b/engines/tsage/graphics.h @@ -339,7 +339,7 @@ public: static void setPalette(); }; -GfxSurface *Surface_getArea(GfxSurface &src, const Rect &bounds); +GfxSurface *surfaceGetArea(GfxSurface &src, const Rect &bounds); GfxSurface surfaceFromRes(const byte *imgData); GfxSurface surfaceFromRes(int resNum, int rlbNum, int subNum); diff --git a/engines/tsage/ringworld/ringworld_dialogs.cpp b/engines/tsage/ringworld/ringworld_dialogs.cpp index 0e451b8429..4728e66cd9 100644 --- a/engines/tsage/ringworld/ringworld_dialogs.cpp +++ b/engines/tsage/ringworld/ringworld_dialogs.cpp @@ -59,7 +59,7 @@ void RightClickButton::highlight() { _savedButton = NULL; } else { // Highlight button by getting the needed highlighted image resource - _savedButton = Surface_getArea(g_globals->gfxManager().getSurface(), _bounds); + _savedButton = surfaceGetArea(g_globals->gfxManager().getSurface(), _bounds); uint size; byte *imgData = g_resourceManager->getSubResource(7, 2, _buttonIndex, &size); @@ -122,7 +122,7 @@ RightClickButton *RightClickDialog::findButton(const Common::Point &pt) { void RightClickDialog::draw() { // Save the covered background area - _savedArea = Surface_getArea(g_globals->_gfxManagerInstance.getSurface(), _bounds); + _savedArea = surfaceGetArea(g_globals->_gfxManagerInstance.getSurface(), _bounds); // Draw the dialog image g_globals->gfxManager().copyFrom(_surface, _bounds.left, _bounds.top); diff --git a/engines/tsage/ringworld/ringworld_logic.cpp b/engines/tsage/ringworld/ringworld_logic.cpp index 00c219f2ee..7d571b40d7 100644 --- a/engines/tsage/ringworld/ringworld_logic.cpp +++ b/engines/tsage/ringworld/ringworld_logic.cpp @@ -295,7 +295,7 @@ void SceneArea::display() { _bounds.setWidth(_surface.getBounds().width()); _bounds.setHeight(_surface.getBounds().height()); - _savedArea = Surface_getArea(g_globals->_gfxManagerInstance.getSurface(), _bounds); + _savedArea = surfaceGetArea(g_globals->_gfxManagerInstance.getSurface(), _bounds); draw2(); } diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.cpp b/engines/tsage/ringworld2/ringworld2_dialogs.cpp index 30ae6be7b1..478fdcf5a5 100644 --- a/engines/tsage/ringworld2/ringworld2_dialogs.cpp +++ b/engines/tsage/ringworld2/ringworld2_dialogs.cpp @@ -85,7 +85,7 @@ RightClickDialog::~RightClickDialog() { void RightClickDialog::draw() { // Save the covered background area - _savedArea = Surface_getArea(g_globals->_gfxManagerInstance.getSurface(), _bounds); + _savedArea = surfaceGetArea(g_globals->_gfxManagerInstance.getSurface(), _bounds); // Draw the dialog image g_globals->gfxManager().copyFrom(_surface, _bounds.left, _bounds.top); diff --git a/engines/tsage/user_interface.cpp b/engines/tsage/user_interface.cpp index 10cb6961dc..4bd9e49875 100644 --- a/engines/tsage/user_interface.cpp +++ b/engines/tsage/user_interface.cpp @@ -112,7 +112,7 @@ void UIQuestion::showItem(int resNum, int rlbNum, int frameNum) { imgRect.center(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2); // Save the area behind where the image will be displayed - GfxSurface *savedArea = Surface_getArea(GLOBALS.gfxManager().getSurface(), imgRect); + GfxSurface *savedArea = surfaceGetArea(GLOBALS.gfxManager().getSurface(), imgRect); // Draw the image GLOBALS.gfxManager().copyFrom(objImage, imgRect); -- cgit v1.2.3 From 220ca52f4329ad3c1344c38e23280fde4570bd89 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 7 Aug 2012 14:24:32 -0400 Subject: VIDEO: Fix getTime() when a video is not playing --- video/video_decoder.cpp | 20 +++++++++++++------- video/video_decoder.h | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 84ce8144a0..44b05c4345 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -102,6 +102,7 @@ AdvancedVideoDecoder::AdvancedVideoDecoder() { _audioBalance = 0; _pauseLevel = 0; _needsUpdate = false; + _lastTimeChange = 0; // Find the best format for output _defaultHighColorFormat = g_system->getScreenFormat(); @@ -126,6 +127,7 @@ void AdvancedVideoDecoder::close() { _audioBalance = 0; _pauseLevel = 0; _needsUpdate = false; + _lastTimeChange = 0; } bool AdvancedVideoDecoder::isVideoLoaded() const { @@ -201,6 +203,9 @@ uint32 AdvancedVideoDecoder::getFrameCount() const { } uint32 AdvancedVideoDecoder::getTime() const { + if (!isPlaying()) + return _lastTimeChange.msecs(); + if (isPaused()) return _pauseStartTime - _startTime; @@ -210,7 +215,7 @@ uint32 AdvancedVideoDecoder::getTime() const { uint32 time = ((const AudioTrack *)*it)->getRunningTime(); if (time != 0) - return time + _audioStartOffset.msecs(); + return time + _lastTimeChange.msecs(); } } } @@ -278,7 +283,7 @@ bool AdvancedVideoDecoder::rewind() { if (isPlaying()) startAudio(); - _audioStartOffset = 0; + _lastTimeChange = 0; _startTime = g_system->getMillis(); resetPauseStartTime(); return true; @@ -313,7 +318,7 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) { if (isPlaying()) startAudio(); - _audioStartOffset = time; + _lastTimeChange = time; _startTime = g_system->getMillis() - time.msecs(); resetPauseStartTime(); _needsUpdate = true; @@ -326,7 +331,7 @@ void AdvancedVideoDecoder::start() { _isPlaying = true; _startTime = g_system->getMillis(); - _audioStartOffset = 0; + _lastTimeChange = 0; // If someone previously called stop(), we'll rewind it. if (_needsRewind) @@ -341,7 +346,6 @@ void AdvancedVideoDecoder::stop() { _isPlaying = false; _startTime = 0; - _audioStartOffset = 0; _palette = 0; _dirtyPalette = false; _needsUpdate = false; @@ -354,10 +358,12 @@ void AdvancedVideoDecoder::stop() { // If this is a rewindable video, don't close it too. We'll just rewind() the video // the next time someone calls start(). Otherwise, since it can't be rewound, we // just close it. - if (isRewindable()) + if (isRewindable()) { + _lastTimeChange = getTime(); _needsRewind = true; - else + } else { close(); + } } Audio::Timestamp AdvancedVideoDecoder::getDuration() const { diff --git a/video/video_decoder.h b/video/video_decoder.h index ad9825cb25..26078d5750 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -773,7 +773,7 @@ private: // Current playback status bool _isPlaying, _needsRewind, _needsUpdate; - Audio::Timestamp _audioStartOffset; + Audio::Timestamp _lastTimeChange; // Palette settings from individual tracks mutable bool _dirtyPalette; -- cgit v1.2.3 From d83382a9ef92cd485438873c98f420b794190ff7 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 7 Aug 2012 19:27:22 +0100 Subject: SCI: Add extra comments to new detection entries. No functional changes. --- engines/sci/detection_tables.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 11ece3decd..10f89a94e2 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -2798,7 +2798,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - // Quest for Glory 1 / Hero's Quest - English DOS 3.5" Floppy v1.102 (suppled by digitoxin1 in bug report #3554611) + // Quest for Glory 1 / Hero's Quest - English DOS 3.5" Floppy v1.102 Int#0.000.629 (suppled by digitoxin1 in bug report #3554611) // Note: Identical detection entry to English Amiga versions, so will trigger version choice dialog. {"qfg1", "", { {"resource.map", 0, "b162dbd4632250d4d83bed46d0783c10", 6396}, @@ -2810,7 +2810,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - // Quest for Glory 1 / Hero's Quest - English DOS 5.25" Floppy v1.102 (suppled by digitoxin1 in bug report #3554611) + // Quest for Glory 1 / Hero's Quest - English DOS 5.25" Floppy v1.102 Int#0.000.629 (suppled by digitoxin1 in bug report #3554611) {"qfg1", "", { {"resource.map", 0, "5772a2c1bfae46f26582582c9901121e", 6858}, {"resource.000", 0, "40332d3ebfc70a4b6a6a0443c2763287", 78800}, @@ -3029,7 +3029,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, // Quest for Glory 2 - English DOS (supplied by digitoxin1 in bug report #3554614) - // 1.102 9x3.5" + // v1.102 9x3.5" (label: Int#11.20.90) {"qfg2", "", { {"resource.map", 0, "367023314ea33e3156297402f6c1da49", 8166}, {"resource.000", 0, "a17e374c4d33b81208c862bc0ffc1a38", 212119}, -- cgit v1.2.3 From 546e2086e32c42602cede84c961bbacab75ebdb4 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 7 Aug 2012 21:01:33 +0200 Subject: SCI: Remove duplicate detection entry There is no indication in the corresponding bug report this was for an Amiga version. --- engines/sci/detection_tables.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 10f89a94e2..b39dad118e 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -2799,7 +2799,6 @@ static const struct ADGameDescription SciGameDescriptions[] = { Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, // Quest for Glory 1 / Hero's Quest - English DOS 3.5" Floppy v1.102 Int#0.000.629 (suppled by digitoxin1 in bug report #3554611) - // Note: Identical detection entry to English Amiga versions, so will trigger version choice dialog. {"qfg1", "", { {"resource.map", 0, "b162dbd4632250d4d83bed46d0783c10", 6396}, {"resource.000", 0, "40332d3ebfc70a4b6a6a0443c2763287", 78800}, @@ -2911,17 +2910,6 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - // Quest for Glory 1 (from abevi, bug report #2612718) - {"qfg1", "", { - {"resource.map", 0, "b162dbd4632250d4d83bed46d0783c10", 6396}, - {"resource.000", 0, "40332d3ebfc70a4b6a6a0443c2763287", 78800}, - {"resource.001", 0, "a270012fa74445d74c044d1b65a9ff8c", 459835}, - {"resource.002", 0, "e64004e020fdf1813be52b639b08be89", 635561}, - {"resource.003", 0, "f0af87c60ec869946da442833aa5afa8", 640502}, - {"resource.004", 0, "f0af87c60ec869946da442833aa5afa8", 644575}, - AD_LISTEND}, - Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, - // Quest for Glory 1 - English DOS // SCI interpreter version 0.000.629 {"qfg1", "", { -- cgit v1.2.3 From 4cd34733a39fd64964c6d50a108d2c9e12634385 Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Wed, 8 Aug 2012 13:37:32 +0100 Subject: OPENGL: GL_BGRA does not exist in every GLES implementation. * It definately does not exist in the GLES implementations I can test with. * Don't configure if USE_GLES is set. --- backends/graphics/opengl/opengl-graphics.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index dce902d894..c99652d2bd 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -918,11 +918,6 @@ void OpenGLGraphicsManager::getGLPixelFormat(Graphics::PixelFormat pixelFormat, intFormat = GL_RGBA; glFormat = GL_RGBA; gltype = GL_UNSIGNED_SHORT_5_5_5_1; - } else if (pixelFormat == Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0)) { // RGB555 - bpp = 2; - intFormat = GL_RGB; - glFormat = GL_BGRA; - gltype = GL_UNSIGNED_SHORT_1_5_5_5_REV; } else if (pixelFormat == Graphics::PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0)) { // RGBA4444 bpp = 2; intFormat = GL_RGBA; @@ -936,6 +931,13 @@ void OpenGLGraphicsManager::getGLPixelFormat(Graphics::PixelFormat pixelFormat, glFormat = GL_RGB; gltype = GL_UNSIGNED_BYTE; #ifndef USE_GLES + } else if (pixelFormat == Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0)) { // RGB555 + // GL_BGRA does not exist in every GLES implementation so should not be configured if + // USE_GLES is set. + bpp = 2; + intFormat = GL_RGB; + glFormat = GL_BGRA; + gltype = GL_UNSIGNED_SHORT_1_5_5_5_REV; } else if (pixelFormat == Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24)) { // ARGB8888 bpp = 4; intFormat = GL_RGBA; -- cgit v1.2.3 From fbf193f7562924e450961d92156fa915e8d69a68 Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Wed, 8 Aug 2012 13:49:48 +0100 Subject: CONFIGURE: Add case for selecting OpenGL ES support on the OpenPandora. --- configure | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/configure b/configure index ffcd0c1d6c..06492ff305 100755 --- a/configure +++ b/configure @@ -3501,6 +3501,21 @@ define_in_config_if_yes "$_freetype2" "USE_FREETYPE2" # Check for OpenGL (ES) # echocheck "OpenGL" + +case $_backend in + openpandora) + # Only enable OpenGL ES on the OpanPandora if --enable-opengl is passed in explicitly. + if test "$_opengl" = yes ; then + _opengl=yes + _opengles=yes + OPENGL_LIBS="-lGLES_CM -lEGL -lX11" + OPENGL_CFLAGS="$OPENGL_LIBS" + LIBS="$LIBS $OPENGL_LIBS" + INCLUDES="$INCLUDES $OPENGL_CFLAGS" + fi + ;; +esac + if test "$_opengl" = auto ; then _opengl=no if test "$_backend" = "sdl" ; then -- cgit v1.2.3 From 5521261fdebb9388026457d7c2a92ad6abc149f1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 9 Aug 2012 03:09:01 +0200 Subject: OPENGL: Fix RGBA8888 mode setup. --- backends/graphics/opengl/opengl-graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index c99652d2bd..48e2663d44 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -902,7 +902,7 @@ void OpenGLGraphicsManager::getGLPixelFormat(Graphics::PixelFormat pixelFormat, bpp = 4; intFormat = GL_RGBA; glFormat = GL_RGBA; - gltype = GL_UNSIGNED_BYTE; + gltype = GL_UNSIGNED_INT_8_8_8_8; } else if (pixelFormat == Graphics::PixelFormat(3, 8, 8, 8, 0, 16, 8, 0, 0)) { // RGB888 bpp = 3; intFormat = GL_RGB; -- cgit v1.2.3 From b4196e48b16c458ef6564a051495525ff5a282f0 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 30 Jul 2012 21:31:14 +0200 Subject: GRAPHICS: Add a DPI parameter to loadTTFFont. Will be used by WME. --- graphics/fonts/ttf.cpp | 10 +++++----- graphics/fonts/ttf.h | 2 +- gui/ThemeEngine.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/graphics/fonts/ttf.cpp b/graphics/fonts/ttf.cpp index 96241e923c..2b1dca1eae 100644 --- a/graphics/fonts/ttf.cpp +++ b/graphics/fonts/ttf.cpp @@ -101,7 +101,7 @@ public: TTFFont(); virtual ~TTFFont(); - bool load(Common::SeekableReadStream &stream, int size, bool monochrome, const uint32 *mapping); + bool load(Common::SeekableReadStream &stream, int size, uint dpi, bool monochrome, const uint32 *mapping); virtual int getFontHeight() const; @@ -157,7 +157,7 @@ TTFFont::~TTFFont() { } } -bool TTFFont::load(Common::SeekableReadStream &stream, int size, bool monochrome, const uint32 *mapping) { +bool TTFFont::load(Common::SeekableReadStream &stream, int size, uint dpi, bool monochrome, const uint32 *mapping) { if (!g_ttf.isInitialized()) return false; @@ -195,7 +195,7 @@ bool TTFFont::load(Common::SeekableReadStream &stream, int size, bool monochrome // Check whether we have kerning support _hasKerning = (FT_HAS_KERNING(_face) != 0); - if (FT_Set_Char_Size(_face, 0, size * 64, 0, 0)) { + if (FT_Set_Char_Size(_face, 0, size * 64, dpi, dpi)) { delete[] _ttfFile; _ttfFile = 0; @@ -462,10 +462,10 @@ bool TTFFont::cacheGlyph(Glyph &glyph, FT_UInt &slot, uint chr) { return true; } -Font *loadTTFFont(Common::SeekableReadStream &stream, int size, bool monochrome, const uint32 *mapping) { +Font *loadTTFFont(Common::SeekableReadStream &stream, int size, uint dpi, bool monochrome, const uint32 *mapping) { TTFFont *font = new TTFFont(); - if (!font->load(stream, size, monochrome, mapping)) { + if (!font->load(stream, size, dpi, monochrome, mapping)) { delete font; return 0; } diff --git a/graphics/fonts/ttf.h b/graphics/fonts/ttf.h index ec7dbe04ef..e1464b1f45 100644 --- a/graphics/fonts/ttf.h +++ b/graphics/fonts/ttf.h @@ -32,7 +32,7 @@ namespace Graphics { class Font; -Font *loadTTFFont(Common::SeekableReadStream &stream, int size, bool monochrome = false, const uint32 *mapping = 0); +Font *loadTTFFont(Common::SeekableReadStream &stream, int size, uint dpi = 0, bool monochrome = false, const uint32 *mapping = 0); void shutdownTTF(); diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index e37022f5f1..2fff92c263 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -1422,7 +1422,7 @@ const Graphics::Font *ThemeEngine::loadScalableFont(const Common::String &filena for (Common::ArchiveMemberList::const_iterator i = members.begin(), end = members.end(); i != end; ++i) { Common::SeekableReadStream *stream = (*i)->createReadStream(); if (stream) { - font = Graphics::loadTTFFont(*stream, pointsize, false, + font = Graphics::loadTTFFont(*stream, pointsize, 0, false, #ifdef USE_TRANSLATION TransMan.getCharsetMapping() #else -- cgit v1.2.3 From 84426c63553f94c26fa299dc2659cec16c24cd3f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 9 Aug 2012 03:25:14 +0200 Subject: AUDIO: Fix "if" formatting in QDM2 code. --- audio/decoders/qdm2.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/audio/decoders/qdm2.cpp b/audio/decoders/qdm2.cpp index 31405d3ab1..732de311aa 100644 --- a/audio/decoders/qdm2.cpp +++ b/audio/decoders/qdm2.cpp @@ -689,7 +689,7 @@ static int getVlc2(Common::BitStream *s, int16 (*table)[2], int bits, int maxDep code = table[index][0]; n = table[index][1]; - if(maxDepth > 2 && n < 0) { + if (maxDepth > 2 && n < 0) { s->skip(nbBits); index = s->getBits(-n) + code; code = table[index][0]; @@ -861,9 +861,9 @@ void initVlcSparse(VLC *vlc, int nb_bits, int nb_codes, const void *symbols, int symbols_wrap, int symbols_size) { vlc->bits = nb_bits; - if(vlc->table_size && vlc->table_size == vlc->table_allocated) { + if (vlc->table_size && vlc->table_size == vlc->table_allocated) { return; - } else if(vlc->table_size) { + } else if (vlc->table_size) { error("called on a partially initialized table"); } @@ -1353,7 +1353,7 @@ void QDM2Stream::fix_coding_method_array(int sb, int channels, sb_int8_array cod for (ch = 0; ch < channels; ch++) { for (j = 0; j < 64; ) { - if((coding_method[ch][sb][j] - 8) > 22) { + if ((coding_method[ch][sb][j] - 8) > 22) { run = 1; case_val = 8; } else { -- cgit v1.2.3 From 73598c64dc317362c5fd534485b6a083aa1531f1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 9 Aug 2012 03:25:37 +0200 Subject: CREATE_PROJECT: Fix "if" formatting. --- devtools/create_project/xcode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index 0574814e02..62dd417d8c 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -917,7 +917,7 @@ std::string XCodeProvider::writeSetting(const std::string &variable, const Setti for (unsigned int i = 0, count = 0; i < setting.entries.size(); ++i) { std::string value = setting.entries.at(i).value; - if(!value.empty()) { + if (!value.empty()) { if (count++ > 0) output += "," + newline; -- cgit v1.2.3 From 8aa8cb4dd661ec39dd5f03e39f2ed19e4968ff2c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 9 Aug 2012 03:25:55 +0200 Subject: DINGUX: Fix "if" formatting. --- backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp index 205dcfdbec..f515343d3c 100644 --- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp +++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp @@ -432,7 +432,7 @@ bool DINGUXSdlGraphicsManager::loadGFXMode() { // Forcefully disable aspect ratio correction for games // which starts with a native 240px height resolution. // This fixes games with weird resolutions, like MM Nes (256x240) - if(_videoMode.screenHeight == 240) { + if (_videoMode.screenHeight == 240) { _videoMode.aspectRatioCorrection = false; } -- cgit v1.2.3 From 18ab9a1ef12aa2d929245e14d2e04aaf05437247 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 9 Aug 2012 03:26:55 +0200 Subject: TSAGE: Fix "if" formatting. --- engines/tsage/ringworld/ringworld_scenes5.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/tsage/ringworld/ringworld_scenes5.cpp b/engines/tsage/ringworld/ringworld_scenes5.cpp index 3b415bdb6a..004ccbbb6d 100644 --- a/engines/tsage/ringworld/ringworld_scenes5.cpp +++ b/engines/tsage/ringworld/ringworld_scenes5.cpp @@ -1893,7 +1893,7 @@ void Scene4045::postInit(SceneObjectList *OwnerList) { _olloFace.setStrip(4); _olloFace.fixPriority(152); - if(g_globals->_sceneManager._previousScene == 4050) { + if (g_globals->_sceneManager._previousScene == 4050) { g_globals->_soundHandler.play(155); g_globals->_player.setPosition(Common::Point(72, 128)); g_globals->_player.enableControl(); -- cgit v1.2.3 From 571fa943106009b99a39bbe0a729f9c32afa8a9a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 9 Aug 2012 03:27:21 +0200 Subject: TESTBED: Fix "if" formatting. --- engines/testbed/graphics.cpp | 4 ++-- engines/testbed/testsuite.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp index 082694b728..590e6c6d81 100644 --- a/engines/testbed/graphics.cpp +++ b/engines/testbed/graphics.cpp @@ -1028,7 +1028,7 @@ TestExitStatus GFXtests::paletteRotation() { GFXTestSuite::setCustomColor(255, 0, 0); Testsuite::clearScreen(); - if(Testsuite::handleInteractiveInput("Did you see a rotation in colors of rectangles displayed on screen?", "Yes", "No", kOptionRight)) { + if (Testsuite::handleInteractiveInput("Did you see a rotation in colors of rectangles displayed on screen?", "Yes", "No", kOptionRight)) { return kTestFailed; } @@ -1121,7 +1121,7 @@ TestExitStatus GFXtests::pixelFormats() { g_system->updateScreen(); g_system->delayMillis(500); - if(Testsuite::handleInteractiveInput("Were you able to notice the colored rectangles on the screen for this format?", "Yes", "No", kOptionLeft)) { + if (Testsuite::handleInteractiveInput("Were you able to notice the colored rectangles on the screen for this format?", "Yes", "No", kOptionLeft)) { numPassed++; } else { numFailed++; diff --git a/engines/testbed/testsuite.cpp b/engines/testbed/testsuite.cpp index 655179aa74..39eeca31bd 100644 --- a/engines/testbed/testsuite.cpp +++ b/engines/testbed/testsuite.cpp @@ -289,7 +289,7 @@ void Testsuite::execute() { continue; } - if((*i)->isInteractive && !ConfParams.isSessionInteractive()) { + if ((*i)->isInteractive && !ConfParams.isSessionInteractive()) { logPrintf("Info! Skipping Test: %s, non-interactive environment is selected\n", ((*i)->featureName).c_str()); _numTestsSkipped++; continue; -- cgit v1.2.3 From 92b5ee0a48e7393220e7f89d58e241565e9d00af Mon Sep 17 00:00:00 2001 From: Vincent Hamm Date: Thu, 9 Aug 2012 23:19:46 -0700 Subject: CINE: Fix masking in Operation Stealth. --- engines/cine/gfx.cpp | 99 ++++++++++++++++++++++++++++++++++++++++++++-------- engines/cine/gfx.h | 2 ++ 2 files changed, 86 insertions(+), 15 deletions(-) diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index 918d522606..b22e57400d 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -1235,14 +1235,8 @@ void OSRenderer::renderOverlay(const Common::List::iterator &it) { break; } sprite = &g_cine->_animDataTable[g_cine->_objectTable[it->objIdx].frame]; - len = sprite->_realWidth * sprite->_height; - mask = new byte[len]; - generateMask(sprite->data(), mask, len, g_cine->_objectTable[it->objIdx].part); - remaskSprite(mask, it); - drawMaskedSprite(g_cine->_objectTable[it->objIdx], mask); - delete[] mask; + drawSprite(&(*it), sprite->data(), sprite->_realWidth, sprite->_height, _backBuffer, g_cine->_objectTable[it->objIdx].x, g_cine->_objectTable[it->objIdx].y, g_cine->_objectTable[it->objIdx].part, sprite->_bpp); break; - // game message case 2: if (it->objIdx >= g_cine->_messageTable.size()) { @@ -1290,14 +1284,6 @@ void OSRenderer::renderOverlay(const Common::List::iterator &it) { maskBgOverlay(_bgTable[it->x].bg, sprite->data(), sprite->_realWidth, sprite->_height, _backBuffer, obj->x, obj->y); break; - // FIXME: Implement correct drawing of type 21 overlays. - // Type 21 overlays aren't just filled rectangles, I found their drawing routine - // from Operation Stealth's drawSprite routine. So they're likely some kind of sprites - // and it's just a coincidence that the oxygen meter during the first arcade sequence - // works even somehow currently. I tried the original under DOSBox and the oxygen gauge - // is a long red bar that gets shorter as the air runs out. - case 21: - // A filled rectangle: case 22: // TODO: Check it this implementation really works correctly (Some things might be wrong, needs testing). assert(it->objIdx < NUM_MAX_OBJECT); @@ -1752,6 +1738,89 @@ void drawSpriteRaw(const byte *spritePtr, const byte *maskPtr, int16 width, int1 } } +void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 width, int16 height, byte *page, int16 x, int16 y, byte transparentColor, byte bpp) +{ + byte* pMask = NULL; + + // draw the mask based on next objects in the list + Common::List::iterator it; + for (it = g_cine->_overlayList.begin(); it != g_cine->_overlayList.end(); ++it) + { + if(&(*it) == overlayPtr) + { + break; + } + } + + while(it != g_cine->_overlayList.end()) + { + overlay* pCurrentOverlay = &(*it); + if((pCurrentOverlay->type==5) || ((pCurrentOverlay->type==21) && (pCurrentOverlay->x==overlayPtr->objIdx))) + { + AnimData* sprite = &g_cine->_animDataTable[g_cine->_objectTable[it->objIdx].frame]; + + if(pMask == NULL) + { + pMask = new byte[width*height]; + + for (int i = 0; i < height; i++) { + for (int j = 0; j < width; j++) { + byte spriteColor= spritePtr[width*i+j]; + pMask[width*i+j] = spriteColor; + } + } + } + + for (int i = 0; i < sprite->_realWidth; i++) { + for (int j = 0; j < sprite->_height; j++) { + int inMaskX = (g_cine->_objectTable[it->objIdx].x+i) - x; + int inMaskY = (g_cine->_objectTable[it->objIdx].y+j) - y; + + if(inMaskX >=0 && inMaskX < width) + { + if(inMaskY >=0 && inMaskY < height) + { + if(sprite->_bpp == 1) + { + if(!sprite->getColor(i, j)) + { + pMask[inMaskY*width+inMaskX] = page[x + y * 320 + inMaskX + inMaskY * 320]; + } + } + } + } + } + } + + + } + it++; + } + + // now, draw with the mask we created + if(pMask) + { + spritePtr = pMask; + } + { + for (int i = 0; i < height; i++) { + byte *destPtr = page + x + y * 320; + destPtr += i * 320; + + for (int j = 0; j < width; j++) { + byte color= *(spritePtr++); + if ((transparentColor != color) && x + j >= 0 && x + j < 320 && i + y >= 0 && i + y < 200) { + *(destPtr++) = color; + } else { + destPtr++; + } + } + } + } + + delete[] pMask; +}; + void drawSpriteRaw2(const byte *spritePtr, byte transColor, int16 width, int16 height, byte *page, int16 x, int16 y) { int16 i, j; diff --git a/engines/cine/gfx.h b/engines/cine/gfx.h index 737c49cc36..8b21d839e4 100644 --- a/engines/cine/gfx.h +++ b/engines/cine/gfx.h @@ -223,6 +223,7 @@ private: protected: void drawSprite(const ObjectStruct &obj); + void drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 width, int16 height, byte *page, int16 x, int16 y, byte transparentColor, byte bpp); int drawChar(char character, int x, int y); void drawBackground(); void renderOverlay(const Common::List::iterator &it); @@ -291,6 +292,7 @@ void drawSpriteRaw(const byte *spritePtr, const byte *maskPtr, int16 width, int1 void gfxDrawPlainBoxRaw(int16 x1, int16 y1, int16 x2, int16 y2, byte color, byte *page); void drawSpriteRaw2(const byte *spritePtr, byte transColor, int16 width, int16 height, byte *page, int16 x, int16 y); void maskBgOverlay(const byte *spritePtr, const byte *maskPtr, int16 width, int16 height, byte *page, int16 x, int16 y); +void drawOsSprite(overlay *overlayPtr, const byte *spritePtr, int16 width, int16 height, byte *page, int16 x, int16 y, byte transparentColor, byte bpp); void fadeFromBlack(); void fadeToBlack(); -- cgit v1.2.3 From c6c7b16089517917da755b02683a17712ffa39a2 Mon Sep 17 00:00:00 2001 From: Vincent Hamm Date: Thu, 9 Aug 2012 23:24:17 -0700 Subject: CINE: Slight cleanup. --- engines/cine/gfx.cpp | 3 +-- engines/cine/gfx.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index b22e57400d..742c6606b0 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -1225,7 +1225,6 @@ void OSRenderer::renderOverlay(const Common::List::iterator &it) { int len, idx, width, height; ObjectStruct *obj; AnimData *sprite; - byte *mask; byte color; switch (it->type) { @@ -1819,7 +1818,7 @@ void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 wi } delete[] pMask; -}; +} void drawSpriteRaw2(const byte *spritePtr, byte transColor, int16 width, int16 height, byte *page, int16 x, int16 y) { int16 i, j; diff --git a/engines/cine/gfx.h b/engines/cine/gfx.h index 8b21d839e4..6ff5b08b77 100644 --- a/engines/cine/gfx.h +++ b/engines/cine/gfx.h @@ -292,7 +292,6 @@ void drawSpriteRaw(const byte *spritePtr, const byte *maskPtr, int16 width, int1 void gfxDrawPlainBoxRaw(int16 x1, int16 y1, int16 x2, int16 y2, byte color, byte *page); void drawSpriteRaw2(const byte *spritePtr, byte transColor, int16 width, int16 height, byte *page, int16 x, int16 y); void maskBgOverlay(const byte *spritePtr, const byte *maskPtr, int16 width, int16 height, byte *page, int16 x, int16 y); -void drawOsSprite(overlay *overlayPtr, const byte *spritePtr, int16 width, int16 height, byte *page, int16 x, int16 y, byte transparentColor, byte bpp); void fadeFromBlack(); void fadeToBlack(); -- cgit v1.2.3 From 2d1a63c9305db01049ac0642169ac995442e77f8 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 11 Aug 2012 17:37:14 +0100 Subject: SCI: Add KQ5 Spanish DOS detection entry from bug #3555646. --- engines/sci/detection_tables.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index b39dad118e..d739891e8f 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -1326,6 +1326,21 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO5(GUIO_NOSPEECH, GAMEOPTION_EGA_UNDITHER, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // King's Quest 5 DOS Spanish Floppy 0.000.062 VGA (5 x 3.5" disks) + // Supplied by dianiu in bug report #3555646 + {"kq5", "", { + {"resource.map", 0, "c09896a2a30c9b002c5cbbc62f5a5c3a", 8169}, + {"resource.000", 0, "1f1d03aead44da46362ff40c0074a3ec", 335871}, + {"resource.001", 0, "d1803ad904127ae091edb274ee8c047f", 1180637}, + {"resource.002", 0, "d9cd5972016f650cc31fb7c2a2b0953a", 1102207}, + {"resource.003", 0, "829c8caeff793f3cfcea2cb01aaa4150", 965586}, + {"resource.004", 0, "0bd9e570ee04b025e43d3075998fae5b", 1117965}, + {"resource.005", 0, "4aaa2e9a69089b9afbaaccbbf2c4e647", 1202936}, + {"resource.006", 0, "65b520e60c4217e6a6572d9edf77193b", 1141985}, + {"resource.007", 0, "f42b0100f0a1c30806814f8648b6bc28", 1145583}, + AD_LISTEND}, + Common::ES_ESP, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // King's Quest 5 - German DOS Floppy (supplied by markcoolio in bug report #2727101, also includes english language) // SCI interpreter version 1.000.060 {"kq5", "", { -- cgit v1.2.3 From 1f91cc1aa0a21c80aa6d31934078b5d2a5e18f08 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 11 Aug 2012 17:55:31 +0100 Subject: SCI: Add PQ3 Spanish DOS detection entry from bug #3555647. --- engines/sci/detection_tables.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index d739891e8f..b978f40aba 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -2696,6 +2696,13 @@ static const struct ADGameDescription SciGameDescriptions[] = { AD_LISTEND}, Common::DE_DEU, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Police Quest 3 - Spanish DOS v1.000 - Supplied by dianiu in bug report #3555647 + {"pq3", "", { + {"resource.map", 0, "ffa0b4631c4e36d69631256d19ba29e7", 5421}, + {"resource.000", 0, "5ee460af3d70c06a745cc482b6c783ba", 5410263}, + AD_LISTEND}, + Common::ES_ESP, Common::kPlatformPC, ADGF_ADDENGLISH, GUIO4(GUIO_NOSPEECH, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, + // Police Quest 3 EGA // Reported by musiclyinspired in bug report #3046573 {"pq3", "", { -- cgit v1.2.3 From 21c057ce7545d9fbb1cd958d22cbce5716384882 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 11 Aug 2012 20:08:03 +0100 Subject: CINE: Fix lockup in Scene 5 when "operate Girl" underwater. Traced with gdb to sound.cpp:792 i.e. _fadeOutTimer infinite loop. This bug was introduced by the addition of the MT-32 output driver for Future Wars and associated mutex changes. The _fadeOutTimer increment is done by the timer callback occuring during the load method call, but this was excluded by the mutex. Fixed by moving the mutex in the load method. --- engines/cine/sound.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp index b2e992e8f6..52e1cdac7e 100644 --- a/engines/cine/sound.cpp +++ b/engines/cine/sound.cpp @@ -785,7 +785,6 @@ PCSoundFxPlayer::~PCSoundFxPlayer() { bool PCSoundFxPlayer::load(const char *song) { debug(9, "PCSoundFxPlayer::load('%s')", song); - Common::StackLock lock(_mutex); /* stop (w/ fade out) the previous song */ while (_fadeOutCounter != 0 && _fadeOutCounter < 100) { @@ -793,6 +792,8 @@ bool PCSoundFxPlayer::load(const char *song) { } _fadeOutCounter = 0; + Common::StackLock lock(_mutex); + stop(); _sfxData = readBundleSoundFile(song); -- cgit v1.2.3 From 78b8fa31ca49aae2218fb0bdd20fda28b99b15a9 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 11 Aug 2012 21:12:35 +0100 Subject: CINE: Fix typo in OS palette restore code. This fixes most cases of incorrect palette on savegame loading. Thanks to yaz0r for this fix. --- engines/cine/gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index 742c6606b0..8d73bae747 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -839,7 +839,7 @@ void OSRenderer::restorePalette(Common::SeekableReadStream &fHandle, int version fHandle.read(buf, kHighPalNumBytes); - if (colorCount == kHighPalNumBytes) { + if (colorCount == kHighPalNumColors) { // Load the active 256 color palette from file _activePal.load(buf, sizeof(buf), kHighPalFormat, kHighPalNumColors, CINE_LITTLE_ENDIAN); } else { -- cgit v1.2.3 From ab3b052c6f16843bda7bd1ded8a210d1192a389f Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 12 Aug 2012 00:19:44 +0100 Subject: GUI: Fix possible un-initialised variable usage in SaveLoadChooser. This was reported by valgrind, while looking at a different issue. --- gui/saveload.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 67d871e133..ac315cb6f6 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -44,6 +44,7 @@ enum { SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode) : Dialog("SaveLoadChooser"), _delSupport(0), _list(0), _chooseButton(0), _deleteButton(0), _gfxWidget(0) { _delSupport = _metaInfoSupport = _thumbnailSupport = _saveDateSupport = _playTimeSupport = false; + _fillR = _fillG = _fillB = 0; _backgroundType = ThemeEngine::kDialogBackgroundSpecial; -- cgit v1.2.3 From 813689d68cd055935eaa12f614608d1237866b83 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 12 Aug 2012 00:08:13 -0400 Subject: AUDIO: Move LimitingAudioStream to audio/ --- audio/audiostream.cpp | 38 ++++++++++++++++++++++++++++++++++++++ audio/audiostream.h | 10 ++++++++++ audio/decoders/quicktime.cpp | 39 ++------------------------------------- 3 files changed, 50 insertions(+), 37 deletions(-) diff --git a/audio/audiostream.cpp b/audio/audiostream.cpp index 1c5c435359..6e185702f0 100644 --- a/audio/audiostream.cpp +++ b/audio/audiostream.cpp @@ -386,4 +386,42 @@ Timestamp convertTimeToStreamPos(const Timestamp &where, int rate, bool isStereo return Timestamp(result.secs(), result.numberOfFrames(), result.framerate()); } +/** + * An AudioStream wrapper that cuts off the amount of samples read after a + * given time length is reached. + */ +class LimitingAudioStream : public AudioStream { +public: + LimitingAudioStream(AudioStream *parentStream, const Audio::Timestamp &length, DisposeAfterUse::Flag disposeAfterUse) : + _parentStream(parentStream), _samplesRead(0), _disposeAfterUse(disposeAfterUse), + _totalSamples(length.convertToFramerate(getRate()).totalNumberOfFrames() * getChannels()) {} + + ~LimitingAudioStream() { + if (_disposeAfterUse == DisposeAfterUse::YES) + delete _parentStream; + } + + int readBuffer(int16 *buffer, const int numSamples) { + // Cap us off so we don't read past _totalSamples + int samplesRead = _parentStream->readBuffer(buffer, MIN(numSamples, _totalSamples - _samplesRead)); + _samplesRead += samplesRead; + return samplesRead; + } + + bool endOfData() const { return _parentStream->endOfData() || _samplesRead >= _totalSamples; } + bool isStereo() const { return _parentStream->isStereo(); } + int getRate() const { return _parentStream->getRate(); } + +private: + int getChannels() const { return isStereo() ? 2 : 1; } + + AudioStream *_parentStream; + DisposeAfterUse::Flag _disposeAfterUse; + uint32 _totalSamples, _samplesRead; +}; + +AudioStream *makeLimitingAudioStream(AudioStream *parentStream, const Timestamp &length, DisposeAfterUse::Flag disposeAfterUse) { + return new LimitingAudioStream(parentStream, length, disposeAfterUse); +} + } // End of namespace Audio diff --git a/audio/audiostream.h b/audio/audiostream.h index 801f13d9d9..d6d4a16280 100644 --- a/audio/audiostream.h +++ b/audio/audiostream.h @@ -356,6 +356,16 @@ QueuingAudioStream *makeQueuingAudioStream(int rate, bool stereo); */ Timestamp convertTimeToStreamPos(const Timestamp &where, int rate, bool isStereo); +/** + * Factory function for an AudioStream wrapper that cuts off the amount of samples read after a + * given time length is reached. + * + * @param parentStream The stream to limit + * @param length The time length to limit the stream to + * @param disposeAfterUse Whether the parent stream object should be destroyed on destruction of the returned stream + */ +AudioStream *makeLimitingAudioStream(AudioStream *parentStream, const Timestamp &length, DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES); + } // End of namespace Audio #endif diff --git a/audio/decoders/quicktime.cpp b/audio/decoders/quicktime.cpp index 8874a61c2e..5276cfc530 100644 --- a/audio/decoders/quicktime.cpp +++ b/audio/decoders/quicktime.cpp @@ -61,41 +61,6 @@ private: bool _isStereo; }; -/** - * An AudioStream wrapper that cuts off the amount of samples read after a - * given time length is reached. - */ -class LimitingAudioStream : public AudioStream { -public: - LimitingAudioStream(AudioStream *parentStream, const Audio::Timestamp &length, - DisposeAfterUse::Flag disposeAfterUse = DisposeAfterUse::YES) : - _parentStream(parentStream), _samplesRead(0), _disposeAfterUse(disposeAfterUse), - _totalSamples(length.convertToFramerate(getRate()).totalNumberOfFrames() * getChannels()) {} - - ~LimitingAudioStream() { - if (_disposeAfterUse == DisposeAfterUse::YES) - delete _parentStream; - } - - int readBuffer(int16 *buffer, const int numSamples) { - // Cap us off so we don't read past _totalSamples - int samplesRead = _parentStream->readBuffer(buffer, MIN(numSamples, _totalSamples - _samplesRead)); - _samplesRead += samplesRead; - return samplesRead; - } - - bool endOfData() const { return _parentStream->endOfData() || _samplesRead >= _totalSamples; } - bool isStereo() const { return _parentStream->isStereo(); } - int getRate() const { return _parentStream->getRate(); } - -private: - int getChannels() const { return isStereo() ? 2 : 1; } - - AudioStream *_parentStream; - DisposeAfterUse::Flag _disposeAfterUse; - uint32 _totalSamples, _samplesRead; -}; - /** * An AudioStream wrapper that forces audio to be played in mono. * It currently just ignores the right channel if stereo. @@ -263,7 +228,7 @@ void QuickTimeAudioDecoder::QuickTimeAudioTrack::queueAudio(const Timestamp &len _skipSamples = Timestamp(); } - queueStream(new LimitingAudioStream(new SilentAudioStream(getRate(), isStereo()), editLength), editLength); + queueStream(makeLimitingAudioStream(new SilentAudioStream(getRate(), isStereo()), editLength), editLength); _curEdit++; enterNewEdit(nextEditTime); } else { @@ -289,7 +254,7 @@ void QuickTimeAudioDecoder::QuickTimeAudioTrack::queueAudio(const Timestamp &len // we move on to the next edit if (trackPosition >= nextEditTime || _curChunk >= _parentTrack->chunkCount) { chunkLength = nextEditTime.convertToFramerate(getRate()) - getCurrentTrackTime(); - stream = new LimitingAudioStream(stream, chunkLength); + stream = makeLimitingAudioStream(stream, chunkLength); _curEdit++; enterNewEdit(nextEditTime); -- cgit v1.2.3 From a458b91e7e4a1774d8dea1fe75966d834f43ee7b Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 12 Aug 2012 00:09:23 -0400 Subject: VIDEO: Add set/getStopTime functions to AdvancedVideoDecoder A video can now be stopped at a requested time --- video/video_decoder.cpp | 76 ++++++++++++++++++++++++++++++++++++++++++++++--- video/video_decoder.h | 22 ++++++++++---- 2 files changed, 88 insertions(+), 10 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 44b05c4345..b27a0c512b 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -103,6 +103,8 @@ AdvancedVideoDecoder::AdvancedVideoDecoder() { _pauseLevel = 0; _needsUpdate = false; _lastTimeChange = 0; + _stopTime = 0; + _stopTimeSet = false; // Find the best format for output _defaultHighColorFormat = g_system->getScreenFormat(); @@ -128,6 +130,8 @@ void AdvancedVideoDecoder::close() { _pauseLevel = 0; _needsUpdate = false; _lastTimeChange = 0; + _stopTime = 0; + _stopTimeSet = false; } bool AdvancedVideoDecoder::isVideoLoaded() const { @@ -247,6 +251,13 @@ bool AdvancedVideoDecoder::endOfVideo() const { if (!isVideoLoaded()) return true; + if (_stopTimeSet) { + const VideoTrack *track = findNextVideoTrack(); + + if (track && track->getNextFrameStartTime() >= (uint)_stopTime.msecs()) + return true; + } + for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) if (!(*it)->endOfTrack()) return false; @@ -314,12 +325,15 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) { if (!(*it)->seek(time)) return false; + _lastTimeChange = time; + // Now that we've seeked, start all tracks again - if (isPlaying()) + // Also reset our start time + if (isPlaying()) { startAudio(); + _startTime = g_system->getMillis() - time.msecs(); + } - _lastTimeChange = time; - _startTime = g_system->getMillis() - time.msecs(); resetPauseStartTime(); _needsUpdate = true; return true; @@ -331,7 +345,10 @@ void AdvancedVideoDecoder::start() { _isPlaying = true; _startTime = g_system->getMillis(); - _lastTimeChange = 0; + + // Adjust start time if we've seeked to something besides zero time + if (_lastTimeChange.totalNumberOfFrames() != 0) + _startTime -= _lastTimeChange.msecs(); // If someone previously called stop(), we'll rewind it. if (_needsRewind) @@ -471,6 +488,21 @@ void AdvancedVideoDecoder::AudioTrack::stop() { g_system->getMixer()->stopHandle(_handle); } +void AdvancedVideoDecoder::AudioTrack::start(const Audio::Timestamp &limit) { + stop(); + + Audio::AudioStream *stream = getAudioStream(); + assert(stream); + + stream = Audio::makeLimitingAudioStream(stream, limit, DisposeAfterUse::NO); + + g_system->getMixer()->playStream(getSoundType(), &_handle, stream, -1, getVolume(), getBalance(), DisposeAfterUse::YES); + + // Pause the audio again if we're still paused + if (isPaused()) + g_system->getMixer()->pauseHandle(_handle, true); +} + uint32 AdvancedVideoDecoder::AudioTrack::getRunningTime() const { if (g_system->getMixer()->isSoundHandleActive(_handle)) return g_system->getMixer()->getSoundElapsedTime(_handle); @@ -553,6 +585,29 @@ bool AdvancedVideoDecoder::addStreamFileTrack(const Common::String &baseName) { return result; } +void AdvancedVideoDecoder::setStopTime(const Audio::Timestamp &stopTime) { + Audio::Timestamp startTime = 0; + + if (isPlaying()) { + startTime = getTime(); + stopAudio(); + } + + _stopTime = stopTime; + _stopTimeSet = true; + + if (startTime > stopTime) + return; + + if (isPlaying()) { + // We'll assume the audio track is going to start up at the same time it just was + // and therefore not do any seeking. + // Might want to set it anyway if we're seekable. + startAudioLimit(_stopTime.msecs() - startTime.msecs()); + _lastTimeChange = startTime; + } +} + AdvancedVideoDecoder::Track *AdvancedVideoDecoder::getTrack(uint track) { if (track > _tracks.size()) return 0; @@ -614,6 +669,13 @@ const AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack } void AdvancedVideoDecoder::startAudio() { + if (_stopTimeSet) { + // HACK: Timestamp's subtraction asserts out when subtracting two times + // with different rates. + startAudioLimit(_stopTime - _lastTimeChange.convertToFramerate(_stopTime.framerate())); + return; + } + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) if ((*it)->getTrackType() == Track::kTrackTypeAudio) ((AudioTrack *)*it)->start(); @@ -625,6 +687,12 @@ void AdvancedVideoDecoder::stopAudio() { ((AudioTrack *)*it)->stop(); } +void AdvancedVideoDecoder::startAudioLimit(const Audio::Timestamp &limit) { + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + if ((*it)->getTrackType() == Track::kTrackTypeAudio) + ((AudioTrack *)*it)->start(limit); +} + ////////////////////////////////////////////// ///////////////// DEPRECATED ///////////////// ////////////////////////////////////////////// diff --git a/video/video_decoder.h b/video/video_decoder.h index 26078d5750..7e89caee40 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -379,14 +379,20 @@ public: */ void setDefaultHighColorFormat(const Graphics::PixelFormat &format) { _defaultHighColorFormat = format; } + /** + * Set the time for this video to stop at. At this time in the video, + * all audio will stop and endOfVideo() will return true. + */ + void setStopTime(const Audio::Timestamp &stopTime); + + /** + * Get the stop time of the video (if not set, zero) + */ + Audio::Timestamp getStopTime() const { return _stopTime; } + // Future API //void setRate(const Common::Rational &rate); //Common::Rational getRate() const; - //void setStartTime(const Audio::Timestamp &startTime); - //Audio::Timestamp getStartTime() const; - //void setStopTime(const Audio::Timestamp &stopTime); - //Audio::Timestamp getStopTime() const; - //void setSegment(const Audio::Timestamp &startTime, const Audio::Timestamp &stopTime); protected: // Old API @@ -579,6 +585,8 @@ protected: */ void stop(); + void start(const Audio::Timestamp &limit); + /** * Get the volume for this track */ @@ -773,7 +781,8 @@ private: // Current playback status bool _isPlaying, _needsRewind, _needsUpdate; - Audio::Timestamp _lastTimeChange; + Audio::Timestamp _lastTimeChange, _stopTime; + bool _stopTimeSet; // Palette settings from individual tracks mutable bool _dirtyPalette; @@ -785,6 +794,7 @@ private: // Internal helper functions void stopAudio(); void startAudio(); + void startAudioLimit(const Audio::Timestamp &limit); }; /** -- cgit v1.2.3 From 61af435d8a870a0630b5dea2ecf69cd58fc95946 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 12 Aug 2012 15:00:58 +1000 Subject: AGOS: Improve the quick load/save code. --- engines/agos/event.cpp | 6 +----- engines/agos/saveload.cpp | 44 +++++++++++++++++++++++++++++++------------- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp index ed26b96381..cc1c40c207 100644 --- a/engines/agos/event.cpp +++ b/engines/agos/event.cpp @@ -467,11 +467,7 @@ void AGOSEngine::delay(uint amount) { memset(_saveLoadName, 0, sizeof(_saveLoadName)); sprintf(_saveLoadName, "Quick %d", _saveLoadSlot); _saveLoadType = (event.kbd.hasFlags(Common::KBD_ALT)) ? 1 : 2; - - // We should only allow a load or save when it was possible in original - // This stops load/save during copy protection, conversations and cut scenes - if (!_mouseHideCount && !_showPreposition) - quickLoadOrSave(); + quickLoadOrSave(); } else if (event.kbd.hasFlags(Common::KBD_CTRL)) { if (event.kbd.keycode == Common::KEYCODE_a) { GUI::Dialog *_aboutDialog; diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index b3ec916b47..c6bca1a6e6 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -142,23 +142,41 @@ void AGOSEngine_Feeble::quickLoadOrSave() { } #endif +// The function uses segments of code from the original game scripts +// to allow quick loading and saving, but isn't perfect. +// +// Unfortuntely this allows loading and saving in locations, +// which aren't supported, and will not restore correctly: +// Various locations in Elvira 1/2 and Waxworks where saving +// was disabled void AGOSEngine::quickLoadOrSave() { - // The function uses segments of code from the original game scripts - // to allow quick loading and saving, but isn't perfect. - // - // Unfortuntely this allows loading and saving in locations, - // which aren't supported, and will not restore correctly: - // Any overhead maps in Simon the Sorcerer 2 - // Various locations in Elvira 1/2 and Waxworks where saving - // was disabled - - // The floppy disk demo of Simon the Sorcerer 1 doesn't work. - if (getFeatures() & GF_DEMO) - return; - bool success; Common::String buf; + // Disable loading and saving when it was not possible in the original: + // In overhead maps areas in Simon the Sorcerer 2 + // In the floppy disk demo of Simon the Sorcerer 1 + // In copy protection, conversations and cut scenes + if ((getGameType() == GType_SIMON2 && _boxStarHeight == 200) || + (getGameType() == GType_SIMON1 && (getFeatures() & GF_DEMO)) || + _mouseHideCount || _showPreposition) { + buf = Common::String::format("Quick load or save game isn't supported in this location"); + GUI::MessageDialog dialog(buf, "OK"); + dialog.runModal(); + return; + } + + // Check if Simon is walking, and stop when required + if (getGameType() == GType_SIMON1 && getBitFlag(11)) { + vcStopAnimation(11, 1122); + animate(4, 11, 1122, 0, 0, 2); + waitForSync(1122); + } else if (getGameType() == GType_SIMON2 && getBitFlag(11)) { + vcStopAnimation(11, 232); + animate(4, 11, 232, 0, 0, 2); + waitForSync(1122); + } + char *filename = genSaveName(_saveLoadSlot); if (_saveLoadType == 2) { Subroutine *sub; -- cgit v1.2.3 From 0817a02a7d69313d4649af27062c7e3d89c0d2c5 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 12 Aug 2012 01:20:13 -0400 Subject: MOHAWK: Use setStopTime() --- engines/mohawk/myst_stacks/dni.cpp | 2 +- engines/mohawk/video.cpp | 6 ++---- engines/mohawk/video.h | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/engines/mohawk/myst_stacks/dni.cpp b/engines/mohawk/myst_stacks/dni.cpp index cae165ccf0..d103105c2d 100644 --- a/engines/mohawk/myst_stacks/dni.cpp +++ b/engines/mohawk/myst_stacks/dni.cpp @@ -109,7 +109,7 @@ void Dni::o_handPage(uint16 op, uint16 var, uint16 argc, uint16 *argv) { _vm->setMainCursor(kDefaultMystCursor); // Play movie end (atrus leaving) - _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, 14813, 600), Audio::Timestamp(0xFFFFFFFF)); + _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, 14813, 600), _vm->_video->getDuration(atrus)); _vm->_video->setVideoLooping(atrus, false); _atrusLeft = true; diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index 3b4e61646d..5b811382ff 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -43,13 +43,12 @@ void VideoEntry::clear() { loop = false; enabled = false; start = Audio::Timestamp(0, 1); - end = Audio::Timestamp(0xFFFFFFFF, 1); // Largest possible, there is an endOfVideo() check anyway filename.clear(); id = -1; } bool VideoEntry::endOfVideo() { - return !video || video->endOfVideo() || video->getTime() >= (uint)end.msecs(); + return !video || video->endOfVideo(); } VideoManager::VideoManager(MohawkEngine* vm) : _vm(vm) { @@ -514,13 +513,12 @@ bool VideoManager::isVideoPlaying() { void VideoManager::setVideoBounds(VideoHandle handle, Audio::Timestamp start, Audio::Timestamp end) { assert(handle != NULL_VID_HANDLE); _videoStreams[handle].start = start; - _videoStreams[handle].end = end; + _videoStreams[handle]->setStopTime(end); _videoStreams[handle]->seek(start); } void VideoManager::drawVideoFrame(VideoHandle handle, Audio::Timestamp time) { assert(handle != NULL_VID_HANDLE); - _videoStreams[handle].end = Audio::Timestamp(0xffffffff, 1); _videoStreams[handle]->seek(time); updateMovies(); delete _videoStreams[handle].video; diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h index 937cd0f2dd..4e34604bfd 100644 --- a/engines/mohawk/video.h +++ b/engines/mohawk/video.h @@ -50,7 +50,7 @@ struct VideoEntry { uint16 y; bool loop; bool enabled; - Audio::Timestamp start, end; + Audio::Timestamp start; // Identification Common::String filename; // External video files -- cgit v1.2.3 From 48c591a233b403193b897c76d2e61a0f8a4f6805 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 12 Aug 2012 08:33:45 -0400 Subject: VIDEO: Don't allow adding external stream files to unopened videos --- video/video_decoder.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index b27a0c512b..0108888613 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -575,6 +575,10 @@ void AdvancedVideoDecoder::addTrack(Track *track) { } bool AdvancedVideoDecoder::addStreamFileTrack(const Common::String &baseName) { + // Only allow adding external tracks if a video is already loaded + if (!isVideoLoaded()) + return false; + StreamFileAudioTrack *track = new StreamFileAudioTrack(); bool result = track->loadFromFile(baseName); -- cgit v1.2.3 From 5db42076b87766d29cbcdd153446992bc661aa73 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 12 Aug 2012 08:43:32 -0400 Subject: VIDEO: Convert FlicDecoder to the new AdvancedVideoDecoder API The video no longer automatically loops (unused in-tree) and must have rewind() called manually --- engines/tucker/sequences.cpp | 4 +- video/flic_decoder.cpp | 299 ++++++++++++++++++++++++------------------- video/flic_decoder.h | 101 ++++++++------- 3 files changed, 226 insertions(+), 178 deletions(-) diff --git a/engines/tucker/sequences.cpp b/engines/tucker/sequences.cpp index 775fd6f1a0..16c4f4f6f0 100644 --- a/engines/tucker/sequences.cpp +++ b/engines/tucker/sequences.cpp @@ -28,6 +28,7 @@ #include "audio/decoders/wave.h" #include "graphics/palette.h" +#include "graphics/surface.h" #include "tucker/tucker.h" #include "tucker/graphics.h" @@ -749,6 +750,7 @@ void AnimationSequencePlayer::openAnimation(int index, const char *fileName) { _seqNum = 1; return; } + _flicPlayer[index].start(); _flicPlayer[index].decodeNextFrame(); if (index == 0) { getRGBPalette(index); @@ -801,7 +803,7 @@ void AnimationSequencePlayer::playIntroSeq19_20() { if (_flicPlayer[0].getCurFrame() >= 115) { surface = _flicPlayer[1].decodeNextFrame(); if (_flicPlayer[1].endOfVideo()) - _flicPlayer[1].reset(); + _flicPlayer[1].rewind(); } bool framesLeft = decodeNextAnimationFrame(0, false); diff --git a/video/flic_decoder.cpp b/video/flic_decoder.cpp index bdcdedc142..564d73a9d7 100644 --- a/video/flic_decoder.cpp +++ b/video/flic_decoder.cpp @@ -26,13 +26,11 @@ #include "common/stream.h" #include "common/system.h" #include "common/textconsole.h" +#include "graphics/surface.h" namespace Video { FlicDecoder::FlicDecoder() { - _paletteChanged = false; - _fileStream = 0; - _surface = 0; } FlicDecoder::~FlicDecoder() { @@ -42,35 +40,59 @@ FlicDecoder::~FlicDecoder() { bool FlicDecoder::loadStream(Common::SeekableReadStream *stream) { close(); - _fileStream = stream; - - /* uint32 frameSize = */ _fileStream->readUint32LE(); - uint16 frameType = _fileStream->readUint16LE(); + /* uint32 frameSize = */ stream->readUint32LE(); + uint16 frameType = stream->readUint16LE(); // Check FLC magic number if (frameType != 0xAF12) { - warning("FlicDecoder::FlicDecoder(): attempted to load non-FLC data (type = 0x%04X)", frameType); - delete _fileStream; - _fileStream = 0; + warning("FlicDecoder::loadStream(): attempted to load non-FLC data (type = 0x%04X)", frameType); return false; } - - _frameCount = _fileStream->readUint16LE(); - uint16 width = _fileStream->readUint16LE(); - uint16 height = _fileStream->readUint16LE(); - uint16 colorDepth = _fileStream->readUint16LE(); + uint16 frameCount = stream->readUint16LE(); + uint16 width = stream->readUint16LE(); + uint16 height = stream->readUint16LE(); + uint16 colorDepth = stream->readUint16LE(); if (colorDepth != 8) { - warning("FlicDecoder::FlicDecoder(): attempted to load an FLC with a palette of color depth %d. Only 8-bit color palettes are supported", frameType); - delete _fileStream; - _fileStream = 0; + warning("FlicDecoder::loadStream(): attempted to load an FLC with a palette of color depth %d. Only 8-bit color palettes are supported", colorDepth); return false; } + addTrack(new FlicVideoTrack(stream, frameCount, width, height)); + return true; +} + +const Common::List *FlicDecoder::getDirtyRects() const { + const Track *track = getTrack(0); + + if (track) + return ((const FlicVideoTrack *)track)->getDirtyRects(); + + return 0; +} + +void FlicDecoder::clearDirtyRects() { + Track *track = getTrack(0); + + if (track) + ((FlicVideoTrack *)track)->clearDirtyRects(); +} + +void FlicDecoder::copyDirtyRectsToBuffer(uint8 *dst, uint pitch) { + Track *track = getTrack(0); + + if (track) + ((FlicVideoTrack *)track)->copyDirtyRectsToBuffer(dst, pitch); +} + +FlicDecoder::FlicVideoTrack::FlicVideoTrack(Common::SeekableReadStream *stream, uint16 frameCount, uint16 width, uint16 height) { + _fileStream = stream; + _frameCount = frameCount; + _fileStream->readUint16LE(); // flags // Note: The normal delay is a 32-bit integer (dword), whereas the overridden delay is a 16-bit integer (word) // the frame delay is the FLIC "speed", in milliseconds. - _frameRate = Common::Rational(1000, _fileStream->readUint32LE()); + _frameDelay = _startFrameDelay = _fileStream->readUint32LE(); _fileStream->seek(80); _offsetFrame1 = _fileStream->readUint32LE(); @@ -78,112 +100,53 @@ bool FlicDecoder::loadStream(Common::SeekableReadStream *stream) { _surface = new Graphics::Surface(); _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8()); - _palette = (byte *)malloc(3 * 256); + _palette = new byte[3 * 256]; memset(_palette, 0, 3 * 256); - _paletteChanged = false; + _dirtyPalette = false; + + _curFrame = -1; + _nextFrameStartTime = 0; + _atRingFrame = false; // Seek to the first frame _fileStream->seek(_offsetFrame1); - return true; } -void FlicDecoder::close() { - if (!_fileStream) - return; - +FlicDecoder::FlicVideoTrack::~FlicVideoTrack() { delete _fileStream; - _fileStream = 0; + delete[] _palette; _surface->free(); delete _surface; - _surface = 0; - - free(_palette); - _dirtyRects.clear(); - - reset(); } -void FlicDecoder::decodeByteRun(uint8 *data) { - byte *ptr = (byte *)_surface->pixels; - while ((int32)(ptr - (byte *)_surface->pixels) < (getWidth() * getHeight())) { - int chunks = *data++; - while (chunks--) { - int count = (int8)*data++; - if (count > 0) { - memset(ptr, *data++, count); - } else { - count = -count; - memcpy(ptr, data, count); - data += count; - } - ptr += count; - } - } - - // Redraw - _dirtyRects.clear(); - _dirtyRects.push_back(Common::Rect(0, 0, getWidth(), getHeight())); +bool FlicDecoder::FlicVideoTrack::endOfTrack() const { + return getCurFrame() >= getFrameCount() - 1; } -#define OP_PACKETCOUNT 0 -#define OP_UNDEFINED 1 -#define OP_LASTPIXEL 2 -#define OP_LINESKIPCOUNT 3 +bool FlicDecoder::FlicVideoTrack::rewind() { + _curFrame = -1; + _nextFrameStartTime = 0; -void FlicDecoder::decodeDeltaFLC(uint8 *data) { - uint16 linesInChunk = READ_LE_UINT16(data); data += 2; - uint16 currentLine = 0; - uint16 packetCount = 0; - - while (linesInChunk--) { - uint16 opcode; - - // First process all the opcodes. - do { - opcode = READ_LE_UINT16(data); data += 2; + if (endOfTrack() && _fileStream->pos() < _fileStream->size()) + _atRingFrame = true; + else + _fileStream->seek(_offsetFrame1); - switch ((opcode >> 14) & 3) { - case OP_PACKETCOUNT: - packetCount = opcode; - break; - case OP_UNDEFINED: - break; - case OP_LASTPIXEL: - *((byte *)_surface->pixels + currentLine * getWidth() + getWidth() - 1) = (opcode & 0xFF); - _dirtyRects.push_back(Common::Rect(getWidth() - 1, currentLine, getWidth(), currentLine + 1)); - break; - case OP_LINESKIPCOUNT: - currentLine += -(int16)opcode; - break; - } - } while (((opcode >> 14) & 3) != OP_PACKETCOUNT); + _frameDelay = _startFrameDelay; + return true; +} - uint16 column = 0; +uint16 FlicDecoder::FlicVideoTrack::getWidth() const { + return _surface->w; +} - // Now interpret the RLE data - while (packetCount--) { - column += *data++; - int rleCount = (int8)*data++; - if (rleCount > 0) { - memcpy((byte *)_surface->pixels + (currentLine * getWidth()) + column, data, rleCount * 2); - data += rleCount * 2; - _dirtyRects.push_back(Common::Rect(column, currentLine, column + rleCount * 2, currentLine + 1)); - } else if (rleCount < 0) { - rleCount = -rleCount; - uint16 dataWord = READ_UINT16(data); data += 2; - for (int i = 0; i < rleCount; ++i) { - WRITE_UINT16((byte *)_surface->pixels + currentLine * getWidth() + column + i * 2, dataWord); - } - _dirtyRects.push_back(Common::Rect(column, currentLine, column + rleCount * 2, currentLine + 1)); - } else { // End of cutscene ? - return; - } - column += rleCount * 2; - } +uint16 FlicDecoder::FlicVideoTrack::getHeight() const { + return _surface->h; +} - currentLine++; - } +Graphics::PixelFormat FlicDecoder::FlicVideoTrack::getPixelFormat() const { + return _surface->format; } #define FLI_SETPAL 4 @@ -192,7 +155,7 @@ void FlicDecoder::decodeDeltaFLC(uint8 *data) { #define PSTAMP 18 #define FRAME_TYPE 0xF1FA -const Graphics::Surface *FlicDecoder::decodeNextFrame() { +const Graphics::Surface *FlicDecoder::FlicVideoTrack::decodeNextFrame() { // Read chunk uint32 frameSize = _fileStream->readUint32LE(); uint16 frameType = _fileStream->readUint16LE(); @@ -209,7 +172,7 @@ const Graphics::Surface *FlicDecoder::decodeNextFrame() { // the frame delay is the FLIC "speed", in milliseconds. uint16 newFrameDelay = _fileStream->readUint16LE(); // "speed", in milliseconds if (newFrameDelay > 0) - _frameRate = Common::Rational(1000, newFrameDelay); + _frameDelay = newFrameDelay; _fileStream->readUint16LE(); // reserved, always 0 uint16 newWidth = _fileStream->readUint16LE(); @@ -240,10 +203,11 @@ const Graphics::Surface *FlicDecoder::decodeNextFrame() { frameType = _fileStream->readUint16LE(); uint8 *data = new uint8[frameSize - 6]; _fileStream->read(data, frameSize - 6); + switch (frameType) { case FLI_SETPAL: unpackPalette(data); - _paletteChanged = true; + _dirtyPalette = true; break; case FLI_SS2: decodeDeltaFLC(data); @@ -264,26 +228,111 @@ const Graphics::Surface *FlicDecoder::decodeNextFrame() { } _curFrame++; + _nextFrameStartTime += _frameDelay; - // If we just processed the ring frame, set the next frame - if (_curFrame == (int32)_frameCount) { - _curFrame = 0; + if (_atRingFrame) { + // If we decoded the ring frame, seek to the second frame + _atRingFrame = false; _fileStream->seek(_offsetFrame2); } - if (_curFrame == 0) - _startTime = g_system->getMillis(); - return _surface; } -void FlicDecoder::reset() { - FixedRateVideoDecoder::reset(); - if (_fileStream) - _fileStream->seek(_offsetFrame1); +void FlicDecoder::FlicVideoTrack::copyDirtyRectsToBuffer(uint8 *dst, uint pitch) { + for (Common::List::const_iterator it = _dirtyRects.begin(); it != _dirtyRects.end(); ++it) { + for (int y = (*it).top; y < (*it).bottom; ++y) { + const int x = (*it).left; + memcpy(dst + y * pitch + x, (byte *)_surface->pixels + y * getWidth() + x, (*it).right - x); + } + } + + clearDirtyRects(); } -void FlicDecoder::unpackPalette(uint8 *data) { +void FlicDecoder::FlicVideoTrack::decodeByteRun(uint8 *data) { + byte *ptr = (byte *)_surface->pixels; + while ((int32)(ptr - (byte *)_surface->pixels) < (getWidth() * getHeight())) { + int chunks = *data++; + while (chunks--) { + int count = (int8)*data++; + if (count > 0) { + memset(ptr, *data++, count); + } else { + count = -count; + memcpy(ptr, data, count); + data += count; + } + ptr += count; + } + } + + // Redraw + _dirtyRects.clear(); + _dirtyRects.push_back(Common::Rect(0, 0, getWidth(), getHeight())); +} + +#define OP_PACKETCOUNT 0 +#define OP_UNDEFINED 1 +#define OP_LASTPIXEL 2 +#define OP_LINESKIPCOUNT 3 + +void FlicDecoder::FlicVideoTrack::decodeDeltaFLC(uint8 *data) { + uint16 linesInChunk = READ_LE_UINT16(data); data += 2; + uint16 currentLine = 0; + uint16 packetCount = 0; + + while (linesInChunk--) { + uint16 opcode; + + // First process all the opcodes. + do { + opcode = READ_LE_UINT16(data); data += 2; + + switch ((opcode >> 14) & 3) { + case OP_PACKETCOUNT: + packetCount = opcode; + break; + case OP_UNDEFINED: + break; + case OP_LASTPIXEL: + *((byte *)_surface->pixels + currentLine * getWidth() + getWidth() - 1) = (opcode & 0xFF); + _dirtyRects.push_back(Common::Rect(getWidth() - 1, currentLine, getWidth(), currentLine + 1)); + break; + case OP_LINESKIPCOUNT: + currentLine += -(int16)opcode; + break; + } + } while (((opcode >> 14) & 3) != OP_PACKETCOUNT); + + uint16 column = 0; + + // Now interpret the RLE data + while (packetCount--) { + column += *data++; + int rleCount = (int8)*data++; + if (rleCount > 0) { + memcpy((byte *)_surface->pixels + (currentLine * getWidth()) + column, data, rleCount * 2); + data += rleCount * 2; + _dirtyRects.push_back(Common::Rect(column, currentLine, column + rleCount * 2, currentLine + 1)); + } else if (rleCount < 0) { + rleCount = -rleCount; + uint16 dataWord = READ_UINT16(data); data += 2; + for (int i = 0; i < rleCount; ++i) { + WRITE_UINT16((byte *)_surface->pixels + currentLine * getWidth() + column + i * 2, dataWord); + } + _dirtyRects.push_back(Common::Rect(column, currentLine, column + rleCount * 2, currentLine + 1)); + } else { // End of cutscene ? + return; + } + column += rleCount * 2; + } + + currentLine++; + } +} + +void FlicDecoder::FlicVideoTrack::unpackPalette(uint8 *data) { uint16 numPackets = READ_LE_UINT16(data); data += 2; if (0 == READ_LE_UINT16(data)) { //special case @@ -308,14 +357,4 @@ void FlicDecoder::unpackPalette(uint8 *data) { } } -void FlicDecoder::copyDirtyRectsToBuffer(uint8 *dst, uint pitch) { - for (Common::List::const_iterator it = _dirtyRects.begin(); it != _dirtyRects.end(); ++it) { - for (int y = (*it).top; y < (*it).bottom; ++y) { - const int x = (*it).left; - memcpy(dst + y * pitch + x, (byte *)_surface->pixels + y * getWidth() + x, (*it).right - x); - } - } - _dirtyRects.clear(); -} - } // End of namespace Video diff --git a/video/flic_decoder.h b/video/flic_decoder.h index 9badc3da2e..9b82161ca5 100644 --- a/video/flic_decoder.h +++ b/video/flic_decoder.h @@ -25,15 +25,17 @@ #include "video/video_decoder.h" #include "common/list.h" -#include "common/rational.h" #include "common/rect.h" -#include "graphics/pixelformat.h" -#include "graphics/surface.h" namespace Common { class SeekableReadStream; } +namespace Graphics { +struct PixelFormat; +struct Surface; +} + namespace Video { /** @@ -42,58 +44,63 @@ namespace Video { * Video decoder used in engines: * - tucker */ -class FlicDecoder : public FixedRateVideoDecoder { +class FlicDecoder : public AdvancedVideoDecoder { public: FlicDecoder(); virtual ~FlicDecoder(); - /** - * Load a video file - * @param stream the stream to load - */ bool loadStream(Common::SeekableReadStream *stream); - void close(); - - /** - * Decode the next frame and return the frame's surface - * @note the return surface should *not* be freed - * @note this may return 0, in which case the last frame should be kept on screen - */ - const Graphics::Surface *decodeNextFrame(); - - bool isVideoLoaded() const { return _fileStream != 0; } - uint16 getWidth() const { return _surface->w; } - uint16 getHeight() const { return _surface->h; } - uint32 getFrameCount() const { return _frameCount; } - Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); } - - const Common::List *getDirtyRects() const { return &_dirtyRects; } - void clearDirtyRects() { _dirtyRects.clear(); } - void copyDirtyRectsToBuffer(uint8 *dst, uint pitch); - - const byte *getPalette() { _paletteChanged = false; return _palette; } - bool hasDirtyPalette() const { return _paletteChanged; } - void reset(); -protected: - Common::Rational getFrameRate() const { return _frameRate; } + const Common::List *getDirtyRects() const; + void clearDirtyRects(); + void copyDirtyRectsToBuffer(uint8 *dst, uint pitch); private: - uint16 _offsetFrame1; - uint16 _offsetFrame2; - byte *_palette; - bool _paletteChanged; - - void decodeByteRun(uint8 *data); - void decodeDeltaFLC(uint8 *data); - void unpackPalette(uint8 *mem); - - Common::SeekableReadStream *_fileStream; - Graphics::Surface *_surface; - uint32 _frameCount; - Common::Rational _frameRate; - - Common::List _dirtyRects; + class FlicVideoTrack : public VideoTrack { + public: + FlicVideoTrack(Common::SeekableReadStream *stream, uint16 frameCount, uint16 width, uint16 height); + ~FlicVideoTrack(); + + bool endOfTrack() const; + bool isRewindable() const { return true; } + bool rewind(); + + uint16 getWidth() const; + uint16 getHeight() const; + Graphics::PixelFormat getPixelFormat() const; + int getCurFrame() const { return _curFrame; } + int getFrameCount() const { return _frameCount; } + uint32 getNextFrameStartTime() const { return _nextFrameStartTime; } + const Graphics::Surface *decodeNextFrame(); + const byte *getPalette() const { _dirtyPalette = false; return _palette; } + bool hasDirtyPalette() const { return _dirtyPalette; } + + const Common::List *getDirtyRects() const { return &_dirtyRects; } + void clearDirtyRects() { _dirtyRects.clear(); } + void copyDirtyRectsToBuffer(uint8 *dst, uint pitch); + + private: + Common::SeekableReadStream *_fileStream; + Graphics::Surface *_surface; + + int _curFrame; + bool _atRingFrame; + + uint16 _offsetFrame1; + uint16 _offsetFrame2; + byte *_palette; + mutable bool _dirtyPalette; + + uint32 _frameCount; + uint32 _frameDelay, _startFrameDelay; + uint32 _nextFrameStartTime; + + Common::List _dirtyRects; + + void decodeByteRun(uint8 *data); + void decodeDeltaFLC(uint8 *data); + void unpackPalette(uint8 *mem); + }; }; } // End of namespace Video -- cgit v1.2.3 From e7cd238809520c9f3ee7ee820b3a106b7f72c2e2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 12 Aug 2012 14:56:20 +0200 Subject: GUI: Remove left-over code from theme based fill color in thumbnail display. --- gui/saveload-dialog.cpp | 9 +++------ gui/saveload-dialog.h | 2 -- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 0b36ff5d59..8e214bce90 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -188,8 +188,6 @@ enum { SaveLoadChooserSimple::SaveLoadChooserSimple(const String &title, const String &buttonLabel, bool saveMode) : SaveLoadChooserDialog("SaveLoadChooser", saveMode), _list(0), _chooseButton(0), _deleteButton(0), _gfxWidget(0) { - _fillR = _fillG = _fillB = 0; - _backgroundType = ThemeEngine::kDialogBackgroundSpecial; new StaticTextWidget(this, "SaveLoadChooser.Title", title); @@ -327,9 +325,6 @@ void SaveLoadChooserSimple::reflowLayout() { _playtime->setVisible(_playTimeSupport); - _fillR = 0; - _fillG = 0; - _fillB = 0; updateSelection(false); } else { _container->setVisible(false); @@ -349,7 +344,9 @@ void SaveLoadChooserSimple::updateSelection(bool redraw) { bool isWriteProtected = false; bool startEditMode = _list->isEditable(); - _gfxWidget->setGfx(-1, -1, _fillR, _fillG, _fillB); + // We used to support letting the themes specify the fill color with our + // initial theme based GUI. But this support was dropped. + _gfxWidget->setGfx(-1, -1, 0, 0, 0); _date->setLabel(_("No date saved")); _time->setLabel(_("No time saved")); _playtime->setLabel(_("No playtime saved")); diff --git a/gui/saveload-dialog.h b/gui/saveload-dialog.h index 50b7d419b7..9d0350d69d 100644 --- a/gui/saveload-dialog.h +++ b/gui/saveload-dialog.h @@ -119,8 +119,6 @@ private: SaveStateList _saveList; String _resultString; - uint8 _fillR, _fillG, _fillB; - void updateSaveList(); void updateSelection(bool redraw); }; -- cgit v1.2.3 From 7831225b280d08779bc0d40e76bbbef1e183471a Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 12 Aug 2012 08:58:00 -0400 Subject: VIDEO: Move TheoraDecoder to video/ --- engines/sword25/fmv/movieplayer.h | 4 +- engines/sword25/fmv/theora_decoder.cpp | 565 --------------------------------- engines/sword25/fmv/theora_decoder.h | 144 --------- engines/sword25/module.mk | 5 - video/module.mk | 5 + video/theora_decoder.cpp | 563 ++++++++++++++++++++++++++++++++ video/theora_decoder.h | 144 +++++++++ 7 files changed, 714 insertions(+), 716 deletions(-) delete mode 100644 engines/sword25/fmv/theora_decoder.cpp delete mode 100644 engines/sword25/fmv/theora_decoder.h create mode 100644 video/theora_decoder.cpp create mode 100644 video/theora_decoder.h diff --git a/engines/sword25/fmv/movieplayer.h b/engines/sword25/fmv/movieplayer.h index 1d256e56ba..2f5614b505 100644 --- a/engines/sword25/fmv/movieplayer.h +++ b/engines/sword25/fmv/movieplayer.h @@ -39,7 +39,7 @@ #include "sword25/gfx/bitmap.h" #ifdef USE_THEORADEC -#include "sword25/fmv/theora_decoder.h" +#include "video/theora_decoder.h" #endif #define THEORA_INDIRECT_RENDERING @@ -141,7 +141,7 @@ private: #ifdef USE_THEORADEC - TheoraDecoder _decoder; + Video::TheoraDecoder _decoder; Graphics::Surface *_backSurface; int _outX, _outY; diff --git a/engines/sword25/fmv/theora_decoder.cpp b/engines/sword25/fmv/theora_decoder.cpp deleted file mode 100644 index d38f5a26cf..0000000000 --- a/engines/sword25/fmv/theora_decoder.cpp +++ /dev/null @@ -1,565 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -/* - * Source is based on the player example from libvorbis package, - * available at: http://svn.xiph.org/trunk/theora/examples/player_example.c - * - * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. - * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS - * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE - * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. - * - * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 - * by the Xiph.Org Foundation and contributors http://www.xiph.org/ - * - */ - -#include "sword25/fmv/theora_decoder.h" - -#ifdef USE_THEORADEC -#include "common/system.h" -#include "common/textconsole.h" -#include "common/util.h" -#include "graphics/yuv_to_rgb.h" -#include "audio/decoders/raw.h" -#include "sword25/kernel/common.h" - -namespace Sword25 { - -#define AUDIOFD_FRAGSIZE 10240 - -static double rint(double v) { - return floor(v + 0.5); -} - -TheoraDecoder::TheoraDecoder(Audio::Mixer::SoundType soundType) { - _fileStream = 0; - - _theoraPacket = 0; - _vorbisPacket = 0; - _theoraDecode = 0; - _theoraSetup = 0; - _nextFrameStartTime = 0.0; - - _soundType = soundType; - _audStream = 0; - _audHandle = new Audio::SoundHandle(); - - ogg_sync_init(&_oggSync); - - _curFrame = -1; - _audiobuf = (ogg_int16_t *)malloc(AUDIOFD_FRAGSIZE * sizeof(ogg_int16_t)); - - reset(); -} - -TheoraDecoder::~TheoraDecoder() { - close(); - delete _fileStream; - delete _audHandle; - free(_audiobuf); -} - -void TheoraDecoder::queuePage(ogg_page *page) { - if (_theoraPacket) - ogg_stream_pagein(&_theoraOut, page); - - if (_vorbisPacket) - ogg_stream_pagein(&_vorbisOut, page); -} - -int TheoraDecoder::bufferData() { - char *buffer = ogg_sync_buffer(&_oggSync, 4096); - int bytes = _fileStream->read(buffer, 4096); - - ogg_sync_wrote(&_oggSync, bytes); - - return bytes; -} - -bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) { - close(); - - _endOfAudio = false; - _endOfVideo = false; - _fileStream = stream; - - // start up Ogg stream synchronization layer - ogg_sync_init(&_oggSync); - - // init supporting Vorbis structures needed in header parsing - vorbis_info_init(&_vorbisInfo); - vorbis_comment_init(&_vorbisComment); - - // init supporting Theora structures needed in header parsing - th_comment_init(&_theoraComment); - th_info_init(&_theoraInfo); - - // Ogg file open; parse the headers - // Only interested in Vorbis/Theora streams - bool foundHeader = false; - while (!foundHeader) { - int ret = bufferData(); - - if (ret == 0) - break; - - while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) { - ogg_stream_state test; - - // is this a mandated initial header? If not, stop parsing - if (!ogg_page_bos(&_oggPage)) { - // don't leak the page; get it into the appropriate stream - queuePage(&_oggPage); - foundHeader = true; - break; - } - - ogg_stream_init(&test, ogg_page_serialno(&_oggPage)); - ogg_stream_pagein(&test, &_oggPage); - ogg_stream_packetout(&test, &_oggPacket); - - // identify the codec: try theora - if (!_theoraPacket && th_decode_headerin(&_theoraInfo, &_theoraComment, &_theoraSetup, &_oggPacket) >= 0) { - // it is theora - memcpy(&_theoraOut, &test, sizeof(test)); - _theoraPacket = 1; - } else if (!_vorbisPacket && vorbis_synthesis_headerin(&_vorbisInfo, &_vorbisComment, &_oggPacket) >= 0) { - // it is vorbis - memcpy(&_vorbisOut, &test, sizeof(test)); - _vorbisPacket = 1; - } else { - // whatever it is, we don't care about it - ogg_stream_clear(&test); - } - } - // fall through to non-bos page parsing - } - - // we're expecting more header packets. - while ((_theoraPacket && _theoraPacket < 3) || (_vorbisPacket && _vorbisPacket < 3)) { - int ret; - - // look for further theora headers - while (_theoraPacket && (_theoraPacket < 3) && (ret = ogg_stream_packetout(&_theoraOut, &_oggPacket))) { - if (ret < 0) - error("Error parsing Theora stream headers; corrupt stream?"); - - if (!th_decode_headerin(&_theoraInfo, &_theoraComment, &_theoraSetup, &_oggPacket)) - error("Error parsing Theora stream headers; corrupt stream?"); - - _theoraPacket++; - } - - // look for more vorbis header packets - while (_vorbisPacket && (_vorbisPacket < 3) && (ret = ogg_stream_packetout(&_vorbisOut, &_oggPacket))) { - if (ret < 0) - error("Error parsing Vorbis stream headers; corrupt stream?"); - - if (vorbis_synthesis_headerin(&_vorbisInfo, &_vorbisComment, &_oggPacket)) - error("Error parsing Vorbis stream headers; corrupt stream?"); - - _vorbisPacket++; - - if (_vorbisPacket == 3) - break; - } - - // The header pages/packets will arrive before anything else we - // care about, or the stream is not obeying spec - - if (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) { - queuePage(&_oggPage); // demux into the appropriate stream - } else { - ret = bufferData(); // someone needs more data - - if (ret == 0) - error("End of file while searching for codec headers."); - } - } - - // and now we have it all. initialize decoders - if (_theoraPacket) { - _theoraDecode = th_decode_alloc(&_theoraInfo, _theoraSetup); - debugN(1, "Ogg logical stream %lx is Theora %dx%d %.02f fps", - _theoraOut.serialno, _theoraInfo.pic_width, _theoraInfo.pic_height, - (double)_theoraInfo.fps_numerator / _theoraInfo.fps_denominator); - - switch (_theoraInfo.pixel_fmt) { - case TH_PF_420: - debug(1, " 4:2:0 video"); - break; - case TH_PF_422: - debug(1, " 4:2:2 video"); - break; - case TH_PF_444: - debug(1, " 4:4:4 video"); - break; - case TH_PF_RSVD: - default: - debug(1, " video\n (UNKNOWN Chroma sampling!)"); - break; - } - - if (_theoraInfo.pic_width != _theoraInfo.frame_width || _theoraInfo.pic_height != _theoraInfo.frame_height) - debug(1, " Frame content is %dx%d with offset (%d,%d).", - _theoraInfo.frame_width, _theoraInfo.frame_height, _theoraInfo.pic_x, _theoraInfo.pic_y); - - switch (_theoraInfo.colorspace){ - case TH_CS_UNSPECIFIED: - /* nothing to report */ - break; - case TH_CS_ITU_REC_470M: - debug(1, " encoder specified ITU Rec 470M (NTSC) color."); - break; - case TH_CS_ITU_REC_470BG: - debug(1, " encoder specified ITU Rec 470BG (PAL) color."); - break; - default: - debug(1, "warning: encoder specified unknown colorspace (%d).", _theoraInfo.colorspace); - break; - } - - debug(1, "Encoded by %s", _theoraComment.vendor); - if (_theoraComment.comments) { - debug(1, "theora comment header:"); - for (int i = 0; i < _theoraComment.comments; i++) { - if (_theoraComment.user_comments[i]) { - int len = _theoraComment.comment_lengths[i]; - char *value = (char *)malloc(len + 1); - if (value) { - memcpy(value, _theoraComment.user_comments[i], len); - value[len] = '\0'; - debug(1, "\t%s", value); - free(value); - } - } - } - } - - th_decode_ctl(_theoraDecode, TH_DECCTL_GET_PPLEVEL_MAX, &_ppLevelMax, sizeof(_ppLevelMax)); - _ppLevel = _ppLevelMax; - th_decode_ctl(_theoraDecode, TH_DECCTL_SET_PPLEVEL, &_ppLevel, sizeof(_ppLevel)); - _ppInc = 0; - } else { - // tear down the partial theora setup - th_info_clear(&_theoraInfo); - th_comment_clear(&_theoraComment); - } - - th_setup_free(_theoraSetup); - _theoraSetup = 0; - - if (_vorbisPacket) { - vorbis_synthesis_init(&_vorbisDSP, &_vorbisInfo); - vorbis_block_init(&_vorbisDSP, &_vorbisBlock); - debug(3, "Ogg logical stream %lx is Vorbis %d channel %ld Hz audio.", - _vorbisOut.serialno, _vorbisInfo.channels, _vorbisInfo.rate); - - _audStream = Audio::makeQueuingAudioStream(_vorbisInfo.rate, _vorbisInfo.channels); - - // Get enough audio data to start us off - while (_audStream->numQueuedStreams() == 0) { - // Queue more data - bufferData(); - while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) - queuePage(&_oggPage); - - queueAudio(); - } - - if (_audStream) - g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, _audHandle, _audStream, -1, getVolume(), getBalance()); - } else { - // tear down the partial vorbis setup - vorbis_info_clear(&_vorbisInfo); - vorbis_comment_clear(&_vorbisComment); - _endOfAudio = true; - } - - _surface.create(_theoraInfo.frame_width, _theoraInfo.frame_height, g_system->getScreenFormat()); - - // Set up a display surface - _displaySurface.pixels = _surface.getBasePtr(_theoraInfo.pic_x, _theoraInfo.pic_y); - _displaySurface.w = _theoraInfo.pic_width; - _displaySurface.h = _theoraInfo.pic_height; - _displaySurface.format = _surface.format; - _displaySurface.pitch = _surface.pitch; - - // Set the frame rate - _frameRate = Common::Rational(_theoraInfo.fps_numerator, _theoraInfo.fps_denominator); - - return true; -} - -void TheoraDecoder::close() { - if (_vorbisPacket) { - ogg_stream_clear(&_vorbisOut); - vorbis_block_clear(&_vorbisBlock); - vorbis_dsp_clear(&_vorbisDSP); - vorbis_comment_clear(&_vorbisComment); - vorbis_info_clear(&_vorbisInfo); - - g_system->getMixer()->stopHandle(*_audHandle); - - _audStream = 0; - _vorbisPacket = false; - } - if (_theoraPacket) { - ogg_stream_clear(&_theoraOut); - th_decode_free(_theoraDecode); - th_comment_clear(&_theoraComment); - th_info_clear(&_theoraInfo); - _theoraDecode = 0; - _theoraPacket = false; - } - - if (!_fileStream) - return; - - ogg_sync_clear(&_oggSync); - - delete _fileStream; - _fileStream = 0; - - _surface.free(); - _displaySurface.pixels = 0; - _displaySurface.free(); - - reset(); -} - -const Graphics::Surface *TheoraDecoder::decodeNextFrame() { - // First, let's get our frame - while (_theoraPacket) { - // theora is one in, one out... - if (ogg_stream_packetout(&_theoraOut, &_oggPacket) > 0) { - - if (_ppInc) { - _ppLevel += _ppInc; - th_decode_ctl(_theoraDecode, TH_DECCTL_SET_PPLEVEL, &_ppLevel, sizeof(_ppLevel)); - _ppInc = 0; - } - - if (th_decode_packetin(_theoraDecode, &_oggPacket, NULL) == 0) { - _curFrame++; - - // Convert YUV data to RGB data - th_ycbcr_buffer yuv; - th_decode_ycbcr_out(_theoraDecode, yuv); - translateYUVtoRGBA(yuv); - - if (_curFrame == 0) - _startTime = g_system->getMillis(); - - double time = th_granule_time(_theoraDecode, _oggPacket.granulepos); - - // We need to calculate when the next frame should be shown - // This is all in floating point because that's what the Ogg code gives us - // Ogg is a lossy container format, so it doesn't always list the time to the - // next frame. In such cases, we need to calculate it ourselves. - if (time == -1.0) - _nextFrameStartTime += _frameRate.getInverse().toDouble(); - else - _nextFrameStartTime = time; - - // break out - break; - } - } else { - // If we can't get any more frames, we're done. - if (_theoraOut.e_o_s || _fileStream->eos()) { - _endOfVideo = true; - break; - } - - // Queue more data - bufferData(); - while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) - queuePage(&_oggPage); - } - - // Update audio if we can - queueAudio(); - } - - // Force at least some audio to be buffered - // TODO: 5 is very arbitrary. We probably should do something like QuickTime does. - while (!_endOfAudio && _audStream->numQueuedStreams() < 5) { - bufferData(); - while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) - queuePage(&_oggPage); - - bool queuedAudio = queueAudio(); - if ((_vorbisOut.e_o_s || _fileStream->eos()) && !queuedAudio) { - _endOfAudio = true; - break; - } - } - - return &_displaySurface; -} - -bool TheoraDecoder::queueAudio() { - if (!_audStream) - return false; - - // An audio buffer should have been allocated (either in the constructor or after queuing the current buffer) - if (!_audiobuf) { - warning("[TheoraDecoder::queueAudio] Invalid audio buffer"); - return false; - } - - bool queuedAudio = false; - - for (;;) { - float **pcm; - - // if there's pending, decoded audio, grab it - int ret = vorbis_synthesis_pcmout(&_vorbisDSP, &pcm); - if (ret > 0) { - int count = _audiobufFill / 2; - int maxsamples = ((AUDIOFD_FRAGSIZE - _audiobufFill) / _vorbisInfo.channels) >> 1; - int i; - for (i = 0; i < ret && i < maxsamples; i++) - for (int j = 0; j < _vorbisInfo.channels; j++) { - int val = CLIP((int)rint(pcm[j][i] * 32767.f), -32768, 32767); - _audiobuf[count++] = val; - } - - vorbis_synthesis_read(&_vorbisDSP, i); - _audiobufFill += (i * _vorbisInfo.channels) << 1; - - if (_audiobufFill == AUDIOFD_FRAGSIZE) { - byte flags = Audio::FLAG_16BITS | Audio::FLAG_STEREO; -#ifdef SCUMM_LITTLE_ENDIAN - flags |= Audio::FLAG_LITTLE_ENDIAN; -#endif - _audStream->queueBuffer((byte *)_audiobuf, AUDIOFD_FRAGSIZE, DisposeAfterUse::NO, flags); - - // The audio mixer is now responsible for the old audio buffer. - // We need to create a new one. - _audiobuf = (ogg_int16_t *)malloc(AUDIOFD_FRAGSIZE * sizeof(ogg_int16_t)); - if (!_audiobuf) { - warning("[TheoraDecoder::queueAudio] Cannot allocate memory for audio buffer"); - return false; - } - - _audiobufFill = 0; - queuedAudio = true; - } - } else { - // no pending audio; is there a pending packet to decode? - if (ogg_stream_packetout(&_vorbisOut, &_oggPacket) > 0) { - if (vorbis_synthesis(&_vorbisBlock, &_oggPacket) == 0) // test for success! - vorbis_synthesis_blockin(&_vorbisDSP, &_vorbisBlock); - } else // we've buffered all we have, break out for now - return queuedAudio; - } - } - - // Unreachable - return false; -} - -void TheoraDecoder::reset() { - VideoDecoder::reset(); - - // FIXME: This does a rewind() instead of a reset()! - - if (_fileStream) - _fileStream->seek(0); - - _audiobufFill = 0; - _audiobufReady = false; - - _curFrame = -1; - - _theoraPacket = 0; - _vorbisPacket = 0; -} - -bool TheoraDecoder::endOfVideo() const { - return !isVideoLoaded() || (_endOfVideo && (!_audStream || (_audStream->endOfData() && _endOfAudio))); -} - -uint32 TheoraDecoder::getTimeToNextFrame() const { - if (endOfVideo() || _curFrame < 0) - return 0; - - uint32 elapsedTime = getTime(); - uint32 nextFrameStartTime = (uint32)(_nextFrameStartTime * 1000); - - if (nextFrameStartTime <= elapsedTime) - return 0; - - return nextFrameStartTime - elapsedTime; -} - -uint32 TheoraDecoder::getTime() const { - if (_audStream) - return g_system->getMixer()->getSoundElapsedTime(*_audHandle); - - return VideoDecoder::getTime(); -} - -void TheoraDecoder::pauseVideoIntern(bool pause) { - if (_audStream) - g_system->getMixer()->pauseHandle(*_audHandle, pause); -} - -enum TheoraYUVBuffers { - kBufferY = 0, - kBufferU = 1, - kBufferV = 2 -}; - -void TheoraDecoder::translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer) { - // Width and height of all buffers have to be divisible by 2. - assert((YUVBuffer[kBufferY].width & 1) == 0); - assert((YUVBuffer[kBufferY].height & 1) == 0); - assert((YUVBuffer[kBufferU].width & 1) == 0); - assert((YUVBuffer[kBufferV].width & 1) == 0); - - // UV images have to have a quarter of the Y image resolution - assert(YUVBuffer[kBufferU].width == YUVBuffer[kBufferY].width >> 1); - assert(YUVBuffer[kBufferV].width == YUVBuffer[kBufferY].width >> 1); - assert(YUVBuffer[kBufferU].height == YUVBuffer[kBufferY].height >> 1); - assert(YUVBuffer[kBufferV].height == YUVBuffer[kBufferY].height >> 1); - - 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 deleted file mode 100644 index 739040024f..0000000000 --- a/engines/sword25/fmv/theora_decoder.h +++ /dev/null @@ -1,144 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#ifndef SWORD25_THEORADECODER_H -#define SWORD25_THEORADECODER_H - -#include "common/scummsys.h" // for USE_THEORADEC - -#ifdef USE_THEORADEC - -#include "common/rational.h" -#include "video/video_decoder.h" -#include "audio/audiostream.h" -#include "audio/mixer.h" -#include "graphics/pixelformat.h" -#include "graphics/surface.h" - -#include -#include - -namespace Common { -class SeekableReadStream; -} - -namespace Sword25 { - -/** - * - * Decoder for Theora videos. - * Video decoder used in engines: - * - sword25 - */ -class TheoraDecoder : public Video::VideoDecoder { -public: - TheoraDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType); - virtual ~TheoraDecoder(); - - /** - * Load a video file - * @param stream the stream to load - */ - bool loadStream(Common::SeekableReadStream *stream); - void close(); - void reset(); - - /** - * Decode the next frame and return the frame's surface - * @note the return surface should *not* be freed - * @note this may return 0, in which case the last frame should be kept on screen - */ - const Graphics::Surface *decodeNextFrame(); - - bool isVideoLoaded() const { return _fileStream != 0; } - uint16 getWidth() const { return _displaySurface.w; } - uint16 getHeight() const { return _displaySurface.h; } - - uint32 getFrameCount() const { - // It is not possible to get frame count easily - // I.e. seeking is required - assert(0); - return 0; - } - - Graphics::PixelFormat getPixelFormat() const { return _displaySurface.format; } - uint32 getTime() const; - uint32 getTimeToNextFrame() const; - - bool endOfVideo() const; - -protected: - // VideoDecoder API - void updateVolume(); - void updateBalance(); - void pauseVideoIntern(bool pause); - -private: - void queuePage(ogg_page *page); - bool queueAudio(); - int bufferData(); - void translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer); - - Common::SeekableReadStream *_fileStream; - Graphics::Surface _surface; - Graphics::Surface _displaySurface; - Common::Rational _frameRate; - double _nextFrameStartTime; - bool _endOfVideo; - bool _endOfAudio; - - Audio::Mixer::SoundType _soundType; - Audio::SoundHandle *_audHandle; - Audio::QueuingAudioStream *_audStream; - - ogg_sync_state _oggSync; - ogg_page _oggPage; - ogg_packet _oggPacket; - ogg_stream_state _vorbisOut; - ogg_stream_state _theoraOut; - th_info _theoraInfo; - th_comment _theoraComment; - th_dec_ctx *_theoraDecode; - th_setup_info *_theoraSetup; - vorbis_info _vorbisInfo; - vorbis_dsp_state _vorbisDSP; - vorbis_block _vorbisBlock; - vorbis_comment _vorbisComment; - - int _theoraPacket; - int _vorbisPacket; - - int _ppLevelMax; - int _ppLevel; - int _ppInc; - - // single audio fragment audio buffering - int _audiobufFill; - bool _audiobufReady; - ogg_int16_t *_audiobuf; -}; - -} // End of namespace Sword25 - -#endif - -#endif diff --git a/engines/sword25/module.mk b/engines/sword25/module.mk index 302120c500..e24a221244 100644 --- a/engines/sword25/module.mk +++ b/engines/sword25/module.mk @@ -85,11 +85,6 @@ MODULE_OBJS := \ util/pluto/pluto.o \ util/pluto/plzio.o -ifdef USE_THEORADEC -MODULE_OBJS += \ - fmv/theora_decoder.o -endif - # This module can be built as a plugin ifeq ($(ENABLE_SWORD25), DYNAMIC_PLUGIN) PLUGIN := 1 diff --git a/video/module.mk b/video/module.mk index cebd403ca2..287e14ce18 100644 --- a/video/module.mk +++ b/video/module.mk @@ -26,5 +26,10 @@ MODULE_OBJS += \ bink_decoder.o endif +ifdef USE_THEORADEC +MODULE_OBJS += \ + theora_decoder.o +endif + # Include common rules include $(srcdir)/rules.mk diff --git a/video/theora_decoder.cpp b/video/theora_decoder.cpp new file mode 100644 index 0000000000..f3d9cad096 --- /dev/null +++ b/video/theora_decoder.cpp @@ -0,0 +1,563 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/* + * Source is based on the player example from libvorbis package, + * available at: http://svn.xiph.org/trunk/theora/examples/player_example.c + * + * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. + * + * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 + * by the Xiph.Org Foundation and contributors http://www.xiph.org/ + * + */ + +#include "video/theora_decoder.h" + +#include "common/debug.h" +#include "common/stream.h" +#include "common/system.h" +#include "common/textconsole.h" +#include "common/util.h" +#include "graphics/yuv_to_rgb.h" +#include "audio/decoders/raw.h" + +namespace Video { + +#define AUDIOFD_FRAGSIZE 10240 + +static double rint(double v) { + return floor(v + 0.5); +} + +TheoraDecoder::TheoraDecoder(Audio::Mixer::SoundType soundType) { + _fileStream = 0; + + _theoraPacket = 0; + _vorbisPacket = 0; + _theoraDecode = 0; + _theoraSetup = 0; + _nextFrameStartTime = 0.0; + + _soundType = soundType; + _audStream = 0; + _audHandle = new Audio::SoundHandle(); + + ogg_sync_init(&_oggSync); + + _curFrame = -1; + _audiobuf = (ogg_int16_t *)malloc(AUDIOFD_FRAGSIZE * sizeof(ogg_int16_t)); + + reset(); +} + +TheoraDecoder::~TheoraDecoder() { + close(); + delete _fileStream; + delete _audHandle; + free(_audiobuf); +} + +void TheoraDecoder::queuePage(ogg_page *page) { + if (_theoraPacket) + ogg_stream_pagein(&_theoraOut, page); + + if (_vorbisPacket) + ogg_stream_pagein(&_vorbisOut, page); +} + +int TheoraDecoder::bufferData() { + char *buffer = ogg_sync_buffer(&_oggSync, 4096); + int bytes = _fileStream->read(buffer, 4096); + + ogg_sync_wrote(&_oggSync, bytes); + + return bytes; +} + +bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) { + close(); + + _endOfAudio = false; + _endOfVideo = false; + _fileStream = stream; + + // start up Ogg stream synchronization layer + ogg_sync_init(&_oggSync); + + // init supporting Vorbis structures needed in header parsing + vorbis_info_init(&_vorbisInfo); + vorbis_comment_init(&_vorbisComment); + + // init supporting Theora structures needed in header parsing + th_comment_init(&_theoraComment); + th_info_init(&_theoraInfo); + + // Ogg file open; parse the headers + // Only interested in Vorbis/Theora streams + bool foundHeader = false; + while (!foundHeader) { + int ret = bufferData(); + + if (ret == 0) + break; + + while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) { + ogg_stream_state test; + + // is this a mandated initial header? If not, stop parsing + if (!ogg_page_bos(&_oggPage)) { + // don't leak the page; get it into the appropriate stream + queuePage(&_oggPage); + foundHeader = true; + break; + } + + ogg_stream_init(&test, ogg_page_serialno(&_oggPage)); + ogg_stream_pagein(&test, &_oggPage); + ogg_stream_packetout(&test, &_oggPacket); + + // identify the codec: try theora + if (!_theoraPacket && th_decode_headerin(&_theoraInfo, &_theoraComment, &_theoraSetup, &_oggPacket) >= 0) { + // it is theora + memcpy(&_theoraOut, &test, sizeof(test)); + _theoraPacket = 1; + } else if (!_vorbisPacket && vorbis_synthesis_headerin(&_vorbisInfo, &_vorbisComment, &_oggPacket) >= 0) { + // it is vorbis + memcpy(&_vorbisOut, &test, sizeof(test)); + _vorbisPacket = 1; + } else { + // whatever it is, we don't care about it + ogg_stream_clear(&test); + } + } + // fall through to non-bos page parsing + } + + // we're expecting more header packets. + while ((_theoraPacket && _theoraPacket < 3) || (_vorbisPacket && _vorbisPacket < 3)) { + int ret; + + // look for further theora headers + while (_theoraPacket && (_theoraPacket < 3) && (ret = ogg_stream_packetout(&_theoraOut, &_oggPacket))) { + if (ret < 0) + error("Error parsing Theora stream headers; corrupt stream?"); + + if (!th_decode_headerin(&_theoraInfo, &_theoraComment, &_theoraSetup, &_oggPacket)) + error("Error parsing Theora stream headers; corrupt stream?"); + + _theoraPacket++; + } + + // look for more vorbis header packets + while (_vorbisPacket && (_vorbisPacket < 3) && (ret = ogg_stream_packetout(&_vorbisOut, &_oggPacket))) { + if (ret < 0) + error("Error parsing Vorbis stream headers; corrupt stream?"); + + if (vorbis_synthesis_headerin(&_vorbisInfo, &_vorbisComment, &_oggPacket)) + error("Error parsing Vorbis stream headers; corrupt stream?"); + + _vorbisPacket++; + + if (_vorbisPacket == 3) + break; + } + + // The header pages/packets will arrive before anything else we + // care about, or the stream is not obeying spec + + if (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) { + queuePage(&_oggPage); // demux into the appropriate stream + } else { + ret = bufferData(); // someone needs more data + + if (ret == 0) + error("End of file while searching for codec headers."); + } + } + + // and now we have it all. initialize decoders + if (_theoraPacket) { + _theoraDecode = th_decode_alloc(&_theoraInfo, _theoraSetup); + debugN(1, "Ogg logical stream %lx is Theora %dx%d %.02f fps", + _theoraOut.serialno, _theoraInfo.pic_width, _theoraInfo.pic_height, + (double)_theoraInfo.fps_numerator / _theoraInfo.fps_denominator); + + switch (_theoraInfo.pixel_fmt) { + case TH_PF_420: + debug(1, " 4:2:0 video"); + break; + case TH_PF_422: + debug(1, " 4:2:2 video"); + break; + case TH_PF_444: + debug(1, " 4:4:4 video"); + break; + case TH_PF_RSVD: + default: + debug(1, " video\n (UNKNOWN Chroma sampling!)"); + break; + } + + if (_theoraInfo.pic_width != _theoraInfo.frame_width || _theoraInfo.pic_height != _theoraInfo.frame_height) + debug(1, " Frame content is %dx%d with offset (%d,%d).", + _theoraInfo.frame_width, _theoraInfo.frame_height, _theoraInfo.pic_x, _theoraInfo.pic_y); + + switch (_theoraInfo.colorspace){ + case TH_CS_UNSPECIFIED: + /* nothing to report */ + break; + case TH_CS_ITU_REC_470M: + debug(1, " encoder specified ITU Rec 470M (NTSC) color."); + break; + case TH_CS_ITU_REC_470BG: + debug(1, " encoder specified ITU Rec 470BG (PAL) color."); + break; + default: + debug(1, "warning: encoder specified unknown colorspace (%d).", _theoraInfo.colorspace); + break; + } + + debug(1, "Encoded by %s", _theoraComment.vendor); + if (_theoraComment.comments) { + debug(1, "theora comment header:"); + for (int i = 0; i < _theoraComment.comments; i++) { + if (_theoraComment.user_comments[i]) { + int len = _theoraComment.comment_lengths[i]; + char *value = (char *)malloc(len + 1); + if (value) { + memcpy(value, _theoraComment.user_comments[i], len); + value[len] = '\0'; + debug(1, "\t%s", value); + free(value); + } + } + } + } + + th_decode_ctl(_theoraDecode, TH_DECCTL_GET_PPLEVEL_MAX, &_ppLevelMax, sizeof(_ppLevelMax)); + _ppLevel = _ppLevelMax; + th_decode_ctl(_theoraDecode, TH_DECCTL_SET_PPLEVEL, &_ppLevel, sizeof(_ppLevel)); + _ppInc = 0; + } else { + // tear down the partial theora setup + th_info_clear(&_theoraInfo); + th_comment_clear(&_theoraComment); + } + + th_setup_free(_theoraSetup); + _theoraSetup = 0; + + if (_vorbisPacket) { + vorbis_synthesis_init(&_vorbisDSP, &_vorbisInfo); + vorbis_block_init(&_vorbisDSP, &_vorbisBlock); + debug(3, "Ogg logical stream %lx is Vorbis %d channel %ld Hz audio.", + _vorbisOut.serialno, _vorbisInfo.channels, _vorbisInfo.rate); + + _audStream = Audio::makeQueuingAudioStream(_vorbisInfo.rate, _vorbisInfo.channels); + + // Get enough audio data to start us off + while (_audStream->numQueuedStreams() == 0) { + // Queue more data + bufferData(); + while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) + queuePage(&_oggPage); + + queueAudio(); + } + + if (_audStream) + g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, _audHandle, _audStream, -1, getVolume(), getBalance()); + } else { + // tear down the partial vorbis setup + vorbis_info_clear(&_vorbisInfo); + vorbis_comment_clear(&_vorbisComment); + _endOfAudio = true; + } + + _surface.create(_theoraInfo.frame_width, _theoraInfo.frame_height, g_system->getScreenFormat()); + + // Set up a display surface + _displaySurface.pixels = _surface.getBasePtr(_theoraInfo.pic_x, _theoraInfo.pic_y); + _displaySurface.w = _theoraInfo.pic_width; + _displaySurface.h = _theoraInfo.pic_height; + _displaySurface.format = _surface.format; + _displaySurface.pitch = _surface.pitch; + + // Set the frame rate + _frameRate = Common::Rational(_theoraInfo.fps_numerator, _theoraInfo.fps_denominator); + + return true; +} + +void TheoraDecoder::close() { + if (_vorbisPacket) { + ogg_stream_clear(&_vorbisOut); + vorbis_block_clear(&_vorbisBlock); + vorbis_dsp_clear(&_vorbisDSP); + vorbis_comment_clear(&_vorbisComment); + vorbis_info_clear(&_vorbisInfo); + + g_system->getMixer()->stopHandle(*_audHandle); + + _audStream = 0; + _vorbisPacket = false; + } + if (_theoraPacket) { + ogg_stream_clear(&_theoraOut); + th_decode_free(_theoraDecode); + th_comment_clear(&_theoraComment); + th_info_clear(&_theoraInfo); + _theoraDecode = 0; + _theoraPacket = false; + } + + if (!_fileStream) + return; + + ogg_sync_clear(&_oggSync); + + delete _fileStream; + _fileStream = 0; + + _surface.free(); + _displaySurface.pixels = 0; + _displaySurface.free(); + + reset(); +} + +const Graphics::Surface *TheoraDecoder::decodeNextFrame() { + // First, let's get our frame + while (_theoraPacket) { + // theora is one in, one out... + if (ogg_stream_packetout(&_theoraOut, &_oggPacket) > 0) { + + if (_ppInc) { + _ppLevel += _ppInc; + th_decode_ctl(_theoraDecode, TH_DECCTL_SET_PPLEVEL, &_ppLevel, sizeof(_ppLevel)); + _ppInc = 0; + } + + if (th_decode_packetin(_theoraDecode, &_oggPacket, NULL) == 0) { + _curFrame++; + + // Convert YUV data to RGB data + th_ycbcr_buffer yuv; + th_decode_ycbcr_out(_theoraDecode, yuv); + translateYUVtoRGBA(yuv); + + if (_curFrame == 0) + _startTime = g_system->getMillis(); + + double time = th_granule_time(_theoraDecode, _oggPacket.granulepos); + + // We need to calculate when the next frame should be shown + // This is all in floating point because that's what the Ogg code gives us + // Ogg is a lossy container format, so it doesn't always list the time to the + // next frame. In such cases, we need to calculate it ourselves. + if (time == -1.0) + _nextFrameStartTime += _frameRate.getInverse().toDouble(); + else + _nextFrameStartTime = time; + + // break out + break; + } + } else { + // If we can't get any more frames, we're done. + if (_theoraOut.e_o_s || _fileStream->eos()) { + _endOfVideo = true; + break; + } + + // Queue more data + bufferData(); + while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) + queuePage(&_oggPage); + } + + // Update audio if we can + queueAudio(); + } + + // Force at least some audio to be buffered + // TODO: 5 is very arbitrary. We probably should do something like QuickTime does. + while (!_endOfAudio && _audStream->numQueuedStreams() < 5) { + bufferData(); + while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) + queuePage(&_oggPage); + + bool queuedAudio = queueAudio(); + if ((_vorbisOut.e_o_s || _fileStream->eos()) && !queuedAudio) { + _endOfAudio = true; + break; + } + } + + return &_displaySurface; +} + +bool TheoraDecoder::queueAudio() { + if (!_audStream) + return false; + + // An audio buffer should have been allocated (either in the constructor or after queuing the current buffer) + if (!_audiobuf) { + warning("[TheoraDecoder::queueAudio] Invalid audio buffer"); + return false; + } + + bool queuedAudio = false; + + for (;;) { + float **pcm; + + // if there's pending, decoded audio, grab it + int ret = vorbis_synthesis_pcmout(&_vorbisDSP, &pcm); + if (ret > 0) { + int count = _audiobufFill / 2; + int maxsamples = ((AUDIOFD_FRAGSIZE - _audiobufFill) / _vorbisInfo.channels) >> 1; + int i; + for (i = 0; i < ret && i < maxsamples; i++) + for (int j = 0; j < _vorbisInfo.channels; j++) { + int val = CLIP((int)rint(pcm[j][i] * 32767.f), -32768, 32767); + _audiobuf[count++] = val; + } + + vorbis_synthesis_read(&_vorbisDSP, i); + _audiobufFill += (i * _vorbisInfo.channels) << 1; + + if (_audiobufFill == AUDIOFD_FRAGSIZE) { + byte flags = Audio::FLAG_16BITS | Audio::FLAG_STEREO; +#ifdef SCUMM_LITTLE_ENDIAN + flags |= Audio::FLAG_LITTLE_ENDIAN; +#endif + _audStream->queueBuffer((byte *)_audiobuf, AUDIOFD_FRAGSIZE, DisposeAfterUse::NO, flags); + + // The audio mixer is now responsible for the old audio buffer. + // We need to create a new one. + _audiobuf = (ogg_int16_t *)malloc(AUDIOFD_FRAGSIZE * sizeof(ogg_int16_t)); + if (!_audiobuf) { + warning("[TheoraDecoder::queueAudio] Cannot allocate memory for audio buffer"); + return false; + } + + _audiobufFill = 0; + queuedAudio = true; + } + } else { + // no pending audio; is there a pending packet to decode? + if (ogg_stream_packetout(&_vorbisOut, &_oggPacket) > 0) { + if (vorbis_synthesis(&_vorbisBlock, &_oggPacket) == 0) // test for success! + vorbis_synthesis_blockin(&_vorbisDSP, &_vorbisBlock); + } else // we've buffered all we have, break out for now + return queuedAudio; + } + } + + // Unreachable + return false; +} + +void TheoraDecoder::reset() { + VideoDecoder::reset(); + + // FIXME: This does a rewind() instead of a reset()! + + if (_fileStream) + _fileStream->seek(0); + + _audiobufFill = 0; + _audiobufReady = false; + + _curFrame = -1; + + _theoraPacket = 0; + _vorbisPacket = 0; +} + +bool TheoraDecoder::endOfVideo() const { + return !isVideoLoaded() || (_endOfVideo && (!_audStream || (_audStream->endOfData() && _endOfAudio))); +} + +uint32 TheoraDecoder::getTimeToNextFrame() const { + if (endOfVideo() || _curFrame < 0) + return 0; + + uint32 elapsedTime = getTime(); + uint32 nextFrameStartTime = (uint32)(_nextFrameStartTime * 1000); + + if (nextFrameStartTime <= elapsedTime) + return 0; + + return nextFrameStartTime - elapsedTime; +} + +uint32 TheoraDecoder::getTime() const { + if (_audStream) + return g_system->getMixer()->getSoundElapsedTime(*_audHandle); + + return VideoDecoder::getTime(); +} + +void TheoraDecoder::pauseVideoIntern(bool pause) { + if (_audStream) + g_system->getMixer()->pauseHandle(*_audHandle, pause); +} + +enum TheoraYUVBuffers { + kBufferY = 0, + kBufferU = 1, + kBufferV = 2 +}; + +void TheoraDecoder::translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer) { + // Width and height of all buffers have to be divisible by 2. + assert((YUVBuffer[kBufferY].width & 1) == 0); + assert((YUVBuffer[kBufferY].height & 1) == 0); + assert((YUVBuffer[kBufferU].width & 1) == 0); + assert((YUVBuffer[kBufferV].width & 1) == 0); + + // UV images have to have a quarter of the Y image resolution + assert(YUVBuffer[kBufferU].width == YUVBuffer[kBufferY].width >> 1); + assert(YUVBuffer[kBufferV].width == YUVBuffer[kBufferY].width >> 1); + assert(YUVBuffer[kBufferU].height == YUVBuffer[kBufferY].height >> 1); + assert(YUVBuffer[kBufferV].height == YUVBuffer[kBufferY].height >> 1); + + 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 Video diff --git a/video/theora_decoder.h b/video/theora_decoder.h new file mode 100644 index 0000000000..459fc064d3 --- /dev/null +++ b/video/theora_decoder.h @@ -0,0 +1,144 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "common/scummsys.h" // for USE_THEORADEC + +#ifdef USE_THEORADEC + +#ifndef VIDEO_THEORA_DECODER_H +#define VIDEO_THEORA_DECODER_H + +#include "common/rational.h" +#include "video/video_decoder.h" +#include "audio/audiostream.h" +#include "audio/mixer.h" +#include "graphics/pixelformat.h" +#include "graphics/surface.h" + +#include +#include + +namespace Common { +class SeekableReadStream; +} + +namespace Video { + +/** + * + * Decoder for Theora videos. + * Video decoder used in engines: + * - sword25 + */ +class TheoraDecoder : public VideoDecoder { +public: + TheoraDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType); + virtual ~TheoraDecoder(); + + /** + * Load a video file + * @param stream the stream to load + */ + bool loadStream(Common::SeekableReadStream *stream); + void close(); + void reset(); + + /** + * Decode the next frame and return the frame's surface + * @note the return surface should *not* be freed + * @note this may return 0, in which case the last frame should be kept on screen + */ + const Graphics::Surface *decodeNextFrame(); + + bool isVideoLoaded() const { return _fileStream != 0; } + uint16 getWidth() const { return _displaySurface.w; } + uint16 getHeight() const { return _displaySurface.h; } + + uint32 getFrameCount() const { + // It is not possible to get frame count easily + // I.e. seeking is required + assert(0); + return 0; + } + + Graphics::PixelFormat getPixelFormat() const { return _displaySurface.format; } + uint32 getTime() const; + uint32 getTimeToNextFrame() const; + + bool endOfVideo() const; + +protected: + // VideoDecoder API + void updateVolume(); + void updateBalance(); + void pauseVideoIntern(bool pause); + +private: + void queuePage(ogg_page *page); + bool queueAudio(); + int bufferData(); + void translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer); + + Common::SeekableReadStream *_fileStream; + Graphics::Surface _surface; + Graphics::Surface _displaySurface; + Common::Rational _frameRate; + double _nextFrameStartTime; + bool _endOfVideo; + bool _endOfAudio; + + Audio::Mixer::SoundType _soundType; + Audio::SoundHandle *_audHandle; + Audio::QueuingAudioStream *_audStream; + + ogg_sync_state _oggSync; + ogg_page _oggPage; + ogg_packet _oggPacket; + ogg_stream_state _vorbisOut; + ogg_stream_state _theoraOut; + th_info _theoraInfo; + th_comment _theoraComment; + th_dec_ctx *_theoraDecode; + th_setup_info *_theoraSetup; + vorbis_info _vorbisInfo; + vorbis_dsp_state _vorbisDSP; + vorbis_block _vorbisBlock; + vorbis_comment _vorbisComment; + + int _theoraPacket; + int _vorbisPacket; + + int _ppLevelMax; + int _ppLevel; + int _ppInc; + + // single audio fragment audio buffering + int _audiobufFill; + bool _audiobufReady; + ogg_int16_t *_audiobuf; +}; + +} // End of namespace Video + +#endif + +#endif -- cgit v1.2.3 From 7ea7a8ae7eeca2b7d6ddcc413012158d798a836e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 12 Aug 2012 14:58:16 +0200 Subject: I18N: Update POTFILES and rebuild the translations. --- gui/themes/translations.dat | Bin 342397 -> 342397 bytes po/POTFILES | 2 +- po/ca_ES.po | 182 +++++---- po/cs_CZ.po | 185 ++++++---- po/da_DA.po | 879 +++++++++++++++++++++----------------------- po/de_DE.po | 185 ++++++---- po/es_ES.po | 186 ++++++---- po/eu.po | 182 +++++---- po/fr_FR.po | 189 ++++++---- po/hu_HU.po | 185 ++++++---- po/it_IT.po | 185 ++++++---- po/nb_NO.po | 185 ++++++---- po/nn_NO.po | 182 +++++---- po/pl_PL.po | 182 +++++---- po/pt_BR.po | 182 +++++---- po/ru_RU.po | 232 +++++++----- po/scummvm.pot | 180 +++++---- po/se_SE.po | 185 ++++++---- po/uk_UA.po | 187 ++++++---- 19 files changed, 2367 insertions(+), 1508 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 4b35fdb9a8..cabad0c0c4 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ diff --git a/po/POTFILES b/po/POTFILES index 36bd2ff4c7..72c6fb1d18 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -10,7 +10,7 @@ gui/KeysDialog.cpp gui/launcher.cpp gui/massadd.cpp gui/options.cpp -gui/saveload.cpp +gui/saveload-dialog.cpp gui/themebrowser.cpp gui/ThemeEngine.cpp gui/widget.cpp diff --git a/po/ca_ES.po b/po/ca_ES.po index 8a978bee0d..3e8ade3923 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2011-10-04 20:51+0100\n" "Last-Translator: Jordi Vilalta Prat \n" "Language-Team: Catalan \n" +"Language: Catalan\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Catalan\n" #: gui/about.cpp:91 #, c-format @@ -44,10 +44,11 @@ msgstr "Amunt" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -91,16 +92,16 @@ msgstr "Assigna" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "D'acord" @@ -442,13 +443,13 @@ msgstr "Cerca a la llista de jocs" msgid "Search:" msgstr "Cerca:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Carrega partida:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -931,68 +932,104 @@ msgstr "" "El tema que heu seleccionat no suporta l'idioma actual. Si voleu utilitzar " "aquest tema primer haureu de canviar a un altre idioma." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "No hi ha data desada" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "No hi ha hora desada" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "No hi ha temps de joc desat" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "Suprimeix" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "Realment voleu suprimir aquesta partida?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "Data: " -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "Hora: " -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "Temps de joc: " -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "Partida sense títol" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "Desa" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "No s'ha pogut desar l'estat del joc" + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "Nom:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "Seleccioneu un Tema" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "GFX desactivats" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX desactivats" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "Pintat estàndard (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "Estàndard (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "Pintat amb antialias (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "Amb antialias (16bpp)" @@ -1096,17 +1133,17 @@ msgstr "Cancel msgid "Unknown error" msgstr "Error desconegut" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "El joc a '%s' sembla ser desconegut." -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Informeu de la següent informació a l'equip de ScummVM juntament amb el" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "nom del joc que heu provat d'afegir i la seva versió/llengua/etc.:" @@ -1144,13 +1181,13 @@ msgid "~R~eturn to Launcher" msgstr "~R~etorna al Llançador" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "Desa la partida:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1268,11 +1305,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "Recupera la partida:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "Restaura" @@ -1997,7 +2034,7 @@ msgstr "" "El suport de MIDI natiu requereix l'actualització Roland de LucasArts,\n" "però no s'ha trobat %s. S'utilitzarà AdLib." -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2008,7 +2045,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2019,7 +2056,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2072,11 +2109,11 @@ msgid "Cutscene file '%s' not found!" msgstr "No s'ha trobat el fitxer d'escena '%s'!" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "No s'ha pogut carregar l'estat del joc del fitxer." -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "No s'ha pogut desar l'estat del joc al fitxer." @@ -2217,12 +2254,12 @@ msgstr "" "Roland MT32 als de General MIDI. És possible\n" "que algunes pistes no es reprodueixin correctament." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +msgid "Use an alternative game intro (CD version only)" msgstr "" #: engines/sky/compact.cpp:130 @@ -2241,6 +2278,14 @@ msgstr "" "El fitxer \"sky.cpt\" té una mida incorrecta.\n" "Torneu a baixar-lo de www.scummvm.org" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2316,6 +2361,17 @@ msgstr "" msgid "Show labels for objects on mouse hover" msgstr "" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2568,11 +2624,11 @@ msgstr "Mode Touchpad activat." msgid "Touchpad mode disabled." msgstr "Mode Touchpad desactivat." -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2580,12 +2636,12 @@ msgstr "" msgid "Left Click" msgstr "Clic esquerre" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 #, fuzzy msgid "Middle Click" msgstr "Element mig esquerre" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2989,37 +3045,37 @@ msgstr "Llan msgid "Do you really want to quit?" msgstr "Estàs segur de voler sortir?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "'Mode Toc' de pantalla tàctil - Clic esquerre" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "'Mode Toc' de pantalla tàctil - Clic dret" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "'Mode Toc' de pantalla tàctil - Flotant (sense clic)" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "Volum màxim" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "Pujant el volum" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "Volum mínim" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "Baixant el volum" diff --git a/po/cs_CZ.po b/po/cs_CZ.po index a2d640651c..107be45398 100644 --- a/po/cs_CZ.po +++ b/po/cs_CZ.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.4.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2012-07-08 18:03+0100\n" "Last-Translator: Zbynìk Schwarz \n" "Language-Team: \n" +"Language: Cesky\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-2\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Cesky\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n" "X-Poedit-Language: Czech\n" "X-Poedit-Country: CZECH REPUBLIC\n" @@ -48,10 +48,11 @@ msgstr "J #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -94,16 +95,16 @@ msgstr "Mapovat" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "OK" @@ -439,13 +440,13 @@ msgstr "Hledat v seznamu her" msgid "Search:" msgstr "Hledat:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Nahrát hru:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -919,68 +920,104 @@ msgstr "" "Vzhled, který jste zvolili, nepodporuje Vá¹ souèasný jazyk. Pokud chcete " "tento vzhled pou¾ít, musíte nejdøíve pøepnout na jiný jazyk." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "Neulo¾ena ¾ádná data" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "®ádný ulo¾ený èas" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "®ádná ulo¾ená doba hraní" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "Smazat" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "Opravdu chcete tuto ulo¾enou hru vymazat" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "Datum:" -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "Èas:" -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "Doba hraní:" -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "Bezejmenný ulo¾ený stav" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "Ulo¾it" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "Nelze ulo¾it hru." + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "Jméno" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "Vyberte Vzhled" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "GFX zakázáno" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX zakázáno" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "Standardní Vykreslovaè (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "Standardní (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "Vykreslovaè s vyhlazenými hranami (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "S vyhlazenými hranami (16bpp)" @@ -1084,16 +1121,16 @@ msgstr "Zru msgid "Unknown error" msgstr "Neznámá chyba" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Hra v '%s' se zdá být neznámá." -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Prosím nahlaste následující data týmu ScummVM spolu se jménem" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "hry, kterou jste se pokusili pøidat a její verzi/jazyk/atd.:" @@ -1131,13 +1168,13 @@ msgid "~R~eturn to Launcher" msgstr "~N~ávrat do Spou¹tìèe" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "Ulo¾it hru:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1256,11 +1293,11 @@ msgstr "Pou msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Pou¾ít pùvodní obrazovky naètení/ulo¾ení místo ze ScummVM" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "Obnovit hru" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "Obnovit" @@ -1982,7 +2019,7 @@ msgstr "" "Pøirozená podpora MIDI vy¾aduje Aktualizaci Roland od LucasArts,\n" "ale %s chybí. Místo toho je pou¾it AdLib." -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1993,7 +2030,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2004,7 +2041,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2057,11 +2094,11 @@ msgid "Cutscene file '%s' not found!" msgstr "Soubor videa '%s' nenalezen'" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "Nelze naèíst stav hry ze souboru." -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "Nelze ulo¾it stav hry do souboru." @@ -2193,12 +2230,13 @@ msgstr "" "ty od General MIDI. Je stále mo¾né, ¾e\n" "nìkteré stopy nebudou znít správnì." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" -msgstr "Úvod z diskety" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" +msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +#, fuzzy +msgid "Use an alternative game intro (CD version only)" msgstr "Pou¾ít verzi úvodu z diskety (Pouze verze CD)" #: engines/sky/compact.cpp:130 @@ -2217,6 +2255,14 @@ msgstr "" "Soubor \"sky.cpt\" má nesprávnou velikost.\n" "Stáhnìte si ho, prosím, (znovu) z www.scummvm.org" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "Úvod z diskety" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "Pou¾ít verzi úvodu z diskety (Pouze verze CD)" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2287,6 +2333,17 @@ msgstr "Zobrazit jmenovky objekt msgid "Show labels for objects on mouse hover" msgstr "Zobrazit jmenovky objektù pøi najetí my¹i" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2537,11 +2594,11 @@ msgstr "Touchpad re msgid "Touchpad mode disabled." msgstr "Touchpad re¾im vypnut" -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "Re¾im kliknutí" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2549,11 +2606,11 @@ msgstr "Re msgid "Left Click" msgstr "Levé Kliknutí" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 msgid "Middle Click" msgstr "Kliknutí prostøedním tlaèítkem" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2959,37 +3016,37 @@ msgstr "Spou msgid "Do you really want to quit?" msgstr "Opravdu chcete skonèit?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "'Re¾im «uknutí' Dotykové Obrazovky - Levé Kliknutí" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "'Re¾im «uknutí' Dotykové Obrazovky - Pravé Kliknutí" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "'Re¾im «uknutí' Dotykové Obrazovky - Najetí (Bez Kliknutí)" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "Maximální Hlasitost" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "Zvy¹uji Hlasitost" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "Minimální Hlasitost" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "Sni¾uji Hlasitost" diff --git a/po/da_DA.po b/po/da_DA.po index c2d55f82cd..b30ef1bf02 100644 --- a/po/da_DA.po +++ b/po/da_DA.po @@ -6,14 +6,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2012-07-09 20:27+0100\n" "Last-Translator: Steffen Nyeland \n" "Language-Team: Steffen Nyeland \n" +"Language: Dansk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Dansk\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: Danish\n" "X-Poedit-Country: DENMARK\n" @@ -35,8 +35,7 @@ msgstr "Tilg msgid "Go up" msgstr "Gå op" -#: gui/browser.cpp:66 -#: gui/browser.cpp:68 +#: gui/browser.cpp:66 gui/browser.cpp:68 msgid "Go to previous directory level" msgstr "Gå til forrige biblioteks niveau" @@ -45,37 +44,25 @@ msgctxt "lowres" msgid "Go up" msgstr "Gå op" -#: gui/browser.cpp:69 -#: gui/chooser.cpp:45 -#: gui/KeysDialog.cpp:43 -#: gui/launcher.cpp:345 -#: gui/massadd.cpp:94 -#: gui/options.cpp:1228 -#: gui/saveload.cpp:64 -#: gui/saveload.cpp:173 -#: gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 -#: engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 -#: engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" msgstr "Fortryd" -#: gui/browser.cpp:70 -#: gui/chooser.cpp:46 -#: gui/themebrowser.cpp:55 +#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55 msgid "Choose" msgstr "Vælg" -#: gui/gui-manager.cpp:115 -#: engines/scumm/help.cpp:125 -#: engines/scumm/help.cpp:140 -#: engines/scumm/help.cpp:165 -#: engines/scumm/help.cpp:191 -#: engines/scumm/help.cpp:209 +#: gui/gui-manager.cpp:115 engines/scumm/help.cpp:125 +#: engines/scumm/help.cpp:140 engines/scumm/help.cpp:165 +#: engines/scumm/help.cpp:191 engines/scumm/help.cpp:209 #: backends/keymapper/remap-dialog.cpp:52 msgid "Close" msgstr "Luk" @@ -84,23 +71,19 @@ msgstr "Luk" msgid "Mouse click" msgstr "Muse klik" -#: gui/gui-manager.cpp:122 -#: base/main.cpp:300 +#: gui/gui-manager.cpp:122 base/main.cpp:300 msgid "Display keyboard" msgstr "Vis tastatur" -#: gui/gui-manager.cpp:126 -#: base/main.cpp:304 +#: gui/gui-manager.cpp:126 base/main.cpp:304 msgid "Remap keys" msgstr "Kortlæg taster" -#: gui/gui-manager.cpp:129 -#: base/main.cpp:307 +#: gui/gui-manager.cpp:129 base/main.cpp:307 msgid "Toggle FullScreen" msgstr "Skift fuldskærm" -#: gui/KeysDialog.h:36 -#: gui/KeysDialog.cpp:145 +#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145 msgid "Choose an action to map" msgstr "Vælg en handling at kortlægge" @@ -108,32 +91,18 @@ msgstr "V msgid "Map" msgstr "Kortlæg" -#: gui/KeysDialog.cpp:42 -#: gui/launcher.cpp:346 -#: gui/launcher.cpp:1001 -#: gui/launcher.cpp:1005 -#: gui/massadd.cpp:91 -#: gui/options.cpp:1229 -#: engines/engine.cpp:361 -#: engines/engine.cpp:372 -#: engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 -#: engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 -#: engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 -#: engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 -#: engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 -#: engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 -#: engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 -#: engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 -#: engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "OK" @@ -142,16 +111,12 @@ msgstr "OK" msgid "Select an action and click 'Map'" msgstr "Vælg en handling og klik 'Kortlæg'" -#: gui/KeysDialog.cpp:80 -#: gui/KeysDialog.cpp:102 -#: gui/KeysDialog.cpp:141 +#: gui/KeysDialog.cpp:80 gui/KeysDialog.cpp:102 gui/KeysDialog.cpp:141 #, c-format msgid "Associated key : %s" msgstr "Tilknyttet tast : %s" -#: gui/KeysDialog.cpp:82 -#: gui/KeysDialog.cpp:104 -#: gui/KeysDialog.cpp:143 +#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143 #, c-format msgid "Associated key : none" msgstr "Tilknyttet tast : ingen" @@ -172,11 +137,13 @@ msgstr "Spil" msgid "ID:" msgstr "ID:" -#: gui/launcher.cpp:191 -#: gui/launcher.cpp:193 -#: gui/launcher.cpp:194 -msgid "Short game identifier used for referring to savegames and running the game from the command line" -msgstr "Kort spil identifikator til brug for gemmer, og for at køre spillet fra kommandolinien" +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 +msgid "" +"Short game identifier used for referring to savegames and running the game " +"from the command line" +msgstr "" +"Kort spil identifikator til brug for gemmer, og for at køre spillet fra " +"kommandolinien" #: gui/launcher.cpp:193 msgctxt "lowres" @@ -187,9 +154,7 @@ msgstr "ID:" msgid "Name:" msgstr "Navn:" -#: gui/launcher.cpp:198 -#: gui/launcher.cpp:200 -#: gui/launcher.cpp:201 +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 msgid "Full title of the game" msgstr "Fuld titel på spillet" @@ -202,17 +167,16 @@ msgstr "Navn:" msgid "Language:" msgstr "Sprog:" -#: gui/launcher.cpp:204 -#: gui/launcher.cpp:205 -msgid "Language of the game. This will not turn your Spanish game version into English" -msgstr "Spillets sprog. Dette vil ikke ændre din spanske version af spillet til engelsk" +#: gui/launcher.cpp:204 gui/launcher.cpp:205 +msgid "" +"Language of the game. This will not turn your Spanish game version into " +"English" +msgstr "" +"Spillets sprog. Dette vil ikke ændre din spanske version af spillet til " +"engelsk" -#: gui/launcher.cpp:206 -#: gui/launcher.cpp:220 -#: gui/options.cpp:80 -#: gui/options.cpp:730 -#: gui/options.cpp:743 -#: gui/options.cpp:1199 +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 #: audio/null.cpp:40 msgid "" msgstr "" @@ -221,9 +185,7 @@ msgstr "" msgid "Platform:" msgstr "Platform:" -#: gui/launcher.cpp:216 -#: gui/launcher.cpp:218 -#: gui/launcher.cpp:219 +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 msgid "Platform the game was originally designed for" msgstr "Platform som spillet oprindeligt var designet til" @@ -236,15 +198,11 @@ msgstr "Platform:" msgid "Engine" msgstr "Motor" -#: gui/launcher.cpp:239 -#: gui/options.cpp:1062 -#: gui/options.cpp:1079 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" msgstr "Grafik" -#: gui/launcher.cpp:239 -#: gui/options.cpp:1062 -#: gui/options.cpp:1079 +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "GFX" msgstr "GFX" @@ -257,8 +215,7 @@ msgctxt "lowres" msgid "Override global graphic settings" msgstr "Overstyr globale grafik indstillinger" -#: gui/launcher.cpp:251 -#: gui/options.cpp:1085 +#: gui/launcher.cpp:251 gui/options.cpp:1085 msgid "Audio" msgstr "Lyd" @@ -271,13 +228,11 @@ msgctxt "lowres" msgid "Override global audio settings" msgstr "Overstyr globale lyd indstillinger" -#: gui/launcher.cpp:265 -#: gui/options.cpp:1090 +#: gui/launcher.cpp:265 gui/options.cpp:1090 msgid "Volume" msgstr "Lydstyrke" -#: gui/launcher.cpp:267 -#: gui/options.cpp:1092 +#: gui/launcher.cpp:267 gui/options.cpp:1092 msgctxt "lowres" msgid "Volume" msgstr "Lydstyrke" @@ -291,8 +246,7 @@ msgctxt "lowres" msgid "Override global volume settings" msgstr "Overstyr globale lydstyrke indstillinger" -#: gui/launcher.cpp:280 -#: gui/options.cpp:1100 +#: gui/launcher.cpp:280 gui/options.cpp:1100 msgid "MIDI" msgstr "MIDI" @@ -305,8 +259,7 @@ msgctxt "lowres" msgid "Override global MIDI settings" msgstr "Overstyr globale MIDI indstillinger" -#: gui/launcher.cpp:294 -#: gui/options.cpp:1106 +#: gui/launcher.cpp:294 gui/options.cpp:1106 msgid "MT-32" msgstr "MT-32" @@ -319,13 +272,11 @@ msgctxt "lowres" msgid "Override global MT-32 settings" msgstr "Overstyr globale MT-32 indstillinger" -#: gui/launcher.cpp:308 -#: gui/options.cpp:1113 +#: gui/launcher.cpp:308 gui/options.cpp:1113 msgid "Paths" msgstr "Stier" -#: gui/launcher.cpp:310 -#: gui/options.cpp:1115 +#: gui/launcher.cpp:310 gui/options.cpp:1115 msgctxt "lowres" msgid "Paths" msgstr "Stier" @@ -339,80 +290,54 @@ msgctxt "lowres" msgid "Game Path:" msgstr "Spil sti:" -#: gui/launcher.cpp:324 -#: gui/options.cpp:1139 +#: gui/launcher.cpp:324 gui/options.cpp:1139 msgid "Extra Path:" msgstr "Ekstra sti:" -#: gui/launcher.cpp:324 -#: gui/launcher.cpp:326 -#: gui/launcher.cpp:327 +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 msgid "Specifies path to additional data used the game" msgstr "Angiver sti til ekstra data der bruges i spillet" -#: gui/launcher.cpp:326 -#: gui/options.cpp:1141 +#: gui/launcher.cpp:326 gui/options.cpp:1141 msgctxt "lowres" msgid "Extra Path:" msgstr "Ekstra sti:" -#: gui/launcher.cpp:333 -#: gui/options.cpp:1123 +#: gui/launcher.cpp:333 gui/options.cpp:1123 msgid "Save Path:" msgstr "Gemme sti:" -#: gui/launcher.cpp:333 -#: gui/launcher.cpp:335 -#: gui/launcher.cpp:336 -#: gui/options.cpp:1123 -#: gui/options.cpp:1125 -#: gui/options.cpp:1126 +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 msgid "Specifies where your savegames are put" msgstr "Angiver hvor dine gemmer bliver lagt" -#: gui/launcher.cpp:335 -#: gui/options.cpp:1125 +#: gui/launcher.cpp:335 gui/options.cpp:1125 msgctxt "lowres" msgid "Save Path:" msgstr "Gemme sti:" -#: gui/launcher.cpp:354 -#: gui/launcher.cpp:453 -#: gui/launcher.cpp:511 -#: gui/launcher.cpp:565 -#: gui/options.cpp:1134 -#: gui/options.cpp:1142 -#: gui/options.cpp:1151 -#: gui/options.cpp:1258 -#: gui/options.cpp:1264 -#: gui/options.cpp:1272 -#: gui/options.cpp:1302 -#: gui/options.cpp:1308 -#: gui/options.cpp:1315 -#: gui/options.cpp:1408 -#: gui/options.cpp:1411 +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 #: gui/options.cpp:1423 msgctxt "path" msgid "None" msgstr "Ingen" -#: gui/launcher.cpp:359 -#: gui/launcher.cpp:459 -#: gui/launcher.cpp:569 -#: gui/options.cpp:1252 -#: gui/options.cpp:1296 -#: gui/options.cpp:1414 +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 #: backends/platform/wii/options.cpp:56 msgid "Default" msgstr "Standard" -#: gui/launcher.cpp:504 -#: gui/options.cpp:1417 +#: gui/launcher.cpp:504 gui/options.cpp:1417 msgid "Select SoundFont" msgstr "Vælg SoundFont" -#: gui/launcher.cpp:523 -#: gui/launcher.cpp:677 +#: gui/launcher.cpp:523 gui/launcher.cpp:677 msgid "Select directory with game data" msgstr "Vælg bibliotek med spil data" @@ -428,13 +353,11 @@ msgstr "V msgid "This game ID is already taken. Please choose another one." msgstr "Dette spil ID er allerede i brug. Vælg venligst et andet." -#: gui/launcher.cpp:621 -#: engines/dialogs.cpp:110 +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 msgid "~Q~uit" msgstr "~A~fslut" -#: gui/launcher.cpp:621 -#: backends/platform/sdl/macosx/appmenu_osx.mm:96 +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 msgid "Quit ScummVM" msgstr "Slut ScummVM" @@ -442,8 +365,7 @@ msgstr "Slut ScummVM" msgid "A~b~out..." msgstr "~O~m..." -#: gui/launcher.cpp:622 -#: backends/platform/sdl/macosx/appmenu_osx.mm:70 +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 msgid "About ScummVM" msgstr "Om ScummVM" @@ -471,13 +393,11 @@ msgstr "Ind~l~ msgid "Load savegame for selected game" msgstr "Indlæs gemmer for det valgte spil" -#: gui/launcher.cpp:633 -#: gui/launcher.cpp:1120 +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 msgid "~A~dd Game..." msgstr "~T~ilføj spil..." -#: gui/launcher.cpp:633 -#: gui/launcher.cpp:640 +#: gui/launcher.cpp:633 gui/launcher.cpp:640 msgid "Hold Shift for Mass Add" msgstr "Hold Skift for at tilføje flere" @@ -485,8 +405,7 @@ msgstr "Hold Skift for at tilf msgid "~E~dit Game..." msgstr "~R~ediger spil..." -#: gui/launcher.cpp:635 -#: gui/launcher.cpp:642 +#: gui/launcher.cpp:635 gui/launcher.cpp:642 msgid "Change game options" msgstr "Ændre spil indstillinger" @@ -494,13 +413,11 @@ msgstr " msgid "~R~emove Game" msgstr "~F~jern spil" -#: gui/launcher.cpp:637 -#: gui/launcher.cpp:644 +#: gui/launcher.cpp:637 gui/launcher.cpp:644 msgid "Remove game from the list. The game data files stay intact" msgstr "Fjerner spil fra listen. Spillets data filer forbliver uberørt" -#: gui/launcher.cpp:640 -#: gui/launcher.cpp:1120 +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 msgctxt "lowres" msgid "~A~dd Game..." msgstr "~T~ilføj spil..." @@ -519,36 +436,31 @@ msgstr "~F~jern spil" msgid "Search in game list" msgstr "Søg i spil liste" -#: gui/launcher.cpp:656 -#: gui/launcher.cpp:1167 +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 msgid "Search:" msgstr "Søg:" -#: gui/launcher.cpp:680 -#: engines/dialogs.cpp:114 -#: engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:214 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Indlæs spil:" -#: gui/launcher.cpp:680 -#: engines/dialogs.cpp:114 -#: engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 -#: engines/mohawk/riven.cpp:716 -#: engines/cruise/menu.cpp:214 -#: backends/platform/wince/CEActionsPocket.cpp:267 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" msgstr "Indlæs" #: gui/launcher.cpp:788 -msgid "Do you really want to run the mass game detector? This could potentially add a huge number of games." -msgstr "Vil du virkelig køre fler spils detektoren? Dette kunne potentielt tilføje et stort antal spil." +msgid "" +"Do you really want to run the mass game detector? This could potentially add " +"a huge number of games." +msgstr "" +"Vil du virkelig køre fler spils detektoren? Dette kunne potentielt tilføje " +"et stort antal spil." -#: gui/launcher.cpp:789 -#: gui/launcher.cpp:937 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -556,8 +468,7 @@ msgstr "Vil du virkelig k msgid "Yes" msgstr "Ja" -#: gui/launcher.cpp:789 -#: gui/launcher.cpp:937 +#: gui/launcher.cpp:789 gui/launcher.cpp:937 #: backends/events/symbiansdl/symbiansdl-events.cpp:184 #: backends/platform/wince/CEActionsPocket.cpp:326 #: backends/platform/wince/CEActionsSmartphone.cpp:287 @@ -587,7 +498,8 @@ msgstr "Dette spil underst #: gui/launcher.cpp:1005 msgid "ScummVM could not find any engine capable of running the selected game!" -msgstr "ScummVM kunne ikke finde en motor, istand til at afvikle det valgte spil!" +msgstr "" +"ScummVM kunne ikke finde en motor, istand til at afvikle det valgte spil!" #: gui/launcher.cpp:1119 msgctxt "lowres" @@ -598,8 +510,7 @@ msgstr "Tilf msgid "Mass Add..." msgstr "Tilføj flere..." -#: gui/massadd.cpp:78 -#: gui/massadd.cpp:81 +#: gui/massadd.cpp:78 gui/massadd.cpp:81 msgid "... progress ..." msgstr "... fremskridt ..." @@ -662,11 +573,8 @@ msgstr "44 kHz" msgid "48 kHz" msgstr "48 kHz" -#: gui/options.cpp:248 -#: gui/options.cpp:474 -#: gui/options.cpp:575 -#: gui/options.cpp:644 -#: gui/options.cpp:852 +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 msgctxt "soundfont" msgid "None" msgstr "Ingen" @@ -695,8 +603,7 @@ msgstr "Grafik tilstand:" msgid "Render mode:" msgstr "Rendere tilstand:" -#: gui/options.cpp:741 -#: gui/options.cpp:742 +#: gui/options.cpp:741 gui/options.cpp:742 msgid "Special dithering modes supported by some games" msgstr "Speciel farvereduceringstilstand understøttet a nogle spil" @@ -722,14 +629,11 @@ msgstr "Foretruk. enhed:" msgid "Music Device:" msgstr "Musik enhed:" -#: gui/options.cpp:764 -#: gui/options.cpp:766 +#: gui/options.cpp:764 gui/options.cpp:766 msgid "Specifies preferred sound device or sound card emulator" msgstr "Angiver foretukket lyd enhed eller lydkort emulator" -#: gui/options.cpp:764 -#: gui/options.cpp:766 -#: gui/options.cpp:767 +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 msgid "Specifies output sound device or sound card emulator" msgstr "Angiver lyd udgangsenhed eller lydkorts emulator" @@ -747,8 +651,7 @@ msgstr "Musik enhed:" msgid "AdLib emulator:" msgstr "AdLib emulator:" -#: gui/options.cpp:793 -#: gui/options.cpp:794 +#: gui/options.cpp:793 gui/options.cpp:794 msgid "AdLib is used for music in many games" msgstr "AdLib bliver brugt til musik i mange spil" @@ -756,10 +659,13 @@ msgstr "AdLib bliver brugt til musik i mange spil" msgid "Output rate:" msgstr "Udgangsfrekvens:" -#: gui/options.cpp:804 -#: gui/options.cpp:805 -msgid "Higher value specifies better sound quality but may be not supported by your soundcard" -msgstr "Højere værdi angiver bedre lyd kvalitet, men understøttes måske ikke af dit lydkort" +#: gui/options.cpp:804 gui/options.cpp:805 +msgid "" +"Higher value specifies better sound quality but may be not supported by your " +"soundcard" +msgstr "" +"Højere værdi angiver bedre lyd kvalitet, men understøttes måske ikke af dit " +"lydkort" #: gui/options.cpp:815 msgid "GM Device:" @@ -773,8 +679,7 @@ msgstr "Angiver standard lyd enhed for Generel MIDI-udgang" msgid "Don't use General MIDI music" msgstr "Brug ikke Generel MIDI musik" -#: gui/options.cpp:837 -#: gui/options.cpp:899 +#: gui/options.cpp:837 gui/options.cpp:899 msgid "Use first available device" msgstr "Brug første tilgængelig enhed" @@ -782,9 +687,7 @@ msgstr "Brug f msgid "SoundFont:" msgstr "SoundFont:" -#: gui/options.cpp:849 -#: gui/options.cpp:851 -#: gui/options.cpp:852 +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "SoundFont er understøttet af nogle lydkort, Fluidsynth og Timidity" @@ -817,10 +720,13 @@ msgstr "Angiver standard lyd enhed for Roland MT-32/LAPC1/CM32I/CM64 udgang" msgid "True Roland MT-32 (disable GM emulation)" msgstr "Ægte Roland MT-32 (undlad GM emulering)" -#: gui/options.cpp:875 -#: gui/options.cpp:877 -msgid "Check if you want to use your real hardware Roland-compatible sound device connected to your computer" -msgstr "Kontroller om du vil bruge din rigtige hardware Roland-kompatible lyd enhed tilsluttet til din computer" +#: gui/options.cpp:875 gui/options.cpp:877 +msgid "" +"Check if you want to use your real hardware Roland-compatible sound device " +"connected to your computer" +msgstr "" +"Kontroller om du vil bruge din rigtige hardware Roland-kompatible lyd enhed " +"tilsluttet til din computer" #: gui/options.cpp:877 msgctxt "lowres" @@ -843,13 +749,11 @@ msgstr "Brug ikke Roland MT-32 musik" msgid "Text and Speech:" msgstr "Tekst og tale:" -#: gui/options.cpp:920 -#: gui/options.cpp:930 +#: gui/options.cpp:920 gui/options.cpp:930 msgid "Speech" msgstr "Tale" -#: gui/options.cpp:921 -#: gui/options.cpp:931 +#: gui/options.cpp:921 gui/options.cpp:931 msgid "Subtitles" msgstr "Undertekster" @@ -905,9 +809,7 @@ msgstr "Mute alle" msgid "SFX volume:" msgstr "SFX lydstyrke:" -#: gui/options.cpp:962 -#: gui/options.cpp:964 -#: gui/options.cpp:965 +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 msgid "Special sound effects volume" msgstr "Lydstyrke for specielle lydeffekter" @@ -934,9 +836,7 @@ msgctxt "lowres" msgid "Theme Path:" msgstr "Tema sti:" -#: gui/options.cpp:1139 -#: gui/options.cpp:1141 -#: gui/options.cpp:1142 +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 msgid "Specifies path to additional data used by all games or ScummVM" msgstr "Angiver sti til ekstra data brugt af alle spil eller ScummVM" @@ -1012,83 +912,115 @@ msgid "Select directory for plugins" msgstr "Vælg bibliotek for plugins" #: gui/options.cpp:1450 -msgid "The theme you selected does not support your current language. If you want to use this theme you need to switch to another language first." -msgstr "Temaet du valgte understøtter ikke dit aktuelle sprog. Hvis du ønsker at bruge dette tema, skal du skifte til et andet sprog først." +msgid "" +"The theme you selected does not support your current language. If you want " +"to use this theme you need to switch to another language first." +msgstr "" +"Temaet du valgte understøtter ikke dit aktuelle sprog. Hvis du ønsker at " +"bruge dette tema, skal du skifte til et andet sprog først." + +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" -#: gui/saveload.cpp:59 -#: gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "Ingen dato gemt" -#: gui/saveload.cpp:60 -#: gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "Intet tidspunkt gemt" -#: gui/saveload.cpp:61 -#: gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "Ingen spilletid gemt" -#: gui/saveload.cpp:68 -#: gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "Slet" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "Vil du virkelig slette denne gemmer?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "Dato:" -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "Tid:" -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "Spilletid:" -#: gui/saveload.cpp:305 -#: gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "Unavngivet gemmetilstand" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "Gem" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "Mislykkedes at gemme spil" + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "Navn:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "Vælg et tema" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "Deaktiveret GFX" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "Deaktiveret GFX" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "Standard renderer (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "Standard (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "Antialias renderer (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "Antialias (16bpp)" -#: gui/widget.cpp:322 -#: gui/widget.cpp:324 -#: gui/widget.cpp:330 -#: gui/widget.cpp:332 +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 msgid "Clear value" msgstr "Slet værdi" @@ -1101,15 +1033,13 @@ msgstr "Motor underst msgid "Menu" msgstr "Menu" -#: base/main.cpp:290 -#: backends/platform/symbian/src/SymbianActions.cpp:45 +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 #: backends/platform/wince/CEActionsPocket.cpp:45 #: backends/platform/wince/CEActionsSmartphone.cpp:46 msgid "Skip" msgstr "Spring over" -#: base/main.cpp:293 -#: backends/platform/symbian/src/SymbianActions.cpp:50 +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 #: backends/platform/wince/CEActionsPocket.cpp:42 msgid "Pause" msgstr "Pause" @@ -1190,16 +1120,17 @@ msgstr "Bruger annullerede" msgid "Unknown error" msgstr "Ukendt fejl" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Spillet i '%s' ser ud til at være ukendt." -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" -msgstr "Venligst, rapportere følgende data til ScummVM holdet sammen med navnet" +msgstr "" +"Venligst, rapportere følgende data til ScummVM holdet sammen med navnet" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "på det spil, du forsøgte at tilføje og dets version/sprog/ etc.:" @@ -1227,29 +1158,23 @@ msgstr "H~j~ msgid "~A~bout" msgstr "~O~m" -#: engines/dialogs.cpp:104 -#: engines/dialogs.cpp:180 +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 msgid "~R~eturn to Launcher" msgstr "~R~etur til spiloversigt" -#: engines/dialogs.cpp:106 -#: engines/dialogs.cpp:182 +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 msgctxt "lowres" msgid "~R~eturn to Launcher" msgstr "~R~etur til oversigt" -#: engines/dialogs.cpp:115 -#: engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "Gemmer:" -#: engines/dialogs.cpp:115 -#: engines/agi/saveload.cpp:803 -#: engines/scumm/dialogs.cpp:187 -#: engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1259,22 +1184,30 @@ msgid "Save" msgstr "Gem" #: engines/dialogs.cpp:144 -msgid "Sorry, this engine does not currently provide in-game help. Please consult the README for basic information, and for instructions on how to obtain further assistance." -msgstr "Beklager, denne motor leverer i øjeblikket ikke spil hjælp. Se venligst README for grundlæggende oplysninger, og for at få instruktioner om, hvordan man får yderligere hjælp." +msgid "" +"Sorry, this engine does not currently provide in-game help. Please consult " +"the README for basic information, and for instructions on how to obtain " +"further assistance." +msgstr "" +"Beklager, denne motor leverer i øjeblikket ikke spil hjælp. Se venligst " +"README for grundlæggende oplysninger, og for at få instruktioner om, hvordan " +"man får yderligere hjælp." #: engines/dialogs.cpp:228 #, c-format -msgid "Gamestate save failed (%s)! Please consult the README for basic information, and for instructions on how to obtain further assistance." -msgstr "Gem af spiltilstand fejlede (%s)! Se venligst README for grundlæggende oplysninger, og for at få instruktioner om, hvordan man får yderligere hjælp." +msgid "" +"Gamestate save failed (%s)! Please consult the README for basic information, " +"and for instructions on how to obtain further assistance." +msgstr "" +"Gem af spiltilstand fejlede (%s)! Se venligst README for grundlæggende " +"oplysninger, og for at få instruktioner om, hvordan man får yderligere hjælp." -#: engines/dialogs.cpp:301 -#: engines/mohawk/dialogs.cpp:109 +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" msgstr "~O~K" -#: engines/dialogs.cpp:302 -#: engines/mohawk/dialogs.cpp:110 +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 msgid "~C~ancel" msgstr "~F~ortryd" @@ -1329,36 +1262,43 @@ msgstr "" #: engines/engine.cpp:426 #, c-format -msgid "Gamestate load failed (%s)! Please consult the README for basic information, and for instructions on how to obtain further assistance." -msgstr "Indlæsning af spiltilstand fejlede (%s)! Se venligst README for grundlæggende oplysninger, og for at få instruktioner om, hvordan man får yderligere hjælp." +msgid "" +"Gamestate load failed (%s)! Please consult the README for basic information, " +"and for instructions on how to obtain further assistance." +msgstr "" +"Indlæsning af spiltilstand fejlede (%s)! Se venligst README for " +"grundlæggende oplysninger, og for at få instruktioner om, hvordan man får " +"yderligere hjælp." #: engines/engine.cpp:439 -msgid "WARNING: The game you are about to start is not yet fully supported by ScummVM. As such, it is likely to be unstable, and any saves you make might not work in future versions of ScummVM." -msgstr "ADVARSEL: Spillet du er ved at starte endnu ikke er fuldt understøttet af ScummVM. Således, er det sandsynligt, at det er ustabilt, og alle gemmer du foretager fungerer muligvis ikke i fremtidige versioner af ScummVM." +msgid "" +"WARNING: The game you are about to start is not yet fully supported by " +"ScummVM. As such, it is likely to be unstable, and any saves you make might " +"not work in future versions of ScummVM." +msgstr "" +"ADVARSEL: Spillet du er ved at starte endnu ikke er fuldt understøttet af " +"ScummVM. Således, er det sandsynligt, at det er ustabilt, og alle gemmer du " +"foretager fungerer muligvis ikke i fremtidige versioner af ScummVM." #: engines/engine.cpp:442 msgid "Start anyway" msgstr "Start alligevel" -#: engines/agi/detection.cpp:145 -#: engines/dreamweb/detection.cpp:47 +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" msgstr "Brug original gem/indlæs skærme" -#: engines/agi/detection.cpp:146 -#: engines/dreamweb/detection.cpp:48 +#: 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 "Brug de originale gem/indlæs skærme, istedet for dem fra ScummVM" -#: engines/agi/saveload.cpp:816 -#: engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "Gendan spil:" -#: engines/agi/saveload.cpp:816 -#: engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "Gendan" @@ -1391,8 +1331,12 @@ msgid "Use IMF/Yamaha FB-01 for MIDI output" msgstr "Brug IMF/Yamaha FB-01 til MIDI-udgang" #: engines/sci/detection.cpp:401 -msgid "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI output" -msgstr "Bruge et IBM Musik Feature-kort eller et Yamaha FB-01 FM synth modul til MIDI-udgang" +msgid "" +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " +"output" +msgstr "" +"Bruge et IBM Musik Feature-kort eller et Yamaha FB-01 FM synth modul til " +"MIDI-udgang" #: engines/sci/detection.cpp:411 msgid "Use CD audio" @@ -1407,7 +1351,8 @@ msgid "Use Windows cursors" msgstr "Brug Windows markør" #: engines/sci/detection.cpp:423 -msgid "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "Brug Windows-markører (mindre og monokrome) i stedet for dem fra DOS" #: engines/sci/detection.cpp:433 @@ -1415,8 +1360,10 @@ msgid "Use silver cursors" msgstr "Brug sølv markør" #: engines/sci/detection.cpp:434 -msgid "Use the alternate set of silver cursors, instead of the normal golden ones" -msgstr "Brug det alternative sæt af sølv markører, i stedet for de normale gyldne" +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" +"Brug det alternative sæt af sølv markører, i stedet for de normale gyldne" #: engines/scumm/dialogs.cpp:175 #, c-format @@ -1453,8 +1400,7 @@ msgstr "Er du sikker p msgid "Play" msgstr "Spil" -#: engines/scumm/dialogs.cpp:191 -#: engines/scumm/help.cpp:82 +#: engines/scumm/dialogs.cpp:191 engines/scumm/help.cpp:82 #: engines/scumm/help.cpp:84 #: backends/platform/symbian/src/SymbianActions.cpp:52 #: backends/platform/wince/CEActionsPocket.cpp:44 @@ -1581,16 +1527,11 @@ msgstr "Mellemrum" msgid "Pause game" msgstr "Pause spil" -#: engines/scumm/help.cpp:79 -#: engines/scumm/help.cpp:84 -#: engines/scumm/help.cpp:95 -#: engines/scumm/help.cpp:96 -#: engines/scumm/help.cpp:97 -#: engines/scumm/help.cpp:98 -#: engines/scumm/help.cpp:99 -#: engines/scumm/help.cpp:100 -#: engines/scumm/help.cpp:101 -#: engines/scumm/help.cpp:102 +#: engines/scumm/help.cpp:79 engines/scumm/help.cpp:84 +#: engines/scumm/help.cpp:95 engines/scumm/help.cpp:96 +#: engines/scumm/help.cpp:97 engines/scumm/help.cpp:98 +#: engines/scumm/help.cpp:99 engines/scumm/help.cpp:100 +#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102 msgid "Ctrl" msgstr "Ctrl" @@ -1598,12 +1539,9 @@ msgstr "Ctrl" msgid "Load game state 1-10" msgstr "Indlæs spil tilstand 1-10" -#: engines/scumm/help.cpp:80 -#: engines/scumm/help.cpp:84 -#: engines/scumm/help.cpp:86 -#: engines/scumm/help.cpp:100 -#: engines/scumm/help.cpp:101 -#: engines/scumm/help.cpp:102 +#: engines/scumm/help.cpp:80 engines/scumm/help.cpp:84 +#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:100 +#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102 msgid "Alt" msgstr "Alt" @@ -1611,8 +1549,7 @@ msgstr "Alt" msgid "Save game state 1-10" msgstr "Gem spil tilstand 1-10" -#: engines/scumm/help.cpp:86 -#: engines/scumm/help.cpp:89 +#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:89 msgid "Enter" msgstr "Enter" @@ -1704,30 +1641,24 @@ msgstr "Spind ordspil p msgid "Main game controls:" msgstr "Vigtigste spilstyring:" -#: engines/scumm/help.cpp:121 -#: engines/scumm/help.cpp:136 +#: engines/scumm/help.cpp:121 engines/scumm/help.cpp:136 #: engines/scumm/help.cpp:161 msgid "Push" msgstr "Skub" -#: engines/scumm/help.cpp:122 -#: engines/scumm/help.cpp:137 +#: engines/scumm/help.cpp:122 engines/scumm/help.cpp:137 #: engines/scumm/help.cpp:162 msgid "Pull" msgstr "Træk" -#: engines/scumm/help.cpp:123 -#: engines/scumm/help.cpp:138 -#: engines/scumm/help.cpp:163 -#: engines/scumm/help.cpp:197 +#: engines/scumm/help.cpp:123 engines/scumm/help.cpp:138 +#: engines/scumm/help.cpp:163 engines/scumm/help.cpp:197 #: engines/scumm/help.cpp:207 msgid "Give" msgstr "Giv" -#: engines/scumm/help.cpp:124 -#: engines/scumm/help.cpp:139 -#: engines/scumm/help.cpp:164 -#: engines/scumm/help.cpp:190 +#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139 +#: engines/scumm/help.cpp:164 engines/scumm/help.cpp:190 #: engines/scumm/help.cpp:208 msgid "Open" msgstr "Åbn" @@ -1740,54 +1671,43 @@ msgstr "G msgid "Get" msgstr "Tag" -#: engines/scumm/help.cpp:128 -#: engines/scumm/help.cpp:152 -#: engines/scumm/help.cpp:170 -#: engines/scumm/help.cpp:198 -#: engines/scumm/help.cpp:213 -#: engines/scumm/help.cpp:224 +#: engines/scumm/help.cpp:128 engines/scumm/help.cpp:152 +#: engines/scumm/help.cpp:170 engines/scumm/help.cpp:198 +#: engines/scumm/help.cpp:213 engines/scumm/help.cpp:224 #: engines/scumm/help.cpp:250 msgid "Use" msgstr "Brug" -#: engines/scumm/help.cpp:129 -#: engines/scumm/help.cpp:141 +#: engines/scumm/help.cpp:129 engines/scumm/help.cpp:141 msgid "Read" msgstr "Læs" -#: engines/scumm/help.cpp:130 -#: engines/scumm/help.cpp:147 +#: engines/scumm/help.cpp:130 engines/scumm/help.cpp:147 msgid "New kid" msgstr "Nyt barn" -#: engines/scumm/help.cpp:131 -#: engines/scumm/help.cpp:153 +#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:153 #: engines/scumm/help.cpp:171 msgid "Turn on" msgstr "Tænd" -#: engines/scumm/help.cpp:132 -#: engines/scumm/help.cpp:154 +#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:154 #: engines/scumm/help.cpp:172 msgid "Turn off" msgstr "Sluk" -#: engines/scumm/help.cpp:142 -#: engines/scumm/help.cpp:167 +#: engines/scumm/help.cpp:142 engines/scumm/help.cpp:167 #: engines/scumm/help.cpp:194 msgid "Walk to" msgstr "Gå til" -#: engines/scumm/help.cpp:143 -#: engines/scumm/help.cpp:168 -#: engines/scumm/help.cpp:195 -#: engines/scumm/help.cpp:210 +#: engines/scumm/help.cpp:143 engines/scumm/help.cpp:168 +#: engines/scumm/help.cpp:195 engines/scumm/help.cpp:210 #: engines/scumm/help.cpp:227 msgid "Pick up" msgstr "Tag op" -#: engines/scumm/help.cpp:144 -#: engines/scumm/help.cpp:169 +#: engines/scumm/help.cpp:144 engines/scumm/help.cpp:169 msgid "What is" msgstr "Hvad er" @@ -1811,13 +1731,11 @@ msgstr "Lav" msgid "Switch" msgstr "Skift" -#: engines/scumm/help.cpp:166 -#: engines/scumm/help.cpp:228 +#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:228 msgid "Look" msgstr "Se" -#: engines/scumm/help.cpp:173 -#: engines/scumm/help.cpp:223 +#: engines/scumm/help.cpp:173 engines/scumm/help.cpp:223 msgid "Talk" msgstr "Tal" @@ -1862,24 +1780,20 @@ msgstr "spil H p msgid "play C major on distaff" msgstr "spil C-dur på rok" -#: engines/scumm/help.cpp:192 -#: engines/scumm/help.cpp:214 +#: engines/scumm/help.cpp:192 engines/scumm/help.cpp:214 msgid "puSh" msgstr "Skub" -#: engines/scumm/help.cpp:193 -#: engines/scumm/help.cpp:215 +#: engines/scumm/help.cpp:193 engines/scumm/help.cpp:215 msgid "pull (Yank)" msgstr "træk (Y)" -#: engines/scumm/help.cpp:196 -#: engines/scumm/help.cpp:212 +#: engines/scumm/help.cpp:196 engines/scumm/help.cpp:212 #: engines/scumm/help.cpp:248 msgid "Talk to" msgstr "Tal til" -#: engines/scumm/help.cpp:199 -#: engines/scumm/help.cpp:211 +#: engines/scumm/help.cpp:199 engines/scumm/help.cpp:211 msgid "Look at" msgstr "Lur på" @@ -1911,10 +1825,8 @@ msgstr "Fremh msgid "Walk" msgstr "Gå" -#: engines/scumm/help.cpp:225 -#: engines/scumm/help.cpp:234 -#: engines/scumm/help.cpp:241 -#: engines/scumm/help.cpp:249 +#: engines/scumm/help.cpp:225 engines/scumm/help.cpp:234 +#: engines/scumm/help.cpp:241 engines/scumm/help.cpp:249 msgid "Inventory" msgstr "Oversigt" @@ -1942,8 +1854,7 @@ msgstr "Slag" msgid "Kick" msgstr "Spark" -#: engines/scumm/help.cpp:239 -#: engines/scumm/help.cpp:247 +#: engines/scumm/help.cpp:239 engines/scumm/help.cpp:247 msgid "Examine" msgstr "Undersøg" @@ -1964,38 +1875,31 @@ msgstr "Gem / Indl msgid "Other game controls:" msgstr "Andre spil kontroller" -#: engines/scumm/help.cpp:257 -#: engines/scumm/help.cpp:267 +#: engines/scumm/help.cpp:257 engines/scumm/help.cpp:267 msgid "Inventory:" msgstr "Oversigt:" -#: engines/scumm/help.cpp:258 -#: engines/scumm/help.cpp:274 +#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:274 msgid "Scroll list up" msgstr "Rul liste op" -#: engines/scumm/help.cpp:259 -#: engines/scumm/help.cpp:275 +#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275 msgid "Scroll list down" msgstr "Rul liste ned" -#: engines/scumm/help.cpp:260 -#: engines/scumm/help.cpp:268 +#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:268 msgid "Upper left item" msgstr "Øverste venstre punkt" -#: engines/scumm/help.cpp:261 -#: engines/scumm/help.cpp:270 +#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:270 msgid "Lower left item" msgstr "Nederste højre punkt" -#: engines/scumm/help.cpp:262 -#: engines/scumm/help.cpp:271 +#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271 msgid "Upper right item" msgstr "Øverste højre punkt" -#: engines/scumm/help.cpp:263 -#: engines/scumm/help.cpp:273 +#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:273 msgid "Lower right item" msgstr "Nederste venstre punkt" @@ -2007,8 +1911,7 @@ msgstr "Midterste h msgid "Middle right item" msgstr "Midterste højre punkt" -#: engines/scumm/help.cpp:279 -#: engines/scumm/help.cpp:284 +#: engines/scumm/help.cpp:279 engines/scumm/help.cpp:284 msgid "Switching characters:" msgstr "Skift personer:" @@ -2024,8 +1927,7 @@ msgstr "Tredie barn" msgid "Fighting controls (numpad):" msgstr "Kamp kontroller (numtast):" -#: engines/scumm/help.cpp:295 -#: engines/scumm/help.cpp:296 +#: engines/scumm/help.cpp:295 engines/scumm/help.cpp:296 #: engines/scumm/help.cpp:297 msgid "Step back" msgstr "Skridt tilbage" @@ -2119,8 +2021,7 @@ msgstr "" "Indbygget MIDI understøttelse kræver Roland opgradering fra LucasArts,\n" "men %s mangler. Bruger AdLib i stedet." -#: engines/scumm/scumm.cpp:2278 -#: engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2131,8 +2032,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 -#: engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2143,8 +2043,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 -#: engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2156,12 +2055,17 @@ msgstr "" "%s" #: engines/scumm/scumm.cpp:2512 -msgid "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' directory inside the Tentacle game directory." -msgstr "Normalt ville Maniac Mansion begynde nu. Men ScummVM kan ikke gøre det endnu. For at spille det, gå til 'Tilføj spil' i ScummVM start-menuen og vælg 'Maniac' mappen inde i Tentacle spillets mappe." +msgid "" +"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " +"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " +"directory inside the Tentacle game directory." +msgstr "" +"Normalt ville Maniac Mansion begynde nu. Men ScummVM kan ikke gøre det " +"endnu. For at spille det, gå til 'Tilføj spil' i ScummVM start-menuen og " +"vælg 'Maniac' mappen inde i Tentacle spillets mappe." #. I18N: Option for fast scene switching -#: engines/mohawk/dialogs.cpp:92 -#: engines/mohawk/dialogs.cpp:171 +#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171 msgid "~Z~ip Mode Activated" msgstr "~Z~ip tilstand aktiveret" @@ -2191,14 +2095,12 @@ msgstr "~V~andeffekter aktiveret" msgid "Cutscene file '%s' not found!" msgstr "Filmsekvens fil '%s' ikke fundet!" -#: engines/gob/inter_playtoons.cpp:256 -#: engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "Mislykkedes at indlæse spil tilstand fra fil." -#: engines/gob/inter_v2.cpp:1357 -#: engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "Mislykkedes at gemme spil tilstand til fil." @@ -2331,13 +2233,12 @@ msgstr "" "at nogle stykker ikke lyder korrekt." #: engines/queen/queen.cpp:59 -#: engines/sky/detection.cpp:44 -msgid "Floppy intro" -msgstr "Diskette intro" +msgid "Alternative intro" +msgstr "" #: engines/queen/queen.cpp:60 -#: engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#, fuzzy +msgid "Use an alternative game intro (CD version only)" msgstr "Brug diskette versionens intro (kun CD version)" #: engines/sky/compact.cpp:130 @@ -2356,38 +2257,50 @@ msgstr "" "\"sky.cpt\" filen har en forkert størrelse.\n" "Venligst (gen)hent den fra www.scummvm.org" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "Diskette intro" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "Brug diskette versionens intro (kun CD version)" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" msgstr "PSX stream filmsekvens '%s' kan ikke afspilles i palette tilstand" -#: engines/sword1/animation.cpp:560 -#: engines/sword2/animation.cpp:455 +#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 msgid "DXA cutscenes found but ScummVM has been built without zlib support" -msgstr "DXA filmsekvenser fundet, men ScummVM er bygget uden zlib understøttelse" +msgstr "" +"DXA filmsekvenser fundet, men ScummVM er bygget uden zlib understøttelse" -#: engines/sword1/animation.cpp:570 -#: engines/sword2/animation.cpp:465 +#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465 msgid "MPEG2 cutscenes are no longer supported" msgstr "MPEG2 filmsekvenser understøttes ikke længere" -#: engines/sword1/animation.cpp:576 -#: engines/sword2/animation.cpp:473 +#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473 #, c-format msgid "Cutscene '%s' not found" msgstr "Filmsekvens '%s' ikke fundet" #: engines/sword1/control.cpp:863 msgid "" -"ScummVM found that you have old savefiles for Broken Sword 1 that should be converted.\n" -"The old save game format is no longer supported, so you will not be able to load your games if you don't convert them.\n" +"ScummVM found that you have old savefiles for Broken Sword 1 that should be " +"converted.\n" +"The old save game format is no longer supported, so you will not be able to " +"load your games if you don't convert them.\n" "\n" -"Press OK to convert them now, otherwise you will be asked again the next time you start the game.\n" +"Press OK to convert them now, otherwise you will be asked again the next " +"time you start the game.\n" msgstr "" -"ScummVM har konstateret, at du har gamle gemmer for Broken Sword 1, der skal konverteres.\n" -"Det gamle gemte spil format understøttes ikke længere, så vil du ikke være i stand til at indlæse dine spil, hvis du ikke konvertere dem.\n" +"ScummVM har konstateret, at du har gamle gemmer for Broken Sword 1, der skal " +"konverteres.\n" +"Det gamle gemte spil format understøttes ikke længere, så vil du ikke være i " +"stand til at indlæse dine spil, hvis du ikke konvertere dem.\n" "\n" -"Tryk på OK for at konvertere dem nu, ellers vil du blive spurgt igen, næste gang du starter spillet.\n" +"Tryk på OK for at konvertere dem nu, ellers vil du blive spurgt igen, næste " +"gang du starter spillet.\n" #: engines/sword1/control.cpp:1232 #, c-format @@ -2411,8 +2324,10 @@ msgid "This is the end of the Broken Sword 1 Demo" msgstr "Dette er slutningen af Broken Sword 1 demoen" #: engines/sword2/animation.cpp:435 -msgid "PSX cutscenes found but ScummVM has been built without RGB color support" -msgstr "PSX filmsekvenser fundet, men ScummVM er bygget uden RGB farve understøttelse" +msgid "" +"PSX cutscenes found but ScummVM has been built without RGB color support" +msgstr "" +"PSX filmsekvenser fundet, men ScummVM er bygget uden RGB farve understøttelse" #: engines/sword2/sword2.cpp:79 msgid "Show object labels" @@ -2422,6 +2337,17 @@ msgstr "Vis labels p msgid "Show labels for objects on mouse hover" msgstr "Vis labels for genstande musen er henover" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2441,13 +2367,17 @@ msgstr "Gemmer spil..." #: engines/parallaction/saveload.cpp:272 msgid "" -"ScummVM found that you have old savefiles for Nippon Safes that should be renamed.\n" -"The old names are no longer supported, so you will not be able to load your games if you don't convert them.\n" +"ScummVM found that you have old savefiles for Nippon Safes that should be " +"renamed.\n" +"The old names are no longer supported, so you will not be able to load your " +"games if you don't convert them.\n" "\n" "Press OK to convert them now, otherwise you will be asked next time.\n" msgstr "" -"ScummVM har konstateret, at du har gamle gemmer for Nippon Safes, der skal omdøbes.\n" -"De gamle navne er ikke længere understøttet, så du vil ikke være i stand til at indlæse dine spil, hvis du ikke konvertere dem.\n" +"ScummVM har konstateret, at du har gamle gemmer for Nippon Safes, der skal " +"omdøbes.\n" +"De gamle navne er ikke længere understøttet, så du vil ikke være i stand til " +"at indlæse dine spil, hvis du ikke konvertere dem.\n" "\n" "Tryk på OK for at konvertere dem nu, ellers vil du blive spurgt næste gang.\n" @@ -2457,11 +2387,13 @@ msgstr "ScummVM konverterede med succes alle dine gemmer." #: engines/parallaction/saveload.cpp:321 msgid "" -"ScummVM printed some warnings in your console window and can't guarantee all your files have been converted.\n" +"ScummVM printed some warnings in your console window and can't guarantee all " +"your files have been converted.\n" "\n" "Please report to the team." msgstr "" -"ScummVM udskrev nogle advarsler i dit konsol vindue, og kan ikke garantere at alle dine filer er blevet konverteret.\n" +"ScummVM udskrev nogle advarsler i dit konsol vindue, og kan ikke garantere " +"at alle dine filer er blevet konverteret.\n" "\n" "Venligst rapportér til holdet." @@ -2475,30 +2407,43 @@ msgstr "DOSBox OPL emulator" #: audio/mididrv.cpp:209 #, c-format -msgid "The selected audio device '%s' was not found (e.g. might be turned off or disconnected)." -msgstr "Den valgte lydenhed '%s' blev ikke fundet (kan f.eks være slukket eller afbrudt)." +msgid "" +"The selected audio device '%s' was not found (e.g. might be turned off or " +"disconnected)." +msgstr "" +"Den valgte lydenhed '%s' blev ikke fundet (kan f.eks være slukket eller " +"afbrudt)." -#: audio/mididrv.cpp:209 -#: audio/mididrv.cpp:221 -#: audio/mididrv.cpp:257 +#: audio/mididrv.cpp:209 audio/mididrv.cpp:221 audio/mididrv.cpp:257 #: audio/mididrv.cpp:272 msgid "Attempting to fall back to the next available device..." msgstr "Forsøger at falde tilbage til den næste tilgængelig enhed..." #: audio/mididrv.cpp:221 #, c-format -msgid "The selected audio device '%s' cannot be used. See log file for more information." -msgstr "Den valgte lydenhed '%s' kan ikke bruges. Se log filen for mere information." +msgid "" +"The selected audio device '%s' cannot be used. See log file for more " +"information." +msgstr "" +"Den valgte lydenhed '%s' kan ikke bruges. Se log filen for mere information." #: audio/mididrv.cpp:257 #, c-format -msgid "The preferred audio device '%s' was not found (e.g. might be turned off or disconnected)." -msgstr "Den foretrukne lydenhed '%s' blev ikke fundet (kan f.eks være slukket eller afbrudt)." +msgid "" +"The preferred audio device '%s' was not found (e.g. might be turned off or " +"disconnected)." +msgstr "" +"Den foretrukne lydenhed '%s' blev ikke fundet (kan f.eks være slukket eller " +"afbrudt)." #: audio/mididrv.cpp:272 #, c-format -msgid "The preferred audio device '%s' cannot be used. See log file for more information." -msgstr "Den foretrukne lydenhed '%s' kan ikke bruges. Se log filen for mere information." +msgid "" +"The preferred audio device '%s' cannot be used. See log file for more " +"information." +msgstr "" +"Den foretrukne lydenhed '%s' kan ikke bruges. Se log filen for mere " +"information." #: audio/null.h:43 msgid "No music" @@ -2652,11 +2597,11 @@ msgstr "Pegeplade tilstand aktiveret." msgid "Touchpad mode disabled." msgstr "Pegeplade tilstand deaktiveret." -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "Klik tilstand" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2664,11 +2609,11 @@ msgstr "Klik tilstand" msgid "Left Click" msgstr "Venstre klik" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 msgid "Middle Click" msgstr "Miderste klik" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2851,13 +2796,11 @@ msgstr "GC Pad acceleration:" msgid "DVD" msgstr "DVD" -#: backends/platform/wii/options.cpp:89 -#: backends/platform/wii/options.cpp:101 +#: backends/platform/wii/options.cpp:89 backends/platform/wii/options.cpp:101 msgid "Status:" msgstr "Status:" -#: backends/platform/wii/options.cpp:90 -#: backends/platform/wii/options.cpp:102 +#: backends/platform/wii/options.cpp:90 backends/platform/wii/options.cpp:102 msgid "Unknown" msgstr "Ukendt" @@ -3035,7 +2978,8 @@ msgstr "Tildel h #: backends/platform/wince/wince-sdl.cpp:519 msgid "You must map a key to the 'Right Click' action to play this game" -msgstr "Du skal tildele en tast til 'Højreklik' handlingen for at spille dette spil" +msgstr "" +"Du skal tildele en tast til 'Højreklik' handlingen for at spille dette spil" #: backends/platform/wince/wince-sdl.cpp:528 msgid "Map hide toolbar action" @@ -3043,7 +2987,9 @@ msgstr "Tildel \"skjul v #: backends/platform/wince/wince-sdl.cpp:532 msgid "You must map a key to the 'Hide toolbar' action to play this game" -msgstr "Du skal tildele en tast til 'Skjul værktøjslinje' handlingen for at spille dette spil" +msgstr "" +"Du skal tildele en tast til 'Skjul værktøjslinje' handlingen for at spille " +"dette spil" #: backends/platform/wince/wince-sdl.cpp:541 msgid "Map Zoom Up action (optional)" @@ -3054,8 +3000,11 @@ msgid "Map Zoom Down action (optional)" msgstr "Tildel Forstør handling (valgfri)" #: backends/platform/wince/wince-sdl.cpp:552 -msgid "Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory" -msgstr "Glem ikke at tildele en tast til 'Skjul værktøjslinje' handling for at se hele oversigten" +msgid "" +"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory" +msgstr "" +"Glem ikke at tildele en tast til 'Skjul værktøjslinje' handling for at se " +"hele oversigten" #: backends/events/default/default-events.cpp:191 msgid "Do you really want to return to the Launcher?" @@ -3069,37 +3018,37 @@ msgstr "Oversigt" msgid "Do you really want to quit?" msgstr "Vil du virkelig afslutte?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "Touchscreen 'Tap Mode' - Venstre Klik" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "Touchscreen 'Tap Mode' - Højre Klik" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "Touchscreen 'Tap Mode' - Henover (Ingen Klik)" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "Maximal lydstyrke" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "Hæver lydstyrke" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "Minimal lydstyrke" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "Sænker lydstyrke" @@ -3144,20 +3093,20 @@ msgstr "Klik deaktiveret" #~ msgid "Hercules Amber" #~ msgstr "Hercules brun" -#~ msgctxt "lowres" +#~ msgctxt "lowres" #~ msgid "Hercules Green" #~ msgstr "Hercules grøn" -#~ msgctxt "lowres" +#~ msgctxt "lowres" #~ msgid "Hercules Amber" #~ msgstr "Hercules brun" #, fuzzy #~ msgid "Save game failed!" #~ msgstr "Gemmer:" -#~ msgctxt "lowres" +#~ msgctxt "lowres" #~ msgid "Add Game..." #~ msgstr "Tilføj spil..." diff --git a/po/de_DE.po b/po/de_DE.po index bb53f4e2ff..a18bfb7ca6 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -7,15 +7,15 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2012-07-14 22:49+0100\n" "Last-Translator: Simon Sawatzki \n" "Language-Team: Simon Sawatzki (Lead), Lothar Serra Mari " "(Contributor)\n" +"Language: Deutsch\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Deutsch\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #: gui/about.cpp:91 @@ -46,10 +46,11 @@ msgstr "Pfad hoch" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -92,16 +93,16 @@ msgstr "Zuweisen" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "OK" @@ -441,13 +442,13 @@ msgstr "In Spieleliste suchen" msgid "Search:" msgstr "Suchen:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Spiel laden:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -935,68 +936,104 @@ msgstr "" "dieses Thema benutzen wollen, müssen Sie erst zu einer anderen Sprache " "wechseln." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "Kein Datum gespeichert" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "Keine Zeit gespeichert" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "Keine Spielzeit gespeichert" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "Löschen" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "Diesen Spielstand wirklich löschen?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "Datum: " -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "Zeit: " -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "Spieldauer: " -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "Unbenannt" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "Speichern" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "Konnte Spielstand nicht speichern." + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "Name:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "Thema auswählen" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "GFX ausgeschaltet" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX ausgeschaltet" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "Standard-Renderer (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "Standard (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "Kantenglättung (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "Kantenglättung (16bpp)" @@ -1100,18 +1137,18 @@ msgstr "Abbruch durch Benutzer" msgid "Unknown error" msgstr "Unbekannter Fehler" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Das Spiel im Verzeichnis \"%s\" scheint nicht bekannt zu sein." -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Bitte geben Sie die folgenden Daten auf Englisch an das ScummVM-Team weiter " "sowie" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "" "den Namen des Spiels, das Sie hinzufügen wollten, als auch die Version/" @@ -1151,13 +1188,13 @@ msgid "~R~eturn to Launcher" msgstr "Zur Spiele~l~iste" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "Speichern:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1280,11 +1317,11 @@ msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" "Verwendet die originalen Menüs zum Speichern und Laden statt der von ScummVM." -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "Spiel laden:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "Laden" @@ -2011,7 +2048,7 @@ msgstr "" "Roland-Upgrade von LucasArts, aber %s\n" "fehlt. Stattdessen wird AdLib verwendet." -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2022,7 +2059,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2033,7 +2070,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2087,11 +2124,11 @@ msgid "Cutscene file '%s' not found!" msgstr "Zwischensequenz \"%s\" nicht gefunden!" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "Konnte Spielstand aus Datei nicht laden." -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "Konnte Spielstand nicht in Datei speichern." @@ -2225,12 +2262,13 @@ msgstr "" "möglich, dass ein paar Musikstücke nicht\n" "richtig abgespielt werden." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" -msgstr "Disketten-Vorspann" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" +msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +#, fuzzy +msgid "Use an alternative game intro (CD version only)" msgstr "Verwendet den Vorspann der Diskettenversion (nur bei CD-Version)." #: engines/sky/compact.cpp:130 @@ -2251,6 +2289,14 @@ msgstr "" "Bitte laden Sie diese Datei (erneut) von\n" "www.scummvm.org herunter." +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "Disketten-Vorspann" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "Verwendet den Vorspann der Diskettenversion (nur bei CD-Version)." + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2326,6 +2372,17 @@ msgstr "Objektnamen zeigen" msgid "Show labels for objects on mouse hover" msgstr "Zeigt Objektbeschriftungen bei Mausberührung an." +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2577,11 +2634,11 @@ msgstr "Touchpad-Modus aktiviert." msgid "Touchpad mode disabled." msgstr "Touchpad-Modus ausgeschaltet." -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "Klickmodus" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2589,11 +2646,11 @@ msgstr "Klickmodus" msgid "Left Click" msgstr "Linksklick" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 msgid "Middle Click" msgstr "Mittelklick" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2999,37 +3056,37 @@ msgstr "Spieleliste" msgid "Do you really want to quit?" msgstr "Möchten Sie wirklich beenden?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "Berührungsbildschirm-Tipp-Modus - Linksklick" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "Berührungsbildschirm-Tipp-Modus - Rechtsklick" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "Berührungsbildschirm-Tipp-Modus - schweben (kein Klick)" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "Höchste Lautstärke" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "Lautstärke höher" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "Niedrigste Lautstärke" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "Lautstärke niedriger" diff --git a/po/es_ES.po b/po/es_ES.po index 8e23894dcf..9f767dacfa 100644 --- a/po/es_ES.po +++ b/po/es_ES.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.4.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2012-07-08 18:19+0100\n" "Last-Translator: Tomás Maidagan\n" "Language-Team: \n" +"Language: Espanol\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Espanol\n" #: gui/about.cpp:91 #, c-format @@ -44,10 +44,11 @@ msgstr "Arriba" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -90,16 +91,16 @@ msgstr "Asignar" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "Aceptar" @@ -437,13 +438,13 @@ msgstr "Buscar en la lista de juegos" msgid "Search:" msgstr "Buscar:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Cargar juego:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -924,68 +925,104 @@ msgstr "" "El tema seleccionado no es compatible con el idioma actual. Si quieres usar " "este tema debes cambiar a otro idioma primero." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "No hay fecha guardada" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "No hay hora guardada" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "No hay tiempo guardado" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "Borrar" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "¿Seguro que quieres borrar esta partida?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "Fecha: " -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "Hora: " -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "Tiempo: " -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "Partida sin nombre" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "Guardar" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "Fallo al guardar la partida" + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "Nombre:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "Selecciona un tema" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "GFX desactivados" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX desactivados" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "Estándar (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "Estándar (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "Suavizado (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "Suavizado (16bpp)" @@ -1089,16 +1126,16 @@ msgstr "Cancel msgid "Unknown error" msgstr "Error desconocido" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "El juego en '%s' parece ser desconocido." -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Por favor, envía al equipo de ScummVM esta información junto al nombre" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "del juego que has intentado añadir y su versión/idioma/etc.:" @@ -1136,13 +1173,13 @@ msgid "~R~eturn to Launcher" msgstr "~V~olver al lanzador" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "Guardar partida" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1264,11 +1301,11 @@ msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" "Utilizar las pantallas de guardar/cargar originales, en vez de las de ScummVM" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "Cargar partida:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "Cargar" @@ -1992,7 +2029,7 @@ msgstr "" "El soporte MIDI nativo requiere la actualización Roland de LucasArts,\n" "pero %s no está disponible. Se usará AdLib." -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2003,7 +2040,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2014,7 +2051,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2067,11 +2104,11 @@ msgid "Cutscene file '%s' not found!" msgstr "No se ha encontrado el vídeo '%s'" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "Fallo al cargar el estado del juego desde el archivo." -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "Fallo al guardar el estado del juego en el archivo." @@ -2203,12 +2240,13 @@ msgstr "" "a los de General MIDI, pero es posible que algunas\n" "de las pistas no suenen correctamente." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" -msgstr "Intro de disquete" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" +msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +#, fuzzy +msgid "Use an alternative game intro (CD version only)" msgstr "" "Usa la introducción de la versión en disquete (solo para la versión CD)" @@ -2228,6 +2266,15 @@ msgstr "" "El archivo \"sky.cpt\" tiene un tamaño incorrecto.\n" "Por favor, vuelve a bajarlo de www.scummvm.org" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "Intro de disquete" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" +"Usa la introducción de la versión en disquete (solo para la versión CD)" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2301,6 +2348,17 @@ msgstr "Mostrar etiquetas de objetos" msgid "Show labels for objects on mouse hover" msgstr "Muestra las etiquetas de los objetos al pasar el ratón" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2552,11 +2610,11 @@ msgstr "Modo Touchpad activado." msgid "Touchpad mode disabled." msgstr "Modo Touchpad desactivado." -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "Modo clic" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2564,11 +2622,11 @@ msgstr "Modo clic" msgid "Left Click" msgstr "Clic izquierdo" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 msgid "Middle Click" msgstr "Clic central" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2973,37 +3031,37 @@ msgstr "Lanzador" msgid "Do you really want to quit?" msgstr "¿Realmente quieres salir?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "'Modo toque' de pantalla táctil - Clic izquierdo" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "'Modo toque' de pantalla táctil - Clic derecho" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "'Modo toque' de pantalla táctil - Flotante (sin clic)" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "Volumen máximo" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "Aumentando el volumen" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "Volumen mínimo" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "Bajando el volumen" diff --git a/po/eu.po b/po/eu.po index 5bc553e572..b0fd177575 100644 --- a/po/eu.po +++ b/po/eu.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2011-12-15 14:53+0100\n" "Last-Translator: Mikel Iturbe Urretxa \n" "Language-Team: Librezale \n" +"Language: Euskara\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Euskara\n" #: gui/about.cpp:91 #, c-format @@ -44,10 +44,11 @@ msgstr "Joan gora" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -90,16 +91,16 @@ msgstr "Esleitu" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "Ados" @@ -437,13 +438,13 @@ msgstr "Bilatu joko-zerrendan" msgid "Search:" msgstr "Bilatu:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Jokoa kargatu:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -925,68 +926,104 @@ msgstr "" "Aukeraturiko gaia ez da zure hizkuntzarekin bateragarria. Gai hau erabili " "nahi baduzu, aurretik beste hizkuntza batera pasa behar duzu." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "Ez dago datarik gordeta" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "Ez dago ordurik gordeta" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "Ez dago denborarik gordeta" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "Ezabatu" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "Ezabatu partida gorde hau?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "Data:" -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "Ordua" -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "Denbora:" -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "Titulurik gabeko partida" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "Gorde" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "Ezin izan da jokoa gorde" + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "Izena:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "Gaia aukeratu" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "GFX desgaituta" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX desgaituta" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "Estandarra (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "Estandarra (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "Lausotua (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "Lausotua (16bpp)" @@ -1090,16 +1127,16 @@ msgstr "Erabiltzaileak utzia" msgid "Unknown error" msgstr "Errore ezezaguna" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "'%s'-(e)ko jokoa ezezaguna dela dirudi" -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Mesedez, bidali hurrengo datuak ScummVM taldeari gehitzen saiatu zaren" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "jokoaren izen, bertsio/hizkuntza/e.a.-ekin batera:" @@ -1137,13 +1174,13 @@ msgid "~R~eturn to Launcher" msgstr "It~z~uli abiarazlera" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "Gorde jokoa:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1261,11 +1298,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "Jokoa kargatu:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "Kargatu" @@ -1989,7 +2026,7 @@ msgstr "" "MIDI euskarri natiboak LucasArts-en Roland eguneraketa behar du,\n" "baina %s ez dago eskuragarri. AdLib erabiliko da." -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2000,7 +2037,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2011,7 +2048,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2064,11 +2101,11 @@ msgid "Cutscene file '%s' not found!" msgstr "'%s' bideo fitxategia ez da aurkitu!" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "Ezin izan da fitxategitik jokoa kargatu." -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "Ezin izan da jokoa fitxategira gorde." @@ -2203,12 +2240,12 @@ msgstr "" "General MIDIkoetara egokitzen saiatuko gara,\n" "baina posible da pista batzuk egoki ez entzutea." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +msgid "Use an alternative game intro (CD version only)" msgstr "" #: engines/sky/compact.cpp:130 @@ -2227,6 +2264,14 @@ msgstr "" "\"sky.cpt\" fitxategiak tamaina desegokia du.\n" "Mesdez, jaitsi ezazu (berriz) www.scummvm.org-etik" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2300,6 +2345,17 @@ msgstr "" msgid "Show labels for objects on mouse hover" msgstr "" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2551,11 +2607,11 @@ msgstr "Touchpad modua gaituta." msgid "Touchpad mode disabled." msgstr "Touchpad modua desgaituta." -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "Klikatzeko modua" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2563,11 +2619,11 @@ msgstr "Klikatzeko modua" msgid "Left Click" msgstr "Ezker-klika" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 msgid "Middle Click" msgstr "Erdiko klika" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2972,37 +3028,37 @@ msgstr "Abiarazlea" msgid "Do you really want to quit?" msgstr "Benetan irten?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "Ukimen-pantailako 'kolpetxo modua' - Ezker klika" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "Ukimen-pantailako 'kolpetxo modua' - Eskuin klika" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "Ukimen-pantailako 'kolpetxo modua' - Flotatu (klikik ez)" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "Bolumen maximoa" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "Bolumena igotzen" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "Bolumen minimoa" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "Bolumena jaisten" diff --git a/po/fr_FR.po b/po/fr_FR.po index 5faab55d83..cd98af1bb7 100644 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2012-07-08 12:24+0100\n" "Last-Translator: Thierry Crozat \n" "Language-Team: French \n" +"Language: Francais\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Francais\n" "Plural-Forms: nplurals=2; plural=n>1;\n" #: gui/about.cpp:91 @@ -45,10 +45,11 @@ msgstr "Remonter" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -91,16 +92,16 @@ msgstr "Affecter" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "OK" @@ -439,13 +440,13 @@ msgstr "Recherche dans la liste de jeux" msgid "Search:" msgstr "Filtre:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Charger le jeu:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -930,68 +931,104 @@ msgstr "" "Le thème que vous avez sélectioné ne support pas la langue française. Si " "vous voulez l'utiliser vous devez d'abord changer de langue." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "Date inconnue" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "Heure inconnue" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "Durée de jeu inconnue" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "Supprimer" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "Voulez-vous vraiment supprimer cette sauvegarde?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "Date: " -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "Heure: " -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "Durée de jeu: " -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "Sauvegarde sans nom" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "Sauver" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "Échec de la sauvegarde." + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "Nom:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "Sélectionnez un Thème" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "GFX désactivé" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX désactivé" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "Rendu Standard (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "Standard (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "Rendu Anti-crénelé (16 bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "Anti-crénelé (16 bpp)" @@ -1095,18 +1132,18 @@ msgstr "Annuler par l'utilisateur" msgid "Unknown error" msgstr "Erreur inconnue" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Le jeu dans '%s' n'est pas reconnu." -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Veuillez reporter les informations suivantes à l'équipe ScummVM ainsi que le " "nom" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "du jeu que vous avez essayé d'ajouter, sa version, le langage, etc..." @@ -1144,13 +1181,13 @@ msgid "~R~eturn to Launcher" msgstr "Retour au ~L~anceur" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "Sauvegarde:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1271,11 +1308,11 @@ msgstr "" "Utiliser les dialogues sauvegarde/chargement d'origine plutôt que ceux de " "ScummVM" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "Charger le jeu:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "Charger" @@ -2001,7 +2038,7 @@ msgstr "" "Support MIDI natif requière la mise à jour Roland de LucasArt,\n" "mais %s manque. Utilise AdLib à la place." -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2012,7 +2049,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2023,7 +2060,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2077,11 +2114,11 @@ msgid "Cutscene file '%s' not found!" msgstr "Fichier de séquence '%s' non trouvé!" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "Échec du chargement de l'état du jeu depuis le disque." -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "Échec de l'enregistrement de l'état du jeu sur le disque." @@ -2210,15 +2247,16 @@ msgstr "" "Il semble que vous utilisiez un périphérique General MIDI,\n" "mais ce jeu ne support que le MIDI Roland MT32. Nous essayons\n" "d'associer les instruments Roland MT32 aux instruments General\n" -"MIDI. Cependant il est possible que quelques pistes ne soient\n " -"pas jouées correctement." +"MIDI. Cependant il est possible que quelques pistes ne soient\n" +" pas jouées correctement." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" -msgstr "Intro disquette" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" +msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +#, fuzzy +msgid "Use an alternative game intro (CD version only)" msgstr "Utiliser l'intro de la version disquette (version CD uniquement)" #: engines/sky/compact.cpp:130 @@ -2237,6 +2275,14 @@ msgstr "" "Le fichier \"sky.cpt\" a une taille incorrecte.\n" "Vous pouvez le (re)télécharger sur www.scummvm.org" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "Intro disquette" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "Utiliser l'intro de la version disquette (version CD uniquement)" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2312,6 +2358,17 @@ msgstr "Afficher la description des objets" msgid "Show labels for objects on mouse hover" msgstr "Afficher la description des objets lors de passage du pointeur" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2561,11 +2618,11 @@ msgstr "Mode touchpad activ msgid "Touchpad mode disabled." msgstr "Mode touchpad désactivé" -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "Mode Clic" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2573,11 +2630,11 @@ msgstr "Mode Clic" msgid "Left Click" msgstr "Clic Gauche" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 msgid "Middle Click" msgstr "Clic Milieu" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2983,37 +3040,37 @@ msgstr "Lanceur" msgid "Do you really want to quit?" msgstr "Voulez-vous vraiment quitter?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "Touchscreen 'Tap Mode' - Clic Gauche" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "Touchscreen 'Tap Mode' - Clic Droit" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "Touchscreen 'Tap Mode' - Déplacer sans cliquer" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "Volume Maximum" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "Augmentation Volume" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "Volume Minimum" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "Diminution Volume" diff --git a/po/hu_HU.po b/po/hu_HU.po index 828659dea6..a34138c1bf 100644 --- a/po/hu_HU.po +++ b/po/hu_HU.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2012-07-09 05:58+0100\n" "Last-Translator: George Kormendi \n" "Language-Team: Hungarian\n" +"Language: Magyar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-2\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Magyar\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" "X-Poedit-Language: Hungarian\n" "X-Poedit-Country: HUNGARY\n" @@ -48,10 +48,11 @@ msgstr "Feljebb" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -94,16 +95,16 @@ msgstr "Kioszt #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "OK" @@ -439,13 +440,13 @@ msgstr "Keres msgid "Search:" msgstr "Keresés:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Játék betöltése:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -918,68 +919,104 @@ msgstr "" "A kiválasztott téma nem támogatja a nyelvedet. Ha használni akarod ezt a " "témát, elõszõr válts át egy másik nyelvre." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "Dátum nincs mentve" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "Idõ nincs mentve" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "Játékidõ nincs mentve" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "Töröl" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "Biztos hogy törölni akarod ezt a játékállást?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "Dátum:" -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "Idõ:" -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "Játékidõ:" -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "Névtelen játékállás" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "Mentés" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "Játék mentés nem sikerült" + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "Név:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "Válassz témát" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "GFX letiltva" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX letiltva" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "Standard leképezõ (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "Standard (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "Élsimításos leképezõ (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "Élsimított (16bpp)" @@ -1083,16 +1120,16 @@ msgstr "Felhaszn msgid "Unknown error" msgstr "Ismeretlen hiba" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "A '%s' játék ismeretlennek tûnik." -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Kérlek jelezd a ScummVM csapatnak a következõ adatokat, együtt a játék" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "címével és megbízható adataival játékverzió/nyelv(ek)/stb.:" @@ -1130,13 +1167,13 @@ msgid "~R~eturn to Launcher" msgstr "Visszatérés az indítóba" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "Játék mentése:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1254,11 +1291,11 @@ msgstr "Eredeti ment/t msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Az eredeti mentés/betöltés képernyõ használata a ScummVM képek helyett" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "Játékmenet visszaállítása:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "Visszaállítás" @@ -1980,7 +2017,7 @@ msgstr "" "Native MIDI támogatáshoz kell a Roland Upgrade a LucasArts-tól,\n" "a %s hiányzik. AdLib-ot használok helyette." -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1991,7 +2028,7 @@ msgstr "" "\n" "%s fájlba nem sikerült" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2002,7 +2039,7 @@ msgstr "" "\n" "%s fájlból nem sikerült" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2055,11 +2092,11 @@ msgid "Cutscene file '%s' not found!" msgstr "'%s' átvezetõ fájl nem található" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "Játékállás betöltése fájlból nem sikerült." -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "Játékállás mentése fájlba nem sikerült." @@ -2191,12 +2228,13 @@ msgstr "" "General MIDIre. Továbbra is lehetséges hogy\n" "néhány hangsáv helytelenül hangzik." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" -msgstr "Floppy intro" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" +msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +#, fuzzy +msgid "Use an alternative game intro (CD version only)" msgstr "A floppy verzió intro használata (csak CD verziónál)" #: engines/sky/compact.cpp:130 @@ -2215,6 +2253,14 @@ msgstr "" "A \"sky.cpt\" fájl mérete nem megfelelõ.\n" "Töltsd le a www.scummvm.org oldaláról" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "Floppy intro" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "A floppy verzió intro használata (csak CD verziónál)" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2287,6 +2333,17 @@ msgstr "T msgid "Show labels for objects on mouse hover" msgstr "Tárgycimke látható ha az egér felette van" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2535,11 +2592,11 @@ msgstr "Touchpad m msgid "Touchpad mode disabled." msgstr "Touchpad mód letiltva." -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "Kattintás Mód" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2547,11 +2604,11 @@ msgstr "Kattint msgid "Left Click" msgstr "Bal katt" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 msgid "Middle Click" msgstr "Középsõ katt" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2953,37 +3010,37 @@ msgstr "Ind msgid "Do you really want to quit?" msgstr "Biztos hogy ki akarsz lépni ?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "Érintõképernyõ 'Tap Mód' - Bal katt" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "Érintõképernyõ 'Tap Mód' - Jobb katt" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "Érintõképernyõ 'Tap Mód' - Lebegõ (Nincs katt)" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "Maximum Hangerõ" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "Hangerõ növelése" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "Minimum Hangerõ" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "Hangerõ csökkentése" diff --git a/po/it_IT.po b/po/it_IT.po index 164171ce8f..7d4c11319d 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2012-07-09 09:30+0100\n" "Last-Translator: Matteo 'Maff' Angelino \n" "Language-Team: Italian\n" +"Language: Italiano\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Italiano\n" #: gui/about.cpp:91 #, c-format @@ -44,10 +44,11 @@ msgstr "Su" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -90,16 +91,16 @@ msgstr "Mappa" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "OK" @@ -436,13 +437,13 @@ msgstr "Cerca nella lista dei giochi" msgid "Search:" msgstr "Cerca:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Carica gioco:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -924,68 +925,104 @@ msgstr "" "Il tema che hai selezionato non supporta la lingua attuale. Se vuoi " "utilizzare questo tema devi prima cambiare la lingua." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "Nessuna data salvata" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "Nessun orario salvato" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "Nessun tempo salvato" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "Elimina" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "Sei sicuro di voler eliminare questo salvataggio?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "Data: " -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "Ora: " -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "Tempo di gioco: " -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "Salvataggio senza titolo" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "Salva" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "Impossibile salvare il gioco" + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "Nome:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "Seleziona un tema" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "Grafica disattivata" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "Grafica disattivata" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "Renderer standard (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "Standard (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "Renderer con antialiasing (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "Con antialiasing (16bpp)" @@ -1090,16 +1127,16 @@ msgstr "Utente cancellato" msgid "Unknown error" msgstr "Errore sconosciuto" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Il gioco in '%s' sembra essere sconosciuto." -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Per favore, riporta i seguenti dati al team di ScummVM con il nome" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "del gioco che hai provato ad aggiungere e la sua versione/lingua/ecc.:" @@ -1137,13 +1174,13 @@ msgid "~R~eturn to Launcher" msgstr "~V~ai a elenco giochi" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "Salva gioco:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1266,11 +1303,11 @@ msgstr "" "Usa le schermate originali di salvataggio e caricamento, al posto di quelle " "di ScummVM" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "Ripristina gioco:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "Ripristina" @@ -1995,7 +2032,7 @@ msgstr "" "Il supporto nativo MIDI richiede il Roland Upgrade della LucasArts,\n" "ma %s non è presente. Verrà usato AdLib." -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2006,7 +2043,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2017,7 +2054,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2071,11 +2108,11 @@ msgid "Cutscene file '%s' not found!" msgstr "File della scena di intermezzo '%s' non trovato!" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "Impossibile caricare il gioco dal file." -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "Impossibile salvare il gioco nel file." @@ -2207,12 +2244,13 @@ msgstr "" "Roland MT32 in quelli General MIDI. Alcune tracce\n" "potrebbero avere un suono non corretto." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" -msgstr "Intro floppy" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" +msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +#, fuzzy +msgid "Use an alternative game intro (CD version only)" msgstr "Usa la versione floppy dell'intro (solo versione CD)" #: engines/sky/compact.cpp:130 @@ -2231,6 +2269,14 @@ msgstr "" "Il file \"sky.cpt\" non ha una dimensione corretta.\n" "Si prega di (ri)scaricarlo da www.scummvm.org" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "Intro floppy" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "Usa la versione floppy dell'intro (solo versione CD)" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2306,6 +2352,17 @@ msgstr "Mostra etichette oggetti" msgid "Show labels for objects on mouse hover" msgstr "Mostra etichette per gli oggetti al passaggio del mouse" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2557,11 +2614,11 @@ msgstr "Modalit msgid "Touchpad mode disabled." msgstr "Modalità touchpad disattivata." -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "Modalità clic" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2569,11 +2626,11 @@ msgstr "Modalit msgid "Left Click" msgstr "Clic sinistro" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 msgid "Middle Click" msgstr "Clic centrale" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2977,37 +3034,37 @@ msgstr "Elenco giochi" msgid "Do you really want to quit?" msgstr "Sei sicuro di voler uscire?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "Touchscreen 'Tap Mode' - Clic sinistro" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "Touchscreen 'Tap Mode' - Clic destro" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "Touchscreen 'Tap Mode' - Passaggio del cursore (nessun clic)" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "Volume massimo" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "Aumento volume" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "Volume minimo" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "Diminuzione volume" diff --git a/po/nb_NO.po b/po/nb_NO.po index bc7b1720fa..b775d11dd2 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2012-07-04 02:19+0100\n" "Last-Translator: Einar Johan Sømåen \n" "Language-Team: somaen \n" +"Language: Norsk (bokmaal)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Norsk (bokmaal)\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" "X-Poedit-Language: Norsk Bokmål\n" "X-Poedit-Country: NORWAY\n" @@ -48,10 +48,11 @@ msgstr "G #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -94,16 +95,16 @@ msgstr "Koble" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "OK" @@ -441,13 +442,13 @@ msgstr "S msgid "Search:" msgstr "Søk:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Åpne spill:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -922,68 +923,104 @@ msgstr "" "Temaet du valgte støtter ikke det aktive språket. Hvis du vil bruke dette " "temaet, må du bytte til et annet språk først." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "Ingen dato lagret" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "Ingen tid lagret" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "Ingen spilltid lagret" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "Slett" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "Vil du virkelig slette dette lagrede spillet?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "Dato: " -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "Tid: " -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "Spilltid: " -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "Ikke navngitt spilltilstand" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "Lagre" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "Klarte ikke å lagre spill." + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "Navn:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "Velg et tema" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "Deaktivert GFX" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "Deaktivert GFX" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "Standard Tegner (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "Standard (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "Antialiased Tegner (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "Antialiased (16bpp)" @@ -1087,17 +1124,17 @@ msgstr "Brukeren avbr msgid "Unknown error" msgstr "Ukjent feil" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Spillet i '%s' ser ut til å være ukjent." -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Vennligst rapporter de følgende dataene til ScummVM-teamet sammen med navnet" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "på spillet du forsøkte å legge til, og dets versjon/språk/etc.:" @@ -1135,13 +1172,13 @@ msgid "~R~eturn to Launcher" msgstr "~T~ilbake til oppstarter" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "Lagret spill:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1253,11 +1290,11 @@ msgstr "Bruk originale lagre/laste-skjermer" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Bruk de originale lagre/laste-skjermene, istedenfor ScummVM-variantene" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "Gjennopprett spill:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "Gjenopprett" @@ -1976,7 +2013,7 @@ msgid "" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1987,7 +2024,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1998,7 +2035,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2051,11 +2088,11 @@ msgid "Cutscene file '%s' not found!" msgstr "" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "Klarte ikke åpne spilltilstand fra fil." -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "Klarte ikke lagre spilltilstand fra fil." @@ -2189,12 +2226,13 @@ msgstr "" "General MIDI-instrumentene. Allikevel, kan det\n" "skje at enkelte spor ikke vil spilles riktig." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" -msgstr "Diskett-intro" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" +msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +#, fuzzy +msgid "Use an alternative game intro (CD version only)" msgstr "Bruk diskettversjonens intro (Kun for CD-versjon)" #: engines/sky/compact.cpp:130 @@ -2211,6 +2249,14 @@ msgid "" "Please (re)download it from www.scummvm.org" msgstr "" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "Diskett-intro" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "Bruk diskettversjonens intro (Kun for CD-versjon)" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2279,6 +2325,17 @@ msgstr "" msgid "Show labels for objects on mouse hover" msgstr "" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2529,11 +2586,11 @@ msgstr "Touchpad-modus aktivert." msgid "Touchpad mode disabled." msgstr "Touchpad-modus deaktivert." -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "Klikkmodus" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2541,11 +2598,11 @@ msgstr "Klikkmodus" msgid "Left Click" msgstr "Venstreklikk" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 msgid "Middle Click" msgstr "Midtklikk" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2951,37 +3008,37 @@ msgstr "Oppstarter" msgid "Do you really want to quit?" msgstr "Vil du virkelig avslutte?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "Touchskjerm 'Tapmodus' - Venstreklikk" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "Touchskjerm 'Tapmodus' - Høyreklikk" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "Touchskjerm 'Tapmodus' - Sveve (Ingen Klikk)" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "Maksimalt Volum" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "Øker volum" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "Minimalt Volum" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "Senker volum" diff --git a/po/nn_NO.po b/po/nn_NO.po index a88637b7c0..1b78932a46 100644 --- a/po/nn_NO.po +++ b/po/nn_NO.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2011-04-25 23:07+0100\n" "Last-Translator: Einar Johan T. Sømåen \n" "Language-Team: somaen \n" +"Language: Norsk (nynorsk)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Norsk (nynorsk)\n" "X-Poedit-Language: Norwegian Nynorsk\n" "X-Poedit-SourceCharset: iso-8859-1\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" @@ -48,10 +48,11 @@ msgstr "G #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -95,16 +96,16 @@ msgstr "Kople" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "OK" @@ -443,13 +444,13 @@ msgstr "S msgid "Search:" msgstr "Søk:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Åpne spel:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -920,68 +921,104 @@ msgstr "" "Temaet du har valt støttar ikkje det aktive språket. Om du vil nytte dette " "temaet må du bytte til eit anna språk først." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "Ingen dato lagra" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "Inga tid lagra" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "Inga speletid lagra" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "Slett" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "Vil du verkeleg slette det lagra spelet?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "Dato: " -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "Tid: " -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "Speletid: " -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "Ikkje navngjeven speltilstand" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "Lagre" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "Full speltittel:" + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "Namn:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "Vel eit tema" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "Deaktivert GFX" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "Deaktivert GFX" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "Standard Teiknar (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "Standard (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "Antialiased Teiknar (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "Antialiased (16bpp)" @@ -1086,16 +1123,16 @@ msgstr "" msgid "Unknown error" msgstr "Ukjend feil" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "" -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "" @@ -1135,13 +1172,13 @@ msgid "~R~eturn to Launcher" msgstr "~T~ilbake til oppstarter" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "Lagra spel:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1242,11 +1279,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "Gjenopprett spel:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "Gjenopprett" @@ -1975,7 +2012,7 @@ msgid "" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1983,7 +2020,7 @@ msgid "" "%s" msgstr "" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1991,7 +2028,7 @@ msgid "" "%s" msgstr "" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2042,11 +2079,11 @@ msgid "Cutscene file '%s' not found!" msgstr "" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "" -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "" @@ -2182,12 +2219,12 @@ msgid "" "some tracks sound incorrect." msgstr "" -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +msgid "Use an alternative game intro (CD version only)" msgstr "" #: engines/sky/compact.cpp:130 @@ -2202,6 +2239,14 @@ msgid "" "Please (re)download it from www.scummvm.org" msgstr "" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2263,6 +2308,17 @@ msgstr "" msgid "Show labels for objects on mouse hover" msgstr "" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2497,11 +2553,11 @@ msgstr "" msgid "Touchpad mode disabled." msgstr "" -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2509,12 +2565,12 @@ msgstr "" msgid "Left Click" msgstr "Venstreklikk" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 #, fuzzy msgid "Middle Click" msgstr "Midtre venstre gjenstand" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2928,39 +2984,39 @@ msgstr "Sl msgid "Do you really want to quit?" msgstr "Vil du avslutte?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 #, fuzzy msgid "Maximum Volume" msgstr "Volum" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 #, fuzzy msgid "Minimal Volume" msgstr "Volum" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "" diff --git a/po/pl_PL.po b/po/pl_PL.po index 5d3655f8b6..c2c5c09e19 100644 --- a/po/pl_PL.po +++ b/po/pl_PL.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2011-10-24 21:14+0100\n" "Last-Translator: Micha³ Zi±bkowski \n" "Language-Team: Grajpopolsku.pl \n" +"Language: Polski\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-2\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Polski\n" "X-Poedit-KeywordsList: _;gettext;gettext_noop\n" "X-Poedit-Basepath: .\n" "X-Poedit-Language: Polish\n" @@ -48,10 +48,11 @@ msgstr "W g #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -95,16 +96,16 @@ msgstr "Przypisz" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "OK" @@ -441,13 +442,13 @@ msgstr "Wyszukaj gr msgid "Search:" msgstr "Szukaj" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Wczytaj grê:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -922,68 +923,104 @@ msgstr "" "Wybrany styl nie obs³uguje obecnego jêzyka. Je¶li chcesz go u¿ywaæ, zmieñ " "najpierw swój jêzyk." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "Brak daty" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "Brak godziny" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "Brak czasu gry" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "Skasuj" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "Na pewno chcesz skasowaæ ten zapis?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "Data: " -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "Czas: " -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "Czas gry: " -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "Zapis bez nazwy" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "Zapisz" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "Nie uda³o siê zapisaæ stanu gry" + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "Nazwa:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "Wybierz styl" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "Wy³±czona grafika" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "Wy³±czona grafika" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "Standardowy renderer (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "Standardowy (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "Wyg³adzany renderer (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "Wyg³adzany (16bpp)" @@ -1087,16 +1124,16 @@ msgstr "Przerwane przez u msgid "Unknown error" msgstr "Nieznany b³±d" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Gra w '%s' wygl±da na nieznan±." -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "Przeka¿ poni¿sze dane zespo³owi ScummVM razem z nazw±" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "gry, któr± próbowa³e¶ dodaæ oraz jej wersj±, jêzykiem itd.:" @@ -1134,13 +1171,13 @@ msgid "~R~eturn to Launcher" msgstr "~P~owrót do launchera" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "Zapis:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1257,11 +1294,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "Wznów grê:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "Wznów" @@ -1986,7 +2023,7 @@ msgstr "" "Natywne wsparcie MIDI wymaga aktualizacji Rolanda od LucasArts,\n" "ale brakuje %s. Prze³±czam na tryb AdLib." -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1997,7 +2034,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2008,7 +2045,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2061,11 +2098,11 @@ msgid "Cutscene file '%s' not found!" msgstr "Nie znaleziono pliku przerywnika '%s'!" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "Nie uda³o siê wczytaæ stanu gry z pliku." -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "Nie uda³o siê zapisaæ stanu gry do pliku." @@ -2205,12 +2242,12 @@ msgstr "" "Próbujemy przypisaæ instrumenty Rolanda MT32 do instrumentów General MIDI. " "Niektóre utwory mog± byæ ¼le odtwarzane." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +msgid "Use an alternative game intro (CD version only)" msgstr "" #: engines/sky/compact.cpp:130 @@ -2229,6 +2266,14 @@ msgstr "" "Plik \"sky.cpt\" ma nieprawid³owy rozmiar.\n" "Pobierz go (ponownie) ze strony www.scummvm.org" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2304,6 +2349,17 @@ msgstr "" msgid "Show labels for objects on mouse hover" msgstr "" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2555,11 +2611,11 @@ msgstr "Tryb touchpada w msgid "Touchpad mode disabled." msgstr "Tryb touchpada wy³±czony." -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2567,12 +2623,12 @@ msgstr "" msgid "Left Click" msgstr "Klikniêcie LPM" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 #, fuzzy msgid "Middle Click" msgstr "Przedmiot na ¶rodku, z lewej" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2974,37 +3030,37 @@ msgstr "" msgid "Do you really want to quit?" msgstr "Na pewno chcesz wyj¶æ?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "Dotkniêcie ekranu - klikniêcie LPM" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "Dotkniêcie ekranu - klikniêcie PPM" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "Dotkniêcie ekranu - brak klikniêcia" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "Maksymalna g³o¶no¶æ" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "Zwiêkszenie g³o¶no¶ci" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "Minimalna g³o¶no¶æ" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "Zmniejszenie g³o¶no¶ci" diff --git a/po/pt_BR.po b/po/pt_BR.po index ac60a814e2..f41aa7d59f 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2011-10-21 21:30-0300\n" "Last-Translator: Saulo Benigno \n" "Language-Team: ScummBR (www.scummbr.com) \n" +"Language: Portugues (Brasil)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Portugues (Brasil)\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" "X-Poedit-Language: Portuguese\n" "X-Poedit-Country: BRAZIL\n" @@ -48,10 +48,11 @@ msgstr "Acima" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -95,16 +96,16 @@ msgstr "Mapear" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "OK" @@ -442,13 +443,13 @@ msgstr "Pesquisar na lista de jogos" msgid "Search:" msgstr "Pesquisar:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Carregar jogo:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -931,68 +932,104 @@ msgstr "" "O tema que você selecionou não suporta seu idioma atual. Se você quiser usar " "este tema você precisa mudar para outro idioma." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "Sem data salva" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "Sem hora salva" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "Sem tempo de jogo salvo" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "Excluir" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "Você realmente quer excluir este jogo salvo?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "Data:" -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "Hora:" -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "Tempo de jogo:" -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "Não-titulado arquivo de save" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "Salvar" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "Falha ao salvar o jogo" + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "Nome:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "Selecione um Tema" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "GFX desabilitado" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "GFX desabilitado" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "Renderizador padrão (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "Padrão (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "Renderizador Anti-Serrilhamento (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "Anti-Serrilhamento (16bpp)" @@ -1098,17 +1135,17 @@ msgstr "Usu msgid "Unknown error" msgstr "Erro desconhecido" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "O jogo em '% s' parece ser desconhecido." -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Por favor, informe os seguintes dados para a equipe ScummVM junto com o nome" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "do jogo que você tentou adicionar e sua versão/idioma/etc.:" @@ -1146,13 +1183,13 @@ msgid "~R~eturn to Launcher" msgstr "~V~oltar ao menu" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "Salvar jogo:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1273,11 +1310,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "Restaurar jogo:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "Restaurar" @@ -2003,7 +2040,7 @@ msgstr "" "LucasArts,\n" "mas %s está faltando. Utilizando AdLib ao invés." -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2014,7 +2051,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2025,7 +2062,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2079,14 +2116,14 @@ msgid "Cutscene file '%s' not found!" msgstr "Arquivo de vídeo '%s' não encontrado!" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "" "Falha ao carregar o estado do jogo a partir do arquivo:\n" "\n" "%s" -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "" "Falha ao salvar o estado do jogo para o arquivo:\n" @@ -2230,12 +2267,12 @@ msgstr "" "o modelo General MIDI. Talvez possa acontecer\n" "que algumas faixas não sejam corretamente tocadas." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +msgid "Use an alternative game intro (CD version only)" msgstr "" #: engines/sky/compact.cpp:130 @@ -2254,6 +2291,14 @@ msgstr "" "O arquivo \"sky.cpt\" possui um tamanho incorreto.\n" "Por favor, refaça o download em www.scummvm.org" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2329,6 +2374,17 @@ msgstr "" msgid "Show labels for objects on mouse hover" msgstr "" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2581,11 +2637,11 @@ msgstr "Modo Touchpad ligado." msgid "Touchpad mode disabled." msgstr "Modo Touchpad desligado." -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2593,12 +2649,12 @@ msgstr "" msgid "Left Click" msgstr "Clique com o botão esquerdo" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 #, fuzzy msgid "Middle Click" msgstr "Item do meio na esquerda" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -3003,37 +3059,37 @@ msgstr "Menu principal" msgid "Do you really want to quit?" msgstr "Você realmente deseja sair?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "Touchscreen 'Modo Toque' - Clique Esquerdo" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "Touchscreen 'Modo Toque' - Clique Direito" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "Touchscreen 'Modo Toque' - Acima (Sem Clicar)" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "Volume máximo" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "Aumentando Volume" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "Volume mínimo" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "Diminuindo Volume" diff --git a/po/ru_RU.po b/po/ru_RU.po index 019acbddbc..3a80d9fd7b 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -7,16 +7,16 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2012-07-08 22:00+0200+0200\n" "Last-Translator: Eugene Sandulenko \n" "Language-Team: Russian\n" +"Language: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-5\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Russian\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%" -"10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" #: gui/about.cpp:91 #, c-format @@ -46,10 +46,11 @@ msgstr " #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -92,16 +93,16 @@ msgstr " #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "OK" @@ -438,13 +439,13 @@ msgstr " msgid "Search:" msgstr "¿ÞØáÚ:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "·ÐÓàã×Øâì ØÓàã:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -688,8 +689,7 @@ msgstr "SoundFont:" #: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" msgstr "" -"SoundFontë ßÞÔÔÕàÖØÒÐîâáï ÝÕÚÞâÞàëÜØ ×ÒãÚÞÒëÜØ ÚÐàâÐÜØ, Fluidsynth Ø " -"Timidity" +"SoundFontë ßÞÔÔÕàÖØÒÐîâáï ÝÕÚÞâÞàëÜØ ×ÒãÚÞÒëÜØ ÚÐàâÐÜØ, Fluidsynth Ø Timidity" #: gui/options.cpp:851 msgctxt "lowres" @@ -742,7 +742,8 @@ msgstr " #: gui/options.cpp:880 msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" msgstr "" -"²ëÚÛîçÐÕâ áÞßÞáâÐÒÛÕÝØÕ General MIDI ÔÛï ØÓà á ×ÒãÚÞÒÞÙ ÔÞàÞÖÚÞÙ ÔÛï Roland MT-32" +"²ëÚÛîçÐÕâ áÞßÞáâÐÒÛÕÝØÕ General MIDI ÔÛï ØÓà á ×ÒãÚÞÒÞÙ ÔÞàÞÖÚÞÙ ÔÛï Roland " +"MT-32" #: gui/options.cpp:889 msgid "Don't use Roland MT-32 music" @@ -924,68 +925,104 @@ msgstr "" "ÂÕÜÐ, ÒëÑàÐÝÝÐï ÒÐÜØ, ÝÕ ßÞÔÔÕàÖØÒÐÕâ âÕÚãéØÙ ï×ëÚ. µáÛØ Òë åÞâØâÕ " "ØáßÞÛì×ÞÒÐâì íâã âÕÜã, ÒÐÜ ÝÕÞÑåÞÔØÜÞ áÝÐçÐÛÐ ßÕàÕÚÛîçØâìáï ÝÐ ÔàãÓÞÙ ï×ëÚ." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "´ÐâÐ ÝÕ ×ÐßØáÐÝÐ" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "²àÕÜï ÝÕ ×ÐßØáÐÝÞ" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "²àÕÜï ØÓàë ÝÕ ×ÐßØáÐÝÞ" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "ÃÔÐÛØâì" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "²ë ÔÕÙáâÒØâÕÛìÝÞ åÞâØâÕ ãÔÐÛØâì íâÞ áÞåàÐÝÕÝØÕ?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "´ÐâÐ: " -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "²àÕÜï: " -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "²àÕÜï ØÓàë: " -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "ÁÞåàÐÝÕÝØÕ ÑÕ× ØÜÕÝØ" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "ÁÞåàÐÝØâì" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "½Õ ãÔÐÛÞáì áÞåàÐÝØâì ØÓàã" + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "½Ð×ÒÐÝØÕ:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "²ëÑÕàØâÕ âÕÜã" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "±Õ× ÓàÐäØÚØ" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "±Õ× ÓàÐäØÚØ" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "ÁâÐÝÔÐàâÝëÙ àÐáâÕàØ×ÐâÞà (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "ÁâÐÝÔÐàâÝëÙ àÐáâÕàØ×ÐâÞà (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "ÀÐáâÕàØ×ÐâÞà áÞ áÓÛÐÖØÒÐÝØÕÜ (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "ÀÐáâÕàØ×ÐâÞà áÞ áÓÛÐÖØÒÐÝØÕÜ (16bpp)" @@ -1089,17 +1126,17 @@ msgstr " msgid "Unknown error" msgstr "½ÕØ×ÒÕáâÝÐï ÞèØÑÚÐ" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "ºÐÖÕâáï, çâÞ ØÓàÐ '%s' Õéñ ÝÕØ×ÒÕáâÝÐ." -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "¿ÞÖÐÛãÙáâÐ, ßÕàÕÔÐÙâÕ áÛÕÔãîéØÕ ÔÐÝÝëÕ ÚÞÜÐÝÔÕ ScummVM ÒÜÕáâÕ á ÝÐ×ÒÐÝØÕÜ" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "ØÓàë, ÚÞâÞàãî Òë ßëâÐÕâÕáì ÔÞÑÐÒØâì, Ø ãÚÐÖØâÕ Õñ ÒÕàáØî, ï×ëÚ Ø â.Ô." @@ -1137,13 +1174,13 @@ msgid "~R~eturn to Launcher" msgstr "~²~ ÓÛÐÒÝÞÕ ÜÕÝî" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "ÁÞåàÐÝØâì ØÓàã:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1168,9 +1205,9 @@ msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"½Õ ãÔÐÛÞáì áÞåàÐÝØâì ØÓàã (%s)! " -"¿ÞÖÐÛãÙáâÐ, ÞÑàÐâØâÕáì Ò äÐÙÛ README ×Ð ÑÐ×ÞÒÞÙ ØÝäÞàÜÐæØÕÙ, Ð âÐÚÖÕ " -"ØÝáâàãÚæØïÜØ Þ âÞÜ, ÚÐÚ ßÞÛãçØâì ÔÐÛìÝÕÙèãî ßÞÜÞéì." +"½Õ ãÔÐÛÞáì áÞåàÐÝØâì ØÓàã (%s)! ¿ÞÖÐÛãÙáâÐ, ÞÑàÐâØâÕáì Ò äÐÙÛ README ×Ð " +"ÑÐ×ÞÒÞÙ ØÝäÞàÜÐæØÕÙ, Ð âÐÚÖÕ ØÝáâàãÚæØïÜØ Þ âÞÜ, ÚÐÚ ßÞÛãçØâì ÔÐÛìÝÕÙèãî " +"ßÞÜÞéì." #: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 @@ -1237,9 +1274,9 @@ msgid "" "Gamestate load failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"½Õ ãÔÐÛÞáì ßàÞçØâÐâì áÞåàÐÝÕÝØÕ ØÓàë (%s)! " -"¿ÞÖÐÛãÙáâÐ, ÞÑàÐâØâÕáì Ò äÐÙÛ README ×Ð ÑÐ×ÞÒÞÙ ØÝäÞàÜÐæØÕÙ, Ð âÐÚÖÕ " -"ØÝáâàãÚæØïÜØ Þ âÞÜ, ÚÐÚ ßÞÛãçØâì ÔÐÛìÝÕÙèãî ßÞÜÞéì." +"½Õ ãÔÐÛÞáì ßàÞçØâÐâì áÞåàÐÝÕÝØÕ ØÓàë (%s)! ¿ÞÖÐÛãÙáâÐ, ÞÑàÐâØâÕáì Ò äÐÙÛ " +"README ×Ð ÑÐ×ÞÒÞÙ ØÝäÞàÜÐæØÕÙ, Ð âÐÚÖÕ ØÝáâàãÚæØïÜØ Þ âÞÜ, ÚÐÚ ßÞÛãçØâì " +"ÔÐÛìÝÕÙèãî ßÞÜÞéì." #: engines/engine.cpp:439 msgid "" @@ -1264,14 +1301,14 @@ msgstr " #: engines/sci/detection.cpp:391 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -"¸áßÞÛì×ÞÒÐâì ÞàØÓØÝÐÛìÝëÕ íÚàÐÝë ×ÐßØáØ Ø áÞåàÐÝÕÝØï ØÓàë ÒÜÕáâÞ " -"áÔÕÛÐÝÝëå Ò ScummVM" +"¸áßÞÛì×ÞÒÐâì ÞàØÓØÝÐÛìÝëÕ íÚàÐÝë ×ÐßØáØ Ø áÞåàÐÝÕÝØï ØÓàë ÒÜÕáâÞ áÔÕÛÐÝÝëå Ò " +"ScummVM" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "²ÞááâÐÝÞÒØâì ØÓàã:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "²ÞááâÐÝÞÒØâì" @@ -1297,7 +1334,8 @@ msgstr " #: engines/sci/detection.cpp:381 msgid "Prefer digital sound effects instead of synthesized ones" -msgstr "¾âÔÐÒÐâì ßàÕÔßÞçâÕÝØÕ æØäàÞÒëÜ ×ÒãÚÞÒëÜ íääÕÚâÐÜ ÒÜÕáâÞ áØÝâÕ×ØàÞÒÐÝÝëå" +msgstr "" +"¾âÔÐÒÐâì ßàÕÔßÞçâÕÝØÕ æØäàÞÒëÜ ×ÒãÚÞÒëÜ íääÕÚâÐÜ ÒÜÕáâÞ áØÝâÕ×ØàÞÒÐÝÝëå" #: engines/sci/detection.cpp:400 msgid "Use IMF/Yamaha FB-01 for MIDI output" @@ -1308,8 +1346,8 @@ msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" -"¸áßÞÛì×ÒÞÒÐâì ×ÒãÚÞÒãî ÚÐàâÚã IBM Music Feature ØÛØ ÜÞÔãÛì áØÝâÕ×Ð " -"Yamaha FB-01 FM ÔÛï MIDI" +"¸áßÞÛì×ÒÞÒÐâì ×ÒãÚÞÒãî ÚÐàâÚã IBM Music Feature ØÛØ ÜÞÔãÛì áØÝâÕ×Ð Yamaha " +"FB-01 FM ÔÛï MIDI" #: engines/sci/detection.cpp:411 msgid "Use CD audio" @@ -1317,7 +1355,9 @@ msgstr " #: engines/sci/detection.cpp:412 msgid "Use CD audio instead of in-game audio, if available" -msgstr "¸áßÞÛì×ÞÒÐâì ×ÒãÚÞÒëÕ ÔÞàÞÖÚØ á CD ÒÜÕáâÞ Üã×ëÚØ Ø× äÐÙÛÞÒ ØÓàë (ÕáÛØ ÔÞáâãßÝÞ)" +msgstr "" +"¸áßÞÛì×ÞÒÐâì ×ÒãÚÞÒëÕ ÔÞàÞÖÚØ á CD ÒÜÕáâÞ Üã×ëÚØ Ø× äÐÙÛÞÒ ØÓàë (ÕáÛØ " +"ÔÞáâãßÝÞ)" #: engines/sci/detection.cpp:422 msgid "Use Windows cursors" @@ -1327,7 +1367,8 @@ msgstr " msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" -"¸áßÞÛì×ÞÒÐâì ÚãàáÞàë Windows (ÜÕÝìèØÕ ßÞ àÐ×ÜÕàã Ø ÞÔÝÞæÒÕâÝëÕ) ÒÜÕáâÞ ÚãàáÞàÞÒ DOS" +"¸áßÞÛì×ÞÒÐâì ÚãàáÞàë Windows (ÜÕÝìèØÕ ßÞ àÐ×ÜÕàã Ø ÞÔÝÞæÒÕâÝëÕ) ÒÜÕáâÞ " +"ÚãàáÞàÞÒ DOS" #: engines/sci/detection.cpp:433 msgid "Use silver cursors" @@ -1995,7 +2036,7 @@ msgstr "" "ÀÕÖØÜ \"àÞÔÝÞÓÞ\" MIDI âàÕÑãÕâ ÞÑÝÞÒÛÕÝØÕ Roland Upgrade Þâ\n" "LucasArts, ÝÞ ÝÕ åÒÐâÐÕâ %s. ¿ÕàÕÚÛîçÐîáì ÝÐ AdLib." -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -2006,7 +2047,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2017,7 +2058,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2070,11 +2111,11 @@ msgid "Cutscene file '%s' not found!" msgstr "ÄÐÙÛ ×ÐáâÐÒÚØ '%s' ÝÕ ÝÐÙÔÕÝ!" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "½Õ ãÔÐÛÞáì ×ÐÓàã×Øâì áÞåàÐÝñÝÝãî ØÓàã Ø× äÐÙÛÐ." -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "½Õ ãÔÐÛÞáì áÞåàÐÝØâì ØÓàã Ò äÐÙÛ." @@ -2207,12 +2248,13 @@ msgstr "" "ÜÞÖÕâ âÐÚ ßÞÛãçØâìáï, çâÞ ÝÕÚÞâÞàëÕ âàÕÚØ ÑãÔãâ\n" "áëÓàÐÝë ÝÕÒÕàÝÞ." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" -msgstr "²áâãßÛÕÝØÕ á äÛÞßßØÚÞÒ" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" +msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +#, fuzzy +msgid "Use an alternative game intro (CD version only)" msgstr "¸áßÞÛì×ÞÒÐâì ÒáâãßÛÕÝØÕ á ÓØÑÚØå ÔØáÚÞÒ (âÞÛìÚÞ ÔÛï CD ÒÕàáØØ ØÓàë)" #: engines/sky/compact.cpp:130 @@ -2231,6 +2273,14 @@ msgstr "" "ÄÐÙÛ sky.cpt ØÜÕÕâ ÝÕÒÕàÝëÙ àÐ×ÜÕà.\n" "¿ÞÖÐÛãÙáâÐ, áÚÐçÐÙâÕ ÕÓÞ ×ÐÝÞÒÞ á www.scummvm.org" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "²áâãßÛÕÝØÕ á äÛÞßßØÚÞÒ" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "¸áßÞÛì×ÞÒÐâì ÒáâãßÛÕÝØÕ á ÓØÑÚØå ÔØáÚÞÒ (âÞÛìÚÞ ÔÛï CD ÒÕàáØØ ØÓàë)" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2292,7 +2342,8 @@ msgstr " msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" -"½ÐÙÔÕÝë ×ÐáâÐÒÚØ Ò äÞàÜÐâÕ PSX, ÝÞ ScummVM ÑëÛ áÞÑàÐÝ ÑÕ× ßÞÔÔÕàÖÚØ RGB æÒÕâÞÒ" +"½ÐÙÔÕÝë ×ÐáâÐÒÚØ Ò äÞàÜÐâÕ PSX, ÝÞ ScummVM ÑëÛ áÞÑàÐÝ ÑÕ× ßÞÔÔÕàÖÚØ RGB " +"æÒÕâÞÒ" #: engines/sword2/sword2.cpp:79 msgid "Show object labels" @@ -2302,6 +2353,17 @@ msgstr " msgid "Show labels for objects on mouse hover" msgstr "¿ÞÚÐ×ëÒÐÕâ ÝÐ×ÒÐÝØï ÞÑêÕÚâÞÒ ßà ØÝÐÒÕÔÕÝØØ ÚãàáÞàÐ ÜëèØ" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2329,8 +2391,8 @@ msgid "" "Press OK to convert them now, otherwise you will be asked next time.\n" msgstr "" "ScummVM ÞÑÝÐàãÖØÛ ã ÒÐá áâÐàëÕ áÞåàÐÝÕÝØï ØÓàë Nippon Safes, ÚÞâÞàëÕ " -"ÝÕÞÑåÞÔØÜÞ ßÕàÕØÜÕÝÞÒÐâì. ÁâÐàëÕ ÝÐ×ÒÐÝØï ÑÞÛìèÕ ÝÕ ßÞÔÔÕàÖØÒÐîâáï, Ø ßÞíâÞÜã " -"Òë ÝÕ áÜÞÖÕâÕ ×ÐÓàã×Øâì áÞåàÐÝÕÝØï, ÕáÛØ ÝÕ ßÕàÕØÜÕÝãÕâÕ Øå.\n" +"ÝÕÞÑåÞÔØÜÞ ßÕàÕØÜÕÝÞÒÐâì. ÁâÐàëÕ ÝÐ×ÒÐÝØï ÑÞÛìèÕ ÝÕ ßÞÔÔÕàÖØÒÐîâáï, Ø " +"ßÞíâÞÜã Òë ÝÕ áÜÞÖÕâÕ ×ÐÓàã×Øâì áÞåàÐÝÕÝØï, ÕáÛØ ÝÕ ßÕàÕØÜÕÝãÕâÕ Øå.\n" "\n" "½ÐÖÜØâÕ ¾º, çâÞÑë ßÕàÕØÜÕÝÞÒÐâì Øå áÕÙçÐá, Ò ßàÞâØÒÝÞÜ áÛãçÐÕ íâÞ ÖÕ " "áÞÞÑéÕÝØÕ ßÞïÒØâáï ßàØ áÛÕÔãîéÕÜ ×ÐßãáÚÕ ØÓàë.\n" @@ -2552,11 +2614,11 @@ msgstr " msgid "Touchpad mode disabled." msgstr "ÀÕÖØÜ âÐçßÐÔÐ ÒëÚÛîçÕÝ." -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "ÀÕÖØÜ éÕÛçÚÐ" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2564,11 +2626,11 @@ msgstr " msgid "Left Click" msgstr "»ÕÒëÙ éÕÛçÞÚ" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 msgid "Middle Click" msgstr "ÁàÕÔÝØÙ éÕÛçÞÚ" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2970,37 +3032,37 @@ msgstr " msgid "Do you really want to quit?" msgstr "²ë ÔÕÙáâÒØâÕÛìÝÞ åÞâØâÕ ÒëÙâØ?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "ÀÕÖØÜ 'ÚÐáÐÝØÙ' âÐçáÚàØÝÐ - »ÕÒëÙ ÚÛØÚ" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "ÀÕÖØÜ 'ÚÐáÐÝØÙ' âÐçáÚàØÝÐ - ¿àÐÒëÙ ÚÛØÚ" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "ÀÕÖØÜ 'ÚÐáÐÝØÙ' âÐçáÚàØÝÐ - ¿àÞÛñâ (ÑÕ× ÚÛØÚÐ)" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "¼ÐÚáØÜÐÛìÝÐï ÓàÞÜÚÞáâì" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "ÃÒÕÛØçÕÝØÕ ÓàÞÜÚÞáâØ" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "¼ØÝØÜÐÛìÝÐï ÓàÞÜÚÞáâì" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "ÃÜÕÝìèÕÝØÕ ÓàÞÜÚÞáâØ" diff --git a/po/scummvm.pot b/po/scummvm.pot index 8a68e4372b..de270cef27 100644 --- a/po/scummvm.pot +++ b/po/scummvm.pot @@ -6,12 +6,13 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: ScummVM 1.5.0git\n" +"Project-Id-Version: ScummVM 1.6.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" @@ -44,10 +45,11 @@ msgstr "" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -90,16 +92,16 @@ msgstr "" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "" @@ -433,13 +435,13 @@ msgstr "" msgid "Search:" msgstr "" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -903,68 +905,101 @@ msgid "" "to use this theme you need to switch to another language first." msgstr "" -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "" -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "" -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "" -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +msgid "New Save" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +msgid "Create a new save game" +msgstr "" + +#: gui/saveload-dialog.cpp:789 +msgid "Name: " +msgstr "" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "" @@ -1068,16 +1103,16 @@ msgstr "" msgid "Unknown error" msgstr "" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "" -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "" @@ -1115,13 +1150,13 @@ msgid "~R~eturn to Launcher" msgstr "" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1220,11 +1255,11 @@ msgstr "" msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "" @@ -1942,7 +1977,7 @@ msgid "" "but %s is missing. Using AdLib instead." msgstr "" -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1950,7 +1985,7 @@ msgid "" "%s" msgstr "" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -1958,7 +1993,7 @@ msgid "" "%s" msgstr "" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2005,11 +2040,11 @@ msgid "Cutscene file '%s' not found!" msgstr "" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "" -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "" @@ -2136,12 +2171,12 @@ msgid "" "some tracks sound incorrect." msgstr "" -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +msgid "Use an alternative game intro (CD version only)" msgstr "" #: engines/sky/compact.cpp:130 @@ -2156,6 +2191,14 @@ msgid "" "Please (re)download it from www.scummvm.org" msgstr "" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2217,6 +2260,17 @@ msgstr "" msgid "Show labels for objects on mouse hover" msgstr "" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2447,11 +2501,11 @@ msgstr "" msgid "Touchpad mode disabled." msgstr "" -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2459,11 +2513,11 @@ msgstr "" msgid "Left Click" msgstr "" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 msgid "Middle Click" msgstr "" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2863,37 +2917,37 @@ msgstr "" msgid "Do you really want to quit?" msgstr "" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "" diff --git a/po/se_SE.po b/po/se_SE.po index 8388e55370..02f2ab44f4 100644 --- a/po/se_SE.po +++ b/po/se_SE.po @@ -7,14 +7,14 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.5.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2012-07-08 18:03+0100\n" "Last-Translator: Hampus Flink \n" "Language-Team: \n" +"Language: Svenska\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -"Language: Svenska\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" "X-Poedit-Language: Swedish\n" "X-Poedit-Country: SWEDEN\n" @@ -48,10 +48,11 @@ msgstr "Upp #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -94,16 +95,16 @@ msgstr "St #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "OK" @@ -441,13 +442,13 @@ msgstr "S msgid "Search:" msgstr "Sök:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "Ladda spel:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -924,68 +925,104 @@ msgstr "" "Temat du valde stöder inte ditt språk. Om du vill använda det här temat " "måste först byta till ett annat språk." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "Inget datum sparat" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "Ingen tid sparad" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "Ingen speltid sparad" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "Radera" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "Vill du verkligen radera den här spardatan?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "Datum:" -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "Tid:" -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "Speltid:" -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "Namnlös spardata" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "Spara" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "Kunde inte spara spelet." + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "Namn:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "Välj ett tema" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "Inaktiverad GFX" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "Inaktiverad GFX" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "Standard rendering (16 bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "Standard (16 bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "Antialiserad rendering (16 bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "Antialiserad (16 bpp)" @@ -1089,17 +1126,17 @@ msgstr "Avbrutit av anv msgid "Unknown error" msgstr "Okänt fel" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "Spelet i '%s' verkar vara okänt." -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "" "Var god rapportera följande data till ScummVM-teamet tillsammans med namnet" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "på spelet du försökte lägga till och dess version/språk/etc.:" @@ -1137,13 +1174,13 @@ msgid "~R~eturn to Launcher" msgstr "Åte~r~vänd till launcher" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "Spara spelet:" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1260,11 +1297,11 @@ msgstr "Anv msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "Använder originalskärmarna för spara/ladda istället för ScummVM:s" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "Återställ spel:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "Återställ" @@ -1988,7 +2025,7 @@ msgstr "" "Stöd för Native MIDI kräver Roland-uppdateringen från LucasArts,\n" "men %s saknas. Använder AdLib istället." -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1999,7 +2036,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2010,7 +2047,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2063,11 +2100,11 @@ msgid "Cutscene file '%s' not found!" msgstr "Filmscensfilen '%s' hittades ej!" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "Kunde inte läsa spardata från filen" -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "Kunde inte skriva spardata till filen." @@ -2199,12 +2236,13 @@ msgstr "" "General MIDI-instrument. Det kan trots allt hända\n" "att ett fåtal ljudspår inte spelas korrekt." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" -msgstr "Diskettintro" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" +msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +#, fuzzy +msgid "Use an alternative game intro (CD version only)" msgstr "Använd diskettversionens intro (endast CD-version)" #: engines/sky/compact.cpp:130 @@ -2223,6 +2261,14 @@ msgstr "" "Filen \"sky.cpt\" har inkorrekt filstorlek.\n" "Var god ladda hem den igen från www.scummvm.org" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "Diskettintro" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "Använd diskettversionens intro (endast CD-version)" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2293,6 +2339,17 @@ msgstr "Visa etiketter" msgid "Show labels for objects on mouse hover" msgstr "Visar etiketter för objekten som musen pekar på" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2544,11 +2601,11 @@ msgstr "Touchpad-l msgid "Touchpad mode disabled." msgstr "Touchpad-läge inaktiverat." -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "Klickläge" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2556,11 +2613,11 @@ msgstr "Klickl msgid "Left Click" msgstr "Vänsterklick" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 msgid "Middle Click" msgstr "Mittenklick" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2965,37 +3022,37 @@ msgstr "Launcher" msgid "Do you really want to quit?" msgstr "Vill du verkligen avsluta?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "Touchscreen \"Tap-läge\" - Vänsterklick" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "Touchscren \"Tap-läge\" - Högerklick" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "Touchscreen \"Tap-läge\" - Hover (utan klick)" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "Max. volym" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "Höja volymen" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "Min. volym" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "Sänka volymen" diff --git a/po/uk_UA.po b/po/uk_UA.po index 38855dcb11..be7935518b 100644 --- a/po/uk_UA.po +++ b/po/uk_UA.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-07-08 12:25+0100\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" "PO-Revision-Date: 2012-06-29 20:19+0200\n" "Last-Translator: lubomyr \n" "Language-Team: Ukrainian\n" @@ -46,10 +46,11 @@ msgstr " #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 -#: gui/saveload.cpp:64 gui/saveload.cpp:173 gui/themebrowser.cpp:54 -#: engines/engine.cpp:442 engines/scumm/dialogs.cpp:190 -#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:48 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 #: backends/events/default/default-events.cpp:191 #: backends/events/default/default-events.cpp:213 msgid "Cancel" @@ -92,16 +93,16 @@ msgstr " #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: engines/engine.cpp:361 engines/engine.cpp:372 engines/scumm/dialogs.cpp:192 -#: engines/scumm/scumm.cpp:1775 engines/agos/animation.cpp:561 -#: engines/groovie/script.cpp:420 engines/sky/compact.cpp:131 -#: engines/sky/compact.cpp:141 engines/sword1/animation.cpp:539 -#: engines/sword1/animation.cpp:560 engines/sword1/animation.cpp:570 -#: engines/sword1/animation.cpp:577 engines/sword1/control.cpp:865 -#: engines/sword1/logic.cpp:1633 engines/sword2/animation.cpp:435 -#: engines/sword2/animation.cpp:455 engines/sword2/animation.cpp:465 -#: engines/sword2/animation.cpp:474 engines/parallaction/saveload.cpp:274 -#: backends/platform/wii/options.cpp:47 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" msgstr "OK" @@ -439,13 +440,13 @@ msgstr " msgid "Search:" msgstr "¿ÞèãÚ:" -#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:255 +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 #: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 msgid "Load game:" msgstr "·ÐÒÐÝâÐÖØâØ Óàã:" #: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 -#: engines/mohawk/myst.cpp:255 engines/mohawk/riven.cpp:716 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 #: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 #: backends/platform/wince/CEActionsSmartphone.cpp:231 msgid "Load" @@ -923,68 +924,104 @@ msgstr "" "²ØÑàÐÝÐ âÕÜÐ ÝÕ ßöÔâàØÜãô ßÞâÞçÝã ÜÞÒã. ÏÚéÞ ÒØ åÞçÕâÕ ÒØÚÞàØáâÞÒãÒÐâØ æî " "âÕÜã, ßÞâàöÑÝÞ Ò ßÕàèã çÕàÓã ×ÜöÝØâØ ÜÞÒã." -#: gui/saveload.cpp:59 gui/saveload.cpp:257 +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" msgstr "´Ðâã ÝÕ ×ÐßØáÐÝÞ" -#: gui/saveload.cpp:60 gui/saveload.cpp:258 +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 msgid "No time saved" msgstr "ÇÐá ÝÕ ×ÐßØáÐÝÞ" -#: gui/saveload.cpp:61 gui/saveload.cpp:259 +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 msgid "No playtime saved" msgstr "ÇÐá ÓàØ ÝÕ ×ÐßØáÐÝÞ" -#: gui/saveload.cpp:68 gui/saveload.cpp:173 +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 msgid "Delete" msgstr "²ØÔÐÛØâØ" -#: gui/saveload.cpp:172 +#: gui/saveload-dialog.cpp:266 msgid "Do you really want to delete this savegame?" msgstr "²Ø ÔöÙáÝÞ åÞçÕâÕ ÒØÔÐÛØâØ æÕ ×ÑÕàÕÖÕÝÝï?" -#: gui/saveload.cpp:282 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 msgid "Date: " msgstr "´ÐâÐ: " -#: gui/saveload.cpp:286 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 msgid "Time: " msgstr "ÇÐá: " -#: gui/saveload.cpp:292 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 msgid "Playtime: " msgstr "ÇÐá ÓàØ: " -#: gui/saveload.cpp:305 gui/saveload.cpp:372 +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 msgid "Untitled savestate" msgstr "·ÑÕàÕÖÕÝÝï ÑÕ× öÜÕÝö" +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "" + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "New Save" +msgstr "·ÐßØáÐâØ" + +#: gui/saveload-dialog.cpp:684 +#, fuzzy +msgid "Create a new save game" +msgstr "½Õ ÒÔÐÛÞáï ×ÐßØáÐâØ Óàã" + +#: gui/saveload-dialog.cpp:789 +#, fuzzy +msgid "Name: " +msgstr "½Ð×ÒÐ:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "" + #: gui/themebrowser.cpp:44 msgid "Select a Theme" msgstr "²ØÑÕàöâì âÕÜã" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgid "Disabled GFX" msgstr "±Õ× ÓàÐäöÚØ" -#: gui/ThemeEngine.cpp:335 +#: gui/ThemeEngine.cpp:337 msgctxt "lowres" msgid "Disabled GFX" msgstr "±Õ× ÓàÐäöÚØ" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard Renderer (16bpp)" msgstr "ÁâÐÝÔÐàâÝØÙ àÐáâÕàØ×ÐâÞà (16bpp)" -#: gui/ThemeEngine.cpp:336 +#: gui/ThemeEngine.cpp:338 msgid "Standard (16bpp)" msgstr "ÁâÐÝÔÐàâÝØÙ àÐáâÕàØ×ÐâÞà (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased Renderer (16bpp)" msgstr "ÀÐáâÕàØ×ÐâÞà ×ö ×ÓÛÐÔÖãÒÐÝÝïÜ (16bpp)" -#: gui/ThemeEngine.cpp:338 +#: gui/ThemeEngine.cpp:340 msgid "Antialiased (16bpp)" msgstr "ÀÐáâÕàØ×ÐâÞà ×ö ×ÓÛÐÔÖãÒÐÝÝïÜ (16bpp)" @@ -1088,16 +1125,16 @@ msgstr " msgid "Unknown error" msgstr "½ÕÒöÔÞÜÐ ßÞÜØÛÚÐ" -#: engines/advancedDetector.cpp:324 +#: engines/advancedDetector.cpp:316 #, c-format msgid "The game in '%s' seems to be unknown." msgstr "³àÐ ã '%s' ÝÕÒöÔÞÜÐ." -#: engines/advancedDetector.cpp:325 +#: engines/advancedDetector.cpp:317 msgid "Please, report the following data to the ScummVM team along with name" msgstr "±ãÔì ÛÐáÚÐ, ßÕàÕÔÐÙâÕ ÝØÖçÕÝÐÒÕÔÕÝã öÝäÞàÜÐæöî ÚÞÜÐÝÔö ScummVM àÐ×ÞÜ ×" -#: engines/advancedDetector.cpp:327 +#: engines/advancedDetector.cpp:319 msgid "of the game you tried to add and its version/language/etc.:" msgstr "ÝÐ×ÒÞî ÓàØ, ïÚã ÒØ ÝÐÜÐÓÐôâÕáì ÔÞÔÐâØ, Ð âÐÚÞÖ ÷÷ ÒÕàáöî/ÜÞÒã/âÐ öÝèÕ:" @@ -1135,13 +1172,13 @@ msgid "~R~eturn to Launcher" msgstr "~¿~ÞÒÕà.Ò ÓÞÛÞÒÝÕ ÜÕÝî" #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 -#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:735 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 msgid "Save game:" msgstr "·ÑÕàÕÓâØ Óàã: " #: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 #: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 -#: engines/sci/engine/kfile.cpp:735 +#: engines/sci/engine/kfile.cpp:742 #: backends/platform/symbian/src/SymbianActions.cpp:44 #: backends/platform/wince/CEActionsPocket.cpp:43 #: backends/platform/wince/CEActionsPocket.cpp:267 @@ -1261,11 +1298,11 @@ msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" "²ØÚÞàØáâÞÒãÒÐâØ ÞàØÓöÝÐÛìÝö ×ÑÕàÕÖÕÝÝï/×ÐÒÐÝâÐÖÕÝÝï ÕÚàÐÝØ, ×ÐÜöáâì ScummVM" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" msgstr "²öÔÝÞÒØâØ Óàã:" -#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:831 +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore" msgstr "²öÔÝÞÒØâØ" @@ -1987,7 +2024,7 @@ msgstr "" "ÀÕÖØÜ \"àöÔÝÞÓÞ\" MIDI ßÞâàÕÑãô ßÞÝÞÒÛÕÝÝï Roland Upgrade ÒöÔ\n" "LucasArts, ßàÞâÕ %s ÒöÔáãâÝöÙ. ¿ÕàÕÜØÚÐîáì ÝÐ AdLib." -#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:202 +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 #, c-format msgid "" "Failed to save game state to file:\n" @@ -1998,7 +2035,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:167 +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 #, c-format msgid "" "Failed to load game state from file:\n" @@ -2009,7 +2046,7 @@ msgstr "" "\n" "%s" -#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:210 +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 #, c-format msgid "" "Successfully saved game state in file:\n" @@ -2062,11 +2099,11 @@ msgid "Cutscene file '%s' not found!" msgstr "ÄÐÙÛ ×ÐáâÐÒÚØ '%s' ÝÕ ×ÝÐÙÔÕÝÞ!" #: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 -#: engines/tinsel/saveload.cpp:502 +#: engines/tinsel/saveload.cpp:532 msgid "Failed to load game state from file." msgstr "½Õ ÒÔÐÛÞáï ×ÐÒÐÝâÐÖØâØ áâÐÝ ÓàØ × äÐÙÛã." -#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:515 +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 msgid "Failed to save game state to file." msgstr "½Õ ÒÔÐÛÞáï ×ÑÕàÕÓâØ áâÐÝ ÓàØ ã äÐÙÛ." @@ -2198,12 +2235,13 @@ msgstr "" "MT32 ÝÐ General MIDI. °ÛÕ Ò àÕ×ãÛìâÐâö ÜÞÖÕ\n" "áâÐâØáï, éÞ ÔÕïÚö âàÕÚØ ÑãÔãâì ÓàÐâØ ÝÕßàÐÒØÛìÝÞ." -#: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 -msgid "Floppy intro" -msgstr "´ØáÚÕâÝÕ ÒÒÕÔÕÝÝï" +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" +msgstr "" -#: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 -msgid "Use the floppy version's intro (CD version only)" +#: engines/queen/queen.cpp:60 +#, fuzzy +msgid "Use an alternative game intro (CD version only)" msgstr "²ØÚÞàØáâÞÒãÒÐâØ ÔØáÚÕâÝö ÒÕàáö÷ ÒÒÕÔÕÝÝï (âöÛìÚØ CD ÒÕàáöï)" #: engines/sky/compact.cpp:130 @@ -2222,6 +2260,14 @@ msgstr "" "ÄÐÙÛ sky.cpt ÜÐô ÝÕÒöàÝØÙ àÞ×Üöà.\n" "±ãÔì ÛÐáÚÐ, (ßÕàÕ)×ÐÒÐÝâÐÖâÕ ÙÞÓÞ × www.scummvm.org" +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "´ØáÚÕâÝÕ ÒÒÕÔÕÝÝï" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "²ØÚÞàØáâÞÒãÒÐâØ ÔØáÚÕâÝö ÒÕàáö÷ ÒÒÕÔÕÝÝï (âöÛìÚØ CD ÒÕàáöï)" + #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" @@ -2291,6 +2337,17 @@ msgstr " msgid "Show labels for objects on mouse hover" msgstr "¿ÞÚÐ×ãÒÐâØ ÜöâÚØ ÔÛï ÞÑ'ôÚâöÒ ßàØ ÝÐÒÕÔÕÝÝö ÜØèö" +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" + #: engines/parallaction/saveload.cpp:133 #, c-format msgid "" @@ -2368,8 +2425,8 @@ msgid "" "The selected audio device '%s' cannot be used. See log file for more " "information." msgstr "" -"²ØÑàÐÝØÙ ×ÒãÚÞÒØÙ ßàØáâàöÙ '%s' ÝÕ ÜÞÖÕ ÑãâØ ÒØÚÞàØáâÐÝØÙ. ´ØÒöâìáï äÐÙÛ ÛÞÓã " -"ÔÛï ÔÞÔÐâÚÞÒÞ÷ öÝäÞàÜÐæö÷." +"²ØÑàÐÝØÙ ×ÒãÚÞÒØÙ ßàØáâàöÙ '%s' ÝÕ ÜÞÖÕ ÑãâØ ÒØÚÞàØáâÐÝØÙ. ´ØÒöâìáï äÐÙÛ " +"ÛÞÓã ÔÛï ÔÞÔÐâÚÞÒÞ÷ öÝäÞàÜÐæö÷." #: audio/mididrv.cpp:257 #, c-format @@ -2541,11 +2598,11 @@ msgstr " msgid "Touchpad mode disabled." msgstr "ÀÕÖØÜ âÐçßÐÔã ÒØÜÚÝÕÝÞ." -#: backends/platform/maemo/maemo.cpp:205 +#: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" msgstr "ÀÕÖØÜ ÚÛöÚöÒ" -#: backends/platform/maemo/maemo.cpp:211 +#: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 #: backends/platform/wince/CEActionsPocket.cpp:60 #: backends/platform/wince/CEActionsSmartphone.cpp:43 @@ -2553,11 +2610,11 @@ msgstr " msgid "Left Click" msgstr "»öÒØÙ ÚÛöÚ" -#: backends/platform/maemo/maemo.cpp:214 +#: backends/platform/maemo/maemo.cpp:218 msgid "Middle Click" msgstr "ÁÕàÕÔÝöÙ ÚÛöÚ" -#: backends/platform/maemo/maemo.cpp:217 +#: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 #: backends/platform/wince/CEActionsSmartphone.cpp:44 #: backends/platform/bada/form.cpp:273 @@ -2961,37 +3018,37 @@ msgstr " msgid "Do you really want to quit?" msgstr "²Ø ÔöÙáÝÞ åÞçÕâÕ ÒØÙâØ?" -#: backends/events/gph/gph-events.cpp:338 -#: backends/events/gph/gph-events.cpp:381 +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 #: backends/events/openpandora/op-events.cpp:139 msgid "Touchscreen 'Tap Mode' - Left Click" msgstr "ÀÕÖØÜ ÔÞâØÚã ã âÐçáÚàöÝö - »öÒØÙ ÚÛöÚ" -#: backends/events/gph/gph-events.cpp:340 -#: backends/events/gph/gph-events.cpp:383 +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 #: backends/events/openpandora/op-events.cpp:141 msgid "Touchscreen 'Tap Mode' - Right Click" msgstr "ÀÕÖØÜ ÔÞâØÚã ã âÐçáÚàöÝö - ¿àÐÒØÙ ÚÛöÚ" -#: backends/events/gph/gph-events.cpp:342 -#: backends/events/gph/gph-events.cpp:385 +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 #: backends/events/openpandora/op-events.cpp:143 msgid "Touchscreen 'Tap Mode' - Hover (No Click)" msgstr "ÀÕÖØÜ ÔÞâØÚã ã âÐçáÚàöÝö - ¿àÞÛöâ (ÑÕ× ÚÛöÚã)" -#: backends/events/gph/gph-events.cpp:362 +#: backends/events/gph/gph-events.cpp:410 msgid "Maximum Volume" msgstr "¼ÐÚáØÜÐÛìÝÐ ³ãçÝöáâì" -#: backends/events/gph/gph-events.cpp:364 +#: backends/events/gph/gph-events.cpp:412 msgid "Increasing Volume" msgstr "¿öÔÒØéÕÝÝï ÓãçÝÞáâö" -#: backends/events/gph/gph-events.cpp:370 +#: backends/events/gph/gph-events.cpp:418 msgid "Minimal Volume" msgstr "¼öÝöÜÐÛìÝÐ ³ãçÝöáâì" -#: backends/events/gph/gph-events.cpp:372 +#: backends/events/gph/gph-events.cpp:420 msgid "Decreasing Volume" msgstr "¿ÞÝØÖÕÝÝï ÓãçÝÞáâö" -- cgit v1.2.3 From c6e938fab9faecea5b6a03f32d9d18eb7c088359 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 12 Aug 2012 15:00:36 +0200 Subject: NEWS: Mention new save/load chooser. --- NEWS | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 3f5f10ce05..97667b5b13 100644 --- a/NEWS +++ b/NEWS @@ -2,7 +2,11 @@ For a more comprehensive changelog of the latest experimental code, see: https://github.com/scummvm/scummvm/commits/ 1.6.0 (????-??-??) - + General: + - Added a new save/load chooser based on a grid of thumbnails. This is only + supported for resolutions bigger than 640x400. The old chooser is still + available and used for games without thumbnail support. It is possible to + select the old one as default too. 1.5.0 (2012-07-27) New Games: -- cgit v1.2.3 From 9ba145419faa46b85baf5982f0c62ab76268b0af Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 12 Aug 2012 15:16:27 +0200 Subject: GUI: Mark parts of the grid based chooser layout code as HACK. --- gui/saveload-dialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index 8e214bce90..d1a66dc28a 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -620,6 +620,8 @@ void SaveLoadChooserGrid::open() { } void SaveLoadChooserGrid::reflowLayout() { + // HACK: The page display is not available in low resolution layout. We + // remove and readd the widget here to avoid our GUI from erroring out. removeWidget(_pageDisplay); if (g_gui.xmlEval()->getVar("Globals.ShowChooserPageDisplay") == 1) { _pageDisplay->init(); @@ -628,6 +630,8 @@ void SaveLoadChooserGrid::reflowLayout() { SaveLoadChooserDialog::reflowLayout(); destroyButtons(); + // HACK: The whole code below really works around the fact, that we have + // no easy way to dynamically layout widgets. const uint16 availableWidth = getWidth() - 20; uint16 availableHeight; -- cgit v1.2.3 From da790e112ca1a1de5730713cad1871917d52c781 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 12 Aug 2012 15:18:09 +0200 Subject: GUI: Create the builtin theme from scummclassic again. The old builtin one actually was based on a unpublished version, which failed with the current code. Oops. --- gui/themes/default.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gui/themes/default.inc b/gui/themes/default.inc index bfd78db3ae..7f565eb05d 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -1399,7 +1399,6 @@ " " -" " " " @@ -2379,7 +2378,7 @@ " " -" " +" " " " -- cgit v1.2.3 From fee19db7eedb16d7e7d62429f6c0eb4770bc07c3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 12 Aug 2012 19:38:57 +0200 Subject: GUI: Make normal disabled color of the modern theme darker. This should fix bug #3395057 "GUI: Font-Background Color Contrast Problem in Modern Theme". At the very least it will improve the contrast. --- gui/themes/scummclassic.zip | Bin 95181 -> 95180 bytes gui/themes/scummmodern.zip | Bin 1453476 -> 1453485 bytes gui/themes/scummmodern/scummmodern_gfx.stx | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip index 468f4b1594..62eae0cd43 100644 Binary files a/gui/themes/scummclassic.zip and b/gui/themes/scummclassic.zip differ diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip index 34a1db9c06..38352bcc2f 100644 Binary files a/gui/themes/scummmodern.zip and b/gui/themes/scummmodern.zip differ diff --git a/gui/themes/scummmodern/scummmodern_gfx.stx b/gui/themes/scummmodern/scummmodern_gfx.stx index 4703683bc3..4d449f50ec 100644 --- a/gui/themes/scummmodern/scummmodern_gfx.stx +++ b/gui/themes/scummmodern/scummmodern_gfx.stx @@ -155,7 +155,7 @@ /> ::iterator it; - for (it = g_cine->_overlayList.begin(); it != g_cine->_overlayList.end(); ++it) - { - if(&(*it) == overlayPtr) - { + for (it = g_cine->_overlayList.begin(); it != g_cine->_overlayList.end(); ++it) { + if (&(*it) == overlayPtr) { break; } } - while(it != g_cine->_overlayList.end()) - { - overlay* pCurrentOverlay = &(*it); - if((pCurrentOverlay->type==5) || ((pCurrentOverlay->type==21) && (pCurrentOverlay->x==overlayPtr->objIdx))) - { - AnimData* sprite = &g_cine->_animDataTable[g_cine->_objectTable[it->objIdx].frame]; + while (it != g_cine->_overlayList.end()) { + overlay *pCurrentOverlay = &(*it); + if ((pCurrentOverlay->type == 5) || ((pCurrentOverlay->type == 21) && (pCurrentOverlay->x == overlayPtr->objIdx))) { + AnimData *sprite = &g_cine->_animDataTable[g_cine->_objectTable[it->objIdx].frame]; - if(pMask == NULL) - { - pMask = new byte[width*height]; + if (pMask == NULL) { + pMask = new byte[width * height]; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { - byte spriteColor= spritePtr[width*i+j]; - pMask[width*i+j] = spriteColor; + byte spriteColor = spritePtr[width * i + j]; + pMask[width * i + j] = spriteColor; } } } for (int i = 0; i < sprite->_realWidth; i++) { for (int j = 0; j < sprite->_height; j++) { - int inMaskX = (g_cine->_objectTable[it->objIdx].x+i) - x; - int inMaskY = (g_cine->_objectTable[it->objIdx].y+j) - y; - - if(inMaskX >=0 && inMaskX < width) - { - if(inMaskY >=0 && inMaskY < height) - { - if(sprite->_bpp == 1) - { - if(!sprite->getColor(i, j)) - { - pMask[inMaskY*width+inMaskX] = page[x + y * 320 + inMaskX + inMaskY * 320]; + int inMaskX = (g_cine->_objectTable[it->objIdx].x + i) - x; + int inMaskY = (g_cine->_objectTable[it->objIdx].y + j) - y; + + if (inMaskX >= 0 && inMaskX < width) { + if (inMaskY >= 0 && inMaskY < height) { + if (sprite->_bpp == 1) { + if (!sprite->getColor(i, j)) { + pMask[inMaskY * width + inMaskX] = page[x + y * 320 + inMaskX + inMaskY * 320]; } } } @@ -1797,8 +1787,7 @@ void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 wi } // now, draw with the mask we created - if(pMask) - { + if (pMask) { spritePtr = pMask; } { @@ -1807,7 +1796,7 @@ void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 wi destPtr += i * 320; for (int j = 0; j < width; j++) { - byte color= *(spritePtr++); + byte color = *(spritePtr++); if ((transparentColor != color) && x + j >= 0 && x + j < 320 && i + y >= 0 && i + y < 200) { *(destPtr++) = color; } else { -- cgit v1.2.3 From c839fd50b5ddfcceada8cbbd3046ce219df248a0 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 12 Aug 2012 17:44:23 -0400 Subject: GRAPHICS: Clarify format of the palette in ImageDecoder --- graphics/decoders/image_decoder.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/graphics/decoders/image_decoder.h b/graphics/decoders/image_decoder.h index 7fa00749ff..830645d361 100644 --- a/graphics/decoders/image_decoder.h +++ b/graphics/decoders/image_decoder.h @@ -75,6 +75,9 @@ public: * until destroy() or loadStream() is called, or until this ImageDecoder's * destructor is called. * + * The palette's format is the same as PaletteManager's palette + * (interleaved RGB values). + * * @return the decoded palette, or 0 if no palette is present */ virtual const byte *getPalette() const { return 0; } -- cgit v1.2.3 From 8982026661c5f64f67cb8565946d25f620dfb73c Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan SømaÌŠen Date: Mon, 13 Aug 2012 00:30:02 +0200 Subject: GRAPHICS: Add support for 32bpp BMPs --- graphics/decoders/bmp.cpp | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/graphics/decoders/bmp.cpp b/graphics/decoders/bmp.cpp index 5f764e1bd3..f15d4e2519 100644 --- a/graphics/decoders/bmp.cpp +++ b/graphics/decoders/bmp.cpp @@ -82,7 +82,7 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) { /* uint16 planes = */ stream.readUint16LE(); uint16 bitsPerPixel = stream.readUint16LE(); - if (bitsPerPixel != 8 && bitsPerPixel != 24) { + if (bitsPerPixel != 8 && bitsPerPixel != 24 && bitsPerPixel != 32) { warning("%dbpp bitmaps not supported", bitsPerPixel); return false; } @@ -119,8 +119,8 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) { Graphics::PixelFormat format = Graphics::PixelFormat::createFormatCLUT8(); - // BGRA for 24bpp - if (bitsPerPixel == 24) + // BGRA for 24bpp and 32 bpp + if (bitsPerPixel == 24 || bitsPerPixel == 32) format = Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0); _surface = new Graphics::Surface(); @@ -136,7 +136,7 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) { stream.read(dst + (height - i - 1) * width, width); stream.skip(extraDataLength); } - } else { + } else if (bitsPerPixel == 24) { byte *dst = (byte *)_surface->pixels + (height - 1) * _surface->pitch; for (int32 i = 0; i < height; i++) { @@ -150,6 +150,27 @@ bool BitmapDecoder::loadStream(Common::SeekableReadStream &stream) { dst += format.bytesPerPixel; } + stream.skip(extraDataLength); + dst -= _surface->pitch * 2; + } + } else { // 32 bpp + byte *dst = (byte *)_surface->pixels + (height - 1) * _surface->pitch; + + for (int32 i = 0; i < height; i++) { + for (uint32 j = 0; j < width; j++) { + byte b = stream.readByte(); + byte g = stream.readByte(); + byte r = stream.readByte(); + // Ignore the last byte, as in v3 it is unused + // and should thus NOT be used as alpha. + // ref: http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376%28v=vs.85%29.aspx + stream.readByte(); + uint32 color = format.RGBToColor(r, g, b); + + *((uint32 *)dst) = color; + dst += format.bytesPerPixel; + } + stream.skip(extraDataLength); dst -= _surface->pitch * 2; } -- cgit v1.2.3 From 92432a136bff7c327b5328cc10a84198f571b0d0 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 13 Aug 2012 16:23:47 -0400 Subject: VIDEO: Convert TheoraDecoder to the new AdvancedVideoDecoder API --- engines/sword25/fmv/movieplayer.cpp | 1 + video/theora_decoder.cpp | 610 ++++++++++++++++-------------------- video/theora_decoder.h | 129 ++++---- 3 files changed, 339 insertions(+), 401 deletions(-) diff --git a/engines/sword25/fmv/movieplayer.cpp b/engines/sword25/fmv/movieplayer.cpp index 9ee13b4b6d..a95532ec65 100644 --- a/engines/sword25/fmv/movieplayer.cpp +++ b/engines/sword25/fmv/movieplayer.cpp @@ -61,6 +61,7 @@ bool MoviePlayer::loadMovie(const Common::String &filename, uint z) { // Get the file and load it into the decoder Common::SeekableReadStream *in = Kernel::getInstance()->getPackage()->getStream(filename); _decoder.loadStream(in); + _decoder.start(); GraphicEngine *pGfx = Kernel::getInstance()->getGfx(); diff --git a/video/theora_decoder.cpp b/video/theora_decoder.cpp index f3d9cad096..76007eadff 100644 --- a/video/theora_decoder.cpp +++ b/video/theora_decoder.cpp @@ -36,72 +36,32 @@ #include "video/theora_decoder.h" -#include "common/debug.h" +#include "audio/audiostream.h" +#include "audio/decoders/raw.h" #include "common/stream.h" #include "common/system.h" #include "common/textconsole.h" #include "common/util.h" +#include "graphics/pixelformat.h" #include "graphics/yuv_to_rgb.h" -#include "audio/decoders/raw.h" namespace Video { -#define AUDIOFD_FRAGSIZE 10240 - -static double rint(double v) { - return floor(v + 0.5); -} - -TheoraDecoder::TheoraDecoder(Audio::Mixer::SoundType soundType) { +TheoraDecoder::TheoraDecoder(Audio::Mixer::SoundType soundType) : _soundType(soundType) { _fileStream = 0; - _theoraPacket = 0; - _vorbisPacket = 0; - _theoraDecode = 0; - _theoraSetup = 0; - _nextFrameStartTime = 0.0; - - _soundType = soundType; - _audStream = 0; - _audHandle = new Audio::SoundHandle(); - - ogg_sync_init(&_oggSync); - - _curFrame = -1; - _audiobuf = (ogg_int16_t *)malloc(AUDIOFD_FRAGSIZE * sizeof(ogg_int16_t)); - - reset(); + _videoTrack = 0; + _audioTrack = 0; + _hasVideo = _hasAudio = false; } TheoraDecoder::~TheoraDecoder() { close(); - delete _fileStream; - delete _audHandle; - free(_audiobuf); -} - -void TheoraDecoder::queuePage(ogg_page *page) { - if (_theoraPacket) - ogg_stream_pagein(&_theoraOut, page); - - if (_vorbisPacket) - ogg_stream_pagein(&_vorbisOut, page); -} - -int TheoraDecoder::bufferData() { - char *buffer = ogg_sync_buffer(&_oggSync, 4096); - int bytes = _fileStream->read(buffer, 4096); - - ogg_sync_wrote(&_oggSync, bytes); - - return bytes; } bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) { close(); - _endOfAudio = false; - _endOfVideo = false; _fileStream = stream; // start up Ogg stream synchronization layer @@ -109,11 +69,17 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) { // init supporting Vorbis structures needed in header parsing vorbis_info_init(&_vorbisInfo); - vorbis_comment_init(&_vorbisComment); + vorbis_comment vorbisComment; + vorbis_comment_init(&vorbisComment); // init supporting Theora structures needed in header parsing - th_comment_init(&_theoraComment); - th_info_init(&_theoraInfo); + th_info theoraInfo; + th_info_init(&theoraInfo); + th_comment theoraComment; + th_comment_init(&theoraComment); + th_setup_info *theoraSetup = 0; + + uint theoraPackets = 0, vorbisPackets = 0; // Ogg file open; parse the headers // Only interested in Vorbis/Theora streams @@ -122,7 +88,7 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) { int ret = bufferData(); if (ret == 0) - break; + break; // FIXME: Shouldn't this error out? while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) { ogg_stream_state test; @@ -140,14 +106,16 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) { ogg_stream_packetout(&test, &_oggPacket); // identify the codec: try theora - if (!_theoraPacket && th_decode_headerin(&_theoraInfo, &_theoraComment, &_theoraSetup, &_oggPacket) >= 0) { + if (theoraPackets == 0 && th_decode_headerin(&theoraInfo, &theoraComment, &theoraSetup, &_oggPacket) >= 0) { // it is theora memcpy(&_theoraOut, &test, sizeof(test)); - _theoraPacket = 1; - } else if (!_vorbisPacket && vorbis_synthesis_headerin(&_vorbisInfo, &_vorbisComment, &_oggPacket) >= 0) { + theoraPackets = 1; + _hasVideo = true; + } else if (vorbisPackets == 0 && vorbis_synthesis_headerin(&_vorbisInfo, &vorbisComment, &_oggPacket) >= 0) { // it is vorbis memcpy(&_vorbisOut, &test, sizeof(test)); - _vorbisPacket = 1; + vorbisPackets = 1; + _hasAudio = true; } else { // whatever it is, we don't care about it ogg_stream_clear(&test); @@ -157,31 +125,31 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) { } // we're expecting more header packets. - while ((_theoraPacket && _theoraPacket < 3) || (_vorbisPacket && _vorbisPacket < 3)) { + while ((theoraPackets && theoraPackets < 3) || (vorbisPackets && vorbisPackets < 3)) { int ret; // look for further theora headers - while (_theoraPacket && (_theoraPacket < 3) && (ret = ogg_stream_packetout(&_theoraOut, &_oggPacket))) { + while (theoraPackets && (theoraPackets < 3) && (ret = ogg_stream_packetout(&_theoraOut, &_oggPacket))) { if (ret < 0) error("Error parsing Theora stream headers; corrupt stream?"); - if (!th_decode_headerin(&_theoraInfo, &_theoraComment, &_theoraSetup, &_oggPacket)) + if (!th_decode_headerin(&theoraInfo, &theoraComment, &theoraSetup, &_oggPacket)) error("Error parsing Theora stream headers; corrupt stream?"); - _theoraPacket++; + theoraPackets++; } // look for more vorbis header packets - while (_vorbisPacket && (_vorbisPacket < 3) && (ret = ogg_stream_packetout(&_vorbisOut, &_oggPacket))) { + while (vorbisPackets && (vorbisPackets < 3) && (ret = ogg_stream_packetout(&_vorbisOut, &_oggPacket))) { if (ret < 0) error("Error parsing Vorbis stream headers; corrupt stream?"); - if (vorbis_synthesis_headerin(&_vorbisInfo, &_vorbisComment, &_oggPacket)) + if (vorbis_synthesis_headerin(&_vorbisInfo, &vorbisComment, &_oggPacket)) error("Error parsing Vorbis stream headers; corrupt stream?"); - _vorbisPacket++; + vorbisPackets++; - if (_vorbisPacket == 3) + if (vorbisPackets == 3) break; } @@ -198,88 +166,21 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) { } } - // and now we have it all. initialize decoders - if (_theoraPacket) { - _theoraDecode = th_decode_alloc(&_theoraInfo, _theoraSetup); - debugN(1, "Ogg logical stream %lx is Theora %dx%d %.02f fps", - _theoraOut.serialno, _theoraInfo.pic_width, _theoraInfo.pic_height, - (double)_theoraInfo.fps_numerator / _theoraInfo.fps_denominator); - - switch (_theoraInfo.pixel_fmt) { - case TH_PF_420: - debug(1, " 4:2:0 video"); - break; - case TH_PF_422: - debug(1, " 4:2:2 video"); - break; - case TH_PF_444: - debug(1, " 4:4:4 video"); - break; - case TH_PF_RSVD: - default: - debug(1, " video\n (UNKNOWN Chroma sampling!)"); - break; - } - - if (_theoraInfo.pic_width != _theoraInfo.frame_width || _theoraInfo.pic_height != _theoraInfo.frame_height) - debug(1, " Frame content is %dx%d with offset (%d,%d).", - _theoraInfo.frame_width, _theoraInfo.frame_height, _theoraInfo.pic_x, _theoraInfo.pic_y); - - switch (_theoraInfo.colorspace){ - case TH_CS_UNSPECIFIED: - /* nothing to report */ - break; - case TH_CS_ITU_REC_470M: - debug(1, " encoder specified ITU Rec 470M (NTSC) color."); - break; - case TH_CS_ITU_REC_470BG: - debug(1, " encoder specified ITU Rec 470BG (PAL) color."); - break; - default: - debug(1, "warning: encoder specified unknown colorspace (%d).", _theoraInfo.colorspace); - break; - } - - debug(1, "Encoded by %s", _theoraComment.vendor); - if (_theoraComment.comments) { - debug(1, "theora comment header:"); - for (int i = 0; i < _theoraComment.comments; i++) { - if (_theoraComment.user_comments[i]) { - int len = _theoraComment.comment_lengths[i]; - char *value = (char *)malloc(len + 1); - if (value) { - memcpy(value, _theoraComment.user_comments[i], len); - value[len] = '\0'; - debug(1, "\t%s", value); - free(value); - } - } - } - } - - th_decode_ctl(_theoraDecode, TH_DECCTL_GET_PPLEVEL_MAX, &_ppLevelMax, sizeof(_ppLevelMax)); - _ppLevel = _ppLevelMax; - th_decode_ctl(_theoraDecode, TH_DECCTL_SET_PPLEVEL, &_ppLevel, sizeof(_ppLevel)); - _ppInc = 0; - } else { - // tear down the partial theora setup - th_info_clear(&_theoraInfo); - th_comment_clear(&_theoraComment); + // And now we have it all. Initialize decoders next + if (_hasVideo) { + _videoTrack = new TheoraVideoTrack(getDefaultHighColorFormat(), theoraInfo, theoraSetup); + addTrack(_videoTrack); } - th_setup_free(_theoraSetup); - _theoraSetup = 0; - - if (_vorbisPacket) { - vorbis_synthesis_init(&_vorbisDSP, &_vorbisInfo); - vorbis_block_init(&_vorbisDSP, &_vorbisBlock); - debug(3, "Ogg logical stream %lx is Vorbis %d channel %ld Hz audio.", - _vorbisOut.serialno, _vorbisInfo.channels, _vorbisInfo.rate); + th_info_clear(&theoraInfo); + th_comment_clear(&theoraComment); + th_setup_free(theoraSetup); - _audStream = Audio::makeQueuingAudioStream(_vorbisInfo.rate, _vorbisInfo.channels); + if (_hasAudio) { + _audioTrack = new VorbisAudioTrack(_soundType, _vorbisInfo); // Get enough audio data to start us off - while (_audStream->numQueuedStreams() == 0) { + while (!_audioTrack->hasAudio()) { // Queue more data bufferData(); while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) @@ -288,276 +189,299 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) { queueAudio(); } - if (_audStream) - g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, _audHandle, _audStream, -1, getVolume(), getBalance()); - } else { - // tear down the partial vorbis setup - vorbis_info_clear(&_vorbisInfo); - vorbis_comment_clear(&_vorbisComment); - _endOfAudio = true; + addTrack(_audioTrack); } - _surface.create(_theoraInfo.frame_width, _theoraInfo.frame_height, g_system->getScreenFormat()); - - // Set up a display surface - _displaySurface.pixels = _surface.getBasePtr(_theoraInfo.pic_x, _theoraInfo.pic_y); - _displaySurface.w = _theoraInfo.pic_width; - _displaySurface.h = _theoraInfo.pic_height; - _displaySurface.format = _surface.format; - _displaySurface.pitch = _surface.pitch; - - // Set the frame rate - _frameRate = Common::Rational(_theoraInfo.fps_numerator, _theoraInfo.fps_denominator); + vorbis_comment_clear(&vorbisComment); return true; } void TheoraDecoder::close() { - if (_vorbisPacket) { - ogg_stream_clear(&_vorbisOut); - vorbis_block_clear(&_vorbisBlock); - vorbis_dsp_clear(&_vorbisDSP); - vorbis_comment_clear(&_vorbisComment); - vorbis_info_clear(&_vorbisInfo); + AdvancedVideoDecoder::close(); - g_system->getMixer()->stopHandle(*_audHandle); + if (!_fileStream) + return; - _audStream = 0; - _vorbisPacket = false; - } - if (_theoraPacket) { + if (_videoTrack) { ogg_stream_clear(&_theoraOut); - th_decode_free(_theoraDecode); - th_comment_clear(&_theoraComment); - th_info_clear(&_theoraInfo); - _theoraDecode = 0; - _theoraPacket = false; + _videoTrack = 0; } - if (!_fileStream) - return; + if (_audioTrack) { + ogg_stream_clear(&_vorbisOut); + _audioTrack = 0; + } ogg_sync_clear(&_oggSync); + vorbis_info_clear(&_vorbisInfo); delete _fileStream; _fileStream = 0; - _surface.free(); - _displaySurface.pixels = 0; - _displaySurface.free(); - - reset(); + _hasVideo = _hasAudio = false; } -const Graphics::Surface *TheoraDecoder::decodeNextFrame() { +void TheoraDecoder::readNextPacket() { // First, let's get our frame - while (_theoraPacket) { - // theora is one in, one out... - if (ogg_stream_packetout(&_theoraOut, &_oggPacket) > 0) { - - if (_ppInc) { - _ppLevel += _ppInc; - th_decode_ctl(_theoraDecode, TH_DECCTL_SET_PPLEVEL, &_ppLevel, sizeof(_ppLevel)); - _ppInc = 0; + if (_hasVideo) { + while (!_videoTrack->endOfTrack()) { + // theora is one in, one out... + if (ogg_stream_packetout(&_theoraOut, &_oggPacket) > 0) { + if (_videoTrack->decodePacket(_oggPacket)) + break; + } else if (_theoraOut.e_o_s || _fileStream->eos()) { + // If we can't get any more frames, we're done. + _videoTrack->setEndOfVideo(); + } else { + // Queue more data + bufferData(); + while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) + queuePage(&_oggPage); } - if (th_decode_packetin(_theoraDecode, &_oggPacket, NULL) == 0) { - _curFrame++; + // Update audio if we can + queueAudio(); + } + } - // Convert YUV data to RGB data - th_ycbcr_buffer yuv; - th_decode_ycbcr_out(_theoraDecode, yuv); - translateYUVtoRGBA(yuv); + // Then make sure we have enough audio buffered + ensureAudioBufferSize(); +} - if (_curFrame == 0) - _startTime = g_system->getMillis(); +TheoraDecoder::TheoraVideoTrack::TheoraVideoTrack(const Graphics::PixelFormat &format, th_info &theoraInfo, th_setup_info *theoraSetup) { + _theoraDecode = th_decode_alloc(&theoraInfo, theoraSetup); - double time = th_granule_time(_theoraDecode, _oggPacket.granulepos); + if (theoraInfo.pixel_fmt != TH_PF_420) + error("Only theora YUV420 is supported"); - // We need to calculate when the next frame should be shown - // This is all in floating point because that's what the Ogg code gives us - // Ogg is a lossy container format, so it doesn't always list the time to the - // next frame. In such cases, we need to calculate it ourselves. - if (time == -1.0) - _nextFrameStartTime += _frameRate.getInverse().toDouble(); - else - _nextFrameStartTime = time; + int postProcessingMax; + th_decode_ctl(_theoraDecode, TH_DECCTL_GET_PPLEVEL_MAX, &postProcessingMax, sizeof(postProcessingMax)); + th_decode_ctl(_theoraDecode, TH_DECCTL_SET_PPLEVEL, &postProcessingMax, sizeof(postProcessingMax)); - // break out - break; - } - } else { - // If we can't get any more frames, we're done. - if (_theoraOut.e_o_s || _fileStream->eos()) { - _endOfVideo = true; - break; - } + _surface.create(theoraInfo.frame_width, theoraInfo.frame_height, format); - // Queue more data - bufferData(); - while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) - queuePage(&_oggPage); - } + // Set up a display surface + _displaySurface.pixels = _surface.getBasePtr(theoraInfo.pic_x, theoraInfo.pic_y); + _displaySurface.w = theoraInfo.pic_width; + _displaySurface.h = theoraInfo.pic_height; + _displaySurface.format = format; + _displaySurface.pitch = _surface.pitch; - // Update audio if we can - queueAudio(); - } + // Set the frame rate + _frameRate = Common::Rational(theoraInfo.fps_numerator, theoraInfo.fps_denominator); - // Force at least some audio to be buffered - // TODO: 5 is very arbitrary. We probably should do something like QuickTime does. - while (!_endOfAudio && _audStream->numQueuedStreams() < 5) { - bufferData(); - while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) - queuePage(&_oggPage); + _endOfVideo = false; + _nextFrameStartTime = 0.0; + _curFrame = -1; +} - bool queuedAudio = queueAudio(); - if ((_vorbisOut.e_o_s || _fileStream->eos()) && !queuedAudio) { - _endOfAudio = true; - break; - } - } +TheoraDecoder::TheoraVideoTrack::~TheoraVideoTrack() { + th_decode_free(_theoraDecode); - return &_displaySurface; + _surface.free(); + _displaySurface.pixels = 0; } -bool TheoraDecoder::queueAudio() { - if (!_audStream) - return false; - - // An audio buffer should have been allocated (either in the constructor or after queuing the current buffer) - if (!_audiobuf) { - warning("[TheoraDecoder::queueAudio] Invalid audio buffer"); - return false; +bool TheoraDecoder::TheoraVideoTrack::decodePacket(ogg_packet &oggPacket) { + if (th_decode_packetin(_theoraDecode, &oggPacket, 0) == 0) { + _curFrame++; + + // Convert YUV data to RGB data + th_ycbcr_buffer yuv; + th_decode_ycbcr_out(_theoraDecode, yuv); + translateYUVtoRGBA(yuv); + + double time = th_granule_time(_theoraDecode, oggPacket.granulepos); + + // We need to calculate when the next frame should be shown + // This is all in floating point because that's what the Ogg code gives us + // Ogg is a lossy container format, so it doesn't always list the time to the + // next frame. In such cases, we need to calculate it ourselves. + if (time == -1.0) + _nextFrameStartTime += _frameRate.getInverse().toDouble(); + else + _nextFrameStartTime = time; + + return true; } - bool queuedAudio = false; + return false; +} - for (;;) { - float **pcm; - - // if there's pending, decoded audio, grab it - int ret = vorbis_synthesis_pcmout(&_vorbisDSP, &pcm); - if (ret > 0) { - int count = _audiobufFill / 2; - int maxsamples = ((AUDIOFD_FRAGSIZE - _audiobufFill) / _vorbisInfo.channels) >> 1; - int i; - for (i = 0; i < ret && i < maxsamples; i++) - for (int j = 0; j < _vorbisInfo.channels; j++) { - int val = CLIP((int)rint(pcm[j][i] * 32767.f), -32768, 32767); - _audiobuf[count++] = val; - } - - vorbis_synthesis_read(&_vorbisDSP, i); - _audiobufFill += (i * _vorbisInfo.channels) << 1; - - if (_audiobufFill == AUDIOFD_FRAGSIZE) { - byte flags = Audio::FLAG_16BITS | Audio::FLAG_STEREO; -#ifdef SCUMM_LITTLE_ENDIAN - flags |= Audio::FLAG_LITTLE_ENDIAN; -#endif - _audStream->queueBuffer((byte *)_audiobuf, AUDIOFD_FRAGSIZE, DisposeAfterUse::NO, flags); - - // The audio mixer is now responsible for the old audio buffer. - // We need to create a new one. - _audiobuf = (ogg_int16_t *)malloc(AUDIOFD_FRAGSIZE * sizeof(ogg_int16_t)); - if (!_audiobuf) { - warning("[TheoraDecoder::queueAudio] Cannot allocate memory for audio buffer"); - return false; - } - - _audiobufFill = 0; - queuedAudio = true; - } - } else { - // no pending audio; is there a pending packet to decode? - if (ogg_stream_packetout(&_vorbisOut, &_oggPacket) > 0) { - if (vorbis_synthesis(&_vorbisBlock, &_oggPacket) == 0) // test for success! - vorbis_synthesis_blockin(&_vorbisDSP, &_vorbisBlock); - } else // we've buffered all we have, break out for now - return queuedAudio; - } - } +enum TheoraYUVBuffers { + kBufferY = 0, + kBufferU = 1, + kBufferV = 2 +}; - // Unreachable - return false; +void TheoraDecoder::TheoraVideoTrack::translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer) { + // Width and height of all buffers have to be divisible by 2. + assert((YUVBuffer[kBufferY].width & 1) == 0); + assert((YUVBuffer[kBufferY].height & 1) == 0); + assert((YUVBuffer[kBufferU].width & 1) == 0); + assert((YUVBuffer[kBufferV].width & 1) == 0); + + // UV images have to have a quarter of the Y image resolution + assert(YUVBuffer[kBufferU].width == YUVBuffer[kBufferY].width >> 1); + assert(YUVBuffer[kBufferV].width == YUVBuffer[kBufferY].width >> 1); + assert(YUVBuffer[kBufferU].height == YUVBuffer[kBufferY].height >> 1); + assert(YUVBuffer[kBufferV].height == YUVBuffer[kBufferY].height >> 1); + + 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::reset() { - VideoDecoder::reset(); +static vorbis_info *info = 0; - // FIXME: This does a rewind() instead of a reset()! +TheoraDecoder::VorbisAudioTrack::VorbisAudioTrack(Audio::Mixer::SoundType soundType, vorbis_info &vorbisInfo) : _soundType(soundType) { + vorbis_synthesis_init(&_vorbisDSP, &vorbisInfo); + vorbis_block_init(&_vorbisDSP, &_vorbisBlock); + info = &vorbisInfo; - if (_fileStream) - _fileStream->seek(0); + _audStream = Audio::makeQueuingAudioStream(vorbisInfo.rate, vorbisInfo.channels); - _audiobufFill = 0; - _audiobufReady = false; + _audioBufferFill = 0; + _audioBuffer = 0; + _endOfAudio = false; +} - _curFrame = -1; +TheoraDecoder::VorbisAudioTrack::~VorbisAudioTrack() { + vorbis_dsp_clear(&_vorbisDSP); + vorbis_block_clear(&_vorbisBlock); + delete _audStream; + free(_audioBuffer); +} - _theoraPacket = 0; - _vorbisPacket = 0; +Audio::AudioStream *TheoraDecoder::VorbisAudioTrack::getAudioStream() const { + return _audStream; } -bool TheoraDecoder::endOfVideo() const { - return !isVideoLoaded() || (_endOfVideo && (!_audStream || (_audStream->endOfData() && _endOfAudio))); +#define AUDIOFD_FRAGSIZE 10240 + +static double rint(double v) { + return floor(v + 0.5); } -uint32 TheoraDecoder::getTimeToNextFrame() const { - if (endOfVideo() || _curFrame < 0) - return 0; +bool TheoraDecoder::VorbisAudioTrack::decodeSamples() { + float **pcm; - uint32 elapsedTime = getTime(); - uint32 nextFrameStartTime = (uint32)(_nextFrameStartTime * 1000); + // if there's pending, decoded audio, grab it + int ret = vorbis_synthesis_pcmout(&_vorbisDSP, &pcm); - if (nextFrameStartTime <= elapsedTime) - return 0; + if (ret > 0) { + if (!_audioBuffer) { + _audioBuffer = (ogg_int16_t *)malloc(AUDIOFD_FRAGSIZE * sizeof(ogg_int16_t)); + assert(_audioBuffer); + } - return nextFrameStartTime - elapsedTime; + int channels = _audStream->isStereo() ? 2 : 1; + int count = _audioBufferFill / 2; + int maxsamples = ((AUDIOFD_FRAGSIZE - _audioBufferFill) / channels) >> 1; + int i; + + for (i = 0; i < ret && i < maxsamples; i++) { + for (int j = 0; j < channels; j++) { + int val = CLIP((int)rint(pcm[j][i] * 32767.f), -32768, 32767); + _audioBuffer[count++] = val; + } + } + + vorbis_synthesis_read(&_vorbisDSP, i); + _audioBufferFill += (i * channels) << 1; + + if (_audioBufferFill == AUDIOFD_FRAGSIZE) { + byte flags = Audio::FLAG_16BITS; + + if (_audStream->isStereo()) + flags |= Audio::FLAG_STEREO; + +#ifdef SCUMM_LITTLE_ENDIAN + flags |= Audio::FLAG_LITTLE_ENDIAN; +#endif + + _audStream->queueBuffer((byte *)_audioBuffer, AUDIOFD_FRAGSIZE, DisposeAfterUse::YES, flags); + + // The audio mixer is now responsible for the old audio buffer. + // We need to create a new one. + _audioBuffer = 0; + _audioBufferFill = 0; + } + + return true; + } + + return false; } -uint32 TheoraDecoder::getTime() const { - if (_audStream) - return g_system->getMixer()->getSoundElapsedTime(*_audHandle); +bool TheoraDecoder::VorbisAudioTrack::hasAudio() const { + return _audStream->numQueuedStreams() > 0; +} - return VideoDecoder::getTime(); +bool TheoraDecoder::VorbisAudioTrack::needsAudio() const { + // TODO: 5 is very arbitrary. We probably should do something like QuickTime does. + return !_endOfAudio && _audStream->numQueuedStreams() < 5; } -void TheoraDecoder::pauseVideoIntern(bool pause) { - if (_audStream) - g_system->getMixer()->pauseHandle(*_audHandle, pause); +void TheoraDecoder::VorbisAudioTrack::synthesizePacket(ogg_packet &oggPacket) { + if (vorbis_synthesis(&_vorbisBlock, &oggPacket) == 0) // test for success + vorbis_synthesis_blockin(&_vorbisDSP, &_vorbisBlock); } -enum TheoraYUVBuffers { - kBufferY = 0, - kBufferU = 1, - kBufferV = 2 -}; +void TheoraDecoder::queuePage(ogg_page *page) { + if (_hasVideo) + ogg_stream_pagein(&_theoraOut, page); -void TheoraDecoder::translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer) { - // Width and height of all buffers have to be divisible by 2. - assert((YUVBuffer[kBufferY].width & 1) == 0); - assert((YUVBuffer[kBufferY].height & 1) == 0); - assert((YUVBuffer[kBufferU].width & 1) == 0); - assert((YUVBuffer[kBufferV].width & 1) == 0); + if (_hasAudio) + ogg_stream_pagein(&_vorbisOut, page); +} - // UV images have to have a quarter of the Y image resolution - assert(YUVBuffer[kBufferU].width == YUVBuffer[kBufferY].width >> 1); - assert(YUVBuffer[kBufferV].width == YUVBuffer[kBufferY].width >> 1); - assert(YUVBuffer[kBufferU].height == YUVBuffer[kBufferY].height >> 1); - assert(YUVBuffer[kBufferV].height == YUVBuffer[kBufferY].height >> 1); +int TheoraDecoder::bufferData() { + char *buffer = ogg_sync_buffer(&_oggSync, 4096); + int bytes = _fileStream->read(buffer, 4096); - Graphics::convertYUV420ToRGB(&_surface, YUVBuffer[kBufferY].data, YUVBuffer[kBufferU].data, YUVBuffer[kBufferV].data, YUVBuffer[kBufferY].width, YUVBuffer[kBufferY].height, YUVBuffer[kBufferY].stride, YUVBuffer[kBufferU].stride); + ogg_sync_wrote(&_oggSync, bytes); + + return bytes; } -void TheoraDecoder::updateVolume() { - if (g_system->getMixer()->isSoundHandleActive(*_audHandle)) - g_system->getMixer()->setChannelVolume(*_audHandle, getVolume()); +bool TheoraDecoder::queueAudio() { + if (!_hasAudio) + return false; + + bool queuedAudio = false; + + for (;;) { + if (_audioTrack->decodeSamples()) { + // we queued some pending audio + queuedAudio = true; + } else if (ogg_stream_packetout(&_vorbisOut, &_oggPacket) > 0) { + // no pending audio; is there a pending packet to decode? + _audioTrack->synthesizePacket(_oggPacket); + } else { + // we've buffered all we have, break out for now + break; + } + } + + return queuedAudio; } -void TheoraDecoder::updateBalance() { - if (g_system->getMixer()->isSoundHandleActive(*_audHandle)) - g_system->getMixer()->setChannelBalance(*_audHandle, getBalance()); +void TheoraDecoder::ensureAudioBufferSize() { + if (!_hasAudio) + return; + + // Force at least some audio to be buffered + while (_audioTrack->needsAudio()) { + bufferData(); + while (ogg_sync_pageout(&_oggSync, &_oggPage) > 0) + queuePage(&_oggPage); + + bool queuedAudio = queueAudio(); + if ((_vorbisOut.e_o_s || _fileStream->eos()) && !queuedAudio) { + _audioTrack->setEndOfAudio(); + break; + } + } } } // End of namespace Video diff --git a/video/theora_decoder.h b/video/theora_decoder.h index 459fc064d3..2244f7550d 100644 --- a/video/theora_decoder.h +++ b/video/theora_decoder.h @@ -29,9 +29,7 @@ #include "common/rational.h" #include "video/video_decoder.h" -#include "audio/audiostream.h" #include "audio/mixer.h" -#include "graphics/pixelformat.h" #include "graphics/surface.h" #include @@ -41,6 +39,11 @@ namespace Common { class SeekableReadStream; } +namespace Audio { +class AudioStream; +class QueuingAudioStream; +} + namespace Video { /** @@ -49,7 +52,7 @@ namespace Video { * Video decoder used in engines: * - sword25 */ -class TheoraDecoder : public VideoDecoder { +class TheoraDecoder : public AdvancedVideoDecoder { public: TheoraDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType); virtual ~TheoraDecoder(); @@ -60,81 +63,91 @@ public: */ bool loadStream(Common::SeekableReadStream *stream); void close(); - void reset(); - /** - * Decode the next frame and return the frame's surface - * @note the return surface should *not* be freed - * @note this may return 0, in which case the last frame should be kept on screen - */ - const Graphics::Surface *decodeNextFrame(); +protected: + void readNextPacket(); - bool isVideoLoaded() const { return _fileStream != 0; } - uint16 getWidth() const { return _displaySurface.w; } - uint16 getHeight() const { return _displaySurface.h; } +private: + class TheoraVideoTrack : public VideoTrack { + public: + TheoraVideoTrack(const Graphics::PixelFormat &format, th_info &theoraInfo, th_setup_info *theoraSetup); + ~TheoraVideoTrack(); - uint32 getFrameCount() const { - // It is not possible to get frame count easily - // I.e. seeking is required - assert(0); - return 0; - } + bool endOfTrack() const { return _endOfVideo; } + uint16 getWidth() const { return _displaySurface.w; } + uint16 getHeight() const { return _displaySurface.h; } + Graphics::PixelFormat getPixelFormat() const { return _displaySurface.format; } + int getCurFrame() const { return _curFrame; } + uint32 getNextFrameStartTime() const { return (uint32)(_nextFrameStartTime * 1000); } + const Graphics::Surface *decodeNextFrame() { return &_displaySurface; } - Graphics::PixelFormat getPixelFormat() const { return _displaySurface.format; } - uint32 getTime() const; - uint32 getTimeToNextFrame() const; + bool decodePacket(ogg_packet &oggPacket); + void setEndOfVideo() { _endOfVideo = true; } - bool endOfVideo() const; + private: + int _curFrame; + bool _endOfVideo; + Common::Rational _frameRate; + double _nextFrameStartTime; -protected: - // VideoDecoder API - void updateVolume(); - void updateBalance(); - void pauseVideoIntern(bool pause); + Graphics::Surface _surface; + Graphics::Surface _displaySurface; + + th_dec_ctx *_theoraDecode; + + void translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer); + }; + + class VorbisAudioTrack : public AudioTrack { + public: + VorbisAudioTrack(Audio::Mixer::SoundType soundType, vorbis_info &vorbisInfo); + ~VorbisAudioTrack(); + + Audio::Mixer::SoundType getSoundType() const { return _soundType; } + + bool decodeSamples(); + bool hasAudio() const; + bool needsAudio() const; + void synthesizePacket(ogg_packet &oggPacket); + void setEndOfAudio() { _endOfAudio = true; } + + protected: + Audio::AudioStream *getAudioStream() const; + + private: + // single audio fragment audio buffering + int _audioBufferFill; + ogg_int16_t *_audioBuffer; + + Audio::Mixer::SoundType _soundType; + Audio::QueuingAudioStream *_audStream; + + vorbis_block _vorbisBlock; + vorbis_dsp_state _vorbisDSP; + + bool _endOfAudio; + }; -private: void queuePage(ogg_page *page); - bool queueAudio(); int bufferData(); - void translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer); + bool queueAudio(); + void ensureAudioBufferSize(); Common::SeekableReadStream *_fileStream; - Graphics::Surface _surface; - Graphics::Surface _displaySurface; - Common::Rational _frameRate; - double _nextFrameStartTime; - bool _endOfVideo; - bool _endOfAudio; Audio::Mixer::SoundType _soundType; - Audio::SoundHandle *_audHandle; - Audio::QueuingAudioStream *_audStream; ogg_sync_state _oggSync; ogg_page _oggPage; ogg_packet _oggPacket; - ogg_stream_state _vorbisOut; - ogg_stream_state _theoraOut; - th_info _theoraInfo; - th_comment _theoraComment; - th_dec_ctx *_theoraDecode; - th_setup_info *_theoraSetup; - vorbis_info _vorbisInfo; - vorbis_dsp_state _vorbisDSP; - vorbis_block _vorbisBlock; - vorbis_comment _vorbisComment; - int _theoraPacket; - int _vorbisPacket; + ogg_stream_state _theoraOut, _vorbisOut; + bool _hasVideo, _hasAudio; - int _ppLevelMax; - int _ppLevel; - int _ppInc; + vorbis_info _vorbisInfo; - // single audio fragment audio buffering - int _audiobufFill; - bool _audiobufReady; - ogg_int16_t *_audiobuf; + TheoraVideoTrack *_videoTrack; + VorbisAudioTrack *_audioTrack; }; } // End of namespace Video -- cgit v1.2.3 From 2fd8bae31994e5581d0ef43da439d01ddd0d1ef5 Mon Sep 17 00:00:00 2001 From: Vincent Hamm Date: Mon, 13 Aug 2012 20:12:07 -0700 Subject: CINE: Fix restoring of savegame in cave --- engines/cine/anim.cpp | 13 +++++-- engines/cine/anim.h | 2 +- engines/cine/bg_list.cpp | 12 +++---- engines/cine/gfx.cpp | 86 ++++++++++++++++++++++++++++------------------- engines/cine/gfx.h | 9 ++--- engines/cine/saveload.cpp | 16 ++++----- 6 files changed, 80 insertions(+), 58 deletions(-) diff --git a/engines/cine/anim.cpp b/engines/cine/anim.cpp index 410fcca1f3..d81828d9f6 100644 --- a/engines/cine/anim.cpp +++ b/engines/cine/anim.cpp @@ -682,9 +682,10 @@ void convert8BBP2(byte *dest, byte *source, int16 width, int16 height) { * Load image set * @param resourceName Image set filename * @param idx Target index in animDataTable (-1 if any empty space will do) + * @param frameIndex frame of animation to load (-1 for all frames) * @return The number of the animDataTable entry after the loaded image set (-1 if error) */ -int loadSet(const char *resourceName, int16 idx) { +int loadSet(const char *resourceName, int16 idx, int16 frameIndex =-1 ) { AnimHeader2Struct header2; uint16 numSpriteInAnim; int16 foundFileIdx = findFileInBundle(resourceName); @@ -708,6 +709,12 @@ int loadSet(const char *resourceName, int16 idx) { entry = idx < 0 ? emptyAnimSpace() : idx; assert(entry >= 0); + if(frameIndex>=0) + { + numSpriteInAnim = 1; + ptr += 0x10 * frameIndex; + } + for (int16 i = 0; i < numSpriteInAnim; i++, entry++) { Common::MemoryReadStream readS(ptr, 0x10); @@ -767,7 +774,7 @@ int loadSeq(const char *resourceName, int16 idx) { * @return The number of the animDataTable entry after the loaded resource (-1 if error) * @todo Implement loading of all resource types */ -int loadResource(const char *resourceName, int16 idx) { +int loadResource(const char *resourceName, int16 idx, int16 frameIndex) { int result = -1; // Return an error by default if (strstr(resourceName, ".SPL")) { result = loadSpl(resourceName, idx); @@ -778,7 +785,7 @@ int loadResource(const char *resourceName, int16 idx) { } else if (strstr(resourceName, ".ANM")) { result = loadAni(resourceName, idx); } else if (strstr(resourceName, ".SET")) { - result = loadSet(resourceName, idx); + result = loadSet(resourceName, idx, frameIndex); } else if (strstr(resourceName, ".SEQ")) { result = loadSeq(resourceName, idx); } else if (strstr(resourceName, ".H32")) { diff --git a/engines/cine/anim.h b/engines/cine/anim.h index 9c06c260ce..c5130aab82 100644 --- a/engines/cine/anim.h +++ b/engines/cine/anim.h @@ -98,7 +98,7 @@ public: void freeAnimDataTable(); void freeAnimDataRange(byte startIdx, byte numIdx); -int loadResource(const char *resourceName, int16 idx = -1); +int loadResource(const char *resourceName, int16 idx = -1, int16 frameIndex = -1); void loadResourcesFromSave(Common::SeekableReadStream &fHandle, enum CineSaveGameFormat saveGameFormat); void generateMask(const byte *sprite, byte *mask, uint16 size, byte transparency); diff --git a/engines/cine/bg_list.cpp b/engines/cine/bg_list.cpp index 693fea3294..36ecf53dea 100644 --- a/engines/cine/bg_list.cpp +++ b/engines/cine/bg_list.cpp @@ -39,9 +39,9 @@ uint32 var8; * @param objIdx Sprite description */ void addToBGList(int16 objIdx) { - renderer->incrustSprite(g_cine->_objectTable[objIdx]); - createBgIncrustListElement(objIdx, 0); + + renderer->incrustSprite(g_cine->_bgIncrustList.back()); } /** @@ -49,9 +49,9 @@ void addToBGList(int16 objIdx) { * @param objIdx Sprite description */ void addSpriteFilledToBGList(int16 objIdx) { - renderer->incrustMask(g_cine->_objectTable[objIdx]); - createBgIncrustListElement(objIdx, 1); + + renderer->incrustMask(g_cine->_bgIncrustList.back()); } /** @@ -103,9 +103,9 @@ void loadBgIncrustFromSave(Common::SeekableReadStream &fHandle) { g_cine->_bgIncrustList.push_back(tmp); if (tmp.param == 0) { - renderer->incrustSprite(g_cine->_objectTable[tmp.objIdx]); + renderer->incrustSprite(tmp); } else { - renderer->incrustMask(g_cine->_objectTable[tmp.objIdx]); + renderer->incrustMask(tmp); } } } diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index d448f134ff..c51420e62b 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -113,7 +113,7 @@ FWRenderer::FWRenderer() : _background(NULL), _backupPal(), _cmd(""), assert(_backBuffer); memset(_backBuffer, 0, _screenSize); - memset(_bgName, 0, sizeof(_bgName)); + memset(_bgName, 0, sizeof (_bgName)); } @@ -174,7 +174,8 @@ void FWRenderer::fillSprite(const ObjectStruct &obj, uint8 color) { * @param obj Object info * @param fillColor Sprite color */ -void FWRenderer::incrustMask(const ObjectStruct &obj, uint8 color) { +void FWRenderer::incrustMask(const BGIncrust &incrust, uint8 color) { + const ObjectStruct &obj = g_cine->_objectTable[incrust.objIdx]; const byte *data = g_cine->_animDataTable[obj.frame].data(); int x, y, width, height; @@ -218,7 +219,9 @@ void FWRenderer::drawSprite(const ObjectStruct &obj) { * Draw color sprite on background * @param obj Object info */ -void FWRenderer::incrustSprite(const ObjectStruct &obj) { +void FWRenderer::incrustSprite(const BGIncrust &incrust) { + const ObjectStruct &obj = g_cine->_objectTable[incrust.objIdx]; + const byte *data = g_cine->_animDataTable[obj.frame].data(); const byte *mask = g_cine->_animDataTable[obj.frame].mask(); int x, y, width, height; @@ -301,7 +304,7 @@ void FWRenderer::drawMessage(const char *str, int x, int y, int width, int color while (str[i] == ' ') i++; line = fitLine(str + i, tw, words, cw); - if (str[i + line] != '\0' && str[i + line] != 0x7C && words) { + if ( str[i + line] != '\0' && str[i + line] != 0x7C && words) { space = (tw - cw) / words; extraSpace = (tw - cw) % words; } else { @@ -1119,7 +1122,8 @@ void OSRenderer::clear() { * @param obj Object info * @param fillColor Sprite color */ -void OSRenderer::incrustMask(const ObjectStruct &obj, uint8 color) { +void OSRenderer::incrustMask(const BGIncrust &incrust, uint8 color) { + const ObjectStruct &obj = g_cine->_objectTable[incrust.objIdx]; const byte *data = g_cine->_animDataTable[obj.frame].data(); int x, y, width, height; @@ -1154,15 +1158,16 @@ void OSRenderer::drawSprite(const ObjectStruct &obj) { * Draw color sprite * @param obj Object info */ -void OSRenderer::incrustSprite(const ObjectStruct &obj) { - const byte *data = g_cine->_animDataTable[obj.frame].data(); +void OSRenderer::incrustSprite(const BGIncrust &incrust) { + const ObjectStruct &obj = g_cine->_objectTable[incrust.objIdx]; + const byte *data = g_cine->_animDataTable[incrust.frame].data(); int x, y, width, height, transColor; - x = obj.x; - y = obj.y; + x = incrust.x; + y = incrust.y; transColor = obj.part; - width = g_cine->_animDataTable[obj.frame]._realWidth; - height = g_cine->_animDataTable[obj.frame]._height; + width = g_cine->_animDataTable[incrust.frame]._realWidth; + height = g_cine->_animDataTable[incrust.frame]._height; if (_bgTable[_currentBg].bg) { drawSpriteRaw2(data, transColor, width, height, _bgTable[_currentBg].bg, x, y); @@ -1416,7 +1421,7 @@ void OSRenderer::selectBg(unsigned int idx) { if (_bgTable[idx].bg) { assert(_bgTable[idx].pal.isValid() && !(_bgTable[idx].pal.empty())); - _currentBg = idx; + _currentBg = idx; } else warning("OSRenderer::selectBg(%d) - attempt to select null background", idx); reloadPalette(); @@ -1737,43 +1742,53 @@ void drawSpriteRaw(const byte *spritePtr, const byte *maskPtr, int16 width, int1 } } -void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 width, int16 height, byte *page, int16 x, int16 y, byte transparentColor, byte bpp) { - byte *pMask = NULL; +void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 width, int16 height, byte *page, int16 x, int16 y, byte transparentColor, byte bpp) +{ + byte* pMask = NULL; // draw the mask based on next objects in the list Common::List::iterator it; - for (it = g_cine->_overlayList.begin(); it != g_cine->_overlayList.end(); ++it) { - if (&(*it) == overlayPtr) { + for (it = g_cine->_overlayList.begin(); it != g_cine->_overlayList.end(); ++it) + { + if(&(*it) == overlayPtr) + { break; } } - while (it != g_cine->_overlayList.end()) { - overlay *pCurrentOverlay = &(*it); - if ((pCurrentOverlay->type == 5) || ((pCurrentOverlay->type == 21) && (pCurrentOverlay->x == overlayPtr->objIdx))) { - AnimData *sprite = &g_cine->_animDataTable[g_cine->_objectTable[it->objIdx].frame]; + while(it != g_cine->_overlayList.end()) + { + overlay* pCurrentOverlay = &(*it); + if((pCurrentOverlay->type==5) || ((pCurrentOverlay->type==21) && (pCurrentOverlay->x==overlayPtr->objIdx))) + { + AnimData* sprite = &g_cine->_animDataTable[g_cine->_objectTable[it->objIdx].frame]; - if (pMask == NULL) { - pMask = new byte[width * height]; + if(pMask == NULL) + { + pMask = new byte[width*height]; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { - byte spriteColor = spritePtr[width * i + j]; - pMask[width * i + j] = spriteColor; + byte spriteColor= spritePtr[width*i+j]; + pMask[width*i+j] = spriteColor; } } } for (int i = 0; i < sprite->_realWidth; i++) { for (int j = 0; j < sprite->_height; j++) { - int inMaskX = (g_cine->_objectTable[it->objIdx].x + i) - x; - int inMaskY = (g_cine->_objectTable[it->objIdx].y + j) - y; - - if (inMaskX >= 0 && inMaskX < width) { - if (inMaskY >= 0 && inMaskY < height) { - if (sprite->_bpp == 1) { - if (!sprite->getColor(i, j)) { - pMask[inMaskY * width + inMaskX] = page[x + y * 320 + inMaskX + inMaskY * 320]; + int inMaskX = (g_cine->_objectTable[it->objIdx].x+i) - x; + int inMaskY = (g_cine->_objectTable[it->objIdx].y+j) - y; + + if(inMaskX >=0 && inMaskX < width) + { + if(inMaskY >=0 && inMaskY < height) + { + if(sprite->_bpp == 1) + { + if(!sprite->getColor(i, j)) + { + pMask[inMaskY*width+inMaskX] = page[x + y * 320 + inMaskX + inMaskY * 320]; } } } @@ -1787,7 +1802,8 @@ void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 wi } // now, draw with the mask we created - if (pMask) { + if(pMask) + { spritePtr = pMask; } { @@ -1796,7 +1812,7 @@ void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 wi destPtr += i * 320; for (int j = 0; j < width; j++) { - byte color = *(spritePtr++); + byte color= *(spritePtr++); if ((transparentColor != color) && x + j >= 0 && x + j < 320 && i + y >= 0 && i + y < 200) { *(destPtr++) = color; } else { @@ -1807,7 +1823,7 @@ void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 wi } delete[] pMask; -} +}; void drawSpriteRaw2(const byte *spritePtr, byte transColor, int16 width, int16 height, byte *page, int16 x, int16 y) { int16 i, j; diff --git a/engines/cine/gfx.h b/engines/cine/gfx.h index 6ff5b08b77..3434cf9fc2 100644 --- a/engines/cine/gfx.h +++ b/engines/cine/gfx.h @@ -27,6 +27,7 @@ #include "common/rect.h" #include "common/stack.h" #include "cine/object.h" +#include "cine/bg_list.h" namespace Cine { @@ -177,8 +178,8 @@ public: void drawFrame(); void setCommand(Common::String cmd); - virtual void incrustMask(const ObjectStruct &obj, uint8 color = 0); - virtual void incrustSprite(const ObjectStruct &obj); + virtual void incrustMask(const BGIncrust &incrust, uint8 color = 0); + virtual void incrustSprite(const BGIncrust &incrust); virtual void loadBg16(const byte *bg, const char *name, unsigned int idx = 0); virtual void loadCt16(const byte *ct, const char *name); @@ -239,8 +240,8 @@ public: void clear(); - void incrustMask(const ObjectStruct &obj, uint8 color = 0); - void incrustSprite(const ObjectStruct &obj); + void incrustMask(const BGIncrust &incrust, uint8 color = 0); + void incrustSprite(const BGIncrust &incrust); void loadBg16(const byte *bg, const char *name, unsigned int idx = 0); void loadCt16(const byte *ct, const char *name); diff --git a/engines/cine/saveload.cpp b/engines/cine/saveload.cpp index 223099a587..20952eea52 100644 --- a/engines/cine/saveload.cpp +++ b/engines/cine/saveload.cpp @@ -991,7 +991,7 @@ void CineEngine::makeSave(char *saveFileName) { * at a time. */ void loadResourcesFromSave(Common::SeekableReadStream &fHandle, enum CineSaveGameFormat saveGameFormat) { - int16 currentAnim, foundFileIdx; + int16 foundFileIdx; char *animName, part[256], name[10]; strcpy(part, currentPartName); @@ -1001,10 +1001,10 @@ void loadResourcesFromSave(Common::SeekableReadStream &fHandle, enum CineSaveGam const int entrySize = ((saveGameFormat == ANIMSIZE_23) ? 23 : 30); const int fileStartPos = fHandle.pos(); - currentAnim = 0; - while (currentAnim < NUM_MAX_ANIMDATA) { + + for(int resourceIndex=0; resourceIndex_partBuffer[foundFileIdx].partName; loadRelatedPalette(animName); // Is this for Future Wars only? - const int16 prevAnim = currentAnim; - currentAnim = loadResource(animName, currentAnim); - assert(currentAnim > prevAnim); // Make sure we advance forward + loadResource(animName, resourceIndex, frameIndex); } loadPart(part); -- cgit v1.2.3 From 1d6a0ad8b20b5c223f3dbab50298be5cdf5f36f5 Mon Sep 17 00:00:00 2001 From: Vincent Hamm Date: Mon, 13 Aug 2012 21:35:49 -0700 Subject: Fix swimming sequence by allowing mouse click to be held down --- engines/cine/main_loop.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp index 971830ce8f..7cd3cac3d6 100644 --- a/engines/cine/main_loop.cpp +++ b/engines/cine/main_loop.cpp @@ -56,6 +56,12 @@ static void processEvent(Common::Event &event) { case Common::EVENT_RBUTTONDOWN: mouseRight = 1; break; + case Common::EVENT_LBUTTONUP: + mouseLeft = 0; + break; + case Common::EVENT_RBUTTONUP: + mouseRight = 0; + break; case Common::EVENT_MOUSEMOVE: break; case Common::EVENT_KEYDOWN: @@ -214,8 +220,6 @@ void manageEvents() { g_sound->update(); mouseData.left = mouseLeft; mouseData.right = mouseRight; - mouseLeft = 0; - mouseRight = 0; } void getMouseData(uint16 param, uint16 *pButton, uint16 *pX, uint16 *pY) { @@ -311,6 +315,7 @@ void CineEngine::mainLoop(int bootScriptIdx) { // HACK: Force amount of oxygen left to maximum during Operation Stealth's first arcade sequence. // This makes it possible to pass the arcade sequence for now. // FIXME: Remove the hack and make the first arcade sequence normally playable. + /* if (g_cine->getGameType() == Cine::GType_OS) { Common::String bgName(renderer->getBgName()); // Check if the background is one of the three backgrounds @@ -320,7 +325,7 @@ void CineEngine::mainLoop(int bootScriptIdx) { // Force the amount of oxygen left to the maximum. g_cine->_objectTable[oxygenObjNum].x = maxOxygen; } - } + }*/ // HACK: In Operation Stealth after the first arcade sequence jump player's position to avoid getting stuck. // After the first arcade sequence the player comes up stairs from -- cgit v1.2.3 From ca54d69addbbb4257514b007a656138c8f60c4cd Mon Sep 17 00:00:00 2001 From: Vincent Hamm Date: Mon, 13 Aug 2012 21:35:49 -0700 Subject: Cine: Fix swimming sequence by allowing mouse click to be held down --- engines/cine/main_loop.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp index 971830ce8f..7cd3cac3d6 100644 --- a/engines/cine/main_loop.cpp +++ b/engines/cine/main_loop.cpp @@ -56,6 +56,12 @@ static void processEvent(Common::Event &event) { case Common::EVENT_RBUTTONDOWN: mouseRight = 1; break; + case Common::EVENT_LBUTTONUP: + mouseLeft = 0; + break; + case Common::EVENT_RBUTTONUP: + mouseRight = 0; + break; case Common::EVENT_MOUSEMOVE: break; case Common::EVENT_KEYDOWN: @@ -214,8 +220,6 @@ void manageEvents() { g_sound->update(); mouseData.left = mouseLeft; mouseData.right = mouseRight; - mouseLeft = 0; - mouseRight = 0; } void getMouseData(uint16 param, uint16 *pButton, uint16 *pX, uint16 *pY) { @@ -311,6 +315,7 @@ void CineEngine::mainLoop(int bootScriptIdx) { // HACK: Force amount of oxygen left to maximum during Operation Stealth's first arcade sequence. // This makes it possible to pass the arcade sequence for now. // FIXME: Remove the hack and make the first arcade sequence normally playable. + /* if (g_cine->getGameType() == Cine::GType_OS) { Common::String bgName(renderer->getBgName()); // Check if the background is one of the three backgrounds @@ -320,7 +325,7 @@ void CineEngine::mainLoop(int bootScriptIdx) { // Force the amount of oxygen left to the maximum. g_cine->_objectTable[oxygenObjNum].x = maxOxygen; } - } + }*/ // HACK: In Operation Stealth after the first arcade sequence jump player's position to avoid getting stuck. // After the first arcade sequence the player comes up stairs from -- cgit v1.2.3 From 478be5f07a8528d19542802a7714cf4fd652f340 Mon Sep 17 00:00:00 2001 From: Vincent Hamm Date: Mon, 13 Aug 2012 23:20:10 -0700 Subject: CINE: Fix regression in savegame system --- engines/cine/anim.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/engines/cine/anim.cpp b/engines/cine/anim.cpp index d81828d9f6..60168831a1 100644 --- a/engines/cine/anim.cpp +++ b/engines/cine/anim.cpp @@ -709,13 +709,17 @@ int loadSet(const char *resourceName, int16 idx, int16 frameIndex =-1 ) { entry = idx < 0 ? emptyAnimSpace() : idx; assert(entry >= 0); + int16 startFrame = 0; + int16 endFrame = numSpriteInAnim; + if(frameIndex>=0) { - numSpriteInAnim = 1; + startFrame = frameIndex; + endFrame = frameIndex+1; ptr += 0x10 * frameIndex; } - for (int16 i = 0; i < numSpriteInAnim; i++, entry++) { + for (int16 i = startFrame; i < endFrame; i++, entry++) { Common::MemoryReadStream readS(ptr, 0x10); header2.field_0 = readS.readUint32BE(); -- cgit v1.2.3 From 54e6283cfa5018401b793ce993cf308fec1cb3ef Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Tue, 14 Aug 2012 16:46:19 +1000 Subject: CINE: Fix compile error caused by excess ; --- engines/cine/gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index c51420e62b..d080d4300b 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -1823,7 +1823,7 @@ void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 wi } delete[] pMask; -}; +} void drawSpriteRaw2(const byte *spritePtr, byte transColor, int16 width, int16 height, byte *page, int16 x, int16 y) { int16 i, j; -- cgit v1.2.3 From 92df76fbb3802bf28819c2684d188251c249cdbb Mon Sep 17 00:00:00 2001 From: Vincent Hamm Date: Mon, 13 Aug 2012 23:58:32 -0700 Subject: CINE: Fix system menu sometimes not appearing in OS --- engines/cine/cine.cpp | 2 ++ engines/cine/gfx.cpp | 15 +++++++++------ engines/cine/main_loop.cpp | 6 +++--- engines/cine/script_fw.cpp | 2 +- engines/cine/various.cpp | 21 ++++++++++++--------- engines/cine/various.h | 2 +- 6 files changed, 28 insertions(+), 20 deletions(-) diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp index 6b94c33c31..bbe2cd4896 100644 --- a/engines/cine/cine.cpp +++ b/engines/cine/cine.cpp @@ -189,6 +189,8 @@ void CineEngine::initialize() { g_cine->_messageTable.clear(); resetObjectTable(); + disableSystemMenu = 1; + var8 = 0; var2 = var3 = var4 = var5 = 0; diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index c51420e62b..adc501b67d 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -249,14 +249,17 @@ void FWRenderer::drawCommand() { unsigned int i; int x = 10, y = _cmdY; - drawPlainBox(x, y, 301, 11, 0); - drawBorder(x - 1, y - 1, 302, 12, 2); + if(disableSystemMenu == 0) + { + drawPlainBox(x, y, 301, 11, 0); + drawBorder(x - 1, y - 1, 302, 12, 2); - x += 2; - y += 2; + x += 2; + y += 2; - for (i = 0; i < _cmd.size(); i++) { - x = drawChar(_cmd[i], x, y); + for (i = 0; i < _cmd.size(); i++) { + x = drawChar(_cmd[i], x, y); + } } } diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp index 7cd3cac3d6..f13f38a45e 100644 --- a/engines/cine/main_loop.cpp +++ b/engines/cine/main_loop.cpp @@ -121,7 +121,7 @@ static void processEvent(Common::Event &event) { } break; case Common::KEYCODE_F10: - if (!disableSystemMenu && !inMenu) { + if (!inMenu) { g_cine->makeSystemMenu(); } break; @@ -384,8 +384,8 @@ void CineEngine::mainLoop(int bootScriptIdx) { playerAction = false; _messageLen <<= 3; - if (_messageLen < 0x800) - _messageLen = 0x800; + if (_messageLen < 800) + _messageLen = 800; do { manageEvents(); diff --git a/engines/cine/script_fw.cpp b/engines/cine/script_fw.cpp index 66150cc5b2..a34bf7ba2c 100644 --- a/engines/cine/script_fw.cpp +++ b/engines/cine/script_fw.cpp @@ -1861,7 +1861,7 @@ int FWScript::o1_disableSystemMenu() { byte param = getNextByte(); debugC(5, kCineDebugScript, "Line: %d: disableSystemMenu(%d)", _line, param); - disableSystemMenu = (param != 0); + disableSystemMenu = param; return 0; } diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp index 9b73ae1101..eccd71cf05 100644 --- a/engines/cine/various.cpp +++ b/engines/cine/various.cpp @@ -36,7 +36,7 @@ namespace Cine { -bool disableSystemMenu = false; +int16 disableSystemMenu = 0; bool inMenu; int16 commandVar3[4]; @@ -341,7 +341,7 @@ void CineEngine::makeSystemMenu() { int16 mouseX, mouseY, mouseButton; int16 selectedSave; - if (!disableSystemMenu) { + if (disableSystemMenu != 1) { inMenu = true; do { @@ -544,14 +544,16 @@ int16 buildObjectListCommand(int16 param) { int16 selectSubObject(int16 x, int16 y, int16 param) { int16 listSize = buildObjectListCommand(param); - int16 selectedObject; + int16 selectedObject = -1; bool osExtras = g_cine->getGameType() == Cine::GType_OS; if (!listSize) { return -2; } - selectedObject = makeMenuChoice(objectListCommand, listSize, x, y, 140, osExtras); + if (disableSystemMenu == 0) { + selectedObject = makeMenuChoice(objectListCommand, listSize, x, y, 140, osExtras); + } if (selectedObject == -1) return -1; @@ -691,9 +693,6 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, int16 var_4; SelectionMenu *menu; - if (disableSystemMenu) - return -1; - paramY = (height * 9) + 10; if (X + width > 319) { @@ -810,14 +809,18 @@ void makeActionMenu() { getMouseData(mouseUpdateStatus, &mouseButton, &mouseX, &mouseY); if (g_cine->getGameType() == Cine::GType_OS) { - playerCommand = makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70, true); + if(disableSystemMenu == 0) { + playerCommand = makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70, true); + } if (playerCommand >= 8000) { playerCommand -= 8000; canUseOnObject = canUseOnItemTable[playerCommand]; } } else { - playerCommand = makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70); + if(disableSystemMenu == 0) { + playerCommand = makeMenuChoice(defaultActionCommand, 6, mouseX, mouseY, 70); + } } inMenu = false; diff --git a/engines/cine/various.h b/engines/cine/various.h index 0c1883c323..813619816d 100644 --- a/engines/cine/various.h +++ b/engines/cine/various.h @@ -41,7 +41,7 @@ void makeActionMenu(); void waitPlayerInput(); void setTextWindow(uint16 param1, uint16 param2, uint16 param3, uint16 param4); -extern bool disableSystemMenu; +extern int16 disableSystemMenu; extern bool inMenu; extern CommandeType currentSaveName[10]; -- cgit v1.2.3 From 629d55cdfad91a993eff7406fa2ca2b09d0d295d Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Tue, 14 Aug 2012 09:09:08 +0200 Subject: CINE: Apply some ScummVM formatting conventions --- engines/cine/gfx.cpp | 59 ++++++++++++++++++++-------------------------------- 1 file changed, 23 insertions(+), 36 deletions(-) diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index 3fac973855..cce8154d84 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -249,8 +249,7 @@ void FWRenderer::drawCommand() { unsigned int i; int x = 10, y = _cmdY; - if(disableSystemMenu == 0) - { + if(disableSystemMenu == 0) { drawPlainBox(x, y, 301, 11, 0); drawBorder(x - 1, y - 1, 302, 12, 2); @@ -304,7 +303,8 @@ void FWRenderer::drawMessage(const char *str, int x, int y, int width, int color for (i = 0; str[i]; i++, line--) { // Fit line of text into textbox if (!line) { - while (str[i] == ' ') i++; + while (str[i] == ' ') + i++; line = fitLine(str + i, tw, words, cw); if ( str[i + line] != '\0' && str[i + line] != 0x7C && words) { @@ -1745,68 +1745,55 @@ void drawSpriteRaw(const byte *spritePtr, const byte *maskPtr, int16 width, int1 } } -void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 width, int16 height, byte *page, int16 x, int16 y, byte transparentColor, byte bpp) -{ - byte* pMask = NULL; +void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 width, int16 height, byte *page, int16 x, int16 y, byte transparentColor, byte bpp) { + byte *pMask = NULL; // draw the mask based on next objects in the list Common::List::iterator it; - for (it = g_cine->_overlayList.begin(); it != g_cine->_overlayList.end(); ++it) - { - if(&(*it) == overlayPtr) - { + for (it = g_cine->_overlayList.begin(); it != g_cine->_overlayList.end(); ++it) { + if(&(*it) == overlayPtr) { break; } } - while(it != g_cine->_overlayList.end()) - { - overlay* pCurrentOverlay = &(*it); - if((pCurrentOverlay->type==5) || ((pCurrentOverlay->type==21) && (pCurrentOverlay->x==overlayPtr->objIdx))) - { - AnimData* sprite = &g_cine->_animDataTable[g_cine->_objectTable[it->objIdx].frame]; + while(it != g_cine->_overlayList.end()) { + overlay *pCurrentOverlay = &(*it); + if ((pCurrentOverlay->type == 5) || ((pCurrentOverlay->type == 21) && (pCurrentOverlay->x == overlayPtr->objIdx))) { + AnimData *sprite = &g_cine->_animDataTable[g_cine->_objectTable[it->objIdx].frame]; - if(pMask == NULL) - { + if (pMask == NULL) { pMask = new byte[width*height]; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { - byte spriteColor= spritePtr[width*i+j]; - pMask[width*i+j] = spriteColor; + byte spriteColor= spritePtr[width * i + j]; + pMask[width * i + j] = spriteColor; } } } for (int i = 0; i < sprite->_realWidth; i++) { for (int j = 0; j < sprite->_height; j++) { - int inMaskX = (g_cine->_objectTable[it->objIdx].x+i) - x; - int inMaskY = (g_cine->_objectTable[it->objIdx].y+j) - y; - - if(inMaskX >=0 && inMaskX < width) - { - if(inMaskY >=0 && inMaskY < height) - { - if(sprite->_bpp == 1) - { - if(!sprite->getColor(i, j)) - { - pMask[inMaskY*width+inMaskX] = page[x + y * 320 + inMaskX + inMaskY * 320]; + int inMaskX = (g_cine->_objectTable[it->objIdx].x + i) - x; + int inMaskY = (g_cine->_objectTable[it->objIdx].y + j) - y; + + if (inMaskX >=0 && inMaskX < width) { + if (inMaskY >= 0 && inMaskY < height) { + if (sprite->_bpp == 1) { + if (!sprite->getColor(i, j)) { + pMask[inMaskY * width + inMaskX] = page[x + y * 320 + inMaskX + inMaskY * 320]; } } } } } } - - } it++; } // now, draw with the mask we created - if(pMask) - { + if(pMask) { spritePtr = pMask; } { -- cgit v1.2.3 From c9f3d83c9eed2134b89e59cf32f2489a99e4139f Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Tue, 14 Aug 2012 23:48:24 +0200 Subject: GUI: Fix out-of-bounds in new chooser. --- gui/saveload-dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp index d1a66dc28a..850dfcc78f 100644 --- a/gui/saveload-dialog.cpp +++ b/gui/saveload-dialog.cpp @@ -535,7 +535,7 @@ const Common::String &SaveLoadChooserGrid::getResultString() const { } void SaveLoadChooserGrid::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { - if (cmd <= _entriesPerPage) { + if (cmd <= _entriesPerPage && cmd + _curPage * _entriesPerPage <= _saveList.size()) { const SaveStateDescriptor &desc = _saveList[cmd - 1 + _curPage * _entriesPerPage]; if (_saveMode) { -- cgit v1.2.3 From b5a63d6709e87005c9b02fa02d4ae8802b7ce915 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Wed, 15 Aug 2012 00:15:29 +0200 Subject: COMMON: Remove fprintf/stderr usage from xmlparser. --- common/xmlparser.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/common/xmlparser.cpp b/common/xmlparser.cpp index ea3d44cf87..f0b7f1cc81 100644 --- a/common/xmlparser.cpp +++ b/common/xmlparser.cpp @@ -20,15 +20,11 @@ * */ -// FIXME: Avoid using fprintf -#define FORBIDDEN_SYMBOL_EXCEPTION_fprintf -#define FORBIDDEN_SYMBOL_EXCEPTION_stderr - - #include "common/xmlparser.h" #include "common/archive.h" #include "common/fs.h" #include "common/memstream.h" +#include "common/system.h" namespace Common { @@ -123,17 +119,19 @@ bool XMLParser::parserError(const String &errStr) { keyClosing = currentPosition; } - fprintf(stderr, "\n File <%s>, line %d:\n", _fileName.c_str(), lineCount); + Common::String errorMessage = Common::String::format("\n File <%s>, line %d:\n", _fileName.c_str(), lineCount); currentPosition = (keyClosing - keyOpening); _stream->seek(keyOpening, SEEK_SET); while (currentPosition--) - fprintf(stderr, "%c", _stream->readByte()); + errorMessage += (char)_stream->readByte(); + + errorMessage += "\n\nParser error: "; + errorMessage += errStr; + errorMessage += "\n\n"; - fprintf(stderr, "\n\nParser error: "); - fprintf(stderr, "%s", errStr.c_str()); - fprintf(stderr, "\n\n"); + g_system->logMessage(LogMessageType::kError, errorMessage.c_str()); return false; } -- cgit v1.2.3 From 92bcb1801a3d25af9f822d901cbd6613ecdff365 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Wed, 15 Aug 2012 09:47:19 +0200 Subject: SCUMM: Replace detector printf usage with logMessage. --- engines/scumm/detection.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 87305921c9..5404c7f8b1 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -20,9 +20,6 @@ * */ -// FIXME: Avoid using printf -#define FORBIDDEN_SYMBOL_EXCEPTION_printf - #include "base/plugins.h" #include "common/archive.h" @@ -1066,15 +1063,19 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co // unknown MD5, or with a medium debug level in case of a known MD5 (for // debugging purposes). if (!findInMD5Table(res.md5.c_str())) { - printf("Your game version appears to be unknown. If this is *NOT* a fan-modified\n"); - printf("version (in particular, not a fan-made translation), please, report the\n"); - printf("following data to the ScummVM team along with name of the game you tried\n"); - printf("to add and its version/language/etc.:\n"); + Common::String md5Warning; + + md5Warning = "Your game version appears to be unknown. If this is *NOT* a fan-modified\n"; + md5Warning += "version (in particular, not a fan-made translation), please, report the\n"; + md5Warning += "following data to the ScummVM team along with name of the game you tried\n"; + md5Warning += "to add and its version/language/etc.:\n"; - printf(" SCUMM gameid '%s', file '%s', MD5 '%s'\n\n", + md5Warning += Common::String::format(" SCUMM gameid '%s', file '%s', MD5 '%s'\n\n", res.game.gameid, generateFilenameForDetection(res.fp.pattern, res.fp.genMethod).c_str(), res.md5.c_str()); + + g_system->logMessage(LogMessageType::kWarning, md5Warning.c_str()); } else { debug(1, "Using MD5 '%s'", res.md5.c_str()); } -- cgit v1.2.3 From 067db748e446fb456584d53bc8e206fadbbac9de Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Wed, 15 Aug 2012 09:51:55 +0200 Subject: AGI: Replace detector printf usage with logMessage. --- engines/agi/detection.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 805fe7d366..5f7780bfe3 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -20,9 +20,6 @@ * */ -// FIXME: Avoid using printf -#define FORBIDDEN_SYMBOL_EXCEPTION_printf - #include "base/plugins.h" #include "engines/advancedDetector.h" @@ -491,10 +488,14 @@ const ADGameDescription *AgiMetaEngine::fallbackDetect(const FileMap &allFilesXX g_fallbackDesc.desc.gameid = _gameid.c_str(); g_fallbackDesc.desc.extra = _extra.c_str(); - printf("Your game version has been detected using fallback matching as a\n"); - printf("variant of %s (%s).\n", g_fallbackDesc.desc.gameid, g_fallbackDesc.desc.extra); - printf("If this is an original and unmodified version or new made Fanmade game,\n"); - printf("please report any, information previously printed by ScummVM to the team.\n"); + Common::String fallbackWarning; + + fallbackWarning = "Your game version has been detected using fallback matching as a\n"; + fallbackWarning += Common::String::format("variant of %s (%s).\n", g_fallbackDesc.desc.gameid, g_fallbackDesc.desc.extra); + fallbackWarning += "If this is an original and unmodified version or new made Fanmade game,\n"; + fallbackWarning += "please report any, information previously printed by ScummVM to the team.\n"; + + g_system->logMessage(LogMessageType::kWarning, fallbackWarning.c_str()); return (const ADGameDescription *)&g_fallbackDesc; } -- cgit v1.2.3 From 9c561c0287b9d1a48caa9d8178f083afc3cf2c89 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Wed, 15 Aug 2012 10:00:23 +0200 Subject: ANDROID: Remove unused GL_OES_draw_texture code. --- backends/platform/android/texture.cpp | 63 +++++++++++------------------------ 1 file changed, 19 insertions(+), 44 deletions(-) diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp index 95c96e0d25..b174e93191 100644 --- a/backends/platform/android/texture.cpp +++ b/backends/platform/android/texture.cpp @@ -52,9 +52,6 @@ // Supported GL extensions static bool npot_supported = false; -#ifdef GL_OES_draw_texture -static bool draw_tex_supported = false; -#endif static inline GLfixed xdiv(int numerator, int denominator) { assert(numerator < (1 << 16)); @@ -85,11 +82,6 @@ void GLESBaseTexture::initGLExtensions() { if (token == "GL_ARB_texture_non_power_of_two") npot_supported = true; - -#ifdef GL_OES_draw_texture - if (token == "GL_OES_draw_texture") - draw_tex_supported = true; -#endif } } @@ -180,45 +172,28 @@ void GLESBaseTexture::allocBuffer(GLuint w, GLuint h) { void GLESBaseTexture::drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) { GLCALL(glBindTexture(GL_TEXTURE_2D, _texture_name)); -#ifdef GL_OES_draw_texture - // Great extension, but only works under specific conditions. - // Still a work-in-progress - disabled for now. - if (false && draw_tex_supported && !hasPalette()) { - //GLCALL(glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE)); - const GLint crop[4] = { 0, _surface.h, _surface.w, -_surface.h }; + const GLfixed tex_width = xdiv(_surface.w, _texture_width); + const GLfixed tex_height = xdiv(_surface.h, _texture_height); + const GLfixed texcoords[] = { + 0, 0, + tex_width, 0, + 0, tex_height, + tex_width, tex_height, + }; - GLCALL(glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop)); + GLCALL(glTexCoordPointer(2, GL_FIXED, 0, texcoords)); - // Android GLES bug? - GLCALL(glColor4ub(0xff, 0xff, 0xff, 0xff)); + const GLshort vertices[] = { + x, y, + x + w, y, + x, y + h, + x + w, y + h, + }; - GLCALL(glDrawTexiOES(x, y, 0, w, h)); - } else -#endif - { - const GLfixed tex_width = xdiv(_surface.w, _texture_width); - const GLfixed tex_height = xdiv(_surface.h, _texture_height); - const GLfixed texcoords[] = { - 0, 0, - tex_width, 0, - 0, tex_height, - tex_width, tex_height, - }; - - GLCALL(glTexCoordPointer(2, GL_FIXED, 0, texcoords)); - - const GLshort vertices[] = { - x, y, - x + w, y, - x, y + h, - x + w, y + h, - }; - - GLCALL(glVertexPointer(2, GL_SHORT, 0, vertices)); - - assert(ARRAYSIZE(vertices) == ARRAYSIZE(texcoords)); - GLCALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, ARRAYSIZE(vertices) / 2)); - } + GLCALL(glVertexPointer(2, GL_SHORT, 0, vertices)); + + assert(ARRAYSIZE(vertices) == ARRAYSIZE(texcoords)); + GLCALL(glDrawArrays(GL_TRIANGLE_STRIP, 0, ARRAYSIZE(vertices) / 2)); clearDirty(); } -- cgit v1.2.3 From 8b022a4983ba179e46a47c10e31fda8ea02c16ce Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Wed, 15 Aug 2012 21:33:55 +0100 Subject: I18N: Update Polish translation from patch #3552055 --- po/pl_PL.po | 150 +++++++++++++++++++++++++++--------------------------------- 1 file changed, 68 insertions(+), 82 deletions(-) diff --git a/po/pl_PL.po b/po/pl_PL.po index c2c5c09e19..1bf44d1a66 100644 --- a/po/pl_PL.po +++ b/po/pl_PL.po @@ -1,14 +1,14 @@ # Polish translation for ScummVM. # Copyright (C) 2010-2012 ScummVM Team # This file is distributed under the same license as the ScummVM package. -# Grajpopolsku.pl , 2011. +# Grajpopolsku.pl , 2011-2012. # msgid "" msgstr "" "Project-Id-Version: ScummVM 1.3.0\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-08-12 14:57+0200\n" -"PO-Revision-Date: 2011-10-24 21:14+0100\n" +"PO-Revision-Date: 2012-07-29 15:49+0100\n" "Last-Translator: Micha³ Zi±bkowski \n" "Language-Team: Grajpopolsku.pl \n" "Language: Polski\n" @@ -82,7 +82,6 @@ msgid "Remap keys" msgstr "Dostosuj klawisze" #: gui/gui-manager.cpp:129 base/main.cpp:307 -#, fuzzy msgid "Toggle FullScreen" msgstr "W³±cz/wy³±cz pe³ny ekran" @@ -196,9 +195,8 @@ msgid "Platform:" msgstr "Platforma:" #: gui/launcher.cpp:231 -#, fuzzy msgid "Engine" -msgstr "Zbadaj" +msgstr "Silnik" #: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" @@ -1197,19 +1195,18 @@ msgstr "" "sprawd¼ plik README." #: engines/dialogs.cpp:228 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Przepraszamy, ten silnik obecnie nie oferuje pomocy wewn±trz gry. Aby " -"uzyskaæ podstawowe informacje oraz dowiedzieæ jak szukaæ dalszej pomocy, " -"sprawd¼ plik README." +"Zapis stanu gry nie powiód³ siê (%s)! Aby uzyskaæ podstawowe informacje oraz " +"dowiedzieæ jak szukaæ dalszej pomocy, sprawd¼ plik README." #: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 msgid "~O~K" -msgstr "~O~K" +msgstr "" #: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 #: engines/mohawk/dialogs.cpp:175 @@ -1261,14 +1258,13 @@ msgstr "" "Dalsze informacje s± dostêpne w pliku README." #: engines/engine.cpp:426 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate load failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Przepraszamy, ten silnik obecnie nie oferuje pomocy wewn±trz gry. Aby " -"uzyskaæ podstawowe informacje oraz dowiedzieæ jak szukaæ dalszej pomocy, " -"sprawd¼ plik README." +"Odczyt stanu gry nie powiód³ siê (%s)! Aby uzyskaæ podstawowe informacje " +"oraz dowiedzieæ jak szukaæ dalszej pomocy, sprawd¼ plik README." #: engines/engine.cpp:439 msgid "" @@ -1287,12 +1283,12 @@ msgstr "W #: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" -msgstr "" +msgstr "U¿yj oryginalnych ekranów odczytu/zapisu" #: 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 "U¿yj oryginalnych ekranów odczytu/zapisu zamiast tych ze ScummVM" #: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" @@ -1303,68 +1299,68 @@ msgid "Restore" msgstr "Wznów" #: engines/dreamweb/detection.cpp:57 -#, fuzzy msgid "Use bright palette mode" -msgstr "Przedmiot u góry, z prawej" +msgstr "U¿yj trybu jasnej palety" #: engines/dreamweb/detection.cpp:58 msgid "Display graphics using the game's bright palette" -msgstr "" +msgstr "Wy¶wietlaj grafikê za pomoc± jasnej palety gry" #: engines/sci/detection.cpp:370 msgid "EGA undithering" msgstr "Anty-dithering EGA" #: engines/sci/detection.cpp:371 -#, fuzzy msgid "Enable undithering in EGA games" msgstr "W³±cz anty-dithering we wspieranych grach EGA" #: engines/sci/detection.cpp:380 -#, fuzzy msgid "Prefer digital sound effects" -msgstr "G³o¶no¶æ efektów d¼w." +msgstr "Preferuj cyfrowe efekty d¼wiêkowe" #: engines/sci/detection.cpp:381 msgid "Prefer digital sound effects instead of synthesized ones" -msgstr "" +msgstr "Preferuj cyfrowe efekty d¼wiêkowe zamiast syntezowanych" #: engines/sci/detection.cpp:400 msgid "Use IMF/Yamaha FB-01 for MIDI output" -msgstr "" +msgstr "U¿yj IMF/Yamaha FB-01 dla wyj¶cia MIDI" #: engines/sci/detection.cpp:401 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" +"U¿yj karty IBM Music Feature lub modu³u syntezy FM Yamaha FB-01 dla wyj¶cia " +"MIDI" #: engines/sci/detection.cpp:411 msgid "Use CD audio" -msgstr "" +msgstr "U¿yj CD audio" #: engines/sci/detection.cpp:412 msgid "Use CD audio instead of in-game audio, if available" -msgstr "" +msgstr "U¿yj CD audio zamiast muzyki w grze, je¶li jest dostêpne" #: engines/sci/detection.cpp:422 msgid "Use Windows cursors" -msgstr "" +msgstr "U¿yj windowsowych kursorów" #: engines/sci/detection.cpp:423 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" +"U¿yj windowsowych kursorów (mniejsze i monochromatyczne) zamiast DOS-owych" #: engines/sci/detection.cpp:433 -#, fuzzy msgid "Use silver cursors" -msgstr "Zwyk³y kursor" +msgstr "U¿yj srebrnych kursorów" #: engines/sci/detection.cpp:434 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" +"U¿yj alternatywnego zestawu srebrnych kursorów zamiast zwyk³ych z³otych" #: engines/scumm/dialogs.cpp:175 #, c-format @@ -1482,24 +1478,23 @@ msgstr "Mowa i napisy" #: engines/scumm/dialogs.cpp:653 msgid "Select a Proficiency Level." -msgstr "" +msgstr "Wybierz poziom umiejêtno¶ci." #: engines/scumm/dialogs.cpp:655 msgid "Refer to your Loom(TM) manual for help." -msgstr "" +msgstr "Pomocy szukaj w instrukcji do³±czonej do Loom(TM)." #: engines/scumm/dialogs.cpp:658 -#, fuzzy msgid "Standard" -msgstr "Standardowy (16bpp)" +msgstr "Standardowy" #: engines/scumm/dialogs.cpp:659 msgid "Practice" -msgstr "" +msgstr "Trening" #: engines/scumm/dialogs.cpp:660 msgid "Expert" -msgstr "" +msgstr "Ekspert" #: engines/scumm/help.cpp:73 msgid "Common keyboard commands:" @@ -2118,118 +2113,109 @@ msgstr "Nie uda #. Malcolm makes a joke. #: engines/kyra/detection.cpp:62 msgid "Studio audience" -msgstr "" +msgstr "Publiczno¶æ studyjna" #: engines/kyra/detection.cpp:63 msgid "Enable studio audience" -msgstr "" +msgstr "W³±cz publiczno¶æ studyjn±" #. I18N: This option allows the user to skip text and cutscenes. #: engines/kyra/detection.cpp:73 msgid "Skip support" -msgstr "" +msgstr "Obs³uga pomijania" #: engines/kyra/detection.cpp:74 msgid "Allow text and cutscenes to be skipped" -msgstr "" +msgstr "Pozwól pomijaæ tekst i przerywniki" #. I18N: Helium mode makes people sound like they've inhaled Helium. #: engines/kyra/detection.cpp:84 msgid "Helium mode" -msgstr "" +msgstr "Tryb helowy" #: engines/kyra/detection.cpp:85 -#, fuzzy msgid "Enable helium mode" -msgstr "W³±cz tryb Roland GS" +msgstr "W³±cz tryb helowy" #. 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 "P³ynne przewijanie" #: engines/kyra/detection.cpp:100 msgid "Enable smooth scrolling when walking" -msgstr "" +msgstr "W³±cz p³ynne przewijanie przy chodzeniu" #. 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 "Zwyk³y kursor" +msgstr "P³ywaj±ce kursory" #: engines/kyra/detection.cpp:113 msgid "Enable floating cursors" -msgstr "" +msgstr "W³±cz p³ywaj±ce kursory" #. I18N: HP stands for Hit Points #: engines/kyra/detection.cpp:127 msgid "HP bar graphs" -msgstr "" +msgstr "Histogramy HP" #: engines/kyra/detection.cpp:128 msgid "Enable hit point bar graphs" -msgstr "" +msgstr "W³±cz histogramy punktów ¿ycia" #: engines/kyra/lol.cpp:478 msgid "Attack 1" -msgstr "" +msgstr "Atak 1" #: engines/kyra/lol.cpp:479 msgid "Attack 2" -msgstr "" +msgstr "Atak 2" #: engines/kyra/lol.cpp:480 msgid "Attack 3" -msgstr "" +msgstr "Atak 3" #: engines/kyra/lol.cpp:481 msgid "Move Forward" -msgstr "" +msgstr "Ruch naprzód" #: engines/kyra/lol.cpp:482 msgid "Move Back" -msgstr "" +msgstr "Ruch wstecz" #: engines/kyra/lol.cpp:483 msgid "Slide Left" -msgstr "" +msgstr "¦lizg w lewo" #: engines/kyra/lol.cpp:484 -#, fuzzy msgid "Slide Right" -msgstr "W prawo" +msgstr "¦lizg w prawo" #: engines/kyra/lol.cpp:485 -#, fuzzy msgid "Turn Left" -msgstr "Wy³±cz" +msgstr "Obrót w lewo" #: engines/kyra/lol.cpp:486 -#, fuzzy msgid "Turn Right" -msgstr "Kursor w prawo" +msgstr "Obrót w prawo" #: engines/kyra/lol.cpp:487 -#, fuzzy msgid "Rest" -msgstr "Wznów" +msgstr "Odpoczynek" #: engines/kyra/lol.cpp:488 -#, fuzzy msgid "Options" -msgstr "~O~pcje" +msgstr "Opcje" #: engines/kyra/lol.cpp:489 -#, fuzzy msgid "Choose Spell" -msgstr "Wybierz" +msgstr "Wybierz zaklêcie" #: engines/kyra/sound_midi.cpp:475 -#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" @@ -2247,8 +2233,9 @@ msgid "Alternative intro" msgstr "" #: engines/queen/queen.cpp:60 +#, fuzzy msgid "Use an alternative game intro (CD version only)" -msgstr "" +msgstr "U¿yj intra z wersji dyskietkowej (tylko dla wersji CD)" #: engines/sky/compact.cpp:130 msgid "" @@ -2268,16 +2255,18 @@ msgstr "" #: engines/sky/detection.cpp:44 msgid "Floppy intro" -msgstr "" +msgstr "Intro z wersji dyskietkowej" #: engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" -msgstr "" +msgstr "U¿yj intra z wersji dyskietkowej (tylko dla wersji CD)" #: engines/sword1/animation.cpp:539 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" msgstr "" +"Przerywnik w formacie strumieniowym PSX '%s' nie mo¿e zostaæ odtworzony w " +"trybie indeksowanym" #: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 msgid "DXA cutscenes found but ScummVM has been built without zlib support" @@ -2334,20 +2323,19 @@ msgid "This is the end of the Broken Sword 1 Demo" msgstr "To koniec dema Broken Sword 1" #: engines/sword2/animation.cpp:435 -#, fuzzy msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" -"Znaleziono przerywniki w formacie DXA, ale ScummVM jest skompilowany bez " -"obs³ugi zlib" +"Znaleziono przerywniki PSX, ale ScummVM jest skompilowany bez obs³ugi trybu " +"RGB" #: engines/sword2/sword2.cpp:79 msgid "Show object labels" -msgstr "" +msgstr "Poka¿ etykiety obiektów" #: engines/sword2/sword2.cpp:80 msgid "Show labels for objects on mouse hover" -msgstr "" +msgstr "Poka¿ etykiety obiektów przy najechaniu myszk±" #: engines/teenagent/resources.cpp:68 msgid "" @@ -2499,9 +2487,8 @@ msgid "Keymap:" msgstr "Klawisze:" #: backends/keymapper/remap-dialog.cpp:66 -#, fuzzy msgid " (Effective)" -msgstr " (Aktywny)" +msgstr " (Dzia³a)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Active)" @@ -2509,7 +2496,7 @@ msgstr " (Aktywny)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Blocked)" -msgstr "" +msgstr " (Zablokowany)" #: backends/keymapper/remap-dialog.cpp:119 msgid " (Global)" @@ -2613,7 +2600,7 @@ msgstr "Tryb touchpada wy #: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" -msgstr "" +msgstr "Tryb klikania" #: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 @@ -2624,9 +2611,8 @@ msgid "Left Click" msgstr "Klikniêcie LPM" #: backends/platform/maemo/maemo.cpp:218 -#, fuzzy msgid "Middle Click" -msgstr "Przedmiot na ¶rodku, z lewej" +msgstr "¦rodkowy przycisk" #: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 -- cgit v1.2.3 From e55018ffdb8809574def41cd45f1f0b43dbf0b3c Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Wed, 15 Aug 2012 21:34:55 +0100 Subject: I18N: Update Hungarian translation from patch #3557212 --- po/hu_HU.po | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/po/hu_HU.po b/po/hu_HU.po index a34138c1bf..b263d2c539 100644 --- a/po/hu_HU.po +++ b/po/hu_HU.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: ScummVM 1.3.0svn\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-08-12 14:57+0200\n" -"PO-Revision-Date: 2012-07-09 05:58+0100\n" +"PO-Revision-Date: 2012-08-14 07:29+0100\n" "Last-Translator: George Kormendi \n" "Language-Team: Hungarian\n" "Language: Magyar\n" @@ -921,11 +921,11 @@ msgstr "" #: gui/saveload-dialog.cpp:158 msgid "List view" -msgstr "" +msgstr "Lista nézet" #: gui/saveload-dialog.cpp:159 msgid "Grid view" -msgstr "" +msgstr "Rács nézet" #: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" @@ -965,31 +965,28 @@ msgstr "N #: gui/saveload-dialog.cpp:517 msgid "Next" -msgstr "" +msgstr "Következõ" #: gui/saveload-dialog.cpp:520 msgid "Prev" -msgstr "" +msgstr "Elõzõ" #: gui/saveload-dialog.cpp:684 -#, fuzzy msgid "New Save" -msgstr "Mentés" +msgstr "Új Mentés" #: gui/saveload-dialog.cpp:684 -#, fuzzy msgid "Create a new save game" -msgstr "Játék mentés nem sikerült" +msgstr "Új játékmentés készítése" #: gui/saveload-dialog.cpp:789 -#, fuzzy msgid "Name: " msgstr "Név:" #: gui/saveload-dialog.cpp:861 #, c-format msgid "Enter a description for slot %d:" -msgstr "" +msgstr "Adj meg egy leírást a %d slothoz:" #: gui/themebrowser.cpp:44 msgid "Select a Theme" @@ -2230,12 +2227,11 @@ msgstr "" #: engines/queen/queen.cpp:59 msgid "Alternative intro" -msgstr "" +msgstr "Alternatív intro" #: engines/queen/queen.cpp:60 -#, fuzzy msgid "Use an alternative game intro (CD version only)" -msgstr "A floppy verzió intro használata (csak CD verziónál)" +msgstr "Alternatív játékintro használata (csak CD verziónál)" #: engines/sky/compact.cpp:130 msgid "" @@ -2336,13 +2332,15 @@ msgstr "T #: engines/teenagent/resources.cpp:68 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" -msgstr "" +msgstr "Hiányzik a 'teenagent.dat' fájl. Szerezd be a ScummVM website-ról" #: engines/teenagent/resources.cpp:89 msgid "" "The teenagent.dat file is compressed and zlib hasn't been included in this " "executable. Please decompress it" msgstr "" +"A teenagent.dat fájl tömörített és a zlib nem része ennek a futtatható " +"állománynak. Kérlek tömörítsd ki" #: engines/parallaction/saveload.cpp:133 #, c-format -- cgit v1.2.3 From 037cdaefac98fe6c8e541c86075ae5d8696934cb Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Wed, 15 Aug 2012 21:35:28 +0100 Subject: I18N: Regenerate translations data file --- gui/themes/translations.dat | Bin 342397 -> 345659 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index cabad0c0c4..d81c1a0475 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From e7ae58f2e47b32b77c9165d73e7e8a556bd710b5 Mon Sep 17 00:00:00 2001 From: David-John Willis Date: Thu, 16 Aug 2012 10:54:39 +0100 Subject: CONFIGURE: Set DISABLE_SAVELOADCHOOSER_GRID for the GPH backend. * Move some backend settings from the host selection to the backend. * Also remove stale referances to the old GP2X backend. --- configure | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/configure b/configure index 06492ff305..d4fec02c64 100755 --- a/configure +++ b/configure @@ -712,7 +712,7 @@ Usage: $0 [OPTIONS]... Configuration: -h, --help display this help and exit - --backend=BACKEND backend to build (android, bada, dc, dingux, ds, gp2x, gph, + --backend=BACKEND backend to build (android, bada, dc, dingux, ds, gph, iphone, linuxmoto, maemo, n64, null, openpandora, ps2, psp, samsungtv, sdl, webos, wii, wince) [sdl] @@ -2202,13 +2202,8 @@ if test -n "$_host"; then bfin*) ;; caanoo) - # This uses the GPH backend. - DEFINES="$DEFINES -DGPH_DEVICE" DEFINES="$DEFINES -DCAANOO" - DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" - if test "$_debug_build" = yes; then - DEFINES="$DEFINES -DGPH_DEBUG" - else + if test "$_debug_build" = no; then # Use -O3 on the Caanoo for non-debug builds. _optimization_level=-O3 fi @@ -2299,13 +2294,7 @@ if test -n "$_host"; then add_line_to_config_h "#define USE_WII_DI" ;; gp2x) - # This uses the GPH backend. - DEFINES="$DEFINES -DGPH_DEVICE" DEFINES="$DEFINES -DGP2X" - DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" - if test "$_debug_build" = yes; then - DEFINES="$DEFINES -DGPH_DEBUG" - fi CXXFLAGS="$CXXFLAGS -march=armv4t" ASFLAGS="$ASFLAGS -mfloat-abi=soft" LDFLAGS="$LDFLAGS -static" @@ -2319,13 +2308,7 @@ if test -n "$_host"; then _port_mk="backends/platform/gph/gp2x-bundle.mk" ;; gp2xwiz) - # This uses the GPH backend. - DEFINES="$DEFINES -DGPH_DEVICE" DEFINES="$DEFINES -DGP2XWIZ" - DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" - if test "$_debug_build" = yes; then - DEFINES="$DEFINES -DGPH_DEBUG" - fi CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s" CXXFLAGS="$CXXFLAGS -mtune=arm926ej-s" ASFLAGS="$ASFLAGS -mfloat-abi=soft" @@ -2611,9 +2594,14 @@ case $_backend in INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/ds/commoninclude' INCLUDES="$INCLUDES "'-Ibackends/platform/ds/arm9/data' ;; - gp2x) - ;; gph) + # On the GPH devices we want fancy themes but do not want the load/save thumbnail grid. + DEFINES="$DEFINES -DDISABLE_SAVELOADCHOOSER_GRID" + DEFINES="$DEFINES -DGPH_DEVICE" + DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" + if test "$_debug_build" = yes; then + DEFINES="$DEFINES -DGPH_DEBUG" + fi ;; iphone) LIBS="$LIBS -lobjc -framework UIKit -framework CoreGraphics -framework OpenGLES" @@ -2709,7 +2697,7 @@ MODULES="$MODULES backends/platform/$_backend" # Setup SDL specifics for SDL based backends # case $_backend in - dingux | gp2x | gph | linuxmoto | maemo | openpandora | samsungtv | sdl) + dingux | gph | linuxmoto | maemo | openpandora | samsungtv | sdl) find_sdlconfig INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" -- cgit v1.2.3 From 7294a1cbcf1cf5e8c846faf8838e537bd8c638dc Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 16 Aug 2012 12:17:23 -0400 Subject: VIDEO: Remove the Coktel video code from using the VideoDecoder API After discussing with DrMcCoy, we felt this the best way to proceed. A wrapper class that implements AdvancedVideoDecoder is still around for use in SCI. --- engines/sci/console.cpp | 5 +- engines/sci/engine/kvideo.cpp | 7 +- video/coktel_decoder.cpp | 166 ++++++++++++++++++++++++++++++++++-------- video/coktel_decoder.h | 116 +++++++++++++++++++++++------ 4 files changed, 231 insertions(+), 63 deletions(-) diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 9b5ef35e92..de852ca9c0 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -253,7 +253,7 @@ void Console::postEnter() { videoDecoder = new SEQDecoder(_videoFrameDelay); #ifdef ENABLE_SCI32 } else if (_videoFile.hasSuffix(".vmd")) { - videoDecoder = new Video::VMDDecoder(g_system->getMixer()); + videoDecoder = new Video::AdvancedVMDDecoder(); } else if (_videoFile.hasSuffix(".rbt")) { videoDecoder = new RobotDecoder(_engine->getPlatform() == Common::kPlatformMacintosh); } else if (_videoFile.hasSuffix(".duk")) { @@ -267,8 +267,7 @@ void Console::postEnter() { } if (videoDecoder && videoDecoder->loadFile(_videoFile)) { - if (!_videoFile.hasSuffix(".vmd")) // TODO: Remove after new API is complete - ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); _engine->_gfxCursor->kernelHide(); diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index da63aa3a8d..3e0f35c037 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -50,6 +50,8 @@ void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) { if (!videoDecoder) return; + ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); + byte *scaleBuffer = 0; byte bytesPerPixel = videoDecoder->getPixelFormat().bytesPerPixel; uint16 width = videoDecoder->getWidth(); @@ -219,7 +221,6 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) { } if (videoDecoder) { - ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); // TODO: Remove after new API is complete playVideo(videoDecoder, s->_videoState); // HACK: Switch back to 8bpp if we played a true color video. @@ -349,7 +350,7 @@ reg_t kPlayVMD(EngineState *s, int argc, reg_t *argv) { break; } case 6: // Play - videoDecoder = new Video::VMDDecoder(g_system->getMixer()); + videoDecoder = new Video::AdvancedVMDDecoder(); if (s->_videoState.fileName.empty()) { // Happens in Lighthouse @@ -414,8 +415,6 @@ reg_t kPlayDuck(EngineState *s, int argc, reg_t *argv) { break; } - ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); - if (reshowCursor) g_sci->_gfxCursor->kernelHide(); diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp index 0c7ade1b8a..42033fb01f 100644 --- a/video/coktel_decoder.cpp +++ b/video/coktel_decoder.cpp @@ -53,7 +53,8 @@ CoktelDecoder::CoktelDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundT _mixer(mixer), _soundType(soundType), _width(0), _height(0), _x(0), _y(0), _defaultX(0), _defaultY(0), _features(0), _frameCount(0), _paletteDirty(false), _ownSurface(true), _frameRate(12), _hasSound(false), _soundEnabled(false), - _soundStage(kSoundNone), _audioStream(0) { + _soundStage(kSoundNone), _audioStream(0), _startTime(0), _pauseStartTime(0), + _isPaused(false) { assert(_mixer); @@ -261,6 +262,10 @@ bool CoktelDecoder::isPaletted() const { return true; } +int CoktelDecoder::getCurFrame() const { + return _curFrame; +} + void CoktelDecoder::close() { disableSound(); freeSurface(); @@ -273,9 +278,14 @@ void CoktelDecoder::close() { _features = 0; - _frameCount = 0; + _curFrame = -1; + _frameCount = 0; + + _startTime = 0; _hasSound = false; + + _isPaused = false; } uint16 CoktelDecoder::getWidth() const { @@ -291,6 +301,7 @@ uint32 CoktelDecoder::getFrameCount() const { } const byte *CoktelDecoder::getPalette() { + _paletteDirty = false; return _palette; } @@ -625,14 +636,45 @@ Common::Rational CoktelDecoder::getFrameRate() const { return _frameRate; } +uint32 CoktelDecoder::getTimeToNextFrame() const { + if (endOfVideo() || _curFrame < 0) + return 0; + + uint32 elapsedTime = g_system->getMillis() - _startTime; + uint32 nextFrameStartTime = (Common::Rational((_curFrame + 1) * 1000) / getFrameRate()).toInt(); + + if (nextFrameStartTime <= elapsedTime) + return 0; + + return nextFrameStartTime - elapsedTime; +} + uint32 CoktelDecoder::getStaticTimeToNextFrame() const { return (1000 / _frameRate).toInt(); } +void CoktelDecoder::pauseVideo(bool pause) { + if (_isPaused != pause) { + if (_isPaused) { + // Add the time we were paused to the initial starting time + _startTime += g_system->getMillis() - _pauseStartTime; + } else { + // Store the time we paused for use later + _pauseStartTime = g_system->getMillis(); + } + + _isPaused = pause; + } +} + inline void CoktelDecoder::unsignedToSigned(byte *buffer, int length) { while (length-- > 0) *buffer++ ^= 0x80; } +bool CoktelDecoder::endOfVideo() const { + return !isVideoLoaded() || (getCurFrame() >= (int32)getFrameCount() - 1); +} + PreIMDDecoder::PreIMDDecoder(uint16 width, uint16 height, Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : CoktelDecoder(mixer, soundType), @@ -705,8 +747,6 @@ bool PreIMDDecoder::loadStream(Common::SeekableReadStream *stream) { } void PreIMDDecoder::close() { - reset(); - CoktelDecoder::close(); delete _stream; @@ -1159,8 +1199,6 @@ bool IMDDecoder::loadFrameTables(uint32 framePosPos, uint32 frameCoordsPos) { } void IMDDecoder::close() { - reset(); - CoktelDecoder::close(); delete _stream; @@ -1225,8 +1263,6 @@ void IMDDecoder::processFrame() { _dirtyRects.clear(); - _paletteDirty = false; - uint32 cmd = 0; bool hasNextCmd = false; bool startSound = false; @@ -1273,7 +1309,7 @@ void IMDDecoder::processFrame() { // Set palette if (cmd == kCommandPalette) { _stream->skip(2); - + _paletteDirty = true; for (int i = 0; i < 768; i++) @@ -1322,7 +1358,7 @@ void IMDDecoder::processFrame() { // Start the audio stream if necessary if (startSound && _soundEnabled) { _mixer->playStream(_soundType, &_audioHandle, _audioStream, - -1, getVolume(), getBalance(), DisposeAfterUse::NO); + -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); _soundStage = kSoundPlaying; } @@ -1504,16 +1540,6 @@ 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; @@ -1552,7 +1578,7 @@ VMDDecoder::VMDDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : _soundLastFilledFrame(0), _audioFormat(kAudioFormat8bitRaw), _hasVideo(false), _videoCodec(0), _blitMode(0), _bytesPerPixel(0), _firstFramePos(0), _videoBufferSize(0), _externalCodec(false), _codec(0), - _subtitle(-1), _isPaletted(true) { + _subtitle(-1), _isPaletted(true), _autoStartSound(true) { _videoBuffer [0] = 0; _videoBuffer [1] = 0; @@ -2014,8 +2040,6 @@ bool VMDDecoder::readFiles() { } void VMDDecoder::close() { - reset(); - CoktelDecoder::close(); delete _stream; @@ -2095,7 +2119,6 @@ void VMDDecoder::processFrame() { _dirtyRects.clear(); - _paletteDirty = false; _subtitle = -1; bool startSound = false; @@ -2215,8 +2238,9 @@ void VMDDecoder::processFrame() { if (startSound && _soundEnabled) { if (_hasSound && _audioStream) { - _mixer->playStream(_soundType, &_audioHandle, _audioStream, - -1, getVolume(), getBalance(), DisposeAfterUse::NO); + if (_autoStartSound) + _mixer->playStream(_soundType, &_audioHandle, _audioStream, + -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); _soundStage = kSoundPlaying; } else _soundStage = kSoundNone; @@ -2742,14 +2766,92 @@ bool VMDDecoder::isPaletted() const { return _isPaletted; } -void VMDDecoder::updateVolume() { - if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) - g_system->getMixer()->setChannelVolume(_audioHandle, getVolume()); +void VMDDecoder::setAutoStartSound(bool autoStartSound) { + _autoStartSound = autoStartSound; +} + +AdvancedVMDDecoder::AdvancedVMDDecoder(Audio::Mixer::SoundType soundType) { + _decoder = new VMDDecoder(g_system->getMixer(), soundType); + _decoder->setAutoStartSound(false); +} + +AdvancedVMDDecoder::~AdvancedVMDDecoder() { + close(); + delete _decoder; +} + +bool AdvancedVMDDecoder::loadStream(Common::SeekableReadStream *stream) { + close(); + + if (!_decoder->loadStream(stream)) + return false; + + if (_decoder->hasVideo()) { + _videoTrack = new VMDVideoTrack(_decoder); + addTrack(_videoTrack); + } + + if (_decoder->hasSound()) { + _audioTrack = new VMDAudioTrack(_decoder); + addTrack(_audioTrack); + } + + return true; +} + +void AdvancedVMDDecoder::close() { + AdvancedVideoDecoder::close(); + _decoder->close(); +} + +AdvancedVMDDecoder::VMDVideoTrack::VMDVideoTrack(VMDDecoder *decoder) : _decoder(decoder) { +} + +uint16 AdvancedVMDDecoder::VMDVideoTrack::getWidth() const { + return _decoder->getWidth(); +} + +uint16 AdvancedVMDDecoder::VMDVideoTrack::getHeight() const { + return _decoder->getHeight(); +} + +Graphics::PixelFormat AdvancedVMDDecoder::VMDVideoTrack::getPixelFormat() const { + return _decoder->getPixelFormat(); +} + +int AdvancedVMDDecoder::VMDVideoTrack::getCurFrame() const { + return _decoder->getCurFrame(); +} + +int AdvancedVMDDecoder::VMDVideoTrack::getFrameCount() const { + return _decoder->getFrameCount(); +} + +const Graphics::Surface *AdvancedVMDDecoder::VMDVideoTrack::decodeNextFrame() { + return _decoder->decodeNextFrame(); +} + +const byte *AdvancedVMDDecoder::VMDVideoTrack::getPalette() const { + return _decoder->getPalette(); +} + +bool AdvancedVMDDecoder::VMDVideoTrack::hasDirtyPalette() const { + return _decoder->hasDirtyPalette(); +} + +Common::Rational AdvancedVMDDecoder::VMDVideoTrack::getFrameRate() const { + return _decoder->getFrameRate(); +} + +AdvancedVMDDecoder::VMDAudioTrack::VMDAudioTrack(VMDDecoder *decoder) : _decoder(decoder) { +} + +Audio::Mixer::SoundType AdvancedVMDDecoder::VMDAudioTrack::getSoundType() const { + return _decoder->_soundType; } -void VMDDecoder::updateBalance() { - if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) - g_system->getMixer()->setChannelBalance(_audioHandle, getBalance()); +Audio::AudioStream *AdvancedVMDDecoder::VMDAudioTrack::getAudioStream() const { + return _decoder->_audioStream; } } // End of namespace Video diff --git a/video/coktel_decoder.h b/video/coktel_decoder.h index c88d982191..117a55658f 100644 --- a/video/coktel_decoder.h +++ b/video/coktel_decoder.h @@ -64,7 +64,7 @@ class Codec; * - gob * - sci */ -class CoktelDecoder : public FixedRateVideoDecoder { +class CoktelDecoder { public: struct State { /** Set accordingly to what was done. */ @@ -77,7 +77,7 @@ public: CoktelDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); - ~CoktelDecoder(); + virtual ~CoktelDecoder(); /** Replace the current video stream with this identical one. */ virtual bool reloadStream(Common::SeekableReadStream *stream) = 0; @@ -138,21 +138,47 @@ public: /** Is the video paletted or true color? */ virtual bool isPaletted() const; + /** + * Get the current frame + * @see VideoDecoder::getCurFrame() + */ + int getCurFrame() const; - // VideoDecoder interface + /** + * Decode the next frame + * @see VideoDecoder::decodeNextFrame() + */ + virtual const Graphics::Surface *decodeNextFrame() = 0; + /** + * Load a video from a stream + * @see VideoDecoder::loadStream() + */ + virtual bool loadStream(Common::SeekableReadStream *stream) = 0; + + /** Has a video been loaded? */ + virtual bool isVideoLoaded() const = 0; + + /** Has the end of the video been reached? */ + bool endOfVideo() const; + + /** Close the video. */ void close(); uint16 getWidth() const; uint16 getHeight() const; + virtual Graphics::PixelFormat getPixelFormat() const = 0; uint32 getFrameCount() const; const byte *getPalette(); bool hasDirtyPalette() const; + uint32 getTimeToNextFrame() const; uint32 getStaticTimeToNextFrame() const; + void pauseVideo(bool pause); + protected: enum SoundStage { kSoundNone = 0, ///< No sound. @@ -186,8 +212,11 @@ protected: uint32 _features; + int32 _curFrame; uint32 _frameCount; + uint32 _startTime; + byte _palette[768]; bool _paletteDirty; @@ -208,6 +237,8 @@ protected: bool evaluateSeekFrame(int32 &frame, int whence) const; + Common::Rational getFrameRate() const; + // Surface management bool hasSurface(); void createSurface(); @@ -228,10 +259,9 @@ protected: // Sound helper functions inline void unsignedToSigned(byte *buffer, int length); - - // FixedRateVideoDecoder interface - - Common::Rational getFrameRate() const; +private: + uint32 _pauseStartTime; + bool _isPaused; }; class PreIMDDecoder : public CoktelDecoder { @@ -244,9 +274,6 @@ public: bool seek(int32 frame, int whence = SEEK_SET, bool restart = false); - - // VideoDecoder interface - bool loadStream(Common::SeekableReadStream *stream); void close(); @@ -279,9 +306,6 @@ public: void setXY(uint16 x, uint16 y); - - // VideoDecoder interface - bool loadStream(Common::SeekableReadStream *stream); void close(); @@ -291,11 +315,6 @@ public: Graphics::PixelFormat getPixelFormat() const; -protected: - // VideoDecoder API - void updateVolume(); - void updateBalance(); - private: enum Command { kCommandNextSound = 0xFF00, @@ -367,6 +386,8 @@ private: }; class VMDDecoder : public CoktelDecoder { +friend class AdvancedVMDDecoder; + public: VMDDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); ~VMDDecoder(); @@ -390,9 +411,6 @@ public: bool hasVideo() const; bool isPaletted() const; - - // VideoDecoder interface - bool loadStream(Common::SeekableReadStream *stream); void close(); @@ -403,9 +421,7 @@ public: Graphics::PixelFormat getPixelFormat() const; protected: - // VideoDecoder API - void updateVolume(); - void updateBalance(); + void setAutoStartSound(bool autoStartSound); private: enum PartType { @@ -478,6 +494,7 @@ private: uint32 _soundDataSize; uint32 _soundLastFilledFrame; AudioFormat _audioFormat; + bool _autoStartSound; // Video properties bool _hasVideo; @@ -532,6 +549,57 @@ private: bool getPartCoords(int16 frame, PartType type, int16 &x, int16 &y, int16 &width, int16 &height); }; +/** + * A wrapper around the VMD code that implements the AdvancedVideoDecoder + * API. + */ +class AdvancedVMDDecoder : public AdvancedVideoDecoder { +public: + AdvancedVMDDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); + ~AdvancedVMDDecoder(); + + bool loadStream(Common::SeekableReadStream *stream); + void close(); + +private: + class VMDVideoTrack : public FixedRateVideoTrack { + public: + VMDVideoTrack(VMDDecoder *decoder); + + uint16 getWidth() const; + uint16 getHeight() const; + Graphics::PixelFormat getPixelFormat() const; + int getCurFrame() const; + int getFrameCount() const; + const Graphics::Surface *decodeNextFrame(); + const byte *getPalette() const; + bool hasDirtyPalette() const; + + protected: + Common::Rational getFrameRate() const; + + private: + VMDDecoder *_decoder; + }; + + class VMDAudioTrack : public AudioTrack { + public: + VMDAudioTrack(VMDDecoder *decoder); + + Audio::Mixer::SoundType getSoundType() const; + + protected: + virtual Audio::AudioStream *getAudioStream() const; + + private: + VMDDecoder *_decoder; + }; + + VMDDecoder *_decoder; + VMDVideoTrack *_videoTrack; + VMDAudioTrack *_audioTrack; +}; + } // End of namespace Video #endif // VIDEO_COKTELDECODER_H -- cgit v1.2.3 From 9e7f0e4753636ace510d626be4b0ee22ab682269 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 16 Aug 2012 12:27:05 -0400 Subject: VIDEO: Begin removing some of the deprecated functions from VideoDecoder --- video/video_decoder.cpp | 40 +++++----------------------------------- video/video_decoder.h | 37 ++----------------------------------- 2 files changed, 7 insertions(+), 70 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 0108888613..a7d3789b65 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -34,7 +34,10 @@ namespace Video { VideoDecoder::VideoDecoder() { - reset(); + _startTime = 0; + _pauseLevel = 0; + _audioVolume = Audio::Mixer::kMaxChannelVolume; + _audioBalance = 0; } bool VideoDecoder::loadFile(const Common::String &filename) { @@ -74,7 +77,7 @@ void VideoDecoder::pauseVideo(bool pause) { pauseVideoIntern(true); } else if (_pauseLevel == 0) { pauseVideoIntern(false); - addPauseTime(g_system->getMillis() - _pauseStartTime); + _startTime += (g_system->getMillis() - _pauseStartTime); } } @@ -701,41 +704,8 @@ void AdvancedVideoDecoder::startAudioLimit(const Audio::Timestamp &limit) { ///////////////// DEPRECATED ///////////////// ////////////////////////////////////////////// -void VideoDecoder::reset() { - _curFrame = -1; - _startTime = 0; - _pauseLevel = 0; - _audioVolume = Audio::Mixer::kMaxChannelVolume; - _audioBalance = 0; -} - -bool VideoDecoder::endOfVideo() const { - return !isVideoLoaded() || (getCurFrame() >= (int32)getFrameCount() - 1); -} - void VideoDecoder::setSystemPalette() { g_system->getPaletteManager()->setPalette(getPalette(), 0, 256); } -uint32 FixedRateVideoDecoder::getTimeToNextFrame() const { - if (endOfVideo() || _curFrame < 0) - return 0; - - uint32 elapsedTime = getTime(); - uint32 nextFrameStartTime = getFrameBeginTime(_curFrame + 1); - - // If the time that the next frame should be shown has past - // the frame should be shown ASAP. - if (nextFrameStartTime <= elapsedTime) - return 0; - - return nextFrameStartTime - elapsedTime; -} - -uint32 FixedRateVideoDecoder::getFrameBeginTime(uint32 frame) const { - Common::Rational beginTime = frame * 1000; - beginTime /= getFrameRate(); - return beginTime.toInt(); -} - } // End of namespace Video diff --git a/video/video_decoder.h b/video/video_decoder.h index 7e89caee40..0135425bac 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -124,7 +124,7 @@ public: * Returns the current frame number of the video. * @return the last frame decoded by the video */ - virtual int32 getCurFrame() const { return _curFrame; } + virtual int32 getCurFrame() const = 0; /** * Returns the number of frames in the video. @@ -173,7 +173,7 @@ public: * Returns if the video has finished playing or not. * @return true if the video has finished playing or if none is loaded, false otherwise */ - virtual bool endOfVideo() const; + virtual bool endOfVideo() const = 0; /** * Pause or resume the video. This should stop/resume any audio playback @@ -228,12 +228,6 @@ public: virtual void setBalance(int8 balance); protected: - /** - * Resets _curFrame and _startTime. Should be called from every close() function. - * @note This function is now deprecated. There is no replacement. - */ - void reset(); - /** * Actual implementation of pause by subclasses. See pause() * for details. @@ -241,12 +235,6 @@ protected: */ virtual void pauseVideoIntern(bool pause) {} - /** - * Add the time the video has been paused to maintain sync - * @note This function is now deprecated. There is no replacement. - */ - virtual void addPauseTime(uint32 ms) { _startTime += ms; } - /** * Reset the pause start time (which should be called when seeking) */ @@ -264,7 +252,6 @@ protected: */ virtual void updateBalance() {} - int32 _curFrame; // This variable is now deprecated. int32 _startTime; // FIXME: These are protected until the new API takes over this one @@ -797,26 +784,6 @@ private: void startAudioLimit(const Audio::Timestamp &limit); }; -/** - * A VideoDecoder wrapper that implements getTimeToNextFrame() based on getFrameRate(). - * @note This class is now deprecated. Use AdvancedVideoDecoder instead. - */ -class FixedRateVideoDecoder : public virtual VideoDecoder { -public: - uint32 getTimeToNextFrame() const; - -protected: - /** - * Return the frame rate in frames per second. - * This returns a Rational because videos can have rates that are not integers and - * there are some videos with frame rates < 1. - */ - virtual Common::Rational getFrameRate() const = 0; - -private: - uint32 getFrameBeginTime(uint32 frame) const; -}; - } // End of namespace Video #endif -- cgit v1.2.3 From fb35c7f46f986a22235638e2946ba8492e735109 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 16 Aug 2012 13:30:32 -0400 Subject: VIDEO: Remove setSystemPalette() --- engines/agos/animation.cpp | 4 ++-- engines/mohawk/video.cpp | 3 ++- engines/saga/introproc_saga2.cpp | 3 ++- engines/sci/graphics/frameout.cpp | 5 +++-- engines/sword1/animation.cpp | 2 +- engines/sword2/animation.cpp | 4 +++- engines/toon/movie.cpp | 3 ++- video/video_decoder.cpp | 8 -------- video/video_decoder.h | 7 ------- 9 files changed, 15 insertions(+), 24 deletions(-) diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index ec8293c91f..8fc93e4153 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -278,7 +278,7 @@ void MoviePlayerDXA::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { } while (--h); if (hasDirtyPalette()) - setSystemPalette(); + g_system->getPaletteManager()->setPalette(getPalette(), 0, 256); } void MoviePlayerDXA::playVideo() { @@ -445,7 +445,7 @@ void MoviePlayerSMK::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { } while (--h); if (hasDirtyPalette()) - setSystemPalette(); + g_system->getPaletteManager()->setPalette(getPalette(), 0, 256); } void MoviePlayerSMK::playVideo() { diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index 5b811382ff..13adfcb1cd 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -29,6 +29,7 @@ #include "common/textconsole.h" #include "common/system.h" +#include "graphics/palette.h" #include "graphics/surface.h" #include "video/qt_decoder.h" @@ -238,7 +239,7 @@ bool VideoManager::updateMovies() { frame = convertedFrame; } else if (pixelFormat.bytesPerPixel == 1 && _videoStreams[i]->hasDirtyPalette()) { // Set the palette when running in 8bpp mode only - _videoStreams[i]->setSystemPalette(); + _vm->_system->getPaletteManager()->setPalette(_videoStreams[i]->getPalette(), 0, 256); } // Clip the width/height to make sure we stay on the screen (Myst does this a few times) diff --git a/engines/saga/introproc_saga2.cpp b/engines/saga/introproc_saga2.cpp index 15f7f4dc15..260eca98e6 100644 --- a/engines/saga/introproc_saga2.cpp +++ b/engines/saga/introproc_saga2.cpp @@ -32,6 +32,7 @@ #include "common/keyboard.h" #include "common/system.h" #include "common/textconsole.h" +#include "graphics/palette.h" #include "graphics/surface.h" #include "video/smk_decoder.h" @@ -110,7 +111,7 @@ void Scene::playMovie(const char *filename) { _vm->_system->copyRectToScreen(frame->pixels, frame->pitch, x, y, frame->w, frame->h); if (smkDecoder->hasDirtyPalette()) - smkDecoder->setSystemPalette(); + _vm->_system->getPaletteManager()->setPalette(smkDecoder->getPalette(), 0, 256); _vm->_system->updateScreen(); } diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index fedae2eb6f..0056f6c78b 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -28,6 +28,7 @@ #include "common/system.h" #include "common/textconsole.h" #include "engines/engine.h" +#include "graphics/palette.h" #include "graphics/surface.h" #include "sci/sci.h" @@ -494,7 +495,7 @@ void GfxFrameout::showVideo() { uint16 y = videoDecoder->getPos().y; if (videoDecoder->hasDirtyPalette()) - videoDecoder->setSystemPalette(); + g_system->getPaletteManager()->setPalette(videoDecoder->getPalette(), 0, 256); while (!g_engine->shouldQuit() && !videoDecoder->endOfVideo() && !skipVideo) { if (videoDecoder->needsUpdate()) { @@ -503,7 +504,7 @@ void GfxFrameout::showVideo() { g_system->copyRectToScreen(frame->pixels, frame->pitch, x, y, frame->w, frame->h); if (videoDecoder->hasDirtyPalette()) - videoDecoder->setSystemPalette(); + g_system->getPaletteManager()->setPalette(videoDecoder->getPalette(), 0, 256); g_system->updateScreen(); } diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index 70f1e5dc03..98725a302a 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -312,7 +312,7 @@ bool MoviePlayer::playVideo() { } if (_decoder->hasDirtyPalette()) { - _decoder->setSystemPalette(); + _vm->_system->getPaletteManager()->setPalette(_decoder->getPalette(), 0, 256); if (!_movieTexts.empty()) { // Look for the best color indexes to use to display the subtitles diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index e603925e73..24b52cd85a 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -38,6 +38,8 @@ #include "sword2/screen.h" #include "sword2/animation.h" +#include "graphics/palette.h" + #include "gui/message.h" #include "video/dxa_decoder.h" @@ -330,7 +332,7 @@ bool MoviePlayer::playVideo() { } if (_decoder->hasDirtyPalette()) { - _decoder->setSystemPalette(); + _vm->_system->getPaletteManager()->setPalette(_decoder->getPalette(), 0, 256); uint32 maxWeight = 0; uint32 minWeight = 0xFFFFFFFF; diff --git a/engines/toon/movie.cpp b/engines/toon/movie.cpp index d988a3ed60..8c85e20f7c 100644 --- a/engines/toon/movie.cpp +++ b/engines/toon/movie.cpp @@ -25,6 +25,7 @@ #include "common/keyboard.h" #include "common/stream.h" #include "common/system.h" +#include "graphics/palette.h" #include "graphics/surface.h" #include "toon/audio.h" @@ -126,7 +127,7 @@ bool Movie::playVideo(bool isFirstIntroVideo) { } } } - _decoder->setSystemPalette(); + _vm->_system->getPaletteManager()->setPalette(_decoder->getPalette(), 0, 256); _vm->_system->updateScreen(); } diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index a7d3789b65..1ead6af54e 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -700,12 +700,4 @@ void AdvancedVideoDecoder::startAudioLimit(const Audio::Timestamp &limit) { ((AudioTrack *)*it)->start(limit); } -////////////////////////////////////////////// -///////////////// DEPRECATED ///////////////// -////////////////////////////////////////////// - -void VideoDecoder::setSystemPalette() { - g_system->getPaletteManager()->setPalette(getPalette(), 0, 256); -} - } // End of namespace Video diff --git a/video/video_decoder.h b/video/video_decoder.h index 0135425bac..72be634f17 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -113,13 +113,6 @@ public: */ virtual bool hasDirtyPalette() const { return false; } - /** - * Set the system palette to the palette returned by getPalette. - * @see getPalette - * @note This function is now deprecated. There is no replacement. - */ - void setSystemPalette(); - /** * Returns the current frame number of the video. * @return the last frame decoded by the video -- cgit v1.2.3 From 7569ec7dc00e95e0643cde7f413a7cf46a4770f0 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 16 Aug 2012 13:34:28 -0400 Subject: VIDEO: Rename setStopTime() to setEndTime() To better differentiate with stop() --- engines/mohawk/video.cpp | 2 +- video/video_decoder.cpp | 26 +++++++++++++------------- video/video_decoder.h | 10 +++++----- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index 13adfcb1cd..0ed4f38b53 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -514,7 +514,7 @@ bool VideoManager::isVideoPlaying() { void VideoManager::setVideoBounds(VideoHandle handle, Audio::Timestamp start, Audio::Timestamp end) { assert(handle != NULL_VID_HANDLE); _videoStreams[handle].start = start; - _videoStreams[handle]->setStopTime(end); + _videoStreams[handle]->setEndTime(end); _videoStreams[handle]->seek(start); } diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 1ead6af54e..fc4d7e1ae7 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -106,8 +106,8 @@ AdvancedVideoDecoder::AdvancedVideoDecoder() { _pauseLevel = 0; _needsUpdate = false; _lastTimeChange = 0; - _stopTime = 0; - _stopTimeSet = false; + _endTime = 0; + _endTimeSet = false; // Find the best format for output _defaultHighColorFormat = g_system->getScreenFormat(); @@ -133,8 +133,8 @@ void AdvancedVideoDecoder::close() { _pauseLevel = 0; _needsUpdate = false; _lastTimeChange = 0; - _stopTime = 0; - _stopTimeSet = false; + _endTime = 0; + _endTimeSet = false; } bool AdvancedVideoDecoder::isVideoLoaded() const { @@ -254,10 +254,10 @@ bool AdvancedVideoDecoder::endOfVideo() const { if (!isVideoLoaded()) return true; - if (_stopTimeSet) { + if (_endTimeSet) { const VideoTrack *track = findNextVideoTrack(); - if (track && track->getNextFrameStartTime() >= (uint)_stopTime.msecs()) + if (track && track->getNextFrameStartTime() >= (uint)_endTime.msecs()) return true; } @@ -592,7 +592,7 @@ bool AdvancedVideoDecoder::addStreamFileTrack(const Common::String &baseName) { return result; } -void AdvancedVideoDecoder::setStopTime(const Audio::Timestamp &stopTime) { +void AdvancedVideoDecoder::setEndTime(const Audio::Timestamp &endTime) { Audio::Timestamp startTime = 0; if (isPlaying()) { @@ -600,17 +600,17 @@ void AdvancedVideoDecoder::setStopTime(const Audio::Timestamp &stopTime) { stopAudio(); } - _stopTime = stopTime; - _stopTimeSet = true; + _endTime = endTime; + _endTimeSet = true; - if (startTime > stopTime) + if (startTime > endTime) return; if (isPlaying()) { // We'll assume the audio track is going to start up at the same time it just was // and therefore not do any seeking. // Might want to set it anyway if we're seekable. - startAudioLimit(_stopTime.msecs() - startTime.msecs()); + startAudioLimit(_endTime.msecs() - startTime.msecs()); _lastTimeChange = startTime; } } @@ -676,10 +676,10 @@ const AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack } void AdvancedVideoDecoder::startAudio() { - if (_stopTimeSet) { + if (_endTimeSet) { // HACK: Timestamp's subtraction asserts out when subtracting two times // with different rates. - startAudioLimit(_stopTime - _lastTimeChange.convertToFramerate(_stopTime.framerate())); + startAudioLimit(_endTime - _lastTimeChange.convertToFramerate(_endTime.framerate())); return; } diff --git a/video/video_decoder.h b/video/video_decoder.h index 72be634f17..d6cfcde0b4 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -360,15 +360,15 @@ public: void setDefaultHighColorFormat(const Graphics::PixelFormat &format) { _defaultHighColorFormat = format; } /** - * Set the time for this video to stop at. At this time in the video, + * Set the time for this video to end at. At this time in the video, * all audio will stop and endOfVideo() will return true. */ - void setStopTime(const Audio::Timestamp &stopTime); + void setEndTime(const Audio::Timestamp &endTime); /** * Get the stop time of the video (if not set, zero) */ - Audio::Timestamp getStopTime() const { return _stopTime; } + Audio::Timestamp getEndTime() const { return _endTime; } // Future API //void setRate(const Common::Rational &rate); @@ -761,8 +761,8 @@ private: // Current playback status bool _isPlaying, _needsRewind, _needsUpdate; - Audio::Timestamp _lastTimeChange, _stopTime; - bool _stopTimeSet; + Audio::Timestamp _lastTimeChange, _endTime; + bool _endTimeSet; // Palette settings from individual tracks mutable bool _dirtyPalette; -- cgit v1.2.3 From 18823198ad4e7dedd0ca33760eb453e9fe673551 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 16 Aug 2012 14:00:14 -0400 Subject: VIDEO: Merge AdvancedVideoDecoder into VideoDecoder --- engines/agos/animation.cpp | 2 +- engines/mohawk/video.h | 4 +- engines/sci/console.cpp | 2 - engines/sci/engine/kvideo.cpp | 2 +- engines/sci/video/robot_decoder.cpp | 2 +- engines/sci/video/robot_decoder.h | 2 +- engines/sci/video/seq_decoder.h | 2 +- engines/scumm/he/animation_he.cpp | 4 +- engines/sword1/animation.cpp | 6 +- engines/sword2/animation.cpp | 6 +- video/avi_decoder.cpp | 2 +- video/avi_decoder.h | 2 +- video/bink_decoder.cpp | 2 +- video/bink_decoder.h | 2 +- video/coktel_decoder.cpp | 2 +- video/coktel_decoder.h | 4 +- video/dxa_decoder.h | 2 +- video/flic_decoder.h | 2 +- video/psx_decoder.cpp | 2 +- video/psx_decoder.h | 2 +- video/qt_decoder.cpp | 6 +- video/qt_decoder.h | 2 +- video/smk_decoder.cpp | 4 +- video/smk_decoder.h | 2 +- video/theora_decoder.cpp | 2 +- video/theora_decoder.h | 2 +- video/video_decoder.cpp | 219 ++++++++++++++++-------------------- video/video_decoder.h | 123 +++++--------------- 28 files changed, 164 insertions(+), 250 deletions(-) diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index 8fc93e4153..10f274b37f 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -342,7 +342,7 @@ bool MoviePlayerDXA::processFrame() { _vm->_system->unlockScreen(); uint32 soundTime = _mixer->getSoundElapsedTime(_bgSound); - uint32 nextFrameStartTime = ((Video::AdvancedVideoDecoder::VideoTrack *)getTrack(0))->getNextFrameStartTime(); + uint32 nextFrameStartTime = ((Video::VideoDecoder::VideoTrack *)getTrack(0))->getNextFrameStartTime(); if ((_bgSoundStream == NULL) || soundTime < nextFrameStartTime) { diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h index 4e34604bfd..9dddcde09b 100644 --- a/engines/mohawk/video.h +++ b/engines/mohawk/video.h @@ -45,7 +45,7 @@ struct MLSTRecord { struct VideoEntry { // Playback variables - Video::AdvancedVideoDecoder *video; + Video::VideoDecoder *video; uint16 x; uint16 y; bool loop; @@ -57,7 +57,7 @@ struct VideoEntry { int id; // Internal Mohawk files // Helper functions - Video::AdvancedVideoDecoder *operator->() const { assert(video); return video; } // TODO: Remove this eventually + Video::VideoDecoder *operator->() const { assert(video); return video; } // TODO: Remove this eventually void clear(); bool endOfVideo(); }; diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index de852ca9c0..1889d53480 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -267,8 +267,6 @@ void Console::postEnter() { } if (videoDecoder && videoDecoder->loadFile(_videoFile)) { - ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); - _engine->_gfxCursor->kernelHide(); #ifdef ENABLE_SCI32 diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index 3e0f35c037..6bf9aff2fe 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -50,7 +50,7 @@ void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) { if (!videoDecoder) return; - ((Video::AdvancedVideoDecoder *)videoDecoder)->start(); + videoDecoder->start(); byte *scaleBuffer = 0; byte bytesPerPixel = videoDecoder->getPixelFormat().bytesPerPixel; diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp index 6fe4c645f4..608c77136f 100644 --- a/engines/sci/video/robot_decoder.cpp +++ b/engines/sci/video/robot_decoder.cpp @@ -132,7 +132,7 @@ bool RobotDecoder::load(GuiResourceId id) { } void RobotDecoder::close() { - AdvancedVideoDecoder::close(); + VideoDecoder::close(); delete _fileStream; _fileStream = 0; diff --git a/engines/sci/video/robot_decoder.h b/engines/sci/video/robot_decoder.h index de5b669ab8..ebc3262939 100644 --- a/engines/sci/video/robot_decoder.h +++ b/engines/sci/video/robot_decoder.h @@ -37,7 +37,7 @@ class SeekableSubReadStreamEndian; namespace Sci { -class RobotDecoder : public Video::AdvancedVideoDecoder { +class RobotDecoder : public Video::VideoDecoder { public: RobotDecoder(bool isBigEndian); virtual ~RobotDecoder(); diff --git a/engines/sci/video/seq_decoder.h b/engines/sci/video/seq_decoder.h index 82254990d6..890f349feb 100644 --- a/engines/sci/video/seq_decoder.h +++ b/engines/sci/video/seq_decoder.h @@ -40,7 +40,7 @@ namespace Sci { /** * Implementation of the Sierra SEQ decoder, used in KQ6 DOS floppy/CD and GK1 DOS */ -class SEQDecoder : public Video::AdvancedVideoDecoder { +class SEQDecoder : public Video::VideoDecoder { public: SEQDecoder(uint frameDelay); virtual ~SEQDecoder(); diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp index 8329511c14..be17a3b305 100644 --- a/engines/scumm/he/animation_he.cpp +++ b/engines/scumm/he/animation_he.cpp @@ -62,14 +62,14 @@ int MoviePlayer::load(const char *filename, int flags, int image) { _video->close(); // Ensure that Bink will use our PixelFormat - ((Video::AdvancedVideoDecoder *)_video)->setDefaultHighColorFormat(g_system->getScreenFormat()); + _video->setDefaultHighColorFormat(g_system->getScreenFormat()); if (!_video->loadFile(filename)) { warning("Failed to load video file %s", filename); return -1; } - ((Video::AdvancedVideoDecoder *)_video)->start(); + _video->start(); debug(1, "Playing video %s", filename); diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index 98725a302a..f7add4eed2 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -183,7 +183,7 @@ bool MoviePlayer::load(uint32 id) { // Need to load here in case it fails in which case we'd need // to go back to paletted mode if (_decoder->loadFile(filename)) { - ((Video::AdvancedVideoDecoder *)_decoder)->start(); // TODO: Remove after new API is complete + _decoder->start(); return true; } else { initGraphics(g_system->getWidth(), g_system->getHeight(), true); @@ -197,9 +197,9 @@ bool MoviePlayer::load(uint32 id) { // For DXA, also add the external sound file if (_decoderType == kVideoDecoderDXA) - ((Video::AdvancedVideoDecoder *)_decoder)->addStreamFileTrack(sequenceList[id]); + _decoder->addStreamFileTrack(sequenceList[id]); - ((Video::AdvancedVideoDecoder *)_decoder)->start(); // TODO: Remove after new API is complete + _decoder->start(); return true; } diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index 24b52cd85a..00260f789a 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -95,7 +95,7 @@ bool MoviePlayer::load(const char *name) { // Need to load here in case it fails in which case we'd need // to go back to paletted mode if (_decoder->loadFile(filename)) { - ((Video::AdvancedVideoDecoder *)_decoder)->start(); // TODO: Remove after new API is complete + _decoder->start(); return true; } else { initGraphics(640, 480, true); @@ -108,9 +108,9 @@ bool MoviePlayer::load(const char *name) { // For DXA, also add the external sound file if (_decoderType == kVideoDecoderDXA) - ((Video::AdvancedVideoDecoder *)_decoder)->addStreamFileTrack(name); + _decoder->addStreamFileTrack(name); - ((Video::AdvancedVideoDecoder *)_decoder)->start(); // TODO: Remove after new API is complete + _decoder->start(); return true; } diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp index 375cc6f0f3..0850d5656a 100644 --- a/video/avi_decoder.cpp +++ b/video/avi_decoder.cpp @@ -289,7 +289,7 @@ bool AVIDecoder::loadStream(Common::SeekableReadStream *stream) { } void AVIDecoder::close() { - AdvancedVideoDecoder::close(); + VideoDecoder::close(); delete _fileStream; _fileStream = 0; diff --git a/video/avi_decoder.h b/video/avi_decoder.h index 010702cce3..a3a262db36 100644 --- a/video/avi_decoder.h +++ b/video/avi_decoder.h @@ -53,7 +53,7 @@ class Codec; * Video decoder used in engines: * - sci */ -class AVIDecoder : public AdvancedVideoDecoder { +class AVIDecoder : public VideoDecoder { public: AVIDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); virtual ~AVIDecoder(); diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp index cac0b356c5..620316806f 100644 --- a/video/bink_decoder.cpp +++ b/video/bink_decoder.cpp @@ -147,7 +147,7 @@ bool BinkDecoder::loadStream(Common::SeekableReadStream *stream) { } void BinkDecoder::close() { - AdvancedVideoDecoder::close(); + VideoDecoder::close(); delete _bink; _bink = 0; diff --git a/video/bink_decoder.h b/video/bink_decoder.h index 836238ce99..150e91aab7 100644 --- a/video/bink_decoder.h +++ b/video/bink_decoder.h @@ -62,7 +62,7 @@ namespace Video { * Video decoder used in engines: * - scumm (he) */ -class BinkDecoder : public AdvancedVideoDecoder { +class BinkDecoder : public VideoDecoder { public: BinkDecoder(); ~BinkDecoder(); diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp index 42033fb01f..6a60b0e7d7 100644 --- a/video/coktel_decoder.cpp +++ b/video/coktel_decoder.cpp @@ -2800,7 +2800,7 @@ bool AdvancedVMDDecoder::loadStream(Common::SeekableReadStream *stream) { } void AdvancedVMDDecoder::close() { - AdvancedVideoDecoder::close(); + VideoDecoder::close(); _decoder->close(); } diff --git a/video/coktel_decoder.h b/video/coktel_decoder.h index 117a55658f..2a97eadf00 100644 --- a/video/coktel_decoder.h +++ b/video/coktel_decoder.h @@ -550,10 +550,10 @@ private: }; /** - * A wrapper around the VMD code that implements the AdvancedVideoDecoder + * A wrapper around the VMD code that implements the VideoDecoder * API. */ -class AdvancedVMDDecoder : public AdvancedVideoDecoder { +class AdvancedVMDDecoder : public VideoDecoder { public: AdvancedVMDDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType); ~AdvancedVMDDecoder(); diff --git a/video/dxa_decoder.h b/video/dxa_decoder.h index a0caca4b95..b3f2eca5e2 100644 --- a/video/dxa_decoder.h +++ b/video/dxa_decoder.h @@ -41,7 +41,7 @@ namespace Video { * - sword1 * - sword2 */ -class DXADecoder : public AdvancedVideoDecoder { +class DXADecoder : public VideoDecoder { public: DXADecoder(); virtual ~DXADecoder(); diff --git a/video/flic_decoder.h b/video/flic_decoder.h index 9b82161ca5..9037af05d6 100644 --- a/video/flic_decoder.h +++ b/video/flic_decoder.h @@ -44,7 +44,7 @@ namespace Video { * Video decoder used in engines: * - tucker */ -class FlicDecoder : public AdvancedVideoDecoder { +class FlicDecoder : public VideoDecoder { public: FlicDecoder(); virtual ~FlicDecoder(); diff --git a/video/psx_decoder.cpp b/video/psx_decoder.cpp index 93bf711c25..fa7f1e8cfe 100644 --- a/video/psx_decoder.cpp +++ b/video/psx_decoder.cpp @@ -174,7 +174,7 @@ bool PSXStreamDecoder::loadStream(Common::SeekableReadStream *stream) { } void PSXStreamDecoder::close() { - AdvancedVideoDecoder::close(); + VideoDecoder::close(); _audioTrack = 0; _videoTrack = 0; _frameCount = 0; diff --git a/video/psx_decoder.h b/video/psx_decoder.h index 2a9dedf77f..11f311594d 100644 --- a/video/psx_decoder.h +++ b/video/psx_decoder.h @@ -56,7 +56,7 @@ namespace Video { * - sword1 (psx) * - sword2 (psx) */ -class PSXStreamDecoder : public AdvancedVideoDecoder { +class PSXStreamDecoder : public VideoDecoder { public: // CD speed in sectors/second // Calling code should use these enum values instead of the constants diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 70dcdff9c6..87c530dba0 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -79,7 +79,7 @@ bool QuickTimeDecoder::loadStream(Common::SeekableReadStream *stream) { } void QuickTimeDecoder::close() { - AdvancedVideoDecoder::close(); + VideoDecoder::close(); Common::QuickTimeParser::close(); if (_scaledSurface) { @@ -90,7 +90,7 @@ void QuickTimeDecoder::close() { } const Graphics::Surface *QuickTimeDecoder::decodeNextFrame() { - const Graphics::Surface *frame = AdvancedVideoDecoder::decodeNextFrame(); + const Graphics::Surface *frame = VideoDecoder::decodeNextFrame(); // Update audio buffers too // (needs to be done after we find the next track) @@ -244,7 +244,7 @@ void QuickTimeDecoder::init() { void QuickTimeDecoder::updateAudioBuffer() { // Updates the audio buffers for all audio tracks for (TrackListIterator it = getTrackListBegin(); it != getTrackListEnd(); it++) - if ((*it)->getTrackType() == AdvancedVideoDecoder::Track::kTrackTypeAudio) + if ((*it)->getTrackType() == VideoDecoder::Track::kTrackTypeAudio) ((AudioTrackHandler *)*it)->updateBuffer(); } diff --git a/video/qt_decoder.h b/video/qt_decoder.h index 7a251b8580..71d33711a6 100644 --- a/video/qt_decoder.h +++ b/video/qt_decoder.h @@ -55,7 +55,7 @@ class Codec; * - mohawk * - sci */ -class QuickTimeDecoder : public AdvancedVideoDecoder, public Audio::QuickTimeAudioDecoder { +class QuickTimeDecoder : public VideoDecoder, public Audio::QuickTimeAudioDecoder { public: QuickTimeDecoder(); virtual ~QuickTimeDecoder(); diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp index d707ad519f..d01ec730f4 100644 --- a/video/smk_decoder.cpp +++ b/video/smk_decoder.cpp @@ -396,7 +396,7 @@ bool SmackerDecoder::loadStream(Common::SeekableReadStream *stream) { } void SmackerDecoder::close() { - AdvancedVideoDecoder::close(); + VideoDecoder::close(); delete _fileStream; _fileStream = 0; @@ -411,7 +411,7 @@ void SmackerDecoder::close() { bool SmackerDecoder::rewind() { // Call the parent method to rewind the tracks first // In particular, only videos without sound can be rewound - if (!AdvancedVideoDecoder::rewind()) + if (!VideoDecoder::rewind()) return false; // And seek back to where the first frame begins diff --git a/video/smk_decoder.h b/video/smk_decoder.h index 78a4ded0fc..6bded64a37 100644 --- a/video/smk_decoder.h +++ b/video/smk_decoder.h @@ -57,7 +57,7 @@ class BigHuffmanTree; * - sword2 * - toon */ -class SmackerDecoder : public AdvancedVideoDecoder { +class SmackerDecoder : public VideoDecoder { public: SmackerDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kSFXSoundType); virtual ~SmackerDecoder(); diff --git a/video/theora_decoder.cpp b/video/theora_decoder.cpp index 76007eadff..d7260469e6 100644 --- a/video/theora_decoder.cpp +++ b/video/theora_decoder.cpp @@ -198,7 +198,7 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) { } void TheoraDecoder::close() { - AdvancedVideoDecoder::close(); + VideoDecoder::close(); if (!_fileStream) return; diff --git a/video/theora_decoder.h b/video/theora_decoder.h index 2244f7550d..7e36d829e7 100644 --- a/video/theora_decoder.h +++ b/video/theora_decoder.h @@ -52,7 +52,7 @@ namespace Video { * Video decoder used in engines: * - sword25 */ -class TheoraDecoder : public AdvancedVideoDecoder { +class TheoraDecoder : public VideoDecoder { public: TheoraDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType); virtual ~TheoraDecoder(); diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index fc4d7e1ae7..cf11649c10 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -35,9 +35,44 @@ namespace Video { VideoDecoder::VideoDecoder() { _startTime = 0; + _needsRewind = false; + _dirtyPalette = false; + _palette = 0; + _isPlaying = false; + _audioVolume = Audio::Mixer::kMaxChannelVolume; + _audioBalance = 0; _pauseLevel = 0; + _needsUpdate = false; + _lastTimeChange = 0; + _endTime = 0; + _endTimeSet = false; + + // Find the best format for output + _defaultHighColorFormat = g_system->getScreenFormat(); + + if (_defaultHighColorFormat.bytesPerPixel == 1) + _defaultHighColorFormat = Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0); +} + +void VideoDecoder::close() { + if (isPlaying()) + stop(); + + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + delete *it; + + _tracks.clear(); + _needsRewind = false; + _dirtyPalette = false; + _palette = 0; + _startTime = 0; _audioVolume = Audio::Mixer::kMaxChannelVolume; _audioBalance = 0; + _pauseLevel = 0; + _needsUpdate = false; + _lastTimeChange = 0; + _endTime = 0; + _endTimeSet = false; } bool VideoDecoder::loadFile(const Common::String &filename) { @@ -51,10 +86,6 @@ bool VideoDecoder::loadFile(const Common::String &filename) { return loadStream(file); } -uint32 VideoDecoder::getTime() const { - return g_system->getMillis() - _startTime; -} - bool VideoDecoder::needsUpdate() const { return !endOfVideo() && getTimeToNextFrame() == 0; } @@ -74,9 +105,13 @@ void VideoDecoder::pauseVideo(bool pause) { if (_pauseLevel == 1 && pause) { _pauseStartTime = g_system->getMillis(); // Store the starting time from pausing to keep it for later - pauseVideoIntern(true); + + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + (*it)->pause(true); } else if (_pauseLevel == 0) { - pauseVideoIntern(false); + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + (*it)->pause(false); + _startTime += (g_system->getMillis() - _pauseStartTime); } } @@ -88,60 +123,25 @@ void VideoDecoder::resetPauseStartTime() { void VideoDecoder::setVolume(byte volume) { _audioVolume = volume; - updateVolume(); + + for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) + if ((*it)->getTrackType() == Track::kTrackTypeAudio) + ((AudioTrack *)*it)->setVolume(_audioVolume); } void VideoDecoder::setBalance(int8 balance) { _audioBalance = balance; - updateBalance(); -} - -AdvancedVideoDecoder::AdvancedVideoDecoder() { - _needsRewind = false; - _dirtyPalette = false; - _palette = 0; - _isPlaying = false; - _audioVolume = Audio::Mixer::kMaxChannelVolume; - _audioBalance = 0; - _pauseLevel = 0; - _needsUpdate = false; - _lastTimeChange = 0; - _endTime = 0; - _endTimeSet = false; - - // Find the best format for output - _defaultHighColorFormat = g_system->getScreenFormat(); - - if (_defaultHighColorFormat.bytesPerPixel == 1) - _defaultHighColorFormat = Graphics::PixelFormat(4, 8, 8, 8, 8, 8, 16, 24, 0); -} - -void AdvancedVideoDecoder::close() { - if (isPlaying()) - stop(); for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) - delete *it; - - _tracks.clear(); - _needsRewind = false; - _dirtyPalette = false; - _palette = 0; - _startTime = 0; - _audioVolume = Audio::Mixer::kMaxChannelVolume; - _audioBalance = 0; - _pauseLevel = 0; - _needsUpdate = false; - _lastTimeChange = 0; - _endTime = 0; - _endTimeSet = false; + if ((*it)->getTrackType() == Track::kTrackTypeAudio) + ((AudioTrack *)*it)->setBalance(_audioBalance); } -bool AdvancedVideoDecoder::isVideoLoaded() const { +bool VideoDecoder::isVideoLoaded() const { return !_tracks.empty(); } -uint16 AdvancedVideoDecoder::getWidth() const { +uint16 VideoDecoder::getWidth() const { for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) if ((*it)->getTrackType() == Track::kTrackTypeVideo) return ((VideoTrack *)*it)->getWidth(); @@ -149,7 +149,7 @@ uint16 AdvancedVideoDecoder::getWidth() const { return 0; } -uint16 AdvancedVideoDecoder::getHeight() const { +uint16 VideoDecoder::getHeight() const { for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) if ((*it)->getTrackType() == Track::kTrackTypeVideo) return ((VideoTrack *)*it)->getHeight(); @@ -157,7 +157,7 @@ uint16 AdvancedVideoDecoder::getHeight() const { return 0; } -Graphics::PixelFormat AdvancedVideoDecoder::getPixelFormat() const { +Graphics::PixelFormat VideoDecoder::getPixelFormat() const { for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) if ((*it)->getTrackType() == Track::kTrackTypeVideo) return ((VideoTrack *)*it)->getPixelFormat(); @@ -165,7 +165,7 @@ Graphics::PixelFormat AdvancedVideoDecoder::getPixelFormat() const { return Graphics::PixelFormat(); } -const Graphics::Surface *AdvancedVideoDecoder::decodeNextFrame() { +const Graphics::Surface *VideoDecoder::decodeNextFrame() { _needsUpdate = false; readNextPacket(); @@ -184,12 +184,12 @@ const Graphics::Surface *AdvancedVideoDecoder::decodeNextFrame() { return frame; } -const byte *AdvancedVideoDecoder::getPalette() { +const byte *VideoDecoder::getPalette() { _dirtyPalette = false; return _palette; } -int AdvancedVideoDecoder::getCurFrame() const { +int VideoDecoder::getCurFrame() const { int32 frame = -1; for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) @@ -199,7 +199,7 @@ int AdvancedVideoDecoder::getCurFrame() const { return frame; } -uint32 AdvancedVideoDecoder::getFrameCount() const { +uint32 VideoDecoder::getFrameCount() const { int count = 0; for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) @@ -209,7 +209,7 @@ uint32 AdvancedVideoDecoder::getFrameCount() const { return count; } -uint32 AdvancedVideoDecoder::getTime() const { +uint32 VideoDecoder::getTime() const { if (!isPlaying()) return _lastTimeChange.msecs(); @@ -230,7 +230,7 @@ uint32 AdvancedVideoDecoder::getTime() const { return g_system->getMillis() - _startTime; } -uint32 AdvancedVideoDecoder::getTimeToNextFrame() const { +uint32 VideoDecoder::getTimeToNextFrame() const { if (endOfVideo() || _needsUpdate) return 0; @@ -248,9 +248,7 @@ uint32 AdvancedVideoDecoder::getTimeToNextFrame() const { return nextFrameStartTime - elapsedTime; } -bool AdvancedVideoDecoder::endOfVideo() const { - // TODO: Bring _isPlaying into account? - +bool VideoDecoder::endOfVideo() const { if (!isVideoLoaded()) return true; @@ -268,7 +266,7 @@ bool AdvancedVideoDecoder::endOfVideo() const { return true; } -bool AdvancedVideoDecoder::isRewindable() const { +bool VideoDecoder::isRewindable() const { if (!isVideoLoaded()) return false; @@ -279,7 +277,7 @@ bool AdvancedVideoDecoder::isRewindable() const { return true; } -bool AdvancedVideoDecoder::rewind() { +bool VideoDecoder::rewind() { if (!isRewindable()) return false; @@ -303,7 +301,7 @@ bool AdvancedVideoDecoder::rewind() { return true; } -bool AdvancedVideoDecoder::isSeekable() const { +bool VideoDecoder::isSeekable() const { if (!isVideoLoaded()) return false; @@ -314,7 +312,7 @@ bool AdvancedVideoDecoder::isSeekable() const { return true; } -bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) { +bool VideoDecoder::seek(const Audio::Timestamp &time) { if (!isSeekable()) return false; @@ -342,7 +340,7 @@ bool AdvancedVideoDecoder::seek(const Audio::Timestamp &time) { return true; } -void AdvancedVideoDecoder::start() { +void VideoDecoder::start() { if (isPlaying() || !isVideoLoaded()) return; @@ -360,7 +358,7 @@ void AdvancedVideoDecoder::start() { startAudio(); } -void AdvancedVideoDecoder::stop() { +void VideoDecoder::stop() { if (!isPlaying()) return; @@ -386,7 +384,7 @@ void AdvancedVideoDecoder::stop() { } } -Audio::Timestamp AdvancedVideoDecoder::getDuration() const { +Audio::Timestamp VideoDecoder::getDuration() const { Audio::Timestamp maxDuration(0, 1000); for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) { @@ -399,42 +397,23 @@ Audio::Timestamp AdvancedVideoDecoder::getDuration() const { return maxDuration; } -void AdvancedVideoDecoder::pauseVideoIntern(bool pause) { - for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) - (*it)->pause(pause); -} - -void AdvancedVideoDecoder::updateVolume() { - // For API compatibility only - for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) - if ((*it)->getTrackType() == Track::kTrackTypeAudio) - ((AudioTrack *)*it)->setVolume(_audioVolume); -} - -void AdvancedVideoDecoder::updateBalance() { - // For API compatibility only - for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) - if ((*it)->getTrackType() == Track::kTrackTypeAudio) - ((AudioTrack *)*it)->setBalance(_audioBalance); -} - -AdvancedVideoDecoder::Track::Track() { +VideoDecoder::Track::Track() { _paused = false; } -bool AdvancedVideoDecoder::Track::isRewindable() const { +bool VideoDecoder::Track::isRewindable() const { return isSeekable(); } -bool AdvancedVideoDecoder::Track::rewind() { +bool VideoDecoder::Track::rewind() { return seek(Audio::Timestamp(0, 1000)); } -Audio::Timestamp AdvancedVideoDecoder::Track::getDuration() const { +Audio::Timestamp VideoDecoder::Track::getDuration() const { return Audio::Timestamp(0, 1000); } -uint32 AdvancedVideoDecoder::FixedRateVideoTrack::getNextFrameStartTime() const { +uint32 VideoDecoder::FixedRateVideoTrack::getNextFrameStartTime() const { if (endOfTrack() || getCurFrame() < 0) return 0; @@ -443,11 +422,11 @@ uint32 AdvancedVideoDecoder::FixedRateVideoTrack::getNextFrameStartTime() const return time.toInt(); } -bool AdvancedVideoDecoder::FixedRateVideoTrack::endOfTrack() const { +bool VideoDecoder::FixedRateVideoTrack::endOfTrack() const { return getCurFrame() >= (getFrameCount() - 1); } -Audio::Timestamp AdvancedVideoDecoder::FixedRateVideoTrack::getDuration() const { +Audio::Timestamp VideoDecoder::FixedRateVideoTrack::getDuration() const { // Since Audio::Timestamp doesn't support a fractional frame rate, we're currently // just converting to milliseconds. Common::Rational time = getFrameCount() * 1000; @@ -455,26 +434,26 @@ Audio::Timestamp AdvancedVideoDecoder::FixedRateVideoTrack::getDuration() const return time.toInt(); } -bool AdvancedVideoDecoder::AudioTrack::endOfTrack() const { +bool VideoDecoder::AudioTrack::endOfTrack() const { Audio::AudioStream *stream = getAudioStream(); return !stream || !g_system->getMixer()->isSoundHandleActive(_handle) || stream->endOfData(); } -void AdvancedVideoDecoder::AudioTrack::setVolume(byte volume) { +void VideoDecoder::AudioTrack::setVolume(byte volume) { _volume = volume; if (g_system->getMixer()->isSoundHandleActive(_handle)) g_system->getMixer()->setChannelVolume(_handle, _volume); } -void AdvancedVideoDecoder::AudioTrack::setBalance(int8 balance) { +void VideoDecoder::AudioTrack::setBalance(int8 balance) { _balance = balance; if (g_system->getMixer()->isSoundHandleActive(_handle)) g_system->getMixer()->setChannelBalance(_handle, _balance); } -void AdvancedVideoDecoder::AudioTrack::start() { +void VideoDecoder::AudioTrack::start() { stop(); Audio::AudioStream *stream = getAudioStream(); @@ -487,11 +466,11 @@ void AdvancedVideoDecoder::AudioTrack::start() { g_system->getMixer()->pauseHandle(_handle, true); } -void AdvancedVideoDecoder::AudioTrack::stop() { +void VideoDecoder::AudioTrack::stop() { g_system->getMixer()->stopHandle(_handle); } -void AdvancedVideoDecoder::AudioTrack::start(const Audio::Timestamp &limit) { +void VideoDecoder::AudioTrack::start(const Audio::Timestamp &limit) { stop(); Audio::AudioStream *stream = getAudioStream(); @@ -506,60 +485,60 @@ void AdvancedVideoDecoder::AudioTrack::start(const Audio::Timestamp &limit) { g_system->getMixer()->pauseHandle(_handle, true); } -uint32 AdvancedVideoDecoder::AudioTrack::getRunningTime() const { +uint32 VideoDecoder::AudioTrack::getRunningTime() const { if (g_system->getMixer()->isSoundHandleActive(_handle)) return g_system->getMixer()->getSoundElapsedTime(_handle); return 0; } -void AdvancedVideoDecoder::AudioTrack::pauseIntern(bool shouldPause) { +void VideoDecoder::AudioTrack::pauseIntern(bool shouldPause) { if (g_system->getMixer()->isSoundHandleActive(_handle)) g_system->getMixer()->pauseHandle(_handle, shouldPause); } -Audio::AudioStream *AdvancedVideoDecoder::RewindableAudioTrack::getAudioStream() const { +Audio::AudioStream *VideoDecoder::RewindableAudioTrack::getAudioStream() const { return getRewindableAudioStream(); } -bool AdvancedVideoDecoder::RewindableAudioTrack::rewind() { +bool VideoDecoder::RewindableAudioTrack::rewind() { Audio::RewindableAudioStream *stream = getRewindableAudioStream(); assert(stream); return stream->rewind(); } -Audio::Timestamp AdvancedVideoDecoder::SeekableAudioTrack::getDuration() const { +Audio::Timestamp VideoDecoder::SeekableAudioTrack::getDuration() const { Audio::SeekableAudioStream *stream = getSeekableAudioStream(); assert(stream); return stream->getLength(); } -Audio::AudioStream *AdvancedVideoDecoder::SeekableAudioTrack::getAudioStream() const { +Audio::AudioStream *VideoDecoder::SeekableAudioTrack::getAudioStream() const { return getSeekableAudioStream(); } -bool AdvancedVideoDecoder::SeekableAudioTrack::seek(const Audio::Timestamp &time) { +bool VideoDecoder::SeekableAudioTrack::seek(const Audio::Timestamp &time) { Audio::SeekableAudioStream *stream = getSeekableAudioStream(); assert(stream); return stream->seek(time); } -AdvancedVideoDecoder::StreamFileAudioTrack::StreamFileAudioTrack() { +VideoDecoder::StreamFileAudioTrack::StreamFileAudioTrack() { _stream = 0; } -AdvancedVideoDecoder::StreamFileAudioTrack::~StreamFileAudioTrack() { +VideoDecoder::StreamFileAudioTrack::~StreamFileAudioTrack() { delete _stream; } -bool AdvancedVideoDecoder::StreamFileAudioTrack::loadFromFile(const Common::String &baseName) { +bool VideoDecoder::StreamFileAudioTrack::loadFromFile(const Common::String &baseName) { // TODO: Make sure the stream isn't being played delete _stream; _stream = Audio::SeekableAudioStream::openStreamFile(baseName); return _stream != 0; } -void AdvancedVideoDecoder::addTrack(Track *track) { +void VideoDecoder::addTrack(Track *track) { _tracks.push_back(track); // Update volume settings if it's an audio track @@ -577,7 +556,7 @@ void AdvancedVideoDecoder::addTrack(Track *track) { ((AudioTrack *)track)->start(); } -bool AdvancedVideoDecoder::addStreamFileTrack(const Common::String &baseName) { +bool VideoDecoder::addStreamFileTrack(const Common::String &baseName) { // Only allow adding external tracks if a video is already loaded if (!isVideoLoaded()) return false; @@ -592,7 +571,7 @@ bool AdvancedVideoDecoder::addStreamFileTrack(const Common::String &baseName) { return result; } -void AdvancedVideoDecoder::setEndTime(const Audio::Timestamp &endTime) { +void VideoDecoder::setEndTime(const Audio::Timestamp &endTime) { Audio::Timestamp startTime = 0; if (isPlaying()) { @@ -615,21 +594,21 @@ void AdvancedVideoDecoder::setEndTime(const Audio::Timestamp &endTime) { } } -AdvancedVideoDecoder::Track *AdvancedVideoDecoder::getTrack(uint track) { +VideoDecoder::Track *VideoDecoder::getTrack(uint track) { if (track > _tracks.size()) return 0; return _tracks[track]; } -const AdvancedVideoDecoder::Track *AdvancedVideoDecoder::getTrack(uint track) const { +const VideoDecoder::Track *VideoDecoder::getTrack(uint track) const { if (track > _tracks.size()) return 0; return _tracks[track]; } -bool AdvancedVideoDecoder::endOfVideoTracks() const { +bool VideoDecoder::endOfVideoTracks() const { for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) if ((*it)->getTrackType() == Track::kTrackTypeVideo && !(*it)->endOfTrack()) return false; @@ -637,7 +616,7 @@ bool AdvancedVideoDecoder::endOfVideoTracks() const { return true; } -AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack() { +VideoDecoder::VideoTrack *VideoDecoder::findNextVideoTrack() { VideoTrack *bestTrack = 0; uint32 bestTime = 0xFFFFFFFF; @@ -656,7 +635,7 @@ AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack() { return bestTrack; } -const AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack() const { +const VideoDecoder::VideoTrack *VideoDecoder::findNextVideoTrack() const { const VideoTrack *bestTrack = 0; uint32 bestTime = 0xFFFFFFFF; @@ -675,7 +654,7 @@ const AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack return bestTrack; } -void AdvancedVideoDecoder::startAudio() { +void VideoDecoder::startAudio() { if (_endTimeSet) { // HACK: Timestamp's subtraction asserts out when subtracting two times // with different rates. @@ -688,13 +667,13 @@ void AdvancedVideoDecoder::startAudio() { ((AudioTrack *)*it)->start(); } -void AdvancedVideoDecoder::stopAudio() { +void VideoDecoder::stopAudio() { for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) if ((*it)->getTrackType() == Track::kTrackTypeAudio) ((AudioTrack *)*it)->stop(); } -void AdvancedVideoDecoder::startAudioLimit(const Audio::Timestamp &limit) { +void VideoDecoder::startAudioLimit(const Audio::Timestamp &limit) { for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++) if ((*it)->getTrackType() == Track::kTrackTypeAudio) ((AudioTrack *)*it)->start(limit); diff --git a/video/video_decoder.h b/video/video_decoder.h index d6cfcde0b4..abb9f8df20 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -48,7 +48,6 @@ namespace Video { /** * Generic interface for video decoder classes. - * @note This class is now deprecated in favor of AdvancedVideoDecoder. */ class VideoDecoder { public: @@ -77,53 +76,51 @@ public: /** * Close the active video stream and free any associated resources. */ - virtual void close() = 0; + virtual void close(); /** * Returns if a video stream is currently loaded or not. */ - virtual bool isVideoLoaded() const = 0; - - + bool isVideoLoaded() const; /** * Returns the width of the video's frames. * @return the width of the video's frames */ - virtual uint16 getWidth() const = 0; + virtual uint16 getWidth() const; /** * Returns the height of the video's frames. * @return the height of the video's frames */ - virtual uint16 getHeight() const = 0; + virtual uint16 getHeight() const; /** * Get the pixel format of the currently loaded video. */ - virtual Graphics::PixelFormat getPixelFormat() const = 0; + virtual Graphics::PixelFormat getPixelFormat() const; /** * Get the palette for the video in RGB format (if 8bpp or less). */ - virtual const byte *getPalette() { return 0; } + const byte *getPalette(); /** * Returns if the palette is dirty or not. */ - virtual bool hasDirtyPalette() const { return false; } + bool hasDirtyPalette() const { return _dirtyPalette; } /** * Returns the current frame number of the video. * @return the last frame decoded by the video */ - virtual int32 getCurFrame() const = 0; + int32 getCurFrame() const; /** * Returns the number of frames in the video. * @return the number of frames in the video */ - virtual uint32 getFrameCount() const = 0; + uint32 getFrameCount() const; /** * Returns the time position (in ms) of the current video. @@ -139,12 +136,12 @@ public: * completely accurate (since our mixer does not have precise * timing). */ - virtual uint32 getTime() const; + uint32 getTime() const; /** * Return the time (in ms) until the next frame should be displayed. */ - virtual uint32 getTimeToNextFrame() const = 0; + uint32 getTimeToNextFrame() const; /** * Check whether a new frame should be decoded, i.e. because enough @@ -160,13 +157,13 @@ public: * hence the caller must *not* free it. * @note this may return 0, in which case the last frame should be kept on screen */ - virtual const Graphics::Surface *decodeNextFrame() = 0; + virtual const Graphics::Surface *decodeNextFrame(); /** * Returns if the video has finished playing or not. * @return true if the video has finished playing or if none is loaded, false otherwise */ - virtual bool endOfVideo() const = 0; + bool endOfVideo() const; /** * Pause or resume the video. This should stop/resume any audio playback @@ -190,7 +187,7 @@ public: * 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; } + byte getVolume() const { return _audioVolume; } /** * Set the volume at which the audio in the video should be played. @@ -201,13 +198,13 @@ public: * * @param volume The volume at which to play the audio in the video */ - virtual void setVolume(byte volume); + 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; } + int8 getBalance() const { return _audioBalance; } /** * Set the balance at which the audio in the video should be played. @@ -218,72 +215,8 @@ public: * * @param balance The balance at which to play the audio in the video */ - virtual void setBalance(int8 balance); - -protected: - /** - * Actual implementation of pause by subclasses. See pause() - * for details. - * @note This function is now deprecated. There is no replacement. - */ - virtual void pauseVideoIntern(bool pause) {} - - /** - * Reset the pause start time (which should be called when seeking) - */ - void resetPauseStartTime(); - - /** - * Update currently playing audio tracks with the new volume setting - * @note This function is now deprecated. There is no replacement. - */ - virtual void updateVolume() {} - - /** - * Update currently playing audio tracks with the new balance setting - * @note This function is now deprecated. There is no replacement. - */ - virtual void updateBalance() {} - - int32 _startTime; - -// FIXME: These are protected until the new API takes over this one -//private: - uint32 _pauseLevel; - uint32 _pauseStartTime; - byte _audioVolume; - int8 _audioBalance; -}; - -/** - * Improved interface for video decoder classes. - */ -class AdvancedVideoDecoder : public VideoDecoder { -public: - AdvancedVideoDecoder(); - virtual ~AdvancedVideoDecoder() {} - - // Old API Non-changing - // loadFile() - // loadStream() - // needsUpdate() - - // Old API Changing - virtual void close(); - bool isVideoLoaded() const; - virtual uint16 getWidth() const; - virtual uint16 getHeight() const; - virtual Graphics::PixelFormat getPixelFormat() const; - virtual const Graphics::Surface *decodeNextFrame(); - const byte *getPalette(); - bool hasDirtyPalette() const { return _dirtyPalette; } - int getCurFrame() const; - uint32 getFrameCount() const; - uint32 getTime() const; - uint32 getTimeToNextFrame() const; - bool endOfVideo() const; + void setBalance(int8 balance); - // New API /** * Returns if a video is rewindable or not. The default implementation * polls each track for rewindability. @@ -352,7 +285,7 @@ public: /** * Set the default high color format for videos that convert from YUV. * - * By default, AdvancedVideoDecoder will attempt to use the screen format + * By default, VideoDecoder will attempt to use the screen format * if it's >8bpp and use a 32bpp format when not. * * This must be set before calling loadStream(). @@ -375,13 +308,6 @@ public: //Common::Rational getRate() const; protected: - // Old API - void pauseVideoIntern(bool pause); - void updateVolume(); - void updateBalance(); - - // New API - /** * An abstract representation of a track in a movie. */ @@ -679,6 +605,11 @@ protected: Audio::SeekableAudioStream *getSeekableAudioStream() const { return _stream; } }; + /** + * Reset the pause start time (which should be called when seeking) + */ + void resetPauseStartTime(); + /** * Decode enough data for the next frame and enough audio to last that long. * @@ -756,7 +687,7 @@ protected: TrackListIterator getTrackListEnd() { return _tracks.end(); } private: - // Tracks owned by this AdvancedVideoDecoder + // Tracks owned by this VideoDecoder TrackList _tracks; // Current playback status @@ -775,6 +706,12 @@ private: void stopAudio(); void startAudio(); void startAudioLimit(const Audio::Timestamp &limit); + + int32 _startTime; + uint32 _pauseLevel; + uint32 _pauseStartTime; + byte _audioVolume; + int8 _audioBalance; }; } // End of namespace Video -- cgit v1.2.3 From e24fd2ffe66f17e0b5e3f58871ca22586cad757e Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 16 Aug 2012 22:49:22 -0400 Subject: VIDEO: Cleanup VideoDecoder a bit Functions and their comments now line up better --- video/video_decoder.cpp | 8 +- video/video_decoder.h | 311 +++++++++++++++++++++++++++++------------------- 2 files changed, 193 insertions(+), 126 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index cf11649c10..14826642d7 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -413,6 +413,10 @@ Audio::Timestamp VideoDecoder::Track::getDuration() const { return Audio::Timestamp(0, 1000); } +bool VideoDecoder::VideoTrack::endOfTrack() const { + return getCurFrame() >= (getFrameCount() - 1); +} + uint32 VideoDecoder::FixedRateVideoTrack::getNextFrameStartTime() const { if (endOfTrack() || getCurFrame() < 0) return 0; @@ -422,10 +426,6 @@ uint32 VideoDecoder::FixedRateVideoTrack::getNextFrameStartTime() const { return time.toInt(); } -bool VideoDecoder::FixedRateVideoTrack::endOfTrack() const { - return getCurFrame() >= (getFrameCount() - 1); -} - Audio::Timestamp VideoDecoder::FixedRateVideoTrack::getDuration() const { // Since Audio::Timestamp doesn't support a fractional frame rate, we're currently // just converting to milliseconds. diff --git a/video/video_decoder.h b/video/video_decoder.h index abb9f8df20..5fba85358c 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -54,10 +54,14 @@ public: VideoDecoder(); virtual ~VideoDecoder() {} + ///////////////////////////////////////// + // Opening/Closing a Video + ///////////////////////////////////////// + /** * Load a video from a file with the given name. * - * A default implementation using loadStream is provided. + * A default implementation using Common::File and loadStream is provided. * * @param filename the filename to load * @return whether loading the file succeeded @@ -68,6 +72,10 @@ public: * Load a video from a generic read stream. The ownership of the * stream object transfers to this VideoDecoder instance, which is * hence also responsible for eventually deleting it. + * + * Implementations of this function are required to call addTrack() + * for each track in the video upon success. + * * @param stream the stream to load * @return whether loading the stream succeeded */ @@ -75,6 +83,9 @@ public: /** * Close the active video stream and free any associated resources. + * + * All subclasses that need to close their own resources should still + * call the base class' close() function at the start of their function. */ virtual void close(); @@ -83,87 +94,66 @@ public: */ bool isVideoLoaded() const; - /** - * Returns the width of the video's frames. - * @return the width of the video's frames - */ - virtual uint16 getWidth() const; - - /** - * Returns the height of the video's frames. - * @return the height of the video's frames - */ - virtual uint16 getHeight() const; - /** - * Get the pixel format of the currently loaded video. - */ - virtual Graphics::PixelFormat getPixelFormat() const; + ///////////////////////////////////////// + // Playback Control + ///////////////////////////////////////// /** - * Get the palette for the video in RGB format (if 8bpp or less). + * Begin playback of the video. + * + * @note This has no effect is the video is already playing. */ - const byte *getPalette(); + void start(); /** - * Returns if the palette is dirty or not. + * Stop playback of the video. + * + * @note This will close() the video if it is not rewindable. + * @note If the video is rewindable, the video will be rewound on the + * next start() call unless rewind() or seek() is called before then. */ - bool hasDirtyPalette() const { return _dirtyPalette; } + void stop(); /** - * Returns the current frame number of the video. - * @return the last frame decoded by the video + * Returns if the video is currently playing or not. + * @todo Differentiate this function from endOfVideo() */ - int32 getCurFrame() const; + bool isPlaying() const { return _isPlaying; } /** - * Returns the number of frames in the video. - * @return the number of frames in the video + * Returns if a video is rewindable or not. The default implementation + * polls each track for rewindability. */ - uint32 getFrameCount() const; + virtual bool isRewindable() const; /** - * Returns the time position (in ms) of the current video. - * This can be based on the "wall clock" time as determined by - * OSystem::getMillis() or the current time of any audio track - * running in the video, and takes pausing the video into account. + * Rewind a video to its beginning. * - * As such, it will differ from what multiplying getCurFrame() by - * some constant would yield, e.g. for a video with non-constant - * frame rate. + * If the video is playing, it will continue to play. The default + * implementation will rewind each track. * - * Due to the nature of the timing, this value may not always be - * completely accurate (since our mixer does not have precise - * timing). - */ - uint32 getTime() const; - - /** - * Return the time (in ms) until the next frame should be displayed. - */ - uint32 getTimeToNextFrame() const; - - /** - * Check whether a new frame should be decoded, i.e. because enough - * time has elapsed since the last frame was decoded. - * @return whether a new frame should be decoded or not + * @return true on success, false otherwise */ - virtual bool needsUpdate() const; + virtual bool rewind(); /** - * Decode the next frame into a surface and return the latter. - * @return a surface containing the decoded frame, or 0 - * @note Ownership of the returned surface stays with the VideoDecoder, - * hence the caller must *not* free it. - * @note this may return 0, in which case the last frame should be kept on screen + * Returns if a video is seekable or not. The default implementation + * polls each track for seekability. */ - virtual const Graphics::Surface *decodeNextFrame(); + virtual bool isSeekable() const; /** - * Returns if the video has finished playing or not. - * @return true if the video has finished playing or if none is loaded, false otherwise + * Seek to a given time in the video. + * + * If the video is playing, it will continue to play. The default + * implementation will seek each track and must still be called + * from any other implementation. + * + * @param time The time to seek to + * @return true on success, false otherwise */ - bool endOfVideo() const; + virtual bool seek(const Audio::Timestamp &time); /** * Pause or resume the video. This should stop/resume any audio playback @@ -184,103 +174,141 @@ 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 + * Set the time for this video to end at. At this time in the video, + * all audio will stop and endOfVideo() will return true. */ - byte getVolume() const { return _audioVolume; } + void setEndTime(const Audio::Timestamp &endTime); /** - * 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 + * Get the stop time of the video (if not set, zero) */ - void setVolume(byte volume); + Audio::Timestamp getEndTime() const { return _endTime; } + + + ///////////////////////////////////////// + // Playback Status + ///////////////////////////////////////// /** - * 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 + * Returns if the video has reached the end or not. + * @return true if the video has finished playing or if none is loaded, false otherwise */ - int8 getBalance() const { return _audioBalance; } + bool endOfVideo() const; /** - * 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 + * Returns the current frame number of the video. + * @return the last frame decoded by the video */ - void setBalance(int8 balance); + int32 getCurFrame() const; /** - * Returns if a video is rewindable or not. The default implementation - * polls each track for rewindability. + * Returns the number of frames in the video. + * @return the number of frames in the video */ - virtual bool isRewindable() const; + uint32 getFrameCount() const; /** - * Rewind a video to its beginning. + * Returns the time position (in ms) of the current video. + * This can be based on the "wall clock" time as determined by + * OSystem::getMillis() or the current time of any audio track + * running in the video, and takes pausing the video into account. * - * If the video is playing, it will continue to play. The default - * implementation will rewind each track. + * As such, it will differ from what multiplying getCurFrame() by + * some constant would yield, e.g. for a video with non-constant + * frame rate. * - * @return true on success, false otherwise + * Due to the nature of the timing, this value may not always be + * completely accurate (since our mixer does not have precise + * timing). */ - virtual bool rewind(); + uint32 getTime() const; + + + ///////////////////////////////////////// + // Video Info + ///////////////////////////////////////// /** - * Returns if a video is seekable or not. The default implementation - * polls each track for seekability. + * Returns the width of the video's frames. + * + * By default, this finds the largest width between all of the loaded + * tracks. However, a subclass may override this if it does any kind + * of post-processing on it. + * + * @return the width of the video's frames */ - virtual bool isSeekable() const; + virtual uint16 getWidth() const; /** - * Seek to a given time in the video. + * Returns the height of the video's frames. * - * If the video is playing, it will continue to play. The default - * implementation will seek each track. + * By default, this finds the largest height between all of the loaded + * tracks. However, a subclass may override this if it does any kind + * of post-processing on it. * - * @param time The time to seek to - * @return true on success, false otherwise + * @return the height of the video's frames */ - virtual bool seek(const Audio::Timestamp &time); + virtual uint16 getHeight() const; /** - * Begin playback of the video. + * Get the pixel format of the currently loaded video. + */ + Graphics::PixelFormat getPixelFormat() const; + + /** + * Get the duration of the video. * - * @note This has no effect is the video is already playing. + * If the duration is unknown, this will return 0. If this is not + * overriden, it will take the length of the longest track. */ - void start(); + virtual Audio::Timestamp getDuration() const; + + + ///////////////////////////////////////// + // Frame Decoding + ///////////////////////////////////////// /** - * Stop playback of the video. + * Get the palette for the video in RGB format (if 8bpp or less). * - * @note This will close() the video if it is not rewindable. + * The palette's format is the same as PaletteManager's palette + * (interleaved RGB values). */ - void stop(); + const byte *getPalette(); /** - * Returns if the video is currently playing or not. - * @todo Differentiate this function from endOfVideo() + * Returns if the palette is dirty or not. */ - bool isPlaying() const { return _isPlaying; } + bool hasDirtyPalette() const { return _dirtyPalette; } /** - * Get the duration of the video. - * - * If the duration is unknown, this will return 0. + * Return the time (in ms) until the next frame should be displayed. */ - virtual Audio::Timestamp getDuration() const; + uint32 getTimeToNextFrame() const; /** - * Add an audio track from a stream file. + * Check whether a new frame should be decoded, i.e. because enough + * time has elapsed since the last frame was decoded. + * @return whether a new frame should be decoded or not */ - bool addStreamFileTrack(const Common::String &baseName); + bool needsUpdate() const; + + /** + * Decode the next frame into a surface and return the latter. + * + * A subclass may override this, but must still call this function. As an + * example, a subclass may do this to apply some global video scale to + * individual track's frame. + * + * Note that this will call readNextPacket() internally first before calling + * the next video track's decodeNextFrame() function. + * + * @return a surface containing the decoded frame, or 0 + * @note Ownership of the returned surface stays with the VideoDecoder, + * hence the caller must *not* free it. + * @note this may return 0, in which case the last frame should be kept on screen + */ + virtual const Graphics::Surface *decodeNextFrame(); /** * Set the default high color format for videos that convert from YUV. @@ -292,16 +320,48 @@ public: */ void setDefaultHighColorFormat(const Graphics::PixelFormat &format) { _defaultHighColorFormat = format; } + + ///////////////////////////////////////// + // Audio Control + ///////////////////////////////////////// + /** - * Set the time for this video to end at. At this time in the video, - * all audio will stop and endOfVideo() will return true. + * 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 */ - void setEndTime(const Audio::Timestamp &endTime); + byte getVolume() const { return _audioVolume; } /** - * Get the stop time of the video (if not set, zero) + * Set the volume at which the audio in the video should be played. + * This setting remains until close() is called (which may be called + * from loadStream()). The default volume is the maximum. + * + * @param volume The volume at which to play the audio in the video */ - Audio::Timestamp getEndTime() const { return _endTime; } + 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 + */ + int8 getBalance() const { return _audioBalance; } + + /** + * Set the balance at which the audio in the video should be played. + * This setting remains until close() is called (which may be called + * from loadStream()). The default balance is 0. + * + * @param balance The balance at which to play the audio in the video + */ + void setBalance(int8 balance); + + /** + * Add an audio track from a stream file. + * + * This calls SeekableAudioStream::openStreamFile() internally + */ + bool addStreamFileTrack(const Common::String &baseName); + // Future API //void setRate(const Common::Rational &rate); @@ -337,11 +397,18 @@ protected: /** * Return if the track is rewindable. + * + * If a video is seekable, it does not need to implement this + * for it to also be rewindable. */ virtual bool isRewindable() const; /** * Rewind the video to the beginning. + * + * If a video is seekable, it does not need to implement this + * for it to also be rewindable. + * * @return true on success, false otherwise. */ virtual bool rewind(); @@ -394,6 +461,7 @@ protected: virtual ~VideoTrack() {} TrackType getTrackType() const { return kTrackTypeVideo; } + virtual bool endOfTrack() const; /** * Get the width of this track @@ -458,7 +526,6 @@ protected: FixedRateVideoTrack() {} virtual ~FixedRateVideoTrack() {} - virtual bool endOfTrack() const; uint32 getNextFrameStartTime() const; virtual Audio::Timestamp getDuration() const; @@ -540,7 +607,7 @@ protected: /** * An AudioTrack that implements isRewindable() and rewind() using - * the RewindableAudioStream API. + * RewindableAudioStream. */ class RewindableAudioTrack : public AudioTrack { public: @@ -562,7 +629,7 @@ protected: /** * An AudioTrack that implements isSeekable() and seek() using - * the SeekableAudioStream API. + * SeekableAudioStream. */ class SeekableAudioTrack : public AudioTrack { public: @@ -613,7 +680,7 @@ protected: /** * Decode enough data for the next frame and enough audio to last that long. * - * This function is used by the default decodeNextFrame() function. A subclass + * This function is used by the decodeNextFrame() function. A subclass * of a Track may decide to just have its decodeNextFrame() function read * and decode the frame. */ @@ -629,7 +696,7 @@ protected: /** * Whether or not getTime() will sync with a playing audio track. * - * A subclass should override this to disable this feature. + * A subclass can override this to disable this feature. */ virtual bool useAudioSync() const { return true; } -- cgit v1.2.3 From da9695ddc6a46c709753026055d6060746006c2c Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 17 Aug 2012 23:31:26 -0400 Subject: AGOS: Fix regressions in the feeble demo --- engines/agos/animation.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index 10f274b37f..cf12ee120a 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -268,6 +268,10 @@ void MoviePlayerDXA::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { uint w = getWidth(); const Graphics::Surface *surface = decodeNextFrame(); + + if (!surface) + return; + byte *src = (byte *)surface->pixels; dst += y * pitch + x; @@ -289,6 +293,8 @@ void MoviePlayerDXA::playVideo() { _vm->clearSurfaces(); } + start(); + while (!endOfVideo() && !_skipMovie && !_vm->shouldQuit()) handleNextFrame(); } @@ -421,8 +427,6 @@ bool MoviePlayerSMK::load() { if (!loadStream(videoStream)) error("Failed to load video stream from file %s", videoName.c_str()); - start(); - debug(0, "Playing video %s", videoName.c_str()); CursorMan.showMouse(false); @@ -435,6 +439,10 @@ void MoviePlayerSMK::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { uint w = getWidth(); const Graphics::Surface *surface = decodeNextFrame(); + + if (!surface) + return; + byte *src = (byte *)surface->pixels; dst += y * pitch + x; @@ -449,6 +457,8 @@ void MoviePlayerSMK::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { } void MoviePlayerSMK::playVideo() { + start(); + while (!endOfVideo() && !_skipMovie && !_vm->shouldQuit()) handleNextFrame(); } @@ -491,7 +501,7 @@ bool MoviePlayerSMK::processFrame() { uint32 waitTime = getTimeToNextFrame(); - if (!waitTime) { + if (!waitTime && !endOfVideoTracks()) { warning("dropped frame %i", getCurFrame()); return false; } -- cgit v1.2.3 From 7af4e403042c9d67c6f00bb151225cee6abc5e0d Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 18 Aug 2012 10:22:54 -0400 Subject: AGOS: Fix regression with sound in Smacker OmniTV videos --- engines/agos/animation.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index cf12ee120a..9176412e0e 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -293,8 +293,6 @@ void MoviePlayerDXA::playVideo() { _vm->clearSurfaces(); } - start(); - while (!endOfVideo() && !_skipMovie && !_vm->shouldQuit()) handleNextFrame(); } @@ -305,6 +303,8 @@ void MoviePlayerDXA::stopVideo() { } void MoviePlayerDXA::startSound() { + start(); + if (_bgSoundStream != NULL) { _vm->_mixer->stopHandle(_bgSound); _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_bgSound, _bgSoundStream, -1, getVolume(), getBalance()); @@ -457,8 +457,6 @@ void MoviePlayerSMK::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { } void MoviePlayerSMK::playVideo() { - start(); - while (!endOfVideo() && !_skipMovie && !_vm->shouldQuit()) handleNextFrame(); } @@ -468,6 +466,7 @@ void MoviePlayerSMK::stopVideo() { } void MoviePlayerSMK::startSound() { + start(); } void MoviePlayerSMK::handleNextFrame() { -- cgit v1.2.3 From 8524ebd699254a6786033f0e41b9a45c563feb11 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 20 Aug 2012 02:58:37 +0300 Subject: SCI: Fix script bug #3555404 - "SCI: KQ6 Spider Scene Game Freeze" --- engines/sci/sound/soundcmd.cpp | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp index cbb5cab4fe..1570e360e8 100644 --- a/engines/sci/sound/soundcmd.cpp +++ b/engines/sci/sound/soundcmd.cpp @@ -367,29 +367,36 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) { case 4: // SCI01+ case 5: // SCI1+ (SCI1 late sound scheme), with fade and continue - musicSlot->fadeTo = CLIP(argv[1].toUint16(), 0, MUSIC_VOLUME_MAX); - // Check if the song is already at the requested volume. If it is, don't - // perform any fading. Happens for example during the intro of Longbow. - if (musicSlot->fadeTo == musicSlot->volume) - return acc; - - // sometimes we get objects in that position, fix it up (ffs. workarounds) - if (!argv[1].getSegment()) - musicSlot->fadeStep = volume > musicSlot->fadeTo ? -argv[3].toUint16() : argv[3].toUint16(); - else - musicSlot->fadeStep = volume > musicSlot->fadeTo ? -5 : 5; - musicSlot->fadeTickerStep = argv[2].toUint16() * 16667 / _music->soundGetTempo(); - musicSlot->fadeTicker = 0; - if (argc == 5) { // TODO: We currently treat this argument as a boolean, but may // have to handle different non-zero values differently. (e.g., - // some KQ6 scripts pass 3 here) - musicSlot->stopAfterFading = (argv[4].toUint16() != 0); + // some KQ6 scripts pass 3 here). + // There is a script bug in KQ6, room 460 (the room with the flying + // books). An object is passed here, which should not be treated as + // a true flag. Fixes bugs #3555404 and #3291115. + musicSlot->stopAfterFading = (argv[4].isNumber() && argv[4].toUint16() != 0); } else { musicSlot->stopAfterFading = false; } + musicSlot->fadeTo = CLIP(argv[1].toUint16(), 0, MUSIC_VOLUME_MAX); + // Check if the song is already at the requested volume. If it is, don't + // perform any fading. Happens for example during the intro of Longbow. + if (musicSlot->fadeTo != musicSlot->volume) { + // sometimes we get objects in that position, fix it up (ffs. workarounds) + if (!argv[1].getSegment()) + musicSlot->fadeStep = volume > musicSlot->fadeTo ? -argv[3].toUint16() : argv[3].toUint16(); + else + musicSlot->fadeStep = volume > musicSlot->fadeTo ? -5 : 5; + musicSlot->fadeTickerStep = argv[2].toUint16() * 16667 / _music->soundGetTempo(); + } else { + // Stop the music, if requested. Fixes bug #3555404. + if (musicSlot->stopAfterFading) + processStopSound(obj, false); + } + + musicSlot->fadeTicker = 0; + // WORKAROUND/HACK: In the labyrinth in KQ6, when falling in the pit and // lighting the lantern, the game scripts perform a fade in of the game // music, but set it to stop after fading. Remove that flag here. This is -- cgit v1.2.3 From b19ccb9d1edcdf238727f0c3b0a731b2f00e9d3d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 20 Aug 2012 03:22:56 +0300 Subject: SCI: Set the correct audio type for SCI1.1 sound effects, fixing bug #3554709 Now, sound effects in SCI1.1 games will no longer be incorrectly using the speech sound volume. This avoids them being silenced in floppy games that are flagged as not having speech. Fixes bug #3554709 - "SCI: Digital SFX don't play when Override Global Audio set" --- engines/sci/sound/audio.cpp | 3 ++- engines/sci/sound/soundcmd.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp index 123dd21894..528bb51393 100644 --- a/engines/sci/sound/audio.cpp +++ b/engines/sci/sound/audio.cpp @@ -67,7 +67,8 @@ int AudioPlayer::startAudio(uint16 module, uint32 number) { if (audioStream) { _wPlayFlag = false; - _mixer->playStream(Audio::Mixer::kSpeechSoundType, &_audioHandle, audioStream); + Audio::Mixer::SoundType soundType = (module == 65535) ? Audio::Mixer::kSFXSoundType : Audio::Mixer::kSpeechSoundType; + _mixer->playStream(soundType, &_audioHandle, audioStream); return sampleLen; } else { // Don't throw a warning in this case. getAudioStream() already has. Some games diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp index 1570e360e8..5d32f40f18 100644 --- a/engines/sci/sound/soundcmd.cpp +++ b/engines/sci/sound/soundcmd.cpp @@ -96,7 +96,7 @@ void SoundCommandParser::initSoundResource(MusicEntry *newSound) { if (_useDigitalSFX || !newSound->soundRes) { int sampleLen; newSound->pStreamAud = _audio->getAudioStream(newSound->resourceId, 65535, &sampleLen); - newSound->soundType = Audio::Mixer::kSpeechSoundType; + newSound->soundType = Audio::Mixer::kSFXSoundType; } } -- cgit v1.2.3 From 23db3cd9f225d40ff1900dd806630800ecf54aeb Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 20 Aug 2012 03:28:02 +0300 Subject: SAGA: Remove incorrect free() in loadShortenFromStream() This removes a warning and fixes bug #3558052 - "SAGA: use-after-free warning" --- engines/saga/shorten.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/engines/saga/shorten.cpp b/engines/saga/shorten.cpp index 5efc8d1f67..69c27b6a6b 100644 --- a/engines/saga/shorten.cpp +++ b/engines/saga/shorten.cpp @@ -519,9 +519,6 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by if (maxLPC > 0) free(lpc); - if (size > 0) - free(unpackedBuffer); - delete gReader; return unpackedBuffer; } -- cgit v1.2.3 From eccb55570e3ed27276573b23093ffedcf3e794cc Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 19 Aug 2012 20:40:03 -0400 Subject: BUILD: Fix statically compiling with libfluidsynth on Mac OS X --- configure | 2 +- ports.mk | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure b/configure index d4fec02c64..211d9e6e8d 100755 --- a/configure +++ b/configure @@ -3363,7 +3363,7 @@ if test "$_fluidsynth" = yes ; then esac INCLUDES="$INCLUDES $FLUIDSYNTH_CFLAGS" fi -define_in_config_h_if_yes "$_fluidsynth" 'USE_FLUIDSYNTH' +define_in_config_if_yes "$_fluidsynth" 'USE_FLUIDSYNTH' echo "$_fluidsynth" # diff --git a/ports.mk b/ports.mk index 9a20331924..ed6781a1a9 100644 --- a/ports.mk +++ b/ports.mk @@ -96,6 +96,12 @@ ifdef USE_FLAC OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libFLAC.a endif +ifdef USE_FLUIDSYNTH +OSX_STATIC_LIBS += \ + -framework CoreAudio \ + $(STATICLIBPATH)/lib/libfluidsynth.a +endif + ifdef USE_MAD OSX_STATIC_LIBS += $(STATICLIBPATH)/lib/libmad.a endif -- cgit v1.2.3 From bd6751cb4a2cb5f34697392a82e8d5ab35a6a006 Mon Sep 17 00:00:00 2001 From: Vincent Hamm Date: Fri, 17 Aug 2012 21:38:20 -0700 Subject: CINE: Fix drawing of sprite with mask. Protects against cases where a non-existing script is referenced. --- engines/cine/gfx.cpp | 6 ++++++ engines/cine/script_fw.cpp | 17 +++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index cce8154d84..7a988227f6 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -1796,6 +1796,12 @@ void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 wi if(pMask) { spritePtr = pMask; } + + // ignore transparent color in 1bpp + if (bpp == 1) { + transparentColor = 1; + } + { for (int i = 0; i < height; i++) { byte *destPtr = page + x + y * 320; diff --git a/engines/cine/script_fw.cpp b/engines/cine/script_fw.cpp index a34bf7ba2c..9cbe3c3fab 100644 --- a/engines/cine/script_fw.cpp +++ b/engines/cine/script_fw.cpp @@ -533,7 +533,6 @@ void RawScript::setData(const FWScriptInfo &info, const byte *data) { * @return Precalculated script labels */ const ScriptVars &RawScript::labels() const { - assert(_data); return _labels; } @@ -687,7 +686,7 @@ const char *FWScript::getNextString() { * @param pos Restored script position */ void FWScript::load(const ScriptVars &labels, const ScriptVars &local, uint16 compare, uint16 pos) { - assert(pos < _script._size); + assert(pos <= _script._size); _labels = labels; _localVars = local; _compare = compare; @@ -705,13 +704,15 @@ void FWScript::load(const ScriptVars &labels, const ScriptVars &local, uint16 co int FWScript::execute() { int ret = 0; - while (!ret) { - _line = _pos; - byte opcode = getNextByte(); - OpFunc handler = _info->opcodeHandler(opcode); + if(_script._size) { + while (!ret) { + _line = _pos; + byte opcode = getNextByte(); + OpFunc handler = _info->opcodeHandler(opcode); - if (handler) { - ret = (this->*handler)(); + if (handler) { + ret = (this->*handler)(); + } } } -- cgit v1.2.3 From b1af75f2c38e1997577599308f75ee0d1299b13e Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Mon, 20 Aug 2012 21:10:40 +0200 Subject: SWORD25: Improve sound persistence. Keep track of volume/panning state, and don't restart sounds which already finished playing. --- engines/sword25/sfx/soundengine.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/engines/sword25/sfx/soundengine.cpp b/engines/sword25/sfx/soundengine.cpp index 78b2db19eb..69fae3dc4e 100644 --- a/engines/sword25/sfx/soundengine.cpp +++ b/engines/sword25/sfx/soundengine.cpp @@ -239,16 +239,20 @@ void SoundEngine::setSoundVolume(uint handle, float volume) { debugC(1, kDebugSound, "SoundEngine::setSoundVolume(%d, %f)", handle, volume); SndHandle* sndHandle = findHandle(handle); - if (sndHandle != NULL) + if (sndHandle != NULL) { + sndHandle->volume = volume; _mixer->setChannelVolume(sndHandle->handle, (byte)(volume * 255)); + } } void SoundEngine::setSoundPanning(uint handle, float pan) { debugC(1, kDebugSound, "SoundEngine::setSoundPanning(%d, %f)", handle, pan); SndHandle* sndHandle = findHandle(handle); - if (sndHandle != NULL) + if (sndHandle != NULL) { + sndHandle->pan = pan; _mixer->setChannelBalance(sndHandle->handle, (int8)(pan * 127)); + } } void SoundEngine::pauseSound(uint handle) { @@ -324,13 +328,16 @@ bool SoundEngine::canLoadResource(const Common::String &fileName) { return fname.hasSuffix(".ogg"); } - - bool SoundEngine::persist(OutputPersistenceBlock &writer) { +bool SoundEngine::persist(OutputPersistenceBlock &writer) { writer.write(_maxHandleId); for (uint i = 0; i < SOUND_HANDLES; i++) { writer.write(_handles[i].id); + // Don't restart sounds which already finished playing. + if (_handles[i].type != kFreeHandle && !_mixer->isSoundHandleActive(_handles[i].handle)) + _handles[i].type = kFreeHandle; + writer.writeString(_handles[i].fileName); writer.write((int)_handles[i].sndType); writer.write(_handles[i].volume); @@ -374,7 +381,8 @@ bool SoundEngine::unpersist(InputPersistenceBlock &reader) { reader.read(layer); if (reader.isGood()) { - playSoundEx(fileName, (SOUND_TYPES)sndType, volume, pan, loop, loopStart, loopEnd, layer, i); + if (sndType != kFreeHandle) + playSoundEx(fileName, (SOUND_TYPES)sndType, volume, pan, loop, loopStart, loopEnd, layer, i); } else return false; } -- cgit v1.2.3 From af05b1b80edfc8674845d6e42c9872fea9eeb381 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan SømaÌŠen Date: Sun, 12 Aug 2012 23:50:25 +0200 Subject: GRAPHICS: Reimplement the PNG-decoder using libpng --- configure | 2 +- graphics/decoders/png.cpp | 578 +++++++++++++--------------------------------- graphics/decoders/png.h | 78 +------ 3 files changed, 160 insertions(+), 498 deletions(-) diff --git a/configure b/configure index 06492ff305..f98c1c9ff2 100755 --- a/configure +++ b/configure @@ -97,7 +97,7 @@ _sndio=auto _timidity=auto _zlib=auto _sparkle=auto -_png=no +_png=auto _theoradec=auto _faad=auto _fluidsynth=auto diff --git a/graphics/decoders/png.cpp b/graphics/decoders/png.cpp index 492c69779f..f0471899a6 100644 --- a/graphics/decoders/png.cpp +++ b/graphics/decoders/png.cpp @@ -19,87 +19,23 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ +#define FORBIDDEN_SYMBOL_ALLOW_ALL +#include "common/scummsys.h" + +#ifdef USE_PNG +#include +#endif #include "graphics/decoders/png.h" #include "graphics/pixelformat.h" #include "graphics/surface.h" -#include "common/endian.h" -#include "common/memstream.h" #include "common/stream.h" -#include "common/types.h" -#include "common/util.h" -#include "common/zlib.h" - -// PNG decoder, based on the W3C specs: -// http://www.w3.org/TR/PNG/ -// Parts of the code have been adapted from LodePNG, by Lode Vandevenne: -// http://members.gamedev.net/lode/projects/LodePNG/ - -/* -LodePNG version 20101211 - -Copyright (c) 2005-2010 Lode Vandevenne - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. -*/ namespace Graphics { -enum PNGChunks { - // == Critical chunks ===================================================== - kChunkIHDR = MKTAG('I','H','D','R'), // Image header - kChunkIDAT = MKTAG('I','D','A','T'), // Image data - kChunkPLTE = MKTAG('P','L','T','E'), // Palette - kChunkIEND = MKTAG('I','E','N','D'), // Image trailer - // == Ancillary chunks ==================================================== - kChunktRNS = MKTAG('t','R','N','S') // Transparency - // All of the other ancillary chunks are ignored. They're added here for - // reference only. - // cHRM - Primary chromacities and white point - // gAMA - Image gamma - // iCCP - Embedded ICC profile - // sBIT - Significant bits - // sRGB - Standard RGB color space - // tEXT - Textual data - // sTXt - Compressed textual data - // iTXt - International textual data - // bKGD - Background color - // hIST - Image histogram - // pHYs - Physical pixel dimensions - // sPLT - Suggested palette - // tIME - Image last-modification time -}; - -// Refer to http://www.w3.org/TR/PNG/#9Filters -enum PNGFilters { - kFilterNone = 0, - kFilterSub = 1, - kFilterUp = 2, - kFilterAverage = 3, - kFilterPaeth = 4 -}; - -PNGDecoder::PNGDecoder() : _compressedBuffer(0), _compressedBufferSize(0), - _transparentColorSpecified(false), _outputSurface(0), _paletteEntries(0) { +PNGDecoder::PNGDecoder() : _outputSurface(0), _palette(0), _paletteColorCount(0) { } PNGDecoder::~PNGDecoder() { @@ -112,16 +48,43 @@ void PNGDecoder::destroy() { delete _outputSurface; _outputSurface = 0; } + delete[] _palette; + _palette = NULL; +} + +#ifdef USE_PNG +// libpng-error-handling: +void pngError(png_structp pngptr, png_const_charp errorMsg) { + error("%s", errorMsg); +} - _paletteEntries = 0; +void pngWarning(png_structp pngptr, png_const_charp warningMsg) { + warning("%s", warningMsg); } +// libpng-I/O-helper: +void pngReadFromStream(png_structp pngPtr, png_bytep data, png_size_t length) { + void *readIOptr = png_get_io_ptr(pngPtr); + Common::SeekableReadStream *stream = (Common::SeekableReadStream *)readIOptr; + stream->read(data, length); +} +#endif + +/* + * This code is based on Broken Sword 2.5 engine + * + * Copyright (c) Malte Thiesen, Daniel Queteschiner and Michael Elsdoerfer + * + * Licensed under GNU GPL v2 + * + */ + bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) { +#ifdef USE_PNG destroy(); - uint32 chunkLength = 0, chunkType = 0; _stream = &stream; - + // First, check the PNG signature if (_stream->readUint32BE() != MKTAG(0x89, 'P', 'N', 'G')) { delete _stream; @@ -132,374 +95,143 @@ bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) { return false; } - // Start reading chunks till we reach an IEND chunk - while (chunkType != kChunkIEND) { - // The chunk length does not include the type or CRC bytes - chunkLength = _stream->readUint32BE(); - chunkType = _stream->readUint32BE(); - - switch (chunkType) { - case kChunkIHDR: - readHeaderChunk(); - break; - case kChunkIDAT: - if (_compressedBufferSize == 0) { - _compressedBufferSize += chunkLength; - _compressedBuffer = (byte *)malloc(_compressedBufferSize); - _stream->read(_compressedBuffer, chunkLength); - } else { - // Expand the buffer - uint32 prevSize = _compressedBufferSize; - _compressedBufferSize += chunkLength; - byte *tmp = new byte[prevSize]; - memcpy(tmp, _compressedBuffer, prevSize); - free(_compressedBuffer); - _compressedBuffer = (byte *)malloc(_compressedBufferSize); - memcpy(_compressedBuffer, tmp, prevSize); - delete[] tmp; - _stream->read(_compressedBuffer + prevSize, chunkLength); - } - break; - case kChunkPLTE: // only available in indexed PNGs - if (_header.colorType != kIndexed) - error("A palette chunk has been found in a non-indexed PNG file"); - if (chunkLength % 3 != 0) - error("Palette chunk not divisible by 3"); - - _paletteEntries = chunkLength / 3; - _stream->read(_palette, _paletteEntries * 3); - memset(_paletteTransparency, 0xff, sizeof(_paletteTransparency)); - break; - case kChunkIEND: - // End of stream - break; - case kChunktRNS: - readTransparencyChunk(chunkLength); - break; - default: - // Skip the chunk content - _stream->skip(chunkLength); - break; - } - - if (chunkType != kChunkIEND) - _stream->skip(4); // skip the chunk CRC checksum + // The following is based on the guide provided in: + //http://www.libpng.org/pub/png/libpng-1.2.5-manual.html#section-3 + //http://www.libpng.org/pub/png/libpng-1.4.0-manual.pdf + // along with the png-loading code used in the sword25-engine. + png_structp pngPtr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if (!pngPtr) { + delete _stream; + return false; } - - // We no longer need the file stream, thus close it here - _stream = 0; - - // Unpack the compressed buffer - Common::MemoryReadStream *compData = new Common::MemoryReadStream(_compressedBuffer, _compressedBufferSize, DisposeAfterUse::YES); - _imageData = Common::wrapCompressedReadStream(compData); - - // Construct the final image - constructImage(); - - // Close the uncompressed stream, which will also delete the memory stream, - // and thus the original compressed buffer - delete _imageData; - - return true; -} - -/** - * Paeth predictor, used by PNG filter type 4 - * The parameters are of signed 16-bit integers, but should come - * from unsigned chars. The integers are only needed to make - * the paeth calculation correct. - * - * Taken from lodePNG, with a slight patch: - * http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/02/23/libpng-you-re-doing-it-wrong.aspx - */ -byte PNGDecoder::paethPredictor(int16 a, int16 b, int16 c) { - int16 pa = ABS(b - c); - int16 pb = ABS(a - c); - int16 pc = ABS(a + b - c - c); - - if (pa <= MIN(pb, pc)) - return (byte)a; - else if (pb <= pc) - return (byte)b; - else - return (byte)c; -} - -/** - * Unfilters a filtered PNG scan line. - * PNG filters are defined in: http://www.w3.org/TR/PNG/#9Filters - * Note that filters are always applied to bytes - * - * Taken from lodePNG - */ -void PNGDecoder::unfilterScanLine(byte *dest, const byte *scanLine, const byte *prevLine, uint16 byteWidth, byte filterType, uint16 length) { - uint16 i; - - switch (filterType) { - case kFilterNone: // no change - for (i = 0; i < length; i++) - dest[i] = scanLine[i]; - break; - case kFilterSub: // add the bytes to the left - for (i = 0; i < byteWidth; i++) - dest[i] = scanLine[i]; - for (i = byteWidth; i < length; i++) - dest[i] = scanLine[i] + dest[i - byteWidth]; - break; - case kFilterUp: // add the bytes of the above scanline - if (prevLine) { - for (i = 0; i < length; i++) - dest[i] = scanLine[i] + prevLine[i]; - } else { - for (i = 0; i < length; i++) - dest[i] = scanLine[i]; - } - break; - case kFilterAverage: // average value of the left and top left - if (prevLine) { - for (i = 0; i < byteWidth; i++) - dest[i] = scanLine[i] + prevLine[i] / 2; - for (i = byteWidth; i < length; i++) - dest[i] = scanLine[i] + ((dest[i - byteWidth] + prevLine[i]) / 2); - } else { - for (i = 0; i < byteWidth; i++) - dest[i] = scanLine[i]; - for (i = byteWidth; i < length; i++) - dest[i] = scanLine[i] + dest[i - byteWidth] / 2; - } - break; - case kFilterPaeth: // Paeth filter: http://www.w3.org/TR/PNG/#9Filter-type-4-Paeth - if (prevLine) { - for(i = 0; i < byteWidth; i++) - dest[i] = (scanLine[i] + prevLine[i]); // paethPredictor(0, prevLine[i], 0) is always prevLine[i] - for(i = byteWidth; i < length; i++) - dest[i] = (scanLine[i] + paethPredictor(dest[i - byteWidth], prevLine[i], prevLine[i - byteWidth])); - } else { - for(i = 0; i < byteWidth; i++) - dest[i] = scanLine[i]; - for(i = byteWidth; i < length; i++) - dest[i] = (scanLine[i] + dest[i - byteWidth]); // paethPredictor(dest[i - byteWidth], 0, 0) is always dest[i - byteWidth] - } - break; - default: - error("Unknown line filter"); + png_infop infoPtr = png_create_info_struct(pngPtr); + if (!infoPtr) { + png_destroy_read_struct(&pngPtr, NULL, NULL); + delete _stream; + return false; } - -} - -int PNGDecoder::getBytesPerPixel() const { - return (getNumColorChannels() * _header.bitDepth + 7) / 8; -} - -void PNGDecoder::constructImage() { - assert (_header.bitDepth != 0); - - int bytesPerPixel = getBytesPerPixel(); - int pitch = bytesPerPixel * _header.width; - byte *unfilteredSurface = new byte[pitch * _header.height]; - byte *dest = unfilteredSurface; - uint16 scanLineWidth = (_header.width * getNumColorChannels() * _header.bitDepth + 7) / 8; - byte *scanLine = new byte[scanLineWidth]; - byte *prevLine = 0; - - switch(_header.interlaceType) { - case kNonInterlaced: - for (uint16 y = 0; y < _header.height; y++) { - byte filterType = _imageData->readByte(); - _imageData->read(scanLine, scanLineWidth); - unfilterScanLine(dest, scanLine, prevLine, bytesPerPixel, filterType, scanLineWidth); - prevLine = dest; - dest += pitch; - } - break; - case kInterlaced: - // Theoretically, this shouldn't be needed, as interlacing is only - // useful for web images. Interlaced PNG images require more complex - // handling, so unless having support for such images is needed, there - // is no reason to add support for them. - error("TODO: Support for interlaced PNG images"); - break; + png_infop endInfo = png_create_info_struct(pngPtr); + if (!endInfo) { + png_destroy_read_struct(&pngPtr, &infoPtr, NULL); + delete _stream; + return false; } - delete[] scanLine; + png_set_error_fn(pngPtr, NULL, pngError, pngWarning); + // TODO: The manual says errors should be handled via setjmp - constructOutput(unfilteredSurface); - delete[] unfilteredSurface; -} + png_set_read_fn(pngPtr, _stream, pngReadFromStream); + png_set_crc_action(pngPtr, PNG_CRC_DEFAULT, PNG_CRC_WARN_USE); + // We already verified the PNG-header + png_set_sig_bytes(pngPtr, 8); -Graphics::PixelFormat PNGDecoder::findPixelFormat() const { - // Try to find the best pixel format based on what we have here - // Which is basically 8bpp for paletted non-transparent - // and 32bpp for everything else + // Read PNG header + png_read_info(pngPtr, infoPtr); - switch (_header.colorType) { - case kIndexed: - if (!_transparentColorSpecified) - return Graphics::PixelFormat::createFormatCLUT8(); - // fall through - case kGrayScale: - case kTrueColor: - case kGrayScaleWithAlpha: - case kTrueColorWithAlpha: - // We'll go with standard RGBA 32-bit - return Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0); - } - - error("Unknown PNG color type"); - return Graphics::PixelFormat(); -} + // No handling for unknown chunks yet. + int bitDepth, colorType, width, height, interlaceType; + png_uint_32 w, h; + png_get_IHDR(pngPtr, infoPtr, &w, &h, &bitDepth, &colorType, &interlaceType, NULL, NULL); + width = w; + height = h; -void PNGDecoder::constructOutput(const byte *surface) { + // Allocate memory for the final image data. + // To keep memory framentation low this happens before allocating memory for temporary image data. _outputSurface = new Graphics::Surface(); - _outputSurface->create(_header.width, _header.height, findPixelFormat()); - const byte *src = surface; - byte a = 0xFF; - int bytesPerPixel = getBytesPerPixel(); - - if (_header.colorType != kIndexed) { - if (_header.colorType == kTrueColor || - _header.colorType == kTrueColorWithAlpha) { - if (bytesPerPixel != 3 && bytesPerPixel != 4) - error("Unsupported truecolor PNG format"); - } else if (_header.colorType == kGrayScale || - _header.colorType == kGrayScaleWithAlpha) { - if (bytesPerPixel != 1 && bytesPerPixel != 2) - error("Unsupported grayscale PNG format"); + // Images of all color formats except PNG_COLOR_TYPE_PALETTE + // will be transformed into ARGB images + if (colorType == PNG_COLOR_TYPE_PALETTE && !png_get_valid(pngPtr, infoPtr, PNG_INFO_tRNS)) { + int numPalette = 0; + png_colorp palette = NULL; + uint32 success = png_get_PLTE(pngPtr, infoPtr, &palette, &numPalette); + if (success != PNG_INFO_PLTE) { + png_destroy_read_struct(&pngPtr, &infoPtr, NULL); + return false; } - - for (uint16 i = 0; i < _outputSurface->h; i++) { - for (uint16 j = 0; j < _outputSurface->w; j++) { - uint32 result = 0; - - switch (bytesPerPixel) { - case 1: // Grayscale - if (_transparentColorSpecified) - a = (src[0] == _transparentColor[0]) ? 0 : 0xFF; - result = _outputSurface->format.ARGBToColor(a, src[0], src[0], src[0]); - break; - case 2: // Grayscale + alpha - result = _outputSurface->format.ARGBToColor(src[1], src[0], src[0], src[0]); - break; - case 3: // RGB - if (_transparentColorSpecified) { - bool isTransparentColor = (src[0] == _transparentColor[0] && - src[1] == _transparentColor[1] && - src[2] == _transparentColor[2]); - a = isTransparentColor ? 0 : 0xFF; - } - - result = _outputSurface->format.ARGBToColor(a, src[0], src[1], src[2]); - break; - case 4: // RGBA - result = _outputSurface->format.ARGBToColor(src[3], src[0], src[1], src[2]); - break; - } - - *((uint32 *)_outputSurface->getBasePtr(j, i)) = result; - src += bytesPerPixel; - } + _paletteColorCount = numPalette; + _palette = new byte[_paletteColorCount * 3]; + for (int i = 0; i < _paletteColorCount; i++) { + _palette[(i * 3)] = palette[i].red; + _palette[(i * 3) + 1] = palette[i].green; + _palette[(i * 3) + 2] = palette[i].blue; + } + _outputSurface->create(width, height, Graphics::PixelFormat::createFormatCLUT8()); + png_set_packing(pngPtr); } else { - uint32 mask = (0xff >> (8 - _header.bitDepth)) << (8 - _header.bitDepth); - - // Convert the indexed surface to the target pixel format - for (uint16 i = 0; i < _outputSurface->h; i++) { - int data = 0; - int bitCount = 8; - const byte *src1 = src; - - for (uint16 j = 0; j < _outputSurface->w; j++) { - if (bitCount == 8) { - data = *src; - src++; - } - - byte index = (data & mask) >> (8 - _header.bitDepth); - data = (data << _header.bitDepth) & 0xff; - bitCount -= _header.bitDepth; - - if (bitCount == 0) - bitCount = 8; - - if (_transparentColorSpecified) { - byte r = _palette[index * 3 + 0]; - byte g = _palette[index * 3 + 1]; - byte b = _palette[index * 3 + 2]; - a = _paletteTransparency[index]; - *((uint32 *)_outputSurface->getBasePtr(j, i)) = _outputSurface->format.ARGBToColor(a, r, g, b); - } else { - *((byte *)_outputSurface->getBasePtr(j, i)) = index; - } - } - - src = src1 + _outputSurface->w; + _outputSurface->create(width, height, Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0)); + if (!_outputSurface->pixels) { + error("Could not allocate memory for output image."); } - } -} + if (bitDepth == 16) + png_set_strip_16(pngPtr); + if (bitDepth < 8) + png_set_expand(pngPtr); + if (png_get_valid(pngPtr, infoPtr, PNG_INFO_tRNS)) + png_set_expand(pngPtr); + if (colorType == PNG_COLOR_TYPE_GRAY || + colorType == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb(pngPtr); + + // PNGs are Big-Endian: +#ifdef SCUMM_LITTLE_ENDIAN + png_set_bgr(pngPtr); + png_set_swap_alpha(pngPtr); + if (colorType != PNG_COLOR_TYPE_RGB_ALPHA) + png_set_filler(pngPtr, 0xff, PNG_FILLER_BEFORE); +#else + if (colorType != PNG_COLOR_TYPE_RGB_ALPHA) + png_set_filler(pngPtr, 0xff, PNG_FILLER_AFTER); +#endif -void PNGDecoder::readHeaderChunk() { - _header.width = _stream->readUint32BE(); - _header.height = _stream->readUint32BE(); - _header.bitDepth = _stream->readByte(); - if (_header.bitDepth > 8) - error("Only PNGs with a bit depth of 1-8 bits are supported (i.e. PNG24)"); - _header.colorType = (PNGColorType)_stream->readByte(); - _header.compressionMethod = _stream->readByte(); - // Compression methods: http://www.w3.org/TR/PNG/#10Compression - // Only compression method 0 (deflate) is documented and supported - if (_header.compressionMethod != 0) - error("Unknown PNG compression method: %d", _header.compressionMethod); - _header.filterMethod = _stream->readByte(); - // Filter methods: http://www.w3.org/TR/PNG/#9Filters - // Only filter method 0 is documented and supported - if (_header.filterMethod != 0) - error("Unknown PNG filter method: %d", _header.filterMethod); - _header.interlaceType = (PNGInterlaceType)_stream->readByte(); -} - -byte PNGDecoder::getNumColorChannels() const { - switch (_header.colorType) { - case kGrayScale: - return 1; // Gray - case kTrueColor: - return 3; // RGB - case kIndexed: - return 1; // Indexed - case kGrayScaleWithAlpha: - return 2; // Gray + Alpha - case kTrueColorWithAlpha: - return 4; // RGBA - default: - error("Unknown color type"); } -} + + // After the transformations have been registered, the image data is read again. + png_read_update_info(pngPtr, infoPtr); + png_get_IHDR(pngPtr, infoPtr, &w, &h, &bitDepth, &colorType, NULL, NULL, NULL); + width = w; + height = h; + + if (interlaceType == PNG_INTERLACE_NONE) { + // PNGs without interlacing can simply be read row by row. + for (int i = 0; i < height; i++) { + png_read_row(pngPtr, (png_bytep)_outputSurface->getBasePtr(0, i), NULL); + } + } else { + // PNGs with interlacing require us to allocate an auxillary + // buffer with pointers to all row starts. + + // Allocate row pointer buffer + png_bytep *rowPtr = new png_bytep[height]; + if (!rowPtr) { + error("Could not allocate memory for row pointers."); + } + + // Initialize row pointers + for (int i = 0; i < height; i++) + rowPtr[i] = (png_bytep)_outputSurface->getBasePtr(0, i); + + // Read image data + png_read_image(pngPtr, rowPtr); + + // Free row pointer buffer + delete[] rowPtr; + } + + // Read additional data at the end. + png_read_end(pngPtr, NULL); -void PNGDecoder::readTransparencyChunk(uint32 chunkLength) { - _transparentColorSpecified = true; + // Destroy libpng structures + png_destroy_read_struct(&pngPtr, &infoPtr, NULL); - switch(_header.colorType) { - case kGrayScale: - _transparentColor[0] = _stream->readUint16BE(); - _transparentColor[1] = _transparentColor[0]; - _transparentColor[2] = _transparentColor[0]; - break; - case kTrueColor: - _transparentColor[0] = _stream->readUint16BE(); - _transparentColor[1] = _stream->readUint16BE(); - _transparentColor[2] = _stream->readUint16BE(); - break; - case kIndexed: - _stream->read(_paletteTransparency, chunkLength); + // We no longer need the file stream, thus close it here + _stream = 0; - // A transparency chunk may have less entries - // than the palette entries. The remaining ones - // are unmodified (set to 255). Check here: - // http://www.w3.org/TR/PNG/#11tRNS - break; - default: - error("Transparency chunk found in a PNG that has a separate transparency channel"); - } + return true; +#else + return false; +#endif } } // End of Graphics namespace diff --git a/graphics/decoders/png.h b/graphics/decoders/png.h index ca204f6dd3..e52ddabd7d 100644 --- a/graphics/decoders/png.h +++ b/graphics/decoders/png.h @@ -24,33 +24,12 @@ * PNG decoder used in engines: * - sword25 * Dependencies: - * - zlib + * - libpng */ #ifndef GRAPHICS_PNG_H #define GRAPHICS_PNG_H -// PNG decoder, based on the W3C specs: -// http://www.w3.org/TR/PNG/ -// Parts of the code have been adapted from LodePNG, by Lode Vandevenne: -// http://members.gamedev.net/lode/projects/LodePNG/ - -// All the numbers are BE: http://www.w3.org/TR/PNG/#7Integers-and-byte-order - -// Note: At the moment, this decoder only supports non-interlaced images, and -// does not support truecolor/grayscale images with 16bit depth. -// -// Theoretically, interlaced images shouldn't be needed for games, as -// interlacing is only useful for images in websites. -// -// PNG images with 16bit depth (i.e. 48bit images) are quite rare, and can -// theoretically contain more than 16.7 millions of colors (the so-called "deep -// color" representation). In essence, each of the R, G, B and A components in -// them is specified with 2 bytes, instead of 1. However, the PNG specification -// always refers to color components with 1 byte each, so this part of the spec -// is a bit unclear. For now, these won't be supported, until a suitable sample -// is found. - #include "common/scummsys.h" #include "common/textconsole.h" #include "graphics/decoders/image_decoder.h" @@ -73,62 +52,13 @@ public: void destroy(); const Graphics::Surface *getSurface() const { return _outputSurface; } const byte *getPalette() const { return _palette; } - uint16 getPaletteColorCount() const { return _paletteEntries; } - + uint16 getPaletteColorCount() const { return _paletteColorCount; } private: - enum PNGColorType { - kGrayScale = 0, // bit depths: 1, 2, 4, 8, 16 - kTrueColor = 2, // bit depths: 8, 16 - kIndexed = 3, // bit depths: 1, 2, 4, 8 - kGrayScaleWithAlpha = 4, // bit depths: 8, 16 - kTrueColorWithAlpha = 6 // bit depths: 8, 16 - }; - - enum PNGInterlaceType { - kNonInterlaced = 0, - kInterlaced = 1 - }; - - struct PNGHeader { - uint32 width; - uint32 height; - byte bitDepth; - PNGColorType colorType; - byte compressionMethod; - byte filterMethod; - PNGInterlaceType interlaceType; - }; - - void readHeaderChunk(); - byte getNumColorChannels() const; - - void readPaletteChunk(); - void readTransparencyChunk(uint32 chunkLength); - - void constructImage(); - void unfilterScanLine(byte *dest, const byte *scanLine, const byte *prevLine, uint16 byteWidth, byte filterType, uint16 length); - byte paethPredictor(int16 a, int16 b, int16 c); - - // The original file stream Common::SeekableReadStream *_stream; - // The unzipped image data stream - Common::SeekableReadStream *_imageData; - - PNGHeader _header; - - byte _palette[256 * 3]; // RGB - byte _paletteTransparency[256]; - uint16 _paletteEntries; - uint16 _transparentColor[3]; - bool _transparentColorSpecified; - - byte *_compressedBuffer; - uint32 _compressedBufferSize; + byte *_palette; + uint16 _paletteColorCount; Graphics::Surface *_outputSurface; - Graphics::PixelFormat findPixelFormat() const; - int getBytesPerPixel() const; - void constructOutput(const byte *surface); }; } // End of namespace Graphics -- cgit v1.2.3 From f34924bc3940ff1f9972ed4920feb7e5708f3099 Mon Sep 17 00:00:00 2001 From: upthorn Date: Mon, 9 Jul 2012 04:25:08 -0700 Subject: SWORD25: Fix loading savegames on 64-bit archs. --- engines/sword25/util/pluto/pluto.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/sword25/util/pluto/pluto.cpp b/engines/sword25/util/pluto/pluto.cpp index d645e5ed2a..b7f5e30340 100644 --- a/engines/sword25/util/pluto/pluto.cpp +++ b/engines/sword25/util/pluto/pluto.cpp @@ -895,10 +895,10 @@ static void unpersistnumber(UnpersistInfo *upi) static void unpersiststring(UnpersistInfo *upi) { /* perms reftbl sptbl ref */ - int length; + size_t length; char* string; lua_checkstack(upi->L, 1); - verify(LIF(Z,read)(&upi->zio, &length, sizeof(int)) == 0); + verify(LIF(Z,read)(&upi->zio, &length, sizeof(size_t)) == 0); string = pdep_newvector(upi->L, length, char); verify(LIF(Z,read)(&upi->zio, string, length) == 0); lua_pushlstring(upi->L, string, length); -- cgit v1.2.3 From 6c155b6b36f77a932a54e9b01c08f938c73e24eb Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 20 Aug 2012 17:06:58 -0400 Subject: VIDEO: Implement rewinding Smacker audio tracks --- video/smk_decoder.cpp | 7 ++++++- video/smk_decoder.h | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp index d01ec730f4..bea65142a1 100644 --- a/video/smk_decoder.cpp +++ b/video/smk_decoder.cpp @@ -410,7 +410,6 @@ void SmackerDecoder::close() { bool SmackerDecoder::rewind() { // Call the parent method to rewind the tracks first - // In particular, only videos without sound can be rewound if (!VideoDecoder::rewind()) return false; @@ -755,6 +754,12 @@ SmackerDecoder::SmackerAudioTrack::~SmackerAudioTrack() { delete _audioStream; } +bool SmackerDecoder::SmackerAudioTrack::rewind() { + delete _audioStream; + _audioStream = Audio::makeQueuingAudioStream(_audioInfo.sampleRate, _audioInfo.isStereo); + return true; +} + Audio::AudioStream *SmackerDecoder::SmackerAudioTrack::getAudioStream() const { return _audioStream; } diff --git a/video/smk_decoder.h b/video/smk_decoder.h index 6bded64a37..7227238373 100644 --- a/video/smk_decoder.h +++ b/video/smk_decoder.h @@ -156,6 +156,9 @@ private: SmackerAudioTrack(const AudioInfo &audioInfo, Audio::Mixer::SoundType soundType); ~SmackerAudioTrack(); + bool isRewindable() const { return true; } + bool rewind(); + Audio::Mixer::SoundType getSoundType() const { return _soundType; } void queueCompressedBuffer(byte *buffer, uint32 bufferSize, uint32 unpackedSize); -- cgit v1.2.3 From eff6ea09fbf1b64bc37011e5c94cf8798f658150 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 21 Aug 2012 02:13:19 +0200 Subject: Revert "CONFIGURE: Don't disable the sword25 engine when libpng is not found" This reverts commit 7543c3ba5fcc914a4031fc8328aacd3d28c7055d. We depend on libpng for PNG decoding again, thus disable sword25 when libpng is not available. --- configure | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure b/configure index 5ab145c5f4..4b54832294 100755 --- a/configure +++ b/configure @@ -3201,6 +3201,11 @@ fi define_in_config_if_yes "$_png" 'USE_PNG' echo "$_png" +if test `get_engine_build sword25` = yes && test ! "$_png" = yes ; then + echo "...disabling Broken Sword 2.5 engine. PNG is required" + engine_disable sword25 +fi + # # Check for Theora Decoder # -- cgit v1.2.3 From 5df8c99768205ad6e2380dbc7cbc838e4ab5cc85 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 21 Aug 2012 02:17:45 +0200 Subject: GPRAHICS: Slight cleanup in png.cpp. This adds an explanation why we use FORBIDDEN_SYMBOL_ALLOW_ALL and removes some trailing whitespaces. --- graphics/decoders/png.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/graphics/decoders/png.cpp b/graphics/decoders/png.cpp index f0471899a6..bfaab6dc35 100644 --- a/graphics/decoders/png.cpp +++ b/graphics/decoders/png.cpp @@ -19,6 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ + +// Since we need to work with libpng here, we need to allow all symbols +// to avoid compilation issues. #define FORBIDDEN_SYMBOL_ALLOW_ALL #include "common/scummsys.h" @@ -84,7 +87,7 @@ bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) { destroy(); _stream = &stream; - + // First, check the PNG signature if (_stream->readUint32BE() != MKTAG(0x89, 'P', 'N', 'G')) { delete _stream; @@ -155,7 +158,7 @@ bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) { _palette[(i * 3)] = palette[i].red; _palette[(i * 3) + 1] = palette[i].green; _palette[(i * 3) + 2] = palette[i].blue; - + } _outputSurface->create(width, height, Graphics::PixelFormat::createFormatCLUT8()); png_set_packing(pngPtr); @@ -173,7 +176,7 @@ bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) { if (colorType == PNG_COLOR_TYPE_GRAY || colorType == PNG_COLOR_TYPE_GRAY_ALPHA) png_set_gray_to_rgb(pngPtr); - + // PNGs are Big-Endian: #ifdef SCUMM_LITTLE_ENDIAN png_set_bgr(pngPtr); @@ -186,7 +189,7 @@ bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) { #endif } - + // After the transformations have been registered, the image data is read again. png_read_update_info(pngPtr, infoPtr); png_get_IHDR(pngPtr, infoPtr, &w, &h, &bitDepth, &colorType, NULL, NULL, NULL); @@ -201,24 +204,24 @@ bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) { } else { // PNGs with interlacing require us to allocate an auxillary // buffer with pointers to all row starts. - + // Allocate row pointer buffer png_bytep *rowPtr = new png_bytep[height]; if (!rowPtr) { error("Could not allocate memory for row pointers."); } - + // Initialize row pointers for (int i = 0; i < height; i++) rowPtr[i] = (png_bytep)_outputSurface->getBasePtr(0, i); - + // Read image data png_read_image(pngPtr, rowPtr); - + // Free row pointer buffer delete[] rowPtr; } - + // Read additional data at the end. png_read_end(pngPtr, NULL); -- cgit v1.2.3 From 9568b78babdbdf350fd6c47b261c3f21902c31fc Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 21 Aug 2012 03:28:34 +0300 Subject: SCI: Use a simpler atan implementation for kGetAngle in SCI1 and newer games SCI1 games (QFG2 and newer) use a simpler and more accurate atan implementation for kGetAngle. This properly fixes bug #3540976. --- engines/sci/engine/kmath.cpp | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp index a643fbe37a..4b8fadbb84 100644 --- a/engines/sci/engine/kmath.cpp +++ b/engines/sci/engine/kmath.cpp @@ -84,27 +84,10 @@ reg_t kSqrt(EngineState *s, int argc, reg_t *argv) { * accurate. */ uint16 kGetAngleWorker(int16 x1, int16 y1, int16 x2, int16 y2) { - // TODO: This has been implemented based on behavior observed with a test - // program created with SCI Studio. However, the return values have subtle - // differences from the original, which uses custom implementation of atan(). - // The differences in the return values are the cause of bug #3540976 - // and perhaps bug #3037267 as well. - // The results of this function match the expected results of SCI0, but not - // SCI1 (hence the bug in Longbow). We need to find the point in history - // when this function was changed. - - // HACK: Return the expected value for Longbow, scene 150 (bug #3540976). - // This is a temporary solution, till the function returns the expected - // results. - if (g_sci->getGameId() == GID_LONGBOW && g_sci->getEngineState()->currentRoomNumber() == 150) { - if (x1 == 207 && y1 == 88 && x2 == 107 && y2 == 184) - return 226; - } - -#if 0 - // A simpler atan2-based implementation - return (int16)(360 - atan2((double)(x1 - x2), (double)(y1 - y2)) * 57.2958) % 360; -#endif + // SCI1 games (QFG2 and newer) use a simple atan implementation. SCI0 games + // use a somewhat less accurate calculation (below). + if (getSciVersion() >= SCI_VERSION_1_EGA_ONLY) + return (int16)(360 - atan2((double)(x1 - x2), (double)(y1 - y2)) * 57.2958) % 360; int16 xRel = x2 - x1; int16 yRel = y1 - y2; // y-axis is mirrored. -- cgit v1.2.3 From 1a61056b06dc4ea5fe534f6ff13eb4e281bb9c03 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 21 Aug 2012 03:29:55 +0300 Subject: SCI: Extend a workaround for the dream sequence in QFG4 --- engines/sci/engine/workarounds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp index a4c2355e8f..9fa0368784 100644 --- a/engines/sci/engine/workarounds.cpp +++ b/engines/sci/engine/workarounds.cpp @@ -399,7 +399,7 @@ const SciWorkaroundEntry kUnLoad_workarounds[] = { { GID_LSL6, 740, 740, 0, "showCartoon", "changeState", -1, 0, { WORKAROUND_IGNORE, 0 } }, // during ending, 4 additional parameters are passed by accident { GID_LSL6HIRES, 130, 130, 0, "recruitLarryScr", "changeState", -1, 0, { WORKAROUND_IGNORE, 0 } }, // during intro, a 3rd parameter is passed by accident { GID_SQ1, 43, 303, 0, "slotGuy", "dispose", -1, 0, { WORKAROUND_IGNORE, 0 } }, // when leaving ulence flats bar, parameter 1 is not passed - script error - { GID_QFG4, 770, 110, 0, "dreamer", "dispose", -1, 0, { WORKAROUND_IGNORE, 0 } }, // during the dream sequence, a 3rd parameter is passed by accident + { GID_QFG4, -1, 110, 0, "dreamer", "dispose", -1, 0, { WORKAROUND_IGNORE, 0 } }, // during the dream sequence, a 3rd parameter is passed by accident SCI_WORKAROUNDENTRY_TERMINATOR }; -- cgit v1.2.3 From 7d436622a8e10437488f6dfa930e3ff15e254a55 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 21 Aug 2012 03:31:00 +0300 Subject: SCI: More work on kRemapColors This implements some more color remap-based palette effects, found in QFG4 --- engines/sci/engine/kgraphics32.cpp | 21 ++++++++++++--------- engines/sci/graphics/palette.cpp | 21 +++++++++++++++++++++ engines/sci/graphics/palette.h | 1 + 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index 685b3c0bd3..8b3afeef99 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -771,20 +771,23 @@ reg_t kRemapColors32(EngineState *s, int argc, reg_t *argv) { } break; case 3: { // remap to gray - // Example call: QFG4 room 490 (Baba Yaga's hut) - params are color 253, 75% and 0 + // Example call: QFG4 room 490 (Baba Yaga's hut) - params are color 253, 75% and 0. + // In this room, it's used for the cloud before Baba Yaga appears. int16 color = argv[1].toSint16(); int16 percent = argv[2].toSint16(); // 0 - 100 - uint16 unk3 = (argc >= 4) ? argv[3].toUint16() : 0; - warning("kRemapColors: RemapToGray color %d by %d percent (unk3 = %d)", color, percent, unk3); - // TODO + if (argc >= 4) + warning("RemapToGray called with 4 parameters, unknown parameter is %d", argv[3].toUint16()); + g_sci->_gfxPalette->setRemappingPercentGray(color, percent); } break; case 4: { // remap to percent gray - //int16 unk1 = argv[1].toSint16(); - //uint16 unk2 = argv[2].toUint16(); - //uint16 unk3 = argv[3].toUint16(); - //uint16 unk4 = (argc >= 5) ? argv[4].toUint16() : 0; - kStub(s, argc, argv); + // Example call: QFG4 rooms 530/535 (swamp) - params are 253, 100%, 200 + int16 color = argv[1].toSint16(); + int16 percent = argv[2].toSint16(); // 0 - 100 + // argv[3] is unknown (a number, e.g. 200) - start color, perhaps? + if (argc >= 5) + warning("RemapToGrayPercent called with 5 parameters, unknown parameter is %d", argv[4].toUint16()); + g_sci->_gfxPalette->setRemappingPercentGray(color, percent); } break; case 5: { // don't map to range diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index 68104b0ac8..53d69cdcca 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -375,6 +375,27 @@ void GfxPalette::setRemappingPercent(byte color, byte percent) { _remappingType[color] = kRemappingByPercent; } +void GfxPalette::setRemappingPercentGray(byte color, byte percent) { + _remapOn = true; + + // We need to defer the setup of the remapping table every time the screen + // palette is changed, so that kernelFindColor() can find the correct + // colors. Set it once here, in case the palette stays the same and update + // it on each palette change by copySysPaletteToScreen(). + _remappingPercentToSet = percent; + + // Note: This is not what the original does, but the results are the same visually + for (int i = 0; i < 256; i++) { + byte rComponent = _sysPalette.colors[i].r * _remappingPercentToSet * 0.30 / 100; + byte gComponent = _sysPalette.colors[i].g * _remappingPercentToSet * 0.59 / 100; + byte bComponent = _sysPalette.colors[i].b * _remappingPercentToSet * 0.11 / 100; + byte luminosity = rComponent + gComponent + bComponent; + _remappingByPercent[i] = kernelFindColor(luminosity, luminosity, luminosity); + } + + _remappingType[color] = kRemappingByPercent; +} + void GfxPalette::setRemappingRange(byte color, byte from, byte to, byte base) { _remapOn = true; diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h index 9898315897..e974781d49 100644 --- a/engines/sci/graphics/palette.h +++ b/engines/sci/graphics/palette.h @@ -61,6 +61,7 @@ public: void resetRemapping(); void setRemappingPercent(byte color, byte percent); + void setRemappingPercentGray(byte color, byte percent); void setRemappingRange(byte color, byte from, byte to, byte base); bool isRemapped(byte color) const { return _remapOn && (_remappingType[color] != kRemappingNone); -- cgit v1.2.3 From a391599403faf864f1583ababdba577fb6393afd Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 21 Aug 2012 11:55:21 +0300 Subject: SCI: Update a comment --- engines/sci/graphics/frameout.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 0098728e5d..6628247127 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -728,7 +728,9 @@ void GfxFrameout::kernelFrameout() { g_sci->_gfxCompare->setNSRect(itemEntry->object, nsRect); } - // FIXME: When does this happen, and why? + // Don't attempt to draw sprites that are outside the visible + // screen area. An example is the random people walking in + // Jackson Square in GK1. if (itemEntry->celRect.bottom < 0 || itemEntry->celRect.top >= _screen->getDisplayHeight() || itemEntry->celRect.right < 0 || itemEntry->celRect.left >= _screen->getDisplayWidth()) continue; -- cgit v1.2.3 From 1d58ebe133c274643a89f2f4f0d24a2a8ab343c3 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Tue, 21 Aug 2012 16:21:10 +0200 Subject: PS3: Force use of freetype from ps3toolchain --- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 4b54832294..5c6deace41 100755 --- a/configure +++ b/configure @@ -2079,8 +2079,9 @@ case $_host_os in DEFINES="$DEFINES -D__PLAYSTATION2__" ;; ps3) - # Force use of SDL from the ps3 toolchain + # Force use of SDL and freetype from the ps3 toolchain _sdlpath="$PS3DEV/portlibs/ppu:$PS3DEV/portlibs/ppu/bin" + _freetypepath="$PS3DEV/portlibs/ppu:$PS3DEV/portlibs/ppu/bin" DEFINES="$DEFINES -DPLAYSTATION3" CXXFLAGS="$CXXFLAGS -mcpu=cell -mminimal-toc -I$PSL1GHT/ppu/include -I$PS3DEV/portlibs/ppu/include" -- cgit v1.2.3 From 829c836e0b86edc07aed4ed1846ac19ba76c6788 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 23 Aug 2012 22:44:02 -0400 Subject: VIDEO: Update the isPlaying() comment --- video/video_decoder.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/video/video_decoder.h b/video/video_decoder.h index 5fba85358c..5abe1d917c 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -117,7 +117,11 @@ public: /** * Returns if the video is currently playing or not. - * @todo Differentiate this function from endOfVideo() + * + * This is not equivalent to the inverse of endOfVideo(). A video keeps + * its playing status even after reaching the end of the video. This will + * return true after calling start() and will continue to return true + * until stop() (or close()) is called. */ bool isPlaying() const { return _isPlaying; } -- cgit v1.2.3 From dcdb40f79e4e02101ddd7c017762ec61298f1833 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 23 Aug 2012 23:11:09 -0400 Subject: VIDEO: Adjust start time after calling rewind() in start() This wasn't an actual bug, but it makes more sense this way --- video/video_decoder.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 14826642d7..559880acee 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -347,14 +347,14 @@ void VideoDecoder::start() { _isPlaying = true; _startTime = g_system->getMillis(); - // Adjust start time if we've seeked to something besides zero time - if (_lastTimeChange.totalNumberOfFrames() != 0) - _startTime -= _lastTimeChange.msecs(); - // If someone previously called stop(), we'll rewind it. if (_needsRewind) rewind(); + // Adjust start time if we've seeked to something besides zero time + if (_lastTimeChange.totalNumberOfFrames() != 0) + _startTime -= _lastTimeChange.msecs(); + startAudio(); } -- cgit v1.2.3 From c7222ed5a4428c51cdf325fc0eb172f46a991d86 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 25 Aug 2012 12:30:28 -0400 Subject: VIDEO: Remove obsolete FIXME in the FLIC code --- video/flic_decoder.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/video/flic_decoder.cpp b/video/flic_decoder.cpp index 564d73a9d7..1a0627615b 100644 --- a/video/flic_decoder.cpp +++ b/video/flic_decoder.cpp @@ -164,9 +164,6 @@ const Graphics::Surface *FlicDecoder::FlicVideoTrack::decodeNextFrame() { switch (frameType) { case FRAME_TYPE: { - // FIXME: FLIC should be switched over to a variable frame rate VideoDecoder to handle - // this properly. - chunkCount = _fileStream->readUint16LE(); // Note: The overridden delay is a 16-bit integer (word), whereas the normal delay is a 32-bit integer (dword) // the frame delay is the FLIC "speed", in milliseconds. -- cgit v1.2.3 From 6f9d84665fd090ae55386b1373a69e080b34e089 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 26 Aug 2012 12:38:35 -0400 Subject: COMMON: Add MKTAG16 for 16-bit multi-character constants --- common/endian.h | 6 ++++++ common/winexe_pe.cpp | 2 +- video/avi_decoder.cpp | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/common/endian.h b/common/endian.h index 394437ec67..759513efef 100644 --- a/common/endian.h +++ b/common/endian.h @@ -146,6 +146,12 @@ */ #define MKTAG(a0,a1,a2,a3) ((uint32)((a3) | ((a2) << 8) | ((a1) << 16) | ((a0) << 24))) +/** + * A wrapper macro used around two character constants, like 'wb', to + * ensure portability. Typical usage: MKTAG16('w','b'). + */ +#define MKTAG16(a0,a1) ((uint16)((a1) | ((a0) << 8))) + // Functions for reading/writing native integers. // They also transparently handle the need for alignment. diff --git a/common/winexe_pe.cpp b/common/winexe_pe.cpp index 6c0f9c9962..b3c45ffe73 100644 --- a/common/winexe_pe.cpp +++ b/common/winexe_pe.cpp @@ -64,7 +64,7 @@ bool PEResources::loadFromEXE(SeekableReadStream *stream) { if (!stream) return false; - if (stream->readUint16BE() != 'MZ') + if (stream->readUint16BE() != MKTAG16('M', 'Z')) return false; stream->skip(58); diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp index 0850d5656a..09b95d38ad 100644 --- a/video/avi_decoder.cpp +++ b/video/avi_decoder.cpp @@ -334,14 +334,14 @@ void AVIDecoder::readNextPacket() { _fileStream->skip(chunkSize & 1); if (track->getTrackType() == Track::kTrackTypeAudio) { - if (getStreamType(nextTag) != 'wb') + if (getStreamType(nextTag) != MKTAG16('w', 'b')) error("Invalid audio track tag '%s'", tag2str(nextTag)); ((AVIAudioTrack *)track)->queueSound(chunk); } else { AVIVideoTrack *videoTrack = (AVIVideoTrack *)track; - if (getStreamType(nextTag) == 'pc') { + if (getStreamType(nextTag) == MKTAG16('p', 'c')) { // Palette Change byte firstEntry = chunk->readByte(); uint16 numEntries = chunk->readByte(); @@ -362,7 +362,7 @@ void AVIDecoder::readNextPacket() { delete chunk; videoTrack->markPaletteDirty(); - } else if (getStreamType(nextTag) == 'db') { + } else if (getStreamType(nextTag) == MKTAG16('d', 'b')) { // TODO: Check if this really is uncompressed. Many videos // falsely put compressed data in here. error("Uncompressed AVI frame found"); -- cgit v1.2.3 From 18e7573dafbffdd509943c8f90f91933b17b0435 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 26 Aug 2012 15:13:57 -0400 Subject: NEWS: Mention VideoDecoder rewrite --- NEWS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 3f5f10ce05..26f3640336 100644 --- a/NEWS +++ b/NEWS @@ -2,7 +2,8 @@ For a more comprehensive changelog of the latest experimental code, see: https://github.com/scummvm/scummvm/commits/ 1.6.0 (????-??-??) - + General: + - Rewrote VideoDecoder subsystem. 1.5.0 (2012-07-27) New Games: -- cgit v1.2.3 From 3e2ff0a4437224a5d9de0b63d983e414b236992a Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 26 Aug 2012 20:30:32 -0400 Subject: VIDEO: Fix compilation with some compilers --- video/coktel_decoder.cpp | 12 ++++++++++-- video/coktel_decoder.h | 9 +++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp index 6a60b0e7d7..5d7efe87af 100644 --- a/video/coktel_decoder.cpp +++ b/video/coktel_decoder.cpp @@ -288,6 +288,14 @@ void CoktelDecoder::close() { _isPaused = false; } +Audio::Mixer::SoundType CoktelDecoder::getSoundType() const { + return _soundType; +} + +Audio::AudioStream *CoktelDecoder::getAudioStream() const { + return _audioStream; +} + uint16 CoktelDecoder::getWidth() const { return _width; } @@ -2847,11 +2855,11 @@ AdvancedVMDDecoder::VMDAudioTrack::VMDAudioTrack(VMDDecoder *decoder) : _decoder } Audio::Mixer::SoundType AdvancedVMDDecoder::VMDAudioTrack::getSoundType() const { - return _decoder->_soundType; + return _decoder->getSoundType(); } Audio::AudioStream *AdvancedVMDDecoder::VMDAudioTrack::getAudioStream() const { - return _decoder->_audioStream; + return _decoder->getAudioStream(); } } // End of namespace Video diff --git a/video/coktel_decoder.h b/video/coktel_decoder.h index 2a97eadf00..91d52b65e6 100644 --- a/video/coktel_decoder.h +++ b/video/coktel_decoder.h @@ -98,6 +98,8 @@ public: /** Override the video's frame rate. */ void setFrameRate(Common::Rational frameRate); + /** Get the video's frame rate. */ + Common::Rational getFrameRate() const; /** Get the video's default X position. */ uint16 getDefaultX() const; @@ -165,6 +167,11 @@ public: /** Close the video. */ void close(); + /** Get the Mixer SoundType audio is being played with. */ + Audio::Mixer::SoundType getSoundType() const; + /** Get the AudioStream for the audio. */ + Audio::AudioStream *getAudioStream() const; + uint16 getWidth() const; uint16 getHeight() const; virtual Graphics::PixelFormat getPixelFormat() const = 0; @@ -237,8 +244,6 @@ protected: bool evaluateSeekFrame(int32 &frame, int whence) const; - Common::Rational getFrameRate() const; - // Surface management bool hasSurface(); void createSurface(); -- cgit v1.2.3 From d2fb451f9ebf3f4131eb3ecd3d4de3523b305fdd Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 27 Aug 2012 11:41:47 +0100 Subject: I18N: Add Galician translation from patch #3557885 --- po/gl_ES.po | 3092 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 3092 insertions(+) create mode 100644 po/gl_ES.po diff --git a/po/gl_ES.po b/po/gl_ES.po new file mode 100644 index 0000000000..d08867b717 --- /dev/null +++ b/po/gl_ES.po @@ -0,0 +1,3092 @@ +# LANGUAGE translation for ScummVM. +# Copyright (C) YEAR ScummVM Team +# This file is distributed under the same license as the ScummVM package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: ScummVM 1.6.0git\n" +"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" +"POT-Creation-Date: 2012-08-12 14:57+0200\n" +"PO-Revision-Date: 2012-08-15 13:33+0100\n" +"Last-Translator: Santiago G. Sanz \n" +"Language-Team: \n" +"Language: Galego\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gui/about.cpp:91 +#, c-format +msgid "(built on %s)" +msgstr "(compilado o %s)" + +#: gui/about.cpp:98 +msgid "Features compiled in:" +msgstr "Funcionalidades compiladas:" + +#: gui/about.cpp:107 +msgid "Available engines:" +msgstr "Motores dispoñibles:" + +#: gui/browser.cpp:66 +msgid "Go up" +msgstr "Arriba" + +#: gui/browser.cpp:66 gui/browser.cpp:68 +msgid "Go to previous directory level" +msgstr "Ir ao directorio superior" + +#: gui/browser.cpp:68 +msgctxt "lowres" +msgid "Go up" +msgstr "Arriba" + +#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 +#: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 +#: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/themebrowser.cpp:54 engines/engine.cpp:442 +#: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 +#: backends/events/default/default-events.cpp:191 +#: backends/events/default/default-events.cpp:213 +msgid "Cancel" +msgstr "Cancelar" + +#: gui/browser.cpp:70 gui/chooser.cpp:46 gui/themebrowser.cpp:55 +msgid "Choose" +msgstr "Elexir" + +#: gui/gui-manager.cpp:115 engines/scumm/help.cpp:125 +#: engines/scumm/help.cpp:140 engines/scumm/help.cpp:165 +#: engines/scumm/help.cpp:191 engines/scumm/help.cpp:209 +#: backends/keymapper/remap-dialog.cpp:52 +msgid "Close" +msgstr "Pechar" + +#: gui/gui-manager.cpp:118 +msgid "Mouse click" +msgstr "Premer co rato" + +#: gui/gui-manager.cpp:122 base/main.cpp:300 +msgid "Display keyboard" +msgstr "Mostrar teclado" + +#: gui/gui-manager.cpp:126 base/main.cpp:304 +msgid "Remap keys" +msgstr "Asignar teclas" + +#: gui/gui-manager.cpp:129 base/main.cpp:307 +msgid "Toggle FullScreen" +msgstr "Activar/desactivar pantalla completa" + +#: gui/KeysDialog.h:36 gui/KeysDialog.cpp:145 +msgid "Choose an action to map" +msgstr "Elixe unha acción para asignala" + +#: gui/KeysDialog.cpp:41 +msgid "Map" +msgstr "Asignar" + +#: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 +#: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 +#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 +#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 +#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 +#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 +#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 +#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 +#: backends/platform/wince/CELauncherDialog.cpp:54 +msgid "OK" +msgstr "Aceptar" + +#: gui/KeysDialog.cpp:49 +msgid "Select an action and click 'Map'" +msgstr "Selecciona unha acción e preme en Asignar" + +#: gui/KeysDialog.cpp:80 gui/KeysDialog.cpp:102 gui/KeysDialog.cpp:141 +#, c-format +msgid "Associated key : %s" +msgstr "Tecla asociada: %s" + +#: gui/KeysDialog.cpp:82 gui/KeysDialog.cpp:104 gui/KeysDialog.cpp:143 +#, c-format +msgid "Associated key : none" +msgstr "Tecla asociada: ningunha" + +#: gui/KeysDialog.cpp:90 +msgid "Please select an action" +msgstr "Selecciona unha acción" + +#: gui/KeysDialog.cpp:106 +msgid "Press the key to associate" +msgstr "Preme a tecla para asociala" + +#: gui/launcher.cpp:187 +msgid "Game" +msgstr "Xogo" + +#: gui/launcher.cpp:191 +msgid "ID:" +msgstr "ID:" + +#: gui/launcher.cpp:191 gui/launcher.cpp:193 gui/launcher.cpp:194 +msgid "" +"Short game identifier used for referring to savegames and running the game " +"from the command line" +msgstr "" +"Identificador curto do xogo para os ficheiros de gardado e a execución do " +"xogo dende a liña de comandos" + +#: gui/launcher.cpp:193 +msgctxt "lowres" +msgid "ID:" +msgstr "ID:" + +#: gui/launcher.cpp:198 +msgid "Name:" +msgstr "Nome:" + +#: gui/launcher.cpp:198 gui/launcher.cpp:200 gui/launcher.cpp:201 +msgid "Full title of the game" +msgstr "Título completo do xogo" + +#: gui/launcher.cpp:200 +msgctxt "lowres" +msgid "Name:" +msgstr "Nome:" + +#: gui/launcher.cpp:204 +msgid "Language:" +msgstr "Idioma:" + +#: gui/launcher.cpp:204 gui/launcher.cpp:205 +msgid "" +"Language of the game. This will not turn your Spanish game version into " +"English" +msgstr "Idioma do xogo. Non converterá a versión galega do xogo en inglesa" + +#: gui/launcher.cpp:206 gui/launcher.cpp:220 gui/options.cpp:80 +#: gui/options.cpp:730 gui/options.cpp:743 gui/options.cpp:1199 +#: audio/null.cpp:40 +msgid "" +msgstr "" + +#: gui/launcher.cpp:216 +msgid "Platform:" +msgstr "Plataforma:" + +#: gui/launcher.cpp:216 gui/launcher.cpp:218 gui/launcher.cpp:219 +msgid "Platform the game was originally designed for" +msgstr "Plataforma para a que se desenvolvera o xogo inicialmente" + +#: gui/launcher.cpp:218 +msgctxt "lowres" +msgid "Platform:" +msgstr "Plataforma:" + +#: gui/launcher.cpp:231 +msgid "Engine" +msgstr "Motor" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 +msgid "Graphics" +msgstr "Gráficos" + +#: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 +msgid "GFX" +msgstr "Efectos gráficos" + +#: gui/launcher.cpp:242 +msgid "Override global graphic settings" +msgstr "Anular a configuración dos gráficos" + +#: gui/launcher.cpp:244 +msgctxt "lowres" +msgid "Override global graphic settings" +msgstr "Anular a configuración dos gráficos" + +#: gui/launcher.cpp:251 gui/options.cpp:1085 +msgid "Audio" +msgstr "Son" + +#: gui/launcher.cpp:254 +msgid "Override global audio settings" +msgstr "Anular a configuración do son" + +#: gui/launcher.cpp:256 +msgctxt "lowres" +msgid "Override global audio settings" +msgstr "Anular a configuración do son" + +#: gui/launcher.cpp:265 gui/options.cpp:1090 +msgid "Volume" +msgstr "Volume" + +#: gui/launcher.cpp:267 gui/options.cpp:1092 +msgctxt "lowres" +msgid "Volume" +msgstr "Volume" + +#: gui/launcher.cpp:270 +msgid "Override global volume settings" +msgstr "Anular a configuración do volume" + +#: gui/launcher.cpp:272 +msgctxt "lowres" +msgid "Override global volume settings" +msgstr "Anular a configuración do volume" + +#: gui/launcher.cpp:280 gui/options.cpp:1100 +msgid "MIDI" +msgstr "MIDI" + +#: gui/launcher.cpp:283 +msgid "Override global MIDI settings" +msgstr "Anular a configuración de MIDI" + +#: gui/launcher.cpp:285 +msgctxt "lowres" +msgid "Override global MIDI settings" +msgstr "Anular a configuración de MIDI" + +#: gui/launcher.cpp:294 gui/options.cpp:1106 +msgid "MT-32" +msgstr "MT-32" + +#: gui/launcher.cpp:297 +msgid "Override global MT-32 settings" +msgstr "Anular a configuración de MT-32" + +#: gui/launcher.cpp:299 +msgctxt "lowres" +msgid "Override global MT-32 settings" +msgstr "Anular a configuración de MT-32" + +#: gui/launcher.cpp:308 gui/options.cpp:1113 +msgid "Paths" +msgstr "Camiños" + +#: gui/launcher.cpp:310 gui/options.cpp:1115 +msgctxt "lowres" +msgid "Paths" +msgstr "Camiños" + +#: gui/launcher.cpp:317 +msgid "Game Path:" +msgstr "Camiño do xogo:" + +#: gui/launcher.cpp:319 +msgctxt "lowres" +msgid "Game Path:" +msgstr "Camiño do xogo:" + +#: gui/launcher.cpp:324 gui/options.cpp:1139 +msgid "Extra Path:" +msgstr "Camiño adicional:" + +#: gui/launcher.cpp:324 gui/launcher.cpp:326 gui/launcher.cpp:327 +msgid "Specifies path to additional data used the game" +msgstr "Especifica o camiño dos datos adicionais usados no xogo" + +#: gui/launcher.cpp:326 gui/options.cpp:1141 +msgctxt "lowres" +msgid "Extra Path:" +msgstr "Camiño adicional:" + +#: gui/launcher.cpp:333 gui/options.cpp:1123 +msgid "Save Path:" +msgstr "Camiño de gardado:" + +#: gui/launcher.cpp:333 gui/launcher.cpp:335 gui/launcher.cpp:336 +#: gui/options.cpp:1123 gui/options.cpp:1125 gui/options.cpp:1126 +msgid "Specifies where your savegames are put" +msgstr "Especifica o lugar dos ficheiros de gardado" + +#: gui/launcher.cpp:335 gui/options.cpp:1125 +msgctxt "lowres" +msgid "Save Path:" +msgstr "Camiño de gardado:" + +#: gui/launcher.cpp:354 gui/launcher.cpp:453 gui/launcher.cpp:511 +#: gui/launcher.cpp:565 gui/options.cpp:1134 gui/options.cpp:1142 +#: gui/options.cpp:1151 gui/options.cpp:1258 gui/options.cpp:1264 +#: gui/options.cpp:1272 gui/options.cpp:1302 gui/options.cpp:1308 +#: gui/options.cpp:1315 gui/options.cpp:1408 gui/options.cpp:1411 +#: gui/options.cpp:1423 +msgctxt "path" +msgid "None" +msgstr "Ningún" + +#: gui/launcher.cpp:359 gui/launcher.cpp:459 gui/launcher.cpp:569 +#: gui/options.cpp:1252 gui/options.cpp:1296 gui/options.cpp:1414 +#: backends/platform/wii/options.cpp:56 +msgid "Default" +msgstr "Predefinido" + +#: gui/launcher.cpp:504 gui/options.cpp:1417 +msgid "Select SoundFont" +msgstr "Seleccionar SoundFont" + +#: gui/launcher.cpp:523 gui/launcher.cpp:677 +msgid "Select directory with game data" +msgstr "Selecciona un directorio con datos de xogo" + +#: gui/launcher.cpp:541 +msgid "Select additional game directory" +msgstr "Selecciona un directorio con datos adicionais" + +#: gui/launcher.cpp:553 +msgid "Select directory for saved games" +msgstr "Selecciona un directorio para ficheiros de gardado" + +#: gui/launcher.cpp:580 +msgid "This game ID is already taken. Please choose another one." +msgstr "Este ID de xogo xa está en uso. Selecciona outro." + +#: gui/launcher.cpp:621 engines/dialogs.cpp:110 +msgid "~Q~uit" +msgstr "~S~aír" + +#: gui/launcher.cpp:621 backends/platform/sdl/macosx/appmenu_osx.mm:96 +msgid "Quit ScummVM" +msgstr "Saír de ScummVM" + +#: gui/launcher.cpp:622 +msgid "A~b~out..." +msgstr "Ace~r~ca de..." + +#: gui/launcher.cpp:622 backends/platform/sdl/macosx/appmenu_osx.mm:70 +msgid "About ScummVM" +msgstr "Acerca de ScummVM" + +#: gui/launcher.cpp:623 +msgid "~O~ptions..." +msgstr "~O~pcións..." + +#: gui/launcher.cpp:623 +msgid "Change global ScummVM options" +msgstr "Cambiar as opcións de ScummVM" + +#: gui/launcher.cpp:625 +msgid "~S~tart" +msgstr "~I~niciar" + +#: gui/launcher.cpp:625 +msgid "Start selected game" +msgstr "Iniciar o xogo seleccionado" + +#: gui/launcher.cpp:628 +msgid "~L~oad..." +msgstr "~C~argar..." + +#: gui/launcher.cpp:628 +msgid "Load savegame for selected game" +msgstr "Cargar partida do xogo seleccionado" + +#: gui/launcher.cpp:633 gui/launcher.cpp:1120 +msgid "~A~dd Game..." +msgstr "Eng~a~dir xogo..." + +#: gui/launcher.cpp:633 gui/launcher.cpp:640 +msgid "Hold Shift for Mass Add" +msgstr "Manter premido MAIÚS para engadir en masa" + +#: gui/launcher.cpp:635 +msgid "~E~dit Game..." +msgstr "~E~ditar xogo..." + +#: gui/launcher.cpp:635 gui/launcher.cpp:642 +msgid "Change game options" +msgstr "Cambiar as opcións do xogo" + +#: gui/launcher.cpp:637 +msgid "~R~emove Game" +msgstr "Elimina~r~ xogo" + +#: gui/launcher.cpp:637 gui/launcher.cpp:644 +msgid "Remove game from the list. The game data files stay intact" +msgstr "Eliminar o xogo da lista. Os ficheiros de datos non se modifican" + +#: gui/launcher.cpp:640 gui/launcher.cpp:1120 +msgctxt "lowres" +msgid "~A~dd Game..." +msgstr "Eng~a~dir xogo..." + +#: gui/launcher.cpp:642 +msgctxt "lowres" +msgid "~E~dit Game..." +msgstr "~E~ditar xogo..." + +#: gui/launcher.cpp:644 +msgctxt "lowres" +msgid "~R~emove Game" +msgstr "Elimina~r~ xogo" + +#: gui/launcher.cpp:652 +msgid "Search in game list" +msgstr "Buscar na lista de xogos" + +#: gui/launcher.cpp:656 gui/launcher.cpp:1167 +msgid "Search:" +msgstr "Buscar:" + +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/mohawk/myst.cpp:245 +#: engines/mohawk/riven.cpp:716 engines/cruise/menu.cpp:214 +msgid "Load game:" +msgstr "Cargar partida:" + +#: gui/launcher.cpp:680 engines/dialogs.cpp:114 engines/scumm/dialogs.cpp:188 +#: engines/mohawk/myst.cpp:245 engines/mohawk/riven.cpp:716 +#: engines/cruise/menu.cpp:214 backends/platform/wince/CEActionsPocket.cpp:267 +#: backends/platform/wince/CEActionsSmartphone.cpp:231 +msgid "Load" +msgstr "Cargar" + +#: gui/launcher.cpp:788 +msgid "" +"Do you really want to run the mass game detector? This could potentially add " +"a huge number of games." +msgstr "" +"Queres executar o detector de xogos en masa? É posible que se engada un gran " +"número de xogos." + +#: gui/launcher.cpp:789 gui/launcher.cpp:937 +#: backends/events/symbiansdl/symbiansdl-events.cpp:184 +#: backends/platform/wince/CEActionsPocket.cpp:326 +#: backends/platform/wince/CEActionsSmartphone.cpp:287 +#: backends/platform/wince/CELauncherDialog.cpp:83 +msgid "Yes" +msgstr "Si" + +#: gui/launcher.cpp:789 gui/launcher.cpp:937 +#: backends/events/symbiansdl/symbiansdl-events.cpp:184 +#: backends/platform/wince/CEActionsPocket.cpp:326 +#: backends/platform/wince/CEActionsSmartphone.cpp:287 +#: backends/platform/wince/CELauncherDialog.cpp:83 +msgid "No" +msgstr "Non" + +#: gui/launcher.cpp:837 +msgid "ScummVM couldn't open the specified directory!" +msgstr "ScummVM non foi quen de abrir o directorio!" + +#: gui/launcher.cpp:849 +msgid "ScummVM could not find any game in the specified directory!" +msgstr "ScummVM non foi quen de atopar xogos no directorio!" + +#: gui/launcher.cpp:863 +msgid "Pick the game:" +msgstr "Elixe o xogo:" + +#: gui/launcher.cpp:937 +msgid "Do you really want to remove this game configuration?" +msgstr "Seguro que queres eliminar esta configuración de xogo?" + +#: gui/launcher.cpp:1001 +msgid "This game does not support loading games from the launcher." +msgstr "O xogo non permite cargar partidas dende o iniciador." + +#: gui/launcher.cpp:1005 +msgid "ScummVM could not find any engine capable of running the selected game!" +msgstr "ScummVM non foi quen de atopar un motor para executar o xogo!" + +#: gui/launcher.cpp:1119 +msgctxt "lowres" +msgid "Mass Add..." +msgstr "Engadir en masa..." + +#: gui/launcher.cpp:1119 +msgid "Mass Add..." +msgstr "Engadir en masa..." + +#: gui/massadd.cpp:78 gui/massadd.cpp:81 +msgid "... progress ..." +msgstr "...progreso..." + +#: gui/massadd.cpp:258 +msgid "Scan complete!" +msgstr "Análise finalizada!" + +#: gui/massadd.cpp:261 +#, c-format +msgid "Discovered %d new games, ignored %d previously added games." +msgstr "%d xogos novos atopados; %d xogos xa engadidos ignorados." + +#: gui/massadd.cpp:265 +#, c-format +msgid "Scanned %d directories ..." +msgstr "%d directorios analizados..." + +#: gui/massadd.cpp:268 +#, c-format +msgid "Discovered %d new games, ignored %d previously added games ..." +msgstr "%d xogos novos atopados; %d xogos xa engadidos ignorados..." + +#: gui/options.cpp:78 +msgid "Never" +msgstr "Nunca" + +#: gui/options.cpp:78 +msgid "every 5 mins" +msgstr "cada 5 min" + +#: gui/options.cpp:78 +msgid "every 10 mins" +msgstr "cada 10 min" + +#: gui/options.cpp:78 +msgid "every 15 mins" +msgstr "cada 15 min" + +#: gui/options.cpp:78 +msgid "every 30 mins" +msgstr "cada 30 min" + +#: gui/options.cpp:80 +msgid "8 kHz" +msgstr "8 kHz" + +#: gui/options.cpp:80 +msgid "11kHz" +msgstr "11 kHz" + +#: gui/options.cpp:80 +msgid "22 kHz" +msgstr "22 kHz" + +#: gui/options.cpp:80 +msgid "44 kHz" +msgstr "44 kHz" + +#: gui/options.cpp:80 +msgid "48 kHz" +msgstr "48 kHz" + +#: gui/options.cpp:248 gui/options.cpp:474 gui/options.cpp:575 +#: gui/options.cpp:644 gui/options.cpp:852 +msgctxt "soundfont" +msgid "None" +msgstr "Ningunha" + +#: gui/options.cpp:382 +msgid "Failed to apply some of the graphic options changes:" +msgstr "Erro ao aplicar os cambios na configuración dos gráficos:" + +#: gui/options.cpp:394 +msgid "the video mode could not be changed." +msgstr "non se puido cambiar o modo de vídeo." + +#: gui/options.cpp:400 +msgid "the fullscreen setting could not be changed" +msgstr "non se puido cambiar a configuración de pantalla completa." + +#: gui/options.cpp:406 +msgid "the aspect ratio setting could not be changed" +msgstr "non se puido cambiar a proporción." + +#: gui/options.cpp:727 +msgid "Graphics mode:" +msgstr "Modo de gráficos:" + +#: gui/options.cpp:741 +msgid "Render mode:" +msgstr "Modo de procesamento:" + +#: gui/options.cpp:741 gui/options.cpp:742 +msgid "Special dithering modes supported by some games" +msgstr "Modos de interpolación de cores compatibles con algúns xogos" + +#: gui/options.cpp:753 +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2236 +#: backends/graphics/openglsdl/openglsdl-graphics.cpp:472 +msgid "Fullscreen mode" +msgstr "Pantalla completa" + +#: gui/options.cpp:756 +msgid "Aspect ratio correction" +msgstr "Corrección de proporción" + +#: gui/options.cpp:756 +msgid "Correct aspect ratio for 320x200 games" +msgstr "Corrixir a proporción para os xogos en 320x200" + +#: gui/options.cpp:764 +msgid "Preferred Device:" +msgstr "Dispositivo preferido:" + +#: gui/options.cpp:764 +msgid "Music Device:" +msgstr "Dispositivo de música:" + +#: gui/options.cpp:764 gui/options.cpp:766 +msgid "Specifies preferred sound device or sound card emulator" +msgstr "Especifica o dispositivo ou emulador de tarxeta de son preferido" + +#: gui/options.cpp:764 gui/options.cpp:766 gui/options.cpp:767 +msgid "Specifies output sound device or sound card emulator" +msgstr "Especifica o dispositivo ou emulador de tarxeta de son de saída" + +#: gui/options.cpp:766 +msgctxt "lowres" +msgid "Preferred Dev.:" +msgstr "Disp. preferido:" + +#: gui/options.cpp:766 +msgctxt "lowres" +msgid "Music Device:" +msgstr "Disp. música:" + +#: gui/options.cpp:793 +msgid "AdLib emulator:" +msgstr "Emulador de AdLib:" + +#: gui/options.cpp:793 gui/options.cpp:794 +msgid "AdLib is used for music in many games" +msgstr "Moitos xogos empregan AdLib para a música" + +#: gui/options.cpp:804 +msgid "Output rate:" +msgstr "Taxa de saída:" + +#: gui/options.cpp:804 gui/options.cpp:805 +msgid "" +"Higher value specifies better sound quality but may be not supported by your " +"soundcard" +msgstr "" +"A maior valor, maior calidade do son, mais talvez non sexa compatible coa " +"tarxeta" + +#: gui/options.cpp:815 +msgid "GM Device:" +msgstr "Dispositivo de GM:" + +#: gui/options.cpp:815 +msgid "Specifies default sound device for General MIDI output" +msgstr "" +"Especifica o dispositivo de son por defecto para a saída de General MIDI" + +#: gui/options.cpp:826 +msgid "Don't use General MIDI music" +msgstr "Non empregar música en General MIDI" + +#: gui/options.cpp:837 gui/options.cpp:899 +msgid "Use first available device" +msgstr "Empregar o primeiro dispositivo dispoñible" + +#: gui/options.cpp:849 +msgid "SoundFont:" +msgstr "SoundFont:" + +#: gui/options.cpp:849 gui/options.cpp:851 gui/options.cpp:852 +msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity" +msgstr "" +"SoundFont é compatible con algunhas tarxetas de son, Fluidsynth e Timidity" + +#: gui/options.cpp:851 +msgctxt "lowres" +msgid "SoundFont:" +msgstr "SoundFont:" + +#: gui/options.cpp:857 +msgid "Mixed AdLib/MIDI mode" +msgstr "Modo AdLib/MIDI mixto" + +#: gui/options.cpp:857 +msgid "Use both MIDI and AdLib sound generation" +msgstr "Empregar xeración de son MIDI e máis AdLib" + +#: gui/options.cpp:860 +msgid "MIDI gain:" +msgstr "Ganancia de MIDI:" + +#: gui/options.cpp:870 +msgid "MT-32 Device:" +msgstr "Dispositivo de MT-32:" + +#: gui/options.cpp:870 +msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output" +msgstr "" +"Especifica o dispositivo por defecto para a saída de Roland MT-32/LAPC1/" +"CM32l/CM64" + +#: gui/options.cpp:875 +msgid "True Roland MT-32 (disable GM emulation)" +msgstr "Roland MT-32 verdadeiro (sen emulación de GM)" + +#: gui/options.cpp:875 gui/options.cpp:877 +msgid "" +"Check if you want to use your real hardware Roland-compatible sound device " +"connected to your computer" +msgstr "" +"Marcar para empregar o hardware compatible con Roland conectado ao sistema" + +#: gui/options.cpp:877 +msgctxt "lowres" +msgid "True Roland MT-32 (no GM emulation)" +msgstr "Roland MT-32 (sen emulación de GM)" + +#: gui/options.cpp:880 +msgid "Enable Roland GS Mode" +msgstr "Activar modo Roland GS" + +#: gui/options.cpp:880 +msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack" +msgstr "Desactiva o General MIDI para os xogos con música en Roland MT-32" + +#: gui/options.cpp:889 +msgid "Don't use Roland MT-32 music" +msgstr "Non empregar música en Roland MT-32" + +#: gui/options.cpp:916 +msgid "Text and Speech:" +msgstr "Texto e voz:" + +#: gui/options.cpp:920 gui/options.cpp:930 +msgid "Speech" +msgstr "Voz" + +#: gui/options.cpp:921 gui/options.cpp:931 +msgid "Subtitles" +msgstr "Subtítulos" + +#: gui/options.cpp:922 +msgid "Both" +msgstr "Ambos" + +#: gui/options.cpp:924 +msgid "Subtitle speed:" +msgstr "Velocidade dos subtítulos:" + +#: gui/options.cpp:926 +msgctxt "lowres" +msgid "Text and Speech:" +msgstr "Texto e voz:" + +#: gui/options.cpp:930 +msgid "Spch" +msgstr "Voz" + +#: gui/options.cpp:931 +msgid "Subs" +msgstr "Subs" + +#: gui/options.cpp:932 +msgctxt "lowres" +msgid "Both" +msgstr "Ambos" + +#: gui/options.cpp:932 +msgid "Show subtitles and play speech" +msgstr "Mostrar os subtítulos e reproducir as voces" + +#: gui/options.cpp:934 +msgctxt "lowres" +msgid "Subtitle speed:" +msgstr "Velocidade subs:" + +#: gui/options.cpp:950 +msgid "Music volume:" +msgstr "Volume de música:" + +#: gui/options.cpp:952 +msgctxt "lowres" +msgid "Music volume:" +msgstr "Volume música:" + +#: gui/options.cpp:959 +msgid "Mute All" +msgstr "Silenciar todo" + +#: gui/options.cpp:962 +msgid "SFX volume:" +msgstr "Volume de efectos:" + +#: gui/options.cpp:962 gui/options.cpp:964 gui/options.cpp:965 +msgid "Special sound effects volume" +msgstr "Volume dos efectos de son" + +#: gui/options.cpp:964 +msgctxt "lowres" +msgid "SFX volume:" +msgstr "Volume efectos:" + +#: gui/options.cpp:972 +msgid "Speech volume:" +msgstr "Volume de voz:" + +#: gui/options.cpp:974 +msgctxt "lowres" +msgid "Speech volume:" +msgstr "Volume voz:" + +#: gui/options.cpp:1131 +msgid "Theme Path:" +msgstr "Camiño do tema:" + +#: gui/options.cpp:1133 +msgctxt "lowres" +msgid "Theme Path:" +msgstr "Camiño tema:" + +#: gui/options.cpp:1139 gui/options.cpp:1141 gui/options.cpp:1142 +msgid "Specifies path to additional data used by all games or ScummVM" +msgstr "" +"Especificar o camiño dos datos adicionais de todos os xogos ou de ScummVM" + +#: gui/options.cpp:1148 +msgid "Plugins Path:" +msgstr "Camiño dos complementos:" + +#: gui/options.cpp:1150 +msgctxt "lowres" +msgid "Plugins Path:" +msgstr "Camiño complementos:" + +#: gui/options.cpp:1159 +msgid "Misc" +msgstr "Misc." + +#: gui/options.cpp:1161 +msgctxt "lowres" +msgid "Misc" +msgstr "Misc." + +#: gui/options.cpp:1163 +msgid "Theme:" +msgstr "Tema:" + +#: gui/options.cpp:1167 +msgid "GUI Renderer:" +msgstr "Procesamento da interfaz:" + +#: gui/options.cpp:1179 +msgid "Autosave:" +msgstr "Autogardado:" + +#: gui/options.cpp:1181 +msgctxt "lowres" +msgid "Autosave:" +msgstr "Autogardado:" + +#: gui/options.cpp:1189 +msgid "Keys" +msgstr "Teclas" + +#: gui/options.cpp:1196 +msgid "GUI Language:" +msgstr "Idioma de interfaz:" + +#: gui/options.cpp:1196 +msgid "Language of ScummVM GUI" +msgstr "Idioma da interfaz de ScummVM" + +#: gui/options.cpp:1347 +msgid "You have to restart ScummVM before your changes will take effect." +msgstr "Debes reiniciar ScummVM para que os cambios teñan efecto." + +#: gui/options.cpp:1360 +msgid "Select directory for savegames" +msgstr "Seleccionar directorio para ficheiros de gardado" + +#: gui/options.cpp:1367 +msgid "The chosen directory cannot be written to. Please select another one." +msgstr "Non é posible escribir no directorio elixido. Selecciona outro." + +#: gui/options.cpp:1376 +msgid "Select directory for GUI themes" +msgstr "Seleccionar directorio para temas de interfaz" + +#: gui/options.cpp:1386 +msgid "Select directory for extra files" +msgstr "Seleccionar directorio para ficheiros adicionais" + +#: gui/options.cpp:1397 +msgid "Select directory for plugins" +msgstr "Seleccionar directorio para complementos" + +#: gui/options.cpp:1450 +msgid "" +"The theme you selected does not support your current language. If you want " +"to use this theme you need to switch to another language first." +msgstr "" +"O tema seleccionado non é compatible co idioma actual. Para empregar o tema, " +"deberás cambiar antes o idioma da interfaz." + +#: gui/saveload-dialog.cpp:158 +msgid "List view" +msgstr "Lista" + +#: gui/saveload-dialog.cpp:159 +msgid "Grid view" +msgstr "Grade" + +#: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 +msgid "No date saved" +msgstr "Non hai data gardada" + +#: gui/saveload-dialog.cpp:203 gui/saveload-dialog.cpp:351 +msgid "No time saved" +msgstr "Non hai hora gardada" + +#: gui/saveload-dialog.cpp:204 gui/saveload-dialog.cpp:352 +msgid "No playtime saved" +msgstr "Non hai tempo de xogo gardado" + +#: gui/saveload-dialog.cpp:211 gui/saveload-dialog.cpp:267 +msgid "Delete" +msgstr "Eliminar" + +#: gui/saveload-dialog.cpp:266 +msgid "Do you really want to delete this savegame?" +msgstr "Seguro que queres eliminar esta partida?" + +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 +msgid "Date: " +msgstr "Data:" + +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 +msgid "Time: " +msgstr "Hora:" + +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 +msgid "Playtime: " +msgstr "Tempo de xogo:" + +#: gui/saveload-dialog.cpp:398 gui/saveload-dialog.cpp:465 +msgid "Untitled savestate" +msgstr "Partida sen título" + +#: gui/saveload-dialog.cpp:517 +msgid "Next" +msgstr "Seg." + +#: gui/saveload-dialog.cpp:520 +msgid "Prev" +msgstr "Ant." + +#: gui/saveload-dialog.cpp:684 +msgid "New Save" +msgstr "Novo ficheiro" + +#: gui/saveload-dialog.cpp:684 +msgid "Create a new save game" +msgstr "Crea un novo ficheiro de gardado" + +#: gui/saveload-dialog.cpp:789 +msgid "Name: " +msgstr "Nome:" + +#: gui/saveload-dialog.cpp:861 +#, c-format +msgid "Enter a description for slot %d:" +msgstr "Introduce unha descrición para o espazo %d:" + +#: gui/themebrowser.cpp:44 +msgid "Select a Theme" +msgstr "Seleccionar tema" + +#: gui/ThemeEngine.cpp:337 +msgid "Disabled GFX" +msgstr "Efectos gráficos desactivados" + +#: gui/ThemeEngine.cpp:337 +msgctxt "lowres" +msgid "Disabled GFX" +msgstr "Efectos desactivados" + +#: gui/ThemeEngine.cpp:338 +msgid "Standard Renderer (16bpp)" +msgstr "Procesamento estándar (16 bpp)" + +#: gui/ThemeEngine.cpp:338 +msgid "Standard (16bpp)" +msgstr "Estándar (16 bpp)" + +#: gui/ThemeEngine.cpp:340 +msgid "Antialiased Renderer (16bpp)" +msgstr "Procesamento antidistorsión (16 bpp)" + +#: gui/ThemeEngine.cpp:340 +msgid "Antialiased (16bpp)" +msgstr "Antidistorsión (16 bpp)" + +#: gui/widget.cpp:322 gui/widget.cpp:324 gui/widget.cpp:330 gui/widget.cpp:332 +msgid "Clear value" +msgstr "Limpar valor" + +#: base/main.cpp:209 +#, c-format +msgid "Engine does not support debug level '%s'" +msgstr "O motor non é compatible co nivel de depuración %s" + +#: base/main.cpp:287 +msgid "Menu" +msgstr "Menú" + +#: base/main.cpp:290 backends/platform/symbian/src/SymbianActions.cpp:45 +#: backends/platform/wince/CEActionsPocket.cpp:45 +#: backends/platform/wince/CEActionsSmartphone.cpp:46 +msgid "Skip" +msgstr "Omitir" + +#: base/main.cpp:293 backends/platform/symbian/src/SymbianActions.cpp:50 +#: backends/platform/wince/CEActionsPocket.cpp:42 +msgid "Pause" +msgstr "Pausa" + +#: base/main.cpp:296 +msgid "Skip line" +msgstr "Omitir liña" + +#: base/main.cpp:467 +msgid "Error running game:" +msgstr "Erro de execución do xogo:" + +#: base/main.cpp:491 +msgid "Could not find any engine capable of running the selected game" +msgstr "Non se puido atopar un motor para executar o xogo seleccionado" + +#: common/error.cpp:38 +msgid "No error" +msgstr "Non hai erros" + +#: common/error.cpp:40 +msgid "Game data not found" +msgstr "Non se atoparon datos de xogo" + +#: common/error.cpp:42 +msgid "Game id not supported" +msgstr "ID de xogo non compatible" + +#: common/error.cpp:44 +msgid "Unsupported color mode" +msgstr "Modo de color non compatible" + +#: common/error.cpp:47 +msgid "Read permission denied" +msgstr "Permiso de lectura denegado" + +#: common/error.cpp:49 +msgid "Write permission denied" +msgstr "Permiso de escritura denegado" + +#: common/error.cpp:52 +msgid "Path does not exist" +msgstr "O camiño non existe" + +#: common/error.cpp:54 +msgid "Path not a directory" +msgstr "O camiño non é un directorio" + +#: common/error.cpp:56 +msgid "Path not a file" +msgstr "O camiño non é un ficheiro" + +#: common/error.cpp:59 +msgid "Cannot create file" +msgstr "Erro ao crear o ficheiro" + +#: common/error.cpp:61 +msgid "Reading data failed" +msgstr "Erro ao ler os datos" + +#: common/error.cpp:63 +msgid "Writing data failed" +msgstr "Erro ao escribir os datos" + +#: common/error.cpp:66 +msgid "Could not find suitable engine plugin" +msgstr "Non se atopou un complemento axeitado para o motor" + +#: common/error.cpp:68 +msgid "Engine plugin does not support save states" +msgstr "O complemento do motor non é compatible cos ficheiros de gardado" + +#: common/error.cpp:71 +msgid "User canceled" +msgstr "Usuario cancelado" + +#: common/error.cpp:75 +msgid "Unknown error" +msgstr "Erro descoñecido" + +#: engines/advancedDetector.cpp:316 +#, c-format +msgid "The game in '%s' seems to be unknown." +msgstr "O xogo de %s semella ser descoñecido." + +#: engines/advancedDetector.cpp:317 +msgid "Please, report the following data to the ScummVM team along with name" +msgstr "Facilita esta información ao equipo de ScummVM, xunto co nome" + +#: engines/advancedDetector.cpp:319 +msgid "of the game you tried to add and its version/language/etc.:" +msgstr "do xogo que tentaches engadir, xunto coa versión, lingua, etc.:" + +#: engines/dialogs.cpp:84 +msgid "~R~esume" +msgstr "~R~etomar" + +#: engines/dialogs.cpp:86 +msgid "~L~oad" +msgstr "~C~argar" + +#: engines/dialogs.cpp:90 +msgid "~S~ave" +msgstr "~G~ardar" + +#: engines/dialogs.cpp:94 +msgid "~O~ptions" +msgstr "~O~pcións" + +#: engines/dialogs.cpp:99 +msgid "~H~elp" +msgstr "~A~xuda" + +#: engines/dialogs.cpp:101 +msgid "~A~bout" +msgstr "Acerca ~d~e" + +#: engines/dialogs.cpp:104 engines/dialogs.cpp:180 +msgid "~R~eturn to Launcher" +msgstr "~V~olver ao Iniciador" + +#: engines/dialogs.cpp:106 engines/dialogs.cpp:182 +msgctxt "lowres" +msgid "~R~eturn to Launcher" +msgstr "~V~olver ao Iniciador" + +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/cruise/menu.cpp:212 engines/sci/engine/kfile.cpp:742 +msgid "Save game:" +msgstr "Gardar partida:" + +#: engines/dialogs.cpp:115 engines/agi/saveload.cpp:803 +#: engines/scumm/dialogs.cpp:187 engines/cruise/menu.cpp:212 +#: engines/sci/engine/kfile.cpp:742 +#: backends/platform/symbian/src/SymbianActions.cpp:44 +#: backends/platform/wince/CEActionsPocket.cpp:43 +#: backends/platform/wince/CEActionsPocket.cpp:267 +#: backends/platform/wince/CEActionsSmartphone.cpp:45 +#: backends/platform/wince/CEActionsSmartphone.cpp:231 +msgid "Save" +msgstr "Gardar" + +#: engines/dialogs.cpp:144 +msgid "" +"Sorry, this engine does not currently provide in-game help. Please consult " +"the README for basic information, and for instructions on how to obtain " +"further assistance." +msgstr "" +"Este motor non ofrece axuda no xogo actualmente. Consulta o ficheiro README " +"para obter información básica e máis instrucións para acadar asistencia " +"adicional." + +#: engines/dialogs.cpp:228 +#, c-format +msgid "" +"Gamestate save failed (%s)! Please consult the README for basic information, " +"and for instructions on how to obtain further assistance." +msgstr "" +"Erro ao gardar (%s)! Consulta o ficheiro README para obter información " +"básica e máis instrucións para acadar asistencia adicional." + +#: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 +#: engines/mohawk/dialogs.cpp:174 +msgid "~O~K" +msgstr "~A~ceptar" + +#: engines/dialogs.cpp:302 engines/mohawk/dialogs.cpp:110 +#: engines/mohawk/dialogs.cpp:175 +msgid "~C~ancel" +msgstr "~C~ancelar" + +#: engines/dialogs.cpp:305 +msgid "~K~eys" +msgstr "~T~eclas" + +#: engines/engine.cpp:235 +msgid "Could not initialize color format." +msgstr "Non se puido iniciar o formato de cor." + +#: engines/engine.cpp:243 +msgid "Could not switch to video mode: '" +msgstr "Non se puido cambiar ao modo de vídeo: '" + +#: engines/engine.cpp:252 +msgid "Could not apply aspect ratio setting." +msgstr "Non se puido aplicar a configuración de proporción." + +#: engines/engine.cpp:257 +msgid "Could not apply fullscreen setting." +msgstr "Non se puido aplicar a configuración de pantalla completa." + +#: engines/engine.cpp:357 +msgid "" +"You appear to be playing this game directly\n" +"from the CD. This is known to cause problems,\n" +"and it is therefore recommended that you copy\n" +"the data files to your hard disk instead.\n" +"See the README file for details." +msgstr "" +"Semella que estás a xogar directamente\n" +"dende o CD. Temos constancia de que causa,\n" +"problemas. Por iso, recomendámosche copiar\n" +"os ficheiros de datos ao disco duro. Consulta\n" +"o ficheiro README para obter máis información." + +#: engines/engine.cpp:368 +msgid "" +"This game has audio tracks in its disk. These\n" +"tracks need to be ripped from the disk using\n" +"an appropriate CD audio extracting tool in\n" +"order to listen to the game's music.\n" +"See the README file for details." +msgstr "" +"O xogo ten pistas de son no disco. Debes\n" +"extraelas por medio dunha ferramenta\n" +"axeitada para poder escoitar a música\n" +"do xogo. Consulta o ficheiro README\n" +"para obter máis información." + +#: engines/engine.cpp:426 +#, c-format +msgid "" +"Gamestate load failed (%s)! Please consult the README for basic information, " +"and for instructions on how to obtain further assistance." +msgstr "" +"Erro ao cargar (%s)! Consulta o ficheiro README para obter información " +"básica e máis instrucións para acadar asistencia adicional." + +#: engines/engine.cpp:439 +msgid "" +"WARNING: The game you are about to start is not yet fully supported by " +"ScummVM. As such, it is likely to be unstable, and any saves you make might " +"not work in future versions of ScummVM." +msgstr "" +"Ollo: o xogo que vas iniciar non é aínda totalmente compatible con ScummVM. " +"Por iso, talvez sexa inestable e os ficheiros de gardado talvez non " +"funcionen en futuras versións de ScummVM." + +#: engines/engine.cpp:442 +msgid "Start anyway" +msgstr "Iniciar de todos os xeitos" + +#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/sci/detection.cpp:390 +msgid "Use original save/load screens" +msgstr "Empregar pantallas orixinais de gardado e carga" + +#: 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 "" +"Empregar as pantallas orixinais de gardado e carga, no canto das de ScummVM" + +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 +msgid "Restore game:" +msgstr "Restaurar xogo:" + +#: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 +msgid "Restore" +msgstr "Restaurar" + +#: engines/dreamweb/detection.cpp:57 +msgid "Use bright palette mode" +msgstr "Empregar modo de paleta intensa" + +#: engines/dreamweb/detection.cpp:58 +msgid "Display graphics using the game's bright palette" +msgstr "Mostrar os gráficos coa paletta intensa do xogo" + +#: engines/sci/detection.cpp:370 +msgid "EGA undithering" +msgstr "Non interpolación EGA" + +#: engines/sci/detection.cpp:371 +msgid "Enable undithering in EGA games" +msgstr "Activar a non interpolación nos xogos en EGA" + +#: engines/sci/detection.cpp:380 +msgid "Prefer digital sound effects" +msgstr "Preferir efectos de son dixitais" + +#: engines/sci/detection.cpp:381 +msgid "Prefer digital sound effects instead of synthesized ones" +msgstr "Dar preferencia aos efectos de son dixitais no canto dos sintéticos" + +#: engines/sci/detection.cpp:400 +msgid "Use IMF/Yamaha FB-01 for MIDI output" +msgstr "Empregar IMF/Yamaha FB-01 para a saída de MIDI" + +#: engines/sci/detection.cpp:401 +msgid "" +"Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " +"output" +msgstr "" +"Empregar unha tarxeta IBM Music Feature ou un módulo de sintetizador Yamaha " +"FB-01 FM para a saída de MIDI" + +#: engines/sci/detection.cpp:411 +msgid "Use CD audio" +msgstr "Empregar son de CD" + +#: engines/sci/detection.cpp:412 +msgid "Use CD audio instead of in-game audio, if available" +msgstr "Empregar son de CD no canto do do xogo, de ser o caso" + +#: engines/sci/detection.cpp:422 +msgid "Use Windows cursors" +msgstr "Empregar cursores de Windows" + +#: engines/sci/detection.cpp:423 +msgid "" +"Use the Windows cursors (smaller and monochrome) instead of the DOS ones" +msgstr "" +"Empregar os cursores de Windows (máis pequenos e monocromos) no canto dos de " +"DOS" + +#: engines/sci/detection.cpp:433 +msgid "Use silver cursors" +msgstr "Empregar cursores prateados" + +#: engines/sci/detection.cpp:434 +msgid "" +"Use the alternate set of silver cursors, instead of the normal golden ones" +msgstr "" +"Empregar o xogo de cursores prateados alternativo, no canto dos dourados " +"normais" + +#: engines/scumm/dialogs.cpp:175 +#, c-format +msgid "Insert Disk %c and Press Button to Continue." +msgstr "Insire o disco %c e preme o botón para continuar." + +#: engines/scumm/dialogs.cpp:176 +#, c-format +msgid "Unable to Find %s, (%c%d) Press Button." +msgstr "Non se puido atopar %s, (%c%d). Preme o botón." + +#: engines/scumm/dialogs.cpp:177 +#, c-format +msgid "Error reading disk %c, (%c%d) Press Button." +msgstr "Erro ao ler o disco %c, (%c%d). Preme o botón." + +#: engines/scumm/dialogs.cpp:178 +msgid "Game Paused. Press SPACE to Continue." +msgstr "Xogo en pausa. Pulsa a barra espazadora para continuar." + +#. I18N: You may specify 'Yes' symbol at the end of the line, like this: +#. "Moechten Sie wirklich neu starten? (J/N)J" +#. Will react to J as 'Yes' +#: engines/scumm/dialogs.cpp:182 +msgid "Are you sure you want to restart? (Y/N)" +msgstr "Seguro que queres reiniciar? (S/N)S" + +#. I18N: you may specify 'Yes' symbol at the end of the line. See previous comment +#: engines/scumm/dialogs.cpp:184 +msgid "Are you sure you want to quit? (Y/N)" +msgstr "Seguro que queres saír? (S/N)S" + +#: engines/scumm/dialogs.cpp:189 +msgid "Play" +msgstr "Xogar" + +#: engines/scumm/dialogs.cpp:191 engines/scumm/help.cpp:82 +#: engines/scumm/help.cpp:84 +#: backends/platform/symbian/src/SymbianActions.cpp:52 +#: backends/platform/wince/CEActionsPocket.cpp:44 +#: backends/platform/wince/CEActionsSmartphone.cpp:52 +#: backends/events/default/default-events.cpp:213 +msgid "Quit" +msgstr "Saír" + +#: engines/scumm/dialogs.cpp:193 +msgid "Insert save/load game disk" +msgstr "Inserir disco de gardado/carga" + +#: engines/scumm/dialogs.cpp:194 +msgid "You must enter a name" +msgstr "Debes introducir un nome" + +#: engines/scumm/dialogs.cpp:195 +msgid "The game was NOT saved (disk full?)" +msgstr "Non se puido gardar a partida (disco cheo?)" + +#: engines/scumm/dialogs.cpp:196 +msgid "The game was NOT loaded" +msgstr "Non se puido cargar a partida" + +#: engines/scumm/dialogs.cpp:197 +#, c-format +msgid "Saving '%s'" +msgstr "Gardando %s" + +#: engines/scumm/dialogs.cpp:198 +#, c-format +msgid "Loading '%s'" +msgstr "Cargando %s" + +#: engines/scumm/dialogs.cpp:199 +msgid "Name your SAVE game" +msgstr "Introduce un nome para a partida gardada" + +#: engines/scumm/dialogs.cpp:200 +msgid "Select a game to LOAD" +msgstr "Selecciona unha partida para cargala" + +#: engines/scumm/dialogs.cpp:201 +msgid "Game title)" +msgstr "Título)" + +#. I18N: Previous page button +#: engines/scumm/dialogs.cpp:287 +msgid "~P~revious" +msgstr "~A~nterior" + +#. I18N: Next page button +#: engines/scumm/dialogs.cpp:289 +msgid "~N~ext" +msgstr "~S~eguinte" + +#: engines/scumm/dialogs.cpp:290 +#: backends/platform/ds/arm9/source/dsoptions.cpp:56 +msgid "~C~lose" +msgstr "~P~echar" + +#: engines/scumm/dialogs.cpp:597 +msgid "Speech Only" +msgstr "Só voz" + +#: engines/scumm/dialogs.cpp:598 +msgid "Speech and Subtitles" +msgstr "Voz e subtítulos" + +#: engines/scumm/dialogs.cpp:599 +msgid "Subtitles Only" +msgstr "Só subtítulos" + +#: engines/scumm/dialogs.cpp:607 +msgctxt "lowres" +msgid "Speech & Subs" +msgstr "Voz e subs" + +#: engines/scumm/dialogs.cpp:653 +msgid "Select a Proficiency Level." +msgstr "Selecciona un nivel de habilidade." + +#: engines/scumm/dialogs.cpp:655 +msgid "Refer to your Loom(TM) manual for help." +msgstr "Consulta o manual de Loom(TM) para obter axuda." + +#: engines/scumm/dialogs.cpp:658 +msgid "Standard" +msgstr "Estándar" + +#: engines/scumm/dialogs.cpp:659 +msgid "Practice" +msgstr "Práctica" + +#: engines/scumm/dialogs.cpp:660 +msgid "Expert" +msgstr "Experto" + +#: engines/scumm/help.cpp:73 +msgid "Common keyboard commands:" +msgstr "Comandos de teclado comúns:" + +#: engines/scumm/help.cpp:74 +msgid "Save / Load dialog" +msgstr "Gardar/cargar diálogo" + +#: engines/scumm/help.cpp:76 +msgid "Skip line of text" +msgstr "Omitir liña de texto" + +#: engines/scumm/help.cpp:77 +msgid "Esc" +msgstr "ESC" + +#: engines/scumm/help.cpp:77 +msgid "Skip cutscene" +msgstr "Omitir secuencia" + +#: engines/scumm/help.cpp:78 +msgid "Space" +msgstr "Barra espazadora" + +#: engines/scumm/help.cpp:78 +msgid "Pause game" +msgstr "Pausar xogo" + +#: engines/scumm/help.cpp:79 engines/scumm/help.cpp:84 +#: engines/scumm/help.cpp:95 engines/scumm/help.cpp:96 +#: engines/scumm/help.cpp:97 engines/scumm/help.cpp:98 +#: engines/scumm/help.cpp:99 engines/scumm/help.cpp:100 +#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102 +msgid "Ctrl" +msgstr "CTRL" + +#: engines/scumm/help.cpp:79 +msgid "Load game state 1-10" +msgstr "Cargar partida 1-10" + +#: engines/scumm/help.cpp:80 engines/scumm/help.cpp:84 +#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:100 +#: engines/scumm/help.cpp:101 engines/scumm/help.cpp:102 +msgid "Alt" +msgstr "ALT" + +#: engines/scumm/help.cpp:80 +msgid "Save game state 1-10" +msgstr "Gardar partida 1-10" + +#: engines/scumm/help.cpp:86 engines/scumm/help.cpp:89 +msgid "Enter" +msgstr "INTRO" + +#: engines/scumm/help.cpp:86 +msgid "Toggle fullscreen" +msgstr "Activar/desactivar pantalla completa" + +#: engines/scumm/help.cpp:87 +msgid "Music volume up / down" +msgstr "Subir/baixar volume de música" + +#: engines/scumm/help.cpp:88 +msgid "Text speed slower / faster" +msgstr "Acelerar/frear texto" + +#: engines/scumm/help.cpp:89 +msgid "Simulate left mouse button" +msgstr "Simular botón primario do rato" + +#: engines/scumm/help.cpp:90 +msgid "Tab" +msgstr "TAB" + +#: engines/scumm/help.cpp:90 +msgid "Simulate right mouse button" +msgstr "Simular botón secundario do rato" + +#: engines/scumm/help.cpp:93 +msgid "Special keyboard commands:" +msgstr "Comandos de teclado especiais:" + +#: engines/scumm/help.cpp:94 +msgid "Show / Hide console" +msgstr "Mostrar/ocultar consola" + +#: engines/scumm/help.cpp:95 +msgid "Start the debugger" +msgstr "Iniciar o depurador" + +#: engines/scumm/help.cpp:96 +msgid "Show memory consumption" +msgstr "Mostrar consumo de memoria" + +#: engines/scumm/help.cpp:97 +msgid "Run in fast mode (*)" +msgstr "Executar en modo rápido (*)" + +#: engines/scumm/help.cpp:98 +msgid "Run in really fast mode (*)" +msgstr "Executar en modo moi rápido (*)" + +#: engines/scumm/help.cpp:99 +msgid "Toggle mouse capture" +msgstr "Activar/desactivar captura de rato" + +#: engines/scumm/help.cpp:100 +msgid "Switch between graphics filters" +msgstr "Cambiar filtro de gráficos" + +#: engines/scumm/help.cpp:101 +msgid "Increase / Decrease scale factor" +msgstr "Aumentar/reducir factor de escala" + +#: engines/scumm/help.cpp:102 +msgid "Toggle aspect-ratio correction" +msgstr "Activar/desactivar corrección de proporción" + +#: engines/scumm/help.cpp:107 +msgid "* Note that using ctrl-f and" +msgstr "* Nota: non recomendamos" + +#: engines/scumm/help.cpp:108 +msgid " ctrl-g are not recommended" +msgstr " empregar CTRL-F nin CTRL-G," + +#: engines/scumm/help.cpp:109 +msgid " since they may cause crashes" +msgstr " xa que poden provocar bloqueos" + +#: engines/scumm/help.cpp:110 +msgid " or incorrect game behavior." +msgstr " ou outros erros no xogo." + +#: engines/scumm/help.cpp:114 +msgid "Spinning drafts on the keyboard:" +msgstr "Tecer feitizos co teclado:" + +#: engines/scumm/help.cpp:116 +msgid "Main game controls:" +msgstr "Controis principais de xogo:" + +#: engines/scumm/help.cpp:121 engines/scumm/help.cpp:136 +#: engines/scumm/help.cpp:161 +msgid "Push" +msgstr "Empuxar" + +#: engines/scumm/help.cpp:122 engines/scumm/help.cpp:137 +#: engines/scumm/help.cpp:162 +msgid "Pull" +msgstr "Tirar de" + +#: engines/scumm/help.cpp:123 engines/scumm/help.cpp:138 +#: engines/scumm/help.cpp:163 engines/scumm/help.cpp:197 +#: engines/scumm/help.cpp:207 +msgid "Give" +msgstr "Dar" + +#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139 +#: engines/scumm/help.cpp:164 engines/scumm/help.cpp:190 +#: engines/scumm/help.cpp:208 +msgid "Open" +msgstr "Abrir" + +#: engines/scumm/help.cpp:126 +msgid "Go to" +msgstr "Ir a" + +#: engines/scumm/help.cpp:127 +msgid "Get" +msgstr "Coller" + +#: engines/scumm/help.cpp:128 engines/scumm/help.cpp:152 +#: engines/scumm/help.cpp:170 engines/scumm/help.cpp:198 +#: engines/scumm/help.cpp:213 engines/scumm/help.cpp:224 +#: engines/scumm/help.cpp:250 +msgid "Use" +msgstr "Usar" + +#: engines/scumm/help.cpp:129 engines/scumm/help.cpp:141 +msgid "Read" +msgstr "Ler" + +#: engines/scumm/help.cpp:130 engines/scumm/help.cpp:147 +msgid "New kid" +msgstr "Rapaz" + +#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:153 +#: engines/scumm/help.cpp:171 +msgid "Turn on" +msgstr "Acender" + +#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:154 +#: engines/scumm/help.cpp:172 +msgid "Turn off" +msgstr "Apagar" + +#: engines/scumm/help.cpp:142 engines/scumm/help.cpp:167 +#: engines/scumm/help.cpp:194 +msgid "Walk to" +msgstr "Ir a" + +#: engines/scumm/help.cpp:143 engines/scumm/help.cpp:168 +#: engines/scumm/help.cpp:195 engines/scumm/help.cpp:210 +#: engines/scumm/help.cpp:227 +msgid "Pick up" +msgstr "Coller" + +#: engines/scumm/help.cpp:144 engines/scumm/help.cpp:169 +msgid "What is" +msgstr "Que é" + +#: engines/scumm/help.cpp:146 +msgid "Unlock" +msgstr "Despechar" + +#: engines/scumm/help.cpp:149 +msgid "Put on" +msgstr "Poñer" + +#: engines/scumm/help.cpp:150 +msgid "Take off" +msgstr "Quitar" + +#: engines/scumm/help.cpp:156 +msgid "Fix" +msgstr "Reparar" + +#: engines/scumm/help.cpp:158 +msgid "Switch" +msgstr "Cambiar" + +#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:228 +msgid "Look" +msgstr "Mirar" + +#: engines/scumm/help.cpp:173 engines/scumm/help.cpp:223 +msgid "Talk" +msgstr "Falar" + +#: engines/scumm/help.cpp:174 +msgid "Travel" +msgstr "Viaxar" + +#: engines/scumm/help.cpp:175 +msgid "To Henry / To Indy" +msgstr "A Henry / A Indy" + +#. I18N: These are different musical notes +#: engines/scumm/help.cpp:179 +msgid "play C minor on distaff" +msgstr "tocar do menor no bastón" + +#: engines/scumm/help.cpp:180 +msgid "play D on distaff" +msgstr "tocar re no bastón" + +#: engines/scumm/help.cpp:181 +msgid "play E on distaff" +msgstr "tocar mi no bastón" + +#: engines/scumm/help.cpp:182 +msgid "play F on distaff" +msgstr "tocar fa no bastón" + +#: engines/scumm/help.cpp:183 +msgid "play G on distaff" +msgstr "tocar sol no bastón" + +#: engines/scumm/help.cpp:184 +msgid "play A on distaff" +msgstr "tocar la no bastón" + +#: engines/scumm/help.cpp:185 +msgid "play B on distaff" +msgstr "tocar si no bastón" + +#: engines/scumm/help.cpp:186 +msgid "play C major on distaff" +msgstr "tocar do maior no bastón" + +#: engines/scumm/help.cpp:192 engines/scumm/help.cpp:214 +msgid "puSh" +msgstr "Empurrar" + +#: engines/scumm/help.cpp:193 engines/scumm/help.cpp:215 +msgid "pull (Yank)" +msgstr "Tirar de" + +#: engines/scumm/help.cpp:196 engines/scumm/help.cpp:212 +#: engines/scumm/help.cpp:248 +msgid "Talk to" +msgstr "Falar con" + +#: engines/scumm/help.cpp:199 engines/scumm/help.cpp:211 +msgid "Look at" +msgstr "Mirar" + +#: engines/scumm/help.cpp:200 +msgid "turn oN" +msgstr "Acender" + +#: engines/scumm/help.cpp:201 +msgid "turn oFf" +msgstr "Apagar" + +#: engines/scumm/help.cpp:217 +msgid "KeyUp" +msgstr "Arriba" + +#: engines/scumm/help.cpp:217 +msgid "Highlight prev dialogue" +msgstr "Destacar diálogo anterior" + +#: engines/scumm/help.cpp:218 +msgid "KeyDown" +msgstr "Abaixo" + +#: engines/scumm/help.cpp:218 +msgid "Highlight next dialogue" +msgstr "Destacar diálogo seguinte" + +#: engines/scumm/help.cpp:222 +msgid "Walk" +msgstr "Ir a" + +#: engines/scumm/help.cpp:225 engines/scumm/help.cpp:234 +#: engines/scumm/help.cpp:241 engines/scumm/help.cpp:249 +msgid "Inventory" +msgstr "Inventario" + +#: engines/scumm/help.cpp:226 +msgid "Object" +msgstr "Obxecto" + +#: engines/scumm/help.cpp:229 +msgid "Black and White / Color" +msgstr "Branco e negro/cor" + +#: engines/scumm/help.cpp:232 +msgid "Eyes" +msgstr "Ollos" + +#: engines/scumm/help.cpp:233 +msgid "Tongue" +msgstr "Lingua" + +#: engines/scumm/help.cpp:235 +msgid "Punch" +msgstr "Bater a" + +#: engines/scumm/help.cpp:236 +msgid "Kick" +msgstr "Patear a" + +#: engines/scumm/help.cpp:239 engines/scumm/help.cpp:247 +msgid "Examine" +msgstr "Examinar" + +#: engines/scumm/help.cpp:240 +msgid "Regular cursor" +msgstr "Cursor normal" + +#. I18N: Comm is a communication device +#: engines/scumm/help.cpp:243 +msgid "Comm" +msgstr "Comunicador" + +#: engines/scumm/help.cpp:246 +msgid "Save / Load / Options" +msgstr "Gardar/cargar/opcións" + +#: engines/scumm/help.cpp:255 +msgid "Other game controls:" +msgstr "Outros controis de xogo:" + +#: engines/scumm/help.cpp:257 engines/scumm/help.cpp:267 +msgid "Inventory:" +msgstr "Inventario:" + +#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:274 +msgid "Scroll list up" +msgstr "Subir lista" + +#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275 +msgid "Scroll list down" +msgstr "Baixar lista" + +#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:268 +msgid "Upper left item" +msgstr "Obxecto esquerdo arriba" + +#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:270 +msgid "Lower left item" +msgstr "Obxecto esquerdo abaixo" + +#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271 +msgid "Upper right item" +msgstr "Obxecto dereito arriba" + +#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:273 +msgid "Lower right item" +msgstr "Obxecto dereito abaixo" + +#: engines/scumm/help.cpp:269 +msgid "Middle left item" +msgstr "Obxecto esquerdo medio" + +#: engines/scumm/help.cpp:272 +msgid "Middle right item" +msgstr "Obxecto dereito medio" + +#: engines/scumm/help.cpp:279 engines/scumm/help.cpp:284 +msgid "Switching characters:" +msgstr "Cambiar caracteres:" + +#: engines/scumm/help.cpp:281 +msgid "Second kid" +msgstr "Rapaz 2" + +#: engines/scumm/help.cpp:282 +msgid "Third kid" +msgstr "Rapaz 3" + +#: engines/scumm/help.cpp:294 +msgid "Fighting controls (numpad):" +msgstr "Controis de combate (teclado numérico):" + +#: engines/scumm/help.cpp:295 engines/scumm/help.cpp:296 +#: engines/scumm/help.cpp:297 +msgid "Step back" +msgstr "Paso atrás" + +#: engines/scumm/help.cpp:298 +msgid "Block high" +msgstr "Bloqueo alto" + +#: engines/scumm/help.cpp:299 +msgid "Block middle" +msgstr "Bloqueo medio" + +#: engines/scumm/help.cpp:300 +msgid "Block low" +msgstr "Bloqueo baixo" + +#: engines/scumm/help.cpp:301 +msgid "Punch high" +msgstr "Puñazo alto" + +#: engines/scumm/help.cpp:302 +msgid "Punch middle" +msgstr "Puñazo medio" + +#: engines/scumm/help.cpp:303 +msgid "Punch low" +msgstr "Puñazo baixo" + +#: engines/scumm/help.cpp:306 +msgid "These are for Indy on left." +msgstr "Son para Indy na esquerda." + +#: engines/scumm/help.cpp:307 +msgid "When Indy is on the right," +msgstr "Se está na dereita," + +#: engines/scumm/help.cpp:308 +msgid "7, 4, and 1 are switched with" +msgstr "7, 4 e 1 cámbianse por" + +#: engines/scumm/help.cpp:309 +msgid "9, 6, and 3, respectively." +msgstr "9, 6 e 3 respectivamente." + +#: engines/scumm/help.cpp:316 +msgid "Biplane controls (numpad):" +msgstr "Controis de biplano (teclado numérico):" + +#: engines/scumm/help.cpp:317 +msgid "Fly to upper left" +msgstr "Voar á esquerda arriba" + +#: engines/scumm/help.cpp:318 +msgid "Fly to left" +msgstr "Voar á esquerda" + +#: engines/scumm/help.cpp:319 +msgid "Fly to lower left" +msgstr "Voar á esquerda abaixo" + +#: engines/scumm/help.cpp:320 +msgid "Fly upwards" +msgstr "Voar arriba" + +#: engines/scumm/help.cpp:321 +msgid "Fly straight" +msgstr "Voar recto" + +#: engines/scumm/help.cpp:322 +msgid "Fly down" +msgstr "Voar abaixo" + +#: engines/scumm/help.cpp:323 +msgid "Fly to upper right" +msgstr "Voar á dereita arriba" + +#: engines/scumm/help.cpp:324 +msgid "Fly to right" +msgstr "Voar á dereita" + +#: engines/scumm/help.cpp:325 +msgid "Fly to lower right" +msgstr "Voar á dereita abaixo" + +#: engines/scumm/scumm.cpp:1773 +#, c-format +msgid "" +"Native MIDI support requires the Roland Upgrade from LucasArts,\n" +"but %s is missing. Using AdLib instead." +msgstr "" +"A compatibilidade nativa con MIDI precisa a actualización de Roland\n" +"de LucasArts, mais falla %s. Empregarase AdLib." + +#: engines/scumm/scumm.cpp:2278 engines/agos/saveload.cpp:220 +#, c-format +msgid "" +"Failed to save game state to file:\n" +"\n" +"%s" +msgstr "" +"Erro ao gardar a partida no ficheiro:\n" +"\n" +"%s" + +#: engines/scumm/scumm.cpp:2285 engines/agos/saveload.cpp:185 +#, c-format +msgid "" +"Failed to load game state from file:\n" +"\n" +"%s" +msgstr "" +"Erro ao cargar a partida do ficheiro:\n" +"\n" +"%s" + +#: engines/scumm/scumm.cpp:2297 engines/agos/saveload.cpp:228 +#, c-format +msgid "" +"Successfully saved game state in file:\n" +"\n" +"%s" +msgstr "" +"Partida gardada con éxito no ficheiro:\n" +"\n" +"%s" + +#: engines/scumm/scumm.cpp:2512 +msgid "" +"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To " +"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' " +"directory inside the Tentacle game directory." +msgstr "" +"Maniac Mansion tería que empezar agora. Porén, ScummVM aínda non é quen de " +"facelo. Para xogar, vai a Engadir xogo no menú de inicio de ScummVM e " +"selecciona o directorio Maniac que está dentro do directorio Tentacle." + +#. I18N: Option for fast scene switching +#: engines/mohawk/dialogs.cpp:92 engines/mohawk/dialogs.cpp:171 +msgid "~Z~ip Mode Activated" +msgstr "Modo ~c~omprimido activado" + +#: engines/mohawk/dialogs.cpp:93 +msgid "~T~ransitions Enabled" +msgstr "~T~ransicións activadas" + +#. I18N: Drop book page +#: engines/mohawk/dialogs.cpp:95 +msgid "~D~rop Page" +msgstr "~D~eixar folla" + +#: engines/mohawk/dialogs.cpp:99 +msgid "~S~how Map" +msgstr "Mo~s~trar mapa" + +#: engines/mohawk/dialogs.cpp:105 +msgid "~M~ain Menu" +msgstr "~M~enú principal" + +#: engines/mohawk/dialogs.cpp:172 +msgid "~W~ater Effect Enabled" +msgstr "Efecto de ~a~uga activado" + +#: engines/agos/animation.cpp:560 +#, c-format +msgid "Cutscene file '%s' not found!" +msgstr "Non se atopou o ficheiro de secuencia %s!" + +#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1287 +#: engines/tinsel/saveload.cpp:532 +msgid "Failed to load game state from file." +msgstr "Erro ao cargar a partida do ficheiro." + +#: engines/gob/inter_v2.cpp:1357 engines/tinsel/saveload.cpp:545 +msgid "Failed to save game state to file." +msgstr "Erro ao gardar a partida no ficheiro." + +#: engines/gob/inter_v5.cpp:107 +msgid "Failed to delete file." +msgstr "Erro ao eliminar o ficheiro." + +#: engines/groovie/script.cpp:420 +msgid "Failed to save game" +msgstr "Erro ao gardar a partida" + +#. I18N: Studio audience adds an applause and cheering sounds whenever +#. Malcolm makes a joke. +#: engines/kyra/detection.cpp:62 +msgid "Studio audience" +msgstr "Público do estudio" + +#: engines/kyra/detection.cpp:63 +msgid "Enable studio audience" +msgstr "Activar o público do estudio" + +#. I18N: This option allows the user to skip text and cutscenes. +#: engines/kyra/detection.cpp:73 +msgid "Skip support" +msgstr "Omisións" + +#: engines/kyra/detection.cpp:74 +msgid "Allow text and cutscenes to be skipped" +msgstr "Permitir a omisión do texto e das secuencias" + +#. I18N: Helium mode makes people sound like they've inhaled Helium. +#: engines/kyra/detection.cpp:84 +msgid "Helium mode" +msgstr "Modo helio" + +#: engines/kyra/detection.cpp:85 +msgid "Enable helium mode" +msgstr "Activar o modo helio" + +#. I18N: When enabled, this option makes scrolling smoother when +#. changing from one screen to another. +#: engines/kyra/detection.cpp:99 +msgid "Smooth scrolling" +msgstr "Desprazamento suave" + +#: engines/kyra/detection.cpp:100 +msgid "Enable smooth scrolling when walking" +msgstr "Activar o desprazamento suave ao camiñar" + +#. 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 +msgid "Floating cursors" +msgstr "Cursores flotantes" + +#: engines/kyra/detection.cpp:113 +msgid "Enable floating cursors" +msgstr "Activar cursores flotantes" + +#. I18N: HP stands for Hit Points +#: engines/kyra/detection.cpp:127 +msgid "HP bar graphs" +msgstr "Barras de vida" + +#: engines/kyra/detection.cpp:128 +msgid "Enable hit point bar graphs" +msgstr "Activar barras de vida" + +#: engines/kyra/lol.cpp:478 +msgid "Attack 1" +msgstr "Ataque 1" + +#: engines/kyra/lol.cpp:479 +msgid "Attack 2" +msgstr "Ataque 2" + +#: engines/kyra/lol.cpp:480 +msgid "Attack 3" +msgstr "Ataque 3" + +#: engines/kyra/lol.cpp:481 +msgid "Move Forward" +msgstr "Mover cara diante" + +#: engines/kyra/lol.cpp:482 +msgid "Move Back" +msgstr "Mover cara atrás" + +#: engines/kyra/lol.cpp:483 +msgid "Slide Left" +msgstr "Esvarar á esquerda" + +#: engines/kyra/lol.cpp:484 +msgid "Slide Right" +msgstr "Esvarar á dereita" + +#: engines/kyra/lol.cpp:485 +msgid "Turn Left" +msgstr "Xirar á esquerda" + +#: engines/kyra/lol.cpp:486 +msgid "Turn Right" +msgstr "Xirar á dereita" + +#: engines/kyra/lol.cpp:487 +msgid "Rest" +msgstr "Parar" + +#: engines/kyra/lol.cpp:488 +msgid "Options" +msgstr "Opcións" + +#: engines/kyra/lol.cpp:489 +msgid "Choose Spell" +msgstr "Elixir feitizo" + +#: engines/kyra/sound_midi.cpp:475 +msgid "" +"You appear to be using a General MIDI device,\n" +"but your game only supports Roland MT32 MIDI.\n" +"We try to map the Roland MT32 instruments to\n" +"General MIDI ones. It is still possible that\n" +"some tracks sound incorrect." +msgstr "" +"Semella que estás a empregar un dispositivo,\n" +"de General MIDI, maix o xogo só e compatible con\n" +"Roland MT32 MIDI. Tentamos asignar os instrumentos\n" +"aos de General MIDI. No entanto, existe a posibilidade\n" +"de que algunhas pistas non soen correctamente." + +#: engines/queen/queen.cpp:59 +msgid "Alternative intro" +msgstr "Intro alternativa" + +#: engines/queen/queen.cpp:60 +msgid "Use an alternative game intro (CD version only)" +msgstr "Empregar unha introdución alternativa para o xogo (só versión en CD)" + +#: engines/sky/compact.cpp:130 +msgid "" +"Unable to find \"sky.cpt\" file!\n" +"Please download it from www.scummvm.org" +msgstr "" +"O ficheiro sky.cpt non se atopa!\n" +"Descárgao dende www.scummvm.org" + +#: engines/sky/compact.cpp:141 +msgid "" +"The \"sky.cpt\" file has an incorrect size.\n" +"Please (re)download it from www.scummvm.org" +msgstr "" +"O ficheiro sky.cpt ten un tamaño incorrecto.\n" +"Descárgao (de novo) dende www.scummvm.org" + +#: engines/sky/detection.cpp:44 +msgid "Floppy intro" +msgstr "Intro de disquete" + +#: engines/sky/detection.cpp:45 +msgid "Use the floppy version's intro (CD version only)" +msgstr "Empregar a introdución da versión en disquete (só versión en CD)" + +#: engines/sword1/animation.cpp:539 +#, c-format +msgid "PSX stream cutscene '%s' cannot be played in paletted mode" +msgstr "Non se pode reproducir a secuencia %s de PSX neste modo gráfico" + +#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 +msgid "DXA cutscenes found but ScummVM has been built without zlib support" +msgstr "" +"Atopáronse secuencias de DXA. No entanto, esta versión de ScummVM non é " +"compatible con zlib" + +#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465 +msgid "MPEG2 cutscenes are no longer supported" +msgstr "Xa non hai compatibilidade coas secuencias en MPEG2" + +#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473 +#, c-format +msgid "Cutscene '%s' not found" +msgstr "Non se atopou a secuencia %s" + +#: engines/sword1/control.cpp:863 +msgid "" +"ScummVM found that you have old savefiles for Broken Sword 1 that should be " +"converted.\n" +"The old save game format is no longer supported, so you will not be able to " +"load your games if you don't convert them.\n" +"\n" +"Press OK to convert them now, otherwise you will be asked again the next " +"time you start the game.\n" +msgstr "" +"ScummVM atopou ficheiros de gardado vellos de Broken Sword 1 que deberían " +"ser convertidos.\n" +"O formato vello xa non é compatible, de xeito que non poderás cargar as " +"partidas se non os convertes.\n" +"\n" +"Preme Aceptar para convertilos. Se non, volverás ver esta mensaxe a próxima " +"vez que inicies o xogo.\n" + +#: engines/sword1/control.cpp:1232 +#, c-format +msgid "" +"Target new save game already exists!\n" +"Would you like to keep the old save game (%s) or the new one (%s)?\n" +msgstr "" +"Xa existe unha partida con ese nome!\n" +"Queres conservar a vella (%s) ou a nova (%s)?\n" + +#: engines/sword1/control.cpp:1235 +msgid "Keep the old one" +msgstr "Conservar a vella" + +#: engines/sword1/control.cpp:1235 +msgid "Keep the new one" +msgstr "Conservar a nova" + +#: engines/sword1/logic.cpp:1633 +msgid "This is the end of the Broken Sword 1 Demo" +msgstr "Aquí remata a demo de Broken Sword 1" + +#: engines/sword2/animation.cpp:435 +msgid "" +"PSX cutscenes found but ScummVM has been built without RGB color support" +msgstr "" +"Atopáronse secuencias de PSX. No entanto, a versión de ScummVM non é " +"compatible con cores RGB" + +#: engines/sword2/sword2.cpp:79 +msgid "Show object labels" +msgstr "Mostrar etiquetas" + +#: engines/sword2/sword2.cpp:80 +msgid "Show labels for objects on mouse hover" +msgstr "Mostrar as etiquetas dos obxectos ao apuntar co rato" + +#: engines/teenagent/resources.cpp:68 +msgid "" +"You're missing the 'teenagent.dat' file. Get it from the ScummVM website" +msgstr "" +"Falta o ficheiro teenagent.dat. Descárgao dende o sitio web de ScummVM." + +#: engines/teenagent/resources.cpp:89 +msgid "" +"The teenagent.dat file is compressed and zlib hasn't been included in this " +"executable. Please decompress it" +msgstr "" +"O ficheiro teenagent.dat está comprimido e zlib non foi incluído neste " +"executable. Descomprime o ficheiro" + +#: engines/parallaction/saveload.cpp:133 +#, c-format +msgid "" +"Can't save game in slot %i\n" +"\n" +msgstr "" +"Non se pode gardar a partida no espazo %i\n" +"\n" + +#: engines/parallaction/saveload.cpp:204 +msgid "Loading game..." +msgstr "Cargando..." + +#: engines/parallaction/saveload.cpp:219 +msgid "Saving game..." +msgstr "Gardando..." + +#: engines/parallaction/saveload.cpp:272 +msgid "" +"ScummVM found that you have old savefiles for Nippon Safes that should be " +"renamed.\n" +"The old names are no longer supported, so you will not be able to load your " +"games if you don't convert them.\n" +"\n" +"Press OK to convert them now, otherwise you will be asked next time.\n" +msgstr "" +"ScummVM atopou ficheiros de gardado vellos de Nippon Safes que deberían ser " +"renomeados.\n" +"Os nomes vellos xa non son compatibles, de xeito que non poderás cargar as " +"partidas se non os cambias.\n" +"\n" +"Preme Aceptar para cambialos. Se non, volverás ver esta mensaxe a próxima " +"vez que inicies o xogo.\n" + +#: engines/parallaction/saveload.cpp:319 +msgid "ScummVM successfully converted all your savefiles." +msgstr "ScummVM converteu correctamente todos os ficheiros de gardado." + +#: engines/parallaction/saveload.cpp:321 +msgid "" +"ScummVM printed some warnings in your console window and can't guarantee all " +"your files have been converted.\n" +"\n" +"Please report to the team." +msgstr "" +"ScummVM imprimiu avisos na ventá da consola. Non se pode garantir a " +"conversión de todos os ficheiros.\n" +"\n" +"Contacta co equipo de ScummVM." + +#: audio/fmopl.cpp:49 +msgid "MAME OPL emulator" +msgstr "Emulador de OPL de MAME" + +#: audio/fmopl.cpp:51 +msgid "DOSBox OPL emulator" +msgstr "Emulador de OPL de DOSBox" + +#: audio/mididrv.cpp:209 +#, c-format +msgid "" +"The selected audio device '%s' was not found (e.g. might be turned off or " +"disconnected)." +msgstr "" +"Non se atopou o dispositivo de son seleccionado (%s). Talvez estea apagado " +"ou desconectado." + +#: audio/mididrv.cpp:209 audio/mididrv.cpp:221 audio/mididrv.cpp:257 +#: audio/mididrv.cpp:272 +msgid "Attempting to fall back to the next available device..." +msgstr "Intentando pasar ao seguinte dispositivo dispoñible..." + +#: audio/mididrv.cpp:221 +#, c-format +msgid "" +"The selected audio device '%s' cannot be used. See log file for more " +"information." +msgstr "" +"Non se pode empregar o dispositivo de son seleccionado (%s). Consulta o " +"rexistro para obter máis información." + +#: audio/mididrv.cpp:257 +#, c-format +msgid "" +"The preferred audio device '%s' was not found (e.g. might be turned off or " +"disconnected)." +msgstr "" +"Non se atopou o dispositivo de son preferido (%s). Talvez estea apagado ou " +"desconectado." + +#: audio/mididrv.cpp:272 +#, c-format +msgid "" +"The preferred audio device '%s' cannot be used. See log file for more " +"information." +msgstr "" +"Non se pode empregar o dispositivo de son preferido (%s). Consulta o " +"rexistro para obter máis información." + +#: audio/null.h:43 +msgid "No music" +msgstr "Sen música" + +#: audio/mods/paula.cpp:189 +msgid "Amiga Audio Emulator" +msgstr "Emulador de Amiga Audio" + +#: audio/softsynth/adlib.cpp:1593 +msgid "AdLib Emulator" +msgstr "Emulador de AdLib" + +#: audio/softsynth/appleiigs.cpp:33 +msgid "Apple II GS Emulator (NOT IMPLEMENTED)" +msgstr "Emulador de Apple II GS (non implementado)" + +#: audio/softsynth/sid.cpp:1430 +msgid "C64 Audio Emulator" +msgstr "Emulador de C64 Audio" + +#: audio/softsynth/mt32.cpp:293 +msgid "Initializing MT-32 Emulator" +msgstr "Iniciando emulador de MT-32" + +#: audio/softsynth/mt32.cpp:512 +msgid "MT-32 Emulator" +msgstr "Emulador de MT-32" + +#: audio/softsynth/pcspk.cpp:139 +msgid "PC Speaker Emulator" +msgstr "Emulador de altofalante de PC" + +#: audio/softsynth/pcspk.cpp:158 +msgid "IBM PCjr Emulator" +msgstr "Emulador de IBM PCjr" + +#: backends/keymapper/remap-dialog.cpp:47 +msgid "Keymap:" +msgstr "Asignación de teclas:" + +#: backends/keymapper/remap-dialog.cpp:66 +msgid " (Effective)" +msgstr " (Efectiva)" + +#: backends/keymapper/remap-dialog.cpp:106 +msgid " (Active)" +msgstr " (Activa)" + +#: backends/keymapper/remap-dialog.cpp:106 +msgid " (Blocked)" +msgstr " (Bloqueada)" + +#: backends/keymapper/remap-dialog.cpp:119 +msgid " (Global)" +msgstr " (Global)" + +#: backends/keymapper/remap-dialog.cpp:127 +msgid " (Game)" +msgstr " (Xogo)" + +#: backends/midi/windows.cpp:164 +msgid "Windows MIDI" +msgstr "Windows MIDI" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:57 +msgid "ScummVM Main Menu" +msgstr "Menú principal de ScummVM" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:63 +msgid "~L~eft handed mode" +msgstr "Modo para ~z~urdos" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:64 +msgid "~I~ndy fight controls" +msgstr "Controis de combate de ~I~ndy" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:65 +msgid "Show mouse cursor" +msgstr "Mostrar cursor do rato" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:66 +msgid "Snap to edges" +msgstr "Axustar ás marxes" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:68 +msgid "Touch X Offset" +msgstr "Corrección táctil X" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:75 +msgid "Touch Y Offset" +msgstr "Corrección táctil Y" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:87 +msgid "Use laptop trackpad-style cursor control" +msgstr "Empregar control de cursor por trackpad" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:88 +msgid "Tap for left click, double tap right click" +msgstr "Tocar unha vez, premer co botón primario; dúas veces, botón secundario" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:90 +msgid "Sensitivity" +msgstr "Sensibilidade" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:99 +msgid "Initial top screen scale:" +msgstr "Escala da pantalla inicial:" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:105 +msgid "Main screen scaling:" +msgstr "Escala da pantalla principal:" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:107 +msgid "Hardware scale (fast, but low quality)" +msgstr "Escala por hardware (rápida, mais baixa calidade)" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:108 +msgid "Software scale (good quality, but slower)" +msgstr "Escala por software (boa calidade, mais lenta)" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:109 +msgid "Unscaled (you must scroll left and right)" +msgstr "Sen escala (deberás desprazar á esquerda e á dereita)" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:111 +msgid "Brightness:" +msgstr "Luminosidade:" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:121 +msgid "High quality audio (slower) (reboot)" +msgstr "Son de alta calidade (máis lento) (reiniciar)" + +#: backends/platform/ds/arm9/source/dsoptions.cpp:122 +msgid "Disable power off" +msgstr "Desactivar apagado" + +#: backends/platform/iphone/osys_events.cpp:300 +msgid "Mouse-click-and-drag mode enabled." +msgstr "Modo premer e arrastrar activado." + +#: backends/platform/iphone/osys_events.cpp:302 +msgid "Mouse-click-and-drag mode disabled." +msgstr "Modo premer e arrastrar desactivado." + +#: backends/platform/iphone/osys_events.cpp:313 +msgid "Touchpad mode enabled." +msgstr "Modo panel táctil activado." + +#: backends/platform/iphone/osys_events.cpp:315 +msgid "Touchpad mode disabled." +msgstr "Modo panel táctil desactivado." + +#: backends/platform/maemo/maemo.cpp:209 +msgid "Click Mode" +msgstr "Modo rato" + +#: backends/platform/maemo/maemo.cpp:215 +#: backends/platform/symbian/src/SymbianActions.cpp:42 +#: backends/platform/wince/CEActionsPocket.cpp:60 +#: backends/platform/wince/CEActionsSmartphone.cpp:43 +#: backends/platform/bada/form.cpp:281 +msgid "Left Click" +msgstr "Botón primario" + +#: backends/platform/maemo/maemo.cpp:218 +msgid "Middle Click" +msgstr "Botón central" + +#: backends/platform/maemo/maemo.cpp:221 +#: backends/platform/symbian/src/SymbianActions.cpp:43 +#: backends/platform/wince/CEActionsSmartphone.cpp:44 +#: backends/platform/bada/form.cpp:273 +msgid "Right Click" +msgstr "Botón secundario" + +#: backends/platform/sdl/macosx/appmenu_osx.mm:78 +msgid "Hide ScummVM" +msgstr "Ocultar ScummVM" + +#: backends/platform/sdl/macosx/appmenu_osx.mm:83 +msgid "Hide Others" +msgstr "Ocultar outros" + +#: backends/platform/sdl/macosx/appmenu_osx.mm:88 +msgid "Show All" +msgstr "Mostrar todo" + +#: backends/platform/sdl/macosx/appmenu_osx.mm:110 +#: backends/platform/sdl/macosx/appmenu_osx.mm:121 +msgid "Window" +msgstr "Ventá" + +#: backends/platform/sdl/macosx/appmenu_osx.mm:115 +msgid "Minimize" +msgstr "Minimizar" + +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45 +msgid "Normal (no scaling)" +msgstr "Normal (sen escala)" + +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64 +msgctxt "lowres" +msgid "Normal (no scaling)" +msgstr "Normal (sen escala)" + +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2135 +#: backends/graphics/openglsdl/openglsdl-graphics.cpp:533 +msgid "Enabled aspect ratio correction" +msgstr "Corrección de proporción activada" + +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2141 +#: backends/graphics/openglsdl/openglsdl-graphics.cpp:538 +msgid "Disabled aspect ratio correction" +msgstr "Corrección de proporción desactivada" + +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2196 +msgid "Active graphics filter:" +msgstr "Filtro de gráficos activo:" + +#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2238 +#: backends/graphics/openglsdl/openglsdl-graphics.cpp:477 +msgid "Windowed mode" +msgstr "Modo en ventá" + +#: backends/graphics/opengl/opengl-graphics.cpp:135 +msgid "OpenGL Normal" +msgstr "OpenGL Normal" + +#: backends/graphics/opengl/opengl-graphics.cpp:136 +msgid "OpenGL Conserve" +msgstr "OpenGL Conserve" + +#: backends/graphics/opengl/opengl-graphics.cpp:137 +msgid "OpenGL Original" +msgstr "OpenGL Original" + +#: backends/graphics/openglsdl/openglsdl-graphics.cpp:415 +msgid "Current display mode" +msgstr "Modo de visualización actual" + +#: backends/graphics/openglsdl/openglsdl-graphics.cpp:428 +msgid "Current scale" +msgstr "Escala actual" + +#: backends/graphics/openglsdl/openglsdl-graphics.cpp:558 +msgid "Active filter mode: Linear" +msgstr "Modo de filtro activo: lineal" + +#: backends/graphics/openglsdl/openglsdl-graphics.cpp:560 +msgid "Active filter mode: Nearest" +msgstr "Modo de filtro activo: máis próximo" + +#: backends/platform/symbian/src/SymbianActions.cpp:38 +#: backends/platform/wince/CEActionsSmartphone.cpp:39 +msgid "Up" +msgstr "Arriba" + +#: backends/platform/symbian/src/SymbianActions.cpp:39 +#: backends/platform/wince/CEActionsSmartphone.cpp:40 +msgid "Down" +msgstr "Abaixo" + +#: backends/platform/symbian/src/SymbianActions.cpp:40 +#: backends/platform/wince/CEActionsSmartphone.cpp:41 +msgid "Left" +msgstr "Esquerda" + +#: backends/platform/symbian/src/SymbianActions.cpp:41 +#: backends/platform/wince/CEActionsSmartphone.cpp:42 +msgid "Right" +msgstr "Dereita" + +#: backends/platform/symbian/src/SymbianActions.cpp:46 +#: backends/platform/wince/CEActionsSmartphone.cpp:47 +msgid "Zone" +msgstr "Zona" + +#: backends/platform/symbian/src/SymbianActions.cpp:47 +#: backends/platform/wince/CEActionsPocket.cpp:54 +#: backends/platform/wince/CEActionsSmartphone.cpp:48 +msgid "Multi Function" +msgstr "Multifunción" + +#: backends/platform/symbian/src/SymbianActions.cpp:48 +msgid "Swap character" +msgstr "Cambiar carácter" + +#: backends/platform/symbian/src/SymbianActions.cpp:49 +msgid "Skip text" +msgstr "Omitir texto" + +#: backends/platform/symbian/src/SymbianActions.cpp:51 +msgid "Fast mode" +msgstr "Modo rápido" + +#: backends/platform/symbian/src/SymbianActions.cpp:53 +msgid "Debugger" +msgstr "Depurador" + +#: backends/platform/symbian/src/SymbianActions.cpp:54 +msgid "Global menu" +msgstr "Menú global" + +#: backends/platform/symbian/src/SymbianActions.cpp:55 +msgid "Virtual keyboard" +msgstr "Teclado virtual" + +#: backends/platform/symbian/src/SymbianActions.cpp:56 +msgid "Key mapper" +msgstr "Asignador de teclas" + +#: backends/events/symbiansdl/symbiansdl-events.cpp:184 +msgid "Do you want to quit ?" +msgstr "Queres saír?" + +#: backends/platform/wii/options.cpp:51 +msgid "Video" +msgstr "Vídeo" + +#: backends/platform/wii/options.cpp:54 +msgid "Current video mode:" +msgstr "Modo de vídeo actual:" + +#: backends/platform/wii/options.cpp:56 +msgid "Double-strike" +msgstr "Dobre" + +#: backends/platform/wii/options.cpp:60 +msgid "Horizontal underscan:" +msgstr "Marxe horizontal:" + +#: backends/platform/wii/options.cpp:66 +msgid "Vertical underscan:" +msgstr "Marxe vertical:" + +#: backends/platform/wii/options.cpp:71 +msgid "Input" +msgstr "Entrada" + +#: backends/platform/wii/options.cpp:74 +msgid "GC Pad sensitivity:" +msgstr "Sensibilidade do mando de GC:" + +#: backends/platform/wii/options.cpp:80 +msgid "GC Pad acceleration:" +msgstr "Aceleración do mando de GC:" + +#: backends/platform/wii/options.cpp:86 +msgid "DVD" +msgstr "DVD" + +#: backends/platform/wii/options.cpp:89 backends/platform/wii/options.cpp:101 +msgid "Status:" +msgstr "Estado:" + +#: backends/platform/wii/options.cpp:90 backends/platform/wii/options.cpp:102 +msgid "Unknown" +msgstr "Descoñecido" + +#: backends/platform/wii/options.cpp:93 +msgid "Mount DVD" +msgstr "Montar DVD" + +#: backends/platform/wii/options.cpp:94 +msgid "Unmount DVD" +msgstr "Desmontar DVD" + +#: backends/platform/wii/options.cpp:98 +msgid "SMB" +msgstr "SMB" + +#: backends/platform/wii/options.cpp:106 +msgid "Server:" +msgstr "Servidor:" + +#: backends/platform/wii/options.cpp:110 +msgid "Share:" +msgstr "Disco compartido:" + +#: backends/platform/wii/options.cpp:114 +msgid "Username:" +msgstr "Nome de usuario:" + +#: backends/platform/wii/options.cpp:118 +msgid "Password:" +msgstr "Contrasinal:" + +#: backends/platform/wii/options.cpp:121 +msgid "Init network" +msgstr "Conectar á rede" + +#: backends/platform/wii/options.cpp:123 +msgid "Mount SMB" +msgstr "Montar SMB" + +#: backends/platform/wii/options.cpp:124 +msgid "Unmount SMB" +msgstr "Desmontar SMB" + +#: backends/platform/wii/options.cpp:143 +msgid "DVD Mounted successfully" +msgstr "DVD montado con éxito" + +#: backends/platform/wii/options.cpp:146 +msgid "Error while mounting the DVD" +msgstr "Erro ao montar o DVD" + +#: backends/platform/wii/options.cpp:148 +msgid "DVD not mounted" +msgstr "DVD non montado" + +#: backends/platform/wii/options.cpp:161 +msgid "Network up, share mounted" +msgstr "Conexión á rede, disco montado" + +#: backends/platform/wii/options.cpp:163 +msgid "Network up" +msgstr "Conexión á rede" + +#: backends/platform/wii/options.cpp:166 +msgid ", error while mounting the share" +msgstr ", erro ao montar o disco" + +#: backends/platform/wii/options.cpp:168 +msgid ", share not mounted" +msgstr ", disco non montado" + +#: backends/platform/wii/options.cpp:174 +msgid "Network down" +msgstr "Non hai conexión á rede" + +#: backends/platform/wii/options.cpp:178 +msgid "Initializing network" +msgstr "Conectando á rede" + +#: backends/platform/wii/options.cpp:182 +msgid "Timeout while initializing network" +msgstr "Tempo de espera esgotado" + +#: backends/platform/wii/options.cpp:186 +#, c-format +msgid "Network not initialized (%d)" +msgstr "Erro de conexión á rede (%d)" + +#: backends/platform/wince/CEActionsPocket.cpp:46 +msgid "Hide Toolbar" +msgstr "Ocultar barra de ferramentas" + +#: backends/platform/wince/CEActionsPocket.cpp:47 +msgid "Show Keyboard" +msgstr "Mostrar teclado" + +#: backends/platform/wince/CEActionsPocket.cpp:48 +msgid "Sound on/off" +msgstr "Son si/non" + +#: backends/platform/wince/CEActionsPocket.cpp:49 +msgid "Right click" +msgstr "Botón secundario" + +#: backends/platform/wince/CEActionsPocket.cpp:50 +msgid "Show/Hide Cursor" +msgstr "Mostrar/ocultar cursor" + +#: backends/platform/wince/CEActionsPocket.cpp:51 +msgid "Free look" +msgstr "Vista libre" + +#: backends/platform/wince/CEActionsPocket.cpp:52 +msgid "Zoom up" +msgstr "Ampliar" + +#: backends/platform/wince/CEActionsPocket.cpp:53 +msgid "Zoom down" +msgstr "Reducir" + +#: backends/platform/wince/CEActionsPocket.cpp:55 +#: backends/platform/wince/CEActionsSmartphone.cpp:49 +msgid "Bind Keys" +msgstr "Vincular teclas" + +#: backends/platform/wince/CEActionsPocket.cpp:56 +msgid "Cursor Up" +msgstr "Arriba" + +#: backends/platform/wince/CEActionsPocket.cpp:57 +msgid "Cursor Down" +msgstr "Abaixo" + +#: backends/platform/wince/CEActionsPocket.cpp:58 +msgid "Cursor Left" +msgstr "Esquerda" + +#: backends/platform/wince/CEActionsPocket.cpp:59 +msgid "Cursor Right" +msgstr "Dereita" + +#: backends/platform/wince/CEActionsPocket.cpp:267 +#: backends/platform/wince/CEActionsSmartphone.cpp:231 +msgid "Do you want to load or save the game?" +msgstr "Queres cargar ou gardar a partida?" + +#: backends/platform/wince/CEActionsPocket.cpp:326 +#: backends/platform/wince/CEActionsSmartphone.cpp:287 +msgid " Are you sure you want to quit ? " +msgstr " Seguro que queres saír?" + +#: backends/platform/wince/CEActionsSmartphone.cpp:50 +msgid "Keyboard" +msgstr "Teclado" + +#: backends/platform/wince/CEActionsSmartphone.cpp:51 +msgid "Rotate" +msgstr "Rotar" + +#: backends/platform/wince/CELauncherDialog.cpp:56 +msgid "Using SDL driver " +msgstr "Empregando driver de SDL" + +#: backends/platform/wince/CELauncherDialog.cpp:60 +msgid "Display " +msgstr "Pantalla" + +#: backends/platform/wince/CELauncherDialog.cpp:83 +msgid "Do you want to perform an automatic scan ?" +msgstr "Queres realizar unha análise automática?" + +#: backends/platform/wince/wince-sdl.cpp:515 +msgid "Map right click action" +msgstr "Asignar acción de botón secundario" + +#: backends/platform/wince/wince-sdl.cpp:519 +msgid "You must map a key to the 'Right Click' action to play this game" +msgstr "" +"Debes asignar unha tecla á acción do botón secundario do rato para xogar" + +#: backends/platform/wince/wince-sdl.cpp:528 +msgid "Map hide toolbar action" +msgstr "Asignar acción Ocultar barra de ferramentas" + +#: backends/platform/wince/wince-sdl.cpp:532 +msgid "You must map a key to the 'Hide toolbar' action to play this game" +msgstr "" +"Debes asignar unha tecla á acción Ocultar barra de ferramentas para xogar" + +#: backends/platform/wince/wince-sdl.cpp:541 +msgid "Map Zoom Up action (optional)" +msgstr "Asignar acción de Ampliar (opcional)" + +#: backends/platform/wince/wince-sdl.cpp:544 +msgid "Map Zoom Down action (optional)" +msgstr "Asignar acción de Reducir (opcional)" + +#: backends/platform/wince/wince-sdl.cpp:552 +msgid "" +"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory" +msgstr "" +"Non esquezas asignar unha tecla á acción Ocultar barra de ferramentas para " +"ver o inventario completo" + +#: backends/events/default/default-events.cpp:191 +msgid "Do you really want to return to the Launcher?" +msgstr "Seguro que queres volver ao Iniciador?" + +#: backends/events/default/default-events.cpp:191 +msgid "Launcher" +msgstr "Iniciador" + +#: backends/events/default/default-events.cpp:213 +msgid "Do you really want to quit?" +msgstr "Seguro que queres saír?" + +#: backends/events/gph/gph-events.cpp:386 +#: backends/events/gph/gph-events.cpp:429 +#: backends/events/openpandora/op-events.cpp:139 +msgid "Touchscreen 'Tap Mode' - Left Click" +msgstr "Modo pantalla táctil: premer botón primario" + +#: backends/events/gph/gph-events.cpp:388 +#: backends/events/gph/gph-events.cpp:431 +#: backends/events/openpandora/op-events.cpp:141 +msgid "Touchscreen 'Tap Mode' - Right Click" +msgstr "Modo pantalla táctil: premer botón secundario" + +#: backends/events/gph/gph-events.cpp:390 +#: backends/events/gph/gph-events.cpp:433 +#: backends/events/openpandora/op-events.cpp:143 +msgid "Touchscreen 'Tap Mode' - Hover (No Click)" +msgstr "Modo pantalla táctil: apuntar co rato" + +#: backends/events/gph/gph-events.cpp:410 +msgid "Maximum Volume" +msgstr "Volume máximo" + +#: backends/events/gph/gph-events.cpp:412 +msgid "Increasing Volume" +msgstr "Subindo volume" + +#: backends/events/gph/gph-events.cpp:418 +msgid "Minimal Volume" +msgstr "Volume mínimo" + +#: backends/events/gph/gph-events.cpp:420 +msgid "Decreasing Volume" +msgstr "Baixando volume" + +#: backends/updates/macosx/macosx-updates.mm:65 +msgid "Check for Updates..." +msgstr "Buscar actualizacións..." + +#: backends/platform/bada/form.cpp:269 +msgid "Right Click Once" +msgstr "Botón secundario unha vez" + +#: backends/platform/bada/form.cpp:277 +msgid "Move Only" +msgstr "Mover unicamente" + +#: backends/platform/bada/form.cpp:291 +msgid "Escape Key" +msgstr "ESC" + +#: backends/platform/bada/form.cpp:296 +msgid "Game Menu" +msgstr "Menú do xogo" + +#: backends/platform/bada/form.cpp:301 +msgid "Show Keypad" +msgstr "Mostrar teclado numérico" + +#: backends/platform/bada/form.cpp:309 +msgid "Control Mouse" +msgstr "Rato" + +#: backends/events/maemosdl/maemosdl-events.cpp:192 +msgid "Clicking Enabled" +msgstr "Premer activado" + +#: backends/events/maemosdl/maemosdl-events.cpp:192 +msgid "Clicking Disabled" +msgstr "Premer desactivado" -- cgit v1.2.3 From 333a05c5b1643c3021929b83eca0686a559f1ceb Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 27 Aug 2012 11:42:29 +0100 Subject: CREDITS: Add credits for Galician translation --- AUTHORS | 3 +++ devtools/credits.pl | 3 +++ gui/credits.h | 3 +++ 3 files changed, 9 insertions(+) diff --git a/AUTHORS b/AUTHORS index 02c805b833..fe806c4490 100644 --- a/AUTHORS +++ b/AUTHORS @@ -408,6 +408,9 @@ Other contributions French: Thierry Crozat + Galician: + Santiago G. Sanz + German: Simon Sawatzki Lothar Serra Mari diff --git a/devtools/credits.pl b/devtools/credits.pl index 6a4b97b89d..7ce17a9df6 100755 --- a/devtools/credits.pl +++ b/devtools/credits.pl @@ -935,6 +935,9 @@ begin_credits("Credits"); begin_section("French"); add_person("Thierry Crozat", "criezy", ""); end_section(); + begin_section("Galician"); + add_person("Santiago G. Sanz", "sgsanz", ""); + end_section(); begin_section("German"); add_person("Simon Sawatzki", "SimSaw", ""); add_person("Lothar Serra Mari", "Lothar93", ""); diff --git a/gui/credits.h b/gui/credits.h index 34c6f21026..fdde2da821 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -476,6 +476,9 @@ static const char *credits[] = { "C1""French", "C0""Thierry Crozat", "", +"C1""Galician", +"C0""Santiago G. Sanz", +"", "C1""German", "C0""Simon Sawatzki", "C0""Lothar Serra Mari", -- cgit v1.2.3 From b8e10e478572f535a845de37fc005a54375e6bcd Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 27 Aug 2012 11:42:50 +0100 Subject: I18N: Update translation data file --- gui/themes/translations.dat | Bin 345659 -> 367742 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index d81c1a0475..613afc0e4a 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From ad15f21676fd27b407317c3a164b9a9973f1c349 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 27 Aug 2012 11:44:46 +0100 Subject: NEWS: Mention new Galician translation --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index fc5ad8a67e..1f736aa74f 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ For a more comprehensive changelog of the latest experimental code, see: available and used for games without thumbnail support. It is possible to select the old one as default too. - Rewrote VideoDecoder subsystem. + - Added Galician translation. 1.5.0 (2012-07-27) New Games: -- cgit v1.2.3 From 8abba435bffc9b1168ec4d518f4da3b979da64d2 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Mon, 27 Aug 2012 15:56:29 +0200 Subject: I18N: Updated Catalan translation. --- po/ca_ES.po | 234 ++++++++++++++++++++++++++---------------------------------- 1 file changed, 103 insertions(+), 131 deletions(-) diff --git a/po/ca_ES.po b/po/ca_ES.po index 3e8ade3923..da2586a2af 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: ScummVM 1.3.0svn\n" +"Project-Id-Version: ScummVM 1.6.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" -"POT-Creation-Date: 2012-08-12 14:57+0200\n" -"PO-Revision-Date: 2011-10-04 20:51+0100\n" +"POT-Creation-Date: 2012-08-27 15:46+0200\n" +"PO-Revision-Date: 2012-08-26 20:32+0100\n" "Last-Translator: Jordi Vilalta Prat \n" "Language-Team: Catalan \n" "Language: Catalan\n" @@ -45,7 +45,7 @@ msgstr "Amunt" #: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43 #: gui/launcher.cpp:345 gui/massadd.cpp:94 gui/options.cpp:1228 #: gui/saveload-dialog.cpp:207 gui/saveload-dialog.cpp:267 -#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:843 +#: gui/saveload-dialog.cpp:516 gui/saveload-dialog.cpp:847 #: gui/themebrowser.cpp:54 engines/engine.cpp:442 #: engines/scumm/dialogs.cpp:190 engines/sword1/control.cpp:865 #: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:48 @@ -78,7 +78,6 @@ msgid "Remap keys" msgstr "Assigna les tecles" #: gui/gui-manager.cpp:129 base/main.cpp:307 -#, fuzzy msgid "Toggle FullScreen" msgstr "Commuta la pantalla completa" @@ -92,15 +91,15 @@ msgstr "Assigna" #: gui/KeysDialog.cpp:42 gui/launcher.cpp:346 gui/launcher.cpp:1001 #: gui/launcher.cpp:1005 gui/massadd.cpp:91 gui/options.cpp:1229 -#: gui/saveload-dialog.cpp:844 engines/engine.cpp:361 engines/engine.cpp:372 +#: gui/saveload-dialog.cpp:848 engines/engine.cpp:361 engines/engine.cpp:372 #: engines/scumm/dialogs.cpp:192 engines/scumm/scumm.cpp:1775 -#: engines/agos/animation.cpp:561 engines/groovie/script.cpp:420 +#: engines/agos/animation.cpp:558 engines/groovie/script.cpp:420 #: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141 -#: engines/sword1/animation.cpp:539 engines/sword1/animation.cpp:560 -#: engines/sword1/animation.cpp:570 engines/sword1/animation.cpp:577 +#: engines/sword1/animation.cpp:519 engines/sword1/animation.cpp:540 +#: engines/sword1/animation.cpp:550 engines/sword1/animation.cpp:557 #: engines/sword1/control.cpp:865 engines/sword1/logic.cpp:1633 -#: engines/sword2/animation.cpp:435 engines/sword2/animation.cpp:455 -#: engines/sword2/animation.cpp:465 engines/sword2/animation.cpp:474 +#: engines/sword2/animation.cpp:419 engines/sword2/animation.cpp:439 +#: engines/sword2/animation.cpp:449 engines/sword2/animation.cpp:458 #: engines/parallaction/saveload.cpp:274 backends/platform/wii/options.cpp:47 #: backends/platform/wince/CELauncherDialog.cpp:54 msgid "OK" @@ -194,9 +193,8 @@ msgid "Platform:" msgstr "Platafor.:" #: gui/launcher.cpp:231 -#, fuzzy msgid "Engine" -msgstr "Examina" +msgstr "Motor" #: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" @@ -934,11 +932,11 @@ msgstr "" #: gui/saveload-dialog.cpp:158 msgid "List view" -msgstr "" +msgstr "Vista de llistat" #: gui/saveload-dialog.cpp:159 msgid "Grid view" -msgstr "" +msgstr "Vista de quadrícula" #: gui/saveload-dialog.cpp:202 gui/saveload-dialog.cpp:350 msgid "No date saved" @@ -960,15 +958,15 @@ msgstr "Suprimeix" msgid "Do you really want to delete this savegame?" msgstr "Realment voleu suprimir aquesta partida?" -#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:796 +#: gui/saveload-dialog.cpp:375 gui/saveload-dialog.cpp:800 msgid "Date: " msgstr "Data: " -#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:802 +#: gui/saveload-dialog.cpp:379 gui/saveload-dialog.cpp:806 msgid "Time: " msgstr "Hora: " -#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:810 +#: gui/saveload-dialog.cpp:385 gui/saveload-dialog.cpp:814 msgid "Playtime: " msgstr "Temps de joc: " @@ -978,31 +976,28 @@ msgstr "Partida sense t #: gui/saveload-dialog.cpp:517 msgid "Next" -msgstr "" +msgstr "Següent" #: gui/saveload-dialog.cpp:520 msgid "Prev" -msgstr "" +msgstr "Anterior" -#: gui/saveload-dialog.cpp:684 -#, fuzzy +#: gui/saveload-dialog.cpp:688 msgid "New Save" -msgstr "Desa" +msgstr "Nova partida desada" -#: gui/saveload-dialog.cpp:684 -#, fuzzy +#: gui/saveload-dialog.cpp:688 msgid "Create a new save game" -msgstr "No s'ha pogut desar l'estat del joc" +msgstr "Crea una nova partida desada" -#: gui/saveload-dialog.cpp:789 -#, fuzzy +#: gui/saveload-dialog.cpp:793 msgid "Name: " -msgstr "Nom:" +msgstr "Nom: " -#: gui/saveload-dialog.cpp:861 +#: gui/saveload-dialog.cpp:865 #, c-format msgid "Enter a description for slot %d:" -msgstr "" +msgstr "Entreu la descripció per l'espai %d:" #: gui/themebrowser.cpp:44 msgid "Select a Theme" @@ -1206,13 +1201,13 @@ msgstr "" "la informació bàsica i les instruccions sobre com obtenir més assistència." #: engines/dialogs.cpp:228 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate save failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Aquest motor no ofereix ajuda dins el joc. Consulteu el fitxer README per a " -"la informació bàsica i les instruccions sobre com obtenir més assistència." +"No s'ha pogut desar la partida (%s)! Consulteu el fitxer README per a la " +"informació bàsica i les instruccions sobre com obtenir més assistència." #: engines/dialogs.cpp:301 engines/mohawk/dialogs.cpp:109 #: engines/mohawk/dialogs.cpp:174 @@ -1273,13 +1268,13 @@ msgstr "" "Consulteu el fitxer README per a més detalls." #: engines/engine.cpp:426 -#, fuzzy, c-format +#, c-format msgid "" "Gamestate load failed (%s)! Please consult the README for basic information, " "and for instructions on how to obtain further assistance." msgstr "" -"Aquest motor no ofereix ajuda dins el joc. Consulteu el fitxer README per a " -"la informació bàsica i les instruccions sobre com obtenir més assistència." +"No s'ha pogut carregar la partida (%s)! Consulteu el fitxer README per a la " +"informació bàsica i les instruccions sobre com obtenir més assistència." #: engines/engine.cpp:439 msgid "" @@ -1295,15 +1290,16 @@ msgstr "" msgid "Start anyway" msgstr "Inicia de totes maneres" -#: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 +#: engines/agi/detection.cpp:142 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" -msgstr "" +msgstr "Utilitza les pantalles originals de desat/càrrega" -#: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48 +#: engines/agi/detection.cpp:143 engines/dreamweb/detection.cpp:48 #: engines/sci/detection.cpp:391 msgid "Use the original save/load screens, instead of the ScummVM ones" msgstr "" +"Utilitza les pantalles originals de desat/càrrega, en lloc de les de ScummVM" #: engines/agi/saveload.cpp:816 engines/sci/engine/kfile.cpp:838 msgid "Restore game:" @@ -1314,68 +1310,71 @@ msgid "Restore" msgstr "Restaura" #: engines/dreamweb/detection.cpp:57 -#, fuzzy msgid "Use bright palette mode" -msgstr "Element superior dret" +msgstr "Utilitza el mode de paleta brillant" #: engines/dreamweb/detection.cpp:58 msgid "Display graphics using the game's bright palette" -msgstr "" +msgstr "Mostra els gràfics utilitzant la paleta brillant del joc" #: engines/sci/detection.cpp:370 msgid "EGA undithering" msgstr "Elimina el tramat d'EGA" #: engines/sci/detection.cpp:371 -#, fuzzy msgid "Enable undithering in EGA games" -msgstr "Activa l'eliminació del tramat en els jocs EGA que ho suportin" +msgstr "Activa l'eliminació del tramat en els jocs EGA" #: engines/sci/detection.cpp:380 -#, fuzzy msgid "Prefer digital sound effects" -msgstr "Volum dels sons d'efectes especials" +msgstr "Prefereix efectes de so digitals" #: engines/sci/detection.cpp:381 msgid "Prefer digital sound effects instead of synthesized ones" -msgstr "" +msgstr "Prefereix els efectes de so digitals en lloc dels sintetitzats" #: engines/sci/detection.cpp:400 msgid "Use IMF/Yamaha FB-01 for MIDI output" -msgstr "" +msgstr "Utilitza IMF/Yamaha FB-01 per la sortida MIDI" #: engines/sci/detection.cpp:401 msgid "" "Use an IBM Music Feature card or a Yamaha FB-01 FM synth module for MIDI " "output" msgstr "" +"Utilitza una tarja IBM Music Feature o un mòdul sintetitzador Yamaha FB-01 " +"FM per la sortida MIDI" #: engines/sci/detection.cpp:411 msgid "Use CD audio" -msgstr "" +msgstr "Utilitza l'àudio del CD" #: engines/sci/detection.cpp:412 msgid "Use CD audio instead of in-game audio, if available" msgstr "" +"Utilitza l'àudio del CD en lloc de l'àudio intern del joc, si està disponible" #: engines/sci/detection.cpp:422 msgid "Use Windows cursors" -msgstr "" +msgstr "Utilitza els cursors de Windows" #: engines/sci/detection.cpp:423 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" msgstr "" +"Utilitza els cursors de Windows (més petits i en blanc i negre) en lloc dels " +"de DOS" #: engines/sci/detection.cpp:433 -#, fuzzy msgid "Use silver cursors" -msgstr "Cursor normal" +msgstr "Utilitza cursors platejats" #: engines/sci/detection.cpp:434 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" msgstr "" +"Utilitza el conjunt alternatiu de cursors platejats, en lloc dels normals " +"daurats" #: engines/scumm/dialogs.cpp:175 #, c-format @@ -1493,24 +1492,23 @@ msgstr "Veus i sub." #: engines/scumm/dialogs.cpp:653 msgid "Select a Proficiency Level." -msgstr "" +msgstr "Seleccioneu el nivell de competència." #: engines/scumm/dialogs.cpp:655 msgid "Refer to your Loom(TM) manual for help." -msgstr "" +msgstr "Consulteu el manual de Loom(TM) per ajuda." #: engines/scumm/dialogs.cpp:658 -#, fuzzy msgid "Standard" -msgstr "Estàndard (16bpp)" +msgstr "Estàndard" #: engines/scumm/dialogs.cpp:659 msgid "Practice" -msgstr "" +msgstr "Pràctica" #: engines/scumm/dialogs.cpp:660 msgid "Expert" -msgstr "" +msgstr "Expert" #: engines/scumm/help.cpp:73 msgid "Common keyboard commands:" @@ -2103,7 +2101,7 @@ msgstr "~M~en msgid "~W~ater Effect Enabled" msgstr "~E~fecte de l'aigua activat" -#: engines/agos/animation.cpp:560 +#: engines/agos/animation.cpp:557 #, c-format msgid "Cutscene file '%s' not found!" msgstr "No s'ha trobat el fitxer d'escena '%s'!" @@ -2129,118 +2127,109 @@ msgstr "No s'ha pogut desar l'estat del joc" #. Malcolm makes a joke. #: engines/kyra/detection.cpp:62 msgid "Studio audience" -msgstr "" +msgstr "Públic" #: engines/kyra/detection.cpp:63 msgid "Enable studio audience" -msgstr "" +msgstr "Activa el públic" #. I18N: This option allows the user to skip text and cutscenes. #: engines/kyra/detection.cpp:73 msgid "Skip support" -msgstr "" +msgstr "Suport per saltar text i escenes" #: engines/kyra/detection.cpp:74 msgid "Allow text and cutscenes to be skipped" -msgstr "" +msgstr "Permet que se saltin textos i escenes" #. I18N: Helium mode makes people sound like they've inhaled Helium. #: engines/kyra/detection.cpp:84 msgid "Helium mode" -msgstr "" +msgstr "Mode heli" #: engines/kyra/detection.cpp:85 -#, fuzzy msgid "Enable helium mode" -msgstr "Activa el Mode Roland GS" +msgstr "Activa el mode heli" #. 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 "Desplaçament suau" #: engines/kyra/detection.cpp:100 msgid "Enable smooth scrolling when walking" -msgstr "" +msgstr "Activa el desplaçament suau al caminar" #. 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 "Cursor normal" +msgstr "Cursor flotant" #: engines/kyra/detection.cpp:113 msgid "Enable floating cursors" -msgstr "" +msgstr "Activa els cursors flotants" #. I18N: HP stands for Hit Points #: engines/kyra/detection.cpp:127 msgid "HP bar graphs" -msgstr "" +msgstr "Barra gràfica de PI" #: engines/kyra/detection.cpp:128 msgid "Enable hit point bar graphs" -msgstr "" +msgstr "Activa la barra gràfica dels punts d'impacte" #: engines/kyra/lol.cpp:478 msgid "Attack 1" -msgstr "" +msgstr "Atac 1" #: engines/kyra/lol.cpp:479 msgid "Attack 2" -msgstr "" +msgstr "Atac 2" #: engines/kyra/lol.cpp:480 msgid "Attack 3" -msgstr "" +msgstr "Atac 3" #: engines/kyra/lol.cpp:481 msgid "Move Forward" -msgstr "" +msgstr "Mou endavant" #: engines/kyra/lol.cpp:482 msgid "Move Back" -msgstr "" +msgstr "Mou enrere" #: engines/kyra/lol.cpp:483 msgid "Slide Left" -msgstr "" +msgstr "Mou a l'esquerra" #: engines/kyra/lol.cpp:484 -#, fuzzy msgid "Slide Right" -msgstr "Dreta" +msgstr "Mou a la dreta" #: engines/kyra/lol.cpp:485 -#, fuzzy msgid "Turn Left" -msgstr "Apaga" +msgstr "Gira a l'esquerra" #: engines/kyra/lol.cpp:486 -#, fuzzy msgid "Turn Right" -msgstr "Cursor Dreta" +msgstr "Gira a la dreta" #: engines/kyra/lol.cpp:487 -#, fuzzy msgid "Rest" -msgstr "Restaura" +msgstr "Descansa" #: engines/kyra/lol.cpp:488 -#, fuzzy msgid "Options" -msgstr "~O~pcions" +msgstr "Opcions" #: engines/kyra/lol.cpp:489 -#, fuzzy msgid "Choose Spell" -msgstr "Escull" +msgstr "Escull l'encanteri" #: engines/kyra/sound_midi.cpp:475 -#, fuzzy msgid "" "You appear to be using a General MIDI device,\n" "but your game only supports Roland MT32 MIDI.\n" @@ -2256,11 +2245,11 @@ msgstr "" #: engines/queen/queen.cpp:59 msgid "Alternative intro" -msgstr "" +msgstr "Introducció alternativa" #: engines/queen/queen.cpp:60 msgid "Use an alternative game intro (CD version only)" -msgstr "" +msgstr "Utilitza una introducció del joc alternativa (només per la versió CD)" #: engines/sky/compact.cpp:130 msgid "" @@ -2280,28 +2269,29 @@ msgstr "" #: engines/sky/detection.cpp:44 msgid "Floppy intro" -msgstr "" +msgstr "Introducció de disquets" #: engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" msgstr "" +"Utilitza la introducció de la versió de disquets (només per a la versió CD)" -#: engines/sword1/animation.cpp:539 +#: engines/sword1/animation.cpp:519 #, c-format msgid "PSX stream cutscene '%s' cannot be played in paletted mode" -msgstr "" +msgstr "L'escena '%s' de PSX no es pot reproduir en mode paleta" -#: engines/sword1/animation.cpp:560 engines/sword2/animation.cpp:455 +#: engines/sword1/animation.cpp:540 engines/sword2/animation.cpp:439 msgid "DXA cutscenes found but ScummVM has been built without zlib support" msgstr "" "S'han trobat escenes en DXA, però s'ha compilat el ScummVM sense suport de " "zlib" -#: engines/sword1/animation.cpp:570 engines/sword2/animation.cpp:465 +#: engines/sword1/animation.cpp:550 engines/sword2/animation.cpp:449 msgid "MPEG2 cutscenes are no longer supported" msgstr "Les escenes MPEG2 ja no estan suportades" -#: engines/sword1/animation.cpp:576 engines/sword2/animation.cpp:473 +#: engines/sword1/animation.cpp:556 engines/sword2/animation.cpp:457 #, c-format msgid "Cutscene '%s' not found" msgstr "No s'ha trobat l'escena '%s'" @@ -2345,32 +2335,33 @@ msgstr "Mantingues el nou" msgid "This is the end of the Broken Sword 1 Demo" msgstr "Aquest és el final de la Demo del Broken Sword 1" -#: engines/sword2/animation.cpp:435 -#, fuzzy +#: engines/sword2/animation.cpp:419 msgid "" "PSX cutscenes found but ScummVM has been built without RGB color support" msgstr "" -"S'han trobat escenes en DXA, però s'ha compilat el ScummVM sense suport de " -"zlib" +"S'han trobat escenes de PSX, però s'ha compilat el ScummVM sense suport de " +"color RGB" #: engines/sword2/sword2.cpp:79 msgid "Show object labels" -msgstr "" +msgstr "Mostra les etiquetes dels objectes" #: engines/sword2/sword2.cpp:80 msgid "Show labels for objects on mouse hover" -msgstr "" +msgstr "Mostra etiquetes al posar el ratolí sobre els objectes" #: engines/teenagent/resources.cpp:68 msgid "" "You're missing the 'teenagent.dat' file. Get it from the ScummVM website" -msgstr "" +msgstr "Us falta el fitxer 'teenagent.dat'. Obteniu-lo a la pàgina de ScummVM" #: engines/teenagent/resources.cpp:89 msgid "" "The teenagent.dat file is compressed and zlib hasn't been included in this " "executable. Please decompress it" msgstr "" +"El fitxer teenagent.dat està comprimit però aquest executable no conté zlib. " +"Descomprimiu-lo, si us plau." #: engines/parallaction/saveload.cpp:133 #, c-format @@ -2512,9 +2503,8 @@ msgid "Keymap:" msgstr "Assignacions de teclat:" #: backends/keymapper/remap-dialog.cpp:66 -#, fuzzy msgid " (Effective)" -msgstr " (Actiu)" +msgstr " (Efectiu)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Active)" @@ -2522,7 +2512,7 @@ msgstr " (Actiu)" #: backends/keymapper/remap-dialog.cpp:106 msgid " (Blocked)" -msgstr "" +msgstr " (Bloquejat)" #: backends/keymapper/remap-dialog.cpp:119 msgid " (Global)" @@ -2626,7 +2616,7 @@ msgstr "Mode Touchpad desactivat." #: backends/platform/maemo/maemo.cpp:209 msgid "Click Mode" -msgstr "" +msgstr "Mode clic" #: backends/platform/maemo/maemo.cpp:215 #: backends/platform/symbian/src/SymbianActions.cpp:42 @@ -2637,9 +2627,8 @@ msgid "Left Click" msgstr "Clic esquerre" #: backends/platform/maemo/maemo.cpp:218 -#, fuzzy msgid "Middle Click" -msgstr "Element mig esquerre" +msgstr "Clic central" #: backends/platform/maemo/maemo.cpp:221 #: backends/platform/symbian/src/SymbianActions.cpp:43 @@ -3114,20 +3103,3 @@ msgstr "Clicat activat" #: backends/events/maemosdl/maemosdl-events.cpp:192 msgid "Clicking Disabled" msgstr "Clicat desactivat" - -#~ msgid "Hercules Green" -#~ msgstr "Hercules Verd" - -#~ msgid "Hercules Amber" -#~ msgstr "Hercules Àmbar" - -#~ msgctxt "lowres" -#~ msgid "Hercules Green" -#~ msgstr "Hercules Verd" - -#~ msgctxt "lowres" -#~ msgid "Hercules Amber" -#~ msgstr "Hercules Àmbar" - -#~ msgid "Save game failed!" -#~ msgstr "No s'ha pogut desar la partida!" -- cgit v1.2.3 From e96249a105b36f79656e4b75cd17fd88a9b69ba9 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Mon, 27 Aug 2012 15:57:29 +0200 Subject: I18N: Update translation data file. --- gui/themes/translations.dat | Bin 367742 -> 370908 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat index 613afc0e4a..1c3abf84a8 100644 Binary files a/gui/themes/translations.dat and b/gui/themes/translations.dat differ -- cgit v1.2.3 From 6f105e62302b01db9b8d0bea14235d6e2c5932ba Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 27 Aug 2012 11:09:38 -0400 Subject: VIDEO: Fix "empty" AVI frames --- video/avi_decoder.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp index 09b95d38ad..0d51f5b130 100644 --- a/video/avi_decoder.cpp +++ b/video/avi_decoder.cpp @@ -330,19 +330,25 @@ void AVIDecoder::readNextPacket() { error("Cannot get track from tag '%s'", tag2str(nextTag)); uint32 chunkSize = _fileStream->readUint32LE(); - Common::SeekableReadStream *chunk = _fileStream->readStream(chunkSize); - _fileStream->skip(chunkSize & 1); + Common::SeekableReadStream *chunk = 0; + + if (chunkSize != 0) { + chunk = _fileStream->readStream(chunkSize); + _fileStream->skip(chunkSize & 1); + } if (track->getTrackType() == Track::kTrackTypeAudio) { if (getStreamType(nextTag) != MKTAG16('w', 'b')) error("Invalid audio track tag '%s'", tag2str(nextTag)); + assert(chunk); ((AVIAudioTrack *)track)->queueSound(chunk); } else { AVIVideoTrack *videoTrack = (AVIVideoTrack *)track; if (getStreamType(nextTag) == MKTAG16('p', 'c')) { // Palette Change + assert(chunk); byte firstEntry = chunk->readByte(); uint16 numEntries = chunk->readByte(); chunk->readUint16LE(); // Reserved @@ -387,8 +393,13 @@ AVIDecoder::AVIVideoTrack::~AVIVideoTrack() { } void AVIDecoder::AVIVideoTrack::decodeFrame(Common::SeekableReadStream *stream) { - if (_videoCodec) - _lastFrame = _videoCodec->decodeImage(stream); + if (stream) { + if (_videoCodec) + _lastFrame = _videoCodec->decodeImage(stream); + } else { + // Empty frame + _lastFrame = 0; + } delete stream; _curFrame++; -- cgit v1.2.3 From 4b05031042387ad9118690a77e1681165296bdec Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 27 Aug 2012 13:19:53 -0400 Subject: Revert "VIDEO: Rework SVQ1 codebooks so they're endian-safe" This reverts commit 1ca81ee6ecff15c843c04a51c8757be5a685edc2. I was wrong about them not being endian-safe before. Don't stone me. Conflicts: video/codecs/svq1.cpp --- video/codecs/svq1.cpp | 8 +- video/codecs/svq1_cb.h | 2900 ++++++++++++++++++++++++------------------------ 2 files changed, 1454 insertions(+), 1454 deletions(-) diff --git a/video/codecs/svq1.cpp b/video/codecs/svq1.cpp index eba0c90305..14452ab15b 100644 --- a/video/codecs/svq1.cpp +++ b/video/codecs/svq1.cpp @@ -317,7 +317,7 @@ bool SVQ1Decoder::svq1DecodeBlockIntra(Common::BitStream *s, byte *pixels, int p for (uint y = 0; y < height; y++) memset(&dst[y * (pitch / 4)], mean, width); } else { - const uint32 *codebook = s_svq1IntraCodebooks[level]; + const uint32 *codebook = (const uint32 *)s_svq1IntraCodebooks[level]; uint32 bitCache = s->getBits(stages * 4); // calculate codebook entries for this vector @@ -336,7 +336,7 @@ bool SVQ1Decoder::svq1DecodeBlockIntra(Common::BitStream *s, byte *pixels, int p // add codebook entries to vector for (int j = 0; j < stages; j++) { - n3 = codebook[entries[j]] ^ 0x80808080; + n3 = READ_UINT32(&codebook[entries[j]]) ^ 0x80808080; n1 += (n3 & 0xFF00FF00) >> 8; n2 += n3 & 0x00FF00FF; } @@ -409,7 +409,7 @@ bool SVQ1Decoder::svq1DecodeBlockNonIntra(Common::BitStream *s, byte *pixels, in } int mean = _interMean->getSymbol(*s) - 256; - const uint32 *codebook = s_svq1InterCodebooks[level]; + const uint32 *codebook = (const uint32 *)s_svq1InterCodebooks[level]; uint32 bitCache = s->getBits(stages * 4); // calculate codebook entries for this vector @@ -430,7 +430,7 @@ bool SVQ1Decoder::svq1DecodeBlockNonIntra(Common::BitStream *s, byte *pixels, in // add codebook entries to vector for (int j = 0; j < stages; j++) { - n3 = codebook[entries[j]] ^ 0x80808080; + n3 = READ_UINT32(&codebook[entries[j]]) ^ 0x80808080; n1 += (n3 & 0xFF00FF00) >> 8; n2 += n3 & 0x00FF00FF; } diff --git a/video/codecs/svq1_cb.h b/video/codecs/svq1_cb.h index f9a8c54e40..8281b3fc28 100644 --- a/video/codecs/svq1_cb.h +++ b/video/codecs/svq1_cb.h @@ -30,1477 +30,1477 @@ namespace Video { -static const uint32 s_svq1InterCodebook4x2[192] = { - 0xf9fa0207, 0xfcfd0307, 0x0807fef9, 0x0403fcf8, - 0x03091113, 0xf8f4f0f2, 0xfdf8f0ee, 0x080c0e0b, - 0x14f6f007, 0x14f6ef07, 0xeb0812fa, 0xec0912f9, - 0xf2ec0319, 0xf3ee071d, 0x0e15fce3, 0x0e14fae1, - 0xe8e4e6ed, 0x0a16201f, 0x1c1f180f, 0xf3eae0e0, - 0xe6e9f802, 0x231b03f7, 0x15150b03, 0xdee5fc08, - 0x2f0ce1e2, 0x2f0de2e3, 0xd2ef1e26, 0xd2ed1a22, - 0xd5cdced6, 0x30373022, 0x2a333630, 0xd1cbccd4, - 0xfa000504, 0x0100fefe, 0xfefffaf5, 0x01090801, - 0x05fa0100, 0x02f40108, 0x08f9f207, 0x0800f805, - 0x080b0401, 0xfb00f8f4, 0x040001ff, 0x1003f8f1, - 0xfafc0811, 0xf8f3fc09, 0xee010602, 0xf40b0bff, - 0x00020006, 0xebf9060e, 0xecf3ff01, 0x150a0101, - 0x0d07fbea, 0x0c04fff5, 0x130e00f9, 0xedfb03fc, - 0x0f0af2e6, 0xfefa0412, 0xeefb1319, 0x0204f9ec, - 0xfcfffaf3, 0xddfe2519, 0x01010405, 0x2b02dceb, - 0x03fffe02, 0xfffafe08, 0x0c02fdfe, 0xfffefefb, - 0xfbfffffd, 0xfe0807ff, 0xfd050702, 0xf8fd0101, - 0xfefdfffd, 0x0d02fdfe, 0xfaf5000f, 0x00000003, - 0xfcfbf7fa, 0x03010412, 0x0400030c, 0xfd03fdf0, - 0x021203ef, 0xfffffdff, 0x00f810fa, 0x00f90ef7, - 0xfb0ef303, 0xfc0ef303, 0xe90e14f9, 0x04f8f908, - 0x10edf108, 0xfd0b0df6, 0x1a01ff09, 0x02e5f105, - 0xfc1007ec, 0x011f09d8, 0xf9e2f41a, 0x04edfe28, - 0x00000006, 0x0201fefa, 0xfa00ff00, 0xfffe0009, - 0xfd0208f9, 0x02fd02ff, 0x04fefc07, 0xfa000002, - 0x0209fefd, 0xfc00fffe, 0xfd00fdfd, 0x040a02fa, - 0x08f60003, 0x04fc0000, 0x020401ff, 0x07f7f903, - 0xfcf70102, 0x00000cff, 0xfc07ff03, 0x0204f203, - 0x0b01f7f4, 0x00010502, 0x02000103, 0xed060800, - 0xfcf9f6fa, 0x07050709, 0xfd031506, 0xfefbf7f5, - 0xfff0f7fc, 0x2401fbfe, 0x00130b08, 0xd7fc0502, - 0xfffeffff, 0x0601fefe, 0xf8010400, 0x00010101, - 0x0004fdfe, 0xfd03ff02, 0x01fc0301, 0xfb0003ff, - 0x03020403, 0xfffafdfe, 0x02fefdfe, 0x000108fc, - 0x060204f9, 0x0001fff9, 0x01fc02fe, 0xff02fa08, - 0x020002fa, 0xfff80405, 0x0900f5ff, 0x0202fe00, - 0xfffcfb11, 0xfefefcff, 0xfd09f300, 0x02f90cff, - 0x02fbfe00, 0xfd14fbf9, 0xe2ff0707, 0x01080503, - 0xfcff03fa, 0x12f5fe02, 0x0e03f900, 0xf7eefd14, - 0xff00fe07, 0xff0000fe, 0x0001fffc, 0x040002fe, - 0x0102fd01, 0x01fb0103, 0xfeff00fd, 0xfd000107, - 0xfe000502, 0x01fffb02, 0xff04feff, 0x0005fd00, - 0xfeff0300, 0xff0501fc, 0x09ff00ff, 0xfffffeff, - 0xff0505fe, 0xfefd02fe, 0x01f50201, 0x02030102, - 0xfefff602, 0x01040204, 0x01fb0504, 0x01f50600, - 0x06060001, 0xf1010200, 0x09050307, 0x020202e2, - 0x020901de, 0x02080805, 0x06060207, 0x0401e502 +static const int8 s_svq1InterCodebook4x2[768] = { + 7, 2, -6, -7, 7, 3, -3, -4, -7, -2, 7, 8, -8, -4, 3, 4, + 19, 17, 9, 3,-14,-16,-12, -8,-18,-16, -8, -3, 11, 14, 12, 8, + 7,-16,-10, 20, 7,-17,-10, 20, -6, 18, 8,-21, -7, 18, 9,-20, + 25, 3,-20,-14, 29, 7,-18,-13,-29, -4, 21, 14,-31, -6, 20, 14, + -19,-26,-28,-24, 31, 32, 22, 10, 15, 24, 31, 28,-32,-32,-22,-13, + 2, -8,-23,-26, -9, 3, 27, 35, 3, 11, 21, 21, 8, -4,-27,-34, + -30,-31, 12, 47,-29,-30, 13, 47, 38, 30,-17,-46, 34, 26,-19,-46, + -42,-50,-51,-43, 34, 48, 55, 48, 48, 54, 51, 42,-44,-52,-53,-47, + 4, 5, 0, -6, -2, -2, 0, 1,-11, -6, -1, -2, 1, 8, 9, 1, + 0, 1, -6, 5, 8, 1,-12, 2, 7,-14, -7, 8, 5, -8, 0, 8, + 1, 4, 11, 8,-12, -8, 0, -5, -1, 1, 0, 4,-15, -8, 3, 16, + 17, 8, -4, -6, 9, -4,-13, -8, 2, 6, 1,-18, -1, 11, 11,-12, + 6, 0, 2, 0, 14, 6, -7,-21, 1, -1,-13,-20, 1, 1, 10, 21, + -22, -5, 7, 13,-11, -1, 4, 12, -7, 0, 14, 19, -4, 3, -5,-19, + -26,-14, 10, 15, 18, 4, -6, -2, 25, 19, -5,-18,-20, -7, 4, 2, + -13, -6, -1, -4, 25, 37, -2,-35, 5, 4, 1, 1,-21,-36, 2, 43, + 2, -2, -1, 3, 8, -2, -6, -1, -2, -3, 2, 12, -5, -2, -2, -1, + -3, -1, -1, -5, -1, 7, 8, -2, 2, 7, 5, -3, 1, 1, -3, -8, + -3, -1, -3, -2, -2, -3, 2, 13, 15, 0,-11, -6, 3, 0, 0, 0, + -6, -9, -5, -4, 18, 4, 1, 3, 12, 3, 0, 4,-16, -3, 3, -3, + -17, 3, 18, 2, -1, -3, -1, -1, -6, 16, -8, 0, -9, 14, -7, 0, + 3,-13, 14, -5, 3,-13, 14, -4, -7, 20, 14,-23, 8, -7, -8, 4, + 8,-15,-19, 16,-10, 13, 11, -3, 9, -1, 1, 26, 5,-15,-27, 2, + -20, 7, 16, -4,-40, 9, 31, 1, 26,-12,-30, -7, 40, -2,-19, 4, + 6, 0, 0, 0, -6, -2, 1, 2, 0, -1, 0, -6, 9, 0, -2, -1, + -7, 8, 2, -3, -1, 2, -3, 2, 7, -4, -2, 4, 2, 0, 0, -6, + -3, -2, 9, 2, -2, -1, 0, -4, -3, -3, 0, -3, -6, 2, 10, 4, + 3, 0,-10, 8, 0, 0, -4, 4, -1, 1, 4, 2, 3, -7, -9, 7, + 2, 1, -9, -4, -1, 12, 0, 0, 3, -1, 7, -4, 3,-14, 4, 2, + -12, -9, 1, 11, 2, 5, 1, 0, 3, 1, 0, 2, 0, 8, 6,-19, + -6,-10, -7, -4, 9, 7, 5, 7, 6, 21, 3, -3,-11, -9, -5, -2, + -4, -9,-16, -1, -2, -5, 1, 36, 8, 11, 19, 0, 2, 5, -4,-41, + -1, -1, -2, -1, -2, -2, 1, 6, 0, 4, 1, -8, 1, 1, 1, 0, + -2, -3, 4, 0, 2, -1, 3, -3, 1, 3, -4, 1, -1, 3, 0, -5, + 3, 4, 2, 3, -2, -3, -6, -1, -2, -3, -2, 2, -4, 8, 1, 0, + -7, 4, 2, 6, -7, -1, 1, 0, -2, 2, -4, 1, 8, -6, 2, -1, + -6, 2, 0, 2, 5, 4, -8, -1, -1,-11, 0, 9, 0, -2, 2, 2, + 17, -5, -4, -1, -1, -4, -2, -2, 0,-13, 9, -3, -1, 12, -7, 2, + 0, -2, -5, 2, -7, -5, 20, -3, 7, 7, -1,-30, 3, 5, 8, 1, + -6, 3, -1, -4, 2, -2,-11, 18, 0, -7, 3, 14, 20, -3,-18, -9, + 7, -2, 0, -1, -2, 0, 0, -1, -4, -1, 1, 0, -2, 2, 0, 4, + 1, -3, 2, 1, 3, 1, -5, 1, -3, 0, -1, -2, 7, 1, 0, -3, + 2, 5, 0, -2, 2, -5, -1, 1, -1, -2, 4, -1, 0, -3, 5, 0, + 0, 3, -1, -2, -4, 1, 5, -1, -1, 0, -1, 9, -1, -2, -1, -1, + -2, 5, 5, -1, -2, 2, -3, -2, 1, 2,-11, 1, 2, 1, 3, 2, + 2,-10, -1, -2, 4, 2, 4, 1, 4, 5, -5, 1, 0, 6,-11, 1, + 1, 0, 6, 6, 0, 2, 1,-15, 7, 3, 5, 9,-30, 2, 2, 2, + -34, 1, 9, 2, 5, 8, 8, 2, 7, 2, 6, 6, 2,-27, 1, 4 }; -static const uint32 s_svq1InterCodebook4x4[384] = { - 0xf9fa0004, 0xf7f3f8fc, 0x06fff8f8, 0x1b1605fe, - 0x0a0bf9f0, 0x0a0df9ee, 0x080cfcf1, 0x0509fff7, - 0xf00f02fe, 0xed1302fd, 0xed1302fd, 0xf20f03fe, - 0x10161611, 0xfefbf9fa, 0xf4f0f0f4, 0xfdff0101, - 0x0800ef0b, 0x09ffeb0e, 0x08feeb0e, 0x06fef00b, - 0x0bf0fe07, 0x0eebfe09, 0x0eeaff0a, 0x0aeeff08, - 0xf70310f6, 0xf50414f3, 0xf60415f2, 0xf80310f5, - 0xf7f7040b, 0xf2f4060f, 0xf2f40811, 0xf5f90a10, - 0x0d0e0a04, 0x100f07ff, 0x0803f9f4, 0xf6eee9ec, - 0xe7e6eef6, 0xf5fa0104, 0x030b0f0d, 0x080d0f0c, - 0xf5f0edf0, 0x0b0f0c07, 0x0b10100b, 0xf6f5f7fa, - 0x050c1312, 0xfc051012, 0xf1f60006, 0xeae9eff7, - 0x15fff2f6, 0x1d00eff5, 0x1e01f0f5, 0x1700f2f6, - 0xfaf4eff0, 0xf9f2eded, 0x0201fffd, 0x131d231b, - 0x1717f8db, 0x1d1cf7d6, 0x1c1af6d5, 0x1613f5da, - 0xdff01020, 0xdbee1427, 0xdaed1326, 0xdeef0f20, - 0xfcfa0918, 0x03faf6ff, 0x03fff7f8, 0xfa020703, - 0x00fffdff, 0xf90204ff, 0xf0030bfd, 0xee091401, - 0x0c06f8fd, 0x0d07f6fb, 0x0705f7fa, 0xff02fbfb, - 0xfffd0cf8, 0x01fd0ff6, 0x01fc0df5, 0x02fd08f5, - 0xf4fb0609, 0xf3f80003, 0xfffffcfc, 0x120f01fc, - 0x0c0e0d09, 0xfeff0304, 0xfbf8fbfe, 0xfcf7f5f9, - 0xfcf9fb07, 0xfcf9fe0e, 0xfbf80011, 0xfbf9010f, - 0x0406fff6, 0x0402f7f1, 0x00fdff02, 0xf6f80d19, - 0xf0fd0b07, 0xf1fd0b07, 0xf7fe0706, 0xfbfd0204, - 0x00fffff9, 0x0602fef7, 0x0e06fcf4, 0x1308faf3, - 0xfbf5eeee, 0x040300fd, 0x06060806, 0x06060606, - 0xf60d03fb, 0xf70f01fa, 0xfa0ffdfa, 0xfd0afafa, - 0xf7f70109, 0x0506090b, 0x07080300, 0xfbfaf2f1, - 0x130bfaf5, 0xf8f7fbfe, 0xf6f70206, 0x05040506, - 0x0f08fdf9, 0x0f0a03ff, 0xfeff0505, 0xe7ebfe04, - 0x05fafa06, 0x09f9f708, 0x0df9f408, 0x0ef9f204, - 0x0101fdfc, 0xfdfefbfd, 0xfcfe0007, 0xfcfc0714, - 0x0afaecfd, 0x01000006, 0xff050805, 0xfe0000fd, - 0x02ff060d, 0x03020305, 0x000300fd, 0xfbfef8f0, - 0x00faf9fe, 0x01fdfafd, 0xff02fffb, 0x05100cff, - 0x080901f9, 0x0305fef6, 0x030702fa, 0xf9ff00fc, - 0xe8f70403, 0x03060200, 0x0704ffff, 0xfeff0305, - 0x02f70603, 0x01f30601, 0x02f60801, 0x01f90801, - 0x1602fdfd, 0x0cfbfdfe, 0x02f6fdfe, 0x02fcfffd, - 0x02080c0b, 0xf8fbfbfb, 0xfd00fcfa, 0x0303fffe, - 0xfffefa0c, 0xfefef80c, 0xfd00f909, 0xfe02fa04, - 0xfd0c01ed, 0xfc0504fc, 0xfffe0106, 0x07fefc04, - 0xf8f9fcfd, 0x00fefcfc, 0x100e02ff, 0x0404fefc, - 0xfb0207ff, 0x01ff00fe, 0x0dfffd04, 0x08f2f406, - 0xfb0405ff, 0xf70305fe, 0xf40407fe, 0xf70407ff, - 0x0101fdfa, 0xfa000b0b, 0xf9fe0406, 0x0a03f6f4, - 0xfefdfdfe, 0x0a0e0b06, 0xf6f6f5f7, 0x02030202, - 0xfff9fbf9, 0x070002ff, 0x090001ff, 0xfffb0403, - 0xfff1ff0a, 0x02fb0104, 0x01ff01fd, 0x040401fd, - 0x0a04ff02, 0x00ff0206, 0xf4f90202, 0xfd0002fc, - 0xf8fffcff, 0xf702ff03, 0xfb050004, 0x03080002, - 0x01010203, 0x0300fe04, 0x0104ff02, 0xe7ff0600, - 0xfcfefeff, 0xfcff00fd, 0x02fcffff, 0x1902fa00, - 0x0005fff5, 0x02fe0007, 0x04fdff0a, 0xfffefbfb, - 0xff030600, 0x01fffffe, 0xfbf4f9ff, 0x04020608, - 0xfaff0602, 0xfcff0a09, 0x00fc0001, 0xfbf7fe03, - 0x000403fc, 0x000303fc, 0x020300f5, 0x020703f5, - 0x0307fc02, 0x0107f801, 0x0104f4ff, 0x0202f703, - 0x09fefe02, 0x0103fdef, 0xfa0107fc, 0x03ff0405, - 0xfc0002ff, 0xff0c08f9, 0xfb0405fe, 0xfef8fb03, - 0xfefb0000, 0x1b03f8fe, 0x06fdfcff, 0xf9fe01fd, - 0xff010404, 0xfdf9f6f9, 0x03050a0a, 0xfdfcfefe, - 0x07050100, 0xecf0fe04, 0x08070400, 0xfffe0002, - 0x110301fe, 0xfffe01fd, 0xfefffeff, 0x00fffbff, - 0x0001fd05, 0x0000fe06, 0xfd00feff, 0xff0801f5, - 0x00000003, 0x01040200, 0x01060002, 0x02fdeefe, - 0x010600f2, 0x01fffefb, 0x010001ff, 0x00040701, - 0xfc0100ff, 0xfc030801, 0x030104fd, 0x01fc01fa, - 0x0303f401, 0xff00f6ff, 0x01020002, 0x04020203, - 0x03000003, 0x01fe0002, 0x00fb0205, 0xfff2ff06, - 0xfdfdfafe, 0x0504ff02, 0x00feff06, 0xfbff0404, - 0x00f501fc, 0x01fc02ff, 0xff03fd02, 0x000ffe01, - 0xfe00ff01, 0x01f9fc01, 0x15fffafe, 0x01ff02fe, - 0x00feff15, 0xfe01fdff, 0xff02fef7, 0xfffc0102, - 0xfa020801, 0x0004fff6, 0x0303fdfc, 0xffff0005, - 0xfe010203, 0x0304fefe, 0xeffc0205, 0x0304fe00, - 0x0300fcf9, 0xff020909, 0xff00faf5, 0x01000105, - 0xf5051100, 0x00fafe03, 0x01fcfe02, 0xff0201fc, - 0xfdfbfffb, 0xfefd05fd, 0xfb021004, 0xffff05fe, - 0x01fc0000, 0x0b0502ff, 0x01feffff, 0xfffdfefc, - 0x000afffb, 0xfd000106, 0x0001fc00, 0xff03fcfe, - 0x00030906, 0x00fe01fe, 0xfefefdfe, 0xfa010001, - 0x01020001, 0x01fe03ff, 0x00f1ff00, 0x060205ff, - 0x02020002, 0x06fcf400, 0xff040100, 0xfc010201, - 0x00f9fe01, 0xff000000, 0x030b02fb, 0xfa000301, - 0xfcf7fd00, 0x00ff0301, 0x00fe0104, 0x06fffd07, - 0x0206fe01, 0xfe03ff00, 0x020004fe, 0x02f202ff, - 0xff000202, 0xf2fd03fe, 0xfd030200, 0x02030105, - 0xf204fd01, 0xff0bfe01, 0x0003ff00, 0x020001ff, - 0x02fd03fe, 0x03fcfffc, 0x030102ff, 0x0702fefa, - 0x000201fe, 0xff0000fe, 0x02ff050c, 0xf901fff8, - 0x02fcfe02, 0xfef5000b, 0xfffd0103, 0xff010300, - 0xfe000300, 0xfdfffa00, 0x00fef90c, 0x0101fe07, - 0x02020201, 0x020002ff, 0x000400e9, 0x03010203, - 0x05fffbfc, 0xff0a05fd, 0xfc030000, 0xfb02ff01 +static const int8 s_svq1InterCodebook4x4[1536] = { + 4, 0, -6, -7, -4, -8,-13, -9, -8, -8, -1, 6, -2, 5, 22, 27, + -16, -7, 11, 10,-18, -7, 13, 10,-15, -4, 12, 8, -9, -1, 9, 5, + -2, 2, 15,-16, -3, 2, 19,-19, -3, 2, 19,-19, -2, 3, 15,-14, + 17, 22, 22, 16, -6, -7, -5, -2,-12,-16,-16,-12, 1, 1, -1, -3, + 11,-17, 0, 8, 14,-21, -1, 9, 14,-21, -2, 8, 11,-16, -2, 6, + 7, -2,-16, 11, 9, -2,-21, 14, 10, -1,-22, 14, 8, -1,-18, 10, + -10, 16, 3, -9,-13, 20, 4,-11,-14, 21, 4,-10,-11, 16, 3, -8, + 11, 4, -9, -9, 15, 6,-12,-14, 17, 8,-12,-14, 16, 10, -7,-11, + 4, 10, 14, 13, -1, 7, 15, 16,-12, -7, 3, 8,-20,-23,-18,-10, + -10,-18,-26,-25, 4, 1, -6,-11, 13, 15, 11, 3, 12, 15, 13, 8, + -16,-19,-16,-11, 7, 12, 15, 11, 11, 16, 16, 11, -6, -9,-11,-10, + 18, 19, 12, 5, 18, 16, 5, -4, 6, 0,-10,-15, -9,-17,-23,-22, + -10,-14, -1, 21,-11,-17, 0, 29,-11,-16, 1, 30,-10,-14, 0, 23, + -16,-17,-12, -6,-19,-19,-14, -7, -3, -1, 1, 2, 27, 35, 29, 19, + -37, -8, 23, 23,-42, -9, 28, 29,-43,-10, 26, 28,-38,-11, 19, 22, + 32, 16,-16,-33, 39, 20,-18,-37, 38, 19,-19,-38, 32, 15,-17,-34, + 24, 9, -6, -4, -1,-10, -6, 3, -8, -9, -1, 3, 3, 7, 2, -6, + -1, -3, -1, 0, -1, 4, 2, -7, -3, 11, 3,-16, 1, 20, 9,-18, + -3, -8, 6, 12, -5,-10, 7, 13, -6, -9, 5, 7, -5, -5, 2, -1, + -8, 12, -3, -1,-10, 15, -3, 1,-11, 13, -4, 1,-11, 8, -3, 2, + 9, 6, -5,-12, 3, 0, -8,-13, -4, -4, -1, -1, -4, 1, 15, 18, + 9, 13, 14, 12, 4, 3, -1, -2, -2, -5, -8, -5, -7,-11, -9, -4, + 7, -5, -7, -4, 14, -2, -7, -4, 17, 0, -8, -5, 15, 1, -7, -5, + -10, -1, 6, 4,-15, -9, 2, 4, 2, -1, -3, 0, 25, 13, -8,-10, + 7, 11, -3,-16, 7, 11, -3,-15, 6, 7, -2, -9, 4, 2, -3, -5, + -7, -1, -1, 0, -9, -2, 2, 6,-12, -4, 6, 14,-13, -6, 8, 19, + -18,-18,-11, -5, -3, 0, 3, 4, 6, 8, 6, 6, 6, 6, 6, 6, + -5, 3, 13,-10, -6, 1, 15, -9, -6, -3, 15, -6, -6, -6, 10, -3, + 9, 1, -9, -9, 11, 9, 6, 5, 0, 3, 8, 7,-15,-14, -6, -5, + -11, -6, 11, 19, -2, -5, -9, -8, 6, 2, -9,-10, 6, 5, 4, 5, + -7, -3, 8, 15, -1, 3, 10, 15, 5, 5, -1, -2, 4, -2,-21,-25, + 6, -6, -6, 5, 8, -9, -7, 9, 8,-12, -7, 13, 4,-14, -7, 14, + -4, -3, 1, 1, -3, -5, -2, -3, 7, 0, -2, -4, 20, 7, -4, -4, + -3,-20, -6, 10, 6, 0, 0, 1, 5, 8, 5, -1, -3, 0, 0, -2, + 13, 6, -1, 2, 5, 3, 2, 3, -3, 0, 3, 0,-16, -8, -2, -5, + -2, -7, -6, 0, -3, -6, -3, 1, -5, -1, 2, -1, -1, 12, 16, 5, + -7, 1, 9, 8,-10, -2, 5, 3, -6, 2, 7, 3, -4, 0, -1, -7, + 3, 4, -9,-24, 0, 2, 6, 3, -1, -1, 4, 7, 5, 3, -1, -2, + 3, 6, -9, 2, 1, 6,-13, 1, 1, 8,-10, 2, 1, 8, -7, 1, + -3, -3, 2, 22, -2, -3, -5, 12, -2, -3,-10, 2, -3, -1, -4, 2, + 11, 12, 8, 2, -5, -5, -5, -8, -6, -4, 0, -3, -2, -1, 3, 3, + 12, -6, -2, -1, 12, -8, -2, -2, 9, -7, 0, -3, 4, -6, 2, -2, + -19, 1, 12, -3, -4, 4, 5, -4, 6, 1, -2, -1, 4, -4, -2, 7, + -3, -4, -7, -8, -4, -4, -2, 0, -1, 2, 14, 16, -4, -2, 4, 4, + -1, 7, 2, -5, -2, 0, -1, 1, 4, -3, -1, 13, 6,-12,-14, 8, + -1, 5, 4, -5, -2, 5, 3, -9, -2, 7, 4,-12, -1, 7, 4, -9, + -6, -3, 1, 1, 11, 11, 0, -6, 6, 4, -2, -7,-12,-10, 3, 10, + -2, -3, -3, -2, 6, 11, 14, 10, -9,-11,-10,-10, 2, 2, 3, 2, + -7, -5, -7, -1, -1, 2, 0, 7, -1, 1, 0, 9, 3, 4, -5, -1, + 10, -1,-15, -1, 4, 1, -5, 2, -3, 1, -1, 1, -3, 1, 4, 4, + 2, -1, 4, 10, 6, 2, -1, 0, 2, 2, -7,-12, -4, 2, 0, -3, + -1, -4, -1, -8, 3, -1, 2, -9, 4, 0, 5, -5, 2, 0, 8, 3, + 3, 2, 1, 1, 4, -2, 0, 3, 2, -1, 4, 1, 0, 6, -1,-25, + -1, -2, -2, -4, -3, 0, -1, -4, -1, -1, -4, 2, 0, -6, 2, 25, + -11, -1, 5, 0, 7, 0, -2, 2, 10, -1, -3, 4, -5, -5, -2, -1, + 0, 6, 3, -1, -2, -1, -1, 1, -1, -7,-12, -5, 8, 6, 2, 4, + 2, 6, -1, -6, 9, 10, -1, -4, 1, 0, -4, 0, 3, -2, -9, -5, + -4, 3, 4, 0, -4, 3, 3, 0,-11, 0, 3, 2,-11, 3, 7, 2, + 2, -4, 7, 3, 1, -8, 7, 1, -1,-12, 4, 1, 3, -9, 2, 2, + 2, -2, -2, 9,-17, -3, 3, 1, -4, 7, 1, -6, 5, 4, -1, 3, + -1, 2, 0, -4, -7, 8, 12, -1, -2, 5, 4, -5, 3, -5, -8, -2, + 0, 0, -5, -2, -2, -8, 3, 27, -1, -4, -3, 6, -3, 1, -2, -7, + 4, 4, 1, -1, -7,-10, -7, -3, 10, 10, 5, 3, -2, -2, -4, -3, + 0, 1, 5, 7, 4, -2,-16,-20, 0, 4, 7, 8, 2, 0, -2, -1, + -2, 1, 3, 17, -3, 1, -2, -1, -1, -2, -1, -2, -1, -5, -1, 0, + 5, -3, 1, 0, 6, -2, 0, 0, -1, -2, 0, -3,-11, 1, 8, -1, + 3, 0, 0, 0, 0, 2, 4, 1, 2, 0, 6, 1, -2,-18, -3, 2, + -14, 0, 6, 1, -5, -2, -1, 1, -1, 1, 0, 1, 1, 7, 4, 0, + -1, 0, 1, -4, 1, 8, 3, -4, -3, 4, 1, 3, -6, 1, -4, 1, + 1,-12, 3, 3, -1,-10, 0, -1, 2, 0, 2, 1, 3, 2, 2, 4, + 3, 0, 0, 3, 2, 0, -2, 1, 5, 2, -5, 0, 6, -1,-14, -1, + -2, -6, -3, -3, 2, -1, 4, 5, 6, -1, -2, 0, 4, 4, -1, -5, + -4, 1,-11, 0, -1, 2, -4, 1, 2, -3, 3, -1, 1, -2, 15, 0, + 1, -1, 0, -2, 1, -4, -7, 1, -2, -6, -1, 21, -2, 2, -1, 1, + 21, -1, -2, 0, -1, -3, 1, -2, -9, -2, 2, -1, 2, 1, -4, -1, + 1, 8, 2, -6,-10, -1, 4, 0, -4, -3, 3, 3, 5, 0, -1, -1, + 3, 2, 1, -2, -2, -2, 4, 3, 5, 2, -4,-17, 0, -2, 4, 3, + -7, -4, 0, 3, 9, 9, 2, -1,-11, -6, 0, -1, 5, 1, 0, 1, + 0, 17, 5,-11, 3, -2, -6, 0, 2, -2, -4, 1, -4, 1, 2, -1, + -5, -1, -5, -3, -3, 5, -3, -2, 4, 16, 2, -5, -2, 5, -1, -1, + 0, 0, -4, 1, -1, 2, 5, 11, -1, -1, -2, 1, -4, -2, -3, -1, + -5, -1, 10, 0, 6, 1, 0, -3, 0, -4, 1, 0, -2, -4, 3, -1, + 6, 9, 3, 0, -2, 1, -2, 0, -2, -3, -2, -2, 1, 0, 1, -6, + 1, 0, 2, 1, -1, 3, -2, 1, 0, -1,-15, 0, -1, 5, 2, 6, + 2, 0, 2, 2, 0,-12, -4, 6, 0, 1, 4, -1, 1, 2, 1, -4, + 1, -2, -7, 0, 0, 0, 0, -1, -5, 2, 11, 3, 1, 3, 0, -6, + 0, -3, -9, -4, 1, 3, -1, 0, 4, 1, -2, 0, 7, -3, -1, 6, + 1, -2, 6, 2, 0, -1, 3, -2, -2, 4, 0, 2, -1, 2,-14, 2, + 2, 2, 0, -1, -2, 3, -3,-14, 0, 2, 3, -3, 5, 1, 3, 2, + 1, -3, 4,-14, 1, -2, 11, -1, 0, -1, 3, 0, -1, 1, 0, 2, + -2, 3, -3, 2, -4, -1, -4, 3, -1, 2, 1, 3, -6, -2, 2, 7, + -2, 1, 2, 0, -2, 0, 0, -1, 12, 5, -1, 2, -8, -1, 1, -7, + 2, -2, -4, 2, 11, 0,-11, -2, 3, 1, -3, -1, 0, 3, 1, -1, + 0, 3, 0, -2, 0, -6, -1, -3, 12, -7, -2, 0, 7, -2, 1, 1, + 1, 2, 2, 2, -1, 2, 0, 2,-23, 0, 4, 0, 3, 2, 1, 3, + -4, -5, -1, 5, -3, 5, 10, -1, 0, 0, 3, -4, 1, -1, 2, -5 }; -static const uint32 s_svq1InterCodebook8x4[768] = { - 0x00040809, 0xfdfcfcfd, 0xff040809, 0xfdfbfbfc, - 0xfe030708, 0xfcfbfbfb, 0xfe010406, 0xfdfcfbfc, - 0xfcf5f2f4, 0x06060501, 0xfbf9f6f8, 0x010101fe, - 0x01030405, 0xffff0000, 0x06090d0d, 0xfeff0003, - 0xfffdfcfc, 0x0b080401, 0xfefcfafb, 0x0c080300, - 0xfcfaf9f9, 0x0a0702fe, 0xfcfbf9f9, 0x080501fe, - 0x01fffefd, 0x06070603, 0x07050302, 0x04060808, - 0x03040504, 0xf9fafe01, 0xf9fe0001, 0xf0eff2f6, - 0x0801fcfb, 0xf9fd0309, 0x0b01faf9, 0xf8fd050c, - 0x0900f9f8, 0xf9fd050b, 0x05fffaf8, 0xfafe0408, - 0xf8f9fbfc, 0xfaf8f7f7, 0xf9fafbfc, 0xfefcfaf9, - 0x03020100, 0x090a0805, 0x06030201, 0x0d0e0c09, - 0x05060605, 0x01020304, 0x07070605, 0x04060606, - 0x010100ff, 0x05050503, 0xefeff0f3, 0xfcfaf6f2, - 0x100d0b09, 0x0a0c0d0f, 0xf9fafbfc, 0xfbfaf9f9, - 0xf9f9fafa, 0xfbfaf9f9, 0x0000fffe, 0xff000000, - 0xf0f1f3f5, 0xf6f4f2f0, 0x05040302, 0x03030304, - 0x08080706, 0x05060708, 0x03030403, 0x03030303, - 0x01040403, 0xeff3f9fe, 0x05070705, 0xedf3fb01, - 0x08090806, 0xf0f7ff05, 0x0a0a0806, 0xf5fc0207, - 0xf6ff0912, 0x00fcf7f3, 0xf4ff0c16, 0x02fcf6f1, - 0xf6000d17, 0x02fdf7f3, 0xfa020c14, 0x02fefaf7, - 0xf9fafafa, 0xfaf9f9f9, 0xf8f8f9fa, 0xf8f7f7f7, - 0xfdfdfdfd, 0xfdfdfdfd, 0x15120f0c, 0x0e111315, - 0x1212100e, 0x0d0f1012, 0x05060605, 0x03040405, - 0xf6f7f9fa, 0xf9f7f6f6, 0xf2f3f5f6, 0xf6f4f3f2, - 0x05fcefe5, 0x070a0a09, 0x07fdede0, 0x080b0c0b, - 0x08fef0e2, 0x070a0c0c, 0x0700f4e9, 0x06090b0a, - 0x0c101110, 0xf4f8ff06, 0x0a0f1211, 0xeef1f801, - 0x040a0e0f, 0xe9ecf2fb, 0xff04080a, 0xeaebf0f7, - 0xf5f4f4f6, 0x140e04fb, 0xf4f1f3f5, 0x1b1307fc, - 0xf5f2f3f5, 0x1c1508fd, 0xf7f4f5f6, 0x191208fe, - 0x01ffffff, 0x05060604, 0x02000000, 0xfe010304, - 0x04020000, 0xf6f9ff04, 0x05030000, 0xf1f5fd03, - 0xfff8f3f2, 0xfcff0303, 0x04fffcfb, 0x00030808, - 0x03020203, 0x01030504, 0xfe000305, 0xfffffffe, - 0xfafa0109, 0xfffefdfb, 0xfafa010c, 0x00fffefc, - 0xfcfc040e, 0xfffffefe, 0xffff060e, 0xffffffff, - 0x0a080604, 0x0507090b, 0x00ffffff, 0xfeffff00, - 0xfbfcfcfe, 0xfcfbfbfb, 0xfcfdfdfe, 0xfffefdfc, - 0x04040302, 0x00000103, 0x050401ff, 0x03040506, - 0x02fefaf8, 0x03040403, 0xfbf7f3f2, 0x0000fffe, - 0xfcfbfcfd, 0x0d0c0700, 0xfbfbfcfd, 0x0a0904fe, - 0xfbfcfdfe, 0x0403fffc, 0xfdfeffff, 0x0100fefd, - 0xf8fe0509, 0xfcf9f6f5, 0x02060a0c, 0x0000ff00, - 0x04030202, 0x01010103, 0x00fcf8f7, 0x00010201, - 0x05080806, 0xf3f5fb01, 0x02020100, 0xf5f8fcff, - 0x0301fefd, 0xfcff0103, 0x0502fffe, 0x01040606, - 0x05050403, 0xfafd0104, 0x02040605, 0xfd000202, - 0xfb000506, 0xfefffefb, 0xf5fd0407, 0xfefdf9f4, - 0xffff0001, 0x000000ff, 0x04040302, 0x03040505, - 0xf6f7f7f9, 0xfaf9f7f6, 0x06050403, 0x05050505, - 0xf9f9f9f9, 0xfcfbfafa, 0xfffdfcfb, 0x0000ffff, - 0x0401fefd, 0x05050505, 0x0603fffe, 0x090a0a09, - 0x030a01f2, 0x010100fe, 0x030d02f0, 0x0001fffd, - 0x030c02f1, 0x0101fefc, 0x020a03f6, 0x0101fffd, - 0x02040100, 0x0bfdf6fb, 0x020401ff, 0x0ffef3fa, - 0x010300ff, 0x0ffff4fa, 0x010201ff, 0x0b00f8fc, - 0xfefe050a, 0xfc010502, 0xfaf80007, 0xfc020501, - 0xf9f4fb02, 0xff040702, 0xfcf6f9ff, 0x02070904, - 0xfafcfbfb, 0xfdfbfbfa, 0xfcfefeff, 0xfcfbfafb, - 0x04070706, 0xfdfdfe00, 0x0a0d0e0d, 0xfeff0105, - 0x02020101, 0x02020202, 0xf7f8fafb, 0xfaf9f8f7, - 0x0b0a0907, 0x0507090b, 0xfdfdfeff, 0xfdfcfcfc, - 0x0000ffff, 0xffff0000, 0xfbfcfdfd, 0xfefdfdfc, - 0xfdff0102, 0x00fffefd, 0x03080c0c, 0x01000001, - 0xfaf8f8fa, 0x080602fe, 0xfeff0101, 0x07050300, - 0xff010303, 0x020000ff, 0xff000100, 0xfffeffff, - 0x00000001, 0x04020000, 0x04030102, 0x02000103, - 0x00000102, 0x0300ffff, 0xf4fa0105, 0x04fff8f3, - 0xfeff00fe, 0x030200ff, 0x00fefdfa, 0x01010101, - 0x0400fbf7, 0x00010305, 0x0703fdf8, 0x00010408, - 0x03020201, 0xfdff0103, 0x06050504, 0x00020506, - 0x00000000, 0xfcfe0001, 0xfdfcfdfd, 0xf8f9fcfd, - 0xff060c0e, 0x0000fdfd, 0xfd010507, 0xfffefcfb, - 0xfefefefe, 0xfffffefe, 0x01fffcfa, 0xff000101, - 0xfd010202, 0xfdfaf9fa, 0xfdff0001, 0x060401fe, - 0x02010000, 0x07080704, 0x00000000, 0xf8f9fcff, - 0xfe010200, 0xfffefdfd, 0xfd0001ff, 0x0200fefb, - 0xfbfefffe, 0x090601fc, 0xfcfdfefd, 0x0d0b05fe, - 0x0602fefc, 0xf2f6fd04, 0x0401fffe, 0xfeff0104, - 0xfeff0000, 0x060400fe, 0xfd000202, 0x090500fd, - 0x01fefcfc, 0xf9030906, 0xfffefefe, 0xf5000804, - 0x00000101, 0xf6ff0602, 0x00010202, 0xf9000402, - 0xfafdfeff, 0xf8f8f8f9, 0x01030302, 0xfcfdfeff, - 0x04050505, 0xff000203, 0x03030303, 0x01010202, - 0xfe020303, 0x0a0700fd, 0xfe020201, 0x0300fcfb, - 0x02040300, 0xfcfafbfd, 0x04040200, 0xf9f9fc01, - 0x05050402, 0x06060505, 0xfbfdfcfc, 0xfefdfdfb, - 0xfbfcfcfd, 0xfefefefc, 0x00000101, 0x04050402, - 0x040300fe, 0x02020304, 0x00fcf9f7, 0x06060603, - 0xfefdfbfb, 0x04030100, 0xfe020505, 0xfdfbfafc, - 0x07fcfa01, 0x01fefe05, 0x06fcfb05, 0x01fcfb04, - 0x06fcfb05, 0x01fdfb04, 0x08fdf901, 0x01fdff07, - 0x00fcf9f8, 0x05050402, 0x02050605, 0xf9f9fbff, - 0x01040605, 0xfbfafbfd, 0xfefbf9f9, 0x0a090601, - 0x01000306, 0xf2f80003, 0x01ff0003, 0xfc000304, - 0x01000001, 0x01010102, 0x0201ffff, 0x00ffff01, - 0x01010101, 0x00fdfe00, 0x00010201, 0xfcf7f8fe, - 0x02030301, 0x01fdfd01, 0x01010100, 0x08040101, - 0x07090502, 0x01ffff02, 0x0001fffc, 0x02fffcfd, - 0x030300fd, 0x0200ff00, 0x0101fffc, 0xfcfbfcfe, - 0xfefeff01, 0x050402ff, 0x00010102, 0x0000ffff, - 0x05040302, 0x00010204, 0xfdfaf7f7, 0xffffffff, - 0x0704fafa, 0xfefffe00, 0x0605feff, 0xff00feff, - 0x0001ff04, 0xfe00fefc, 0xfeff0107, 0x010301fd, - 0x03010204, 0x02010103, 0x00fcfe02, 0x00000103, - 0xfcf8fc01, 0x00010201, 0xfaf7fd02, 0x02030300, - 0xff00ffff, 0x020100ff, 0xf8fc0103, 0x0201fdf9, - 0xfefdff02, 0x000100ff, 0x0b0500ff, 0xfdff0309, - 0xfffefeff, 0x01010101, 0x0300ff00, 0x05050606, - 0xffff0102, 0xfcfafbfe, 0x01020202, 0xfbfbfcff, - 0xf9fafdff, 0x01fffcfa, 0x04030505, 0x05040304, - 0xfefdfeff, 0x0100fefe, 0x00000000, 0x03020100, - 0xfffcfafa, 0x02020202, 0xfefbf9fa, 0x00ffff00, - 0x04020202, 0x04030304, 0xff000102, 0x04020000, - 0xf8fb050c, 0x020200fb, 0xfdfafd02, 0xfeff0000, - 0x03fffdfe, 0xfdfe0104, 0x04030202, 0xffff0103, - 0x00010203, 0x00030401, 0xfb000304, 0x030300fa, - 0xf9010302, 0x0301faf4, 0xff040301, 0x0100fcfa, - 0x0602fcf7, 0x00010407, 0x0604fff9, 0xfdfd0004, - 0x040400fa, 0xfefdfe01, 0x020301fc, 0x00fffe00, - 0xfb020500, 0xfc0103fd, 0xfa0204fe, 0xfd0406fd, - 0xfb0305ff, 0xfc0307ff, 0xfa0002ff, 0xfd0305fd, - 0x0503fdf8, 0xfefe0103, 0xfe040402, 0x0301fdfc, - 0xfbfd0102, 0x030403fd, 0x03fbfafb, 0xfbff080a, - 0xfc020300, 0x0600f9f7, 0x0705fffb, 0xfdfdff04, - 0x03fefbfb, 0xfcff0506, 0xfc000609, 0xff0101fe, - 0x01ffffff, 0x00ff0001, 0x000000ff, 0x00ffff00, - 0xfffe0102, 0x00000101, 0xff02080c, 0xf9f9fcff, - 0x06030102, 0x00020407, 0x00ff0001, 0xf8f9fcff, - 0x00ff0000, 0xfdff0000, 0x00000000, 0xfe000101, - 0x010100ff, 0xfeff0000, 0xfdff0000, 0x01fffdfc, - 0x000000ff, 0x0c0a0401, 0xfefe00ff, 0x01fffdfd, - 0xfcfefffd, 0x07090902, 0xfdff00fd, 0x01ff0200, - 0xfdfe01ff, 0x00fdff00, 0xfefd0000, 0x01ffff00, - 0xfffffeff, 0xfefffffe, 0xfffeff02, 0xfe000100, - 0x02feff03, 0xfdff0305, 0x01fbfb01, 0x00020606, - 0xff000201, 0xfe000100, 0x00fffdfb, 0xfe010201, - 0xfefefbf9, 0x0100fefe, 0x010100ff, 0x0c090300, - 0x01050600, 0x0300fdfe, 0x01050600, 0x03020101, - 0xfdfefefb, 0x00000000, 0xfefdfdfa, 0xfeff0000, - 0x01020404, 0x00ffff00, 0x0100fefe, 0x00010102, - 0xff010202, 0xf6f7fbfd, 0xffff0102, 0x01040401, - 0xfefe0004, 0x00fffefe, 0xfdfc0107, 0x010100fe, - 0xfeff050a, 0x00010100, 0xfcfd0105, 0xfefffffd, - 0xfdff0102, 0xff0101fd, 0x0003fffe, 0x000101ff, - 0x020701fd, 0x00fffefd, 0xff0804fe, 0x0200fbf8, - 0x0201fffc, 0xfefcfd01, 0x01fefdfb, 0x06040404, - 0xfdfcfefd, 0x02010100, 0x01020202, 0xffff0102, - 0xff00fffc, 0xfffffdfd, 0x02040401, 0xfdfeff00, - 0x03050604, 0xfcfe0102, 0x01010100, 0xfafcff01, - 0xff020201, 0x02fffbfa, 0x0101fefd, 0x0502fdfc, - 0x0202fffe, 0x0300fcfd, 0x0602fefe, 0x02010205, - 0x00fdfd02, 0x01030200, 0x0301ff03, 0xfbff0201, - 0xfefcf9fb, 0x01080801, 0x000200ff, 0xfd0100fd, - 0xfefbfbfe, 0xfe00fffd, 0x0400fcff, 0x00040200, - 0x0a080000, 0xff030102, 0x0302fdfc, 0xff01fdfd, - 0x02fcfe01, 0xfffe0307, 0xfffe0406, 0x03ff0002, - 0xfefe0101, 0x04fdfbfe, 0x0101fefa, 0x04fefcff, - 0xfefefffe, 0xfe000100, 0xff0001ff, 0xfdff0000, - 0xfcfe0100, 0x0000fffd, 0x00050806, 0x03020100, - 0x0502fefe, 0x01000002, 0xfffefe02, 0x040201ff, - 0x0100ff02, 0x01000000, 0x01fff9f8, 0x0301ffff, - 0x02060300, 0x000201fe, 0x00fff9f6, 0x0102fffd, - 0x02020000, 0xff010101, 0xfefe0003, 0x00010200, - 0x00000108, 0x00fffdfe, 0x0502fe02, 0x01fffe01, - 0xfffdfafd, 0x02fffdfd, 0x02010002, 0x00000102, - 0xfeffff01, 0x000100ff, 0xff02090f, 0xfdfdfdfe, - 0x00fefd00, 0xffffff00, 0x00010001, 0xffffff00, - 0xfe020200, 0xf8f9fdfd, 0x00020200, 0x01010201, - 0x02020201, 0x03000103, 0xfeff0001, 0x0500feff, - 0x01fffaf5, 0xfd010302, 0xff030401, 0xff0201fe, - 0xff010202, 0xff0100fe, 0xffff0000, 0x02030200, - 0x01020101, 0xfc0001ff, 0xfe000000, 0xfe0402fe, - 0x0000fdfe, 0xfa0102ff, 0x05050200, 0xf9ff0203, - 0x00000204, 0xff010303, 0x03ffff00, 0xff010406, - 0x0200fefe, 0xfefe0002, 0xfbff00ff, 0x01fffbf9, - 0x00feff05, 0xfb020402, 0x02fefb00, 0xfa000201, - 0x01000106, 0x0204fffe, 0x00fdfd02, 0x0000feff, - 0x0200ff01, 0x0b060000, 0x00ffff02, 0x0503fefd, - 0x00fffe00, 0xfd0000ff, 0xffffff01, 0xf9fdfffe, - 0xfefe0101, 0xfe010301, 0xff0002ff, 0x000001ff, - 0xff0302fc, 0x0100fefe, 0x0504fef5, 0xfeff0206, - 0xff01fefa, 0x0901fcfd, 0x030300fd, 0x03fdfd02, - 0x00000101, 0x03feff01, 0xfdfd0002, 0x03ffff00, - 0x01fdff01, 0x06fcfa02, 0xfefbfe00, 0x03fefd00, - 0xfe010202, 0xff0201fe, 0xfe0101ff, 0xff0706ff, - 0xfefc0001, 0x01fdfe01, 0xfefd00fc, 0x00fd0002, - 0x010304fd, 0xff000708, 0xfc0104fd, 0xfdfe0302, - 0xfc0106fd, 0xffff0101, 0xfdfd04fe, 0xffff0003, - 0x02fc0201, 0x02fffd04, 0x05fcff03, 0x02fdfa04 +static const int8 s_svq1InterCodebook8x4[3072] = { + 9, 8, 4, 0, -3, -4, -4, -3, 9, 8, 4, -1, -4, -5, -5, -3, + 8, 7, 3, -2, -5, -5, -5, -4, 6, 4, 1, -2, -4, -5, -4, -3, + -12,-14,-11, -4, 1, 5, 6, 6, -8,-10, -7, -5, -2, 1, 1, 1, + 5, 4, 3, 1, 0, 0, -1, -1, 13, 13, 9, 6, 3, 0, -1, -2, + -4, -4, -3, -1, 1, 4, 8, 11, -5, -6, -4, -2, 0, 3, 8, 12, + -7, -7, -6, -4, -2, 2, 7, 10, -7, -7, -5, -4, -2, 1, 5, 8, + -3, -2, -1, 1, 3, 6, 7, 6, 2, 3, 5, 7, 8, 8, 6, 4, + 4, 5, 4, 3, 1, -2, -6, -7, 1, 0, -2, -7,-10,-14,-17,-16, + -5, -4, 1, 8, 9, 3, -3, -7, -7, -6, 1, 11, 12, 5, -3, -8, + -8, -7, 0, 9, 11, 5, -3, -7, -8, -6, -1, 5, 8, 4, -2, -6, + -4, -5, -7, -8, -9, -9, -8, -6, -4, -5, -6, -7, -7, -6, -4, -2, + 0, 1, 2, 3, 5, 8, 10, 9, 1, 2, 3, 6, 9, 12, 14, 13, + 5, 6, 6, 5, 4, 3, 2, 1, 5, 6, 7, 7, 6, 6, 6, 4, + -1, 0, 1, 1, 3, 5, 5, 5,-13,-16,-17,-17,-14,-10, -6, -4, + 9, 11, 13, 16, 15, 13, 12, 10, -4, -5, -6, -7, -7, -7, -6, -5, + -6, -6, -7, -7, -7, -7, -6, -5, -2, -1, 0, 0, 0, 0, 0, -1, + -11,-13,-15,-16,-16,-14,-12,-10, 2, 3, 4, 5, 4, 3, 3, 3, + 6, 7, 8, 8, 8, 7, 6, 5, 3, 4, 3, 3, 3, 3, 3, 3, + 3, 4, 4, 1, -2, -7,-13,-17, 5, 7, 7, 5, 1, -5,-13,-19, + 6, 8, 9, 8, 5, -1, -9,-16, 6, 8, 10, 10, 7, 2, -4,-11, + 18, 9, -1,-10,-13, -9, -4, 0, 22, 12, -1,-12,-15,-10, -4, 2, + 23, 13, 0,-10,-13, -9, -3, 2, 20, 12, 2, -6, -9, -6, -2, 2, + -6, -6, -6, -7, -7, -7, -7, -6, -6, -7, -8, -8, -9, -9, -9, -8, + -3, -3, -3, -3, -3, -3, -3, -3, 12, 15, 18, 21, 21, 19, 17, 14, + 14, 16, 18, 18, 18, 16, 15, 13, 5, 6, 6, 5, 5, 4, 4, 3, + -6, -7, -9,-10,-10,-10, -9, -7,-10,-11,-13,-14,-14,-13,-12,-10, + -27,-17, -4, 5, 9, 10, 10, 7,-32,-19, -3, 7, 11, 12, 11, 8, + -30,-16, -2, 8, 12, 12, 10, 7,-23,-12, 0, 7, 10, 11, 9, 6, + 16, 17, 16, 12, 6, -1, -8,-12, 17, 18, 15, 10, 1, -8,-15,-18, + 15, 14, 10, 4, -5,-14,-20,-23, 10, 8, 4, -1, -9,-16,-21,-22, + -10,-12,-12,-11, -5, 4, 14, 20,-11,-13,-15,-12, -4, 7, 19, 27, + -11,-13,-14,-11, -3, 8, 21, 28,-10,-11,-12, -9, -2, 8, 18, 25, + -1, -1, -1, 1, 4, 6, 6, 5, 0, 0, 0, 2, 4, 3, 1, -2, + 0, 0, 2, 4, 4, -1, -7,-10, 0, 0, 3, 5, 3, -3,-11,-15, + -14,-13, -8, -1, 3, 3, -1, -4, -5, -4, -1, 4, 8, 8, 3, 0, + 3, 2, 2, 3, 4, 5, 3, 1, 5, 3, 0, -2, -2, -1, -1, -1, + 9, 1, -6, -6, -5, -3, -2, -1, 12, 1, -6, -6, -4, -2, -1, 0, + 14, 4, -4, -4, -2, -2, -1, -1, 14, 6, -1, -1, -1, -1, -1, -1, + 4, 6, 8, 10, 11, 9, 7, 5, -1, -1, -1, 0, 0, -1, -1, -2, + -2, -4, -4, -5, -5, -5, -5, -4, -2, -3, -3, -4, -4, -3, -2, -1, + 2, 3, 4, 4, 3, 1, 0, 0, -1, 1, 4, 5, 6, 5, 4, 3, + -8, -6, -2, 2, 3, 4, 4, 3,-14,-13, -9, -5, -2, -1, 0, 0, + -3, -4, -5, -4, 0, 7, 12, 13, -3, -4, -5, -5, -2, 4, 9, 10, + -2, -3, -4, -5, -4, -1, 3, 4, -1, -1, -2, -3, -3, -2, 0, 1, + 9, 5, -2, -8,-11,-10, -7, -4, 12, 10, 6, 2, 0, -1, 0, 0, + 2, 2, 3, 4, 3, 1, 1, 1, -9, -8, -4, 0, 1, 2, 1, 0, + 6, 8, 8, 5, 1, -5,-11,-13, 0, 1, 2, 2, -1, -4, -8,-11, + -3, -2, 1, 3, 3, 1, -1, -4, -2, -1, 2, 5, 6, 6, 4, 1, + 3, 4, 5, 5, 4, 1, -3, -6, 5, 6, 4, 2, 2, 2, 0, -3, + 6, 5, 0, -5, -5, -2, -1, -2, 7, 4, -3,-11,-12, -7, -3, -2, + 1, 0, -1, -1, -1, 0, 0, 0, 2, 3, 4, 4, 5, 5, 4, 3, + -7, -9, -9,-10,-10, -9, -7, -6, 3, 4, 5, 6, 5, 5, 5, 5, + -7, -7, -7, -7, -6, -6, -5, -4, -5, -4, -3, -1, -1, -1, 0, 0, + -3, -2, 1, 4, 5, 5, 5, 5, -2, -1, 3, 6, 9, 10, 10, 9, + -14, 1, 10, 3, -2, 0, 1, 1,-16, 2, 13, 3, -3, -1, 1, 0, + -15, 2, 12, 3, -4, -2, 1, 1,-10, 3, 10, 2, -3, -1, 1, 1, + 0, 1, 4, 2, -5,-10, -3, 11, -1, 1, 4, 2, -6,-13, -2, 15, + -1, 0, 3, 1, -6,-12, -1, 15, -1, 1, 2, 1, -4, -8, 0, 11, + 10, 5, -2, -2, 2, 5, 1, -4, 7, 0, -8, -6, 1, 5, 2, -4, + 2, -5,-12, -7, 2, 7, 4, -1, -1, -7,-10, -4, 4, 9, 7, 2, + -5, -5, -4, -6, -6, -5, -5, -3, -1, -2, -2, -4, -5, -6, -5, -4, + 6, 7, 7, 4, 0, -2, -3, -3, 13, 14, 13, 10, 5, 1, -1, -2, + 1, 1, 2, 2, 2, 2, 2, 2, -5, -6, -8, -9, -9, -8, -7, -6, + 7, 9, 10, 11, 11, 9, 7, 5, -1, -2, -3, -3, -4, -4, -4, -3, + -1, -1, 0, 0, 0, 0, -1, -1, -3, -3, -4, -5, -4, -3, -3, -2, + 2, 1, -1, -3, -3, -2, -1, 0, 12, 12, 8, 3, 1, 0, 0, 1, + -6, -8, -8, -6, -2, 2, 6, 8, 1, 1, -1, -2, 0, 3, 5, 7, + 3, 3, 1, -1, -1, 0, 0, 2, 0, 1, 0, -1, -1, -1, -2, -1, + 1, 0, 0, 0, 0, 0, 2, 4, 2, 1, 3, 4, 3, 1, 0, 2, + 2, 1, 0, 0, -1, -1, 0, 3, 5, 1, -6,-12,-13, -8, -1, 4, + -2, 0, -1, -2, -1, 0, 2, 3, -6, -3, -2, 0, 1, 1, 1, 1, + -9, -5, 0, 4, 5, 3, 1, 0, -8, -3, 3, 7, 8, 4, 1, 0, + 1, 2, 2, 3, 3, 1, -1, -3, 4, 5, 5, 6, 6, 5, 2, 0, + 0, 0, 0, 0, 1, 0, -2, -4, -3, -3, -4, -3, -3, -4, -7, -8, + 14, 12, 6, -1, -3, -3, 0, 0, 7, 5, 1, -3, -5, -4, -2, -1, + -2, -2, -2, -2, -2, -2, -1, -1, -6, -4, -1, 1, 1, 1, 0, -1, + 2, 2, 1, -3, -6, -7, -6, -3, 1, 0, -1, -3, -2, 1, 4, 6, + 0, 0, 1, 2, 4, 7, 8, 7, 0, 0, 0, 0, -1, -4, -7, -8, + 0, 2, 1, -2, -3, -3, -2, -1, -1, 1, 0, -3, -5, -2, 0, 2, + -2, -1, -2, -5, -4, 1, 6, 9, -3, -2, -3, -4, -2, 5, 11, 13, + -4, -2, 2, 6, 4, -3,-10,-14, -2, -1, 1, 4, 4, 1, -1, -2, + 0, 0, -1, -2, -2, 0, 4, 6, 2, 2, 0, -3, -3, 0, 5, 9, + -4, -4, -2, 1, 6, 9, 3, -7, -2, -2, -2, -1, 4, 8, 0,-11, + 1, 1, 0, 0, 2, 6, -1,-10, 2, 2, 1, 0, 2, 4, 0, -7, + -1, -2, -3, -6, -7, -8, -8, -8, 2, 3, 3, 1, -1, -2, -3, -4, + 5, 5, 5, 4, 3, 2, 0, -1, 3, 3, 3, 3, 2, 2, 1, 1, + 3, 3, 2, -2, -3, 0, 7, 10, 1, 2, 2, -2, -5, -4, 0, 3, + 0, 3, 4, 2, -3, -5, -6, -4, 0, 2, 4, 4, 1, -4, -7, -7, + 2, 4, 5, 5, 5, 5, 6, 6, -4, -4, -3, -5, -5, -3, -3, -2, + -3, -4, -4, -5, -4, -2, -2, -2, 1, 1, 0, 0, 2, 4, 5, 4, + -2, 0, 3, 4, 4, 3, 2, 2, -9, -7, -4, 0, 3, 6, 6, 6, + -5, -5, -3, -2, 0, 1, 3, 4, 5, 5, 2, -2, -4, -6, -5, -3, + 1, -6, -4, 7, 5, -2, -2, 1, 5, -5, -4, 6, 4, -5, -4, 1, + 5, -5, -4, 6, 4, -5, -3, 1, 1, -7, -3, 8, 7, -1, -3, 1, + -8, -7, -4, 0, 2, 4, 5, 5, 5, 6, 5, 2, -1, -5, -7, -7, + 5, 6, 4, 1, -3, -5, -6, -5, -7, -7, -5, -2, 1, 6, 9, 10, + 6, 3, 0, 1, 3, 0, -8,-14, 3, 0, -1, 1, 4, 3, 0, -4, + 1, 0, 0, 1, 2, 1, 1, 1, -1, -1, 1, 2, 1, -1, -1, 0, + 1, 1, 1, 1, 0, -2, -3, 0, 1, 2, 1, 0, -2, -8, -9, -4, + 1, 3, 3, 2, 1, -3, -3, 1, 0, 1, 1, 1, 1, 1, 4, 8, + 2, 5, 9, 7, 2, -1, -1, 1, -4, -1, 1, 0, -3, -4, -1, 2, + -3, 0, 3, 3, 0, -1, 0, 2, -4, -1, 1, 1, -2, -4, -5, -4, + 1, -1, -2, -2, -1, 2, 4, 5, 2, 1, 1, 0, -1, -1, 0, 0, + 2, 3, 4, 5, 4, 2, 1, 0, -9, -9, -6, -3, -1, -1, -1, -1, + -6, -6, 4, 7, 0, -2, -1, -2, -1, -2, 5, 6, -1, -2, 0, -1, + 4, -1, 1, 0, -4, -2, 0, -2, 7, 1, -1, -2, -3, 1, 3, 1, + 4, 2, 1, 3, 3, 1, 1, 2, 2, -2, -4, 0, 3, 1, 0, 0, + 1, -4, -8, -4, 1, 2, 1, 0, 2, -3, -9, -6, 0, 3, 3, 2, + -1, -1, 0, -1, -1, 0, 1, 2, 3, 1, -4, -8, -7, -3, 1, 2, + 2, -1, -3, -2, -1, 0, 1, 0, -1, 0, 5, 11, 9, 3, -1, -3, + -1, -2, -2, -1, 1, 1, 1, 1, 0, -1, 0, 3, 6, 6, 5, 5, + 2, 1, -1, -1, -2, -5, -6, -4, 2, 2, 2, 1, -1, -4, -5, -5, + -1, -3, -6, -7, -6, -4, -1, 1, 5, 5, 3, 4, 4, 3, 4, 5, + -1, -2, -3, -2, -2, -2, 0, 1, 0, 0, 0, 0, 0, 1, 2, 3, + -6, -6, -4, -1, 2, 2, 2, 2, -6, -7, -5, -2, 0, -1, -1, 0, + 2, 2, 2, 4, 4, 3, 3, 4, 2, 1, 0, -1, 0, 0, 2, 4, + 12, 5, -5, -8, -5, 0, 2, 2, 2, -3, -6, -3, 0, 0, -1, -2, + -2, -3, -1, 3, 4, 1, -2, -3, 2, 2, 3, 4, 3, 1, -1, -1, + 3, 2, 1, 0, 1, 4, 3, 0, 4, 3, 0, -5, -6, 0, 3, 3, + 2, 3, 1, -7,-12, -6, 1, 3, 1, 3, 4, -1, -6, -4, 0, 1, + -9, -4, 2, 6, 7, 4, 1, 0, -7, -1, 4, 6, 4, 0, -3, -3, + -6, 0, 4, 4, 1, -2, -3, -2, -4, 1, 3, 2, 0, -2, -1, 0, + 0, 5, 2, -5, -3, 3, 1, -4, -2, 4, 2, -6, -3, 6, 4, -3, + -1, 5, 3, -5, -1, 7, 3, -4, -1, 2, 0, -6, -3, 5, 3, -3, + -8, -3, 3, 5, 3, 1, -2, -2, 2, 4, 4, -2, -4, -3, 1, 3, + 2, 1, -3, -5, -3, 3, 4, 3, -5, -6, -5, 3, 10, 8, -1, -5, + 0, 3, 2, -4, -9, -7, 0, 6, -5, -1, 5, 7, 4, -1, -3, -3, + -5, -5, -2, 3, 6, 5, -1, -4, 9, 6, 0, -4, -2, 1, 1, -1, + -1, -1, -1, 1, 1, 0, -1, 0, -1, 0, 0, 0, 0, -1, -1, 0, + 2, 1, -2, -1, 1, 1, 0, 0, 12, 8, 2, -1, -1, -4, -7, -7, + 2, 1, 3, 6, 7, 4, 2, 0, 1, 0, -1, 0, -1, -4, -7, -8, + 0, 0, -1, 0, 0, 0, -1, -3, 0, 0, 0, 0, 1, 1, 0, -2, + -1, 0, 1, 1, 0, 0, -1, -2, 0, 0, -1, -3, -4, -3, -1, 1, + -1, 0, 0, 0, 1, 4, 10, 12, -1, 0, -2, -2, -3, -3, -1, 1, + -3, -1, -2, -4, 2, 9, 9, 7, -3, 0, -1, -3, 0, 2, -1, 1, + -1, 1, -2, -3, 0, -1, -3, 0, 0, 0, -3, -2, 0, -1, -1, 1, + -1, -2, -1, -1, -2, -1, -1, -2, 2, -1, -2, -1, 0, 1, 0, -2, + 3, -1, -2, 2, 5, 3, -1, -3, 1, -5, -5, 1, 6, 6, 2, 0, + 1, 2, 0, -1, 0, 1, 0, -2, -5, -3, -1, 0, 1, 2, 1, -2, + -7, -5, -2, -2, -2, -2, 0, 1, -1, 0, 1, 1, 0, 3, 9, 12, + 0, 6, 5, 1, -2, -3, 0, 3, 0, 6, 5, 1, 1, 1, 2, 3, + -5, -2, -2, -3, 0, 0, 0, 0, -6, -3, -3, -2, 0, 0, -1, -2, + 4, 4, 2, 1, 0, -1, -1, 0, -2, -2, 0, 1, 2, 1, 1, 0, + 2, 2, 1, -1, -3, -5, -9,-10, 2, 1, -1, -1, 1, 4, 4, 1, + 4, 0, -2, -2, -2, -2, -1, 0, 7, 1, -4, -3, -2, 0, 1, 1, + 10, 5, -1, -2, 0, 1, 1, 0, 5, 1, -3, -4, -3, -1, -1, -2, + 2, 1, -1, -3, -3, 1, 1, -1, -2, -1, 3, 0, -1, 1, 1, 0, + -3, 1, 7, 2, -3, -2, -1, 0, -2, 4, 8, -1, -8, -5, 0, 2, + -4, -1, 1, 2, 1, -3, -4, -2, -5, -3, -2, 1, 4, 4, 4, 6, + -3, -2, -4, -3, 0, 1, 1, 2, 2, 2, 2, 1, 2, 1, -1, -1, + -4, -1, 0, -1, -3, -3, -1, -1, 1, 4, 4, 2, 0, -1, -2, -3, + 4, 6, 5, 3, 2, 1, -2, -4, 0, 1, 1, 1, 1, -1, -4, -6, + 1, 2, 2, -1, -6, -5, -1, 2, -3, -2, 1, 1, -4, -3, 2, 5, + -2, -1, 2, 2, -3, -4, 0, 3, -2, -2, 2, 6, 5, 2, 1, 2, + 2, -3, -3, 0, 0, 2, 3, 1, 3, -1, 1, 3, 1, 2, -1, -5, + -5, -7, -4, -2, 1, 8, 8, 1, -1, 0, 2, 0, -3, 0, 1, -3, + -2, -5, -5, -2, -3, -1, 0, -2, -1, -4, 0, 4, 0, 2, 4, 0, + 0, 0, 8, 10, 2, 1, 3, -1, -4, -3, 2, 3, -3, -3, 1, -1, + 1, -2, -4, 2, 7, 3, -2, -1, 6, 4, -2, -1, 2, 0, -1, 3, + 1, 1, -2, -2, -2, -5, -3, 4, -6, -2, 1, 1, -1, -4, -2, 4, + -2, -1, -2, -2, 0, 1, 0, -2, -1, 1, 0, -1, 0, 0, -1, -3, + 0, 1, -2, -4, -3, -1, 0, 0, 6, 8, 5, 0, 0, 1, 2, 3, + -2, -2, 2, 5, 2, 0, 0, 1, 2, -2, -2, -1, -1, 1, 2, 4, + 2, -1, 0, 1, 0, 0, 0, 1, -8, -7, -1, 1, -1, -1, 1, 3, + 0, 3, 6, 2, -2, 1, 2, 0,-10, -7, -1, 0, -3, -1, 2, 1, + 0, 0, 2, 2, 1, 1, 1, -1, 3, 0, -2, -2, 0, 2, 1, 0, + 8, 1, 0, 0, -2, -3, -1, 0, 2, -2, 2, 5, 1, -2, -1, 1, + -3, -6, -3, -1, -3, -3, -1, 2, 2, 0, 1, 2, 2, 1, 0, 0, + 1, -1, -1, -2, -1, 0, 1, 0, 15, 9, 2, -1, -2, -3, -3, -3, + 0, -3, -2, 0, 0, -1, -1, -1, 1, 0, 1, 0, 0, -1, -1, -1, + 0, 2, 2, -2, -3, -3, -7, -8, 0, 2, 2, 0, 1, 2, 1, 1, + 1, 2, 2, 2, 3, 1, 0, 3, 1, 0, -1, -2, -1, -2, 0, 5, + -11, -6, -1, 1, 2, 3, 1, -3, 1, 4, 3, -1, -2, 1, 2, -1, + 2, 2, 1, -1, -2, 0, 1, -1, 0, 0, -1, -1, 0, 2, 3, 2, + 1, 1, 2, 1, -1, 1, 0, -4, 0, 0, 0, -2, -2, 2, 4, -2, + -2, -3, 0, 0, -1, 2, 1, -6, 0, 2, 5, 5, 3, 2, -1, -7, + 4, 2, 0, 0, 3, 3, 1, -1, 0, -1, -1, 3, 6, 4, 1, -1, + -2, -2, 0, 2, 2, 0, -2, -2, -1, 0, -1, -5, -7, -5, -1, 1, + 5, -1, -2, 0, 2, 4, 2, -5, 0, -5, -2, 2, 1, 2, 0, -6, + 6, 1, 0, 1, -2, -1, 4, 2, 2, -3, -3, 0, -1, -2, 0, 0, + 1, -1, 0, 2, 0, 0, 6, 11, 2, -1, -1, 0, -3, -2, 3, 5, + 0, -2, -1, 0, -1, 0, 0, -3, 1, -1, -1, -1, -2, -1, -3, -7, + 1, 1, -2, -2, 1, 3, 1, -2, -1, 2, 0, -1, -1, 1, 0, 0, + -4, 2, 3, -1, -2, -2, 0, 1,-11, -2, 4, 5, 6, 2, -1, -2, + -6, -2, 1, -1, -3, -4, 1, 9, -3, 0, 3, 3, 2, -3, -3, 3, + 1, 1, 0, 0, 1, -1, -2, 3, 2, 0, -3, -3, 0, -1, -1, 3, + 1, -1, -3, 1, 2, -6, -4, 6, 0, -2, -5, -2, 0, -3, -2, 3, + 2, 2, 1, -2, -2, 1, 2, -1, -1, 1, 1, -2, -1, 6, 7, -1, + 1, 0, -4, -2, 1, -2, -3, 1, -4, 0, -3, -2, 2, 0, -3, 0, + -3, 4, 3, 1, 8, 7, 0, -1, -3, 4, 1, -4, 2, 3, -2, -3, + -3, 6, 1, -4, 1, 1, -1, -1, -2, 4, -3, -3, 3, 0, -1, -1, + 1, 2, -4, 2, 4, -3, -1, 2, 3, -1, -4, 5, 4, -6, -3, 2 }; -static const uint32 s_svq1InterCodebook8x8[1536] = { - 0x0504fdfc, 0x00010102, 0x0505fdfb, 0x00000102, - 0x0505fcfa, 0x00000102, 0x0504fcf9, 0x00000102, - 0x0403fbf8, 0x00000102, 0x0403faf8, 0x00010101, - 0x0402faf8, 0x00010102, 0x0402faf8, 0x01010101, - 0xffffffff, 0xffffffff, 0xfefefeff, 0xfefefefe, - 0xfdfdfdfe, 0xfdfdfdfd, 0xfdfdfdfe, 0xfdfcfdfd, - 0xfefefefe, 0xfefdfdfe, 0x01010101, 0xffff0001, - 0x05050504, 0x02030304, 0x08080707, 0x05060708, - 0x04020102, 0xfafc0004, 0x05020101, 0xf9fb0105, - 0x04010201, 0xf8fb0105, 0x05010101, 0xf8fa0005, - 0x05010100, 0xf7fa0106, 0x04010000, 0xf8fb0005, - 0x04010000, 0xf9fb0005, 0x04010000, 0xf9fc0104, - 0x00030201, 0xfffdfcfd, 0x00040301, 0xfffdfcfd, - 0x01050402, 0xfefdfcfd, 0x01060502, 0xfefcfbfd, - 0x01060603, 0xfefcfbfd, 0x01060603, 0xfefcfbfd, - 0x01060603, 0xfefcfbfd, 0x01050503, 0xfefcfcfd, - 0x02020202, 0xff000001, 0x03040404, 0x00010102, - 0x04040504, 0x01020303, 0x04040404, 0x02020304, - 0x03030302, 0x01020303, 0xffffffff, 0x00000000, - 0xfbfafafb, 0xfdfdfcfb, 0xf8f7f7f9, 0xfbfafaf9, - 0x06060606, 0x04050506, 0x03040404, 0x02030303, - 0xffffff00, 0xfffffefe, 0xfafafbfd, 0xfcfbfafa, - 0xf9fafbfd, 0xfcfbfafa, 0xfefefeff, 0xfffffefe, - 0x01010100, 0x01010101, 0x03030303, 0x03030303, - 0xfbfe0102, 0x050200fc, 0xfafe0102, 0x050300fb, - 0xfafe0102, 0x0603fffa, 0xf9fe0203, 0x070400fa, - 0xf9fe0102, 0x070500fb, 0xfafe0102, 0x070400fb, - 0xfafe0102, 0x060400fc, 0xfbfe0101, 0x060300fc, - 0xfcfaf7f6, 0x020302ff, 0xfdfbf7f6, 0x03040400, - 0xfffdf9f7, 0x03050502, 0x00fefbf9, 0x03050503, - 0x0100fdfa, 0x03050604, 0x0201fefc, 0x02040503, - 0x020100fe, 0x01030402, 0x020201ff, 0x01030302, - 0xfafbfbfc, 0xfbfafafa, 0xfcfcfdfd, 0xfcfcfcfc, - 0x00000000, 0xffffffff, 0x05060505, 0x02030405, - 0x07070605, 0x04050607, 0x04040303, 0x02030404, - 0x0000ff00, 0xff00ffff, 0xfcfcfdfd, 0xfdfdfcfc, - 0x01fbfe01, 0x00020405, 0x01fafd01, 0x00020506, - 0x00f9fc00, 0x01020606, 0xfff7fbff, 0x01030606, - 0xfef6faff, 0x01030606, 0xfef7faff, 0x01030605, - 0xfef7fafe, 0x01030505, 0xfef9fafe, 0x01020404, - 0xf7f8f9fb, 0xfaf9f8f7, 0xf9fafafb, 0xfbfafaf9, - 0xfcfdfdfd, 0xfcfcfbfb, 0xff0000ff, 0xffffffff, - 0x02020100, 0x01020202, 0x05040302, 0x04050505, - 0x06050403, 0x07080808, 0x06050403, 0x06070707, - 0x08070605, 0x090a0a09, 0x07060403, 0x08090908, - 0x03020100, 0x05050504, 0xfffffeff, 0x02020100, - 0xfdfdfdfe, 0x00fffefd, 0xfbfbfcfd, 0xfcfbfbfb, - 0xfafbfbfc, 0xfbfaf9f9, 0xfafbfcfd, 0xfafaf9f9, - 0xfd00070d, 0xfbfcfcfd, 0xfd00070e, 0xfcfcfcfd, - 0xfcff080f, 0xfcfbfcfc, 0xfcff080f, 0xfdfcfbfc, - 0xfcff070f, 0xfcfbfbfb, 0xfcff070e, 0xfdfcfcfc, - 0xfcff060c, 0xfdfcfcfc, 0xfcff050b, 0xfdfcfcfc, - 0x0405fcef, 0x03030404, 0x0405fbee, 0x03030404, - 0x0406fbed, 0x02030404, 0x0406fbec, 0x03030404, - 0x0406fcec, 0x03030504, 0x0406fbed, 0x03030504, - 0x0405fcee, 0x02030404, 0x0304fbef, 0x03030404, - 0xfcfafafa, 0x0b0601fe, 0xfcf9f9fa, 0x0d0802fe, - 0xfcf9f8f8, 0x0e0903fe, 0xfbf9f8f8, 0x100a04ff, - 0xfbf9f8f8, 0x110a04ff, 0xfcf9f8f8, 0x100a0500, - 0xfdfaf8f8, 0x0f090400, 0xfdfbf9f9, 0x0c080400, - 0x05070708, 0xf2f8fe02, 0x05070808, 0xf1f8fe02, - 0x05070808, 0xf0f7fd01, 0x05070808, 0xeff6fd01, - 0x05080908, 0xeff6fd01, 0x04070808, 0xf0f6fc01, - 0x04070707, 0xf2f7fd01, 0x03060706, 0xf3f7fd00, - 0xfcfc0105, 0x0000fffd, 0xfdfd0207, 0x0001fffe, - 0xfdfd0107, 0x010100ff, 0xfefd0106, 0x000101ff, - 0xfefc0006, 0x000100ff, 0xfdfc0005, 0xff0000ff, - 0xfffd0005, 0xfe000000, 0xfffe0104, 0xff000100, - 0x01010202, 0xf8f8fafe, 0x01010101, 0xf8f8fbfe, - 0x00010101, 0xfbfbfdff, 0x00000000, 0xfeffffff, - 0x0000ff00, 0x00010000, 0x00000001, 0x02030201, - 0x01010102, 0x03040302, 0x03030303, 0x04050404, - 0xfefdfcfc, 0x01010000, 0xfefdfcfc, 0x010000ff, - 0xfffefefe, 0x0000ffff, 0x00000100, 0xff000000, - 0x02020202, 0x01010202, 0x04040403, 0x03040404, - 0x03010101, 0x03030403, 0xfcfbfafb, 0xfefefdfd, - 0xfffffefc, 0x0100ffff, 0xfffffefc, 0x0100ffff, - 0xfffffefd, 0x020100ff, 0xfffefdfc, 0x030301ff, - 0xfffdfdfc, 0x050401ff, 0xfefefdfc, 0x070401ff, - 0xfffffefe, 0x08060200, 0x010000ff, 0x08070401, - 0xfefdfdfd, 0x00fffffe, 0x0100ffff, 0x03030202, - 0x04020100, 0x05060605, 0x030200ff, 0x03050605, - 0x0200ffff, 0x01020303, 0x00fffefe, 0xfcfcfdff, - 0xffff0000, 0xf9f8fcfe, 0x00010201, 0xf9fafcff, - 0xfa0104fe, 0x00000300, 0xf90105fe, 0x00000300, - 0xf80105fd, 0xffff0300, 0xf70106fe, 0xff000300, - 0xf80206fe, 0xff000400, 0xf90105fd, 0x00000401, - 0xf90104fe, 0x00010400, 0xfa0104ff, 0x00010300, - 0x03000000, 0x01040504, 0x02010101, 0x00020303, - 0x02010202, 0xfeff0102, 0x01010304, 0xfbfdff00, - 0xff010305, 0xfafcfdfe, 0xfe000305, 0xf9fafbfd, - 0xfe000304, 0xfbfbfcfd, 0xff000304, 0xfdfdfefe, - 0x00000000, 0x06fefbff, 0x01000000, 0x08fefaff, - 0x02000000, 0x09fdfa00, 0x0200ff00, 0x0afef900, - 0x0200ff00, 0x0afdf8ff, 0x02ffff00, 0x09fdf9ff, - 0x0100ff00, 0x08fdfaff, 0x01000000, 0x07fefb00, - 0x02030302, 0xffff0001, 0x02030403, 0xfeff0001, - 0x02040403, 0xfdfeff01, 0x02030302, 0xfdfeff00, - 0x010100ff, 0xfefeff00, 0xfffdfcfb, 0x01010100, - 0xfffbf8f8, 0x03040301, 0x00fbf7f6, 0x05060503, - 0x0504fffb, 0x00000103, 0x0504fffa, 0xfeff0002, - 0x0405fffa, 0xfefeff02, 0x0404fff9, 0xfdfdfe01, - 0x0405fffa, 0xfdfdfe01, 0x040400fb, 0xfefeff01, - 0x040500fc, 0xfeffff01, 0x030401fd, 0xfeffff01, - 0x01fefdfe, 0x03050604, 0x00fcfcfd, 0x02040503, - 0xfffbfbfd, 0x01030402, 0xfffcfafc, 0xff020402, - 0x01fdfcfe, 0xff020402, 0x01fefcfe, 0xfe010303, - 0x01fefdfe, 0xfe010303, 0x01fffefe, 0xfe000303, - 0xfefdfcfc, 0x070502ff, 0xfdfdfcfc, 0x070501fe, - 0xfdfefdfe, 0x0503fffd, 0xfe00ffff, 0x0402fefd, - 0xff010101, 0x0301fdfc, 0xff020304, 0x01fffdfc, - 0x00030406, 0x00fefdfd, 0x01030506, 0xfffefdfe, - 0x04080b0c, 0xfffefe00, 0x0206090a, 0x00fffeff, - 0x00020304, 0x0100ffff, 0xffffffff, 0x020100fe, - 0xfefcfbfd, 0x030200fe, 0xfefcfbfb, 0x020100ff, - 0xfefcfbfb, 0x010100ff, 0xfefdfcfc, 0x0000fffe, - 0xff020303, 0xfefdfcfd, 0xfe000203, 0xfefdfcfc, - 0xff010202, 0xfdfcfbfd, 0x01030303, 0xfdfdfdfe, - 0x03040404, 0xfefefe00, 0x03050505, 0xfefeff00, - 0x02040505, 0xfefdfeff, 0x00030303, 0xfcfcfcfe, - 0xfe04ffff, 0xfb0206fe, 0xfe0400ff, 0xfa0206fd, - 0xfe0400ff, 0xf90307fd, 0xfd04ffff, 0xf90308fc, - 0xfd04ff00, 0xfa0307fc, 0xfd04ffff, 0xfa0307fc, - 0xfd03ffff, 0xfa0306fc, 0xfe0300ff, 0xfb0306fd, - 0x02f9fe01, 0x01fffe05, 0x03f8fe01, 0x02fffd06, - 0x04f7fe02, 0x02fefc07, 0x05f7ff03, 0x03fffc07, - 0x04f7ff03, 0x02fefc07, 0x04f9ff03, 0x01fefc06, - 0x04fa0002, 0x01fffc06, 0x03fb0002, 0x01fffd04, - 0x000202fe, 0xfcfdff00, 0x010202fe, 0xfcfe0001, - 0x020202fe, 0xfeff0102, 0x030302fd, 0xfe000204, - 0x020302fd, 0xfd000204, 0x010201fc, 0xfdff0102, - 0x000100fb, 0xfdfe0101, 0x000000fc, 0xfdfe0001, - 0xfeff0000, 0x080702fe, 0xfdff0000, 0x070601fe, - 0xfdff0100, 0x050400fd, 0xff000100, 0x030100ff, - 0x01010200, 0x0100ff00, 0x020100fe, 0xffff0001, - 0x0100fefb, 0xfdfd0001, 0x01fffcfa, 0xfcfdff01, - 0x0502fefc, 0x02030406, 0x0401fdfb, 0x00000204, - 0x0200fefc, 0xfefeff01, 0x0100fffe, 0xfefdfe00, - 0x000000fe, 0xfffeffff, 0x00fffffe, 0x02010000, - 0xfffffefe, 0x04030100, 0xfffefdfe, 0x05040200, - 0xfefe0102, 0x000100ff, 0xfdfd0001, 0x000100ff, - 0xfdfdff00, 0x010101ff, 0xfffd0000, 0x03030201, - 0xfffdff00, 0x03030301, 0xfefcfefe, 0x04040301, - 0xfefcfdfd, 0x04030301, 0xfefbfdfe, 0x03030201, - 0x04030504, 0x05040404, 0x00010303, 0x01000000, - 0xfeff0101, 0xfefdfcfd, 0xfe000202, 0xfefdfcfe, - 0xff010302, 0xfefdfdff, 0x00000201, 0xfffefeff, - 0xff000100, 0xfffefdff, 0xff000101, 0xfefefeff, - 0x00fffffe, 0x00010201, 0x05030201, 0x03050506, - 0x04030201, 0x03040505, 0xfdfdfefe, 0x0000fffe, - 0xfbfcfdfd, 0xfffefdfc, 0xfefeffff, 0x0000fffe, - 0xff000100, 0x010000ff, 0xfeff00ff, 0xfffefefd, - 0x05060707, 0xfeff0204, 0x02020303, 0xfdfe0001, - 0xffffff00, 0xfefeff00, 0xfffefdff, 0x01000000, - 0xfffefe00, 0x020201ff, 0xffff0103, 0x020201ff, - 0xfdfe0103, 0x0201fffe, 0xfafbfe01, 0x00fefdfb, - 0xfdfeff00, 0xfefe00ff, 0xffff0000, 0xfeff0100, - 0xfffe0000, 0xfe000000, 0xfdfdfeff, 0xfdfdfffe, - 0xfdfdfeff, 0xfcfdfefe, 0x00000202, 0xfeff0000, - 0x02030505, 0xff000202, 0x05060808, 0x01020404, - 0xfdfaf8f9, 0xfffeffff, 0x00fdfbfb, 0x00000102, - 0x0300ffff, 0x01010304, 0x03010102, 0x02020304, - 0x02000203, 0x02010203, 0xffff0204, 0x01010100, - 0xfdfe0203, 0x0100fffe, 0xfcfd0103, 0x0100fefd, - 0x02fffefc, 0x00010303, 0xfefcfbf9, 0xfeff0000, - 0xfcfbfbfa, 0xfdfefefe, 0xffff00ff, 0xff000000, - 0x02020302, 0x00010202, 0x03040503, 0x00010001, - 0x02030403, 0xffffff00, 0x01030505, 0xffffff00, - 0xff000101, 0xfcfafbfd, 0x00000101, 0xfffdfd00, - 0x00ffff00, 0x03010001, 0xfffdfefe, 0x07040202, - 0x00fefefe, 0x06030202, 0x010000ff, 0x03000001, - 0x03030300, 0xfffdfe01, 0x03040301, 0xfcfbfd00, - 0xff000200, 0xfefefcfd, 0x00020401, 0xfffefdfe, - 0x01030603, 0xff00fefe, 0x01040704, 0x00fffdfe, - 0x00030603, 0x00fffdfd, 0xff000301, 0x0101fefd, - 0xfeff0100, 0x0202fffd, 0xfdfdfffe, 0x0201fffd, - 0x00ff0103, 0x00000001, 0xfffeff02, 0xffff0001, - 0x00feff01, 0xfdfe0001, 0x01fffe00, 0xfbfd0103, - 0x02fffe00, 0xfbfd0205, 0x04fffe00, 0xfbfe0306, - 0x0400fe00, 0xfcfe0407, 0x0400fe00, 0xfcfe0406, - 0xfcfdfefe, 0x00fffefd, 0xff000101, 0x0100ffff, - 0x02020303, 0x01010101, 0x02020202, 0x01000001, - 0x00000000, 0xffffffff, 0xfcfcfcfc, 0xfdfcfcfc, - 0xfdfefdfd, 0x00fffffe, 0x05040403, 0x07060605, - 0xfe07feff, 0x00fffffc, 0xff09feff, 0x00fffffc, - 0xff0afdff, 0x01fffffc, 0xfe0afdff, 0x02fffffd, - 0xfe0afeff, 0x02fffffc, 0xfe09feff, 0x02fffffc, - 0xfe08feff, 0x01ff00fc, 0xfe07fe00, 0x0200fffd, - 0x0301fc03, 0x0001fefd, 0x0401fb03, 0x0001fefd, - 0x0502fa03, 0x0003fffd, 0x0502fa03, 0x0002fffd, - 0x0501fa03, 0x0003fefc, 0x0501fa03, 0x0002fefd, - 0x0401fa02, 0x0001fffd, 0x0401fa02, 0x0001fffe, - 0x01010000, 0x02000001, 0x0101ff00, 0x02000001, - 0x0000ff00, 0x02000000, 0x0000ff00, 0x00ff0000, - 0x00010001, 0xfffeff00, 0x00010103, 0xfdfcfe00, - 0x01020305, 0xfcfbfd00, 0x00020405, 0xfbfbfcff, - 0xfeff0001, 0xf7fafdfe, 0xffff0002, 0xfafd0000, - 0xff000001, 0xfbfe0000, 0x01010102, 0xfdff0201, - 0x01020101, 0xff010202, 0x01020101, 0x01010101, - 0x01020000, 0x02020000, 0x02020100, 0x02020000, - 0x0100fdfc, 0x03040604, 0x0000fefd, 0x00010402, - 0x0000ffff, 0xfdfe0101, 0x00010101, 0xfbfd0101, - 0x00010101, 0xfbfd0101, 0xff0000ff, 0xfcfe0101, - 0xff0000ff, 0xfe000201, 0x000000ff, 0x00010302, - 0x040300ff, 0xfbfbfc00, 0x05040000, 0xfefdfe02, - 0x0402ff00, 0x00ffff02, 0x01fffe00, 0x0100fe00, - 0x00fefe01, 0x01ffff00, 0x00fdfe01, 0x00ff0001, - 0x01fefe01, 0x00000103, 0x02fffe01, 0x00000204, - 0x02030201, 0x01020200, 0x000100ff, 0x010101fd, - 0xfe0000ff, 0x010200fc, 0xff0202ff, 0x010200fb, - 0xff0403ff, 0x010200fb, 0x000402fe, 0x0000fffc, - 0x000200fc, 0x0000fefc, 0x0102fffb, 0x020301fe, - 0x00010001, 0xfeff0201, 0xfeff0002, 0xff000301, - 0xfcfe0003, 0x00010300, 0xfbfd0105, 0x010102fe, - 0xfbfe0106, 0x010001fe, 0xfbff0105, 0x00ff00fe, - 0xfcfe0003, 0x00ff00fe, 0xfe00ff01, 0x01000100, - 0x03020101, 0x02010102, 0x0100ffff, 0x01010001, - 0x0000fdfc, 0x02010101, 0x0200fdfc, 0x02030202, - 0x0100fcfb, 0x02010101, 0xfffffcfb, 0x00fffefe, - 0x0000fefd, 0xfffefdfe, 0x04040302, 0x00000002, - 0x0100fefc, 0x00000000, 0x0101fffd, 0x00000000, - 0x020200fe, 0x02000000, 0x010201ff, 0x050300ff, - 0xff010200, 0x060500fe, 0xfd000100, 0x060400fd, - 0xfcfe0101, 0x0201fdfc, 0xfcfe0001, 0x00fefcfb, - 0xfdfdfdff, 0xfffffefd, 0x00010203, 0x01010100, - 0x02030405, 0x02020101, 0xfe000102, 0xfffffefe, - 0xff000000, 0xfefefefe, 0x03030100, 0xffff0102, - 0x04030100, 0xff010203, 0x01fffdfc, 0xfdfdfe00, - 0xf8f9fcfd, 0x02fffcf9, 0xfcfdff00, 0x0200fefc, - 0xff000001, 0x0200fefd, 0x00010102, 0x0200ffff, - 0x01010101, 0x01000000, 0x01010101, 0x01010101, - 0x02010000, 0x02020303, 0x03010000, 0x02030404, - 0x00030303, 0x020100ff, 0xff010101, 0x01fffffe, - 0xfdfffefe, 0x00fefefd, 0xfefefcfc, 0x00fdfefe, - 0x01fffcfc, 0x02ff0001, 0x0302fffd, 0x05030304, - 0x030200fe, 0x03030303, 0x0000fefe, 0x01000000, - 0xff010200, 0xfe03fffd, 0xffff00ff, 0xfe0400fd, - 0xfefefefe, 0xfe0501fe, 0xfffdfefd, 0xfd0401fe, - 0x00ff00fe, 0xfb0300ff, 0x02010201, 0xfb020000, - 0x03020402, 0xfd030101, 0x01010201, 0xfe040100, - 0xfffcfd04, 0x03010303, 0xfffcfc04, 0x02000203, - 0x00fcfd04, 0x01ff0202, 0x01fefd04, 0x00fe0102, - 0x01fefc02, 0x00fd0002, 0x00fefd02, 0x02fe0001, - 0x00ffff03, 0x03000000, 0xfefefe02, 0x02ffffff, - 0x04030202, 0xff000103, 0x02010001, 0xfefeff01, - 0x01020102, 0xffff0001, 0x03040304, 0x01010102, - 0x02020203, 0x01010101, 0x00fffeff, 0xffffffff, - 0xfffefdfd, 0xfefefefe, 0xfdfdfcfc, 0xfdfdfcfc, - 0xfdff0102, 0x0403fefc, 0xff010202, 0x0201fefd, - 0x03030201, 0xfefffe00, 0x040200ff, 0xfdff0002, - 0x0300fefe, 0xfd000203, 0xfffdfe00, 0xff020201, - 0xfbfcff03, 0x000200fd, 0xfafe0306, 0x010300fb, - 0x00fe03fe, 0x01fefe03, 0x00fd04fd, 0x02fffe03, - 0x00fd05fd, 0x02fffe04, 0xfffc04fe, 0x02fefd03, - 0x00fd04fd, 0x02fffd03, 0x00fe05fe, 0x02fffd03, - 0x01fd04fe, 0x02fffe03, 0x01fe03fe, 0x0200fe03, - 0xff000001, 0xfffc0201, 0xff000002, 0xfefc0201, - 0xff010101, 0x00fe0402, 0xff01ff00, 0x01ff0502, - 0xfe00ff00, 0x01ff0501, 0xfeffff00, 0xfffd0300, - 0xfe000101, 0xfffd0300, 0xfd000101, 0x00fe0300, - 0x01ff0001, 0x05040201, 0x01ff0001, 0x07050101, - 0xfffe0000, 0x050300ff, 0xfffeff00, 0x0302ffff, - 0xfffdff00, 0x0201ffff, 0xfefcfeff, 0x0000fefe, - 0xfffefeff, 0x0000fefe, 0x00ffff00, 0x0000ffff, - 0xff000303, 0x040401ff, 0xfe000302, 0x010100fe, - 0xff010302, 0x000100ff, 0xff000201, 0xfe00ffff, - 0xff000100, 0xfe00fffe, 0xff000100, 0x0001fffe, - 0xfdff0101, 0x0301fdfc, 0xfdff0201, 0x0301fcfb, - 0x0100fefd, 0xfe000101, 0x01010100, 0xfdff0000, - 0x01010201, 0xfeffff00, 0xfffdff00, 0xff00ffff, - 0xfdfafd00, 0x0101fffe, 0xfdfcff02, 0x020200fe, - 0x01010405, 0x02030100, 0x01020405, 0x0100ff00, - 0xfbfe00fe, 0x0000fdfa, 0x000100fe, 0x020201ff, - 0x030100fe, 0x01020202, 0x040200fe, 0x01010203, - 0x030200fe, 0x00ff0002, 0x0101fffd, 0x01ffff00, - 0x0001fffc, 0x0200feff, 0xff00fffc, 0x0401feff, - 0xff0000fd, 0x00010101, 0xff0001fd, 0xffff0000, - 0x000303ff, 0x01000001, 0xfe0202fd, 0x010000ff, - 0xfe0000fb, 0x020001ff, 0x0001fef9, 0x02020201, - 0x020300fb, 0x02020303, 0x010402fd, 0xfdfe0000, - 0xfefe0205, 0xffffff00, 0xfdfcff02, 0xfffffeff, - 0x01fefe00, 0x0100ff02, 0x03fffeff, 0x0200ff03, - 0x03000001, 0x02fffe03, 0x03010102, 0x00fefe02, - 0x01ff0001, 0xfefdfd01, 0x02010001, 0x00000003, - 0x00fdfbfc, 0xfffeff01, 0x01fffdfe, 0x00000002, - 0x01020101, 0x01010102, 0x01030403, 0xfffffe00, - 0x00020303, 0xfefdfdfe, 0xff000101, 0xfefefcfe, - 0x00000102, 0x0100ff00, 0x01010102, 0x03010101, - 0xff000000, 0x0001fffe, 0xfefffffe, 0x0000fefd, - 0xff0000ff, 0x010100fe, 0xff000101, 0x010301ff, - 0xfe000202, 0x000302ff, 0xffff0103, 0xfe020401, - 0xfffd0002, 0xfb000503, 0x00feff01, 0xfaff0303, - 0x040300ff, 0x02010002, 0x0100fffe, 0x0100feff, - 0xfdfefdfe, 0xfdfaf9fa, 0x01030202, 0xfefdfeff, - 0x01030202, 0x00000000, 0x00010102, 0x01000101, - 0x00000001, 0x02010100, 0x00ff0001, 0x01020200, - 0x01030101, 0x01ffffff, 0x0000fffe, 0x02fffefe, - 0x0101fefe, 0x03010001, 0xff00fefe, 0x0200ff00, - 0x00010000, 0x01feffff, 0x01020203, 0x01fefe00, - 0x02030305, 0x04010101, 0xfbfcfd00, 0x01fffdfc, - 0x02fffcfa, 0xff000002, 0x0301fefc, 0x00020203, - 0x02fffefd, 0x00020303, 0x01fefefd, 0xff010102, - 0x00fefefe, 0xff010202, 0x01ffffff, 0x00020302, - 0x01feffff, 0xff020202, 0x00feff00, 0xff000102, - 0x01020406, 0x01000000, 0xfeff0204, 0xfffffefe, - 0xfeff0102, 0xfffefefe, 0xfe000202, 0x00fffefe, - 0xfeff0000, 0x0100fffe, 0xfffefdfd, 0x00fffeff, - 0x0302fefd, 0xfeff0002, 0x050400fe, 0xff000205, - 0x00020405, 0xfffffeff, 0x01020304, 0xff00ff00, - 0x01000101, 0xff010001, 0x00fffffe, 0xfdfefe00, - 0x000000ff, 0xfbfdfdff, 0xff010100, 0xfdfefeff, - 0xfeffffff, 0x010301ff, 0xfffefeff, 0x05060502, - 0x01fefdfd, 0xfffffe01, 0x04030201, 0xfdfffd01, - 0x01000203, 0xfdfffdff, 0x00ff0001, 0x0001ffff, - 0x01000101, 0x03050202, 0x02010101, 0x00030202, - 0xfefefffd, 0xfdfffdfd, 0x000101ff, 0xfe00ffff, - 0xfefe0002, 0xfe010402, 0xfffe0001, 0xff020503, - 0xfefdfeff, 0xfe010301, 0xfffffeff, 0xff010200, - 0x01010000, 0x00020201, 0x04040100, 0x01030202, - 0x0102fffe, 0xfdfefdfe, 0x000100ff, 0xfbfcfcfd, - 0xfcfd0004, 0xfffefcfc, 0x00ff0005, 0xfffefdff, - 0x01000004, 0x00000001, 0xfffefd00, 0x00010000, - 0x0000fe00, 0x01020101, 0x00000002, 0x00010101, - 0xffff0002, 0x00010101, 0xfefeff01, 0x02020200, - 0x00fefbfd, 0x00fdfdff, 0x0200fe00, 0x03000002, - 0x00feff02, 0x02ffff00, 0xffff0205, 0x02ffffff, - 0xff000205, 0x02ff00ff, 0x00000102, 0x02000100, - 0x0101ffff, 0x02010202, 0x0000fefd, 0xfffe0000, - 0x00020300, 0xfdfdfdfe, 0x01030300, 0x02010000, - 0xfeff00ff, 0x0301ffff, 0xfeff00ff, 0x0200ffff, - 0xfeff00ff, 0x02ff0000, 0xfeff00ff, 0x01feffff, - 0xfd000100, 0x02ffffff, 0xff020505, 0x0301ffff, - 0xff010000, 0x0200fefd, 0x00030101, 0x0100fefe, - 0x01030101, 0xffff0000, 0x0102ff00, 0xfdff0001, - 0x0101feff, 0xfcfe0001, 0x010200ff, 0xfdff0001, - 0x02030101, 0xfdfe0001, 0x02040202, 0xfcfeff01, - 0x02020201, 0x0200fe00, 0xfdfeffff, 0x01fdfbfc, - 0x00010100, 0x01ffffff, 0x01010100, 0x02000000, - 0x02010100, 0x02010101, 0x0200ffff, 0x03020202, - 0xfffcfcfe, 0x00fefefe, 0x01000001, 0x01000000, - 0xfefdff00, 0x01020200, 0xfdfeff00, 0x02010100, - 0xfdfe0001, 0x010000ff, 0xfeff00ff, 0x00ff0000, - 0x000101ff, 0x00000202, 0x01030200, 0x02030503, - 0xfe0101ff, 0x01010300, 0xfc0000ff, 0xfffffffc, - 0x000101ff, 0x02010201, 0x000100fd, 0x02000101, - 0xfffffdfb, 0x01000100, 0xfdfefdfc, 0x00fffffe, - 0xfeff0000, 0x00fefefe, 0x00020403, 0x01000000, - 0x00000102, 0x00ff0000, 0x03020100, 0x02030404, - 0x040704ff, 0x00000000, 0x030604ff, 0x01010100, - 0x00040300, 0x010000ff, 0xfe010100, 0xffff00ff, - 0xffff00ff, 0x000000ff, 0x00ffffff, 0x00000000, - 0x00fdfdff, 0xfffeff01, 0xfefcfcfd, 0xfffefeff, - 0x00010202, 0xfd000101, 0x0000fffe, 0xfd000101, - 0x0100fffe, 0xfe010102, 0x02020201, 0xff020303, - 0x00010201, 0xff020101, 0xfcfe0100, 0xff0100fe, - 0xfdff0101, 0xfdff00fe, 0xff000201, 0xfcff0100, - 0xfefeffff, 0x03040300, 0xfdff0101, 0x000000fe, - 0x02020202, 0xffff0102, 0x03010101, 0xfefe0003, - 0xffffff00, 0xfffffe00, 0xfdfcfdff, 0x0200fefe, - 0x0100ffff, 0x05030202, 0x00fffffe, 0x01000000, - 0x0002fdfe, 0xff010100, 0xfe01fcff, 0x000202ff, - 0xfe00fc01, 0xff0101fe, 0xff01fd02, 0xff0101ff, - 0x0103fe03, 0xff010100, 0x0102fd01, 0xff000100, - 0x0001fbff, 0x010100ff, 0x0303fd00, 0x03030201, - 0x01feff00, 0xff020505, 0xfffeff01, 0xfbfe0101, - 0xfeff0101, 0xfdffffff, 0xffff0101, 0x030402ff, - 0xffffffff, 0x030400ff, 0x0100ffff, 0xfffffdff, - 0x02000000, 0xff000002, 0x00fdfe00, 0x02030101, - 0x01020302, 0xfefe0000, 0x01000302, 0x02030301, - 0xfffd0000, 0x030202ff, 0x01fdfefe, 0x01010201, - 0x02fefffe, 0xfeff0101, 0x02000100, 0xfefe0000, - 0x02000100, 0xfefe0000, 0x00fefefd, 0xfdfefeff, - 0x03ff0100, 0xff0301ff, 0x03ff0100, 0xfd02ffff, - 0x03fe0101, 0xfd00fdff, 0x03fe0202, 0xfe01fe00, - 0x03fd0101, 0xfd01feff, 0x03fd0101, 0xfe01ff00, - 0x04ff0201, 0xfe01ff00, 0x03ff0100, 0xfd00fdff, - 0x01fffdfd, 0xfeff0102, 0x0200fefe, 0xfefe0001, - 0x0201fefd, 0xfffeff01, 0x0402fefd, 0x01fefe00, - 0x0402fffd, 0x02fefe00, 0x030401ff, 0x02fefdff, - 0x02040200, 0x02fffeff, 0x00020100, 0x030100ff, - 0x01fb0003, 0x01000004, 0x02fbfe01, 0x01feff05, - 0x030000ff, 0xff000103, 0xfe0403fe, 0xfe00fffd, - 0xfd0503fd, 0xfe0000fd, 0xfe0203ff, 0xff0202fe, - 0xff000002, 0x00000000, 0x01fefd00, 0xfefe0003 +static const int8 s_svq1InterCodebook8x8[6144] = { + -4, -3, 4, 5, 2, 1, 1, 0, -5, -3, 5, 5, 2, 1, 0, 0, + -6, -4, 5, 5, 2, 1, 0, 0, -7, -4, 4, 5, 2, 1, 0, 0, + -8, -5, 3, 4, 2, 1, 0, 0, -8, -6, 3, 4, 1, 1, 1, 0, + -8, -6, 2, 4, 2, 1, 1, 0, -8, -6, 2, 4, 1, 1, 1, 1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -2, + -2, -3, -3, -3, -3, -3, -3, -3, -2, -3, -3, -3, -3, -3, -4, -3, + -2, -2, -2, -2, -2, -3, -3, -2, 1, 1, 1, 1, 1, 0, -1, -1, + 4, 5, 5, 5, 4, 3, 3, 2, 7, 7, 8, 8, 8, 7, 6, 5, + 2, 1, 2, 4, 4, 0, -4, -6, 1, 1, 2, 5, 5, 1, -5, -7, + 1, 2, 1, 4, 5, 1, -5, -8, 1, 1, 1, 5, 5, 0, -6, -8, + 0, 1, 1, 5, 6, 1, -6, -9, 0, 0, 1, 4, 5, 0, -5, -8, + 0, 0, 1, 4, 5, 0, -5, -7, 0, 0, 1, 4, 4, 1, -4, -7, + 1, 2, 3, 0, -3, -4, -3, -1, 1, 3, 4, 0, -3, -4, -3, -1, + 2, 4, 5, 1, -3, -4, -3, -2, 2, 5, 6, 1, -3, -5, -4, -2, + 3, 6, 6, 1, -3, -5, -4, -2, 3, 6, 6, 1, -3, -5, -4, -2, + 3, 6, 6, 1, -3, -5, -4, -2, 3, 5, 5, 1, -3, -4, -4, -2, + 2, 2, 2, 2, 1, 0, 0, -1, 4, 4, 4, 3, 2, 1, 1, 0, + 4, 5, 4, 4, 3, 3, 2, 1, 4, 4, 4, 4, 4, 3, 2, 2, + 2, 3, 3, 3, 3, 3, 2, 1, -1, -1, -1, -1, 0, 0, 0, 0, + -5, -6, -6, -5, -5, -4, -3, -3, -7, -9, -9, -8, -7, -6, -6, -5, + 6, 6, 6, 6, 6, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, + 0, -1, -1, -1, -2, -2, -1, -1, -3, -5, -6, -6, -6, -6, -5, -4, + -3, -5, -6, -7, -6, -6, -5, -4, -1, -2, -2, -2, -2, -2, -1, -1, + 0, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 1, -2, -5, -4, 0, 2, 5, 2, 1, -2, -6, -5, 0, 3, 5, + 2, 1, -2, -6, -6, -1, 3, 6, 3, 2, -2, -7, -6, 0, 4, 7, + 2, 1, -2, -7, -5, 0, 5, 7, 2, 1, -2, -6, -5, 0, 4, 7, + 2, 1, -2, -6, -4, 0, 4, 6, 1, 1, -2, -5, -4, 0, 3, 6, + -10, -9, -6, -4, -1, 2, 3, 2,-10, -9, -5, -3, 0, 4, 4, 3, + -9, -7, -3, -1, 2, 5, 5, 3, -7, -5, -2, 0, 3, 5, 5, 3, + -6, -3, 0, 1, 4, 6, 5, 3, -4, -2, 1, 2, 3, 5, 4, 2, + -2, 0, 1, 2, 2, 4, 3, 1, -1, 1, 2, 2, 2, 3, 3, 1, + -4, -5, -5, -6, -6, -6, -6, -5, -3, -3, -4, -4, -4, -4, -4, -4, + 0, 0, 0, 0, -1, -1, -1, -1, 5, 5, 6, 5, 5, 4, 3, 2, + 5, 6, 7, 7, 7, 6, 5, 4, 3, 3, 4, 4, 4, 4, 3, 2, + 0, -1, 0, 0, -1, -1, 0, -1, -3, -3, -4, -4, -4, -4, -3, -3, + 1, -2, -5, 1, 5, 4, 2, 0, 1, -3, -6, 1, 6, 5, 2, 0, + 0, -4, -7, 0, 6, 6, 2, 1, -1, -5, -9, -1, 6, 6, 3, 1, + -1, -6,-10, -2, 6, 6, 3, 1, -1, -6, -9, -2, 5, 6, 3, 1, + -2, -6, -9, -2, 5, 5, 3, 1, -2, -6, -7, -2, 4, 4, 2, 1, + -5, -7, -8, -9, -9, -8, -7, -6, -5, -6, -6, -7, -7, -6, -6, -5, + -3, -3, -3, -4, -5, -5, -4, -4, -1, 0, 0, -1, -1, -1, -1, -1, + 0, 1, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 5, 5, 5, 4, + 3, 4, 5, 6, 8, 8, 8, 7, 3, 4, 5, 6, 7, 7, 7, 6, + 5, 6, 7, 8, 9, 10, 10, 9, 3, 4, 6, 7, 8, 9, 9, 8, + 0, 1, 2, 3, 4, 5, 5, 5, -1, -2, -1, -1, 0, 1, 2, 2, + -2, -3, -3, -3, -3, -2, -1, 0, -3, -4, -5, -5, -5, -5, -5, -4, + -4, -5, -5, -6, -7, -7, -6, -5, -3, -4, -5, -6, -7, -7, -6, -6, + 13, 7, 0, -3, -3, -4, -4, -5, 14, 7, 0, -3, -3, -4, -4, -4, + 15, 8, -1, -4, -4, -4, -5, -4, 15, 8, -1, -4, -4, -5, -4, -3, + 15, 7, -1, -4, -5, -5, -5, -4, 14, 7, -1, -4, -4, -4, -4, -3, + 12, 6, -1, -4, -4, -4, -4, -3, 11, 5, -1, -4, -4, -4, -4, -3, + -17, -4, 5, 4, 4, 4, 3, 3,-18, -5, 5, 4, 4, 4, 3, 3, + -19, -5, 6, 4, 4, 4, 3, 2,-20, -5, 6, 4, 4, 4, 3, 3, + -20, -4, 6, 4, 4, 5, 3, 3,-19, -5, 6, 4, 4, 5, 3, 3, + -18, -4, 5, 4, 4, 4, 3, 2,-17, -5, 4, 3, 4, 4, 3, 3, + -6, -6, -6, -4, -2, 1, 6, 11, -6, -7, -7, -4, -2, 2, 8, 13, + -8, -8, -7, -4, -2, 3, 9, 14, -8, -8, -7, -5, -1, 4, 10, 16, + -8, -8, -7, -5, -1, 4, 10, 17, -8, -8, -7, -4, 0, 5, 10, 16, + -8, -8, -6, -3, 0, 4, 9, 15, -7, -7, -5, -3, 0, 4, 8, 12, + 8, 7, 7, 5, 2, -2, -8,-14, 8, 8, 7, 5, 2, -2, -8,-15, + 8, 8, 7, 5, 1, -3, -9,-16, 8, 8, 7, 5, 1, -3,-10,-17, + 8, 9, 8, 5, 1, -3,-10,-17, 8, 8, 7, 4, 1, -4,-10,-16, + 7, 7, 7, 4, 1, -3, -9,-14, 6, 7, 6, 3, 0, -3, -9,-13, + 5, 1, -4, -4, -3, -1, 0, 0, 7, 2, -3, -3, -2, -1, 1, 0, + 7, 1, -3, -3, -1, 0, 1, 1, 6, 1, -3, -2, -1, 1, 1, 0, + 6, 0, -4, -2, -1, 0, 1, 0, 5, 0, -4, -3, -1, 0, 0, -1, + 5, 0, -3, -1, 0, 0, 0, -2, 4, 1, -2, -1, 0, 1, 0, -1, + 2, 2, 1, 1, -2, -6, -8, -8, 1, 1, 1, 1, -2, -5, -8, -8, + 1, 1, 1, 0, -1, -3, -5, -5, 0, 0, 0, 0, -1, -1, -1, -2, + 0, -1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 2, 3, 2, + 2, 1, 1, 1, 2, 3, 4, 3, 3, 3, 3, 3, 4, 4, 5, 4, + -4, -4, -3, -2, 0, 0, 1, 1, -4, -4, -3, -2, -1, 0, 0, 1, + -2, -2, -2, -1, -1, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, + 2, 2, 2, 2, 2, 2, 1, 1, 3, 4, 4, 4, 4, 4, 4, 3, + 1, 1, 1, 3, 3, 4, 3, 3, -5, -6, -5, -4, -3, -3, -2, -2, + -4, -2, -1, -1, -1, -1, 0, 1, -4, -2, -1, -1, -1, -1, 0, 1, + -3, -2, -1, -1, -1, 0, 1, 2, -4, -3, -2, -1, -1, 1, 3, 3, + -4, -3, -3, -1, -1, 1, 4, 5, -4, -3, -2, -2, -1, 1, 4, 7, + -2, -2, -1, -1, 0, 2, 6, 8, -1, 0, 0, 1, 1, 4, 7, 8, + -3, -3, -3, -2, -2, -1, -1, 0, -1, -1, 0, 1, 2, 2, 3, 3, + 0, 1, 2, 4, 5, 6, 6, 5, -1, 0, 2, 3, 5, 6, 5, 3, + -1, -1, 0, 2, 3, 3, 2, 1, -2, -2, -1, 0, -1, -3, -4, -4, + 0, 0, -1, -1, -2, -4, -8, -7, 1, 2, 1, 0, -1, -4, -6, -7, + -2, 4, 1, -6, 0, 3, 0, 0, -2, 5, 1, -7, 0, 3, 0, 0, + -3, 5, 1, -8, 0, 3, -1, -1, -2, 6, 1, -9, 0, 3, 0, -1, + -2, 6, 2, -8, 0, 4, 0, -1, -3, 5, 1, -7, 1, 4, 0, 0, + -2, 4, 1, -7, 0, 4, 1, 0, -1, 4, 1, -6, 0, 3, 1, 0, + 0, 0, 0, 3, 4, 5, 4, 1, 1, 1, 1, 2, 3, 3, 2, 0, + 2, 2, 1, 2, 2, 1, -1, -2, 4, 3, 1, 1, 0, -1, -3, -5, + 5, 3, 1, -1, -2, -3, -4, -6, 5, 3, 0, -2, -3, -5, -6, -7, + 4, 3, 0, -2, -3, -4, -5, -5, 4, 3, 0, -1, -2, -2, -3, -3, + 0, 0, 0, 0, -1, -5, -2, 6, 0, 0, 0, 1, -1, -6, -2, 8, + 0, 0, 0, 2, 0, -6, -3, 9, 0, -1, 0, 2, 0, -7, -2, 10, + 0, -1, 0, 2, -1, -8, -3, 10, 0, -1, -1, 2, -1, -7, -3, 9, + 0, -1, 0, 1, -1, -6, -3, 8, 0, 0, 0, 1, 0, -5, -2, 7, + 2, 3, 3, 2, 1, 0, -1, -1, 3, 4, 3, 2, 1, 0, -1, -2, + 3, 4, 4, 2, 1, -1, -2, -3, 2, 3, 3, 2, 0, -1, -2, -3, + -1, 0, 1, 1, 0, -1, -2, -2, -5, -4, -3, -1, 0, 1, 1, 1, + -8, -8, -5, -1, 1, 3, 4, 3,-10, -9, -5, 0, 3, 5, 6, 5, + -5, -1, 4, 5, 3, 1, 0, 0, -6, -1, 4, 5, 2, 0, -1, -2, + -6, -1, 5, 4, 2, -1, -2, -2, -7, -1, 4, 4, 1, -2, -3, -3, + -6, -1, 5, 4, 1, -2, -3, -3, -5, 0, 4, 4, 1, -1, -2, -2, + -4, 0, 5, 4, 1, -1, -1, -2, -3, 1, 4, 3, 1, -1, -1, -2, + -2, -3, -2, 1, 4, 6, 5, 3, -3, -4, -4, 0, 3, 5, 4, 2, + -3, -5, -5, -1, 2, 4, 3, 1, -4, -6, -4, -1, 2, 4, 2, -1, + -2, -4, -3, 1, 2, 4, 2, -1, -2, -4, -2, 1, 3, 3, 1, -2, + -2, -3, -2, 1, 3, 3, 1, -2, -2, -2, -1, 1, 3, 3, 0, -2, + -4, -4, -3, -2, -1, 2, 5, 7, -4, -4, -3, -3, -2, 1, 5, 7, + -2, -3, -2, -3, -3, -1, 3, 5, -1, -1, 0, -2, -3, -2, 2, 4, + 1, 1, 1, -1, -4, -3, 1, 3, 4, 3, 2, -1, -4, -3, -1, 1, + 6, 4, 3, 0, -3, -3, -2, 0, 6, 5, 3, 1, -2, -3, -2, -1, + 12, 11, 8, 4, 0, -2, -2, -1, 10, 9, 6, 2, -1, -2, -1, 0, + 4, 3, 2, 0, -1, -1, 0, 1, -1, -1, -1, -1, -2, 0, 1, 2, + -3, -5, -4, -2, -2, 0, 2, 3, -5, -5, -4, -2, -1, 0, 1, 2, + -5, -5, -4, -2, -1, 0, 1, 1, -4, -4, -3, -2, -2, -1, 0, 0, + 3, 3, 2, -1, -3, -4, -3, -2, 3, 2, 0, -2, -4, -4, -3, -2, + 2, 2, 1, -1, -3, -5, -4, -3, 3, 3, 3, 1, -2, -3, -3, -3, + 4, 4, 4, 3, 0, -2, -2, -2, 5, 5, 5, 3, 0, -1, -2, -2, + 5, 5, 4, 2, -1, -2, -3, -2, 3, 3, 3, 0, -2, -4, -4, -4, + -1, -1, 4, -2, -2, 6, 2, -5, -1, 0, 4, -2, -3, 6, 2, -6, + -1, 0, 4, -2, -3, 7, 3, -7, -1, -1, 4, -3, -4, 8, 3, -7, + 0, -1, 4, -3, -4, 7, 3, -6, -1, -1, 4, -3, -4, 7, 3, -6, + -1, -1, 3, -3, -4, 6, 3, -6, -1, 0, 3, -2, -3, 6, 3, -5, + 1, -2, -7, 2, 5, -2, -1, 1, 1, -2, -8, 3, 6, -3, -1, 2, + 2, -2, -9, 4, 7, -4, -2, 2, 3, -1, -9, 5, 7, -4, -1, 3, + 3, -1, -9, 4, 7, -4, -2, 2, 3, -1, -7, 4, 6, -4, -2, 1, + 2, 0, -6, 4, 6, -4, -1, 1, 2, 0, -5, 3, 4, -3, -1, 1, + -2, 2, 2, 0, 0, -1, -3, -4, -2, 2, 2, 1, 1, 0, -2, -4, + -2, 2, 2, 2, 2, 1, -1, -2, -3, 2, 3, 3, 4, 2, 0, -2, + -3, 2, 3, 2, 4, 2, 0, -3, -4, 1, 2, 1, 2, 1, -1, -3, + -5, 0, 1, 0, 1, 1, -2, -3, -4, 0, 0, 0, 1, 0, -2, -3, + 0, 0, -1, -2, -2, 2, 7, 8, 0, 0, -1, -3, -2, 1, 6, 7, + 0, 1, -1, -3, -3, 0, 4, 5, 0, 1, 0, -1, -1, 0, 1, 3, + 0, 2, 1, 1, 0, -1, 0, 1, -2, 0, 1, 2, 1, 0, -1, -1, + -5, -2, 0, 1, 1, 0, -3, -3, -6, -4, -1, 1, 1, -1, -3, -4, + -4, -2, 2, 5, 6, 4, 3, 2, -5, -3, 1, 4, 4, 2, 0, 0, + -4, -2, 0, 2, 1, -1, -2, -2, -2, -1, 0, 1, 0, -2, -3, -2, + -2, 0, 0, 0, -1, -1, -2, -1, -2, -1, -1, 0, 0, 0, 1, 2, + -2, -2, -1, -1, 0, 1, 3, 4, -2, -3, -2, -1, 0, 2, 4, 5, + 2, 1, -2, -2, -1, 0, 1, 0, 1, 0, -3, -3, -1, 0, 1, 0, + 0, -1, -3, -3, -1, 1, 1, 1, 0, 0, -3, -1, 1, 2, 3, 3, + 0, -1, -3, -1, 1, 3, 3, 3, -2, -2, -4, -2, 1, 3, 4, 4, + -3, -3, -4, -2, 1, 3, 3, 4, -2, -3, -5, -2, 1, 2, 3, 3, + 4, 5, 3, 4, 4, 4, 4, 5, 3, 3, 1, 0, 0, 0, 0, 1, + 1, 1, -1, -2, -3, -4, -3, -2, 2, 2, 0, -2, -2, -4, -3, -2, + 2, 3, 1, -1, -1, -3, -3, -2, 1, 2, 0, 0, -1, -2, -2, -1, + 0, 1, 0, -1, -1, -3, -2, -1, 1, 1, 0, -1, -1, -2, -2, -2, + -2, -1, -1, 0, 1, 2, 1, 0, 1, 2, 3, 5, 6, 5, 5, 3, + 1, 2, 3, 4, 5, 5, 4, 3, -2, -2, -3, -3, -2, -1, 0, 0, + -3, -3, -4, -5, -4, -3, -2, -1, -1, -1, -2, -2, -2, -1, 0, 0, + 0, 1, 0, -1, -1, 0, 0, 1, -1, 0, -1, -2, -3, -2, -2, -1, + 7, 7, 6, 5, 4, 2, -1, -2, 3, 3, 2, 2, 1, 0, -2, -3, + 0, -1, -1, -1, 0, -1, -2, -2, -1, -3, -2, -1, 0, 0, 0, 1, + 0, -2, -2, -1, -1, 1, 2, 2, 3, 1, -1, -1, -1, 1, 2, 2, + 3, 1, -2, -3, -2, -1, 1, 2, 1, -2, -5, -6, -5, -3, -2, 0, + 0, -1, -2, -3, -1, 0, -2, -2, 0, 0, -1, -1, 0, 1, -1, -2, + 0, 0, -2, -1, 0, 0, 0, -2, -1, -2, -3, -3, -2, -1, -3, -3, + -1, -2, -3, -3, -2, -2, -3, -4, 2, 2, 0, 0, 0, 0, -1, -2, + 5, 5, 3, 2, 2, 2, 0, -1, 8, 8, 6, 5, 4, 4, 2, 1, + -7, -8, -6, -3, -1, -1, -2, -1, -5, -5, -3, 0, 2, 1, 0, 0, + -1, -1, 0, 3, 4, 3, 1, 1, 2, 1, 1, 3, 4, 3, 2, 2, + 3, 2, 0, 2, 3, 2, 1, 2, 4, 2, -1, -1, 0, 1, 1, 1, + 3, 2, -2, -3, -2, -1, 0, 1, 3, 1, -3, -4, -3, -2, 0, 1, + -4, -2, -1, 2, 3, 3, 1, 0, -7, -5, -4, -2, 0, 0, -1, -2, + -6, -5, -5, -4, -2, -2, -2, -3, -1, 0, -1, -1, 0, 0, 0, -1, + 2, 3, 2, 2, 2, 2, 1, 0, 3, 5, 4, 3, 1, 0, 1, 0, + 3, 4, 3, 2, 0, -1, -1, -1, 5, 5, 3, 1, 0, -1, -1, -1, + 1, 1, 0, -1, -3, -5, -6, -4, 1, 1, 0, 0, 0, -3, -3, -1, + 0, -1, -1, 0, 1, 0, 1, 3, -2, -2, -3, -1, 2, 2, 4, 7, + -2, -2, -2, 0, 2, 2, 3, 6, -1, 0, 0, 1, 1, 0, 0, 3, + 0, 3, 3, 3, 1, -2, -3, -1, 1, 3, 4, 3, 0, -3, -5, -4, + 0, 2, 0, -1, -3, -4, -2, -2, 1, 4, 2, 0, -2, -3, -2, -1, + 3, 6, 3, 1, -2, -2, 0, -1, 4, 7, 4, 1, -2, -3, -1, 0, + 3, 6, 3, 0, -3, -3, -1, 0, 1, 3, 0, -1, -3, -2, 1, 1, + 0, 1, -1, -2, -3, -1, 2, 2, -2, -1, -3, -3, -3, -1, 1, 2, + 3, 1, -1, 0, 1, 0, 0, 0, 2, -1, -2, -1, 1, 0, -1, -1, + 1, -1, -2, 0, 1, 0, -2, -3, 0, -2, -1, 1, 3, 1, -3, -5, + 0, -2, -1, 2, 5, 2, -3, -5, 0, -2, -1, 4, 6, 3, -2, -5, + 0, -2, 0, 4, 7, 4, -2, -4, 0, -2, 0, 4, 6, 4, -2, -4, + -2, -2, -3, -4, -3, -2, -1, 0, 1, 1, 0, -1, -1, -1, 0, 1, + 3, 3, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 0, 0, 1, + 0, 0, 0, 0, -1, -1, -1, -1, -4, -4, -4, -4, -4, -4, -4, -3, + -3, -3, -2, -3, -2, -1, -1, 0, 3, 4, 4, 5, 5, 6, 6, 7, + -1, -2, 7, -2, -4, -1, -1, 0, -1, -2, 9, -1, -4, -1, -1, 0, + -1, -3, 10, -1, -4, -1, -1, 1, -1, -3, 10, -2, -3, -1, -1, 2, + -1, -2, 10, -2, -4, -1, -1, 2, -1, -2, 9, -2, -4, -1, -1, 2, + -1, -2, 8, -2, -4, 0, -1, 1, 0, -2, 7, -2, -3, -1, 0, 2, + 3, -4, 1, 3, -3, -2, 1, 0, 3, -5, 1, 4, -3, -2, 1, 0, + 3, -6, 2, 5, -3, -1, 3, 0, 3, -6, 2, 5, -3, -1, 2, 0, + 3, -6, 1, 5, -4, -2, 3, 0, 3, -6, 1, 5, -3, -2, 2, 0, + 2, -6, 1, 4, -3, -1, 1, 0, 2, -6, 1, 4, -2, -1, 1, 0, + 0, 0, 1, 1, 1, 0, 0, 2, 0, -1, 1, 1, 1, 0, 0, 2, + 0, -1, 0, 0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 0, -1, 0, + 1, 0, 1, 0, 0, -1, -2, -1, 3, 1, 1, 0, 0, -2, -4, -3, + 5, 3, 2, 1, 0, -3, -5, -4, 5, 4, 2, 0, -1, -4, -5, -5, + 1, 0, -1, -2, -2, -3, -6, -9, 2, 0, -1, -1, 0, 0, -3, -6, + 1, 0, 0, -1, 0, 0, -2, -5, 2, 1, 1, 1, 1, 2, -1, -3, + 1, 1, 2, 1, 2, 2, 1, -1, 1, 1, 2, 1, 1, 1, 1, 1, + 0, 0, 2, 1, 0, 0, 2, 2, 0, 1, 2, 2, 0, 0, 2, 2, + -4, -3, 0, 1, 4, 6, 4, 3, -3, -2, 0, 0, 2, 4, 1, 0, + -1, -1, 0, 0, 1, 1, -2, -3, 1, 1, 1, 0, 1, 1, -3, -5, + 1, 1, 1, 0, 1, 1, -3, -5, -1, 0, 0, -1, 1, 1, -2, -4, + -1, 0, 0, -1, 1, 2, 0, -2, -1, 0, 0, 0, 2, 3, 1, 0, + -1, 0, 3, 4, 0, -4, -5, -5, 0, 0, 4, 5, 2, -2, -3, -2, + 0, -1, 2, 4, 2, -1, -1, 0, 0, -2, -1, 1, 0, -2, 0, 1, + 1, -2, -2, 0, 0, -1, -1, 1, 1, -2, -3, 0, 1, 0, -1, 0, + 1, -2, -2, 1, 3, 1, 0, 0, 1, -2, -1, 2, 4, 2, 0, 0, + 1, 2, 3, 2, 0, 2, 2, 1, -1, 0, 1, 0, -3, 1, 1, 1, + -1, 0, 0, -2, -4, 0, 2, 1, -1, 2, 2, -1, -5, 0, 2, 1, + -1, 3, 4, -1, -5, 0, 2, 1, -2, 2, 4, 0, -4, -1, 0, 0, + -4, 0, 2, 0, -4, -2, 0, 0, -5, -1, 2, 1, -2, 1, 3, 2, + 1, 0, 1, 0, 1, 2, -1, -2, 2, 0, -1, -2, 1, 3, 0, -1, + 3, 0, -2, -4, 0, 3, 1, 0, 5, 1, -3, -5, -2, 2, 1, 1, + 6, 1, -2, -5, -2, 1, 0, 1, 5, 1, -1, -5, -2, 0, -1, 0, + 3, 0, -2, -4, -2, 0, -1, 0, 1, -1, 0, -2, 0, 1, 0, 1, + 1, 1, 2, 3, 2, 1, 1, 2, -1, -1, 0, 1, 1, 0, 1, 1, + -4, -3, 0, 0, 1, 1, 1, 2, -4, -3, 0, 2, 2, 2, 3, 2, + -5, -4, 0, 1, 1, 1, 1, 2, -5, -4, -1, -1, -2, -2, -1, 0, + -3, -2, 0, 0, -2, -3, -2, -1, 2, 3, 4, 4, 2, 0, 0, 0, + -4, -2, 0, 1, 0, 0, 0, 0, -3, -1, 1, 1, 0, 0, 0, 0, + -2, 0, 2, 2, 0, 0, 0, 2, -1, 1, 2, 1, -1, 0, 3, 5, + 0, 2, 1, -1, -2, 0, 5, 6, 0, 1, 0, -3, -3, 0, 4, 6, + 1, 1, -2, -4, -4, -3, 1, 2, 1, 0, -2, -4, -5, -4, -2, 0, + -1, -3, -3, -3, -3, -2, -1, -1, 3, 2, 1, 0, 0, 1, 1, 1, + 5, 4, 3, 2, 1, 1, 2, 2, 2, 1, 0, -2, -2, -2, -1, -1, + 0, 0, 0, -1, -2, -2, -2, -2, 0, 1, 3, 3, 2, 1, -1, -1, + 0, 1, 3, 4, 3, 2, 1, -1, -4, -3, -1, 1, 0, -2, -3, -3, + -3, -4, -7, -8, -7, -4, -1, 2, 0, -1, -3, -4, -4, -2, 0, 2, + 1, 0, 0, -1, -3, -2, 0, 2, 2, 1, 1, 0, -1, -1, 0, 2, + 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 1, 2, 3, 3, 2, 2, 0, 0, 1, 3, 4, 4, 3, 2, + 3, 3, 3, 0, -1, 0, 1, 2, 1, 1, 1, -1, -2, -1, -1, 1, + -2, -2, -1, -3, -3, -2, -2, 0, -4, -4, -2, -2, -2, -2, -3, 0, + -4, -4, -1, 1, 1, 0, -1, 2, -3, -1, 2, 3, 4, 3, 3, 5, + -2, 0, 2, 3, 3, 3, 3, 3, -2, -2, 0, 0, 0, 0, 0, 1, + 0, 2, 1, -1, -3, -1, 3, -2, -1, 0, -1, -1, -3, 0, 4, -2, + -2, -2, -2, -2, -2, 1, 5, -2, -3, -2, -3, -1, -2, 1, 4, -3, + -2, 0, -1, 0, -1, 0, 3, -5, 1, 2, 1, 2, 0, 0, 2, -5, + 2, 4, 2, 3, 1, 1, 3, -3, 1, 2, 1, 1, 0, 1, 4, -2, + 4, -3, -4, -1, 3, 3, 1, 3, 4, -4, -4, -1, 3, 2, 0, 2, + 4, -3, -4, 0, 2, 2, -1, 1, 4, -3, -2, 1, 2, 1, -2, 0, + 2, -4, -2, 1, 2, 0, -3, 0, 2, -3, -2, 0, 1, 0, -2, 2, + 3, -1, -1, 0, 0, 0, 0, 3, 2, -2, -2, -2, -1, -1, -1, 2, + 2, 2, 3, 4, 3, 1, 0, -1, 1, 0, 1, 2, 1, -1, -2, -2, + 2, 1, 2, 1, 1, 0, -1, -1, 4, 3, 4, 3, 2, 1, 1, 1, + 3, 2, 2, 2, 1, 1, 1, 1, -1, -2, -1, 0, -1, -1, -1, -1, + -3, -3, -2, -1, -2, -2, -2, -2, -4, -4, -3, -3, -4, -4, -3, -3, + 2, 1, -1, -3, -4, -2, 3, 4, 2, 2, 1, -1, -3, -2, 1, 2, + 1, 2, 3, 3, 0, -2, -1, -2, -1, 0, 2, 4, 2, 0, -1, -3, + -2, -2, 0, 3, 3, 2, 0, -3, 0, -2, -3, -1, 1, 2, 2, -1, + 3, -1, -4, -5, -3, 0, 2, 0, 6, 3, -2, -6, -5, 0, 3, 1, + -2, 3, -2, 0, 3, -2, -2, 1, -3, 4, -3, 0, 3, -2, -1, 2, + -3, 5, -3, 0, 4, -2, -1, 2, -2, 4, -4, -1, 3, -3, -2, 2, + -3, 4, -3, 0, 3, -3, -1, 2, -2, 5, -2, 0, 3, -3, -1, 2, + -2, 4, -3, 1, 3, -2, -1, 2, -2, 3, -2, 1, 3, -2, 0, 2, + 1, 0, 0, -1, 1, 2, -4, -1, 2, 0, 0, -1, 1, 2, -4, -2, + 1, 1, 1, -1, 2, 4, -2, 0, 0, -1, 1, -1, 2, 5, -1, 1, + 0, -1, 0, -2, 1, 5, -1, 1, 0, -1, -1, -2, 0, 3, -3, -1, + 1, 1, 0, -2, 0, 3, -3, -1, 1, 1, 0, -3, 0, 3, -2, 0, + 1, 0, -1, 1, 1, 2, 4, 5, 1, 0, -1, 1, 1, 1, 5, 7, + 0, 0, -2, -1, -1, 0, 3, 5, 0, -1, -2, -1, -1, -1, 2, 3, + 0, -1, -3, -1, -1, -1, 1, 2, -1, -2, -4, -2, -2, -2, 0, 0, + -1, -2, -2, -1, -2, -2, 0, 0, 0, -1, -1, 0, -1, -1, 0, 0, + 3, 3, 0, -1, -1, 1, 4, 4, 2, 3, 0, -2, -2, 0, 1, 1, + 2, 3, 1, -1, -1, 0, 1, 0, 1, 2, 0, -1, -1, -1, 0, -2, + 0, 1, 0, -1, -2, -1, 0, -2, 0, 1, 0, -1, -2, -1, 1, 0, + 1, 1, -1, -3, -4, -3, 1, 3, 1, 2, -1, -3, -5, -4, 1, 3, + -3, -2, 0, 1, 1, 1, 0, -2, 0, 1, 1, 1, 0, 0, -1, -3, + 1, 2, 1, 1, 0, -1, -1, -2, 0, -1, -3, -1, -1, -1, 0, -1, + 0, -3, -6, -3, -2, -1, 1, 1, 2, -1, -4, -3, -2, 0, 2, 2, + 5, 4, 1, 1, 0, 1, 3, 2, 5, 4, 2, 1, 0, -1, 0, 1, + -2, 0, -2, -5, -6, -3, 0, 0, -2, 0, 1, 0, -1, 1, 2, 2, + -2, 0, 1, 3, 2, 2, 2, 1, -2, 0, 2, 4, 3, 2, 1, 1, + -2, 0, 2, 3, 2, 0, -1, 0, -3, -1, 1, 1, 0, -1, -1, 1, + -4, -1, 1, 0, -1, -2, 0, 2, -4, -1, 0, -1, -1, -2, 1, 4, + -3, 0, 0, -1, 1, 1, 1, 0, -3, 1, 0, -1, 0, 0, -1, -1, + -1, 3, 3, 0, 1, 0, 0, 1, -3, 2, 2, -2, -1, 0, 0, 1, + -5, 0, 0, -2, -1, 1, 0, 2, -7, -2, 1, 0, 1, 2, 2, 2, + -5, 0, 3, 2, 3, 3, 2, 2, -3, 2, 4, 1, 0, 0, -2, -3, + 5, 2, -2, -2, 0, -1, -1, -1, 2, -1, -4, -3, -1, -2, -1, -1, + 0, -2, -2, 1, 2, -1, 0, 1, -1, -2, -1, 3, 3, -1, 0, 2, + 1, 0, 0, 3, 3, -2, -1, 2, 2, 1, 1, 3, 2, -2, -2, 0, + 1, 0, -1, 1, 1, -3, -3, -2, 1, 0, 1, 2, 3, 0, 0, 0, + -4, -5, -3, 0, 1, -1, -2, -1, -2, -3, -1, 1, 2, 0, 0, 0, + 1, 1, 2, 1, 2, 1, 1, 1, 3, 4, 3, 1, 0, -2, -1, -1, + 3, 3, 2, 0, -2, -3, -3, -2, 1, 1, 0, -1, -2, -4, -2, -2, + 2, 1, 0, 0, 0, -1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 3, + 0, 0, 0, -1, -2, -1, 1, 0, -2, -1, -1, -2, -3, -2, 0, 0, + -1, 0, 0, -1, -2, 0, 1, 1, 1, 1, 0, -1, -1, 1, 3, 1, + 2, 2, 0, -2, -1, 2, 3, 0, 3, 1, -1, -1, 1, 4, 2, -2, + 2, 0, -3, -1, 3, 5, 0, -5, 1, -1, -2, 0, 3, 3, -1, -6, + -1, 0, 3, 4, 2, 0, 1, 2, -2, -1, 0, 1, -1, -2, 0, 1, + -2, -3, -2, -3, -6, -7, -6, -3, 2, 2, 3, 1, -1, -2, -3, -2, + 2, 2, 3, 1, 0, 0, 0, 0, 2, 1, 1, 0, 1, 1, 0, 1, + 1, 0, 0, 0, 0, 1, 1, 2, 1, 0, -1, 0, 0, 2, 2, 1, + 1, 1, 3, 1, -1, -1, -1, 1, -2, -1, 0, 0, -2, -2, -1, 2, + -2, -2, 1, 1, 1, 0, 1, 3, -2, -2, 0, -1, 0, -1, 0, 2, + 0, 0, 1, 0, -1, -1, -2, 1, 3, 2, 2, 1, 0, -2, -2, 1, + 5, 3, 3, 2, 1, 1, 1, 4, 0, -3, -4, -5, -4, -3, -1, 1, + -6, -4, -1, 2, 2, 0, 0, -1, -4, -2, 1, 3, 3, 2, 2, 0, + -3, -2, -1, 2, 3, 3, 2, 0, -3, -2, -2, 1, 2, 1, 1, -1, + -2, -2, -2, 0, 2, 2, 1, -1, -1, -1, -1, 1, 2, 3, 2, 0, + -1, -1, -2, 1, 2, 2, 2, -1, 0, -1, -2, 0, 2, 1, 0, -1, + 6, 4, 2, 1, 0, 0, 0, 1, 4, 2, -1, -2, -2, -2, -1, -1, + 2, 1, -1, -2, -2, -2, -2, -1, 2, 2, 0, -2, -2, -2, -1, 0, + 0, 0, -1, -2, -2, -1, 0, 1, -3, -3, -2, -1, -1, -2, -1, 0, + -3, -2, 2, 3, 2, 0, -1, -2, -2, 0, 4, 5, 5, 2, 0, -1, + 5, 4, 2, 0, -1, -2, -1, -1, 4, 3, 2, 1, 0, -1, 0, -1, + 1, 1, 0, 1, 1, 0, 1, -1, -2, -1, -1, 0, 0, -2, -2, -3, + -1, 0, 0, 0, -1, -3, -3, -5, 0, 1, 1, -1, -1, -2, -2, -3, + -1, -1, -1, -2, -1, 1, 3, 1, -1, -2, -2, -1, 2, 5, 6, 5, + -3, -3, -2, 1, 1, -2, -1, -1, 1, 2, 3, 4, 1, -3, -1, -3, + 3, 2, 0, 1, -1, -3, -1, -3, 1, 0, -1, 0, -1, -1, 1, 0, + 1, 1, 0, 1, 2, 2, 5, 3, 1, 1, 1, 2, 2, 2, 3, 0, + -3, -1, -2, -2, -3, -3, -1, -3, -1, 1, 1, 0, -1, -1, 0, -2, + 2, 0, -2, -2, 2, 4, 1, -2, 1, 0, -2, -1, 3, 5, 2, -1, + -1, -2, -3, -2, 1, 3, 1, -2, -1, -2, -1, -1, 0, 2, 1, -1, + 0, 0, 1, 1, 1, 2, 2, 0, 0, 1, 4, 4, 2, 2, 3, 1, + -2, -1, 2, 1, -2, -3, -2, -3, -1, 0, 1, 0, -3, -4, -4, -5, + 4, 0, -3, -4, -4, -4, -2, -1, 5, 0, -1, 0, -1, -3, -2, -1, + 4, 0, 0, 1, 1, 0, 0, 0, 0, -3, -2, -1, 0, 0, 1, 0, + 0, -2, 0, 0, 1, 1, 2, 1, 2, 0, 0, 0, 1, 1, 1, 0, + 2, 0, -1, -1, 1, 1, 1, 0, 1, -1, -2, -2, 0, 2, 2, 2, + -3, -5, -2, 0, -1, -3, -3, 0, 0, -2, 0, 2, 2, 0, 0, 3, + 2, -1, -2, 0, 0, -1, -1, 2, 5, 2, -1, -1, -1, -1, -1, 2, + 5, 2, 0, -1, -1, 0, -1, 2, 2, 1, 0, 0, 0, 1, 0, 2, + -1, -1, 1, 1, 2, 2, 1, 2, -3, -2, 0, 0, 0, 0, -2, -1, + 0, 3, 2, 0, -2, -3, -3, -3, 0, 3, 3, 1, 0, 0, 1, 2, + -1, 0, -1, -2, -1, -1, 1, 3, -1, 0, -1, -2, -1, -1, 0, 2, + -1, 0, -1, -2, 0, 0, -1, 2, -1, 0, -1, -2, -1, -1, -2, 1, + 0, 1, 0, -3, -1, -1, -1, 2, 5, 5, 2, -1, -1, -1, 1, 3, + 0, 0, 1, -1, -3, -2, 0, 2, 1, 1, 3, 0, -2, -2, 0, 1, + 1, 1, 3, 1, 0, 0, -1, -1, 0, -1, 2, 1, 1, 0, -1, -3, + -1, -2, 1, 1, 1, 0, -2, -4, -1, 0, 2, 1, 1, 0, -1, -3, + 1, 1, 3, 2, 1, 0, -2, -3, 2, 2, 4, 2, 1, -1, -2, -4, + 1, 2, 2, 2, 0, -2, 0, 2, -1, -1, -2, -3, -4, -5, -3, 1, + 0, 1, 1, 0, -1, -1, -1, 1, 0, 1, 1, 1, 0, 0, 0, 2, + 0, 1, 1, 2, 1, 1, 1, 2, -1, -1, 0, 2, 2, 2, 2, 3, + -2, -4, -4, -1, -2, -2, -2, 0, 1, 0, 0, 1, 0, 0, 0, 1, + 0, -1, -3, -2, 0, 2, 2, 1, 0, -1, -2, -3, 0, 1, 1, 2, + 1, 0, -2, -3, -1, 0, 0, 1, -1, 0, -1, -2, 0, 0, -1, 0, + -1, 1, 1, 0, 2, 2, 0, 0, 0, 2, 3, 1, 3, 5, 3, 2, + -1, 1, 1, -2, 0, 3, 1, 1, -1, 0, 0, -4, -4, -1, -1, -1, + -1, 1, 1, 0, 1, 2, 1, 2, -3, 0, 1, 0, 1, 1, 0, 2, + -5, -3, -1, -1, 0, 1, 0, 1, -4, -3, -2, -3, -2, -1, -1, 0, + 0, 0, -1, -2, -2, -2, -2, 0, 3, 4, 2, 0, 0, 0, 0, 1, + 2, 1, 0, 0, 0, 0, -1, 0, 0, 1, 2, 3, 4, 4, 3, 2, + -1, 4, 7, 4, 0, 0, 0, 0, -1, 4, 6, 3, 0, 1, 1, 1, + 0, 3, 4, 0, -1, 0, 0, 1, 0, 1, 1, -2, -1, 0, -1, -1, + -1, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0, + -1, -3, -3, 0, 1, -1, -2, -1, -3, -4, -4, -2, -1, -2, -2, -1, + 2, 2, 1, 0, 1, 1, 0, -3, -2, -1, 0, 0, 1, 1, 0, -3, + -2, -1, 0, 1, 2, 1, 1, -2, 1, 2, 2, 2, 3, 3, 2, -1, + 1, 2, 1, 0, 1, 1, 2, -1, 0, 1, -2, -4, -2, 0, 1, -1, + 1, 1, -1, -3, -2, 0, -1, -3, 1, 2, 0, -1, 0, 1, -1, -4, + -1, -1, -2, -2, 0, 3, 4, 3, 1, 1, -1, -3, -2, 0, 0, 0, + 2, 2, 2, 2, 2, 1, -1, -1, 1, 1, 1, 3, 3, 0, -2, -2, + 0, -1, -1, -1, 0, -2, -1, -1, -1, -3, -4, -3, -2, -2, 0, 2, + -1, -1, 0, 1, 2, 2, 3, 5, -2, -1, -1, 0, 0, 0, 0, 1, + -2, -3, 2, 0, 0, 1, 1, -1, -1, -4, 1, -2, -1, 2, 2, 0, + 1, -4, 0, -2, -2, 1, 1, -1, 2, -3, 1, -1, -1, 1, 1, -1, + 3, -2, 3, 1, 0, 1, 1, -1, 1, -3, 2, 1, 0, 1, 0, -1, + -1, -5, 1, 0, -1, 0, 1, 1, 0, -3, 3, 3, 1, 2, 3, 3, + 0, -1, -2, 1, 5, 5, 2, -1, 1, -1, -2, -1, 1, 1, -2, -5, + 1, 1, -1, -2, -1, -1, -1, -3, 1, 1, -1, -1, -1, 2, 4, 3, + -1, -1, -1, -1, -1, 0, 4, 3, -1, -1, 0, 1, -1, -3, -1, -1, + 0, 0, 0, 2, 2, 0, 0, -1, 0, -2, -3, 0, 1, 1, 3, 2, + 2, 3, 2, 1, 0, 0, -2, -2, 2, 3, 0, 1, 1, 3, 3, 2, + 0, 0, -3, -1, -1, 2, 2, 3, -2, -2, -3, 1, 1, 2, 1, 1, + -2, -1, -2, 2, 1, 1, -1, -2, 0, 1, 0, 2, 0, 0, -2, -2, + 0, 1, 0, 2, 0, 0, -2, -2, -3, -2, -2, 0, -1, -2, -2, -3, + 0, 1, -1, 3, -1, 1, 3, -1, 0, 1, -1, 3, -1, -1, 2, -3, + 1, 1, -2, 3, -1, -3, 0, -3, 2, 2, -2, 3, 0, -2, 1, -2, + 1, 1, -3, 3, -1, -2, 1, -3, 1, 1, -3, 3, 0, -1, 1, -2, + 1, 2, -1, 4, 0, -1, 1, -2, 0, 1, -1, 3, -1, -3, 0, -3, + -3, -3, -1, 1, 2, 1, -1, -2, -2, -2, 0, 2, 1, 0, -2, -2, + -3, -2, 1, 2, 1, -1, -2, -1, -3, -2, 2, 4, 0, -2, -2, 1, + -3, -1, 2, 4, 0, -2, -2, 2, -1, 1, 4, 3, -1, -3, -2, 2, + 0, 2, 4, 2, -1, -2, -1, 2, 0, 1, 2, 0, -1, 0, 1, 3, + 3, 0, -5, 1, 4, 0, 0, 1, 1, -2, -5, 2, 5, -1, -2, 1, + -1, 0, 0, 3, 3, 1, 0, -1, -2, 3, 4, -2, -3, -1, 0, -2, + -3, 3, 5, -3, -3, 0, 0, -2, -1, 3, 2, -2, -2, 2, 2, -1, + 2, 0, 0, -1, 0, 0, 0, 0, 0, -3, -2, 1, 3, 0, -2, -2 }; -const uint32 *const s_svq1InterCodebooks[6] = { +static const int8 *const s_svq1InterCodebooks[6] = { s_svq1InterCodebook4x2, s_svq1InterCodebook4x4, s_svq1InterCodebook8x4, s_svq1InterCodebook8x8, 0, 0 }; -static const uint32 s_svq1IntraCodebook4x2[192] = { - 0x0b0d0d0c, 0xeff1f6f9, 0xf6f4f1f0, 0x0c0f0f0b, - 0x0f141102, 0x0d02e8d3, 0xdcfa1415, 0xe5ff100c, - 0x2d0aebee, 0x15f9ecf5, 0x00e4f82b, 0x03e4f021, - 0xfaeeeef4, 0x371cf6ec, 0xeeebeefb, 0xecfa1e38, - 0xea1d1bde, 0xe71a1de2, 0x1a21221e, 0xdfdde1e7, - 0xe0dcdde1, 0x1f25241d, 0x2226f4b9, 0x212affc1, - 0xc4e1253a, 0xc3df2237, 0x5d16c7c7, 0x5d15c6c7, - 0x3e46453b, 0xc4bcbcc1, 0xc0b9b9c0, 0x3e48493f, - 0x0f0700fe, 0x05fdf6f5, 0xf6f6f8fb, 0x090e0901, - 0xf5fc080f, 0xf4f5020c, 0x1c1300f8, 0xe6f1ff04, - 0xf2021bf1, 0xf70116f2, 0xf6f3fafc, 0x2f06f2fa, - 0x1706ecdd, 0x04060906, 0xea1702fa, 0xeb1c04f9, - 0x06feea14, 0x08fbe416, 0xf4f0eef6, 0xff021324, - 0x080400fd, 0x1717f6d3, 0xddec0f28, 0x0104fffc, - 0x18dffb09, 0x13e60308, 0xfd0604ff, 0xcff31920, - 0x070f1818, 0xf9ede5ef, 0x182700d1, 0x0407faeb, - 0xf3f600ff, 0x10050101, 0xf7fd0514, 0xfafefcff, - 0x0401f9ef, 0x0000070c, 0x0b0c0003, 0xe90001fd, - 0x00fa1104, 0x00e70306, 0x05080aef, 0x040104f2, - 0x02040a0d, 0x0201f7e9, 0x0701fd03, 0x14f9e901, - 0x0c02eef9, 0x090afcfb, 0xe8070a04, 0xf6040306, - 0x06eaf216, 0xff050500, 0xfcf503fc, 0xf2071ff9, - 0x2afff0fb, 0xfbf7fefc, 0xfdfaf805, 0xfbebfc2a, - 0xf4140cee, 0x07f6f30d, 0xeefef7f8, 0x082806f0, - 0x0400ff0a, 0xf3ff04fd, 0xf10106fe, 0x02010305, - 0x0301fefc, 0xfcf7000f, 0xfcfcfcfd, 0xfd1005fd, - 0x04030d02, 0x00f6f8fd, 0xfffcfefa, 0x17fafdfe, - 0x0107fa06, 0x0105ee04, 0x0ef101ff, 0x04fc06fb, - 0x06020202, 0x030702e8, 0x030300e6, 0x06010705, - 0xfdeefe0e, 0x02fc0507, 0x012003fa, 0xf4fafafa, - 0x0607dc05, 0x000bff09, 0x03050404, 0xda030f04, - 0xd6fb170a, 0x04040400, 0xf3fa1117, 0x1d01dbf3, - 0x01fff205, 0x01030005, 0x02fb0400, 0xf6000008, - 0xfdfe0704, 0x010103f6, 0x030dfff4, 0xfd01ff00, - 0x0103ff00, 0x0903f7fa, 0xfafc01fa, 0x0800ff08, - 0x1200fdfd, 0xfffcfffb, 0xfc03fef8, 0xfbff1100, - 0xf609fe05, 0xfb06fb01, 0x03020204, 0x01f8f20a, - 0xffeefeff, 0x020114ff, 0x01f701ff, 0xfc16f7ff, - 0xfd08fc06, 0x05ed07ff, 0xfcfc1ff9, 0xfbfb00fa, - 0xfcedf8f9, 0x20040101, 0x04f8ff26, 0xf4faf8f9, - 0x01f900ff, 0x00ff09ff, 0x00ffff09, 0xfd01fa02, - 0x010200f4, 0x00080101, 0x02000109, 0x00f501fe, - 0xf6020800, 0x00ff02ff, 0xfb00fcfe, 0x0efffffe, - 0x05ff07fd, 0x0101f600, 0xff0efbff, 0xfefd01fe, - 0x060000fa, 0x04f70302, 0xfffffb04, 0xff0803f9, - 0xf5fffc02, 0x0001020b, 0x090302ff, 0xf1000200, - 0x03ec0503, 0x0303ff03, 0x0110ff01, 0x0209e302, - 0xfdfffaf3, 0xfdf8ff24, 0x02040502, 0x030b09db +static const int8 s_svq1IntraCodebook4x2[768] = { + 12, 13, 13, 11, -7,-10,-15,-17,-16,-15,-12,-10, 11, 15, 15, 12, + 2, 17, 20, 15,-45,-24, 2, 13, 21, 20, -6,-36, 12, 16, -1,-27, + -18,-21, 10, 45,-11,-20, -7, 21, 43, -8,-28, 0, 33,-16,-28, 3, + -12,-18,-18, -6,-20,-10, 28, 55, -5,-18,-21,-18, 56, 30, -6,-20, + -34, 27, 29,-22,-30, 29, 26,-25, 30, 34, 33, 26,-25,-31,-35,-33, + -31,-35,-36,-32, 29, 36, 37, 31,-71,-12, 38, 34,-63, -1, 42, 33, + 58, 37,-31,-60, 55, 34,-33,-61,-57,-57, 22, 93,-57,-58, 21, 93, + 59, 69, 70, 62,-63,-68,-68,-60,-64,-71,-71,-64, 63, 73, 72, 62, + -2, 0, 7, 15,-11,-10, -3, 5, -5, -8,-10,-10, 1, 9, 14, 9, + 15, 8, -4,-11, 12, 2,-11,-12, -8, 0, 19, 28, 4, -1,-15,-26, + -15, 27, 2,-14,-14, 22, 1, -9, -4, -6,-13,-10, -6,-14, 6, 47, + -35,-20, 6, 23, 6, 9, 6, 4, -6, 2, 23,-22, -7, 4, 28,-21, + 20,-22, -2, 6, 22,-28, -5, 8,-10,-18,-16,-12, 36, 19, 2, -1, + -3, 0, 4, 8,-45,-10, 23, 23, 40, 15,-20,-35, -4, -1, 4, 1, + 9, -5,-33, 24, 8, 3,-26, 19, -1, 4, 6, -3, 32, 25,-13,-49, + 24, 24, 15, 7,-17,-27,-19, -7,-47, 0, 39, 24,-21, -6, 7, 4, + -1, 0,-10,-13, 1, 1, 5, 16, 20, 5, -3, -9, -1, -4, -2, -6, + -17, -7, 1, 4, 12, 7, 0, 0, 3, 0, 12, 11, -3, 1, 0,-23, + 4, 17, -6, 0, 6, 3,-25, 0,-17, 10, 8, 5,-14, 4, 1, 4, + 13, 10, 4, 2,-23, -9, 1, 2, 3, -3, 1, 7, 1,-23, -7, 20, + -7,-18, 2, 12, -5, -4, 10, 9, 4, 10, 7,-24, 6, 3, 4,-10, + 22,-14,-22, 6, 0, 5, 5, -1, -4, 3,-11, -4, -7, 31, 7,-14, + -5,-16, -1, 42, -4, -2, -9, -5, 5, -8, -6, -3, 42, -4,-21, -5, + -18, 12, 20,-12, 13,-13,-10, 7, -8, -9, -2,-18,-16, 6, 40, 8, + 10, -1, 0, 4, -3, 4, -1,-13, -2, 6, 1,-15, 5, 3, 1, 2, + -4, -2, 1, 3, 15, 0, -9, -4, -3, -4, -4, -4, -3, 5, 16, -3, + 2, 13, 3, 4, -3, -8,-10, 0, -6, -2, -4, -1, -2, -3, -6, 23, + 6, -6, 7, 1, 4,-18, 5, 1, -1, 1,-15, 14, -5, 6, -4, 4, + 2, 2, 2, 6,-24, 2, 7, 3,-26, 0, 3, 3, 5, 7, 1, 6, + 14, -2,-18, -3, 7, 5, -4, 2, -6, 3, 32, 1, -6, -6, -6,-12, + 5,-36, 7, 6, 9, -1, 11, 0, 4, 4, 5, 3, 4, 15, 3,-38, + 10, 23, -5,-42, 0, 4, 4, 4, 23, 17, -6,-13,-13,-37, 1, 29, + 5,-14, -1, 1, 5, 0, 3, 1, 0, 4, -5, 2, 8, 0, 0,-10, + 4, 7, -2, -3,-10, 3, 1, 1,-12, -1, 13, 3, 0, -1, 1, -3, + 0, -1, 3, 1, -6, -9, 3, 9, -6, 1, -4, -6, 8, -1, 0, 8, + -3, -3, 0, 18, -5, -1, -4, -1, -8, -2, 3, -4, 0, 17, -1, -5, + 5, -2, 9,-10, 1, -5, 6, -5, 4, 2, 2, 3, 10,-14, -8, 1, + -1, -2,-18, -1, -1, 20, 1, 2, -1, 1, -9, 1, -1, -9, 22, -4, + 6, -4, 8, -3, -1, 7,-19, 5, -7, 31, -4, -4, -6, 0, -5, -5, + -7, -8,-19, -4, 1, 1, 4, 32, 38, -1, -8, 4, -7, -8, -6,-12, + -1, 0, -7, 1, -1, 9, -1, 0, 9, -1, -1, 0, 2, -6, 1, -3, + -12, 0, 2, 1, 1, 1, 8, 0, 9, 1, 0, 2, -2, 1,-11, 0, + 0, 8, 2,-10, -1, 2, -1, 0, -2, -4, 0, -5, -2, -1, -1, 14, + -3, 7, -1, 5, 0,-10, 1, 1, -1, -5, 14, -1, -2, 1, -3, -2, + -6, 0, 0, 6, 2, 3, -9, 4, 4, -5, -1, -1, -7, 3, 8, -1, + 2, -4, -1,-11, 11, 2, 1, 0, -1, 2, 3, 9, 0, 2, 0,-15, + 3, 5,-20, 3, 3, -1, 3, 3, 1, -1, 16, 1, 2,-29, 9, 2, + -13, -6, -1, -3, 36, -1, -8, -3, 2, 5, 4, 2,-37, 9, 11, 3 }; -static const uint32 s_svq1IntraCodebook4x4[384] = { - 0x0603fdf5, 0x0705fff6, 0x0706fff7, 0x0604fff7, - 0xf2000705, 0xf1020906, 0xf1020906, 0xf2000604, - 0xfafb0310, 0xf8f80110, 0xf7f7ff0e, 0xf8f8000c, - 0x11100c08, 0x090602fe, 0x00fcf8f6, 0xf9f5f2f1, - 0x10fef6f9, 0x12fdf5f9, 0x14fff5f9, 0x1301f8fa, - 0xeff0f3f7, 0xf7f9fe02, 0xff04080b, 0x070b0f10, - 0x0f0dfeea, 0x100efee8, 0x0f0dfce7, 0x0d0afae7, - 0x10161a1a, 0x03090f11, 0xf2f5fafe, 0xe4e4e7ec, - 0xebe7e5e5, 0xf9f5f1f0, 0x0d0c0803, 0x1e1f1c17, - 0xdff91014, 0xddfa1316, 0xdefa1316, 0xe0fa1114, - 0x2602ecec, 0x2802eaeb, 0x2802eaeb, 0x2603ecec, - 0x1a18fcd1, 0x1b1afdce, 0x1b1afdce, 0x1a18fcd1, - 0xe5e9062d, 0xe4e70530, 0xe4e60530, 0xe5e8062c, - 0x4cf6dce2, 0x4ef5dbe1, 0x4ef5dbe1, 0x4df6dce1, - 0x3423e0cb, 0x3424deca, 0x3424deca, 0x3322dfcb, - 0x413edea3, 0x423edea3, 0x413edea3, 0x403cdea3, - 0x020200f9, 0x0303fff8, 0x050400f8, 0x050501fa, - 0x0b0b0703, 0x03030202, 0xf9fafe01, 0xf3f5fb01, - 0xfdfcfe03, 0xfbfb0007, 0xf9fb040c, 0xf9fc060e, - 0xfe030e12, 0xfd000406, 0x00fefbf8, 0x02fef5f0, - 0x1207faf8, 0x0d02f8f9, 0x06fefafc, 0x01fdfc00, - 0xeef3fd01, 0xf9fbff00, 0x070601ff, 0x110f04fe, - 0xfef9f2f1, 0x00fffbfa, 0x01030606, 0x01060d0f, - 0x0af5fe02, 0x0bf4ff02, 0x0bf4ff03, 0x0bf5fe02, - 0xfbff0ef7, 0xfbfe0ff7, 0xfbfe10f8, 0xfcff0ff9, - 0x08080602, 0x0c0903fe, 0x0a04fbf5, 0x00f8f0ed, - 0xf1f9080e, 0xf2f9070c, 0xf7fc0508, 0xfcff0305, - 0x02fef20c, 0x03fff10d, 0x03fff10e, 0x03fff20d, - 0xf30a0600, 0xf10a0600, 0xef090700, 0xf0080601, - 0xfe0ffbf8, 0xfe11faf8, 0xfd10faf8, 0xfe0ffbf8, - 0xf6f5f5f7, 0x08090a09, 0x090a0a08, 0xf9f8f7f8, - 0x07090a09, 0xf6f6f6f8, 0xf5f5f6f9, 0x080b0c0b, - 0x00070a00, 0xfa000700, 0xfafb0200, 0xfffcfffe, - 0xf7fa0005, 0x01020202, 0x070500fe, 0x0401fbfa, - 0xff02f803, 0x0003f704, 0x0003f905, 0x0003fb07, - 0x0902fdfb, 0x0801fdfa, 0x0701fdfa, 0x0400fefb, - 0x0103080d, 0xfffcfbfd, 0x00fdf9f8, 0x020301ff, - 0xf4fb0203, 0xf7fe0304, 0xfc010403, 0xff040503, - 0x00fcf8f7, 0x00020608, 0x0003080a, 0xfffdfbfa, - 0xfbf4f7fd, 0x00fbfd00, 0x04020302, 0x06070805, - 0x0c05feff, 0x0905ffff, 0xfeff0102, 0xeff5ff02, - 0xff0303f9, 0xff0403f7, 0xff0604f6, 0x000705f7, - 0x0202f9ee, 0x030501f8, 0x00010403, 0xfdfe0509, - 0x080600fe, 0xfdfbfbfc, 0xf8fafe01, 0xff03090a, - 0x00fefe00, 0x00fbfc00, 0x08fcf8fe, 0x1806f9fb, - 0x01f90109, 0x01f80109, 0x01f60008, 0xfff5ff08, - 0x03060808, 0x02030405, 0x00fffdfe, 0xfcf8f3f6, - 0xfd020400, 0xfb030600, 0xf4020a03, 0xeafc0a05, - 0x03fffc00, 0x05fffc01, 0x0800fb01, 0x07fefaff, - 0xfcfeffff, 0xfafcfeff, 0xfeffffff, 0x090a0501, - 0xfe00030a, 0xfbfeff06, 0xfafeff03, 0xfb000002, - 0x00000306, 0x01010306, 0x01fefe04, 0xfef7f700, - 0x0201fdf5, 0x050402fa, 0x040302fd, 0x020101fe, - 0xfefffcfa, 0xfeffff02, 0xfefe020a, 0xfffc020b, - 0x02fe0006, 0x00000303, 0x000303fa, 0x0005ffef, - 0x0b0a04ff, 0x0100fefd, 0xfdfbfcfd, 0xfffefeff, - 0xf4f7fd02, 0x02030303, 0x04040202, 0xfeff0102, - 0xf60509fe, 0xfb0505fd, 0x000201fe, 0x01fefeff, - 0xfe07fdfe, 0xfd07fdff, 0xfc08feff, 0xfd07fefe, - 0x0cfdf801, 0x04fefe02, 0xfb000301, 0xf90205ff, - 0xfb0103ff, 0x0103fef9, 0x02fef9fe, 0xfffb0314, - 0xfefd0005, 0x0600f9f9, 0x060700fa, 0xf9000602, - 0x01f906fe, 0x03f807fe, 0x03f907fe, 0x02fa07ff, - 0x0705fefb, 0xf8fc0104, 0xfbfe0306, 0x0703fbf9, - 0x0506ffff, 0xfc01ff00, 0xf9000102, 0xfc000001, - 0x010300f8, 0xffff01fe, 0x01fdff01, 0x0901fe01, - 0xfcfd0205, 0xfdff00ff, 0x010301fd, 0x020400fc, - 0x0cfefe02, 0x03fbfe00, 0x01fd00ff, 0x01fefffd, - 0x00030501, 0x01fefcfa, 0x02fefe00, 0xfffc0106, - 0xfffbfbfd, 0x04050503, 0xff010300, 0xfdfe01fe, - 0xfdfbfc02, 0xfefdfe04, 0xffff0006, 0x00000107, - 0x00fefefd, 0xfffbfdfe, 0xff0002fe, 0xff090bff, - 0xf6ff0100, 0xfa0001ff, 0x04010001, 0x0dfffb02, - 0x000504fe, 0x030601fb, 0x0203fefa, 0xfe00fefb, - 0xfe0101ff, 0x0200feff, 0x07050505, 0xf9f8fc00, - 0xfbff0200, 0xfd0202ff, 0xfb030500, 0xf4020803, - 0xfe000408, 0xfffcff0a, 0x00fdfa03, 0x0000fbfc, - 0x02fcf600, 0x0503faff, 0x0406fdff, 0x0204fe00, - 0xff010800, 0xfd010b00, 0xfcfe06ff, 0xfcf9fefd, - 0xffffff00, 0x05060504, 0xfbf8f7fb, 0x02030202, - 0x01060200, 0x00030002, 0xfefffe01, 0xfafdff00, - 0x00020000, 0x01020004, 0x0000fe05, 0x02fff7fe, - 0xf6000100, 0x000801ff, 0x0004feff, 0xff02ff01, - 0xff02fefd, 0xfd02fffd, 0x0001ff00, 0x03ff0108, - 0x02010100, 0x00fefc00, 0xff01fbff, 0x020bfffe, - 0xfefe0501, 0x00fc0200, 0x01fb01fe, 0x01000500, - 0x0600fdfb, 0x000002fc, 0x000105fd, 0x000003fd, - 0x01fdfe03, 0x0800fc01, 0x03fefdfe, 0xffff0201, - 0x02000101, 0x06010002, 0x0102ff01, 0xed000300, - 0x02fefd01, 0xf9fe0506, 0x010301fd, 0x0200ffff, - 0xfcfffff8, 0x02ff0101, 0x03020304, 0x000301fb, - 0x01ff0200, 0x050000fd, 0x0800fefb, 0x06fcfcfc, - 0x02010201, 0x02fd0202, 0x00f70004, 0x01f50007, - 0xfe000000, 0xfaff0303, 0xf6fd0304, 0x020602ff, - 0x05fdfe07, 0xff0300fc, 0xf90102fc, 0x03ffff02, - 0x02020203, 0xfbf9f9fb, 0x02040605, 0x0100fffe +static const int8 s_svq1IntraCodebook4x4[1536] = { + -11, -3, 3, 6,-10, -1, 5, 7, -9, -1, 6, 7, -9, -1, 4, 6, + 5, 7, 0,-14, 6, 9, 2,-15, 6, 9, 2,-15, 4, 6, 0,-14, + 16, 3, -5, -6, 16, 1, -8, -8, 14, -1, -9, -9, 12, 0, -8, -8, + 8, 12, 16, 17, -2, 2, 6, 9,-10, -8, -4, 0,-15,-14,-11, -7, + -7,-10, -2, 16, -7,-11, -3, 18, -7,-11, -1, 20, -6, -8, 1, 19, + -9,-13,-16,-17, 2, -2, -7, -9, 11, 8, 4, -1, 16, 15, 11, 7, + -22, -2, 13, 15,-24, -2, 14, 16,-25, -4, 13, 15,-25, -6, 10, 13, + 26, 26, 22, 16, 17, 15, 9, 3, -2, -6,-11,-14,-20,-25,-28,-28, + -27,-27,-25,-21,-16,-15,-11, -7, 3, 8, 12, 13, 23, 28, 31, 30, + 20, 16, -7,-33, 22, 19, -6,-35, 22, 19, -6,-34, 20, 17, -6,-32, + -20,-20, 2, 38,-21,-22, 2, 40,-21,-22, 2, 40,-20,-20, 3, 38, + -47, -4, 24, 26,-50, -3, 26, 27,-50, -3, 26, 27,-47, -4, 24, 26, + 45, 6,-23,-27, 48, 5,-25,-28, 48, 5,-26,-28, 44, 6,-24,-27, + -30,-36,-10, 76,-31,-37,-11, 78,-31,-37,-11, 78,-31,-36,-10, 77, + -53,-32, 35, 52,-54,-34, 36, 52,-54,-34, 36, 52,-53,-33, 34, 51, + -93,-34, 62, 65,-93,-34, 62, 66,-93,-34, 62, 65,-93,-34, 60, 64, + -7, 0, 2, 2, -8, -1, 3, 3, -8, 0, 4, 5, -6, 1, 5, 5, + 3, 7, 11, 11, 2, 2, 3, 3, 1, -2, -6, -7, 1, -5,-11,-13, + 3, -2, -4, -3, 7, 0, -5, -5, 12, 4, -5, -7, 14, 6, -4, -7, + 18, 14, 3, -2, 6, 4, 0, -3, -8, -5, -2, 0,-16,-11, -2, 2, + -8, -6, 7, 18, -7, -8, 2, 13, -4, -6, -2, 6, 0, -4, -3, 1, + 1, -3,-13,-18, 0, -1, -5, -7, -1, 1, 6, 7, -2, 4, 15, 17, + -15,-14, -7, -2, -6, -5, -1, 0, 6, 6, 3, 1, 15, 13, 6, 1, + 2, -2,-11, 10, 2, -1,-12, 11, 3, -1,-12, 11, 2, -2,-11, 11, + -9, 14, -1, -5, -9, 15, -2, -5, -8, 16, -2, -5, -7, 15, -1, -4, + 2, 6, 8, 8, -2, 3, 9, 12,-11, -5, 4, 10,-19,-16, -8, 0, + 14, 8, -7,-15, 12, 7, -7,-14, 8, 5, -4, -9, 5, 3, -1, -4, + 12,-14, -2, 2, 13,-15, -1, 3, 14,-15, -1, 3, 13,-14, -1, 3, + 0, 6, 10,-13, 0, 6, 10,-15, 0, 7, 9,-17, 1, 6, 8,-16, + -8, -5, 15, -2, -8, -6, 17, -2, -8, -6, 16, -3, -8, -5, 15, -2, + -9,-11,-11,-10, 9, 10, 9, 8, 8, 10, 10, 9, -8, -9, -8, -7, + 9, 10, 9, 7, -8,-10,-10,-10, -7,-10,-11,-11, 11, 12, 11, 8, + 0, 10, 7, 0, 0, 7, 0, -6, 0, 2, -5, -6, -2, -1, -4, -1, + 5, 0, -6, -9, 2, 2, 2, 1, -2, 0, 5, 7, -6, -5, 1, 4, + 3, -8, 2, -1, 4, -9, 3, 0, 5, -7, 3, 0, 7, -5, 3, 0, + -5, -3, 2, 9, -6, -3, 1, 8, -6, -3, 1, 7, -5, -2, 0, 4, + 13, 8, 3, 1, -3, -5, -4, -1, -8, -7, -3, 0, -1, 1, 3, 2, + 3, 2, -5,-12, 4, 3, -2, -9, 3, 4, 1, -4, 3, 5, 4, -1, + -9, -8, -4, 0, 8, 6, 2, 0, 10, 8, 3, 0, -6, -5, -3, -1, + -3, -9,-12, -5, 0, -3, -5, 0, 2, 3, 2, 4, 5, 8, 7, 6, + -1, -2, 5, 12, -1, -1, 5, 9, 2, 1, -1, -2, 2, -1,-11,-17, + -7, 3, 3, -1, -9, 3, 4, -1,-10, 4, 6, -1, -9, 5, 7, 0, + -18, -7, 2, 2, -8, 1, 5, 3, 3, 4, 1, 0, 9, 5, -2, -3, + -2, 0, 6, 8, -4, -5, -5, -3, 1, -2, -6, -8, 10, 9, 3, -1, + 0, -2, -2, 0, 0, -4, -5, 0, -2, -8, -4, 8, -5, -7, 6, 24, + 9, 1, -7, 1, 9, 1, -8, 1, 8, 0,-10, 1, 8, -1,-11, -1, + 8, 8, 6, 3, 5, 4, 3, 2, -2, -3, -1, 0,-10,-13, -8, -4, + 0, 4, 2, -3, 0, 6, 3, -5, 3, 10, 2,-12, 5, 10, -4,-22, + 0, -4, -1, 3, 1, -4, -1, 5, 1, -5, 0, 8, -1, -6, -2, 7, + -1, -1, -2, -4, -1, -2, -4, -6, -1, -1, -1, -2, 1, 5, 10, 9, + 10, 3, 0, -2, 6, -1, -2, -5, 3, -1, -2, -6, 2, 0, 0, -5, + 6, 3, 0, 0, 6, 3, 1, 1, 4, -2, -2, 1, 0, -9, -9, -2, + -11, -3, 1, 2, -6, 2, 4, 5, -3, 2, 3, 4, -2, 1, 1, 2, + -6, -4, -1, -2, 2, -1, -1, -2, 10, 2, -2, -2, 11, 2, -4, -1, + 6, 0, -2, 2, 3, 3, 0, 0, -6, 3, 3, 0,-17, -1, 5, 0, + -1, 4, 10, 11, -3, -2, 0, 1, -3, -4, -5, -3, -1, -2, -2, -1, + 2, -3, -9,-12, 3, 3, 3, 2, 2, 2, 4, 4, 2, 1, -1, -2, + -2, 9, 5,-10, -3, 5, 5, -5, -2, 1, 2, 0, -1, -2, -2, 1, + -2, -3, 7, -2, -1, -3, 7, -3, -1, -2, 8, -4, -2, -2, 7, -3, + 1, -8, -3, 12, 2, -2, -2, 4, 1, 3, 0, -5, -1, 5, 2, -7, + -1, 3, 1, -5, -7, -2, 3, 1, -2, -7, -2, 2, 20, 3, -5, -1, + 5, 0, -3, -2, -7, -7, 0, 6, -6, 0, 7, 6, 2, 6, 0, -7, + -2, 6, -7, 1, -2, 7, -8, 3, -2, 7, -7, 3, -1, 7, -6, 2, + -5, -2, 5, 7, 4, 1, -4, -8, 6, 3, -2, -5, -7, -5, 3, 7, + -1, -1, 6, 5, 0, -1, 1, -4, 2, 1, 0, -7, 1, 0, 0, -4, + -8, 0, 3, 1, -2, 1, -1, -1, 1, -1, -3, 1, 1, -2, 1, 9, + 5, 2, -3, -4, -1, 0, -1, -3, -3, 1, 3, 1, -4, 0, 4, 2, + 2, -2, -2, 12, 0, -2, -5, 3, -1, 0, -3, 1, -3, -1, -2, 1, + 1, 5, 3, 0, -6, -4, -2, 1, 0, -2, -2, 2, 6, 1, -4, -1, + -3, -5, -5, -1, 3, 5, 5, 4, 0, 3, 1, -1, -2, 1, -2, -3, + 2, -4, -5, -3, 4, -2, -3, -2, 6, 0, -1, -1, 7, 1, 0, 0, + -3, -2, -2, 0, -2, -3, -5, -1, -2, 2, 0, -1, -1, 11, 9, -1, + 0, 1, -1,-10, -1, 1, 0, -6, 1, 0, 1, 4, 2, -5, -1, 13, + -2, 4, 5, 0, -5, 1, 6, 3, -6, -2, 3, 2, -5, -2, 0, -2, + -1, 1, 1, -2, -1, -2, 0, 2, 5, 5, 5, 7, 0, -4, -8, -7, + 0, 2, -1, -5, -1, 2, 2, -3, 0, 5, 3, -5, 3, 8, 2,-12, + 8, 4, 0, -2, 10, -1, -4, -1, 3, -6, -3, 0, -4, -5, 0, 0, + 0,-10, -4, 2, -1, -6, 3, 5, -1, -3, 6, 4, 0, -2, 4, 2, + 0, 8, 1, -1, 0, 11, 1, -3, -1, 6, -2, -4, -3, -2, -7, -4, + 0, -1, -1, -1, 4, 5, 6, 5, -5, -9, -8, -5, 2, 2, 3, 2, + 0, 2, 6, 1, 2, 0, 3, 0, 1, -2, -1, -2, 0, -1, -3, -6, + 0, 0, 2, 0, 4, 0, 2, 1, 5, -2, 0, 0, -2, -9, -1, 2, + 0, 1, 0,-10, -1, 1, 8, 0, -1, -2, 4, 0, 1, -1, 2, -1, + -3, -2, 2, -1, -3, -1, 2, -3, 0, -1, 1, 0, 8, 1, -1, 3, + 0, 1, 1, 2, 0, -4, -2, 0, -1, -5, 1, -1, -2, -1, 11, 2, + 1, 5, -2, -2, 0, 2, -4, 0, -2, 1, -5, 1, 0, 5, 0, 1, + -5, -3, 0, 6, -4, 2, 0, 0, -3, 5, 1, 0, -3, 3, 0, 0, + 3, -2, -3, 1, 1, -4, 0, 8, -2, -3, -2, 3, 1, 2, -1, -1, + 1, 1, 0, 2, 2, 0, 1, 6, 1, -1, 2, 1, 0, 3, 0,-19, + 1, -3, -2, 2, 6, 5, -2, -7, -3, 1, 3, 1, -1, -1, 0, 2, + -8, -1, -1, -4, 1, 1, -1, 2, 4, 3, 2, 3, -5, 1, 3, 0, + 0, 2, -1, 1, -3, 0, 0, 5, -5, -2, 0, 8, -4, -4, -4, 6, + 1, 2, 1, 2, 2, 2, -3, 2, 4, 0, -9, 0, 7, 0,-11, 1, + 0, 0, 0, -2, 3, 3, -1, -6, 4, 3, -3,-10, -1, 2, 6, 2, + 7, -2, -3, 5, -4, 0, 3, -1, -4, 2, 1, -7, 2, -1, -1, 3, + 3, 2, 2, 2, -5, -7, -7, -5, 5, 6, 4, 2, -2, -1, 0, 1 }; -static const uint32 s_svq1IntraCodebook8x4[768] = { - 0x06060605, 0x08080707, 0x00000000, 0x03020100, - 0xfbfcfcfd, 0xfefdfcfb, 0xfbfcfcfc, 0xfdfdfcfc, - 0x02020201, 0x03030302, 0x04030302, 0x05050504, - 0x010100ff, 0x04040302, 0xf7f7f6f7, 0xfbfaf9f8, - 0xfafbfcfc, 0xf9f9f9fa, 0xfefeff00, 0xfcfcfdfd, - 0x03030404, 0x00010102, 0x06070707, 0x04040506, - 0x06050402, 0xfafd0104, 0x05050403, 0xf8fb0004, - 0x04040302, 0xf6f9fe02, 0x01020202, 0xf4f7fc00, - 0x01fdf9f7, 0x03030404, 0x03fef9f6, 0x03030505, - 0x03fefaf7, 0x03040506, 0x03fffaf8, 0x02030404, - 0xfbfbfbfb, 0x070401fd, 0xfcfbfbfb, 0x080601fe, - 0xfdfcfbfc, 0x0a0803ff, 0xfefdfcfd, 0x0b090501, - 0xfefefefe, 0xfefefefe, 0xfbfbfbfc, 0xfcfbfbfb, - 0xfcfcfcfd, 0xfdfcfcfc, 0x0b0a0a09, 0x0a0a0b0b, - 0xfe010407, 0xf6f7fafc, 0x00030709, 0xf7f8fcfe, - 0x0204080b, 0xf8fafd00, 0x0305090b, 0xf9fbfe01, - 0xf4f3f3f3, 0xf8f8f6f5, 0x03020100, 0x03040404, - 0x06050403, 0x04050606, 0x04040403, 0x02030303, - 0x0a0b0a0a, 0x07080909, 0x06060606, 0x02030405, - 0xff000000, 0xfcfcfdfe, 0xf4f5f6f6, 0xf2f2f2f3, - 0x10111010, 0x0b0c0d0f, 0xfcfdfeff, 0xfdfcfcfc, - 0xfafafbfc, 0xfafafafa, 0xfafafafb, 0xfbfbfafa, - 0xf4f3f3f3, 0xfaf8f6f5, 0xfaf9f8f7, 0x0100fefc, - 0x0301fffe, 0x09080705, 0x0b090705, 0x0f0f0e0d, - 0x070b0e10, 0xf7f9fd02, 0x03080c0e, 0xf5f7faff, - 0x0004090b, 0xf3f5f8fc, 0xfd010508, 0xf2f4f6fa, - 0xfdf7f1ee, 0x0b090601, 0xfff9f3ef, 0x0c0b0703, - 0x01fbf5f1, 0x0d0c0905, 0x02fdf7f3, 0x0d0b0905, - 0x0f131516, 0xf7fc030a, 0x090f1214, 0xeff4fb02, - 0x01080d10, 0xe8ecf2f9, 0xf8ff060a, 0xe5e7ebf1, - 0xf2ece9e7, 0x0e0901f9, 0xf7f0ebe9, 0x15100900, - 0xfff6f0ec, 0x19161008, 0x06fdf5f1, 0x1b19140e, - 0x0100fefc, 0x02020202, 0x0200fefb, 0x03030303, - 0x01fffcfa, 0x03030302, 0x00fefbf9, 0x02020101, - 0x01010102, 0xfdfe0001, 0x01020303, 0xfcfdff00, - 0x01020304, 0xfafcfe00, 0x01030405, 0xfafbfdff, - 0x04060605, 0xfdfe0002, 0x04040403, 0xff000103, - 0xfffffefe, 0xfefeffff, 0xfefdfcfb, 0xfdfdfefe, - 0xffffffff, 0xffffffff, 0xfcfcfcfd, 0xfdfdfdfd, - 0xffffffff, 0xfeffffff, 0x06060605, 0x03040506, - 0x04040404, 0x07060504, 0xffffff00, 0x020100ff, - 0xfdfdfdfe, 0x00fffefd, 0xfcfcfdfd, 0xfffefdfc, - 0xfcfcfe00, 0x030200fe, 0xfdfdfe00, 0x050402ff, - 0xfdfcfeff, 0x06050300, 0xfdfcfdfe, 0x050402ff, - 0xfd000409, 0x0100fffd, 0xfcff0408, 0x0201fffd, - 0xfbfd0206, 0x0100fefc, 0xfcfd0105, 0x0100fefc, - 0xff010305, 0xf6f6f8fc, 0x01020303, 0xfcfdfe00, - 0x02010101, 0x00010203, 0x020100ff, 0x02030403, - 0x02020100, 0xfdfdff01, 0x01010100, 0xfdfcfeff, - 0xfdfdfdfd, 0x02fffdfd, 0x00fdfcfc, 0x0e0c0703, - 0xfafafbfb, 0xfbfafafa, 0x01020202, 0x00000000, - 0x02030404, 0x00000001, 0x04050606, 0x01010202, - 0xfdfaf9f9, 0x08070400, 0xfdfdfeff, 0x0201fffe, - 0xff010303, 0xfffefefe, 0x02040606, 0xfefefe00, - 0x02fefbfa, 0x0c0b0905, 0x00fefcfc, 0x06050402, - 0xfefefefd, 0x0100fffe, 0xfdfefefe, 0xfefdfdfd, - 0x0301fdf9, 0xfbfd0003, 0x0503fefa, 0xfbfd0104, - 0x0604fffb, 0xfcfd0205, 0x070500fc, 0xfdff0306, - 0x00000000, 0x00000000, 0xfdfdfefe, 0xfffefdfd, - 0x09080706, 0x06070809, 0xfbfbfcfc, 0xfcfbfafa, - 0xfcfaf8f7, 0x06060300, 0x03fffcfb, 0x03050605, - 0x06060301, 0xfbfe0104, 0x01050706, 0xf5f6f9fd, - 0x0105090a, 0xfcfafafd, 0xfbff0305, 0x02fefbfa, - 0xfafafcfe, 0x0a0601fc, 0xfcf9f9fa, 0x0c0b0701, - 0x02030506, 0x00000000, 0xfeff0102, 0xfffffefd, - 0xfcfeff00, 0x01fffefc, 0xfeff0000, 0x030200ff, - 0xfefeff00, 0xfffffefe, 0x01020405, 0x00000000, - 0x01030506, 0x00000000, 0xfcfe0002, 0xfefefdfc, - 0x0200fcf9, 0x01020202, 0x0000fdf9, 0x00000000, - 0x0101fffc, 0x01000000, 0x020201ff, 0x03030202, - 0x020200fe, 0x01010101, 0x020201ff, 0xff000001, - 0x02040200, 0xfdfeff00, 0x01030201, 0xfafafcfe, - 0x04020201, 0x01040605, 0xffffff00, 0xfcfe0000, - 0xfeff0000, 0xfafcfefe, 0x00000102, 0xfdff0101, - 0x01010101, 0x03030201, 0x00010000, 0x04040201, - 0xffffffff, 0x03020100, 0xfbfbfcfc, 0x00fffdfb, - 0xfcfbfbfa, 0xfffffefd, 0x010000ff, 0x03030201, - 0x01010100, 0x04030202, 0xffff0000, 0x03020100, - 0x01010100, 0xffff0000, 0x02030301, 0xfefeff01, - 0x020200fe, 0x01010202, 0xfefcf8f7, 0x03030301, - 0xfeffffff, 0xfcfdfdfd, 0xff000000, 0xfdfdfefe, - 0x00020202, 0xffffffff, 0x03040505, 0x02020202, - 0xfcff0306, 0x0101fffd, 0xfcfdff02, 0x000202ff, - 0x01fefeff, 0xfd010404, 0x0401fffe, 0xf8fd0306, - 0x01020303, 0xfefefeff, 0xfffefcfc, 0x04040301, - 0xfcfbfbfc, 0x020200fe, 0x01040707, 0xfefdfeff, - 0x000301ff, 0x0600fafc, 0x010401fe, 0x07fffafc, - 0x020401fd, 0x06fffafd, 0x020300fe, 0x04fffbfe, - 0x01feff01, 0xf9ff0404, 0xfffcff01, 0xfa000605, - 0xfdfc0003, 0xfc020603, 0xfcfb0003, 0xfd010401, - 0x03030202, 0x02020303, 0xf9fafbfc, 0xfaf9f9f9, - 0x03030201, 0x02020303, 0x01010000, 0x01020201, - 0x03fdfd03, 0x02fefe04, 0x04fcfc03, 0x02fcfc04, - 0x04fcfc04, 0x03fdfc04, 0x03fcfd03, 0x03fdfd03, - 0xfefefefe, 0xfffffefe, 0x08080706, 0x05060708, - 0xf9f9fafb, 0xfbfaf9f8, 0x02020101, 0x01010202, - 0x00000000, 0x0000ff00, 0x000000ff, 0x0000ff00, - 0xfefefdfe, 0xfdfdfdfe, 0x06050302, 0x00010204, - 0x00020608, 0x00000000, 0x00000104, 0xffffff00, - 0x0000ff01, 0xfdfeff00, 0x00fffefe, 0xfbfcfe00, - 0xfeff0103, 0xfbfbfcfd, 0x00000102, 0x00000101, - 0x00ffff00, 0x02020202, 0x01fffeff, 0x02020202, - 0xfffeff00, 0x00ffffff, 0xfffefeff, 0x010000ff, - 0x02010102, 0x00010102, 0x01030506, 0xfcfcfe00, - 0x00fffefd, 0xff000101, 0x04030100, 0x01030505, - 0x00ffffff, 0xfeff0001, 0xfffefefe, 0xfdfeff00, - 0xfefeff00, 0x0200ffff, 0xfffeff01, 0x0200ffff, - 0xfefe0001, 0x0501fefe, 0xfefeff01, 0x0a0500fe, - 0x00000000, 0xffffff00, 0x00ffffff, 0x02010000, - 0x03020201, 0x05060404, 0xfefdfdfd, 0xfdfdfdfe, - 0xfefeff01, 0x07050300, 0xfdfe0002, 0x030200fe, - 0xfdfe0103, 0xfffffefd, 0xff000103, 0xffffffff, - 0x04050301, 0xfcfdff02, 0x0201fefd, 0xfeff0001, - 0x0200fdfb, 0x00000102, 0x0201fffd, 0x00000102, - 0xffffff00, 0x04030201, 0xfdfcfcfd, 0x010000ff, - 0xfffefdfe, 0x01010101, 0x0300fefe, 0x02030404, - 0xfefdfcfc, 0x030201ff, 0x01010100, 0xfdfdfeff, - 0x04050403, 0xfdfdff02, 0x0200fefe, 0x00010202, - 0x070500fc, 0xfcfcff04, 0x030402ff, 0xfefdfd00, - 0xff000102, 0x0100fefe, 0xfeff0000, 0x0201fffe, - 0xfffefdfc, 0x02020100, 0x0005090a, 0xfefdfcfd, - 0xfefeff01, 0x000000ff, 0x01fffefe, 0xff000101, - 0x0300fdfb, 0xfe000204, 0x0100fffe, 0xffff0001, - 0xfeff0203, 0x0101fffe, 0xfbff0507, 0x0402fefa, - 0xfd0303fe, 0xfe0201fc, 0xfd0403fd, 0xfe0302fc, - 0xfd0403fd, 0xfe0302fc, 0xfe0402fc, 0xff0201fd, - 0xfdff0304, 0x0201fffd, 0x00fcfafc, 0x01040504, - 0x06050200, 0xfcfbfd02, 0xfdff0101, 0x0402fefb, - 0x020100ff, 0x04030302, 0x010100ff, 0xffffff00, - 0x020100ff, 0xfeff0102, 0x00fffefd, 0xfdfeff00, - 0x01010101, 0x02010000, 0x00ff0001, 0x00010100, - 0xfffcfe01, 0x00010201, 0xfdf9fc01, 0x01020301, - 0x01010101, 0xff000101, 0x00010101, 0x00020201, - 0x00000101, 0xfd000200, 0xff000203, 0xf7fafeff, - 0x01000000, 0x02010000, 0x00000001, 0x0200ffff, - 0x01010100, 0x00fefdff, 0x0601fbf9, 0xffff0206, - 0xfdff0103, 0x0401fefc, 0xfdfe0002, 0x02fffdfc, - 0x01010202, 0x01000001, 0x00000101, 0x01000000, - 0xfe0101ff, 0xfffcfafb, 0x030401ff, 0x02010002, - 0x030200ff, 0x01000001, 0x000100ff, 0x00ffff00, - 0x02020100, 0x01fffe00, 0xfefffffe, 0x080602ff, - 0xfdfeffff, 0x020100fe, 0xff0000ff, 0xffff00ff, - 0x01010102, 0x00000001, 0x01010000, 0x01ffff01, - 0x020200ff, 0x03fefdff, 0x00030200, 0x04fef9fb, - 0x000000ff, 0xfdfdfeff, 0xfeff00ff, 0xfefefefe, - 0x00000101, 0xff000201, 0x02010201, 0x00020605, - 0x00fdfcfe, 0xfd000202, 0x01000103, 0xfdfe0102, - 0x00000103, 0xff000000, 0xfefeff01, 0x030301ff, - 0x02010203, 0xfe010304, 0xfdfcfcfe, 0xfdfe00ff, - 0xffff0001, 0xff000100, 0x00000203, 0x00010100, - 0x00000101, 0x00000000, 0x02030302, 0x01010202, - 0xfdfeff00, 0xfcfbfbfb, 0xff000101, 0x03030100, - 0x00fefaf7, 0x02020101, 0x0201fefa, 0x01000101, - 0x020201fe, 0x01010101, 0x01020200, 0x01010100, - 0x00000001, 0x00ff0000, 0x00000000, 0x00fefdff, - 0xfefdfdfd, 0x090703ff, 0x02020201, 0xfdfcfe00, - 0xfffe0002, 0xfaff0403, 0xfdfe0001, 0x000303ff, - 0x00030300, 0x0101fffe, 0x0203fffa, 0x0100feff, - 0xfe000305, 0x010200fd, 0x02020101, 0xf9fcfe00, - 0x0201fefd, 0xfcff0102, 0xfe000202, 0x020200fe, - 0xfdfe0000, 0x0000fffe, 0x00000000, 0x02020000, - 0x0100fffe, 0x03020100, 0x0000fefc, 0x030200ff, - 0xfffefefe, 0x040200ff, 0x00000000, 0x0100ffff, - 0xffffff00, 0x0000ffff, 0x00020406, 0xfffffeff, - 0x01010100, 0xf6fbff01, 0x01010101, 0xfc000101, - 0x01010001, 0xff010101, 0x01010102, 0x00000000, - 0x030401fd, 0x00ff0103, 0x000100fc, 0x000000ff, - 0x010200fb, 0xff000101, 0xfe0102ff, 0xff00fffe, - 0x03050402, 0x0201ff00, 0x00010000, 0xfffffefe, - 0xfefefefe, 0x00fffefd, 0x00010000, 0x02010000, - 0xfdfefe00, 0xff0202ff, 0x00000001, 0xfe030501, - 0xff00ffff, 0xfb000200, 0x000100ff, 0xfe020200, - 0xffff0103, 0x02010100, 0x01000001, 0x01010101, - 0x01fef8f6, 0x01010102, 0x010201ff, 0x00000000, - 0x0100ffff, 0x01020202, 0x00ffffff, 0xfcfbfdff, - 0x01020101, 0x02000001, 0xfffffeff, 0x040200ff, - 0x00fbf9fd, 0x00000002, 0x01feff03, 0x02010102, - 0x01fffe01, 0x01000102, 0x0300ff00, 0xffffff02, - 0x00010102, 0x00000000, 0x03fef9f7, 0x01010203, - 0xfe000203, 0x0101fffe, 0x0000ff00, 0x00000101, - 0x0101fffe, 0x00000001, 0xfe010201, 0x0201fdfc, - 0xfe010201, 0x010300fd, 0x0000ffff, 0xfc000301, - 0x01ff0002, 0x03fefe02, 0x02ff0002, 0x01fcfe03, - 0x01010100, 0xfefafe02, 0x000000ff, 0xfffe0002, - 0x0201ffff, 0xfefdfe01, 0xfffeff03, 0x020100ff, - 0x0000040a, 0xfffefeff, 0xfffeff03, 0x00ffff00, - 0x010702fb, 0x0001fefc, 0xff0302fe, 0x000200fd, - 0x00000102, 0xfeff0101, 0xfffefe01, 0x0000feff, - 0xf9fe0300, 0x000003ff, 0xfbfd0301, 0x00ff0302, - 0xfefe0200, 0x00fe0204, 0x00ff01ff, 0x01feff02, - 0xfcfd0004, 0x010201fe, 0x05030000, 0xfeff0103, - 0xff010101, 0x0101fffd, 0xfefeff01, 0xfeff0000 +static const int8 s_svq1IntraCodebook8x4[3072] = { + 5, 6, 6, 6, 7, 7, 8, 8, 0, 0, 0, 0, 0, 1, 2, 3, + -3, -4, -4, -5, -5, -4, -3, -2, -4, -4, -4, -5, -4, -4, -3, -3, + 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 4, 4, 5, 5, 5, + -1, 0, 1, 1, 2, 3, 4, 4, -9,-10, -9, -9, -8, -7, -6, -5, + -4, -4, -5, -6, -6, -7, -7, -7, 0, -1, -2, -2, -3, -3, -4, -4, + 4, 4, 3, 3, 2, 1, 1, 0, 7, 7, 7, 6, 6, 5, 4, 4, + 2, 4, 5, 6, 4, 1, -3, -6, 3, 4, 5, 5, 4, 0, -5, -8, + 2, 3, 4, 4, 2, -2, -7,-10, 2, 2, 2, 1, 0, -4, -9,-12, + -9, -7, -3, 1, 4, 4, 3, 3,-10, -7, -2, 3, 5, 5, 3, 3, + -9, -6, -2, 3, 6, 5, 4, 3, -8, -6, -1, 3, 4, 4, 3, 2, + -5, -5, -5, -5, -3, 1, 4, 7, -5, -5, -5, -4, -2, 1, 6, 8, + -4, -5, -4, -3, -1, 3, 8, 10, -3, -4, -3, -2, 1, 5, 9, 11, + -2, -2, -2, -2, -2, -2, -2, -2, -4, -5, -5, -5, -5, -5, -5, -4, + -3, -4, -4, -4, -4, -4, -4, -3, 9, 10, 10, 11, 11, 11, 10, 10, + 7, 4, 1, -2, -4, -6, -9,-10, 9, 7, 3, 0, -2, -4, -8, -9, + 11, 8, 4, 2, 0, -3, -6, -8, 11, 9, 5, 3, 1, -2, -5, -7, + -13,-13,-13,-12,-11,-10, -8, -8, 0, 1, 2, 3, 4, 4, 4, 3, + 3, 4, 5, 6, 6, 6, 5, 4, 3, 4, 4, 4, 3, 3, 3, 2, + 10, 10, 11, 10, 9, 9, 8, 7, 6, 6, 6, 6, 5, 4, 3, 2, + 0, 0, 0, -1, -2, -3, -4, -4,-10,-10,-11,-12,-13,-14,-14,-14, + 16, 16, 17, 16, 15, 13, 12, 11, -1, -2, -3, -4, -4, -4, -4, -3, + -4, -5, -6, -6, -6, -6, -6, -6, -5, -6, -6, -6, -6, -6, -5, -5, + -13,-13,-13,-12,-11,-10, -8, -6, -9, -8, -7, -6, -4, -2, 0, 1, + -2, -1, 1, 3, 5, 7, 8, 9, 5, 7, 9, 11, 13, 14, 15, 15, + 16, 14, 11, 7, 2, -3, -7, -9, 14, 12, 8, 3, -1, -6, -9,-11, + 11, 9, 4, 0, -4, -8,-11,-13, 8, 5, 1, -3, -6,-10,-12,-14, + -18,-15, -9, -3, 1, 6, 9, 11,-17,-13, -7, -1, 3, 7, 11, 12, + -15,-11, -5, 1, 5, 9, 12, 13,-13, -9, -3, 2, 5, 9, 11, 13, + 22, 21, 19, 15, 10, 3, -4, -9, 20, 18, 15, 9, 2, -5,-12,-17, + 16, 13, 8, 1, -7,-14,-20,-24, 10, 6, -1, -8,-15,-21,-25,-27, + -25,-23,-20,-14, -7, 1, 9, 14,-23,-21,-16, -9, 0, 9, 16, 21, + -20,-16,-10, -1, 8, 16, 22, 25,-15,-11, -3, 6, 14, 20, 25, 27, + -4, -2, 0, 1, 2, 2, 2, 2, -5, -2, 0, 2, 3, 3, 3, 3, + -6, -4, -1, 1, 2, 3, 3, 3, -7, -5, -2, 0, 1, 1, 2, 2, + 2, 1, 1, 1, 1, 0, -2, -3, 3, 3, 2, 1, 0, -1, -3, -4, + 4, 3, 2, 1, 0, -2, -4, -6, 5, 4, 3, 1, -1, -3, -5, -6, + 5, 6, 6, 4, 2, 0, -2, -3, 3, 4, 4, 4, 3, 1, 0, -1, + -2, -2, -1, -1, -1, -1, -2, -2, -5, -4, -3, -2, -2, -2, -3, -3, + -1, -1, -1, -1, -1, -1, -1, -1, -3, -4, -4, -4, -3, -3, -3, -3, + -1, -1, -1, -1, -1, -1, -1, -2, 5, 6, 6, 6, 6, 5, 4, 3, + 4, 4, 4, 4, 4, 5, 6, 7, 0, -1, -1, -1, -1, 0, 1, 2, + -2, -3, -3, -3, -3, -2, -1, 0, -3, -3, -4, -4, -4, -3, -2, -1, + 0, -2, -4, -4, -2, 0, 2, 3, 0, -2, -3, -3, -1, 2, 4, 5, + -1, -2, -4, -3, 0, 3, 5, 6, -2, -3, -4, -3, -1, 2, 4, 5, + 9, 4, 0, -3, -3, -1, 0, 1, 8, 4, -1, -4, -3, -1, 1, 2, + 6, 2, -3, -5, -4, -2, 0, 1, 5, 1, -3, -4, -4, -2, 0, 1, + 5, 3, 1, -1, -4, -8,-10,-10, 3, 3, 2, 1, 0, -2, -3, -4, + 1, 1, 1, 2, 3, 2, 1, 0, -1, 0, 1, 2, 3, 4, 3, 2, + 0, 1, 2, 2, 1, -1, -3, -3, 0, 1, 1, 1, -1, -2, -4, -3, + -3, -3, -3, -3, -3, -3, -1, 2, -4, -4, -3, 0, 3, 7, 12, 14, + -5, -5, -6, -6, -6, -6, -6, -5, 2, 2, 2, 1, 0, 0, 0, 0, + 4, 4, 3, 2, 1, 0, 0, 0, 6, 6, 5, 4, 2, 2, 1, 1, + -7, -7, -6, -3, 0, 4, 7, 8, -1, -2, -3, -3, -2, -1, 1, 2, + 3, 3, 1, -1, -2, -2, -2, -1, 6, 6, 4, 2, 0, -2, -2, -2, + -6, -5, -2, 2, 5, 9, 11, 12, -4, -4, -2, 0, 2, 4, 5, 6, + -3, -2, -2, -2, -2, -1, 0, 1, -2, -2, -2, -3, -3, -3, -3, -2, + -7, -3, 1, 3, 3, 0, -3, -5, -6, -2, 3, 5, 4, 1, -3, -5, + -5, -1, 4, 6, 5, 2, -3, -4, -4, 0, 5, 7, 6, 3, -1, -3, + 0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -3, -3, -3, -3, -2, -1, + 6, 7, 8, 9, 9, 8, 7, 6, -4, -4, -5, -5, -6, -6, -5, -4, + -9, -8, -6, -4, 0, 3, 6, 6, -5, -4, -1, 3, 5, 6, 5, 3, + 1, 3, 6, 6, 4, 1, -2, -5, 6, 7, 5, 1, -3, -7,-10,-11, + 10, 9, 5, 1, -3, -6, -6, -4, 5, 3, -1, -5, -6, -5, -2, 2, + -2, -4, -6, -6, -4, 1, 6, 10, -6, -7, -7, -4, 1, 7, 11, 12, + 6, 5, 3, 2, 0, 0, 0, 0, 2, 1, -1, -2, -3, -2, -1, -1, + 0, -1, -2, -4, -4, -2, -1, 1, 0, 0, -1, -2, -1, 0, 2, 3, + 0, -1, -2, -2, -2, -2, -1, -1, 5, 4, 2, 1, 0, 0, 0, 0, + 6, 5, 3, 1, 0, 0, 0, 0, 2, 0, -2, -4, -4, -3, -2, -2, + -7, -4, 0, 2, 2, 2, 2, 1, -7, -3, 0, 0, 0, 0, 0, 0, + -4, -1, 1, 1, 0, 0, 0, 1, -1, 1, 2, 2, 2, 2, 3, 3, + -2, 0, 2, 2, 1, 1, 1, 1, -1, 1, 2, 2, 1, 0, 0, -1, + 0, 2, 4, 2, 0, -1, -2, -3, 1, 2, 3, 1, -2, -4, -6, -6, + 1, 2, 2, 4, 5, 6, 4, 1, 0, -1, -1, -1, 0, 0, -2, -4, + 0, 0, -1, -2, -2, -2, -4, -6, 2, 1, 0, 0, 1, 1, -1, -3, + 1, 1, 1, 1, 1, 2, 3, 3, 0, 0, 1, 0, 1, 2, 4, 4, + -1, -1, -1, -1, 0, 1, 2, 3, -4, -4, -5, -5, -5, -3, -1, 0, + -6, -5, -5, -4, -3, -2, -1, -1, -1, 0, 0, 1, 1, 2, 3, 3, + 0, 1, 1, 1, 2, 2, 3, 4, 0, 0, -1, -1, 0, 1, 2, 3, + 0, 1, 1, 1, 0, 0, -1, -1, 1, 3, 3, 2, 1, -1, -2, -2, + -2, 0, 2, 2, 2, 2, 1, 1, -9, -8, -4, -2, 1, 3, 3, 3, + -1, -1, -1, -2, -3, -3, -3, -4, 0, 0, 0, -1, -2, -2, -3, -3, + 2, 2, 2, 0, -1, -1, -1, -1, 5, 5, 4, 3, 2, 2, 2, 2, + 6, 3, -1, -4, -3, -1, 1, 1, 2, -1, -3, -4, -1, 2, 2, 0, + -1, -2, -2, 1, 4, 4, 1, -3, -2, -1, 1, 4, 6, 3, -3, -8, + 3, 3, 2, 1, -1, -2, -2, -2, -4, -4, -2, -1, 1, 3, 4, 4, + -4, -5, -5, -4, -2, 0, 2, 2, 7, 7, 4, 1, -1, -2, -3, -2, + -1, 1, 3, 0, -4, -6, 0, 6, -2, 1, 4, 1, -4, -6, -1, 7, + -3, 1, 4, 2, -3, -6, -1, 6, -2, 0, 3, 2, -2, -5, -1, 4, + 1, -1, -2, 1, 4, 4, -1, -7, 1, -1, -4, -1, 5, 6, 0, -6, + 3, 0, -4, -3, 3, 6, 2, -4, 3, 0, -5, -4, 1, 4, 1, -3, + 2, 2, 3, 3, 3, 3, 2, 2, -4, -5, -6, -7, -7, -7, -7, -6, + 1, 2, 3, 3, 3, 3, 2, 2, 0, 0, 1, 1, 1, 2, 2, 1, + 3, -3, -3, 3, 4, -2, -2, 2, 3, -4, -4, 4, 4, -4, -4, 2, + 4, -4, -4, 4, 4, -4, -3, 3, 3, -3, -4, 3, 3, -3, -3, 3, + -2, -2, -2, -2, -2, -2, -1, -1, 6, 7, 8, 8, 8, 7, 6, 5, + -5, -6, -7, -7, -8, -7, -6, -5, 1, 1, 2, 2, 2, 2, 1, 1, + 0, 0, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, + -2, -3, -2, -2, -2, -3, -3, -3, 2, 3, 5, 6, 4, 2, 1, 0, + 8, 6, 2, 0, 0, 0, 0, 0, 4, 1, 0, 0, 0, -1, -1, -1, + 1, -1, 0, 0, 0, -1, -2, -3, -2, -2, -1, 0, 0, -2, -4, -5, + 3, 1, -1, -2, -3, -4, -5, -5, 2, 1, 0, 0, 1, 1, 0, 0, + 0, -1, -1, 0, 2, 2, 2, 2, -1, -2, -1, 1, 2, 2, 2, 2, + 0, -1, -2, -1, -1, -1, -1, 0, -1, -2, -2, -1, -1, 0, 0, 1, + 2, 1, 1, 2, 2, 1, 1, 0, 6, 5, 3, 1, 0, -2, -4, -4, + -3, -2, -1, 0, 1, 1, 0, -1, 0, 1, 3, 4, 5, 5, 3, 1, + -1, -1, -1, 0, 1, 0, -1, -2, -2, -2, -2, -1, 0, -1, -2, -3, + 0, -1, -2, -2, -1, -1, 0, 2, 1, -1, -2, -1, -1, -1, 0, 2, + 1, 0, -2, -2, -2, -2, 1, 5, 1, -1, -2, -2, -2, 0, 5, 10, + 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, 0, 0, 0, 1, 2, + 1, 2, 2, 3, 4, 4, 6, 5, -3, -3, -3, -2, -2, -3, -3, -3, + 1, -1, -2, -2, 0, 3, 5, 7, 2, 0, -2, -3, -2, 0, 2, 3, + 3, 1, -2, -3, -3, -2, -1, -1, 3, 1, 0, -1, -1, -1, -1, -1, + 1, 3, 5, 4, 2, -1, -3, -4, -3, -2, 1, 2, 1, 0, -1, -2, + -5, -3, 0, 2, 2, 1, 0, 0, -3, -1, 1, 2, 2, 1, 0, 0, + 0, -1, -1, -1, 1, 2, 3, 4, -3, -4, -4, -3, -1, 0, 0, 1, + -2, -3, -2, -1, 1, 1, 1, 1, -2, -2, 0, 3, 4, 4, 3, 2, + -4, -4, -3, -2, -1, 1, 2, 3, 0, 1, 1, 1, -1, -2, -3, -3, + 3, 4, 5, 4, 2, -1, -3, -3, -2, -2, 0, 2, 2, 2, 1, 0, + -4, 0, 5, 7, 4, -1, -4, -4, -1, 2, 4, 3, 0, -3, -3, -2, + 2, 1, 0, -1, -2, -2, 0, 1, 0, 0, -1, -2, -2, -1, 1, 2, + -4, -3, -2, -1, 0, 1, 2, 2, 10, 9, 5, 0, -3, -4, -3, -2, + 1, -1, -2, -2, -1, 0, 0, 0, -2, -2, -1, 1, 1, 1, 0, -1, + -5, -3, 0, 3, 4, 2, 0, -2, -2, -1, 0, 1, 1, 0, -1, -1, + 3, 2, -1, -2, -2, -1, 1, 1, 7, 5, -1, -5, -6, -2, 2, 4, + -2, 3, 3, -3, -4, 1, 2, -2, -3, 3, 4, -3, -4, 2, 3, -2, + -3, 3, 4, -3, -4, 2, 3, -2, -4, 2, 4, -2, -3, 1, 2, -1, + 4, 3, -1, -3, -3, -1, 1, 2, -4, -6, -4, 0, 4, 5, 4, 1, + 0, 2, 5, 6, 2, -3, -5, -4, 1, 1, -1, -3, -5, -2, 2, 4, + -1, 0, 1, 2, 2, 3, 3, 4, -1, 0, 1, 1, 0, -1, -1, -1, + -1, 0, 1, 2, 2, 1, -1, -2, -3, -2, -1, 0, 0, -1, -2, -3, + 1, 1, 1, 1, 0, 0, 1, 2, 1, 0, -1, 0, 0, 1, 1, 0, + 1, -2, -4, -1, 1, 2, 1, 0, 1, -4, -7, -3, 1, 3, 2, 1, + 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 0, 1, 2, 2, 0, + 1, 1, 0, 0, 0, 2, 0, -3, 3, 2, 0, -1, -1, -2, -6, -9, + 0, 0, 0, 1, 0, 0, 1, 2, 1, 0, 0, 0, -1, -1, 0, 2, + 0, 1, 1, 1, -1, -3, -2, 0, -7, -5, 1, 6, 6, 2, -1, -1, + 3, 1, -1, -3, -4, -2, 1, 4, 2, 0, -2, -3, -4, -3, -1, 2, + 2, 2, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, + -1, 1, 1, -2, -5, -6, -4, -1, -1, 1, 4, 3, 2, 0, 1, 2, + -1, 0, 2, 3, 1, 0, 0, 1, -1, 0, 1, 0, 0, -1, -1, 0, + 0, 1, 2, 2, 0, -2, -1, 1, -2, -1, -1, -2, -1, 2, 6, 8, + -1, -1, -2, -3, -2, 0, 1, 2, -1, 0, 0, -1, -1, 0, -1, -1, + 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, -1, -1, 1, + -1, 0, 2, 2, -1, -3, -2, 3, 0, 2, 3, 0, -5, -7, -2, 4, + -1, 0, 0, 0, -1, -2, -3, -3, -1, 0, -1, -2, -2, -2, -2, -2, + 1, 1, 0, 0, 1, 2, 0, -1, 1, 2, 1, 2, 5, 6, 2, 0, + -2, -4, -3, 0, 2, 2, 0, -3, 3, 1, 0, 1, 2, 1, -2, -3, + 3, 1, 0, 0, 0, 0, 0, -1, 1, -1, -2, -2, -1, 1, 3, 3, + 3, 2, 1, 2, 4, 3, 1, -2, -2, -4, -4, -3, -1, 0, -2, -3, + 1, 0, -1, -1, 0, 1, 0, -1, 3, 2, 0, 0, 0, 1, 1, 0, + 1, 1, 0, 0, 0, 0, 0, 0, 2, 3, 3, 2, 2, 2, 1, 1, + 0, -1, -2, -3, -5, -5, -5, -4, 1, 1, 0, -1, 0, 1, 3, 3, + -9, -6, -2, 0, 1, 1, 2, 2, -6, -2, 1, 2, 1, 1, 0, 1, + -2, 1, 2, 2, 1, 1, 1, 1, 0, 2, 2, 1, 0, 1, 1, 1, + 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, -3, -2, 0, + -3, -3, -3, -2, -1, 3, 7, 9, 1, 2, 2, 2, 0, -2, -4, -3, + 2, 0, -2, -1, 3, 4, -1, -6, 1, 0, -2, -3, -1, 3, 3, 0, + 0, 3, 3, 0, -2, -1, 1, 1, -6, -1, 3, 2, -1, -2, 0, 1, + 5, 3, 0, -2, -3, 0, 2, 1, 1, 1, 2, 2, 0, -2, -4, -7, + -3, -2, 1, 2, 2, 1, -1, -4, 2, 2, 0, -2, -2, 0, 2, 2, + 0, 0, -2, -3, -2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, + -2, -1, 0, 1, 0, 1, 2, 3, -4, -2, 0, 0, -1, 0, 2, 3, + -2, -2, -2, -1, -1, 0, 2, 4, 0, 0, 0, 0, -1, -1, 0, 1, + 0, -1, -1, -1, -1, -1, 0, 0, 6, 4, 2, 0, -1, -2, -1, -1, + 0, 1, 1, 1, 1, -1, -5,-10, 1, 1, 1, 1, 1, 1, 0, -4, + 1, 0, 1, 1, 1, 1, 1, -1, 2, 1, 1, 1, 0, 0, 0, 0, + -3, 1, 4, 3, 3, 1, -1, 0, -4, 0, 1, 0, -1, 0, 0, 0, + -5, 0, 2, 1, 1, 1, 0, -1, -1, 2, 1, -2, -2, -1, 0, -1, + 2, 4, 5, 3, 0, -1, 1, 2, 0, 0, 1, 0, -2, -2, -1, -1, + -2, -2, -2, -2, -3, -2, -1, 0, 0, 0, 1, 0, 0, 0, 1, 2, + 0, -2, -2, -3, -1, 2, 2, -1, 1, 0, 0, 0, 1, 5, 3, -2, + -1, -1, 0, -1, 0, 2, 0, -5, -1, 0, 1, 0, 0, 2, 2, -2, + 3, 1, -1, -1, 0, 1, 1, 2, 1, 0, 0, 1, 1, 1, 1, 1, + -10, -8, -2, 1, 2, 1, 1, 1, -1, 1, 2, 1, 0, 0, 0, 0, + -1, -1, 0, 1, 2, 2, 2, 1, -1, -1, -1, 0, -1, -3, -5, -4, + 1, 1, 2, 1, 1, 0, 0, 2, -1, -2, -1, -1, -1, 0, 2, 4, + -3, -7, -5, 0, 2, 0, 0, 0, 3, -1, -2, 1, 2, 1, 1, 2, + 1, -2, -1, 1, 2, 1, 0, 1, 0, -1, 0, 3, 2, -1, -1, -1, + 2, 1, 1, 0, 0, 0, 0, 0, -9, -7, -2, 3, 3, 2, 1, 1, + 3, 2, 0, -2, -2, -1, 1, 1, 0, -1, 0, 0, 1, 1, 0, 0, + -2, -1, 1, 1, 1, 0, 0, 0, 1, 2, 1, -2, -4, -3, 1, 2, + 1, 2, 1, -2, -3, 0, 3, 1, -1, -1, 0, 0, 1, 3, 0, -4, + 2, 0, -1, 1, 2, -2, -2, 3, 2, 0, -1, 2, 3, -2, -4, 1, + 0, 1, 1, 1, 2, -2, -6, -2, -1, 0, 0, 0, 2, 0, -2, -1, + -1, -1, 1, 2, 1, -2, -3, -2, 3, -1, -2, -1, -1, 0, 1, 2, + 10, 4, 0, 0, -1, -2, -2, -1, 3, -1, -2, -1, 0, -1, -1, 0, + -5, 2, 7, 1, -4, -2, 1, 0, -2, 2, 3, -1, -3, 0, 2, 0, + 2, 1, 0, 0, 1, 1, -1, -2, 1, -2, -2, -1, -1, -2, 0, 0, + 0, 3, -2, -7, -1, 3, 0, 0, 1, 3, -3, -5, 2, 3, -1, 0, + 0, 2, -2, -2, 4, 2, -2, 0, -1, 1, -1, 0, 2, -1, -2, 1, + 4, 0, -3, -4, -2, 1, 2, 1, 0, 0, 3, 5, 3, 1, -1, -2, + 1, 1, 1, -1, -3, -1, 1, 1, 1, -1, -2, -2, 0, 0, -1, -2 }; -static const uint32 s_svq1IntraCodebook8x8[1536] = { - 0x02030404, 0xff000102, 0x02030304, 0xffff0001, - 0x02020303, 0xfeff0001, 0x01020203, 0xfdfeff00, - 0x00010202, 0xfdfeffff, 0x00000102, 0xfcfdfeff, - 0xff000001, 0xfcfcfdfe, 0xfeff0000, 0xfcfcfdfe, - 0x03030302, 0x03030303, 0x02020202, 0x03030202, - 0x02020201, 0x02020202, 0x01010100, 0x01010101, - 0x000000ff, 0x01010000, 0xfffffefe, 0xffffffff, - 0xfdfdfdfd, 0xfefefdfd, 0xfcfcfcfb, 0xfdfcfcfc, - 0x00fffefc, 0x03020201, 0x00fffefc, 0x03030201, - 0x00fffdfc, 0x03030201, 0x00fffdfc, 0x03030201, - 0x00fffdfb, 0x03030201, 0x00fffdfb, 0x03030201, - 0x00fffdfb, 0x03020101, 0xfffefdfb, 0x03020100, - 0x05050404, 0x07070606, 0x03020202, 0x04040403, - 0x00000000, 0x02010101, 0xfefefefe, 0x00ffffff, - 0xfefefefe, 0xfefefefe, 0xfefefefe, 0xfefefefe, - 0xfefefeff, 0xfefefefe, 0xffffffff, 0xfefefefe, - 0xff010305, 0xfdfdfdfe, 0xff010305, 0xfdfdfdfe, - 0xff010305, 0xfdfdfdfe, 0xff010305, 0xfdfdfdfe, - 0x00010405, 0xfdfdfdfe, 0x00020406, 0xfdfdfefe, - 0x00020406, 0xfdfefeff, 0x01020406, 0xfefefeff, - 0x030301ff, 0xfafd0002, 0x040301ff, 0xfafd0003, - 0x040401ff, 0xfafd0103, 0x040301ff, 0xfafd0103, - 0x040301fe, 0xfafd0103, 0x040301fe, 0xf9fd0103, - 0x030301fe, 0xf9fd0002, 0x030200fe, 0xfafd0002, - 0x0608090a, 0x04040506, 0x03040506, 0x01020202, - 0xff000102, 0xfffefefe, 0xfcfdfeff, 0xfdfcfcfc, - 0xfcfcfdfe, 0xfdfcfcfb, 0xfdfdfefe, 0xfefefdfd, - 0xffffffff, 0x00ffffff, 0x01010101, 0x02010101, - 0x0201fffe, 0x08070504, 0x0100fefd, 0x08070503, - 0x00fffdfc, 0x07060402, 0xfffefcfb, 0x07050301, - 0xfefdfbfa, 0x06040200, 0xfefcfbfa, 0x050301ff, - 0xfdfbfaf9, 0x030200fe, 0xfcfbf9f8, 0x0201fffd, - 0x0507090b, 0xffff0103, 0x0306080a, 0xfefe0001, - 0x02050709, 0xfcfdfe00, 0x01030608, 0xfcfcfdff, - 0xff020406, 0xfbfbfcfd, 0xfe000305, 0xfafafbfc, - 0xfdff0103, 0xf9f9fafb, 0xfcfe0002, 0xf9f9fafa, - 0x07070605, 0x08080807, 0x05050403, 0x06060606, - 0x03020200, 0x05040404, 0x0100fffe, 0x03030202, - 0xfffefdfc, 0x02010100, 0xfdfcfbfa, 0x00fffefe, - 0xfafaf9f8, 0xfdfdfcfb, 0xf8f8f7f6, 0xfbfafaf9, - 0x01030506, 0xf8fafdff, 0x02040506, 0xf8fafdff, - 0x02040506, 0xf8fafd00, 0x02040506, 0xf8fafd00, - 0x02040606, 0xf8fafd00, 0x02040506, 0xf8fafd00, - 0x02040506, 0xf8fafd00, 0x02040506, 0xf8fbfdff, - 0x08090a0b, 0x04050607, 0x06070808, 0x02030405, - 0x04040506, 0x00010202, 0x01020303, 0xfeff0000, - 0xff000101, 0xfdfdfefe, 0xfdfeffff, 0xfbfbfcfc, - 0xfbfcfcfd, 0xf9f9fafa, 0xf9fafbfb, 0xf8f8f8f8, - 0xf5f4f3f2, 0xfcfaf9f7, 0xf7f6f5f4, 0xfffdfbf9, - 0xfaf9f7f6, 0x0200fefd, 0xfefcfaf8, 0x05040200, - 0x0200fdfb, 0x08070504, 0x040200fe, 0x0a090806, - 0x07050300, 0x0c0b0a08, 0x08070503, 0x0c0c0b0a, - 0xeeeeeded, 0xf2f1f0ef, 0xf3f2f1f1, 0xf7f6f5f4, - 0xf8f7f6f5, 0xfdfcfbfa, 0xfefdfbfa, 0x020100ff, - 0x030200ff, 0x06060504, 0x08070604, 0x0a0a0a09, - 0x0c0b0a09, 0x0e0e0e0d, 0x0f0e0e0c, 0x10101010, - 0x11131516, 0x05090b0e, 0x0e111314, 0x0104080b, - 0x0a0d0f11, 0xfc000306, 0x05080b0d, 0xf7fbfe01, - 0xff030609, 0xf3f5f9fc, 0xfafd0004, 0xeff1f4f7, - 0xf5f8fbfe, 0xeceef0f2, 0xf0f3f6f8, 0xeaebedef, - 0x12121211, 0x0e101011, 0x0f0f1010, 0x0b0c0d0e, - 0x0a0b0c0c, 0x05070809, 0x04060607, 0xff010203, - 0xfeff0001, 0xfafbfcfd, 0xf8f9fafb, 0xf4f5f6f7, - 0xf2f3f4f5, 0xeff0f0f1, 0xeeefeff0, 0xecececed, - 0x00000000, 0xfdfeffff, 0x00000001, 0xfdfeff00, - 0x00000101, 0xfefeffff, 0x00010101, 0xfeffff00, - 0x01010102, 0xfeffff00, 0x01010202, 0xfeff0000, - 0x01010202, 0xffff0001, 0x01010202, 0xfe000001, - 0x00ffff00, 0x03020100, 0x00ffff00, 0x02020101, - 0xffffffff, 0x02020100, 0xfffeffff, 0x02010100, - 0xfffefeff, 0x02010000, 0xfefefeff, 0x020100ff, - 0xfffeffff, 0x02010000, 0xffffffff, 0x02010100, - 0x02020203, 0x00000101, 0x02020203, 0x00000102, - 0x01020202, 0x00000101, 0x01010202, 0xff000001, - 0x00010101, 0xffff0000, 0xffff0000, 0xffffffff, - 0xfefefefe, 0xfefefefe, 0xfdfdfdfe, 0xfefefefe, - 0x00000205, 0x000000ff, 0xff000204, 0xff00ffff, - 0xffff0104, 0xfffffffe, 0xffff0104, 0xfffffffe, - 0xfeff0104, 0xfffffffe, 0xfeff0104, 0xfffffffe, - 0xffff0104, 0xffffffff, 0xff000204, 0xff000000, - 0x0100fffe, 0x01010101, 0x0100fffd, 0x01010101, - 0x0100fffd, 0x01010101, 0x0100fffd, 0x01010101, - 0x0100fefd, 0x01010202, 0x0100fefc, 0x02020202, - 0x01fffdfb, 0x02010201, 0x00fefdfb, 0x01010101, - 0x00010303, 0xfbfcfcfe, 0x00020303, 0xfcfdfeff, - 0x01010202, 0xfefeff00, 0x01010101, 0x00000001, - 0x01000000, 0x01010101, 0x00fffffe, 0x02020100, - 0xfffefefd, 0x03020100, 0xfffefdfd, 0x03020100, - 0xfdfdfdfd, 0xfefefefd, 0xfefefdfd, 0xfffffffe, - 0xfffefefe, 0xffffffff, 0x00ffffff, 0x00000000, - 0x00000000, 0x01010101, 0x01010000, 0x02020202, - 0x02010101, 0x03030302, 0x02020202, 0x03030303, - 0xfdfbf9f8, 0xff00fffe, 0x00fffdfc, 0x01010201, - 0x030201ff, 0x01020203, 0x03030201, 0x00010202, - 0x02030302, 0xff000001, 0x00010201, 0xffffffff, - 0xff000101, 0xfffefeff, 0x00000101, 0xff00ffff, - 0x00fefdfc, 0x03030201, 0x00fefdfc, 0x02020201, - 0xfffefdfd, 0x01010100, 0xfffefefe, 0x000000ff, - 0xffffff00, 0xffffffff, 0x00010102, 0xfeffff00, - 0x01030303, 0xfefeff00, 0x02040405, 0xfeff0001, - 0x00000000, 0x03030201, 0x0000ff00, 0x03030201, - 0x0000ff00, 0x02030201, 0x01000000, 0x02020201, - 0x01010102, 0x00010101, 0x01020202, 0xfeff0000, - 0x00000102, 0xfafbfdfe, 0xfdffff00, 0xf7f8fafb, - 0x020100fe, 0xfcff0102, 0x020200fe, 0xfcff0102, - 0x020200fe, 0xfdff0102, 0x020200fe, 0xfdff0102, - 0x0202fffe, 0xfdff0102, 0x0201fffe, 0xfdff0102, - 0x0201fffd, 0xfdff0102, 0x0201fffe, 0xfdff0102, - 0xff0101ff, 0x0400fdfd, 0xff0101ff, 0x0400fdfd, - 0x000101ff, 0x0400fdfd, 0x000201ff, 0x0500fdfd, - 0x00020100, 0x0400fcfd, 0x00020100, 0x0500fcfd, - 0x00020100, 0x0400fdfd, 0xff020100, 0x0400fefe, - 0x06050606, 0x05050505, 0x02020202, 0x02020202, - 0x00000000, 0x00000000, 0xffffffff, 0xfefefefe, - 0xfefefefe, 0xfefefefe, 0xfefefefe, 0xfefefefe, - 0xfffeffff, 0xffffffff, 0xffffffff, 0xffffffff, - 0x02020202, 0x02020202, 0x00010100, 0x00000000, - 0xfefefeff, 0xfffefefe, 0xfdfdfdfd, 0xfefdfdfd, - 0xfdfcfcfd, 0xfefefdfd, 0xfefefefe, 0x0000ffff, - 0x01010100, 0x03030202, 0x05040403, 0x06060605, - 0xfdfe0104, 0x0301fffd, 0xfcfe0104, 0x0301fffd, - 0xfcfe0105, 0x0401fffd, 0xfdfe0105, 0x0402fffd, - 0xfdfe0105, 0x0402fffd, 0xfcfd0004, 0x0402fffd, - 0xfdfd0004, 0x0301fffd, 0xfdfe0003, 0x0301fffe, - 0xfcfcfcfd, 0xfcfcfcfc, 0xffffffff, 0xfefeffff, - 0x02010102, 0x01010102, 0x04030303, 0x03030304, - 0x04030303, 0x03030404, 0x02010201, 0x02020202, - 0xfffefefe, 0x0000ffff, 0xfcfcfcfc, 0xfdfdfdfd, - 0xfdfdfeff, 0x00fffefe, 0xfefeff00, 0x0100fffe, - 0xffff0102, 0x0100ffff, 0xff000103, 0x010000ff, - 0xff000203, 0x01000000, 0xff000103, 0x01000000, - 0xff000103, 0x01000000, 0x00000102, 0x01000000, - 0x01000000, 0x04030201, 0x00ff0000, 0x03020000, - 0xffffff00, 0x0100ffff, 0xffffff00, 0x00ffffff, - 0xffff0000, 0xfffefeff, 0xff000001, 0xfffefeff, - 0x00010202, 0xffffffff, 0x01020303, 0x00ffff00, - 0x00010001, 0xfffeff00, 0x00000000, 0xfffeffff, - 0x0000ff00, 0xffffffff, 0x00ffffff, 0x00000000, - 0x00ffffff, 0x01010000, 0x00ffffff, 0x03020101, - 0x00fffefe, 0x04030201, 0x00fffefe, 0x05040201, - 0x0001fffd, 0x0100ff00, 0x000100fd, 0x0200ffff, - 0x000100fd, 0x0200ffff, 0x000201fe, 0x0200ffff, - 0x000201fe, 0x0200ffff, 0x000201fe, 0x0200ffff, - 0x000202ff, 0x0200ffff, 0x000101ff, 0x01ffffff, - 0x01fffefe, 0x01030403, 0x00fffefe, 0x00020302, - 0x00fffefe, 0xff010201, 0x00ffffff, 0xff010201, - 0x00ffffff, 0xfe000101, 0x00ffff00, 0xff000101, - 0x00ffff00, 0xff010101, 0x00ffff00, 0xff000100, - 0x0100fffe, 0x01010101, 0x0000fffe, 0x00000000, - 0x00fffffe, 0xfefeffff, 0xfffffffe, 0xfdfefeff, - 0x010100ff, 0xfefeff00, 0x03030201, 0x00000102, - 0x03030201, 0x00010203, 0x01010000, 0x00000101, - 0xffffff00, 0x00000000, 0x00000001, 0x01010000, - 0x01010101, 0x01010101, 0x02020101, 0x01010101, - 0x01010101, 0x01010101, 0x010000ff, 0x00000001, - 0xfffffefd, 0xff00ffff, 0xfdfcfbfb, 0xfffefefe, - 0x01010101, 0xff000102, 0x02010101, 0xff000101, - 0x01010101, 0xfe000101, 0x01010102, 0xfe000101, - 0x00000101, 0xfdff0000, 0x00000101, 0xfdfeff00, - 0x00000101, 0xfcfeffff, 0xff000001, 0xfcfdfefe, - 0x03050708, 0x01010102, 0x00000102, 0xfffeffff, - 0xfeffffff, 0xfffefefe, 0xffffffff, 0x00ffff00, - 0x01000000, 0x00000001, 0x01010000, 0x00000001, - 0x000000ff, 0xffff0000, 0xfffffefe, 0xfffefeff, - 0xfe000409, 0xfffffefe, 0xfeff0207, 0x0000fffe, - 0xfefe0004, 0x010100ff, 0xfefefe01, 0x010100ff, - 0xfffefeff, 0x01010100, 0x00fffeff, 0x00010101, - 0x0100ffff, 0xff000101, 0x0100ff00, 0xffff0000, - 0x01010100, 0x00000101, 0x02020201, 0x00000001, - 0x02020202, 0xffff0001, 0x00010101, 0xfefefeff, - 0xff000000, 0xfefefdfe, 0xfeffffff, 0x00fffefe, - 0xffffffff, 0x02010000, 0x00ffffff, 0x04030201, - 0x0000ffff, 0xfdfdfeff, 0x0000ffff, 0xffffff00, - 0x00fffefe, 0x01010101, 0x00fefefe, 0x03030201, - 0x00ffffff, 0x03030301, 0x00000001, 0x02020101, - 0x00010202, 0xffffff00, 0x00010203, 0xfdfdfeff, - 0xfeffffff, 0xfbfcfdfe, 0xff000000, 0xfcfdfdff, - 0x00010101, 0xfdfeff00, 0x01020202, 0xffff0001, - 0x02020202, 0xff000101, 0x02020202, 0x00000102, - 0x01020101, 0x00000101, 0x01010000, 0xff000000, - 0x010302fe, 0xff0101ff, 0x000302fd, 0xff0101ff, - 0x000302fd, 0xff0101ff, 0x000302fc, 0xfe0101ff, - 0x000301fc, 0xfe0101ff, 0xff0301fc, 0xfe0101fe, - 0x000201fd, 0xfe0101ff, 0x000201fd, 0xff0101ff, - 0xfeffffff, 0xfefefefe, 0x01010101, 0x00000000, - 0x02020201, 0x02020202, 0x01010000, 0x02020201, - 0xfffffefe, 0x000000ff, 0xfdfdfdfd, 0xfefdfdfd, - 0xffffffff, 0xfefefefe, 0x04040404, 0x02030304, - 0xfffefdfd, 0x05020100, 0xfefdfdfd, 0x060301ff, - 0xfefefdfd, 0x05030200, 0xfefefefd, 0x05030100, - 0xfffefefe, 0x050301ff, 0xfffffefe, 0x04020100, - 0xffffffff, 0x04010100, 0xffffffff, 0x03020100, - 0x0100ff00, 0xffff0001, 0x01000000, 0xffff0002, - 0x00ff0001, 0x00000001, 0xfffeff01, 0x00000000, - 0xfffdfe01, 0x01000000, 0xfefdff01, 0x02010100, - 0xfffeff01, 0x02010100, 0x00ff0002, 0x02020101, - 0x01010101, 0x02010000, 0xff0000ff, 0x01000000, - 0xfffffefd, 0x010100ff, 0x00fffefc, 0x01010100, - 0x0000fefd, 0x01010101, 0x0100fffd, 0x00000101, - 0x010100ff, 0xff000001, 0x02020100, 0xff000001, - 0xfdfcfcfc, 0xfffffffe, 0xfffefefe, 0x00000000, - 0x000000ff, 0x01010101, 0x01010000, 0x01010101, - 0x01010000, 0x00010202, 0x01010000, 0x00010101, - 0x01000000, 0x00010101, 0x010000ff, 0x00000101, - 0x02020201, 0xfcfeff01, 0x02020101, 0xfcfe0001, - 0x01010100, 0xfdff0001, 0x010100ff, 0xfeff0000, - 0x010100ff, 0xff000001, 0x0000fffe, 0xff000000, - 0x0100ffff, 0x00000001, 0x010100ff, 0x00010101, - 0xff000202, 0xfefffffe, 0xfeff0101, 0xfefffffe, - 0xfeff0101, 0xff0000fe, 0xfe000101, 0x000101ff, - 0xff000101, 0x010201ff, 0xff000101, 0x010201ff, - 0xff000101, 0x010101ff, 0xff000101, 0x01010100, - 0xfeff0000, 0xfcfcfcfc, 0x02030303, 0x00000001, - 0x03030303, 0x02020202, 0x00000000, 0x01000000, - 0xffffffff, 0x00ffffff, 0x0000ff00, 0x000000ff, - 0x00000000, 0x00000000, 0x00000000, 0x00ffff00, - 0xff00ffff, 0xff0201ff, 0x00000101, 0xff030200, - 0xff000101, 0xff0301ff, 0xfe000101, 0xfe0100fe, - 0xfe000001, 0xfd0100fe, 0x00000000, 0xfd0101ff, - 0x00010100, 0xfd010201, 0x010100ff, 0xfc010201, - 0x0100fdfc, 0x00000101, 0x0100fefc, 0xff000101, - 0x0101fffd, 0xffff0001, 0x010101ff, 0x00ff0001, - 0x01020201, 0x0000ff00, 0x00010202, 0x0100ffff, - 0xff000102, 0x0100fffe, 0xff000202, 0x0101fffe, - 0x00000101, 0xffffffff, 0xffffff00, 0xffffffff, - 0xffffffff, 0xffffffff, 0xffff0000, 0xffffffff, - 0xff000001, 0xffffffff, 0x00000102, 0xffffffff, - 0x01020305, 0x00000000, 0x02030506, 0x00000001, - 0x01030404, 0x01000000, 0x01020303, 0x01000000, - 0x00010202, 0x0100ffff, 0xff000000, 0x0100ffff, - 0xffff0000, 0x0200fffe, 0xfeffff00, 0x0100fefe, - 0xfeffff00, 0x00fffefe, 0xfeff0000, 0x00fffefe, - 0xffff0000, 0x030200ff, 0xfefeff00, 0x0201ffff, - 0xffff0001, 0x000000ff, 0x00010101, 0xffff0000, - 0x00010201, 0xffffff00, 0x000000ff, 0xffffffff, - 0xfffffefd, 0x02010100, 0x01fffdfc, 0x05050302, - 0x00000000, 0x00000000, 0x01010101, 0x01010101, - 0xff000000, 0x01000000, 0xfefeffff, 0x00fffffe, - 0x00000000, 0x01010100, 0x02020202, 0x03030302, - 0x01010101, 0x01010202, 0xfcfcfdfc, 0xfdfdfcfc, - 0x020100ff, 0x03030302, 0xffffffff, 0x00000000, - 0xfeff0000, 0xfefdfdfe, 0x00010203, 0xfefefeff, - 0x01020304, 0x00000001, 0x01010202, 0x01010100, - 0xffffff00, 0x010000ff, 0xfefefefe, 0x0000fffe, - 0x0200ff01, 0x01fffe01, 0x0200ff01, 0x01fefe01, - 0x0300ff01, 0x01fffe02, 0x0300fe00, 0x01fefe02, - 0x0300fe00, 0x01fefe02, 0x0300fe00, 0x01fffe01, - 0x0200fe00, 0x01fefe01, 0x0200ff00, 0x01fffe01, - 0x02020100, 0x02020303, 0x02010100, 0x01020303, - 0x02010000, 0x01020202, 0x010000ff, 0x01010101, - 0x0000ffff, 0x00000000, 0xffffffff, 0xffffffff, - 0xfefefefe, 0xfffefefe, 0xfefefefe, 0xfffefefe, - 0xfeff0000, 0x050300ff, 0xffff0000, 0x040200ff, - 0x00000101, 0x0201ffff, 0x01010201, 0x00ffff00, - 0x01020100, 0xfefeff00, 0x020100ff, 0xfdfd0001, - 0x0201fffe, 0xfcfe0002, 0x0200fffe, 0xfdff0102, - 0x00000000, 0xffff0000, 0x00ff0000, 0x00000000, - 0xffffffff, 0x00000000, 0xffffffff, 0x00ffffff, - 0xffffffff, 0x00ffffff, 0x000000ff, 0x00ffff00, - 0x01010000, 0x01000000, 0x04030303, 0x03030303, - 0xfefe0105, 0xff000000, 0xfffdff04, 0xff000000, - 0x00ffff03, 0xff000101, 0x01000002, 0xfe000101, - 0x01000001, 0xfe000101, 0xffffff00, 0xff000000, - 0xffffff00, 0xff0000ff, 0x00000102, 0x00000100, - 0x01010001, 0x00000101, 0x01000001, 0x00000001, - 0x00ffff01, 0x00000000, 0xffff0002, 0x00ffffff, - 0xffff0103, 0xfffefefe, 0x00010204, 0xfffefeff, - 0x00000102, 0x0000ffff, 0xffffff00, 0x010100ff, - 0x02020100, 0xfdff0102, 0x01010000, 0xfeff0001, - 0x00000000, 0xffff0000, 0x00ff0000, 0x00010100, - 0x00ff0000, 0x01010101, 0x00000000, 0x00010101, - 0x01010000, 0xfdff0102, 0x01000000, 0xfbfcff01, - 0xfffefefe, 0x02020200, 0x00000000, 0x00010101, - 0x01010101, 0xfdfe0001, 0x01010000, 0xfcfdff00, - 0x0100ffff, 0xfdfe0000, 0x0100ffff, 0xff000101, - 0x01000000, 0x00010101, 0x01010101, 0x00000000, - 0x00000100, 0x02010101, 0x00000201, 0x01ff0000, - 0xff000200, 0x00ff0001, 0x00000100, 0x01000102, - 0x00ff0100, 0x01000202, 0xffff00ff, 0x02010102, - 0xfefdfefe, 0x01010100, 0xfdfdfefe, 0x00ffffff, - 0x0100fffd, 0x00010102, 0x0100fffd, 0x01010102, - 0x010000fe, 0x01010101, 0x000000ff, 0x00000000, - 0x000000fe, 0x00ffff00, 0x000000fe, 0xffff0000, - 0x010100fd, 0x01000101, 0x0100fefb, 0x02010202, - 0x00fffffe, 0x03020100, 0x01010000, 0x02010000, - 0x00010000, 0x0100ffff, 0xffffffff, 0x00fffefe, - 0xfefefefe, 0x0100fffe, 0xff000000, 0x02020100, - 0x00000102, 0x02020100, 0xff000102, 0x0000ffff, - 0x01010100, 0xfcff0101, 0x0100ffff, 0xfd000101, - 0x0000fffe, 0xfe020201, 0x000000ff, 0xff030200, - 0x000000ff, 0x00020100, 0xfeff0000, 0x000101ff, - 0xfeff0000, 0x010200fe, 0xfeff0000, 0x020201ff, - 0x00000001, 0xfdfefdfe, 0x00010000, 0xfffffefe, - 0x0101ff00, 0x0000ffff, 0x0101ff00, 0x0000ffff, - 0x01020100, 0x0100ffff, 0x02030201, 0x02010000, - 0x010200ff, 0x03020000, 0x0000fffe, 0x020100ff, - 0xff000101, 0x01fffefe, 0xff010101, 0x0200fefe, - 0xff010101, 0x0200ffff, 0x00000000, 0x02010000, - 0x00ffffff, 0x02010000, 0x01fffeff, 0x00000101, - 0x01fffeff, 0xff000202, 0x02fffeff, 0xff000202, - 0xfeffffff, 0x0100ffff, 0xffff0000, 0x020100ff, - 0x00000001, 0x02010100, 0x00000101, 0x01010101, - 0x01000101, 0x01010001, 0x01010101, 0xffffff00, - 0x00010201, 0xfdfefeff, 0x00010202, 0xfcfcfdfe, - 0x0101fefc, 0x00000101, 0x000100fe, 0x00000000, - 0xfe010100, 0x0100fffe, 0xfe010202, 0x0201fffe, - 0xfe010201, 0x0201fffe, 0xff0101ff, 0x0100ffff, - 0x010100fe, 0x00ffff00, 0x020200fe, 0x00ffff01, - 0x00000101, 0x00000100, 0xfefdfdfe, 0x0000fffe, - 0xfefdfcfd, 0x000000ff, 0x0100ffff, 0x01020302, - 0x03020100, 0x01020303, 0x02010101, 0xff000001, - 0x00000000, 0xffffffff, 0x00ffff00, 0x00000000, - 0x00000101, 0x0200ffff, 0x00010000, 0x0101ffff, - 0x0100fffe, 0x01010101, 0x0200fdfd, 0x00010102, - 0x0100fefe, 0x00000101, 0x00000001, 0xffff0000, - 0xfdff0103, 0x0100fffe, 0xfdff0204, 0x0201fffd, - 0xff000000, 0xffffffff, 0x00010201, 0xffff0000, - 0x02030302, 0xffff0001, 0x02040403, 0xfeff0001, - 0x01020303, 0xfefeff00, 0xff000101, 0xfdfefeff, - 0xff000000, 0xfefefeff, 0xffffffff, 0xfffefeff, - 0x02020201, 0x02020102, 0x01010100, 0x00000001, - 0x01000000, 0xfeff0001, 0x00000000, 0xfcff0001, - 0x00000001, 0xfbfe0000, 0x00000001, 0xfcff0000, - 0x00ff0001, 0xfdff0000, 0x00ffff00, 0xff010101, - 0x0000fffe, 0xfeffffff, 0x000000ff, 0xfefeffff, - 0x00010100, 0xfeffffff, 0x00010100, 0xffff0000, - 0x00000100, 0x00010101, 0x00000101, 0x01020201, - 0x00000101, 0x01020201, 0xff000101, 0x00010100, - 0x00010204, 0x01010100, 0x00010204, 0x01000000, - 0x00000103, 0x00ffffff, 0xff000001, 0x00fffeff, - 0x00000000, 0x00ffffff, 0x0000ffff, 0x0100ffff, - 0xff00fffe, 0x010000ff, 0xfefffefe, 0x010000ff, - 0x01010100, 0xff000102, 0x00ffffff, 0xfefeff00, - 0x00ff00ff, 0xfffeff00, 0x00000000, 0x02010000, - 0x00000000, 0x03020000, 0xffff00ff, 0x0300ffff, - 0xff0000ff, 0x0300feff, 0x00000000, 0x0401ffff, - 0x00000202, 0x01000000, 0xfeff0101, 0x01fffeff, - 0xfefeffff, 0x00fefdfe, 0xffff00ff, 0x01fffeff, - 0x00000101, 0x01000001, 0x00000202, 0x01000001, - 0x00000202, 0xffff0000, 0x00000202, 0xffff0001, - 0x010100ff, 0xffffff00, 0x02030201, 0x00000001, - 0x01010100, 0x0000ff00, 0x00fffefe, 0x00000001, - 0x02fffefe, 0x00010202, 0x0100fffe, 0xff000001, - 0x0000ffff, 0xfefffeff, 0x01010100, 0x01010000, - 0xfefdfdfd, 0xfefeffff, 0x0100ffff, 0x00000102, - 0x02010101, 0x00000102, 0x01010101, 0x01ff0001, - 0xffff0001, 0x01ff0000, 0xffffff00, 0x01ffff00, - 0x00ff0001, 0x0200ff00, 0x00ff0002, 0x02000000, - 0xfffe0001, 0x00010100, 0xffff0002, 0x00010100, - 0xfffe0001, 0xff000100, 0xffff0001, 0xff000100, - 0x00010100, 0x00000101, 0x010201fe, 0x01000000, - 0x010200fb, 0x0100ff00, 0x0102fffa, 0x0000ff00, - 0xff000305, 0xfffffffe, 0xff000101, 0xffff00ff, - 0x010100ff, 0x00010202, 0x0100fffe, 0x01010102, - 0xfffffffe, 0x0100ff00, 0x00000100, 0x0000ffff, - 0x01010100, 0x00000001, 0x0100fefd, 0xff000001, - 0x000100ff, 0x030200ff, 0xfe0000ff, 0x00fffefc, - 0x00010100, 0xff00fffe, 0x01030201, 0x00010100, - 0x010100ff, 0x00010101, 0x00fefdfe, 0x00010000, - 0x00fefeff, 0xff000001, 0x00000103, 0xffff0001, - 0x0000fffe, 0x0000ffff, 0x000000ff, 0x01010100, - 0x00ffffff, 0x01010101, 0xfffdfe00, 0x00000001, - 0xfffdff01, 0xff000101, 0x01ff0103, 0xff000202, - 0x01000103, 0x00010102, 0xfffefe00, 0x000000ff, - 0xffff0001, 0x00010201, 0xfffeff00, 0x01020201, - 0x00ffffff, 0x00020100, 0x000000fe, 0xff010000, - 0x000100ff, 0xffffffff, 0x02010100, 0x00fffe00, - 0x02020201, 0x00ffff01, 0x01010100, 0xfffefe00, - 0xffff0000, 0xfefeffff, 0x00ff0000, 0x01020201, - 0xffff0000, 0x02020100, 0xfeff0101, 0xffffffff, - 0x00010202, 0xfefeff00, 0x01020201, 0xfefe0000, - 0x00000000, 0xff000101, 0xffffff00, 0x01020302, - 0x0201fe00, 0x010000ff, 0x0302feff, 0x000000ff, - 0x0302fe00, 0x0000ffff, 0x0203ff00, 0x000100fe, - 0x0103ff00, 0x000100fe, 0x0102ff00, 0xff0001ff, - 0xff010000, 0xff0000fe, 0xfe000001, 0xfffffffe, - 0x01010101, 0xfeffff01, 0x01000000, 0x01010101, - 0x01000000, 0x03020101, 0xff000001, 0x02010000, - 0xfeffff00, 0x020100ff, 0xfefefefe, 0x010100ff, - 0xffffffff, 0xff000000, 0x00020202, 0xfcfeffff, - 0xfffffeff, 0x03020100, 0xffffffff, 0x03020100, - 0x00ff0001, 0x020100ff, 0x00000001, 0x020200ff, - 0xffff0001, 0x020100fe, 0xfefefe00, 0x0100fffd, - 0xfefefe00, 0x0101fffe, 0x00000000, 0x02020100 +static const int8 s_svq1IntraCodebook8x8[6144] = { + 4, 4, 3, 2, 2, 1, 0, -1, 4, 3, 3, 2, 1, 0, -1, -1, + 3, 3, 2, 2, 1, 0, -1, -2, 3, 2, 2, 1, 0, -1, -2, -3, + 2, 2, 1, 0, -1, -1, -2, -3, 2, 1, 0, 0, -1, -2, -3, -4, + 1, 0, 0, -1, -2, -3, -4, -4, 0, 0, -1, -2, -2, -3, -4, -4, + 2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 3, 3, + 1, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, + -1, 0, 0, 0, 0, 0, 1, 1, -2, -2, -1, -1, -1, -1, -1, -1, + -3, -3, -3, -3, -3, -3, -2, -2, -5, -4, -4, -4, -4, -4, -4, -3, + -4, -2, -1, 0, 1, 2, 2, 3, -4, -2, -1, 0, 1, 2, 3, 3, + -4, -3, -1, 0, 1, 2, 3, 3, -4, -3, -1, 0, 1, 2, 3, 3, + -5, -3, -1, 0, 1, 2, 3, 3, -5, -3, -1, 0, 1, 2, 3, 3, + -5, -3, -1, 0, 1, 1, 2, 3, -5, -3, -2, -1, 0, 1, 2, 3, + 4, 4, 5, 5, 6, 6, 7, 7, 2, 2, 2, 3, 3, 4, 4, 4, + 0, 0, 0, 0, 1, 1, 1, 2, -2, -2, -2, -2, -1, -1, -1, 0, + -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, + -1, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -2, -2, -2, -2, + 5, 3, 1, -1, -2, -3, -3, -3, 5, 3, 1, -1, -2, -3, -3, -3, + 5, 3, 1, -1, -2, -3, -3, -3, 5, 3, 1, -1, -2, -3, -3, -3, + 5, 4, 1, 0, -2, -3, -3, -3, 6, 4, 2, 0, -2, -2, -3, -3, + 6, 4, 2, 0, -1, -2, -2, -3, 6, 4, 2, 1, -1, -2, -2, -2, + -1, 1, 3, 3, 2, 0, -3, -6, -1, 1, 3, 4, 3, 0, -3, -6, + -1, 1, 4, 4, 3, 1, -3, -6, -1, 1, 3, 4, 3, 1, -3, -6, + -2, 1, 3, 4, 3, 1, -3, -6, -2, 1, 3, 4, 3, 1, -3, -7, + -2, 1, 3, 3, 2, 0, -3, -7, -2, 0, 2, 3, 2, 0, -3, -6, + 10, 9, 8, 6, 6, 5, 4, 4, 6, 5, 4, 3, 2, 2, 2, 1, + 2, 1, 0, -1, -2, -2, -2, -1, -1, -2, -3, -4, -4, -4, -4, -3, + -2, -3, -4, -4, -5, -4, -4, -3, -2, -2, -3, -3, -3, -3, -2, -2, + -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 2, + -2, -1, 1, 2, 4, 5, 7, 8, -3, -2, 0, 1, 3, 5, 7, 8, + -4, -3, -1, 0, 2, 4, 6, 7, -5, -4, -2, -1, 1, 3, 5, 7, + -6, -5, -3, -2, 0, 2, 4, 6, -6, -5, -4, -2, -1, 1, 3, 5, + -7, -6, -5, -3, -2, 0, 2, 3, -8, -7, -5, -4, -3, -1, 1, 2, + 11, 9, 7, 5, 3, 1, -1, -1, 10, 8, 6, 3, 1, 0, -2, -2, + 9, 7, 5, 2, 0, -2, -3, -4, 8, 6, 3, 1, -1, -3, -4, -4, + 6, 4, 2, -1, -3, -4, -5, -5, 5, 3, 0, -2, -4, -5, -6, -6, + 3, 1, -1, -3, -5, -6, -7, -7, 2, 0, -2, -4, -6, -6, -7, -7, + 5, 6, 7, 7, 7, 8, 8, 8, 3, 4, 5, 5, 6, 6, 6, 6, + 0, 2, 2, 3, 4, 4, 4, 5, -2, -1, 0, 1, 2, 2, 3, 3, + -4, -3, -2, -1, 0, 1, 1, 2, -6, -5, -4, -3, -2, -2, -1, 0, + -8, -7, -6, -6, -5, -4, -3, -3,-10, -9, -8, -8, -7, -6, -6, -5, + 6, 5, 3, 1, -1, -3, -6, -8, 6, 5, 4, 2, -1, -3, -6, -8, + 6, 5, 4, 2, 0, -3, -6, -8, 6, 5, 4, 2, 0, -3, -6, -8, + 6, 6, 4, 2, 0, -3, -6, -8, 6, 5, 4, 2, 0, -3, -6, -8, + 6, 5, 4, 2, 0, -3, -6, -8, 6, 5, 4, 2, -1, -3, -5, -8, + 11, 10, 9, 8, 7, 6, 5, 4, 8, 8, 7, 6, 5, 4, 3, 2, + 6, 5, 4, 4, 2, 2, 1, 0, 3, 3, 2, 1, 0, 0, -1, -2, + 1, 1, 0, -1, -2, -2, -3, -3, -1, -1, -2, -3, -4, -4, -5, -5, + -3, -4, -4, -5, -6, -6, -7, -7, -5, -5, -6, -7, -8, -8, -8, -8, + -14,-13,-12,-11, -9, -7, -6, -4,-12,-11,-10, -9, -7, -5, -3, -1, + -10, -9, -7, -6, -3, -2, 0, 2, -8, -6, -4, -2, 0, 2, 4, 5, + -5, -3, 0, 2, 4, 5, 7, 8, -2, 0, 2, 4, 6, 8, 9, 10, + 0, 3, 5, 7, 8, 10, 11, 12, 3, 5, 7, 8, 10, 11, 12, 12, + -19,-19,-18,-18,-17,-16,-15,-14,-15,-15,-14,-13,-12,-11,-10, -9, + -11,-10, -9, -8, -6, -5, -4, -3, -6, -5, -3, -2, -1, 0, 1, 2, + -1, 0, 2, 3, 4, 5, 6, 6, 4, 6, 7, 8, 9, 10, 10, 10, + 9, 10, 11, 12, 13, 14, 14, 14, 12, 14, 14, 15, 16, 16, 16, 16, + 22, 21, 19, 17, 14, 11, 9, 5, 20, 19, 17, 14, 11, 8, 4, 1, + 17, 15, 13, 10, 6, 3, 0, -4, 13, 11, 8, 5, 1, -2, -5, -9, + 9, 6, 3, -1, -4, -7,-11,-13, 4, 0, -3, -6, -9,-12,-15,-17, + -2, -5, -8,-11,-14,-16,-18,-20, -8,-10,-13,-16,-17,-19,-21,-22, + 17, 18, 18, 18, 17, 16, 16, 14, 16, 16, 15, 15, 14, 13, 12, 11, + 12, 12, 11, 10, 9, 8, 7, 5, 7, 6, 6, 4, 3, 2, 1, -1, + 1, 0, -1, -2, -3, -4, -5, -6, -5, -6, -7, -8, -9,-10,-11,-12, + -11,-12,-13,-14,-15,-16,-16,-17,-16,-17,-17,-18,-19,-20,-20,-20, + 0, 0, 0, 0, -1, -1, -2, -3, 1, 0, 0, 0, 0, -1, -2, -3, + 1, 1, 0, 0, -1, -1, -2, -2, 1, 1, 1, 0, 0, -1, -1, -2, + 2, 1, 1, 1, 0, -1, -1, -2, 2, 2, 1, 1, 0, 0, -1, -2, + 2, 2, 1, 1, 1, 0, -1, -1, 2, 2, 1, 1, 1, 0, 0, -2, + 0, -1, -1, 0, 0, 1, 2, 3, 0, -1, -1, 0, 1, 1, 2, 2, + -1, -1, -1, -1, 0, 1, 2, 2, -1, -1, -2, -1, 0, 1, 1, 2, + -1, -2, -2, -1, 0, 0, 1, 2, -1, -2, -2, -2, -1, 0, 1, 2, + -1, -1, -2, -1, 0, 0, 1, 2, -1, -1, -1, -1, 0, 1, 1, 2, + 3, 2, 2, 2, 1, 1, 0, 0, 3, 2, 2, 2, 2, 1, 0, 0, + 2, 2, 2, 1, 1, 1, 0, 0, 2, 2, 1, 1, 1, 0, 0, -1, + 1, 1, 1, 0, 0, 0, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, + -2, -2, -2, -2, -2, -2, -2, -2, -2, -3, -3, -3, -2, -2, -2, -2, + 5, 2, 0, 0, -1, 0, 0, 0, 4, 2, 0, -1, -1, -1, 0, -1, + 4, 1, -1, -1, -2, -1, -1, -1, 4, 1, -1, -1, -2, -1, -1, -1, + 4, 1, -1, -2, -2, -1, -1, -1, 4, 1, -1, -2, -2, -1, -1, -1, + 4, 1, -1, -1, -1, -1, -1, -1, 4, 2, 0, -1, 0, 0, 0, -1, + -2, -1, 0, 1, 1, 1, 1, 1, -3, -1, 0, 1, 1, 1, 1, 1, + -3, -1, 0, 1, 1, 1, 1, 1, -3, -1, 0, 1, 1, 1, 1, 1, + -3, -2, 0, 1, 2, 2, 1, 1, -4, -2, 0, 1, 2, 2, 2, 2, + -5, -3, -1, 1, 1, 2, 1, 2, -5, -3, -2, 0, 1, 1, 1, 1, + 3, 3, 1, 0, -2, -4, -4, -5, 3, 3, 2, 0, -1, -2, -3, -4, + 2, 2, 1, 1, 0, -1, -2, -2, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, -2, -1, -1, 0, 0, 1, 2, 2, + -3, -2, -2, -1, 0, 1, 2, 3, -3, -3, -2, -1, 0, 1, 2, 3, + -3, -3, -3, -3, -3, -2, -2, -2, -3, -3, -2, -2, -2, -1, -1, -1, + -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 2, 2, 2, 2, + 1, 1, 1, 2, 2, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, + -8, -7, -5, -3, -2, -1, 0, -1, -4, -3, -1, 0, 1, 2, 1, 1, + -1, 1, 2, 3, 3, 2, 2, 1, 1, 2, 3, 3, 2, 2, 1, 0, + 2, 3, 3, 2, 1, 0, 0, -1, 1, 2, 1, 0, -1, -1, -1, -1, + 1, 1, 0, -1, -1, -2, -2, -1, 1, 1, 0, 0, -1, -1, 0, -1, + -4, -3, -2, 0, 1, 2, 3, 3, -4, -3, -2, 0, 1, 2, 2, 2, + -3, -3, -2, -1, 0, 1, 1, 1, -2, -2, -2, -1, -1, 0, 0, 0, + 0, -1, -1, -1, -1, -1, -1, -1, 2, 1, 1, 0, 0, -1, -1, -2, + 3, 3, 3, 1, 0, -1, -2, -2, 5, 4, 4, 2, 1, 0, -1, -2, + 0, 0, 0, 0, 1, 2, 3, 3, 0, -1, 0, 0, 1, 2, 3, 3, + 0, -1, 0, 0, 1, 2, 3, 2, 0, 0, 0, 1, 1, 2, 2, 2, + 2, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 1, 0, 0, -1, -2, + 2, 1, 0, 0, -2, -3, -5, -6, 0, -1, -1, -3, -5, -6, -8, -9, + -2, 0, 1, 2, 2, 1, -1, -4, -2, 0, 2, 2, 2, 1, -1, -4, + -2, 0, 2, 2, 2, 1, -1, -3, -2, 0, 2, 2, 2, 1, -1, -3, + -2, -1, 2, 2, 2, 1, -1, -3, -2, -1, 1, 2, 2, 1, -1, -3, + -3, -1, 1, 2, 2, 1, -1, -3, -2, -1, 1, 2, 2, 1, -1, -3, + -1, 1, 1, -1, -3, -3, 0, 4, -1, 1, 1, -1, -3, -3, 0, 4, + -1, 1, 1, 0, -3, -3, 0, 4, -1, 1, 2, 0, -3, -3, 0, 5, + 0, 1, 2, 0, -3, -4, 0, 4, 0, 1, 2, 0, -3, -4, 0, 5, + 0, 1, 2, 0, -3, -3, 0, 4, 0, 1, 2, -1, -2, -2, 0, 4, + 6, 6, 5, 6, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -2, -2, -2, -2, + -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, + -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 0, 0, 0, 0, 0, + -1, -2, -2, -2, -2, -2, -2, -1, -3, -3, -3, -3, -3, -3, -3, -2, + -3, -4, -4, -3, -3, -3, -2, -2, -2, -2, -2, -2, -1, -1, 0, 0, + 0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, + 4, 1, -2, -3, -3, -1, 1, 3, 4, 1, -2, -4, -3, -1, 1, 3, + 5, 1, -2, -4, -3, -1, 1, 4, 5, 1, -2, -3, -3, -1, 2, 4, + 5, 1, -2, -3, -3, -1, 2, 4, 4, 0, -3, -4, -3, -1, 2, 4, + 4, 0, -3, -3, -3, -1, 1, 3, 3, 0, -2, -3, -2, -1, 1, 3, + -3, -4, -4, -4, -4, -4, -4, -4, -1, -1, -1, -1, -1, -1, -2, -2, + 2, 1, 1, 2, 2, 1, 1, 1, 3, 3, 3, 4, 4, 3, 3, 3, + 3, 3, 3, 4, 4, 4, 3, 3, 1, 2, 1, 2, 2, 2, 2, 2, + -2, -2, -2, -1, -1, -1, 0, 0, -4, -4, -4, -4, -3, -3, -3, -3, + -1, -2, -3, -3, -2, -2, -1, 0, 0, -1, -2, -2, -2, -1, 0, 1, + 2, 1, -1, -1, -1, -1, 0, 1, 3, 1, 0, -1, -1, 0, 0, 1, + 3, 2, 0, -1, 0, 0, 0, 1, 3, 1, 0, -1, 0, 0, 0, 1, + 3, 1, 0, -1, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 1, 1, 2, 3, 4, 0, 0, -1, 0, 0, 0, 2, 3, + 0, -1, -1, -1, -1, -1, 0, 1, 0, -1, -1, -1, -1, -1, -1, 0, + 0, 0, -1, -1, -1, -2, -2, -1, 1, 0, 0, -1, -1, -2, -2, -1, + 2, 2, 1, 0, -1, -1, -1, -1, 3, 3, 2, 1, 0, -1, -1, 0, + 1, 0, 1, 0, 0, -1, -2, -1, 0, 0, 0, 0, -1, -1, -2, -1, + 0, -1, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, + -1, -1, -1, 0, 0, 0, 1, 1, -1, -1, -1, 0, 1, 1, 2, 3, + -2, -2, -1, 0, 1, 2, 3, 4, -2, -2, -1, 0, 1, 2, 4, 5, + -3, -1, 1, 0, 0, -1, 0, 1, -3, 0, 1, 0, -1, -1, 0, 2, + -3, 0, 1, 0, -1, -1, 0, 2, -2, 1, 2, 0, -1, -1, 0, 2, + -2, 1, 2, 0, -1, -1, 0, 2, -2, 1, 2, 0, -1, -1, 0, 2, + -1, 2, 2, 0, -1, -1, 0, 2, -1, 1, 1, 0, -1, -1, -1, 1, + -2, -2, -1, 1, 3, 4, 3, 1, -2, -2, -1, 0, 2, 3, 2, 0, + -2, -2, -1, 0, 1, 2, 1, -1, -1, -1, -1, 0, 1, 2, 1, -1, + -1, -1, -1, 0, 1, 1, 0, -2, 0, -1, -1, 0, 1, 1, 0, -1, + 0, -1, -1, 0, 1, 1, 1, -1, 0, -1, -1, 0, 0, 1, 0, -1, + -2, -1, 0, 1, 1, 1, 1, 1, -2, -1, 0, 0, 0, 0, 0, 0, + -2, -1, -1, 0, -1, -1, -2, -2, -2, -1, -1, -1, -1, -2, -2, -3, + -1, 0, 1, 1, 0, -1, -2, -2, 1, 2, 3, 3, 2, 1, 0, 0, + 1, 2, 3, 3, 3, 2, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, + 0, -1, -1, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 0, 1, 1, 0, 0, 0, + -3, -2, -1, -1, -1, -1, 0, -1, -5, -5, -4, -3, -2, -2, -2, -1, + 1, 1, 1, 1, 2, 1, 0, -1, 1, 1, 1, 2, 1, 1, 0, -1, + 1, 1, 1, 1, 1, 1, 0, -2, 2, 1, 1, 1, 1, 1, 0, -2, + 1, 1, 0, 0, 0, 0, -1, -3, 1, 1, 0, 0, 0, -1, -2, -3, + 1, 1, 0, 0, -1, -1, -2, -4, 1, 0, 0, -1, -2, -2, -3, -4, + 8, 7, 5, 3, 2, 1, 1, 1, 2, 1, 0, 0, -1, -1, -2, -1, + -1, -1, -1, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, -1, -1, 0, + 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, + -1, 0, 0, 0, 0, 0, -1, -1, -2, -2, -1, -1, -1, -2, -2, -1, + 9, 4, 0, -2, -2, -2, -1, -1, 7, 2, -1, -2, -2, -1, 0, 0, + 4, 0, -2, -2, -1, 0, 1, 1, 1, -2, -2, -2, -1, 0, 1, 1, + -1, -2, -2, -1, 0, 1, 1, 1, -1, -2, -1, 0, 1, 1, 1, 0, + -1, -1, 0, 1, 1, 1, 0, -1, 0, -1, 0, 1, 0, 0, -1, -1, + 0, 1, 1, 1, 1, 1, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, + 2, 2, 2, 2, 1, 0, -1, -1, 1, 1, 1, 0, -1, -2, -2, -2, + 0, 0, 0, -1, -2, -3, -2, -2, -1, -1, -1, -2, -2, -2, -1, 0, + -1, -1, -1, -1, 0, 0, 1, 2, -1, -1, -1, 0, 1, 2, 3, 4, + -1, -1, 0, 0, -1, -2, -3, -3, -1, -1, 0, 0, 0, -1, -1, -1, + -2, -2, -1, 0, 1, 1, 1, 1, -2, -2, -2, 0, 1, 2, 3, 3, + -1, -1, -1, 0, 1, 3, 3, 3, 1, 0, 0, 0, 1, 1, 2, 2, + 2, 2, 1, 0, 0, -1, -1, -1, 3, 2, 1, 0, -1, -2, -3, -3, + -1, -1, -1, -2, -2, -3, -4, -5, 0, 0, 0, -1, -1, -3, -3, -4, + 1, 1, 1, 0, 0, -1, -2, -3, 2, 2, 2, 1, 1, 0, -1, -1, + 2, 2, 2, 2, 1, 1, 0, -1, 2, 2, 2, 2, 2, 1, 0, 0, + 1, 1, 2, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, -1, + -2, 2, 3, 1, -1, 1, 1, -1, -3, 2, 3, 0, -1, 1, 1, -1, + -3, 2, 3, 0, -1, 1, 1, -1, -4, 2, 3, 0, -1, 1, 1, -2, + -4, 1, 3, 0, -1, 1, 1, -2, -4, 1, 3, -1, -2, 1, 1, -2, + -3, 1, 2, 0, -1, 1, 1, -2, -3, 1, 2, 0, -1, 1, 1, -1, + -1, -1, -1, -2, -2, -2, -2, -2, 1, 1, 1, 1, 0, 0, 0, 0, + 1, 2, 2, 2, 2, 2, 2, 2, 0, 0, 1, 1, 1, 2, 2, 2, + -2, -2, -1, -1, -1, 0, 0, 0, -3, -3, -3, -3, -3, -3, -3, -2, + -1, -1, -1, -1, -2, -2, -2, -2, 4, 4, 4, 4, 4, 3, 3, 2, + -3, -3, -2, -1, 0, 1, 2, 5, -3, -3, -3, -2, -1, 1, 3, 6, + -3, -3, -2, -2, 0, 2, 3, 5, -3, -2, -2, -2, 0, 1, 3, 5, + -2, -2, -2, -1, -1, 1, 3, 5, -2, -2, -1, -1, 0, 1, 2, 4, + -1, -1, -1, -1, 0, 1, 1, 4, -1, -1, -1, -1, 0, 1, 2, 3, + 0, -1, 0, 1, 1, 0, -1, -1, 0, 0, 0, 1, 2, 0, -1, -1, + 1, 0, -1, 0, 1, 0, 0, 0, 1, -1, -2, -1, 0, 0, 0, 0, + 1, -2, -3, -1, 0, 0, 0, 1, 1, -1, -3, -2, 0, 1, 1, 2, + 1, -1, -2, -1, 0, 1, 1, 2, 2, 0, -1, 0, 1, 1, 2, 2, + 1, 1, 1, 1, 0, 0, 1, 2, -1, 0, 0, -1, 0, 0, 0, 1, + -3, -2, -1, -1, -1, 0, 1, 1, -4, -2, -1, 0, 0, 1, 1, 1, + -3, -2, 0, 0, 1, 1, 1, 1, -3, -1, 0, 1, 1, 1, 0, 0, + -1, 0, 1, 1, 1, 0, 0, -1, 0, 1, 2, 2, 1, 0, 0, -1, + -4, -4, -4, -3, -2, -1, -1, -1, -2, -2, -2, -1, 0, 0, 0, 0, + -1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, + 0, 0, 1, 1, 2, 2, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 1, 1, 1, 1, 0, -1, 0, 0, 1, 1, 1, 0, 0, + 1, 2, 2, 2, 1, -1, -2, -4, 1, 1, 2, 2, 1, 0, -2, -4, + 0, 1, 1, 1, 1, 0, -1, -3, -1, 0, 1, 1, 0, 0, -1, -2, + -1, 0, 1, 1, 1, 0, 0, -1, -2, -1, 0, 0, 0, 0, 0, -1, + -1, -1, 0, 1, 1, 0, 0, 0, -1, 0, 1, 1, 1, 1, 1, 0, + 2, 2, 0, -1, -2, -1, -1, -2, 1, 1, -1, -2, -2, -1, -1, -2, + 1, 1, -1, -2, -2, 0, 0, -1, 1, 1, 0, -2, -1, 1, 1, 0, + 1, 1, 0, -1, -1, 1, 2, 1, 1, 1, 0, -1, -1, 1, 2, 1, + 1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 0, -1, 0, 1, 1, 1, + 0, 0, -1, -2, -4, -4, -4, -4, 3, 3, 3, 2, 1, 0, 0, 0, + 3, 3, 3, 3, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 1, + -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, 0, -1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, + -1, -1, 0, -1, -1, 1, 2, -1, 1, 1, 0, 0, 0, 2, 3, -1, + 1, 1, 0, -1, -1, 1, 3, -1, 1, 1, 0, -2, -2, 0, 1, -2, + 1, 0, 0, -2, -2, 0, 1, -3, 0, 0, 0, 0, -1, 1, 1, -3, + 0, 1, 1, 0, 1, 2, 1, -3, -1, 0, 1, 1, 1, 2, 1, -4, + -4, -3, 0, 1, 1, 1, 0, 0, -4, -2, 0, 1, 1, 1, 0, -1, + -3, -1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 1, 1, 0, -1, 0, + 1, 2, 2, 1, 0, -1, 0, 0, 2, 2, 1, 0, -1, -1, 0, 1, + 2, 1, 0, -1, -2, -1, 0, 1, 2, 2, 0, -1, -2, -1, 1, 1, + 1, 1, 0, 0, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, + 1, 0, 0, -1, -1, -1, -1, -1, 2, 1, 0, 0, -1, -1, -1, -1, + 5, 3, 2, 1, 0, 0, 0, 0, 6, 5, 3, 2, 1, 0, 0, 0, + 4, 4, 3, 1, 0, 0, 0, 1, 3, 3, 2, 1, 0, 0, 0, 1, + 2, 2, 1, 0, -1, -1, 0, 1, 0, 0, 0, -1, -1, -1, 0, 1, + 0, 0, -1, -1, -2, -1, 0, 2, 0, -1, -1, -2, -2, -2, 0, 1, + 0, -1, -1, -2, -2, -2, -1, 0, 0, 0, -1, -2, -2, -2, -1, 0, + 0, 0, -1, -1, -1, 0, 2, 3, 0, -1, -2, -2, -1, -1, 1, 2, + 1, 0, -1, -1, -1, 0, 0, 0, 1, 1, 1, 0, 0, 0, -1, -1, + 1, 2, 1, 0, 0, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, + -3, -2, -1, -1, 0, 1, 1, 2, -4, -3, -1, 1, 2, 3, 5, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, -1, 0, 0, 0, 1, -1, -1, -2, -2, -2, -1, -1, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, + 1, 1, 1, 1, 2, 2, 1, 1, -4, -3, -4, -4, -4, -4, -3, -3, + -1, 0, 1, 2, 2, 3, 3, 3, -1, -1, -1, -1, 0, 0, 0, 0, + 0, 0, -1, -2, -2, -3, -3, -2, 3, 2, 1, 0, -1, -2, -2, -2, + 4, 3, 2, 1, 1, 0, 0, 0, 2, 2, 1, 1, 0, 1, 1, 1, + 0, -1, -1, -1, -1, 0, 0, 1, -2, -2, -2, -2, -2, -1, 0, 0, + 1, -1, 0, 2, 1, -2, -1, 1, 1, -1, 0, 2, 1, -2, -2, 1, + 1, -1, 0, 3, 2, -2, -1, 1, 0, -2, 0, 3, 2, -2, -2, 1, + 0, -2, 0, 3, 2, -2, -2, 1, 0, -2, 0, 3, 1, -2, -1, 1, + 0, -2, 0, 2, 1, -2, -2, 1, 0, -1, 0, 2, 1, -2, -1, 1, + 0, 1, 2, 2, 3, 3, 2, 2, 0, 1, 1, 2, 3, 3, 2, 1, + 0, 0, 1, 2, 2, 2, 2, 1, -1, 0, 0, 1, 1, 1, 1, 1, + -1, -1, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, + -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, -2, -2, -2, -2, -1, + 0, 0, -1, -2, -1, 0, 3, 5, 0, 0, -1, -1, -1, 0, 2, 4, + 1, 1, 0, 0, -1, -1, 1, 2, 1, 2, 1, 1, 0, -1, -1, 0, + 0, 1, 2, 1, 0, -1, -2, -2, -1, 0, 1, 2, 1, 0, -3, -3, + -2, -1, 1, 2, 2, 0, -2, -4, -2, -1, 0, 2, 2, 1, -1, -3, + 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, -1, 0, 0, 0, 0, 0, + -1, -1, -1, -1, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, + -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, 0, 0, 0, -1, -1, 0, + 0, 0, 1, 1, 0, 0, 0, 1, 3, 3, 3, 4, 3, 3, 3, 3, + 5, 1, -2, -2, 0, 0, 0, -1, 4, -1, -3, -1, 0, 0, 0, -1, + 3, -1, -1, 0, 1, 1, 0, -1, 2, 0, 0, 1, 1, 1, 0, -2, + 1, 0, 0, 1, 1, 1, 0, -2, 0, -1, -1, -1, 0, 0, 0, -1, + 0, -1, -1, -1, -1, 0, 0, -1, 2, 1, 0, 0, 0, 1, 0, 0, + 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, + 1, -1, -1, 0, 0, 0, 0, 0, 2, 0, -1, -1, -1, -1, -1, 0, + 3, 1, -1, -1, -2, -2, -2, -1, 4, 2, 1, 0, -1, -2, -2, -1, + 2, 1, 0, 0, -1, -1, 0, 0, 0, -1, -1, -1, -1, 0, 1, 1, + 0, 1, 2, 2, 2, 1, -1, -3, 0, 0, 1, 1, 1, 0, -1, -2, + 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, -1, 0, 0, 1, 1, 0, + 0, 0, -1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, + 0, 0, 1, 1, 2, 1, -1, -3, 0, 0, 0, 1, 1, -1, -4, -5, + -2, -2, -2, -1, 0, 2, 2, 2, 0, 0, 0, 0, 1, 1, 1, 0, + 1, 1, 1, 1, 1, 0, -2, -3, 0, 0, 1, 1, 0, -1, -3, -4, + -1, -1, 0, 1, 0, 0, -2, -3, -1, -1, 0, 1, 1, 1, 0, -1, + 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 1, 0, 0, 1, 1, 1, 2, 1, 2, 0, 0, 0, 0, -1, 1, + 0, 2, 0, -1, 1, 0, -1, 0, 0, 1, 0, 0, 2, 1, 0, 1, + 0, 1, -1, 0, 2, 2, 0, 1, -1, 0, -1, -1, 2, 1, 1, 2, + -2, -2, -3, -2, 0, 1, 1, 1, -2, -2, -3, -3, -1, -1, -1, 0, + -3, -1, 0, 1, 2, 1, 1, 0, -3, -1, 0, 1, 2, 1, 1, 1, + -2, 0, 0, 1, 1, 1, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, + -2, 0, 0, 0, 0, -1, -1, 0, -2, 0, 0, 0, 0, 0, -1, -1, + -3, 0, 1, 1, 1, 1, 0, 1, -5, -2, 0, 1, 2, 2, 1, 2, + -2, -1, -1, 0, 0, 1, 2, 3, 0, 0, 1, 1, 0, 0, 1, 2, + 0, 0, 1, 0, -1, -1, 0, 1, -1, -1, -1, -1, -2, -2, -1, 0, + -2, -2, -2, -2, -2, -1, 0, 1, 0, 0, 0, -1, 0, 1, 2, 2, + 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, -1, -1, -1, 0, 0, + 0, 1, 1, 1, 1, 1, -1, -4, -1, -1, 0, 1, 1, 1, 0, -3, + -2, -1, 0, 0, 1, 2, 2, -2, -1, 0, 0, 0, 0, 2, 3, -1, + -1, 0, 0, 0, 0, 1, 2, 0, 0, 0, -1, -2, -1, 1, 1, 0, + 0, 0, -1, -2, -2, 0, 2, 1, 0, 0, -1, -2, -1, 1, 2, 2, + 1, 0, 0, 0, -2, -3, -2, -3, 0, 0, 1, 0, -2, -2, -1, -1, + 0, -1, 1, 1, -1, -1, 0, 0, 0, -1, 1, 1, -1, -1, 0, 0, + 0, 1, 2, 1, -1, -1, 0, 1, 1, 2, 3, 2, 0, 0, 1, 2, + -1, 0, 2, 1, 0, 0, 2, 3, -2, -1, 0, 0, -1, 0, 1, 2, + 1, 1, 0, -1, -2, -2, -1, 1, 1, 1, 1, -1, -2, -2, 0, 2, + 1, 1, 1, -1, -1, -1, 0, 2, 0, 0, 0, 0, 0, 0, 1, 2, + -1, -1, -1, 0, 0, 0, 1, 2, -1, -2, -1, 1, 1, 1, 0, 0, + -1, -2, -1, 1, 2, 2, 0, -1, -1, -2, -1, 2, 2, 2, 0, -1, + -1, -1, -1, -2, -1, -1, 0, 1, 0, 0, -1, -1, -1, 0, 1, 2, + 1, 0, 0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, + 1, 2, 1, 0, -1, -2, -2, -3, 2, 2, 1, 0, -2, -3, -4, -4, + -4, -2, 1, 1, 1, 1, 0, 0, -2, 0, 1, 0, 0, 0, 0, 0, + 0, 1, 1, -2, -2, -1, 0, 1, 2, 2, 1, -2, -2, -1, 1, 2, + 1, 2, 1, -2, -2, -1, 1, 2, -1, 1, 1, -1, -1, -1, 0, 1, + -2, 0, 1, 1, 0, -1, -1, 0, -2, 0, 2, 2, 1, -1, -1, 0, + 1, 1, 0, 0, 0, 1, 0, 0, -2, -3, -3, -2, -2, -1, 0, 0, + -3, -4, -3, -2, -1, 0, 0, 0, -1, -1, 0, 1, 2, 3, 2, 1, + 0, 1, 2, 3, 3, 3, 2, 1, 1, 1, 1, 2, 1, 0, 0, -1, + 0, 0, 0, 0, -1, -1, -1, -1, 0, -1, -1, 0, 0, 0, 0, 0, + 1, 1, 0, 0, -1, -1, 0, 2, 0, 0, 1, 0, -1, -1, 1, 1, + -2, -1, 0, 1, 1, 1, 1, 1, -3, -3, 0, 2, 2, 1, 1, 0, + -2, -2, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, -1, -1, + 3, 1, -1, -3, -2, -1, 0, 1, 4, 2, -1, -3, -3, -1, 1, 2, + 0, 0, 0, -1, -1, -1, -1, -1, 1, 2, 1, 0, 0, 0, -1, -1, + 2, 3, 3, 2, 1, 0, -1, -1, 3, 4, 4, 2, 1, 0, -1, -2, + 3, 3, 2, 1, 0, -1, -2, -2, 1, 1, 0, -1, -1, -2, -2, -3, + 0, 0, 0, -1, -1, -2, -2, -2, -1, -1, -1, -1, -1, -2, -2, -1, + 1, 2, 2, 2, 2, 1, 2, 2, 0, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 1, 1, 0, -1, -2, 0, 0, 0, 0, 1, 0, -1, -4, + 1, 0, 0, 0, 0, 0, -2, -5, 1, 0, 0, 0, 0, 0, -1, -4, + 1, 0, -1, 0, 0, 0, -1, -3, 0, -1, -1, 0, 1, 1, 1, -1, + -2, -1, 0, 0, -1, -1, -1, -2, -1, 0, 0, 0, -1, -1, -2, -2, + 0, 1, 1, 0, -1, -1, -1, -2, 0, 1, 1, 0, 0, 0, -1, -1, + 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 2, 2, 1, + 1, 1, 0, 0, 1, 2, 2, 1, 1, 1, 0, -1, 0, 1, 1, 0, + 4, 2, 1, 0, 0, 1, 1, 1, 4, 2, 1, 0, 0, 0, 0, 1, + 3, 1, 0, 0, -1, -1, -1, 0, 1, 0, 0, -1, -1, -2, -1, 0, + 0, 0, 0, 0, -1, -1, -1, 0, -1, -1, 0, 0, -1, -1, 0, 1, + -2, -1, 0, -1, -1, 0, 0, 1, -2, -2, -1, -2, -1, 0, 0, 1, + 0, 1, 1, 1, 2, 1, 0, -1, -1, -1, -1, 0, 0, -1, -2, -2, + -1, 0, -1, 0, 0, -1, -2, -1, 0, 0, 0, 0, 0, 0, 1, 2, + 0, 0, 0, 0, 0, 0, 2, 3, -1, 0, -1, -1, -1, -1, 0, 3, + -1, 0, 0, -1, -1, -2, 0, 3, 0, 0, 0, 0, -1, -1, 1, 4, + 2, 2, 0, 0, 0, 0, 0, 1, 1, 1, -1, -2, -1, -2, -1, 1, + -1, -1, -2, -2, -2, -3, -2, 0, -1, 0, -1, -1, -1, -2, -1, 1, + 1, 1, 0, 0, 1, 0, 0, 1, 2, 2, 0, 0, 1, 0, 0, 1, + 2, 2, 0, 0, 0, 0, -1, -1, 2, 2, 0, 0, 1, 0, -1, -1, + -1, 0, 1, 1, 0, -1, -1, -1, 1, 2, 3, 2, 1, 0, 0, 0, + 0, 1, 1, 1, 0, -1, 0, 0, -2, -2, -1, 0, 1, 0, 0, 0, + -2, -2, -1, 2, 2, 2, 1, 0, -2, -1, 0, 1, 1, 0, 0, -1, + -1, -1, 0, 0, -1, -2, -1, -2, 0, 1, 1, 1, 0, 0, 1, 1, + -3, -3, -3, -2, -1, -1, -2, -2, -1, -1, 0, 1, 2, 1, 0, 0, + 1, 1, 1, 2, 2, 1, 0, 0, 1, 1, 1, 1, 1, 0, -1, 1, + 1, 0, -1, -1, 0, 0, -1, 1, 0, -1, -1, -1, 0, -1, -1, 1, + 1, 0, -1, 0, 0, -1, 0, 2, 2, 0, -1, 0, 0, 0, 0, 2, + 1, 0, -2, -1, 0, 1, 1, 0, 2, 0, -1, -1, 0, 1, 1, 0, + 1, 0, -2, -1, 0, 1, 0, -1, 1, 0, -1, -1, 0, 1, 0, -1, + 0, 1, 1, 0, 1, 1, 0, 0, -2, 1, 2, 1, 0, 0, 0, 1, + -5, 0, 2, 1, 0, -1, 0, 1, -6, -1, 2, 1, 0, -1, 0, 0, + 5, 3, 0, -1, -2, -1, -1, -1, 1, 1, 0, -1, -1, 0, -1, -1, + -1, 0, 1, 1, 2, 2, 1, 0, -2, -1, 0, 1, 2, 1, 1, 1, + -2, -1, -1, -1, 0, -1, 0, 1, 0, 1, 0, 0, -1, -1, 0, 0, + 0, 1, 1, 1, 1, 0, 0, 0, -3, -2, 0, 1, 1, 0, 0, -1, + -1, 0, 1, 0, -1, 0, 2, 3, -1, 0, 0, -2, -4, -2, -1, 0, + 0, 1, 1, 0, -2, -1, 0, -1, 1, 2, 3, 1, 0, 1, 1, 0, + -1, 0, 1, 1, 1, 1, 1, 0, -2, -3, -2, 0, 0, 0, 1, 0, + -1, -2, -2, 0, 1, 0, 0, -1, 3, 1, 0, 0, 1, 0, -1, -1, + -2, -1, 0, 0, -1, -1, 0, 0, -1, 0, 0, 0, 0, 1, 1, 1, + -1, -1, -1, 0, 1, 1, 1, 1, 0, -2, -3, -1, 1, 0, 0, 0, + 1, -1, -3, -1, 1, 1, 0, -1, 3, 1, -1, 1, 2, 2, 0, -1, + 3, 1, 0, 1, 2, 1, 1, 0, 0, -2, -2, -1, -1, 0, 0, 0, + 1, 0, -1, -1, 1, 2, 1, 0, 0, -1, -2, -1, 1, 2, 2, 1, + -1, -1, -1, 0, 0, 1, 2, 0, -2, 0, 0, 0, 0, 0, 1, -1, + -1, 0, 1, 0, -1, -1, -1, -1, 0, 1, 1, 2, 0, -2, -1, 0, + 1, 2, 2, 2, 1, -1, -1, 0, 0, 1, 1, 1, 0, -2, -2, -1, + 0, 0, -1, -1, -1, -1, -2, -2, 0, 0, -1, 0, 1, 2, 2, 1, + 0, 0, -1, -1, 0, 1, 2, 2, 1, 1, -1, -2, -1, -1, -1, -1, + 2, 2, 1, 0, 0, -1, -2, -2, 1, 2, 2, 1, 0, 0, -2, -2, + 0, 0, 0, 0, 1, 1, 0, -1, 0, -1, -1, -1, 2, 3, 2, 1, + 0, -2, 1, 2, -1, 0, 0, 1, -1, -2, 2, 3, -1, 0, 0, 0, + 0, -2, 2, 3, -1, -1, 0, 0, 0, -1, 3, 2, -2, 0, 1, 0, + 0, -1, 3, 1, -2, 0, 1, 0, 0, -1, 2, 1, -1, 1, 0, -1, + 0, 0, 1, -1, -2, 0, 0, -1, 1, 0, 0, -2, -2, -1, -1, -1, + 1, 1, 1, 1, 1, -1, -1, -2, 0, 0, 0, 1, 1, 1, 1, 1, + 0, 0, 0, 1, 1, 1, 2, 3, 1, 0, 0, -1, 0, 0, 1, 2, + 0, -1, -1, -2, -1, 0, 1, 2, -2, -2, -2, -2, -1, 0, 1, 1, + -1, -1, -1, -1, 0, 0, 0, -1, 2, 2, 2, 0, -1, -1, -2, -4, + -1, -2, -1, -1, 0, 1, 2, 3, -1, -1, -1, -1, 0, 1, 2, 3, + 1, 0, -1, 0, -1, 0, 1, 2, 1, 0, 0, 0, -1, 0, 2, 2, + 1, 0, -1, -1, -2, 0, 1, 2, 0, -2, -2, -2, -3, -1, 0, 1, + 0, -2, -2, -2, -2, -1, 1, 1, 0, 0, 0, 0, 0, 1, 2, 2 }; -const uint32 *const s_svq1IntraCodebooks[6] = { +static const int8 *const s_svq1IntraCodebooks[6] = { s_svq1IntraCodebook4x2, s_svq1IntraCodebook4x4, s_svq1IntraCodebook8x4, s_svq1IntraCodebook8x8, 0, 0 -- cgit v1.2.3 From cd5e750a7fdfa0c2ac7904d24b7d8e5a06eff99a Mon Sep 17 00:00:00 2001 From: Littleboy Date: Mon, 13 Aug 2012 00:05:38 -0400 Subject: LASTEXPRESS: Fix analysis warnings --- engines/lastexpress/data/background.cpp | 1 + engines/lastexpress/debug.cpp | 3 +++ engines/lastexpress/sound/queue.cpp | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/engines/lastexpress/data/background.cpp b/engines/lastexpress/data/background.cpp index 3d866c26f9..60379251a3 100644 --- a/engines/lastexpress/data/background.cpp +++ b/engines/lastexpress/data/background.cpp @@ -107,6 +107,7 @@ byte *Background::decodeComponent(Common::SeekableReadStream *in, uint32 inSize, return NULL; // Initialize the decoding + memset(out, 0, outSize * sizeof(byte)); uint32 inPos = 0; uint32 outPos = 0; diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp index f89ad8b80d..55fb469da3 100644 --- a/engines/lastexpress/debug.cpp +++ b/engines/lastexpress/debug.cpp @@ -139,6 +139,9 @@ void Debugger::copyCommand(int argc, const char **argv) { for (int i = 0; i < _numParams; i++) { _commandParams[i] = (char *)malloc(strlen(argv[i]) + 1); + if (_commandParams[i] == NULL) + error("[Debugger::copyCommand] Cannot allocate memory for command parameters"); + memset(_commandParams[i], 0, strlen(argv[i]) + 1); strcpy(_commandParams[i], argv[i]); } diff --git a/engines/lastexpress/sound/queue.cpp b/engines/lastexpress/sound/queue.cpp index d72acfd8a0..8904b48930 100644 --- a/engines/lastexpress/sound/queue.cpp +++ b/engines/lastexpress/sound/queue.cpp @@ -67,6 +67,8 @@ void SoundQueue::handleTimer() { for (Common::List::iterator i = _soundList.begin(); i != _soundList.end(); ++i) { SoundEntry *entry = (*i); + if (entry == NULL) + error("[SoundQueue::handleTimer] Invalid entry found in sound queue"); // When the entry has stopped playing, we remove his buffer if (entry->isFinished()) { @@ -123,6 +125,8 @@ void SoundQueue::updateQueue() { for (Common::List::iterator it = _soundList.begin(); it != _soundList.end(); ++it) { SoundEntry *entry = *it; + if (entry == NULL) + error("[SoundQueue::updateQueue] Invalid entry found in sound queue"); // Original removes the entry data from the cache and sets the archive as not loaded // and if the sound data buffer is not full, loads a new entry to be played based on @@ -179,6 +183,8 @@ void SoundQueue::clearQueue() { for (Common::List::iterator i = _soundList.begin(); i != _soundList.end(); ++i) { SoundEntry *entry = (*i); + if (entry == NULL) + error("[SoundQueue::clearQueue] Invalid entry found in sound queue"); // Delete entry entry->close(); -- cgit v1.2.3 From 47fa7abbe00fb923be4053ae2a19e41a8d7753b9 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 19 Aug 2012 19:24:25 -0400 Subject: LASTEXPRESS: Fix playsnd debugger command --- engines/lastexpress/debug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp index 55fb469da3..fae9ea7ceb 100644 --- a/engines/lastexpress/debug.cpp +++ b/engines/lastexpress/debug.cpp @@ -523,7 +523,7 @@ bool Debugger::cmdPlaySnd(int argc, const char **argv) { _engine->_system->getMixer()->stopAll(); - _soundStream->load(getArchive(name)); + _soundStream->load(getArchive(name), 16); if (argc == 3) restoreArchive(); -- cgit v1.2.3 From 17c051b58c00cc1424978fc886bcd8b4cd18356c Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 19 Aug 2012 19:41:25 -0400 Subject: LASTEXPRESS: Check for invalid cd number in debugger commands --- engines/lastexpress/debug.cpp | 61 ++++++++++++++++++++++++++++++------------- engines/lastexpress/debug.h | 2 +- 2 files changed, 44 insertions(+), 19 deletions(-) diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp index fae9ea7ceb..21bf0119c4 100644 --- a/engines/lastexpress/debug.cpp +++ b/engines/lastexpress/debug.cpp @@ -155,9 +155,18 @@ void Debugger::callCommand() { (*_command)(_numParams, const_cast(_commandParams)); } -void Debugger::loadArchive(ArchiveIndex index) const { - _engine->getResourceManager()->loadArchive(index); +bool Debugger::loadArchive(ArchiveIndex index) { + if (index < 1 || index > 3) { + DebugPrintf("Invalid cd number (was: %d, valid: [1-3])\n", index); + return false; + } + + if (!_engine->getResourceManager()->loadArchive(index)) + return false; + getScenes()->loadSceneDataFile(index); + + return true; } // Restore loaded archive @@ -236,8 +245,10 @@ bool Debugger::cmdListFiles(int argc, const char **argv) { Common::String filter(const_cast(argv[1])); // Load the proper archive - if (argc == 3) - loadArchive((ArchiveIndex)getNumber(argv[2])); + if (argc == 3) { + if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + return true; + } Common::ArchiveMemberList list; int count = _engine->getResourceManager()->listMatchingMembers(list, filter); @@ -320,8 +331,10 @@ bool Debugger::cmdShowFrame(int argc, const char **argv) { Common::String filename(const_cast(argv[1])); filename += ".seq"; - if (argc == 4) - loadArchive((ArchiveIndex)getNumber(argv[3])); + if (argc == 4) { + if (!loadArchive((ArchiveIndex)getNumber(argv[3]))) + return true; + } if (!_engine->getResourceManager()->hasFile(filename)) { DebugPrintf("Cannot find file: %s\n", filename.c_str()); @@ -380,8 +393,10 @@ bool Debugger::cmdShowBg(int argc, const char **argv) { if (argc == 2 || argc == 3) { Common::String filename(const_cast(argv[1])); - if (argc == 3) - loadArchive((ArchiveIndex)getNumber(argv[2])); + if (argc == 3) { + if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + return true; + } if (!_engine->getResourceManager()->hasFile(filename + ".BG")) { DebugPrintf("Cannot find file: %s\n", (filename + ".BG").c_str()); @@ -433,8 +448,10 @@ bool Debugger::cmdPlaySeq(int argc, const char **argv) { Common::String filename(const_cast(argv[1])); filename += ".seq"; - if (argc == 3) - loadArchive((ArchiveIndex)getNumber(argv[2])); + if (argc == 3) { + if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + return true; + } if (!_engine->getResourceManager()->hasFile(filename)) { DebugPrintf("Cannot find file: %s\n", filename.c_str()); @@ -508,8 +525,10 @@ bool Debugger::cmdPlaySeq(int argc, const char **argv) { bool Debugger::cmdPlaySnd(int argc, const char **argv) { if (argc == 2 || argc == 3) { - if (argc == 3) - loadArchive((ArchiveIndex)getNumber(argv[2])); + if (argc == 3) { + if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + return true; + } // Add .SND at the end of the filename if needed Common::String name(const_cast(argv[1])); @@ -545,8 +564,10 @@ bool Debugger::cmdPlaySbe(int argc, const char **argv) { if (argc == 2 || argc == 3) { Common::String filename(const_cast(argv[1])); - if (argc == 3) - loadArchive((ArchiveIndex)getNumber(argv[2])); + if (argc == 3) { + if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + return true; + } filename += ".sbe"; @@ -608,8 +629,10 @@ bool Debugger::cmdPlayNis(int argc, const char **argv) { if (argc == 2 || argc == 3) { Common::String name(const_cast(argv[1])); - if (argc == 3) - loadArchive((ArchiveIndex)getNumber(argv[2])); + if (argc == 3) { + if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + return true; + } // If we got a nis filename, check that the file exists if (name.contains('.') && !_engine->getResourceManager()->hasFile(name)) { @@ -665,8 +688,10 @@ bool Debugger::cmdLoadScene(int argc, const char **argv) { SceneIndex index = (SceneIndex)getNumber(argv[1]); // Check args - if (argc == 3) - loadArchive((ArchiveIndex)getNumber(argv[2])); + if (argc == 3) { + if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + return true; + } if (index > 2500) { DebugPrintf("Error: invalid index value (0-2500)"); diff --git a/engines/lastexpress/debug.h b/engines/lastexpress/debug.h index d9ba6f47a1..06534f4bc0 100644 --- a/engines/lastexpress/debug.h +++ b/engines/lastexpress/debug.h @@ -87,7 +87,7 @@ private: void copyCommand(int argc, const char **argv); int getNumber(const char *arg) const; - void loadArchive(ArchiveIndex index) const; + bool loadArchive(ArchiveIndex index); void restoreArchive() const; Debuglet *_command; -- cgit v1.2.3 From 6f18ec2104b5cf02ebeb0c928a5c2507c99d820d Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 19 Aug 2012 19:58:30 -0400 Subject: LASTEXPRESS: Identify some Abbot Chapter 3 functions --- engines/lastexpress/entities/abbot.cpp | 24 ++++++++++++------------ engines/lastexpress/entities/abbot.h | 8 ++++---- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp index e0fe429520..85d0d8948b 100644 --- a/engines/lastexpress/entities/abbot.cpp +++ b/engines/lastexpress/entities/abbot.cpp @@ -58,10 +58,10 @@ Abbot::Abbot(LastExpressEngine *engine) : Entity(engine, kEntityAbbot) { ADD_CALLBACK_FUNCTION(Abbot, chapter2); ADD_CALLBACK_FUNCTION(Abbot, chapter3); ADD_CALLBACK_FUNCTION(Abbot, chapter3Handler); - ADD_CALLBACK_FUNCTION(Abbot, function19); - ADD_CALLBACK_FUNCTION(Abbot, function20); - ADD_CALLBACK_FUNCTION(Abbot, function21); - ADD_CALLBACK_FUNCTION(Abbot, function22); + ADD_CALLBACK_FUNCTION(Abbot, conversationWithBoutarel); + ADD_CALLBACK_FUNCTION(Abbot, readPaper); + ADD_CALLBACK_FUNCTION(Abbot, goToLunch); + ADD_CALLBACK_FUNCTION(Abbot, haveLunch); ADD_CALLBACK_FUNCTION(Abbot, function23); ADD_CALLBACK_FUNCTION(Abbot, function24); ADD_CALLBACK_FUNCTION(Abbot, function25); @@ -259,7 +259,7 @@ IMPLEMENT_FUNCTION(18, Abbot, chapter3Handler) getData()->entityPosition = kPosition_6470; getData()->location = kLocationInsideCompartment; - setup_function19(); + setup_conversationWithBoutarel(); break; } break; @@ -272,7 +272,7 @@ IMPLEMENT_FUNCTION(18, Abbot, chapter3Handler) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(19, Abbot, function19) +IMPLEMENT_FUNCTION(19, Abbot, conversationWithBoutarel) switch (savepoint.action) { default: break; @@ -311,21 +311,21 @@ IMPLEMENT_FUNCTION(19, Abbot, function19) case 3: getSavePoints()->push(kEntityAbbot, kEntityBoutarel, kAction122288808); - setup_function20(); + setup_readPaper(); break; } } IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(20, Abbot, function20) +IMPLEMENT_FUNCTION(20, Abbot, readPaper) switch (savepoint.action) { default: break; case kActionNone: if (getState()->time > kTime1966500 && getEntities()->isInRestaurant(kEntityBoutarel)) - setup_function21(); + setup_goToLunch(); break; case kActionDefault: @@ -335,7 +335,7 @@ IMPLEMENT_FUNCTION(20, Abbot, function20) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(21, Abbot, function21) +IMPLEMENT_FUNCTION(21, Abbot, goToLunch) switch (savepoint.action) { default: break; @@ -393,7 +393,7 @@ IMPLEMENT_FUNCTION(21, Abbot, function21) break; case 7: - setup_function22(); + setup_haveLunch(); break; } break; @@ -409,7 +409,7 @@ IMPLEMENT_FUNCTION(21, Abbot, function21) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(22, Abbot, function22) +IMPLEMENT_FUNCTION(22, Abbot, haveLunch) switch (savepoint.action) { default: break; diff --git a/engines/lastexpress/entities/abbot.h b/engines/lastexpress/entities/abbot.h index ce52bb68ce..dc3e86db54 100644 --- a/engines/lastexpress/entities/abbot.h +++ b/engines/lastexpress/entities/abbot.h @@ -156,10 +156,10 @@ public: * Handle Chapter 3 events */ DECLARE_FUNCTION(chapter3Handler) - DECLARE_FUNCTION(function19) - DECLARE_FUNCTION(function20) - DECLARE_FUNCTION(function21) - DECLARE_FUNCTION(function22) + DECLARE_FUNCTION(conversationWithBoutarel) + DECLARE_FUNCTION(readPaper) + DECLARE_FUNCTION(goToLunch) + DECLARE_FUNCTION(haveLunch) DECLARE_FUNCTION(function23) DECLARE_FUNCTION(function24) DECLARE_FUNCTION(function25) -- cgit v1.2.3 From 86febf3d1dfd780c35c505accc55df28c1ac80c3 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Tue, 21 Aug 2012 22:41:55 -0400 Subject: LASTEXPRESS: Check for valid data in Beetle::invertDirection() --- engines/lastexpress/game/beetle.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/lastexpress/game/beetle.cpp b/engines/lastexpress/game/beetle.cpp index 2a72459697..7cdd67caf5 100644 --- a/engines/lastexpress/game/beetle.cpp +++ b/engines/lastexpress/game/beetle.cpp @@ -351,6 +351,9 @@ void Beetle::drawUpdate() { } void Beetle::invertDirection() { + if (!_data) + error("[Beetle::invertDirection] Sequences have not been loaded"); + switch (_data->indexes[_data->offset]) { default: break; -- cgit v1.2.3 From cec57e091834567552658aacfa6561fe80e1a6f8 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Tue, 21 Aug 2012 22:49:38 -0400 Subject: LASTEXPRESS: Reduce header interdependency --- engines/lastexpress/entities/entity.cpp | 11 +++++++++-- engines/lastexpress/entities/entity.h | 5 ----- engines/lastexpress/game/logic.cpp | 1 - 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 2deca291f6..552e1a8a82 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -26,10 +26,15 @@ #include "lastexpress/game/action.h" #include "lastexpress/game/entities.h" +#include "lastexpress/game/logic.h" #include "lastexpress/game/object.h" #include "lastexpress/game/savegame.h" +#include "lastexpress/game/savepoint.h" +#include "lastexpress/game/state.h" #include "lastexpress/game/scenes.h" +#include "lastexpress/lastexpress.h" + namespace LastExpress { ////////////////////////////////////////////////////////////////////////// @@ -49,8 +54,10 @@ void EntityData::EntityCallData::syncString(Common::Serializer &s, Common::Strin char seqName[13]; memset(&seqName, 0, length); - if (s.isSaving()) strcpy((char *)&seqName, string.c_str()); - s.syncBytes((byte *)&seqName, length); + if (s.isSaving()) + strcpy((char *)&seqName, string.c_str()); + + s.syncBytes((byte *)&seqName, length); if (s.isLoading()) string = seqName; diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 3601f34f6f..e5c097b50a 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -25,13 +25,8 @@ #include "lastexpress/shared.h" -#include "lastexpress/game/logic.h" -#include "lastexpress/game/savepoint.h" -#include "lastexpress/game/state.h" - #include "lastexpress/sound/sound.h" -#include "lastexpress/lastexpress.h" #include "lastexpress/helpers.h" #include "common/array.h" diff --git a/engines/lastexpress/game/logic.cpp b/engines/lastexpress/game/logic.cpp index 1696f100ff..09104d1bf9 100644 --- a/engines/lastexpress/game/logic.cpp +++ b/engines/lastexpress/game/logic.cpp @@ -48,7 +48,6 @@ #include "lastexpress/sound/queue.h" -#include "lastexpress/graphics.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" -- cgit v1.2.3 From ab4c47c584b0451a30bc5239a66cc8649aa66682 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Tue, 21 Aug 2012 22:53:33 -0400 Subject: LASTEXPRESS: Update Debug::loadArchive() to reduce casts --- engines/lastexpress/debug.cpp | 22 +++++++++++----------- engines/lastexpress/debug.h | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp index 21bf0119c4..3994cb0bcb 100644 --- a/engines/lastexpress/debug.cpp +++ b/engines/lastexpress/debug.cpp @@ -155,16 +155,16 @@ void Debugger::callCommand() { (*_command)(_numParams, const_cast(_commandParams)); } -bool Debugger::loadArchive(ArchiveIndex index) { +bool Debugger::loadArchive(int index) { if (index < 1 || index > 3) { DebugPrintf("Invalid cd number (was: %d, valid: [1-3])\n", index); return false; } - if (!_engine->getResourceManager()->loadArchive(index)) + if (!_engine->getResourceManager()->loadArchive((ArchiveIndex)index)) return false; - getScenes()->loadSceneDataFile(index); + getScenes()->loadSceneDataFile((ArchiveIndex)index); return true; } @@ -246,7 +246,7 @@ bool Debugger::cmdListFiles(int argc, const char **argv) { // Load the proper archive if (argc == 3) { - if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + if (!loadArchive(getNumber(argv[2]))) return true; } @@ -332,7 +332,7 @@ bool Debugger::cmdShowFrame(int argc, const char **argv) { filename += ".seq"; if (argc == 4) { - if (!loadArchive((ArchiveIndex)getNumber(argv[3]))) + if (!loadArchive(getNumber(argv[3]))) return true; } @@ -394,7 +394,7 @@ bool Debugger::cmdShowBg(int argc, const char **argv) { Common::String filename(const_cast(argv[1])); if (argc == 3) { - if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + if (!loadArchive(getNumber(argv[2]))) return true; } @@ -449,7 +449,7 @@ bool Debugger::cmdPlaySeq(int argc, const char **argv) { filename += ".seq"; if (argc == 3) { - if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + if (!loadArchive(getNumber(argv[2]))) return true; } @@ -526,7 +526,7 @@ bool Debugger::cmdPlaySnd(int argc, const char **argv) { if (argc == 2 || argc == 3) { if (argc == 3) { - if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + if (!loadArchive(getNumber(argv[2]))) return true; } @@ -565,7 +565,7 @@ bool Debugger::cmdPlaySbe(int argc, const char **argv) { Common::String filename(const_cast(argv[1])); if (argc == 3) { - if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + if (!loadArchive(getNumber(argv[2]))) return true; } @@ -630,7 +630,7 @@ bool Debugger::cmdPlayNis(int argc, const char **argv) { Common::String name(const_cast(argv[1])); if (argc == 3) { - if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + if (!loadArchive(getNumber(argv[2]))) return true; } @@ -689,7 +689,7 @@ bool Debugger::cmdLoadScene(int argc, const char **argv) { // Check args if (argc == 3) { - if (!loadArchive((ArchiveIndex)getNumber(argv[2]))) + if (!loadArchive(getNumber(argv[2]))) return true; } diff --git a/engines/lastexpress/debug.h b/engines/lastexpress/debug.h index 06534f4bc0..a9f0443af9 100644 --- a/engines/lastexpress/debug.h +++ b/engines/lastexpress/debug.h @@ -87,7 +87,7 @@ private: void copyCommand(int argc, const char **argv); int getNumber(const char *arg) const; - bool loadArchive(ArchiveIndex index); + bool loadArchive(int index); void restoreArchive() const; Debuglet *_command; -- cgit v1.2.3 From 2c0033c7bad5b15c9bcccbce804e244a17a7f891 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Tue, 21 Aug 2012 23:00:29 -0400 Subject: LASTEXPRESS: Add const modifiers --- engines/lastexpress/entities/chapters.cpp | 2 +- engines/lastexpress/entities/chapters.h | 2 +- engines/lastexpress/entities/entity.cpp | 14 +++++++------- engines/lastexpress/entities/entity.h | 14 +++++++------- engines/lastexpress/game/beetle.cpp | 2 +- engines/lastexpress/game/entities.cpp | 2 +- engines/lastexpress/game/entities.h | 2 +- engines/lastexpress/game/scenes.cpp | 2 +- engines/lastexpress/game/scenes.h | 2 +- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp index a2f3a3d871..d373432710 100644 --- a/engines/lastexpress/entities/chapters.cpp +++ b/engines/lastexpress/entities/chapters.cpp @@ -1851,7 +1851,7 @@ void Chapters::enterExitHelper(bool isEnteringStation) { callbackAction(); } -void Chapters::playSteam() { +void Chapters::playSteam() const { getSoundQueue()->resetState(); getSound()->playSteam((CityIndex)ENTITY_PARAM(0, 4)); ENTITY_PARAM(0, 2) = 0; diff --git a/engines/lastexpress/entities/chapters.h b/engines/lastexpress/entities/chapters.h index ddb3de3bea..fb52ea3ee4 100644 --- a/engines/lastexpress/entities/chapters.h +++ b/engines/lastexpress/entities/chapters.h @@ -157,7 +157,7 @@ private: bool timeCheckExitStation(TimeValue timeValue, uint ¶meter, byte callback, const char *sequence); void enterExitStation(const SavePoint &savepoint, bool isEnteringStation); void enterExitHelper(bool isEnteringStation); - void playSteam(); + void playSteam() const; }; } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 552e1a8a82..88b2ada185 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -50,7 +50,7 @@ EntityData::EntityCallData::~EntityCallData() { SAFE_DELETE(sequence3); } -void EntityData::EntityCallData::syncString(Common::Serializer &s, Common::String &string, int length) { +void EntityData::EntityCallData::syncString(Common::Serializer &s, Common::String &string, int length) const { char seqName[13]; memset(&seqName, 0, length); @@ -825,7 +825,7 @@ void Entity::setupIISS(const char *name, uint index, uint param1, uint param2, c // Helper functions ////////////////////////////////////////////////////////////////////////// -bool Entity::updateParameter(uint ¶meter, uint timeType, uint delta) { +bool Entity::updateParameter(uint ¶meter, uint timeType, uint delta) const { if (!parameter) parameter = (uint)(timeType + delta); @@ -837,7 +837,7 @@ bool Entity::updateParameter(uint ¶meter, uint timeType, uint delta) { return true; } -bool Entity::updateParameterTime(TimeValue timeValue, bool check, uint ¶meter, uint delta) { +bool Entity::updateParameterTime(TimeValue timeValue, bool check, uint ¶meter, uint delta) const { if (getState()->time <= timeValue) { if (check || !parameter) parameter = (uint)(getState()->time + delta); @@ -851,7 +851,7 @@ bool Entity::updateParameterTime(TimeValue timeValue, bool check, uint ¶mete return true; } -bool Entity::updateParameterCheck(uint ¶meter, uint timeType, uint delta) { +bool Entity::updateParameterCheck(uint ¶meter, uint timeType, uint delta) const { if (parameter && parameter >= timeType) return false; @@ -861,7 +861,7 @@ bool Entity::updateParameterCheck(uint ¶meter, uint timeType, uint delta) { return true; } -bool Entity::timeCheck(TimeValue timeValue, uint ¶meter, Common::Functor0 *function) { +bool Entity::timeCheck(TimeValue timeValue, uint ¶meter, Common::Functor0 *function) const { if (getState()->time > timeValue && !parameter) { parameter = 1; (*function)(); @@ -936,14 +936,14 @@ bool Entity::timeCheckCar(TimeValue timeValue, uint ¶meter, byte callback, C return false; } -void Entity::timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action) { +void Entity::timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action) const { if (getState()->time > timeValue && !parameter) { parameter = 1; getSavePoints()->push(entity1, entity2, action); } } -void Entity::timeCheckObject(TimeValue timeValue, uint ¶meter, ObjectIndex object, ObjectLocation location) { +void Entity::timeCheckObject(TimeValue timeValue, uint ¶meter, ObjectIndex object, ObjectLocation location) const { if (getState()->time > timeValue && !parameter) { parameter = 1; getObjects()->updateLocation2(object, location); diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index e5c097b50a..c45367c43c 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -822,7 +822,7 @@ public: * @param string The string. * @param length Length of the string. */ - void syncString(Common::Serializer &s, Common::String &string, int length); + void syncString(Common::Serializer &s, Common::String &string, int length) const; // Serializable void saveLoadWithSerializer(Common::Serializer &s); @@ -1084,18 +1084,18 @@ protected: // Helper functions ////////////////////////////////////////////////////////////////////////// - bool updateParameter(uint ¶meter, uint timeType, uint delta); - bool updateParameterCheck(uint ¶meter, uint timeType, uint delta); - bool updateParameterTime(TimeValue timeValue, bool check, uint ¶meter, uint delta); + bool updateParameter(uint ¶meter, uint timeType, uint delta) const; + bool updateParameterCheck(uint ¶meter, uint timeType, uint delta) const; + bool updateParameterTime(TimeValue timeValue, bool check, uint ¶meter, uint delta) const; - bool timeCheck(TimeValue timeValue, uint ¶meter, Common::Functor0 *function); + bool timeCheck(TimeValue timeValue, uint ¶meter, Common::Functor0 *function) const; bool timeCheckCallback(TimeValue timeValue, uint ¶meter, byte callback, Common::Functor0 *function); bool timeCheckCallback(TimeValue timeValue, uint ¶meter, byte callback, const char *str, Common::Functor1 *function); bool timeCheckCallback(TimeValue timeValue, uint ¶meter, byte callback, bool check, Common::Functor1 *function); bool timeCheckCallbackInventory(TimeValue timeValue, uint ¶meter, byte callback, Common::Functor0 *function); bool timeCheckCar(TimeValue timeValue, uint ¶meter, byte callback, Common::Functor0 *function); - void timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action); - void timeCheckObject(TimeValue timeValue, uint ¶meter, ObjectIndex index, ObjectLocation location); + void timeCheckSavepoint(TimeValue timeValue, uint ¶meter, EntityIndex entity1, EntityIndex entity2, ActionIndex action) const; + void timeCheckObject(TimeValue timeValue, uint ¶meter, ObjectIndex index, ObjectLocation location) const; bool timeCheckCallbackAction(TimeValue timeValue, uint ¶meter); bool timeCheckPlaySoundUpdatePosition(TimeValue timeValue, uint ¶meter, byte callback, const char* sound, EntityPosition position); diff --git a/engines/lastexpress/game/beetle.cpp b/engines/lastexpress/game/beetle.cpp index 7cdd67caf5..d7a369ba40 100644 --- a/engines/lastexpress/game/beetle.cpp +++ b/engines/lastexpress/game/beetle.cpp @@ -94,7 +94,7 @@ void Beetle::load() { // Check that all sequences are loaded properly _data->isLoaded = true; - for (int i = 0; i < (int)_data->sequences.size(); i++) { + for (uint i = 0; i < _data->sequences.size(); i++) { if (!_data->sequences[i]->isLoaded()) { _data->isLoaded = false; break; diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp index 51db635bed..de30792405 100644 --- a/engines/lastexpress/game/entities.cpp +++ b/engines/lastexpress/game/entities.cpp @@ -669,7 +669,7 @@ void Entities::executeCallbacks() { ////////////////////////////////////////////////////////////////////////// // Processing ////////////////////////////////////////////////////////////////////////// -void Entities::incrementDirectionCounter(EntityData::EntityCallData *data) { +void Entities::incrementDirectionCounter(EntityData::EntityCallData *data) const { data->doProcessEntity = false; if (data->direction == kDirectionRight || (data->direction == kDirectionSwitch && data->directionSwitch == kDirectionRight)) diff --git a/engines/lastexpress/game/entities.h b/engines/lastexpress/game/entities.h index a9de7931f0..81aed627aa 100644 --- a/engines/lastexpress/game/entities.h +++ b/engines/lastexpress/game/entities.h @@ -344,7 +344,7 @@ private: uint _positions[_positionsCount]; void executeCallbacks(); - void incrementDirectionCounter(EntityData::EntityCallData *data); + void incrementDirectionCounter(EntityData::EntityCallData *data) const; void processEntity(EntityIndex entity); void drawSequence(EntityIndex entity, const char *sequence, EntityDirection direction) const; diff --git a/engines/lastexpress/game/scenes.cpp b/engines/lastexpress/game/scenes.cpp index 3cda900757..a2c7226b93 100644 --- a/engines/lastexpress/game/scenes.cpp +++ b/engines/lastexpress/game/scenes.cpp @@ -739,7 +739,7 @@ void SceneManager::resetQueue() { _queue.clear(); } -void SceneManager::setCoordinates(Common::Rect rect) { +void SceneManager::setCoordinates(const Common::Rect &rect) { _flagCoordinates = true; if (_coords.right > rect.right) diff --git a/engines/lastexpress/game/scenes.h b/engines/lastexpress/game/scenes.h index a866c65111..1c7ae85f98 100644 --- a/engines/lastexpress/game/scenes.h +++ b/engines/lastexpress/game/scenes.h @@ -79,7 +79,7 @@ public: void removeAndRedraw(SequenceFrame **frame, bool doRedraw); void resetQueue(); void setCoordinates(SequenceFrame *frame); - void setCoordinates(Common::Rect rect); + void setCoordinates(const Common::Rect &rect); // Helpers SceneIndex getSceneIndexFromPosition(CarIndex car, Position position, int param3 = -1); -- cgit v1.2.3 From bc4e10dabca5b76283eb6fb431702ccd92a001c0 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Tue, 21 Aug 2012 23:02:39 -0400 Subject: LASTEXPRESS: Remove some unreachable code --- engines/lastexpress/fight/fight.cpp | 2 -- engines/lastexpress/game/action.cpp | 2 -- engines/lastexpress/game/inventory.cpp | 2 -- engines/lastexpress/game/savegame.cpp | 2 +- engines/lastexpress/sound/entry.cpp | 4 +--- 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/engines/lastexpress/fight/fight.cpp b/engines/lastexpress/fight/fight.cpp index b00c1732e7..49a9b85657 100644 --- a/engines/lastexpress/fight/fight.cpp +++ b/engines/lastexpress/fight/fight.cpp @@ -39,10 +39,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp index 60a309518a..033fdfc2e8 100644 --- a/engines/lastexpress/game/action.cpp +++ b/engines/lastexpress/game/action.cpp @@ -421,8 +421,6 @@ SceneIndex Action::processHotspot(const SceneHotspot &hotspot) { // Action 0 IMPLEMENT_ACTION(dummy) error("[Action::action_dummy] Dummy action function called (hotspot action: %d)", hotspot.action); - - return kSceneInvalid; } ////////////////////////////////////////////////////////////////////////// diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp index 52c00ece31..9e0f583c63 100644 --- a/engines/lastexpress/game/inventory.cpp +++ b/engines/lastexpress/game/inventory.cpp @@ -35,10 +35,8 @@ #include "lastexpress/menu/menu.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp index 360e99146a..9857ef24cc 100644 --- a/engines/lastexpress/game/savegame.cpp +++ b/engines/lastexpress/game/savegame.cpp @@ -550,7 +550,7 @@ void SaveLoad::saveGame(SavegameType type, EntityIndex entity, uint32 value) { entry.saveLoadWithSerializer(ser); if (!entry.isValid()) { - error("[SaveLoad::saveGame] Invalid entry. This savegame might be corrupted"); + warning("[SaveLoad::saveGame] Invalid entry. This savegame might be corrupted"); _savegame->seek(header.offset); } else if (getState()->time < entry.time || (type == kSavegameTypeTickInterval && getState()->time == entry.time)) { // Not ready to save a game, skipping! diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp index f2a063e45f..3d22657124 100644 --- a/engines/lastexpress/sound/entry.cpp +++ b/engines/lastexpress/sound/entry.cpp @@ -116,10 +116,8 @@ void SoundEntry::close() { } void SoundEntry::play() { - if (!_stream) { + if (!_stream) error("[SoundEntry::play] stream has been disposed"); - return; - } // Prepare sound stream if (!_soundStream) -- cgit v1.2.3 From 275aded0b0e485eead8d5bdac48d9c8dc1a6ef9c Mon Sep 17 00:00:00 2001 From: Littleboy Date: Tue, 21 Aug 2012 23:16:52 -0400 Subject: LASTEXPRESS: Remove unnecessary casts --- engines/lastexpress/data/subtitle.cpp | 6 +++--- engines/lastexpress/entities/entity.cpp | 4 ++-- engines/lastexpress/entities/entity.h | 6 +++--- engines/lastexpress/game/action.cpp | 2 +- engines/lastexpress/game/entities.cpp | 2 +- engines/lastexpress/game/inventory.cpp | 4 ++-- engines/lastexpress/game/savepoint.cpp | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/engines/lastexpress/data/subtitle.cpp b/engines/lastexpress/data/subtitle.cpp index a9a8284588..4d19c02aa7 100644 --- a/engines/lastexpress/data/subtitle.cpp +++ b/engines/lastexpress/data/subtitle.cpp @@ -210,10 +210,10 @@ void SubtitleManager::setTime(uint16 time) { _currentIndex = -1; // Find the appropriate line to show - for (int16 i = 0; i < (int16)_subtitles.size(); i++) { + for (uint i = 0; i < _subtitles.size(); i++) { if ((time >= _subtitles[i]->getTimeStart()) && (time <= _subtitles[i]->getTimeStop())) { // Keep the index of the line to show - _currentIndex = i; + _currentIndex = (int16)i; return; } } @@ -237,7 +237,7 @@ Common::Rect SubtitleManager::draw(Graphics::Surface *surface) { // Draw the current line assert(_currentIndex >= 0 && _currentIndex < (int16)_subtitles.size()); - return _subtitles[_currentIndex]->draw(surface, _font); + return _subtitles[(uint16)_currentIndex]->draw(surface, _font); } } // End of namespace LastExpress diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp index 88b2ada185..dad5e67392 100644 --- a/engines/lastexpress/entities/entity.cpp +++ b/engines/lastexpress/entities/entity.cpp @@ -50,7 +50,7 @@ EntityData::EntityCallData::~EntityCallData() { SAFE_DELETE(sequence3); } -void EntityData::EntityCallData::syncString(Common::Serializer &s, Common::String &string, int length) const { +void EntityData::EntityCallData::syncString(Common::Serializer &s, Common::String &string, uint length) const { char seqName[13]; memset(&seqName, 0, length); @@ -117,7 +117,7 @@ EntityData::EntityParameters *EntityData::getParameters(uint callback, byte inde return _parameters[callback].parameters[index]; } -int EntityData::getCallback(uint callback) const { +byte EntityData::getCallback(uint callback) const { if (callback >= 16) error("[EntityData::getCallback] Invalid callback value (was: %d, max: 16)", callback); diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index c45367c43c..c67d13db9e 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -822,7 +822,7 @@ public: * @param string The string. * @param length Length of the string. */ - void syncString(Common::Serializer &s, Common::String &string, int length) const; + void syncString(Common::Serializer &s, Common::String &string, uint length) const; // Serializable void saveLoadWithSerializer(Common::Serializer &s); @@ -845,8 +845,8 @@ public: EntityParameters *getCurrentParameters(byte index = 0) { return getParameters(_data.currentCall, index); } EntityCallParameters *getCurrentCallParameters() { return &_parameters[_data.currentCall]; } - int getCallback(uint callback) const; - int getCurrentCallback() { return getCallback(_data.currentCall); } + byte getCallback(uint callback) const; + byte getCurrentCallback() { return getCallback(_data.currentCall); } void setCallback(uint callback, byte index); void setCurrentCallback(uint index) { setCallback(_data.currentCall, index); } diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp index 033fdfc2e8..796abf2ce7 100644 --- a/engines/lastexpress/game/action.cpp +++ b/engines/lastexpress/game/action.cpp @@ -394,7 +394,7 @@ Action::Action(LastExpressEngine *engine) : _engine(engine) { } Action::~Action() { - for (int i = 0; i < (int)_actions.size(); i++) + for (uint i = 0; i < _actions.size(); i++) SAFE_DELETE(_actions[i]); _actions.clear(); diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp index de30792405..fafbd7cb64 100644 --- a/engines/lastexpress/game/entities.cpp +++ b/engines/lastexpress/game/entities.cpp @@ -181,7 +181,7 @@ Entities::Entities(LastExpressEngine *engine) : _engine(engine) { Entities::~Entities() { SAFE_DELETE(_header); - for (int i = 0; i < (int)_entities.size(); i++) + for (uint i = 0; i < _entities.size(); i++) SAFE_DELETE(_entities[i]); _entities.clear(); diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp index 9e0f583c63..11e7369ee1 100644 --- a/engines/lastexpress/game/inventory.cpp +++ b/engines/lastexpress/game/inventory.cpp @@ -619,7 +619,7 @@ void Inventory::drawEgg() const { // Blinking egg: we need to blink the egg for delta time, with the blinking getting faster until it's always lit. void Inventory::drawBlinkingEgg(uint ticks) { - uint globalTimer = getGlobalTimer(); + uint globalTimer = (uint)getGlobalTimer(); uint timerValue = (getProgress().jacket == kJacketGreen) ? 450 : 225; if (globalTimer == timerValue || globalTimer == 900) { @@ -653,7 +653,7 @@ void Inventory::drawBlinkingEgg(uint ticks) { } void Inventory::blinkEgg() { - drawItem((CursorStyle)(getMenu()->getGameId() + 39), 608, 448, (_blinkingBrightness == 0) ? -1 : _blinkingBrightness); + drawItem((CursorStyle)(getMenu()->getGameId() + 39), 608, 448, (_blinkingBrightness == 0) ? -1 : (int16)_blinkingBrightness); askForRedraw(); diff --git a/engines/lastexpress/game/savepoint.cpp b/engines/lastexpress/game/savepoint.cpp index 6b2dfc5930..8d14ec386b 100644 --- a/engines/lastexpress/game/savepoint.cpp +++ b/engines/lastexpress/game/savepoint.cpp @@ -202,7 +202,7 @@ void SavePoints::callAndProcess() { // Misc ////////////////////////////////////////////////////////////////////////// bool SavePoints::updateEntityFromData(const SavePoint &savepoint) { - for (int i = 0; i < (int)_data.size(); i++) { + for (uint i = 0; i < _data.size(); i++) { // Not a data savepoint! if (!_data[i].entity1) @@ -210,7 +210,7 @@ bool SavePoints::updateEntityFromData(const SavePoint &savepoint) { // Found our data! if (_data[i].entity1 == savepoint.entity1 && _data[i].action == savepoint.action) { - debugC(8, kLastExpressDebugLogic, "Update entity from data: entity1=%s, action=%s, param=%d", ENTITY_NAME(_data[i].entity1), ACTION_NAME(_data[i].action), _data[i].param); + debugC(8, kLastExpressDebugLogic, "Update entity from data: entity1=%s, action=%s, param=%u", ENTITY_NAME(_data[i].entity1), ACTION_NAME(_data[i].action), _data[i].param); // the SavePoint param value is the index of the entity call parameter to update getEntities()->get(_data[i].entity1)->getParamData()->updateParameters(_data[i].param); -- cgit v1.2.3 From 81c6016e8f6c670c1046be12b541b0d63c9fd5fa Mon Sep 17 00:00:00 2001 From: Littleboy Date: Thu, 23 Aug 2012 05:09:01 -0400 Subject: LASTEXPRESS: Identify several Verges functions --- engines/lastexpress/entities/verges.cpp | 102 ++++++++++++++++---------------- engines/lastexpress/entities/verges.h | 8 +-- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp index 867f122d8f..94698886bb 100644 --- a/engines/lastexpress/entities/verges.cpp +++ b/engines/lastexpress/entities/verges.cpp @@ -46,13 +46,13 @@ Verges::Verges(LastExpressEngine *engine) : Entity(engine, kEntityVerges) { ADD_CALLBACK_FUNCTION(Verges, callbackActionRestaurantOrSalon); ADD_CALLBACK_FUNCTION(Verges, savegame); ADD_CALLBACK_FUNCTION(Verges, updateEntity); - ADD_CALLBACK_FUNCTION(Verges, function9); - ADD_CALLBACK_FUNCTION(Verges, function10); + ADD_CALLBACK_FUNCTION(Verges, walkBetweenCars); + ADD_CALLBACK_FUNCTION(Verges, makeAnnouncement); ADD_CALLBACK_FUNCTION(Verges, function11); ADD_CALLBACK_FUNCTION(Verges, function12); - ADD_CALLBACK_FUNCTION(Verges, function13); + ADD_CALLBACK_FUNCTION(Verges, baggageCar); ADD_CALLBACK_FUNCTION(Verges, updateFromTime); - ADD_CALLBACK_FUNCTION(Verges, function15); + ADD_CALLBACK_FUNCTION(Verges, dialog); ADD_CALLBACK_FUNCTION(Verges, function16); ADD_CALLBACK_FUNCTION(Verges, function17); ADD_CALLBACK_FUNCTION(Verges, chapter1); @@ -149,7 +149,7 @@ IMPLEMENT_FUNCTION_II(8, Verges, updateEntity, CarIndex, EntityPosition) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION_S(9, Verges, function9) +IMPLEMENT_FUNCTION_S(9, Verges, walkBetweenCars) switch (savepoint.action) { default: break; @@ -201,7 +201,7 @@ switch (savepoint.action) { case 3: setCallback(4); - setup_function10(kCarGreenSleeping, kPosition_540, (char *)¶ms->seq1); + setup_makeAnnouncement(kCarGreenSleeping, kPosition_540, (char *)¶ms->seq1); break; case 4: @@ -225,7 +225,7 @@ switch (savepoint.action) { IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION_IIS(10, Verges, function10, CarIndex, EntityPosition) +IMPLEMENT_FUNCTION_IIS(10, Verges, makeAnnouncement, CarIndex, EntityPosition) switch (savepoint.action) { default: break; @@ -404,7 +404,7 @@ IMPLEMENT_FUNCTION(12, Verges, function12) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION_I(13, Verges, function13, bool) +IMPLEMENT_FUNCTION_I(13, Verges, baggageCar, bool) switch (savepoint.action) { default: break; @@ -449,7 +449,7 @@ IMPLEMENT_FUNCTION_I(14, Verges, updateFromTime, uint32) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION_IS(15, Verges, function15, EntityIndex) +IMPLEMENT_FUNCTION_IS(15, Verges, dialog, EntityIndex) switch (savepoint.action) { default: break; @@ -548,7 +548,7 @@ IMPLEMENT_FUNCTION(17, Verges, function17) case 2: setCallback(3); - setup_function15(kEntityMertens, "TRA1291"); + setup_dialog(kEntityMertens, "TRA1291"); break; case 3: @@ -774,10 +774,10 @@ IMPLEMENT_FUNCTION(25, Verges, function25) if (getData()->car == kCarRedSleeping) { setCallback(6); - setup_function10(kCarGreenSleeping, kPosition_540, "TRA1005"); + setup_makeAnnouncement(kCarGreenSleeping, kPosition_540, "TRA1005"); } else { setCallback(7); - setup_function10(kCarRedSleeping, kPosition_9460, "TRA1006"); + setup_makeAnnouncement(kCarRedSleeping, kPosition_9460, "TRA1006"); } break; } @@ -805,7 +805,7 @@ IMPLEMENT_FUNCTION(25, Verges, function25) getSavePoints()->push(kEntityVerges, kEntityCoudert, kAction168254872); setCallback(4); - setup_function10(kCarRedSleeping, kPosition_9460, "TRA1006"); + setup_makeAnnouncement(kCarRedSleeping, kPosition_9460, "TRA1006"); break; case 4: @@ -838,7 +838,7 @@ IMPLEMENT_FUNCTION(25, Verges, function25) getSavePoints()->push(kEntityVerges, kEntityCoudert, kAction168254872); setCallback(10); - setup_function10(kCarGreenSleeping, kPosition_540, "TRA1006"); + setup_makeAnnouncement(kCarGreenSleeping, kPosition_540, "TRA1006"); break; case 10: @@ -892,7 +892,7 @@ IMPLEMENT_FUNCTION(26, Verges, chapter1Handler) label_callback1: if (getEntities()->isInBaggageCarEntrance(kEntityPlayer)) { setCallback(2); - setup_function13(false); + setup_baggageCar(false); break; } @@ -907,7 +907,7 @@ label_callback3: if (params->param6) goto label_callback12; - if (Entity::timeCheckCallback(kTimeChapter1, params->param7, 4, "TRA1001", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTimeChapter1, params->param7, 4, "TRA1001", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback4: @@ -923,19 +923,19 @@ label_callback4: } label_callback8: - if (Entity::timeCheckCallback(kTime1107000, CURRENT_PARAM(1, 1), 9, "TRA1001A", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime1107000, CURRENT_PARAM(1, 1), 9, "TRA1001A", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback9: - if (Entity::timeCheckCallback(kTime1134000, CURRENT_PARAM(1, 2), 10, "TRA1002", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime1134000, CURRENT_PARAM(1, 2), 10, "TRA1002", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback10: - if (Entity::timeCheckCallback(kTime1165500, CURRENT_PARAM(1, 3), 11, "TRA1003", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime1165500, CURRENT_PARAM(1, 3), 11, "TRA1003", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback11: - if (Entity::timeCheckCallback(kTime1225800, CURRENT_PARAM(1, 4), 12, "TRA1004", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime1225800, CURRENT_PARAM(1, 4), 12, "TRA1004", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback12: @@ -970,7 +970,7 @@ label_callback15: case kActionOpenDoor: setCallback(17); - setup_function13(savepoint.param.intValue < 106 ? true : false); + setup_baggageCar(savepoint.param.intValue < 106 ? true : false); break; case kActionDefault: @@ -1006,7 +1006,7 @@ label_callback15: case 6: setCallback(7); - setup_function15(kEntityMertens, "TRA1202"); + setup_dialog(kEntityMertens, "TRA1202"); break; case 7: @@ -1084,11 +1084,11 @@ IMPLEMENT_FUNCTION(28, Verges, chapter2Handler) case kActionNone: if (getEntities()->isInBaggageCarEntrance(kEntityPlayer)) { setCallback(1); - setup_function13(false); + setup_baggageCar(false); } label_callback_1: - if (Entity::timeCheckCallback(kTime1818900, params->param1, 2, "Tra2177", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime1818900, params->param1, 2, "Tra2177", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback_2: @@ -1130,7 +1130,7 @@ label_callback_6: case kActionOpenDoor: setCallback(8); - setup_function13(savepoint.param.intValue < 106); + setup_baggageCar(savepoint.param.intValue < 106); break; case kActionDefault: @@ -1155,7 +1155,7 @@ label_callback_6: case 4: setCallback(5); - setup_function15(kEntityCoudert, "TRA2100"); + setup_dialog(kEntityCoudert, "TRA2100"); break; case 5: @@ -1221,7 +1221,7 @@ IMPLEMENT_FUNCTION_S(30, Verges, function30) case 2: setCallback(3); - setup_function15(kEntityCoudert, (char *)¶ms->seq1); + setup_dialog(kEntityCoudert, (char *)¶ms->seq1); break; case 3: @@ -1260,7 +1260,7 @@ IMPLEMENT_FUNCTION(31, Verges, function31) case 2: setCallback(3); - setup_function15(kEntityCoudert, "TRA3015"); + setup_dialog(kEntityCoudert, "TRA3015"); break; case 3: @@ -1289,7 +1289,7 @@ IMPLEMENT_FUNCTION(32, Verges, function32) if (getState()->time > kTime2263500 && !params->param1) { params->param1 = 1; setCallback(5); - setup_function10(kCarRedSleeping, kPosition_9460, "TRA3006"); + setup_makeAnnouncement(kCarRedSleeping, kPosition_9460, "TRA3006"); break; } break; @@ -1341,7 +1341,7 @@ IMPLEMENT_FUNCTION(32, Verges, function32) case 3: setCallback(4); - setup_function10(kCarGreenSleeping, kPosition_540, "TRA3004"); + setup_makeAnnouncement(kCarGreenSleeping, kPosition_540, "TRA3004"); break; case 4: @@ -1412,7 +1412,7 @@ IMPLEMENT_FUNCTION(33, Verges, function33) getSavePoints()->push(kEntityVerges, kEntityAbbot, kAction192054567); setCallback(6); - setup_function9("Tra3010"); + setup_walkBetweenCars("Tra3010"); break; case 6: @@ -1432,7 +1432,7 @@ IMPLEMENT_FUNCTION(34, Verges, function34) case kActionNone: if (getEntities()->isInBaggageCarEntrance(kEntityPlayer)) { setCallback(1); - setup_function13(false); + setup_baggageCar(false); break; } @@ -1451,11 +1451,11 @@ label_callback_2: } label_callback_3: - if (Entity::timeCheckCallback(kTime1971000, params->param1, 4, "Tra3001", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime1971000, params->param1, 4, "Tra3001", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback_4: - if (Entity::timeCheckCallback(kTime1998000, params->param2, 5, "Tra3010a", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime1998000, params->param2, 5, "Tra3010a", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback_5: @@ -1463,11 +1463,11 @@ label_callback_5: break; label_callback_6: - if (Entity::timeCheckCallback(kTime2070000, params->param4, 7, "Tra3002", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime2070000, params->param4, 7, "Tra3002", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback_7: - if (Entity::timeCheckCallback(kTime2142000, params->param5, 8, "Tra3003", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime2142000, params->param5, 8, "Tra3003", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback_8: @@ -1480,7 +1480,7 @@ label_callback_9: case kActionOpenDoor: setCallback(11); - setup_function13(savepoint.param.intValue < 106); + setup_baggageCar(savepoint.param.intValue < 106); break; case kActionCallback: @@ -1542,7 +1542,7 @@ IMPLEMENT_FUNCTION(35, Verges, function35) case 2: setCallback(3); - setup_function15(kEntityMertens, "Tra3011A"); + setup_dialog(kEntityMertens, "Tra3011A"); break; case 3: @@ -1554,7 +1554,7 @@ IMPLEMENT_FUNCTION(35, Verges, function35) case 4: setCallback(5); - setup_function15(kEntityMertens, "Tra3011"); + setup_dialog(kEntityMertens, "Tra3011"); break; case 5: @@ -1609,7 +1609,7 @@ IMPLEMENT_FUNCTION(37, Verges, chapter4Handler) case kActionNone: if (getEntities()->isInBaggageCarEntrance(kEntityPlayer)) { setCallback(1); - setup_function13(false); + setup_baggageCar(false); break; } @@ -1622,37 +1622,37 @@ label_callback_1: } label_callback_2: - if (Entity::timeCheckCallback(kTime2349000, params->param1, 3, "Tra1001", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime2349000, params->param1, 3, "Tra1001", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback_3: - if (Entity::timeCheckCallback(kTime2378700, params->param2, 4, "Tra4001", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime2378700, params->param2, 4, "Tra4001", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback_4: - if (Entity::timeCheckCallback(kTime2403000, params->param3, 5, "Tra1001A", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime2403000, params->param3, 5, "Tra1001A", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback_5: - if (Entity::timeCheckCallback(kTime2414700, params->param4, 6, "Tra4002", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime2414700, params->param4, 6, "Tra4002", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback_6: - if (Entity::timeCheckCallback(kTime2484000, params->param5, 7, "Tra4003", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime2484000, params->param5, 7, "Tra4003", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; label_callback_7: - if (Entity::timeCheckCallback(kTime2511000, params->param6, 8, "Tra4004", WRAP_SETUP_FUNCTION_S(Verges, setup_function9))) + if (Entity::timeCheckCallback(kTime2511000, params->param6, 8, "Tra4004", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars))) break; } label_callback_8: - Entity::timeCheckCallback(kTime2538000, params->param7, 9, "Tra4005", WRAP_SETUP_FUNCTION_S(Verges, setup_function9)); + Entity::timeCheckCallback(kTime2538000, params->param7, 9, "Tra4005", WRAP_SETUP_FUNCTION_S(Verges, setup_walkBetweenCars)); break; case kActionOpenDoor: setCallback(10); - setup_function13(savepoint.param.intValue < 106); + setup_baggageCar(savepoint.param.intValue < 106); break; case kActionDefault: @@ -1822,7 +1822,7 @@ IMPLEMENT_FUNCTION(41, Verges, function41) getData()->location = kLocationInsideCompartment; setCallback(1); - setup_function10(kCarRedSleeping, kPosition_2000, "Tra5001"); + setup_makeAnnouncement(kCarRedSleeping, kPosition_2000, "Tra5001"); break; case kActionCallback: @@ -1891,7 +1891,7 @@ void Verges::talk(const SavePoint &savepoint, const char *sound1, const char *so case 2: setCallback(3); - setup_function15(kEntityCoudert, sound1); + setup_dialog(kEntityCoudert, sound1); break; case 3: @@ -1901,7 +1901,7 @@ void Verges::talk(const SavePoint &savepoint, const char *sound1, const char *so case 4: setCallback(5); - setup_function15(kEntityMertens, sound2); + setup_dialog(kEntityMertens, sound2); break; case 5: diff --git a/engines/lastexpress/entities/verges.h b/engines/lastexpress/entities/verges.h index 82381043d3..8932f81fce 100644 --- a/engines/lastexpress/entities/verges.h +++ b/engines/lastexpress/entities/verges.h @@ -87,11 +87,11 @@ public: */ DECLARE_FUNCTION_2(updateEntity, CarIndex car, EntityPosition entityPosition) - DECLARE_FUNCTION_1(function9, const char *soundName) - DECLARE_FUNCTION_3(function10, CarIndex car, EntityPosition entityPosition, const char *soundName) + DECLARE_FUNCTION_1(walkBetweenCars, const char *soundName) + DECLARE_FUNCTION_3(makeAnnouncement, CarIndex car, EntityPosition entityPosition, const char *soundName) DECLARE_FUNCTION(function11) DECLARE_FUNCTION(function12) - DECLARE_FUNCTION_1(function13, bool) + DECLARE_FUNCTION_1(baggageCar, bool) /** * Updates parameter 2 using time value @@ -100,7 +100,7 @@ public: */ DECLARE_FUNCTION_1(updateFromTime, uint32 time) - DECLARE_FUNCTION_2(function15, EntityIndex entity, const char *soundName) + DECLARE_FUNCTION_2(dialog, EntityIndex entity, const char *soundName) DECLARE_FUNCTION_3(function16, EntityIndex entityIndex, const char *soundName1, const char *soundName2) DECLARE_FUNCTION(function17) -- cgit v1.2.3 From 8fa617556c080c4af843944e900f055f4e717e44 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Thu, 23 Aug 2012 05:09:25 -0400 Subject: LASTEXPRESS: Fix typo in Verges chapter 3 function --- engines/lastexpress/entities/verges.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp index 94698886bb..ed1918d4ed 100644 --- a/engines/lastexpress/entities/verges.cpp +++ b/engines/lastexpress/entities/verges.cpp @@ -1177,7 +1177,7 @@ IMPLEMENT_FUNCTION(29, Verges, chapter3) break; case kActionNone: - setup_function23(); + setup_function33(); break; case kActionDefault: -- cgit v1.2.3 From 6ab3b903d46899d642fb57faad6b445242285033 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Fri, 24 Aug 2012 13:44:17 -0400 Subject: LASTEXPRESS: Identify more Verges functions --- engines/lastexpress/entities/abbot.cpp | 2 +- engines/lastexpress/entities/august.cpp | 2 +- engines/lastexpress/entities/verges.cpp | 60 ++++++++++++++++----------------- engines/lastexpress/entities/verges.h | 18 +++++----- 4 files changed, 41 insertions(+), 41 deletions(-) diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp index 85d0d8948b..406b017d3a 100644 --- a/engines/lastexpress/entities/abbot.cpp +++ b/engines/lastexpress/entities/abbot.cpp @@ -1547,7 +1547,7 @@ IMPLEMENT_FUNCTION(45, Abbot, function45) getData()->car = kCarRedSleeping; getData()->location = kLocationOutsideCompartment; - RESET_ENTITY_STATE(kEntityVerges, Verges, setup_function38); + RESET_ENTITY_STATE(kEntityVerges, Verges, setup_resetState); getEntities()->drawSequenceLeft(kEntityAbbot, "617Ec"); getEntities()->enterCompartment(kEntityAbbot, kObjectCompartmentC, true); diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp index 67d810fde2..dbae7bad20 100644 --- a/engines/lastexpress/entities/august.cpp +++ b/engines/lastexpress/entities/august.cpp @@ -3530,7 +3530,7 @@ IMPLEMENT_FUNCTION(69, August, unhookCars) getScenes()->loadSceneFromPosition(kCarRestaurant, 85, 1); getSavePoints()->pushAll(kEntityAugust, kActionProceedChapter5); - RESET_ENTITY_STATE(kEntityVerges, Verges, setup_function42) + RESET_ENTITY_STATE(kEntityVerges, Verges, setup_end) } break; } diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp index ed1918d4ed..d9ddb0a4d1 100644 --- a/engines/lastexpress/entities/verges.cpp +++ b/engines/lastexpress/entities/verges.cpp @@ -53,33 +53,33 @@ Verges::Verges(LastExpressEngine *engine) : Entity(engine, kEntityVerges) { ADD_CALLBACK_FUNCTION(Verges, baggageCar); ADD_CALLBACK_FUNCTION(Verges, updateFromTime); ADD_CALLBACK_FUNCTION(Verges, dialog); - ADD_CALLBACK_FUNCTION(Verges, function16); - ADD_CALLBACK_FUNCTION(Verges, function17); + ADD_CALLBACK_FUNCTION(Verges, dialog2); + ADD_CALLBACK_FUNCTION(Verges, talkAboutPassengerList); ADD_CALLBACK_FUNCTION(Verges, chapter1); ADD_CALLBACK_FUNCTION(Verges, talkHarem); ADD_CALLBACK_FUNCTION(Verges, talkPassengerList); ADD_CALLBACK_FUNCTION(Verges, talkGendarmes); - ADD_CALLBACK_FUNCTION(Verges, function22); + ADD_CALLBACK_FUNCTION(Verges, askMertensToRelayAugustInvitation); ADD_CALLBACK_FUNCTION(Verges, function23); ADD_CALLBACK_FUNCTION(Verges, policeGettingOffTrain); - ADD_CALLBACK_FUNCTION(Verges, function25); + ADD_CALLBACK_FUNCTION(Verges, policeSearch); ADD_CALLBACK_FUNCTION(Verges, chapter1Handler); ADD_CALLBACK_FUNCTION(Verges, chapter2); ADD_CALLBACK_FUNCTION(Verges, chapter2Handler); ADD_CALLBACK_FUNCTION(Verges, chapter3); ADD_CALLBACK_FUNCTION(Verges, function30); - ADD_CALLBACK_FUNCTION(Verges, function31); + ADD_CALLBACK_FUNCTION(Verges, talkAboutMax); ADD_CALLBACK_FUNCTION(Verges, function32); ADD_CALLBACK_FUNCTION(Verges, function33); ADD_CALLBACK_FUNCTION(Verges, function34); - ADD_CALLBACK_FUNCTION(Verges, function35); + ADD_CALLBACK_FUNCTION(Verges, organizeConcertInvitations); ADD_CALLBACK_FUNCTION(Verges, chapter4); ADD_CALLBACK_FUNCTION(Verges, chapter4Handler); - ADD_CALLBACK_FUNCTION(Verges, function38); + ADD_CALLBACK_FUNCTION(Verges, resetState); ADD_CALLBACK_FUNCTION(Verges, chapter5); ADD_CALLBACK_FUNCTION(Verges, chapter5Handler); - ADD_CALLBACK_FUNCTION(Verges, function41); - ADD_CALLBACK_FUNCTION(Verges, function42); + ADD_CALLBACK_FUNCTION(Verges, askPassengersToStayInCompartments); + ADD_CALLBACK_FUNCTION(Verges, end); } ////////////////////////////////////////////////////////////////////////// @@ -486,7 +486,7 @@ IMPLEMENT_FUNCTION_IS(15, Verges, dialog, EntityIndex) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION_ISS(16, Verges, function16, EntityIndex) +IMPLEMENT_FUNCTION_ISS(16, Verges, dialog2, EntityIndex) switch (savepoint.action) { default: break; @@ -526,7 +526,7 @@ IMPLEMENT_FUNCTION_ISS(16, Verges, function16, EntityIndex) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(17, Verges, function17) +IMPLEMENT_FUNCTION(17, Verges, talkAboutPassengerList) switch (savepoint.action) { default: break; @@ -611,7 +611,7 @@ IMPLEMENT_FUNCTION(21, Verges, talkGendarmes) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(22, Verges, function22) +IMPLEMENT_FUNCTION(22, Verges, askMertensToRelayAugustInvitation) switch (savepoint.action) { default: break; @@ -634,10 +634,10 @@ IMPLEMENT_FUNCTION(22, Verges, function22) case 2: if (getEvent(kEventMertensAskTylerCompartment) || getEvent(kEventMertensAskTylerCompartmentD) || getEvent(kEventMertensAugustWaiting)) { setCallback(3); - setup_function16(kEntityMertens, "TRA1200", "TRA1201"); + setup_dialog2(kEntityMertens, "TRA1200", "TRA1201"); } else { setCallback(4); - setup_function16(kEntityMertens, "TRA1200A", "TRA1201"); + setup_dialog2(kEntityMertens, "TRA1200A", "TRA1201"); } break; @@ -714,7 +714,7 @@ IMPLEMENT_FUNCTION(24, Verges, policeGettingOffTrain) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(25, Verges, function25) +IMPLEMENT_FUNCTION(25, Verges, policeSearch) switch (savepoint.action) { default: break; @@ -899,7 +899,7 @@ label_callback1: label_callback2: if (ENTITY_PARAM(0, 7)) { setCallback(3); - setup_function25(); + setup_policeSearch(); break; } @@ -955,7 +955,7 @@ label_callback13: label_callback14: if (ENTITY_PARAM(0, 3) && !params->param4 && (getState()->time < kTime1134000 || getState()->time > kTime1156500)) { setCallback(15); - setup_function17(); + setup_talkAboutPassengerList(); break; } @@ -963,7 +963,7 @@ label_callback15: if (ENTITY_PARAM(0, 1) && !params->param5) { if (getState()->time < kTime1134000 || getState()->time > kTime1156500) { setCallback(16); - setup_function22(); + setup_askMertensToRelayAugustInvitation(); } } break; @@ -1117,7 +1117,7 @@ label_callback_6: if (ENTITY_PARAM(0, 3)) { setCallback(7); - setup_function17(); + setup_talkAboutPassengerList(); } break; @@ -1238,7 +1238,7 @@ IMPLEMENT_FUNCTION_S(30, Verges, function30) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(31, Verges, function31) +IMPLEMENT_FUNCTION(31, Verges, talkAboutMax) switch (savepoint.action) { default: break; @@ -1439,14 +1439,14 @@ IMPLEMENT_FUNCTION(34, Verges, function34) label_callback_1: if (ENTITY_PARAM(0, 4)) { setCallback(2); - setup_function31(); + setup_talkAboutMax(); break; } label_callback_2: if (ENTITY_PARAM(0, 3)) { setCallback(3); - setup_function17(); + setup_talkAboutPassengerList(); break; } @@ -1459,7 +1459,7 @@ label_callback_4: break; label_callback_5: - if (Entity::timeCheckCallback(kTime2016000, params->param3, 6, WRAP_SETUP_FUNCTION(Verges, setup_function35))) + if (Entity::timeCheckCallback(kTime2016000, params->param3, 6, WRAP_SETUP_FUNCTION(Verges, setup_organizeConcertInvitations))) break; label_callback_6: @@ -1520,7 +1520,7 @@ label_callback_9: IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(35, Verges, function35) +IMPLEMENT_FUNCTION(35, Verges, organizeConcertInvitations) switch (savepoint.action) { default: break; @@ -1617,7 +1617,7 @@ label_callback_1: if (ENTITY_PARAM(0, 6)) { if (ENTITY_PARAM(0, 3)) { setCallback(2); - setup_function17(); + setup_talkAboutPassengerList(); break; } @@ -1697,7 +1697,7 @@ label_callback_8: IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(38, Verges, function38) +IMPLEMENT_FUNCTION(38, Verges, resetState) switch (savepoint.action) { default: break; @@ -1803,14 +1803,14 @@ IMPLEMENT_FUNCTION(40, Verges, chapter5Handler) getAction()->playAnimation(kEventCathFreePassengers); getSavePoints()->pushAll(kEntityVerges, kActionProceedChapter5); getScenes()->loadSceneFromPosition(kCarRedSleeping, 40); - setup_function41(); + setup_askPassengersToStayInCompartments(); } break; } IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(41, Verges, function41) +IMPLEMENT_FUNCTION(41, Verges, askPassengersToStayInCompartments) switch (savepoint.action) { default: break; @@ -1852,7 +1852,7 @@ IMPLEMENT_FUNCTION(41, Verges, function41) break; case 4: - setup_function42(); + setup_end(); break; } break; @@ -1860,7 +1860,7 @@ IMPLEMENT_FUNCTION(41, Verges, function41) IMPLEMENT_FUNCTION_END ////////////////////////////////////////////////////////////////////////// -IMPLEMENT_FUNCTION(42, Verges, function42) +IMPLEMENT_FUNCTION(42, Verges, end) if (savepoint.action == kActionDefault) getEntities()->clearSequences(kEntityVerges); IMPLEMENT_FUNCTION_END diff --git a/engines/lastexpress/entities/verges.h b/engines/lastexpress/entities/verges.h index 8932f81fce..93cc190d1e 100644 --- a/engines/lastexpress/entities/verges.h +++ b/engines/lastexpress/entities/verges.h @@ -101,8 +101,8 @@ public: DECLARE_FUNCTION_1(updateFromTime, uint32 time) DECLARE_FUNCTION_2(dialog, EntityIndex entity, const char *soundName) - DECLARE_FUNCTION_3(function16, EntityIndex entityIndex, const char *soundName1, const char *soundName2) - DECLARE_FUNCTION(function17) + DECLARE_FUNCTION_3(dialog2, EntityIndex entityIndex, const char *soundName1, const char *soundName2) + DECLARE_FUNCTION(talkAboutPassengerList) /** * Setup Chapter 1 @@ -112,10 +112,10 @@ public: DECLARE_FUNCTION_NOSETUP(talkHarem) DECLARE_FUNCTION(talkPassengerList) DECLARE_FUNCTION(talkGendarmes) - DECLARE_FUNCTION(function22) + DECLARE_FUNCTION(askMertensToRelayAugustInvitation) DECLARE_FUNCTION(function23) DECLARE_FUNCTION(policeGettingOffTrain) - DECLARE_FUNCTION(function25) + DECLARE_FUNCTION(policeSearch) /** * Handle Chapter 1 events @@ -138,11 +138,11 @@ public: DECLARE_FUNCTION(chapter3) DECLARE_FUNCTION_1(function30, const char *soundName) - DECLARE_FUNCTION(function31) + DECLARE_FUNCTION(talkAboutMax) DECLARE_FUNCTION(function32) DECLARE_FUNCTION(function33) DECLARE_FUNCTION(function34) - DECLARE_FUNCTION(function35) + DECLARE_FUNCTION(organizeConcertInvitations) /** * Setup Chapter 4 @@ -154,7 +154,7 @@ public: */ DECLARE_FUNCTION(chapter4Handler) - DECLARE_FUNCTION(function38) + DECLARE_FUNCTION(resetState) /** * Setup Chapter 5 @@ -166,8 +166,8 @@ public: */ DECLARE_FUNCTION(chapter5Handler) - DECLARE_FUNCTION(function41) - DECLARE_FUNCTION(function42) + DECLARE_FUNCTION(askPassengersToStayInCompartments) + DECLARE_FUNCTION(end) private: void talk(const SavePoint &savepoint, const char *sound1, const char *sound2); -- cgit v1.2.3 From ee8581b778b83bc01af0f26bc8b3680ebc266700 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Mon, 27 Aug 2012 21:49:15 -0400 Subject: LASTEXPRESS: Cleanup savegame - Check for valid stream in readValue/writeValue functions - Properly initialize/clear members --- engines/lastexpress/game/savegame.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp index 9857ef24cc..7efce0007b 100644 --- a/engines/lastexpress/game/savegame.cpp +++ b/engines/lastexpress/game/savegame.cpp @@ -78,7 +78,7 @@ uint32 SavegameStream::read(void *dataPtr, uint32 dataSize) { uint32 SavegameStream::readUncompressed(void *dataPtr, uint32 dataSize) { if ((int32)dataSize > size() - pos()) { - dataSize = size() - pos(); + dataSize = (uint32)(size() - pos()); _eos = true; } memcpy(dataPtr, getData() + pos(), dataSize); @@ -230,7 +230,7 @@ uint32 SavegameStream::writeCompressed(const void *dataPtr, uint32 dataSize) { if (*data != _previousValue || _repeatCount >= 255) { if (_previousValue) { writeBuffer(0xFF, true); - writeBuffer(_repeatCount, true); + writeBuffer((uint8)_repeatCount, true); writeBuffer(_previousValue, true); _previousValue = *data++; @@ -255,7 +255,7 @@ uint32 SavegameStream::writeCompressed(const void *dataPtr, uint32 dataSize) { } writeBuffer(0xFD, true); - writeBuffer(_repeatCount, true); + writeBuffer((uint8)_repeatCount, true); _previousValue = *data++; _valueCount = 1; @@ -348,11 +348,12 @@ uint32 SavegameStream::readCompressed(void *dataPtr, uint32 dataSize) { // Constructors ////////////////////////////////////////////////////////////////////////// -SaveLoad::SaveLoad(LastExpressEngine *engine) : _engine(engine), _savegame(NULL), _gameTicksLastSavegame(0) { +SaveLoad::SaveLoad(LastExpressEngine *engine) : _engine(engine), _savegame(NULL), _gameTicksLastSavegame(0), _entity(kEntityPlayer) { } SaveLoad::~SaveLoad() { clear(true); + _savegame = NULL; // Zero passed pointers _engine = NULL; @@ -634,6 +635,9 @@ bool SaveLoad::loadMainHeader(Common::InSaveFile *stream, SavegameMainHeader *he // Entries ////////////////////////////////////////////////////////////////////////// uint32 SaveLoad::writeValue(Common::Serializer &ser, const char *name, Common::Functor1 *function, uint size) { + if (!_savegame) + error("[SaveLoad::writeValue] Stream not initialized properly"); + debugC(kLastExpressDebugSavegame, "Savegame: Writing %s: %u bytes", name, size); uint32 prevPosition = (uint32)_savegame->pos(); @@ -652,6 +656,9 @@ uint32 SaveLoad::writeValue(Common::Serializer &ser, const char *name, Common::F } uint32 SaveLoad::readValue(Common::Serializer &ser, const char *name, Common::Functor1 *function, uint size) { + if (!_savegame) + error("[SaveLoad::readValue] Stream not initialized properly"); + debugC(kLastExpressDebugSavegame, "Savegame: Reading %s: %u bytes", name, size); uint32 prevPosition = (uint32)_savegame->pos(); -- cgit v1.2.3 From 6ab8db638e4a1d547ee67db067b5d6c3d6c940a4 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Mon, 27 Aug 2012 23:29:09 -0400 Subject: LASTEXPRESS: Implement more savegame loading - Rename existing function to load the last saved game - Remove loadgame debugger command --- engines/lastexpress/debug.cpp | 25 ------------------------- engines/lastexpress/debug.h | 1 - engines/lastexpress/game/savegame.cpp | 30 ++++++++++++++++++++++++++---- engines/lastexpress/game/savegame.h | 4 ++-- engines/lastexpress/menu/menu.cpp | 4 ++-- 5 files changed, 30 insertions(+), 34 deletions(-) diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp index 3994cb0bcb..db3a3e3962 100644 --- a/engines/lastexpress/debug.cpp +++ b/engines/lastexpress/debug.cpp @@ -85,7 +85,6 @@ Debugger::Debugger(LastExpressEngine *engine) : _engine(engine), _command(NULL), DCmd_Register("entity", WRAP_METHOD(Debugger, cmdEntity)); // Misc - DCmd_Register("loadgame", WRAP_METHOD(Debugger, cmdLoadGame)); DCmd_Register("chapter", WRAP_METHOD(Debugger, cmdSwitchChapter)); DCmd_Register("clear", WRAP_METHOD(Debugger, cmdClear)); @@ -1118,30 +1117,6 @@ label_error: return true; } -/** - * Command: loads a game - * - * @param argc The argument count. - * @param argv The values. - * - * @return true if it was handled, false otherwise - */ -bool Debugger::cmdLoadGame(int argc, const char **argv) { - if (argc == 2) { - int id = getNumber(argv[1]); - - if (id == 0 || id > 6) - goto error; - - getSaveLoad()->loadGame((GameId)(id - 1)); - } else { -error: - DebugPrintf("Syntax: loadgame (id=1-6)\n"); - } - - return true; -} - /** * Command: switch to a specific chapter * diff --git a/engines/lastexpress/debug.h b/engines/lastexpress/debug.h index a9f0443af9..532cb83717 100644 --- a/engines/lastexpress/debug.h +++ b/engines/lastexpress/debug.h @@ -79,7 +79,6 @@ private: bool cmdShow(int argc, const char **argv); bool cmdEntity(int argc, const char **argv); - bool cmdLoadGame(int argc, const char **argv); bool cmdSwitchChapter(int argc, const char **argv); bool cmdClear(int argc, const char **argv); diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp index 7efce0007b..021dc40bb9 100644 --- a/engines/lastexpress/game/savegame.cpp +++ b/engines/lastexpress/game/savegame.cpp @@ -482,10 +482,10 @@ void SaveLoad::clear(bool clearStream) { // Save & Load ////////////////////////////////////////////////////////////////////////// -// Load game -void SaveLoad::loadGame(GameId id) { +// Load last saved game +void SaveLoad::loadLastGame() { if (!_savegame) - error("[SaveLoad::loadGame] No savegame stream present"); + error("[SaveLoad::loadLastGame] No savegame stream present"); // Rewind current savegame _savegame->seek(0); @@ -522,7 +522,29 @@ void SaveLoad::loadGame(GameId id) { } // Load a specific game entry -void SaveLoad::loadGame(GameId id, uint32 index) { +void SaveLoad::loadGame(uint32 index) { + if (!_savegame) + error("[SaveLoad::loadLastGame] No savegame stream present"); + + // Rewind current savegame + _savegame->seek(0); + + // Write main header (with selected index) + SavegameMainHeader header; + header.count = index; + header.brightness = getState()->brightness; + header.volume = getState()->volume; + + Common::Serializer ser(NULL, _savegame); + header.saveLoadWithSerializer(ser); + + // TODO + // Go to the entry + // Load the entry + // Get offset (main and entry) + // Write main header again with correct entry offset + // Setup game and start + error("[SaveLoad::loadGame] Not implemented! (only loading the last entry is working for now)"); } diff --git a/engines/lastexpress/game/savegame.h b/engines/lastexpress/game/savegame.h index 8656b2ee86..361957227e 100644 --- a/engines/lastexpress/game/savegame.h +++ b/engines/lastexpress/game/savegame.h @@ -153,8 +153,8 @@ public: uint32 init(GameId id, bool resetHeaders); // Save & Load - void loadGame(GameId id); - void loadGame(GameId id, uint32 index); + void loadLastGame(); + void loadGame(uint32 index); void saveGame(SavegameType type, EntityIndex entity, uint32 value); void loadVolumeBrightness(); diff --git a/engines/lastexpress/menu/menu.cpp b/engines/lastexpress/menu/menu.cpp index 6a453aee99..c48e55bb55 100644 --- a/engines/lastexpress/menu/menu.cpp +++ b/engines/lastexpress/menu/menu.cpp @@ -916,13 +916,13 @@ void Menu::startGame() { if (_lastIndex == _index) { setGlobalTimer(0); if (_index) { - getSaveLoad()->loadGame(_gameId); + getSaveLoad()->loadLastGame(); } else { getLogic()->resetState(); getEntities()->setup(true, kEntityPlayer); } } else { - getSaveLoad()->loadGame(_gameId, _index); + getSaveLoad()->loadGame(_index); } } -- cgit v1.2.3